commit 20f442c776ff20c81180b78b86faa3347fe30fd2 Author: topiam Date: Mon Dec 12 00:41:27 2022 +0800 :tada: 重磅发布 diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..f76a9a04 --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/** +!**/src/test/** +!**/target/generated-sources/** +**/logs/** +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ + +### VS Code ### +.vscode/ +.DS_Store +*/.DS_Store \ No newline at end of file diff --git a/.mvn/jvm.config b/.mvn/jvm.config new file mode 100644 index 00000000..23adc966 --- /dev/null +++ b/.mvn/jvm.config @@ -0,0 +1 @@ +-Xmx2048m -Xms1024m -Djava.awt.headless=true \ No newline at end of file diff --git a/.mvn/maven.config b/.mvn/maven.config new file mode 100644 index 00000000..30f8325a --- /dev/null +++ b/.mvn/maven.config @@ -0,0 +1 @@ +-T 1C -Dskiptests=true -Dmaven.compile.fork=true \ No newline at end of file diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..bf82ff01 Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..7174b43a --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..e69de29b diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..0ad25db4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/README.md b/README.md new file mode 100644 index 00000000..27acb989 --- /dev/null +++ b/README.md @@ -0,0 +1,136 @@ +
+ +logo + +[![](https://img.shields.io/badge/JDK-11+-orange)](https://www.oracle.com/au/java/technologies/javase/jdk11-archive-downloads.html) +[![](https://img.shields.io/badge/MySQL-8.0%2B-brightgreen)](https://www.mysql.com/downloads/) +[![](https://img.shields.io/badge/License-AGPL%203.0-orange)](https://github.com/topaim/eiam/blob/master/LICENSE) +[![](https://img.shields.io/badge/Maven-3.5.0+-brightgreen.svg)](https://maven.apache.org) + +[官方网站](https://eiam.topiam.cn) | [需求收集](https://github.com/topiam/eiam/issues/new) | [问题反馈](https://github.com/topiam/eiam/issues/new) + +
+ +-------------------------- + +
⭐️ 如果你喜欢 TopIAM,请给它一个 Star,您的支持将是我们前行的动力,项目正在积极开发,欢迎共建 👏🏻。
+ +-------------------------- + +## 项目介绍 + +**TopIAM** 数字身份管控平台,简称:EIAM(Employee Identity and Access Management), +用于管理企业内员工账号、权限、身份认证、应用访问,帮助整合部署在本地或云端的内部办公系统、业务系统及三方 SaaS +系统的所有身份,实现一个账号打通所有应用的服务。 + +## 产品价值 + +传统企业 IT +大多采用烟囱式建设方式,各系统独立建设账号体系、权限体系,当企业团队人数达到数十人至数百人时,由于系统数量多,在账户、密码、权限管理上会出现瓶颈。员工入职、离职,转岗都需要进行账号权限分配等此类管理,操作低效、功能重复、价值低,员工需要记录多套系统密码,容易出现安全问题,导致数据外泄。用户身份认证安全存疑,敏感系统缺乏严格的身份认证机制。 + +`EIAM` 提供一套集中式账号、权限、认证、应用、审计等,帮助企业打通身份数据孤岛,实现用户全生命周期,实现一个账号打通所有应用的服务,强化企业安全体系,提升组织管理效率,助力企业数字化转型升级。 + +## 核心特性 + ++ 提供统一组织信息管理,多维度建立对应关系,实现在一个平台对企业人员、组织架构、应用信息的高效统一管理。 ++ 支持钉钉、飞书、企业微信等身份源集成能力,实现系统和企业OA平台数据联动,以用户为管理基点,结合入职、离职、调岗、兼职等人事事件,关联其相关应用权限变化而变化,保证应用访问权限的安全控制。 ++ 支持多因素认证,行为验证码、社交认证,融合认证等机制,保证用户认证安全可靠。 ++ 支持微信、微博、QQ等社交认证集成,使企业具有快速纳入互联网化认证能力。 ++ 支持 `SAML2`,`OAuth2`,`OIDC`,`CAS`,表单代填等认证协议及机制,实现单点登录功能,预配置大量 SaaS 应用及传统应用模板,开箱即用。 ++ 完善的安全审计,详尽记录每一次用户行为,使每一步操作有据可循,实时记录企业信息安全状况,精准识别企业异常访问和潜在威胁的源头。 ++ 提供标准`REST`和`SCIM2.0`接口轻松完成机构用户同步,实现企业对于账号生命周期的精细化管理。 ++ 开源、安全、自主可控。 + +## 页面展示 + +> 仅展示部分UI页面 + ++ 管理端 + +![](https://user-images.githubusercontent.com/30397655/205442813-c5664670-aa12-4415-aa66-dadcddd04109.jpg) + +![](https://user-images.githubusercontent.com/30397655/206887727-2e6449a9-b75a-46f8-9fab-f215e2d26a38.png) + +![](https://user-images.githubusercontent.com/30397655/206887777-d1e6d138-8ab8-4d9b-87f6-08ea497a374e.png) + +![](https://user-images.githubusercontent.com/30397655/206887895-8c204839-9a74-4167-87f3-a131a528d444.png) + +-------------------------- + ++ 门户端 + +![](https://user-images.githubusercontent.com/30397655/206888201-93b1b261-40a6-4e83-b04c-8589da5f2f8a.jpg) + +## 在线演示 + ++ 管理端:https://eiam-console.topiam.cn ++ 用户端:https://eiam-portal.topiam.cn + +> 注意:演示环境已屏蔽敏感权限和相关操作 + +## 开源说明 + +一方面希望通过开源加强项目产品化程度;另一方面希望在社区中吸收更多的实践场景进而继续完善产品,也欢迎大家参与到项目中来。 + +为保证社区繁荣和项目自由健康发展,在开源许可证方面,`TopIAM` 选择采用 `AGPL-3.0` 开源协议,`AGPL-3.0` 是 OSI +批准的许可证,符合自由和开源软件的所有标准,**开源永远是我们的初心与核心,我们将始终不渝的坚持去做这件事,我们相信在社区的推动下,这件事我们一定会做的更好**。 + +或许很多开发者对此协议抱有一些疑问,开源社区目前也有很多采用 `AGPL-3.0` 协议的开源软件,例如 `MongoDB`、`Grafana`、`Loki` +等,维基百科还专门有一份列表列出了哪些[开源项目](https://en.wikipedia.org/wiki/Category:Software_using_the_GNU_AGPL_license) +采用了 `AGPL-3.0` 开源协议。 + +`AGPL-3.0` 协议有一个非常关键的点,即对修改上游开源项目代码后的二次分发版本必须也要开源,协议限制的是部分企业想 `Folk` +开源项目代码后进行闭源商业分发,跟上游开源项目的维护团队进行直接的商业竞争,如果仅仅只是企业内部自己使用而不进行任何层面修改,用户大可不必担心 `AGPL-3.0` +协议带来的限制, 这些条件旨在鼓励和希望修改软件的第三方也为项目和社区做出贡献。我们认为这是一种更公平的前进方式,我们相信这将有助于我们建立更强大的社区。 + +简单来讲:如果您修改了 `TopIAM` 项目源代码,那么您必须将这些修改贡献给社区,**绝不允许修改后和衍生的代码做为闭源的商业软件发布和销售 +**。 + +我们也提供了商业授权,如果您**需要将本产品进行二次开发、更改并进行任何附带商业化性质行为使用** +,请联系我们进行商业授权,以遵守 `AGPL-3.0` 协议保证您的正常使用。 + +除此之外,我们也会酌情接受根据个人或企业需求的定制化开发。 + +目前在国内 `GPL` 协议**具备合同特征,是一种民事法律行为** ,属于我国《合同法》调整的范围。 `TopIAM` 项目团队保留诉讼权利。 + +[相关案例:违反 `GPL` 协议赔偿 50 万,国内首例!](https://mp.weixin.qq.com/s/YQ6sNjbDS-P7BViLZIsaoA) + +> **TopIAM 开源团队拥有对本开源协议的最终解释权。** + +## 技术架构 + +前端技术栈:`ES6`、`React`、`TypeScript`、`UmiJS`、`Axios`、`Ant Design`; + +后端技术栈:`JDK11`、`Spring Boot`、`Spring Data`、`Spring Security`、`Elasticsearch`、`Redis`、`MySQL`; + +## 联系我们 + +如果你想加入我们的开源交流群, 或在关于 `TopIAM` 产品上的任何想法、意见建议,商务上的合作需求,请扫码添加下方微信进一步沟通。 + +![](https://user-images.githubusercontent.com/30397655/205442835-cfcfbf2e-eefb-4e9f-8f36-72d91c240896.jpg) + +欢迎关注 TopIAM 微信公众号,接收产品最新动态。 + +![](https://user-images.githubusercontent.com/30397655/206887629-faf77f3e-1681-4918-99bf-773ef434f088.png) + +## 参与贡献 + +我们强烈欢迎有兴趣的开发者参与到项目建设中来,同时欢迎大家对项目提出宝贵意见建议和功能需求,项目正在积极开发,欢迎 PR 👏。 + +强烈推荐阅读 [《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way)、[《如何向开源社区提问题》](https://github.com/seajs/seajs/issues/545) +和 [《如何有效地报告 Bug》](http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html)、[《如何向开源项目提交无法解答的问题》](https://zhuanlan.zhihu.com/p/25795393) +,更好的问题更容易获得帮助。 + +## License + +license + +## 捐赠支持 + +如果您觉得我们的开源项目对您有帮助,那就请项目开发者们来一杯咖啡☕️吧!当前我们接受来自于**微信**、**支付宝**或者**码云** +的捐赠,请在捐赠时备注自己的昵称或附言。 + +您的捐赠将用于支付该项目的一些费用支出,并激励开发者们更好的推动项目的发展,同时欢迎捐赠**公网服务器** +用于提高开发基础设施环境及在线演示系统体验。 + +![](https://user-images.githubusercontent.com/30397655/205442840-1b54a95c-3d11-4542-ae51-040f849b26aa.jpg) diff --git a/eiam-alert/pom.xml b/eiam-alert/pom.xml new file mode 100644 index 00000000..638cad41 --- /dev/null +++ b/eiam-alert/pom.xml @@ -0,0 +1,34 @@ + + + + + cn.topiam + eiam + 1.0.0-beta1 + ../pom.xml + + 4.0.0 + + eiam-alert + pom + \ No newline at end of file diff --git a/eiam-application/eiam-application-all/pom.xml b/eiam-application/eiam-application-all/pom.xml new file mode 100644 index 00000000..19358648 --- /dev/null +++ b/eiam-application/eiam-application-all/pom.xml @@ -0,0 +1,67 @@ + + + + + cn.topiam + eiam-application + 1.0.0-beta1 + ../pom.xml + + jar + 4.0.0 + + eiam-application-all + + + + + cn.topiam + eiam-application-cas + ${project.version} + + + + cn.topiam + eiam-application-form + ${project.version} + + + + cn.topiam + eiam-application-jwt + ${project.version} + + + + cn.topiam + eiam-application-oidc + ${project.version} + + + + cn.topiam + eiam-application-saml2 + ${project.version} + + + \ No newline at end of file diff --git a/eiam-application/eiam-application-cas/pom.xml b/eiam-application/eiam-application-cas/pom.xml new file mode 100644 index 00000000..f4b10b75 --- /dev/null +++ b/eiam-application/eiam-application-cas/pom.xml @@ -0,0 +1,41 @@ + + + + + cn.topiam + eiam-application + 1.0.0-beta1 + ../pom.xml + + jar + 4.0.0 + + eiam-application-cas + + + cn.topiam + eiam-application-core + ${project.version} + + + \ No newline at end of file diff --git a/eiam-application/eiam-application-cas/src/main/java/cn/topiam/employee/application/cas/AbstractCasApplicationService.java b/eiam-application/eiam-application-cas/src/main/java/cn/topiam/employee/application/cas/AbstractCasApplicationService.java new file mode 100644 index 00000000..6d716e7a --- /dev/null +++ b/eiam-application/eiam-application-cas/src/main/java/cn/topiam/employee/application/cas/AbstractCasApplicationService.java @@ -0,0 +1,46 @@ +/* + * eiam-application-cas - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.cas; + +import cn.topiam.employee.application.ApplicationService; +import cn.topiam.employee.common.repository.app.AppCertRepository; +import cn.topiam.employee.common.repository.app.AppRepository; + +/** + * CAS 应用配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/23 20:58 + */ +public abstract class AbstractCasApplicationService implements ApplicationService { + + /** + * AppCertRepository + */ + protected final AppCertRepository appCertRepository; + /** + * ApplicationRepository + */ + protected final AppRepository appRepository; + + protected AbstractCasApplicationService(AppCertRepository appCertRepository, + AppRepository appRepository) { + this.appCertRepository = appCertRepository; + this.appRepository = appRepository; + } +} diff --git a/eiam-application/eiam-application-cas/src/main/java/cn/topiam/employee/application/cas/CasStandardApplicationServiceImpl.java b/eiam-application/eiam-application-cas/src/main/java/cn/topiam/employee/application/cas/CasStandardApplicationServiceImpl.java new file mode 100644 index 00000000..de154eb9 --- /dev/null +++ b/eiam-application/eiam-application-cas/src/main/java/cn/topiam/employee/application/cas/CasStandardApplicationServiceImpl.java @@ -0,0 +1,155 @@ +/* + * eiam-application-cas - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.cas; + +import java.util.List; +import java.util.Map; + +import org.springframework.stereotype.Component; + +import cn.topiam.employee.common.enums.app.AppProtocol; +import cn.topiam.employee.common.enums.app.AppType; +import cn.topiam.employee.common.repository.app.AppCertRepository; +import cn.topiam.employee.common.repository.app.AppRepository; + +/** + * Cas 用户应用 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/20 23:20 + */ +@Component +public class CasStandardApplicationServiceImpl extends AbstractCasApplicationService { + + /** + * 更新应用配置 + * + * @param appId {@link String} + * @param config {@link Map} + */ + @Override + public void saveConfig(String appId, Map config) { + } + + /** + * 获取配置 + * + * @param appId {@link String} + * @return {@link Map} + */ + @Override + public Object getConfig(String appId) { + return null; + } + + /** + * 获取应用标志 + * + * @return {@link String} + */ + @Override + public String getCode() { + return "cas"; + } + + /** + * 获取应用名称 + * + * @return {@link String} + */ + @Override + public String getName() { + return "CAS"; + } + + /** + * 获取应用描述 + * + * @return {@link String} + */ + @Override + public String getDescription() { + return "CAS(Central Authentication Service,集中式认证服务,版本 2.0)是一种基于挑战、应答的开源单点登录协议。在集成客户端和服务端之间网络通畅的情况下广泛在企业中使用,有集成简便,扩展性强的优点。"; + } + + /** + * 获取应用类型 + * + * @return {@link AppType} + */ + @Override + public AppType getType() { + return AppType.STANDARD; + } + + /** + * 获取应用协议 + * + * @return {@link AppProtocol} + */ + @Override + public AppProtocol getProtocol() { + return AppProtocol.CAS; + } + + /** + * 获取表单Schema + * + * @return {@link Map} + */ + @Override + public List getFormSchema() { + return null; + } + + /** + * 获取base64图标 + * + * @return {@link String} + */ + @Override + public String getBase64Icon() { + return "data:image/svg+xml;base64,PHN2ZyB0PSIxNjYwOTc4MDU4MDA3IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDMzODIgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMwMDQiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48cGF0aCBkPSJNOTI5LjI2MTQzNCA3NzEuNDQ3OThIMjUzLjU5MDY2OFYyNTYuMjY2NTExaDY3NS42NzA3NjZWNzUuMTU1OTYzSDI2Ni42ODI5OTZzLTczLjEwNzE2NC00LjY2MzkzNC0xMzQuNzA0NDA1IDUzLjI4NTQ0NWMtNjEuNjk3MTgzIDU3LjgxNjEyMy01NS43MzQwMSAxMjkuNjQwNzA1LTU1LjczNDAxIDEyOS42NDA3MDV2NjkwLjcxMTk1M2g4NTMuMDE2ODUzVjc3MS40NDc5OHoiIGZpbGw9IiMxRjNGNzgiIHAtaWQ9IjMwMDUiPjwvcGF0aD48cGF0aCBkPSJNMTAxMC44ODAyNzcgMTAyMy45NTAwMjlIMC4wMzkyMzNWMjIzLjM1MjQ2M2MtMC4xMzMyNTUtMi43NjUwNDctMi41ODE4MjEtODMuMTAxMzA4IDY2LjAyNzk3OC0xNTIuMzk0MDRDMTM3LjU3NTMxMi0xLjM2NTg2NiAyMjguMjg4ODI2LTAuMDMzMzE0IDIzMi4xNjk4ODYgMC4wMzMzMTRoNzc4LjcxMDM5MXYzMjUuODQyNDFIMzI1Ljg4MTY0M1Y3MDguNTg0ODE0bDY4OS41NDU5NjktMS4yNjU5MjUgMC4wNDk5NzEgMzAuNzgxOTYzaC00LjU5NzMwNnYyODUuODQ5MTc3ek0zMC44Mzc4NTQgOTkzLjE2ODA2Nmg5NDkuMjc3MTE2di0yNTUuMDE3MjQzbC02ODUuMDE1MjkxIDEuMjY1OTI1VjI5NS4wNjA0NDZIOTgwLjA5ODMxM1YzMC43OTg2MjFIMjMxLjgwMzQzNGMtMS4xOTkyOTctMC4wMzMzMTQtODEuOTM1MzI0LTAuODE2MTg4LTE0My44NDkwNDcgNjEuNzk3MTI0LTU5LjI5ODU4OCA1OS44OTgyMzctNTcuMTgzMTYxIDEyOS40MjQxNjYtNTcuMTQ5ODQ3IDEzMC4xMjM3NTVsMC4wMzMzMTQgNzcwLjQ0ODU2NnoiIGZpbGw9IiMyNDNFOTAiIHAtaWQ9IjMwMDYiPjwvcGF0aD48cGF0aCBkPSJNMzI1Ny43OTcwNTcgNDIzLjkwMTYybC02NzYuNTcwMjM5IDUuMzEzNTUzVjI1Ni4yNjY1MTFoNjc2LjU3MDIzOVY3NS4xNTU5NjNIMjU4My44MjUyOTZzLTcyLjk5MDU2NS00LjY2MzkzNC0xMzQuNTU0NDkzIDUzLjI4NTQ0NWMtNjEuNzEzODQgNTcuODE2MTIzLTU1Ljc1MDY2NyAxMjkuNjQwNzA1LTU1Ljc1MDY2NyAxMjkuNjQwNzA1djM0OS4xMTIxMDloNjgwLjA4NDg0NnYxNjYuNzE4OThoLTY4MC4wODQ4NDZ2MTc1LjEzMDcxOGg4NjQuMjkzNTc4VjQyMy45MDE2MnoiIGZpbGw9IiMxRjNGNzgiIHAtaWQ9IjMwMDciPjwvcGF0aD48cGF0aCBkPSJNMzMxNS4zNjMzMjcgMTAyMy45NTAwMjlIMjMzNS4zMDQyNDdhMTUuMzkwOTgyIDE1LjM5MDk4MiAwIDAgMS0xNS4zOTA5ODItMTUuMzkwOTgyVjcyMS45MjY5OTZjMC04LjQ5NTAyMiA2Ljg5NTk1OS0xNS4zOTA5ODIgMTUuMzkwOTgyLTE1LjM5MDk4Mmg2NzYuMDg3MTg4di0zOC4wNjEwMzJIMjMzNS4zMDQyNDdhMTUuMzkwOTgyIDE1LjM5MDk4MiAwIDAgMS0xNS4zOTA5ODItMTUuMzkwOTgydi00MjkuNzQ4MTk0Yy0wLjExNjU5OC0yLjc4MTcwMy0yLjQzMTkwOC04My4xMDEzMDggNjYuMTYxMjM0LTE1Mi4zOTQwNCA3MS4zNTgxODktNzIuMzI0Mjg5IDE2Mi4xODgzMDEtNzEuMDI1MDUgMTY2LjA4NjAxNy03MC45MjUxMDloNzYzLjIwMjgxMWM4LjQ5NTAyMiAwIDE1LjM5MDk4MiA2Ljg5NTk1OSAxNS4zOTA5ODIgMTUuMzkwOTgydjI5NS4wNDM3ODlhMTUuMzkwOTgyIDE1LjM5MDk4MiAwIDAgMS0xNS4zOTA5ODIgMTUuMzkwOTgyaC02NjkuNjI0MzA5djM4LjU3NzM5Nmg2NzAuMjU3MjcxYTE1LjM5MDk4MiAxNS4zOTA5ODIgMCAwIDEgMTUuMzkwOTgyIDE1LjQwNzYzOWwtMC42NDk2MTkgNjI4LjczMTYwMmExNS4zOTA5ODIgMTUuMzkwOTgyIDAgMCAxLTE1LjM3NDMyNSAxNS4zOTA5ODJ6IG0tOTY0LjY2ODA5OC0zMC43ODE5NjNoOTQ5LjI5Mzc3M2wwLjYxNjMwNi01OTcuOTQ5NjM5aC02NzAuMjQwNjE1YTE1LjM5MDk4MiAxNS4zOTA5ODIgMCAwIDEtMTUuMzkwOTgyLTE1LjM5MDk4MnYtNjkuMzc2MDE3YzAtOC40OTUwMjIgNi44OTU5NTktMTUuMzkwOTgyIDE1LjM5MDk4Mi0xNS4zOTA5ODJoNjY5LjYwNzY1MlYzMC43OTg2MjFoLTc0OC4xNzgyODFjLTEuMTQ5MzI3IDAuMDMzMzE0LTgyLjEwMTg5My0wLjc0OTU2MS0xNDMuODE1NzMzIDYxLjc5NzEyNC01OC44NjU1MDggNTkuNDQ4NS01Ny4yOTk3NTkgMTI5LjQ5MDc5My01Ny4yODMxMDIgMTMwLjE5MDM4M3Y0MTQuOTIzNTQ3aDY3Ni4wODcxODhjOC40OTUwMjIgMCAxNS4zOTA5ODIgNi44NzkzMDIgMTUuMzkwOTgyIDE1LjM5MDk4MnY2OC44MjYzMzljMCA4LjQ5NTAyMi02Ljg5NTk1OSAxNS4zOTA5ODItMTUuMzkwOTgyIDE1LjM5MDk4MmgtNjc2LjA4NzE4OHYyNTUuODUwMDg4eiBtLTU3LjUzMjk1NiAyOS43MzI1NzhoLTMxNy44NjM3NTJhMTUuMzkwOTgyIDE1LjM5MDk4MiAwIDAgMS0xMy42NDIwMDYtOC4yNjE4MjZMMTg3Mi4yNDIyMzkgODQzLjYwNTdIMTQ3My4xMjYwOTZhMTExOTIzLjc4NjMyMyAxMTE5MjMuNzg2MzIzIDAgMCAwLTc5Ljk2OTgwOSAxNzAuNDMzNDcgMTUuMzc0MzI1IDE1LjM3NDMyNSAwIDAgMS0xMy45MjUxNzQgOC44NjE0NzRIMTAzOS44Mjk5ODFhMTUuNDU3NjA5IDE1LjQ1NzYwOSAwIDAgMS0xMy4xMjU2NDMtNy4zMjkwMzkgMTUuNDI0Mjk2IDE1LjQyNDI5NiAwIDAgMS0wLjYxNjMwNS0xNS4wMDc4NzNjODMuMTE3OTY1LTE2NC4zNTM2OTkgMTY0LjM4NzAxMy0zMzEuNTA1NzU4IDI0Mi45NzQyOTgtNDkzLjE0NDM4MSA3OC42MzcyNTctMTYxLjczODU2NSAxNTkuOTM5NjE5LTMyOC45NzM5MDkgMjQzLjE1NzUyNS00OTMuNTEwODM0YTE1LjQwNzYzOSAxNS40MDc2MzkgMCAwIDEgMTMuNzQxOTQ4LTguNDQ1MDUyaDI2NS40OTQ0MzdjNy4wNzkxODUgMCAxMy4wNDIzNTggNC43ODA1MzIgMTQuODQxMzA0IDExLjI5MzM4MyA4NS44MTYzODQgMTY0LjIzNzEwMSAxNjkuMDE3NjMzIDMzMC4wMjMyOTQgMjQ5LjUwMzgwNyA0OTAuMzk1OTkyIDgwLjk1MjU2NyAxNjEuMzM4Nzk5IDE2NC42ODY4MzcgMzI4LjE0MTA2MyAyNTAuOTg2MjcxIDQ5My4yNDQzMjNhMTUuMzc0MzI1IDE1LjM3NDMyNSAwIDAgMS0xMy42MjUzNSAyMi41MDM0ODF6IG0tMzA4LjU1MjU0MS0zMC43NjUzMDdoMjgzLjE2NzQxNWMtODIuMjY4NDYyLTE1Ny45NDA3OS0xNjIuMTIxNjczLTMxNy4wNjQyMi0yMzkuNDU5NjkyLTQ3MS4xNzM5MjEtNzkuNTcwMDQ0LTE1OC41NTcwOTUtMTYxLjgyMTg0OS0zMjIuMzk0NDMtMjQ2LjUzODg3Ny00ODQuNzE1OTg3SDE1MzUuNDM5NTg0Yy04MS42MTg4NDMgMTYxLjYwNTMwOS0xNjEuNDM4NzQgMzI1Ljc5MjQzOS0yMzguNjc2ODE3IDQ4NC42MzI3MDItNzUuMDg5MzM2IDE1NC40NDI4MzktMTUyLjYyNzIzNyAzMTMuOTE2MDY1LTIzMS44OTc0NTYgNDcxLjI1NzIwNmgzMDQuNTg4MTk3YzI2LjYxNzczNy01Ni44MTY3MDkgNTMuMjUyMTMxLTExMy42MzM0MTggODAuMDAzMTI0LTE3MC40NTAxMjdhMTUuMzkwOTgyIDE1LjM5MDk4MiAwIDAgMSAxMy45MjUxNzQtOC44MjgxNmg0MTguMjA0OTU4YzUuNzI5OTc2IDAgMTAuOTkzNTU4IDMuMTgxNDY5IDEzLjY0MjAwNiA4LjI2MTgyNmw4OS4zODA5NjIgMTcxLjAxNjQ2MXoiIGZpbGw9IiMyNDNFOTAiIHAtaWQ9IjMwMDgiPjwvcGF0aD48cGF0aCBkPSJNMTUxNi42MzM5MzcgNTkzLjMxOTAxOWgyOTYuNDc2MjgzbC0xNDguMTc5ODQzLTMxMi41NTAxOTktMTQ4LjI5NjQ0IDMxMi41NTAxOTl6IG0yNDEuNjU4NDAzLTUwOS4wNjgzODVsNDM4LjI5MzE4NyA4NjUuMDU5Nzk2aC0xOTkuNzgyOTM5bC04Ni45OTkwMjQtMTY5LjAzNDI5SDE0MjAuMDU3MTkxbC04MC42MzYwODUgMTY5LjAzNDI5SDExMzYuNDIzMzgzbDQyMi4wODYwMTctODY1LjA1OTc5NmgxOTkuNzgyOTR6IiBmaWxsPSIjMUYzRjc4IiBwLWlkPSIzMDA5Ij48L3BhdGg+PHBhdGggZD0iTTE2NjMuOTQ3NjIgMzgxLjc1OTY0Nmw4My42Njc2NDMgMTc1LjExNDA2MUgxNTgwLjI5NjYzNGw4My42NTA5ODYtMTc1LjExNDA2MW0wLTUzLjUzNTI5OGwtMTIwLjI3OTUyNCAyNTEuNzUyNDg4aDI0MC41NTkwNDhsLTEyMC4yNzk1MjQtMjUxLjc1MjQ4OHoiIGZpbGw9IiMyNDNFOTAiIHAtaWQ9IjMwMTAiPjwvcGF0aD48L3N2Zz4="; + } + + /** + * 创建应用 + * + * @param name {@link String} 名称 + * @param remark {@link String} 备注 + */ + @Override + public String create(String name, String remark) { + return ""; + } + + /** + * 删除应用 + * + * @param appId {@link String} 应用ID + */ + @Override + public void delete(String appId) { + + } + + protected CasStandardApplicationServiceImpl(AppCertRepository appCertRepository, + AppRepository appRepository) { + super(appCertRepository, appRepository); + } +} diff --git a/eiam-application/eiam-application-cas/src/main/java/cn/topiam/employee/application/cas/package-info.java b/eiam-application/eiam-application-cas/src/main/java/cn/topiam/employee/application/cas/package-info.java new file mode 100644 index 00000000..40ef4277 --- /dev/null +++ b/eiam-application/eiam-application-cas/src/main/java/cn/topiam/employee/application/cas/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-cas - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.cas; \ No newline at end of file diff --git a/eiam-application/eiam-application-cas/src/main/java/cn/topiam/employee/application/package-info.java b/eiam-application/eiam-application-cas/src/main/java/cn/topiam/employee/application/package-info.java new file mode 100644 index 00000000..51618995 --- /dev/null +++ b/eiam-application/eiam-application-cas/src/main/java/cn/topiam/employee/application/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-cas - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application; \ No newline at end of file diff --git a/eiam-application/eiam-application-core/pom.xml b/eiam-application/eiam-application-core/pom.xml new file mode 100644 index 00000000..6bd5bbf2 --- /dev/null +++ b/eiam-application/eiam-application-core/pom.xml @@ -0,0 +1,34 @@ + + + + + cn.topiam + eiam-application + 1.0.0-beta1 + ../pom.xml + + jar + 4.0.0 + + eiam-application-core + \ No newline at end of file diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/AbstractApplicationService.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/AbstractApplicationService.java new file mode 100644 index 00000000..f95d28ee --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/AbstractApplicationService.java @@ -0,0 +1,136 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application; + +import java.math.BigInteger; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.Date; + +import org.bouncycastle.asn1.x500.X500Name; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import cn.topiam.employee.common.entity.app.AppCertEntity; +import cn.topiam.employee.common.enums.app.AppCertUsingType; +import cn.topiam.employee.common.repository.app.AppAccessPolicyRepository; +import cn.topiam.employee.common.repository.app.AppAccountRepository; +import cn.topiam.employee.common.repository.app.AppCertRepository; +import cn.topiam.employee.common.repository.app.AppRepository; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.util.CertUtils; +import cn.topiam.employee.support.util.RsaUtils; +import static cn.topiam.employee.support.util.CertUtils.encodePem; +import static cn.topiam.employee.support.util.CertUtils.getX500Name; +import static cn.topiam.employee.support.util.RsaUtils.getKeys; + +/** + * AbstractApplicationService + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/31 22:34 + */ +public abstract class AbstractApplicationService implements ApplicationService { + private final Logger logger = LoggerFactory.getLogger(AbstractApplicationService.class); + + /** + * 创建证书 + * + * @param appId {@link Long} + * @param appCode {@link Long} + * @param usingType {@link AppCertUsingType} + */ + public void createCertificate(Long appId, String appCode, AppCertUsingType usingType) { + try { + AppCertEntity config = new AppCertEntity(); + config.setAppId(appId); + //私钥长度 + config.setKeyLong(2048); + //算法 + config.setSignAlgo("SHA256WITHRSA"); + RsaUtils.RsaResult keys = getKeys(config.getKeyLong()); + X500Name x500Name = getX500Name("app_" + appCode, "TopIAM", "Jinan", "Shandong", "CN", + "EIAM"); + //发行者 + config.setIssuer(x500Name.toString()); + //主题 + config.setSubject(x500Name.toString()); + //证书 起始日期 与 结束日期 + LocalDateTime localDateTime = LocalDateTime.now(); + //证书序列号 + config.setSerial(BigInteger.valueOf(System.currentTimeMillis())); + //开始时间 + Date notBefore = Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant()); + config.setBeginDate( + notBefore.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime()); + //结束时间 + Date notAfter = Date + .from(localDateTime.plusYears(10).atZone(ZoneId.systemDefault()).toInstant()); + config + .setEndDate(notAfter.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime()); + //相差天数 + config + .setValidity((int) ((notAfter.getTime() - notBefore.getTime()) / 1000 / 3600 / 24)); + //生成证书 + String certificate = CertUtils.getCertificate(x500Name, x500Name, config.getSerial(), + notBefore, notAfter, keys.getPublicKey(), keys.getPrivateKey()); + //私钥 + config.setPrivateKey(encodePem(keys.getPrivateKey())); + //公钥 + config.setPublicKey(encodePem(keys.getPublicKey())); + //证书 + config.setCert(certificate); + //使用类型 + config.setUsingType(usingType); + appCertRepository.save(config); + } catch (Exception e) { + logger.error("创建应用证书异常", e); + throw new TopIamException(e.getMessage(), e); + } + } + + /** + * AppCertRepository + */ + protected final AppCertRepository appCertRepository; + + /** + * AppAccountRepository + */ + protected final AppAccountRepository appAccountRepository; + + /** + *AppAccessPolicyRepository + */ + protected final AppAccessPolicyRepository appAccessPolicyRepository; + + /** + * ApplicationRepository + */ + protected final AppRepository appRepository; + + protected AbstractApplicationService(AppCertRepository appCertRepository, + AppAccountRepository appAccountRepository, + AppAccessPolicyRepository appAccessPolicyRepository, + AppRepository appRepository) { + this.appCertRepository = appCertRepository; + this.appAccountRepository = appAccountRepository; + this.appAccessPolicyRepository = appAccessPolicyRepository; + this.appRepository = appRepository; + } +} diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/ApplicationService.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/ApplicationService.java new file mode 100644 index 00000000..7510efc7 --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/ApplicationService.java @@ -0,0 +1,118 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application; + +import java.util.List; +import java.util.Map; + +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.enums.app.AppProtocol; +import cn.topiam.employee.common.enums.app.AppType; + +/** + * 应用接口 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/20 23:20 + */ +public interface ApplicationService { + + /** + * 获取应用标志 + * + * @return {@link String} + */ + String getCode(); + + /** + * 获取应用名称 + * + * @return {@link String} + */ + String getName(); + + /** + * 获取应用描述 + * + * @return {@link String} + */ + String getDescription(); + + /** + * 获取应用类型 + * + * @return {@link String} + */ + AppType getType(); + + /** + * 获取应用协议 + * + * @return {@link AppProtocol} + */ + AppProtocol getProtocol(); + + /** + * 获取表单Schema + * + * @return {@link Map} + */ + List getFormSchema(); + + /** + * 获取base64图标 + * + * @return {@link String} + */ + String getBase64Icon(); + + /** + * 创建应用 + * + * @param name {@link String} 名称 + * @param remark {@link String} 备注 + * @return {@link String} 应用ID + */ + @Transactional(rollbackFor = Exception.class) + String create(String name, String remark); + + /** + * 删除应用 + * + * @param appId {@link String} 应用ID + */ + void delete(String appId); + + /** + * 更新应用配置 + * + * @param appId {@link String} + * @param config {@link Map} + */ + @Transactional(rollbackFor = Exception.class) + void saveConfig(String appId, Map config); + + /** + * 获取配置 + * + * @param appId {@link String} + * @return {@link Map} + */ + Object getConfig(String appId); +} diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/ApplicationServiceLoader.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/ApplicationServiceLoader.java new file mode 100644 index 00000000..0870820a --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/ApplicationServiceLoader.java @@ -0,0 +1,104 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application; + +import java.util.*; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.BeanInitializationException; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.context.*; +import org.springframework.context.annotation.Configuration; + +import cn.topiam.employee.application.exception.AppTemplateNotExistException; + +/** + * 应用服务加载器 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/20 19:08 + */ +@Configuration +public class ApplicationServiceLoader implements ApplicationContextAware { + + private final Logger logger = LoggerFactory + .getLogger(ApplicationServiceLoader.class); + /** + * 用于保存接口实现类名及对应的类 + */ + private Map loadMap = new HashMap<>(16); + /** + * key: code,value:templateImpl + */ + private final Map applicationServiceMap = new HashMap<>(16); + + /** + * Set the ApplicationContext that this object runs in. + * Normally this call will be used to initialize the object. + *

Invoked after population of normal bean properties but before an init callback such + * as {@link InitializingBean#afterPropertiesSet()} + * or a custom init-method. Invoked after {@link ResourceLoaderAware#setResourceLoader}, + * {@link ApplicationEventPublisherAware#setApplicationEventPublisher} and + * {@link MessageSourceAware}, if applicable. + * + * @param applicationContext the ApplicationContext object to be used by this object + * @throws ApplicationContextException in case of context initialization errors + * @throws BeansException if thrown by application context methods + * @see BeanInitializationException + */ + @Override + public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws BeansException { + loadMap = applicationContext.getBeansOfType(ApplicationService.class); + getApplicationServiceList(); + } + + /** + * 获取应用列表 + * + * @return {@link List} + */ + public Set getApplicationServiceList() { + List values = loadMap.values().stream().toList(); + return new HashSet<>(values); + } + + /** + * 根据CODE获取应用 + * + * @param code {@link String} + * @return {@link List} + */ + public ApplicationService getApplicationService(String code) { + ApplicationService impl = applicationServiceMap.get(code); + if (Objects.isNull(impl)) { + for (ApplicationService service : getApplicationServiceList()) { + if (code.equals(service.getCode())) { + applicationServiceMap.put(code, service); + return service; + } + } + } + if (Objects.isNull(impl)) { + throw new AppTemplateNotExistException(); + } + return impl; + } + +} diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/Saml2ApplicationService.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/Saml2ApplicationService.java new file mode 100644 index 00000000..7efa7959 --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/Saml2ApplicationService.java @@ -0,0 +1,46 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application; + +import cn.topiam.employee.core.protocol.Saml2ProtocolConfig; +import cn.topiam.employee.core.protocol.Saml2SsoModel; + +/** + * 应用接口 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/20 23:20 + */ +public interface Saml2ApplicationService extends ApplicationService { + + /** + * 获取SSO Modal + * + * @param appId {@link String} + * @return {@link Saml2SsoModel} + */ + Saml2SsoModel getSsoModel(String appId); + + /** + * 获取协议配置 + * + * @param appId {@link String} + * @return {@link Saml2ProtocolConfig} + */ + Saml2ProtocolConfig getProtocolConfig(String appId); +} diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/SamlRamRoleNameValueType.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/SamlRamRoleNameValueType.java new file mode 100644 index 00000000..a22961d9 --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/SamlRamRoleNameValueType.java @@ -0,0 +1,44 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application; + +import com.fasterxml.jackson.annotation.JsonValue; + +import lombok.Getter; + +/** + * Ram 角色名类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/24 22:39 + */ +public enum SamlRamRoleNameValueType { + + /** + * 应用用户名 + */ + APP_USERNAME("app_user.username"); + + @Getter + @JsonValue + private final String code; + + SamlRamRoleNameValueType(String code) { + this.code = code; + } +} diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/context/ApplicationContext.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/context/ApplicationContext.java new file mode 100644 index 00000000..89806d26 --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/context/ApplicationContext.java @@ -0,0 +1,71 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.context; + +import java.util.Map; + +import lombok.Data; + +/** + * ApplicationContext + * + * @author TopIAM + * Created by support@topiam.cn on 2022/10/29 22:34 + */ +@Data +public final class ApplicationContext { + /** + * 应用ID + */ + private final Long appId; + + /** + * 应用编码 + */ + private final String appCode; + + /** + * 应用模版 + */ + private final String appTemplate; + + /** + * 客户端ID + */ + private final String clientId; + + /** + * 客户端秘钥 + */ + private final String clientSecret; + + /** + * 配置 + */ + private final Map config; + + public ApplicationContext(Long appId, String appCode, String appTemplate, String clientId, + String clientSecret, Map config) { + this.appCode = appCode; + this.appId = appId; + this.appTemplate = appTemplate; + this.clientId = clientId; + this.clientSecret = clientSecret; + this.config = config; + } +} diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/context/ApplicationContextHolder.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/context/ApplicationContextHolder.java new file mode 100644 index 00000000..17dd4e9f --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/context/ApplicationContextHolder.java @@ -0,0 +1,62 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.context; + +/** + * + * ApplicationContextHolder + * + * @author TopIAM + * Created by support@topiam.cn on 2022/10/29 22:37 + */ +public final class ApplicationContextHolder { + private static final ThreadLocal HOLDER = new ThreadLocal<>(); + + private ApplicationContextHolder() { + } + + /** + * Returns the {@link ApplicationContext} bound to the current thread. + * + * @return the {@link ApplicationContext} + */ + public static ApplicationContext getApplicationContext() { + return HOLDER.get(); + } + + /** + * Bind the given {@link ApplicationContext} to the current thread. + * + * @param applicationContext the {@link ApplicationContext} + */ + public static void setProviderContext(ApplicationContext applicationContext) { + if (applicationContext == null) { + resetProviderContext(); + } else { + HOLDER.set(applicationContext); + } + } + + /** + * Reset the {@link ApplicationContext} bound to the current thread. + */ + public static void resetProviderContext() { + HOLDER.remove(); + } + +} diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/context/package-info.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/context/package-info.java new file mode 100644 index 00000000..0f0f4da7 --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/context/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.context; \ No newline at end of file diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppCertNotExistException.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppCertNotExistException.java new file mode 100644 index 00000000..62dae71f --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppCertNotExistException.java @@ -0,0 +1,32 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.exception; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 应用证书不存在 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/8 22:21 + */ +public class AppCertNotExistException extends TopIamException { + public AppCertNotExistException() { + super("应用证书不存在"); + } +} diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppConfigNotExistException.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppConfigNotExistException.java new file mode 100644 index 00000000..2fc878b3 --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppConfigNotExistException.java @@ -0,0 +1,32 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.exception; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 应用配置不存在 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/8 22:21 + */ +public class AppConfigNotExistException extends TopIamException { + public AppConfigNotExistException() { + super("app_config_not_exist", "应用配置不存在", DEFAULT_STATUS); + } +} diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppNotEnableException.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppNotEnableException.java new file mode 100644 index 00000000..980210ab --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppNotEnableException.java @@ -0,0 +1,32 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.exception; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 应用未启用 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/8 22:23 + */ +public class AppNotEnableException extends TopIamException { + public AppNotEnableException() { + super("app_not_enable", "应用未启用", DEFAULT_STATUS); + } +} diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppNotExistException.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppNotExistException.java new file mode 100644 index 00000000..904b227c --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppNotExistException.java @@ -0,0 +1,32 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.exception; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 应用不存在异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/8 22:23 + */ +public class AppNotExistException extends TopIamException { + public AppNotExistException() { + super("app_not_exist", "应用不存在", DEFAULT_STATUS); + } +} diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppTemplateNotExistException.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppTemplateNotExistException.java new file mode 100644 index 00000000..c8871ea9 --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/AppTemplateNotExistException.java @@ -0,0 +1,34 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.exception; + +import cn.topiam.employee.support.exception.TopIamException; +import static org.springframework.http.HttpStatus.BAD_REQUEST; + +/** + * 应用模版不存在 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/8 22:49 + */ +public class AppTemplateNotExistException extends TopIamException { + + public AppTemplateNotExistException() { + super("app_template_not_exist", "应用模版不存在", BAD_REQUEST); + } +} diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/ParseSaml2MetadataException.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/ParseSaml2MetadataException.java new file mode 100644 index 00000000..ba3c4202 --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/exception/ParseSaml2MetadataException.java @@ -0,0 +1,31 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.exception; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 解析SAML 元数据异常 + * + * @author TopIAM + */ +public class ParseSaml2MetadataException extends TopIamException { + public ParseSaml2MetadataException() { + super("parse_saml2_metadata_error", "解析 SAML 元数据异常", DEFAULT_STATUS); + } +} diff --git a/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/package-info.java b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/package-info.java new file mode 100644 index 00000000..7db6f642 --- /dev/null +++ b/eiam-application/eiam-application-core/src/main/java/cn/topiam/employee/application/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application; \ No newline at end of file diff --git a/eiam-application/eiam-application-form/pom.xml b/eiam-application/eiam-application-form/pom.xml new file mode 100644 index 00000000..03e10181 --- /dev/null +++ b/eiam-application/eiam-application-form/pom.xml @@ -0,0 +1,41 @@ + + + + + cn.topiam + eiam-application + 1.0.0-beta1 + ../pom.xml + + jar + 4.0.0 + + eiam-application-form + + + cn.topiam + eiam-application-core + ${project.version} + + + \ No newline at end of file diff --git a/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/AbstractFormApplicationService.java b/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/AbstractFormApplicationService.java new file mode 100644 index 00000000..f486c3c5 --- /dev/null +++ b/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/AbstractFormApplicationService.java @@ -0,0 +1,46 @@ +/* + * eiam-application-form - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.form; + +import cn.topiam.employee.application.ApplicationService; +import cn.topiam.employee.common.repository.app.AppCertRepository; +import cn.topiam.employee.common.repository.app.AppRepository; + +/** + * Form 应用配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/23 20:58 + */ +public abstract class AbstractFormApplicationService implements ApplicationService { + + /** + * AppCertRepository + */ + protected final AppCertRepository appCertRepository; + /** + * ApplicationRepository + */ + protected final AppRepository appRepository; + + protected AbstractFormApplicationService(AppCertRepository appCertRepository, + AppRepository appRepository) { + this.appCertRepository = appCertRepository; + this.appRepository = appRepository; + } +} diff --git a/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/FormStandardApplicationServiceImpl.java b/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/FormStandardApplicationServiceImpl.java new file mode 100644 index 00000000..f7d10994 --- /dev/null +++ b/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/FormStandardApplicationServiceImpl.java @@ -0,0 +1,156 @@ +/* + * eiam-application-form - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.form; + +import java.util.List; +import java.util.Map; + +import org.springframework.stereotype.Component; + +import cn.topiam.employee.common.enums.app.AppProtocol; +import cn.topiam.employee.common.enums.app.AppType; +import cn.topiam.employee.common.repository.app.AppCertRepository; +import cn.topiam.employee.common.repository.app.AppRepository; + +/** + * Form 用户应用 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/20 23:20 + */ +@Component +public class FormStandardApplicationServiceImpl extends AbstractFormApplicationService { + + /** + * 更新应用配置 + * + * @param appId {@link String} + * @param config {@link Map} + */ + @Override + public void saveConfig(String appId, Map config) { + } + + /** + * 获取配置 + * + * @param appId {@link String} + * @return {@link Map} + */ + @Override + public Object getConfig(String appId) { + return null; + } + + /** + * 获取应用标志 + * + * @return {@link String} + */ + @Override + public String getCode() { + return "form"; + } + + /** + * 获取应用名称 + * + * @return {@link String} + */ + @Override + public String getName() { + return "表单代填"; + } + + /** + * 获取应用描述 + * + * @return {@link String} + */ + @Override + public String getDescription() { + return "表单代填可以模拟用户在登录页输入用户名和密码,再通过表单提交的一种登录方式。应用的账号密码在 TopIAM 中使用 AES256 加密算法本地加密存储。很多旧系统、不支持标准认证协议的系统或不支持改造的系统可以使用表单代填实现统一身份管理。表单中有图片验证码、CSRF token、动态参数的场景不适用。"; + } + + /** + * 获取应用类型 + * + * @return {@link AppType} + */ + @Override + public AppType getType() { + return AppType.STANDARD; + } + + /** + * 获取应用协议 + * + * @return {@link AppProtocol} + */ + @Override + public AppProtocol getProtocol() { + return AppProtocol.FORM; + } + + /** + * 获取表单Schema + * + * @return {@link Map} + */ + @Override + public List getFormSchema() { + return null; + } + + /** + * 获取base64图标 + * + * @return {@link String} + */ + @Override + public String getBase64Icon() { + return "data:image/svg+xml;base64,PHN2ZyB0PSIxNjYwOTc4MDk3OTkyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMxNDMiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48cGF0aCBkPSJNMjk0LjkxMiA0MTQuMjA4aDg2LjUyOHYzNDIuMDE2SDI5NC45MTJ6TTQyNC45NiA0MTQuMjA4aDMwMy4xMDR2MzQyLjAxNkg0MjQuOTZ6TTI5NC45MTIgMjY3LjI2NGg0MzMuMTUydjk3Ljc5MkgyOTQuOTEyeiIgZmlsbD0iIzI3QTNGRiIgcC1pZD0iMzE0NCI+PC9wYXRoPjxwYXRoIGQ9Ik05MjEuNiAwSDEwMi40YTEwMi40IDEwMi40IDAgMCAwLTEwMi40IDEwMi40djgxOS4yYTEwMi40IDEwMi40IDAgMCAwIDEwMi40IDEwMi40aDgxOS4yYTEwMi40IDEwMi40IDAgMCAwIDEwMi40LTEwMi40VjEwMi40YTEwMi40IDEwMi40IDAgMCAwLTEwMi40LTEwMi40eiBtLTE1MC4wMTYgNzgwLjhhMjMuMDQgMjMuMDQgMCAwIDEtMjEuNTA0IDI0LjA2NEgyNzMuNDA4YTIzLjA0IDIzLjA0IDAgMCAxLTIxLjUwNC0yNC4wNjRWMjQyLjY4OGEyMy4wNCAyMy4wNCAwIDAgMSAyMS41MDQtMjQuMDY0aDQ3Ni42NzJhMjMuMDQgMjMuMDQgMCAwIDEgMjEuNTA0IDI0LjA2NHoiIGZpbGw9IiMyN0EzRkYiIHAtaWQ9IjMxNDUiPjwvcGF0aD48L3N2Zz4="; + } + + /** + * 创建应用 + * + * @param name {@link String} 名称 + * @param remark {@link String} 备注 + */ + @Override + public String create(String name, String remark) { + return ""; + } + + /** + * 删除应用 + * + * @param appId {@link String} 应用ID + */ + @Override + public void delete(String appId) { + + } + + protected FormStandardApplicationServiceImpl(AppCertRepository appCertRepository, + AppRepository appRepository) { + super(appCertRepository, appRepository); + } + +} diff --git a/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/model/AppFormConfigGetResult.java b/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/model/AppFormConfigGetResult.java new file mode 100644 index 00000000..fb075e14 --- /dev/null +++ b/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/model/AppFormConfigGetResult.java @@ -0,0 +1,56 @@ +/* + * eiam-application-form - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.form.model; + +import java.io.Serializable; + +import cn.topiam.employee.common.enums.app.AuthorizationType; +import cn.topiam.employee.common.enums.app.InitLoginType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * Form 配置返回 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 22:46 + */ +@Data +@Schema(description = "Form 配置返回结果") +public class AppFormConfigGetResult implements Serializable { + /** + * SSO 发起方 + */ + @Parameter(description = "SSO 发起方") + private InitLoginType initLoginType; + + /** + * SSO 登录链接 + */ + @Parameter(description = "SSO 登录链接") + private String initLoginUrl; + + /** + * 授权范围 + */ + @Parameter(description = "SSO 授权范围") + private AuthorizationType authorizationType; +} diff --git a/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/model/package-info.java b/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/model/package-info.java new file mode 100644 index 00000000..11cb26fe --- /dev/null +++ b/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/model/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-form - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.form.model; \ No newline at end of file diff --git a/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/package-info.java b/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/package-info.java new file mode 100644 index 00000000..5c44916e --- /dev/null +++ b/eiam-application/eiam-application-form/src/main/java/cn/topiam/employee/application/form/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-form - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.form; \ No newline at end of file diff --git a/eiam-application/eiam-application-jwt/pom.xml b/eiam-application/eiam-application-jwt/pom.xml new file mode 100644 index 00000000..63058da2 --- /dev/null +++ b/eiam-application/eiam-application-jwt/pom.xml @@ -0,0 +1,41 @@ + + + + + cn.topiam + eiam-application + 1.0.0-beta1 + ../pom.xml + + jar + 4.0.0 + + eiam-application-jwt + + + cn.topiam + eiam-application-core + ${project.version} + + + \ No newline at end of file diff --git a/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/AbstractJwtApplicationService.java b/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/AbstractJwtApplicationService.java new file mode 100644 index 00000000..c6d6d140 --- /dev/null +++ b/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/AbstractJwtApplicationService.java @@ -0,0 +1,46 @@ +/* + * eiam-application-jwt - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.jwt; + +import cn.topiam.employee.application.ApplicationService; +import cn.topiam.employee.common.repository.app.AppCertRepository; +import cn.topiam.employee.common.repository.app.AppRepository; + +/** + * JWT 应用配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/23 20:58 + */ +public abstract class AbstractJwtApplicationService implements ApplicationService { + + /** + * AppCertRepository + */ + protected final AppCertRepository appCertRepository; + /** + * ApplicationRepository + */ + protected final AppRepository appRepository; + + protected AbstractJwtApplicationService(AppCertRepository appCertRepository, + AppRepository appRepository) { + this.appCertRepository = appCertRepository; + this.appRepository = appRepository; + } +} diff --git a/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/JwtStandardApplicationServiceImpl.java b/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/JwtStandardApplicationServiceImpl.java new file mode 100644 index 00000000..cacee9ee --- /dev/null +++ b/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/JwtStandardApplicationServiceImpl.java @@ -0,0 +1,155 @@ +/* + * eiam-application-jwt - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.jwt; + +import java.util.List; +import java.util.Map; + +import org.springframework.stereotype.Component; + +import cn.topiam.employee.common.enums.app.AppProtocol; +import cn.topiam.employee.common.enums.app.AppType; +import cn.topiam.employee.common.repository.app.AppCertRepository; +import cn.topiam.employee.common.repository.app.AppRepository; + +/** + * JWT 用户应用 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/20 23:20 + */ +@Component +public class JwtStandardApplicationServiceImpl extends AbstractJwtApplicationService { + + /** + * 更新应用配置 + * + * @param appId {@link String} + * @param config {@link Map} + */ + @Override + public void saveConfig(String appId, Map config) { + } + + /** + * 获取配置 + * + * @param appId {@link String} + * @return {@link Map} + */ + @Override + public Object getConfig(String appId) { + return null; + } + + /** + * 获取应用标志 + * + * @return {@link String} + */ + @Override + public String getCode() { + return "jwt"; + } + + /** + * 获取应用名称 + * + * @return {@link String} + */ + @Override + public String getName() { + return "JWT"; + } + + /** + * 获取应用描述 + * + * @return {@link String} + */ + @Override + public String getDescription() { + return "JWT(JSON Web Token)是在网络应用环境声明的一种基于 JSON 的开放标准。TopIAM 使用 JWT 进行分布式站点的单点登录 (SSO)。JWT 单点登录基于非对称加密,由 TopIAM 将用户状态和信息使用私钥加密,传递给应用后,应用使用公钥解密并进行验证。使用场景非常广泛,集成简单。"; + } + + /** + * 获取应用类型 + * + * @return {@link AppType} + */ + @Override + public AppType getType() { + return AppType.STANDARD; + } + + /** + * 获取应用协议 + * + * @return {@link AppProtocol} + */ + @Override + public AppProtocol getProtocol() { + return AppProtocol.JWT; + } + + /** + * 获取表单Schema + * + * @return {@link Map} + */ + @Override + public List getFormSchema() { + return null; + } + + /** + * 获取base64图标 + * + * @return {@link String} + */ + @Override + public String getBase64Icon() { + return "data:image/svg+xml;base64,PHN2ZyB0PSIxNjYwOTc4MjExNDg3IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjM4NzEiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48cGF0aCBkPSJNNTg5LjMxMiAyNzUuNDU2TDU4OC4yODggMGgtMTUzLjZsMS4wMjQgMjc1LjQ1NiA3Ni44IDEwNS40NzJ6IG0tMTUzLjYgNDcyLjA2NHYyNzYuNDhoMTUzLjZ2LTI3Ni40OEw1MTIuNTEyIDY0Mi4wNDh6IiBmaWxsPSIjRkZGRkZGIiBwLWlkPSIzODcyIj48L3BhdGg+PHBhdGggZD0iTTU4OS4zMTIgNzQ3LjUybDE2MS43OTIgMjIzLjIzMiAxMjMuOTA0LTkwLjExMi0xNjEuNzkyLTIyMy4yMzItMTIzLjkwNC0zOS45MzZ6IG0tMTUzLjYtNDcyLjA2NEwyNzIuODk2IDUyLjIyNGwtMTIzLjkwNCA5MC4xMTJMMzEwLjc4NCAzNjUuNTY4bDEyNC45MjggMzkuOTM2eiIgZmlsbD0iIzAwRjJFNiIgcC1pZD0iMzg3MyI+PC9wYXRoPjxwYXRoIGQ9Ik0zMTAuNzg0IDM2NS41NjhMNDguNjQgMjgwLjU3NiAxLjUzNiA0MjUuOTg0IDI2My42OCA1MTJsMTIzLjkwNC00MC45NnogbTMyNS42MzIgMTg2LjM2OGw3Ni44IDEwNS40NzIgMjYyLjE0NCA4NC45OTIgNDcuMTA0LTE0NS40MDgtMjYyLjE0NC04NC45OTJ6IiBmaWxsPSIjMDBCOUYxIiBwLWlkPSIzODc0Ij48L3BhdGg+PHBhdGggZD0iTTc2MC4zMiA1MTJsMjYyLjE0NC04Ni4wMTYtNDcuMTA0LTE0NS40MDhMNzEzLjIxNiAzNjUuNTY4bC03Ni44IDEwNS40NzJ6IG0tNDk2LjY0IDBMMS41MzYgNTk2Ljk5MiA0OC42NCA3NDIuNGwyNjIuMTQ0LTg0Ljk5MiA3Ni44LTEwNS40NzJ6IiBmaWxsPSIjRDYzQUZGIiBwLWlkPSIzODc1Ij48L3BhdGg+PHBhdGggZD0iTTMxMC43ODQgNjU3LjQwOEwxNDguOTkyIDg4MC42NGwxMjMuOTA0IDkwLjExMiAxNjIuODE2LTIyMy4yMzJWNjE3LjQ3MnpNNzEzLjIxNiAzNjUuNTY4bDE2MS43OTItMjIzLjIzMi0xMjMuOTA0LTkwLjExMi0xNjEuNzkyIDIyMy4yMzJ2MTMwLjA0OHoiIGZpbGw9IiNGQjAxNUIiIHAtaWQ9IjM4NzYiPjwvcGF0aD48L3N2Zz4="; + } + + /** + * 创建应用 + * + * @param name {@link String} 名称 + * @param remark {@link String} 备注 + */ + @Override + public String create(String name, String remark) { + return ""; + } + + /** + * 删除应用 + * + * @param appId {@link String} 应用ID + */ + @Override + public void delete(String appId) { + + } + + public JwtStandardApplicationServiceImpl(AppCertRepository appCertRepository, + AppRepository appRepository) { + super(appCertRepository, appRepository); + } +} diff --git a/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/model/AppJwtGetResult.java b/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/model/AppJwtGetResult.java new file mode 100644 index 00000000..d30f3894 --- /dev/null +++ b/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/model/AppJwtGetResult.java @@ -0,0 +1,56 @@ +/* + * eiam-application-jwt - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.jwt.model; + +import java.io.Serializable; + +import cn.topiam.employee.common.enums.app.AuthorizationType; +import cn.topiam.employee.common.enums.app.InitLoginType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * JWT 配置返回 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 22:46 + */ +@Data +@Schema(description = "JWT 配置返回结果") +public class AppJwtGetResult implements Serializable { + /** + * SSO 发起方 + */ + @Parameter(description = "SSO 发起方") + private InitLoginType initLoginType; + + /** + * SSO 登录链接 + */ + @Parameter(description = "SSO 登录链接") + private String initLoginUrl; + + /** + * 授权范围 + */ + @Parameter(description = "SSO 授权范围") + private AuthorizationType authorizationType; +} diff --git a/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/model/package-info.java b/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/model/package-info.java new file mode 100644 index 00000000..8e3b6f36 --- /dev/null +++ b/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/model/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-jwt - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.jwt.model; \ No newline at end of file diff --git a/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/package-info.java b/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/package-info.java new file mode 100644 index 00000000..ff315d05 --- /dev/null +++ b/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/jwt/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-jwt - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.jwt; \ No newline at end of file diff --git a/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/package-info.java b/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/package-info.java new file mode 100644 index 00000000..f33bdf5b --- /dev/null +++ b/eiam-application/eiam-application-jwt/src/main/java/cn/topiam/employee/application/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-jwt - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application; \ No newline at end of file diff --git a/eiam-application/eiam-application-oidc/pom.xml b/eiam-application/eiam-application-oidc/pom.xml new file mode 100644 index 00000000..2448b611 --- /dev/null +++ b/eiam-application/eiam-application-oidc/pom.xml @@ -0,0 +1,41 @@ + + + + + cn.topiam + eiam-application + 1.0.0-beta1 + ../pom.xml + + jar + 4.0.0 + + eiam-application-oidc + + + cn.topiam + eiam-application-core + ${project.version} + + + \ No newline at end of file diff --git a/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/AbstractOidcApplicationService.java b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/AbstractOidcApplicationService.java new file mode 100644 index 00000000..c1d6495e --- /dev/null +++ b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/AbstractOidcApplicationService.java @@ -0,0 +1,70 @@ +/* + * eiam-application-oidc - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.oidc; + +import cn.topiam.employee.application.AbstractApplicationService; +import cn.topiam.employee.application.ApplicationService; +import cn.topiam.employee.common.repository.app.*; + +/** + * OIDC 应用配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/23 20:58 + */ +public abstract class AbstractOidcApplicationService extends AbstractApplicationService + implements ApplicationService { + + @Override + public void delete(String appId) { + //删除应用 + appRepository.deleteById(Long.valueOf(appId)); + //删除证书 + appCertRepository.deleteByAppId(Long.valueOf(appId)); + //删除应用账户 + appAccountRepository.deleteAllByAppId(Long.valueOf(appId)); + //删除应用权限策略 + appAccessPolicyRepository.deleteAllByAppId(Long.valueOf(appId)); + //删除SAML2配置 + appOidcConfigRepository.deleteByAppId(Long.valueOf(appId)); + } + + /** + * AppCertRepository + */ + protected final AppCertRepository appCertRepository; + /** + * ApplicationRepository + */ + protected final AppRepository appRepository; + /** + * AppOidcConfigRepository + */ + protected final AppOidcConfigRepository appOidcConfigRepository; + + protected AbstractOidcApplicationService(AppCertRepository appCertRepository, + AppAccountRepository appAccountRepository, + AppAccessPolicyRepository appAccessPolicyRepository, + AppRepository appRepository, + AppOidcConfigRepository appOidcConfigRepository) { + super(appCertRepository, appAccountRepository, appAccessPolicyRepository, appRepository); + this.appCertRepository = appCertRepository; + this.appRepository = appRepository; + this.appOidcConfigRepository = appOidcConfigRepository; + } +} diff --git a/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/OidcStandardApplicationServiceImpl.java b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/OidcStandardApplicationServiceImpl.java new file mode 100644 index 00000000..360eb0f2 --- /dev/null +++ b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/OidcStandardApplicationServiceImpl.java @@ -0,0 +1,291 @@ +/* + * eiam-application-oidc - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.oidc; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +import javax.validation.ConstraintViolationException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.oauth2.core.AuthorizationGrantType; +import org.springframework.security.oauth2.core.ClientAuthenticationMethod; +import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationResponseType; +import org.springframework.security.oauth2.core.oidc.OidcScopes; +import org.springframework.security.oauth2.jose.jws.SignatureAlgorithm; +import org.springframework.stereotype.Component; +import org.springframework.util.AlternativeJdkIdGenerator; +import org.springframework.util.IdGenerator; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.collect.Sets; + +import cn.topiam.employee.application.exception.AppNotExistException; +import cn.topiam.employee.application.oidc.converter.AppOidcStandardConfigConverter; +import cn.topiam.employee.application.oidc.model.AppOidcStandardSaveConfigParam; +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.common.entity.app.AppEntity; +import cn.topiam.employee.common.entity.app.AppOidcConfigEntity; +import cn.topiam.employee.common.entity.app.po.AppOidcConfigPO; +import cn.topiam.employee.common.enums.app.*; +import cn.topiam.employee.common.repository.app.*; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.util.BeanUtils; +import cn.topiam.employee.support.validation.ValidationHelp; +import static org.springframework.security.oauth2.core.ClientAuthenticationMethod.NONE; + +import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES; + +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; + +/** + * OIDC 用户应用 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/20 23:20 + */ +@SuppressWarnings("DuplicatedCode") +@Component +public class OidcStandardApplicationServiceImpl extends AbstractOidcApplicationService { + private final Logger logger = LoggerFactory.getLogger(OidcStandardApplicationServiceImpl.class); + + /** + * 创建应用 + * + * @param name {@link String} 名称 + * @param remark {@link String} 备注 + */ + @Override + public String create(String name, String remark) { + //1、创建应用 + AppEntity appEntity = new AppEntity(); + appEntity.setName(name); + appEntity.setCode( + org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric(32).toLowerCase()); + appEntity.setTemplate(getCode()); + appEntity.setType(AppType.STANDARD); + appEntity.setEnabled(true); + appEntity.setProtocol(getProtocol()); + appEntity.setClientId(idGenerator.generateId().toString().replace("-", "")); + appEntity.setClientSecret(idGenerator.generateId().toString().replace("-", "")); + appEntity.setInitLoginType(InitLoginType.APP); + appEntity.setAuthorizationType(AuthorizationType.AUTHORIZATION); + appEntity.setRemark(remark); + appRepository.save(appEntity); + //2、创建证书 + createCertificate(appEntity.getId(), appEntity.getCode(), AppCertUsingType.OIDC_JWK); + //3、创建配置 + AppOidcConfigEntity entity = new AppOidcConfigEntity(); + entity.setAppId(appEntity.getId()); + //客户端认证方法 + ClientAuthenticationMethod clientSecretBasic = ClientAuthenticationMethod.CLIENT_SECRET_BASIC; + ClientAuthenticationMethod clientSecretPost = ClientAuthenticationMethod.CLIENT_SECRET_POST; + entity.setClientAuthMethods( + Sets.newHashSet(clientSecretBasic.getValue(), clientSecretPost.getValue())); + //授予类型 + AuthorizationGrantType authorizationCodeGrantType = AuthorizationGrantType.AUTHORIZATION_CODE; + AuthorizationGrantType refreshTokenGrantType = AuthorizationGrantType.REFRESH_TOKEN; + AuthorizationGrantType clientCredentialsGrantType = AuthorizationGrantType.CLIENT_CREDENTIALS; + entity.setAuthGrantTypes(Sets.newHashSet(authorizationCodeGrantType.getValue(), + refreshTokenGrantType.getValue(), clientCredentialsGrantType.getValue())); + entity.setResponseTypes(Sets.newHashSet(OAuth2AuthorizationResponseType.CODE.getValue())); + //重定向URLs + entity.setRedirectUris(Sets.newLinkedHashSet()); + //Scopes + entity.setGrantScopes(Sets.newHashSet(OidcScopes.OPENID)); + //授权是否需要同意 + entity.setRequireAuthConsent(false); + //PKCE + entity.setRequireProofKey(false); + //Token 端点认证签名算法 + entity.setTokenEndpointAuthSigningAlgorithm(SignatureAlgorithm.RS256.getName()); + //刷新 Token 过期时间 默认(30天) + entity.setRefreshTokenTimeToLive(43200); + //访问 Token 过期时间 默认(15天) + entity.setAccessTokenTimeToLive(21600); + //Access Token 格式 + entity.setAccessTokenFormat("reference"); + //30分钟 + entity.setIdTokenTimeToLive(30); + //ID Token签名算法 + entity.setIdTokenSignatureAlgorithm(SignatureAlgorithm.RS256.getName()); + //是否重用刷新令牌 + entity.setReuseRefreshToken(false); + appOidcConfigRepository.save(entity); + return entity.getAppId().toString(); + } + + /** + * 更新应用配置 + * + * @param appId {@link String} + * @param config {@link Map} + */ + @Override + public void saveConfig(String appId, Map config) { + AppOidcStandardSaveConfigParam model; + try { + ObjectMapper mapper = new ObjectMapper(); + String value = mapper.writeValueAsString(config); + // 指定序列化输入的类型 + mapper.configure(FAIL_ON_UNKNOWN_PROPERTIES, false); + model = mapper.readValue(value, AppOidcStandardSaveConfigParam.class); + } catch (Exception e) { + throw new TopIamException(e.getMessage()); + } + //@formatter:off + ValidationHelp.ValidationResult validationResult = ValidationHelp.validateEntity(model); + if (validationResult.isHasErrors()) { + throw new ConstraintViolationException(validationResult.getConstraintViolations()); + } + //@formatter:on + //1、修改基本信息 + Optional optional = appRepository.findById(Long.valueOf(appId)); + if (optional.isEmpty()) { + AuditContext.setContent("保存配置失败,应用 [" + appId + "] 不存在!"); + logger.error(AuditContext.getContent()); + throw new AppNotExistException(); + } + AppEntity appEntity = optional.get(); + appEntity.setAuthorizationType(model.getAuthorizationType()); + appEntity.setInitLoginUrl(model.getInitLoginUrl()); + appEntity.setInitLoginType(model.getInitLoginType()); + appRepository.save(appEntity); + //2、修改 OIDC 配置 + Optional oidc = appOidcConfigRepository + .findByAppId(Long.valueOf(appId)); + if (oidc.isEmpty()) { + AuditContext.setContent("保存配置失败,应用 [" + appId + "] 不存在!"); + logger.error(AuditContext.getContent()); + throw new AppNotExistException(); + } + AppOidcConfigEntity entity = oidc.get(); + AppOidcConfigEntity oidcConfig = appOidcStandardConfigConverter + .appOidcStandardSaveConfigParamToEntity(model); + BeanUtils.merge(oidcConfig, entity, LAST_MODIFIED_BY, LAST_MODIFIED_TIME); + //开启PKCE + if (entity.getRequireProofKey()) { + entity.getClientAuthMethods().add(NONE.getValue()); + } else { + entity.getClientAuthMethods().remove(NONE.getValue()); + } + appOidcConfigRepository.save(entity); + } + + /** + * 获取配置 + * + * @param appId {@link String} + * @return {@link AppOidcConfigPO} + */ + @Override + public Object getConfig(String appId) { + AppOidcConfigPO po = appOidcConfigRepository.getByAppId(Long.valueOf(appId)); + return appOidcStandardConfigConverter.entityConverterToOidcConfigResult(po); + } + + /** + * 获取应用标志 + * + * @return {@link String} + */ + @Override + public String getCode() { + return "oidc"; + } + + /** + * 获取应用名称 + * + * @return {@link String} + */ + @Override + public String getName() { + return "OIDC"; + } + + /** + * 获取应用描述 + * + * @return {@link String} + */ + @Override + public String getDescription() { + return "OIDC是OpenID Connect的简称,OIDC=(Identity, Authentication) + OAuth 2.0。它在OAuth2上构建了一个身份层,是一个基于OAuth2协议的身份认证标准协议。OIDC是一个协议族,提供很多的标准协议,包括Core核心协议和一些扩展协议。"; + } + + /** + * 获取应用类型 + * + * @return {@link AppType} + */ + @Override + public AppType getType() { + return AppType.STANDARD; + } + + /** + * 获取应用协议 + * + * @return {@link AppProtocol} + */ + @Override + public AppProtocol getProtocol() { + return AppProtocol.OIDC; + } + + /** + * 获取表单Schema + * + * @return {@link Map} + */ + @Override + public List getFormSchema() { + return null; + } + + /** + * 获取base64图标 + * + * @return {@link String} + */ + @Override + public String getBase64Icon() { + return "data:image/svg+xml;base64,PHN2ZyB0PSIxNjYwOTc4MzEzNTg0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQ0MzIiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48cGF0aCBkPSJNNDY4LjA4OTI2MjIzIDg5NS4xODMzMjc5OWEyMjEuNzI4NTE1NTYgMjIxLjcyODUxNTU2IDAgMCAxLTY1LjAzNzYwMzU3LTcuNzY3MjI5NjMgNTQ0Ljk0ODgzMDgyIDU0NC45NDg4MzA4MiAwIDAgMS0xODguNDg0NzcxNTUtNzAuMzE5MzE4NTFjLTUxLjc4MTUzMTI3LTMyLjEwNDU0ODczLTk2LjEwNjUyMDg5LTcyLjQ5NDE0MjgxLTExNy45NTgzMjc3LTEzMC44MDAxNDY5NmExNzIuNTM2MDYwNDQgMTcyLjUzNjA2MDQ0IDAgMCAxIDYuMDA2NjU3MTgtMTQxLjc3NzgzMTExYzM4LjczMjU4NTQ5LTc4LjA4NjU0ODE0IDEwNy4zOTQ4OTU0MS0xMjAuNTQ3NDAzODUgMTg0LjEzNTEyNDE2LTE1My4wNjYyMDU2M2E1OTkuNjMwMTI3NDEgNTk5LjYzMDEyNzQxIDAgMCAxIDE1OS4yNzk5ODkzMy00MC43MDAyODMyNiAxNDguNzE2NTU3MDUgMTQ4LjcxNjU1NzA1IDAgMCAxIDIxLjQzNzU1Mzc4IDAuNjIxMzc4MzZ2NzguMjkzNjc0NjdhMzg5LjcwNzgwMDg5IDM4OS43MDc4MDA4OSAwIDAgMC05OC41OTIwMzU1NyAyMy45MjMwNjcyNmMtNDkuNzEwMjY5NjMgMTguNDM0MjI0NTktOTQuMjQyMzg1NzcgNDQuNDI4NTUzNDgtMTI2LjY1NzYyMzY4IDg3LjcxNzkxMjg4YTEyNi42NTc2MjQ5IDEyNi42NTc2MjQ5IDAgMCAwLTIwLjcxMjYxMjc2IDEyNC4yNzU2NzQwOGMxNy43MDkyODM1NSA1MC4zMzE2NDggNTcuMDYzMjQ3NDEgODEuOTE4MzgyMjMgMTAxLjgwMjQ5MDA5IDEwNi4xNTIxMzg2OGEzNzguMzE1ODY0OSAzNzguMzE1ODY0OSAwIDAgMCAxNDQuOTg4Mjg1NjEgNDMuNjAwMDQ4NTd6TTYwMC4zMzkyOTEyNSAzNTEuMzczNjkxMjVjMjUuMjY5Mzg2NjYtMy41MjExNDM2OSA0OS4zOTk1ODA0NSAzLjkzNTM5Njc1IDczLjczNjkwMDc2IDguMjg1MDQ1MzZhNTUyLjcxNjA2MDQ1IDU1Mi43MTYwNjA0NSAwIDAgMSAxMzQuNjMxOTc5ODQgNDQuMDE0MzAwNDFjMTIuMTE2ODc4MjIgNS41OTI0MDUzMyAyMy42MTIzNzgwOCAxMi41MzExMzAwNiAzNS40MTg1NjcxMiAxOC44NDg0Nzc2NWExMi43MzgyNTY1OSAxMi43MzgyNTY1OSAwIDAgMCAxNC44MDk1MTgyMiAwIDgyNC4yNTg0MDgzIDgyNC4yNTg0MDgzIDAgMCAxIDcxLjc2OTIwMTc5LTQ0Ljg0MjgwNTMzYzQuMTQyNTIyMDYgMS42NTcwMDg1OSAyLjc5NjIwMjY3IDUuNDg4ODQyNjggMi43OTYyMDI2NiA4LjU5NTczMzMydjEzNC42MzE5ODEwNWMwIDguODAyODU5ODQtMS44NjQxMzUxMSAxMi45NDUzODMxMS0xMS45MDk3NTI5MSAxMi45NDUzODE5MUg2ODkuNzE0MjEzOTJhODEuNjA3NjkzMDUgODEuNjA3NjkzMDUgMCAwIDEtOS43MzQ5MjczOS0xLjU1MzQ0NTkzYzE0LjA4NDU3NTk5LTkuMjE3MTEyOSAyNS4xNjU4MjQtMTYuNjczNjUzMzQgMzYuNDU0MTk3MzItMjMuODE5NTAzMzhzMjIuNjgwMzEwNTItMTQuMDg0NTc1OTkgMzQuMTc1ODEwMzctMjAuNzEyNjEyNzZjNy40NTY1NDA0NS00LjQ1MzIxMTI1IDcuMDQyMjg4NjEtNy42NjM2NjY5OC0wLjYyMTM3ODM3LTExLjU5OTA2MjVhNDE2Ljg0MTMyMzg2IDQxNi44NDEzMjM4NiAwIDAgMC0xMzkuNDk5NDQ0MTUtNDUuNTY3NzQ3NTdjLTMuNzI4MjcwMjIgMC03Ljc2NzIyOTYzIDAtOS43MzQ5MjczOS00LjQ1MzIxMTI1cTAuMTAzNTYyNjYtMzcuMjgyNzAyMjItMC40MTQyNTMwNi03NC43NzI1MzA5OHoiIGZpbGw9IiNDRENDQ0MiIHAtaWQ9IjQ0MzMiPjwvcGF0aD48cGF0aCBkPSJNNTg0Ljc4OTMzMyAzNzkuNjQ4cTAgMzAuODA1MzMzIDAuNjgyNjY3IDYxLjg2NjY2N2MtMy4yNDI2NjcgMy43NTQ2NjctMi4wNDggOC41MzMzMzMtMi4wNDggMTIuNDU4NjY2djI5OC42NjY2NjdhMTUuNTMwNjY3IDE1LjUzMDY2NyAwIDAgMS03LjY4IDE1LjUzMDY2N2MtMzEuOTE0NjY3IDE5LjYyNjY2Ny02My41NzMzMzMgMzkuNTk0NjY3LTk1LjQwMjY2NyA1OS43MzMzMzNhMTUuMTg5MzMzIDE1LjE4OTMzMyAwIDAgMS00LjUyMjY2NiAwLjY4MjY2N2wtMC43NjgtNjYuMjE4NjY3YzIuNTYtMy4xNTczMzMgMS41MzYtNi44MjY2NjcgMS41MzYtMTAuMjRWNDU0LjRjMC0zLjQ5ODY2NyAxLjAyNC03LjE2OC0xLjUzNi0xMC4yNHYtNjQuNTEyYTg1MS42MjY2NjcgODUxLjYyNjY2NyAwIDAgMCAwLjY4MjY2Ni05NS42NTg2NjdjLTAuNDI2NjY3LTE1LjAxODY2NyAyLjIxODY2Ny0yNS4wODggMTcuMDY2NjY3LTMzLjQ1MDY2NiAyNy4zMDY2NjctMTUuNDQ1MzMzIDUyLjk5Mi0zNC4xMzMzMzMgNzkuNDQ1MzMzLTUxLjIgMi41Ni0xLjYyMTMzMyA2LjIyOTMzMy0zLjY2OTMzMyA4LjUzMzMzNC0yLjk4NjY2NyA0LjE4MTMzMyAxLjM2NTMzMyAyLjM4OTMzMyA2LjE0NCAyLjM4OTMzMyA5LjM4NjY2N3YxNTguNDY0YTQwLjE5MiA0MC4xOTIgMCAwIDAgMS42MjEzMzMgMTUuNDQ1MzMzeiBtLTUuODAyNjY2IDEwMC4wOTZWMjI3LjMyOGMwLTUuNTQ2NjY3LTEuMTA5MzMzLTExLjAwOC0wLjg1MzMzNC0xNi40NjkzMzNzLTIuNjQ1MzMzLTUuOTczMzMzLTYuNC0zLjU4NGMtMTguMDA1MzMzIDExLjI2NC0zNS40MTMzMzMgMjMuODA4LTU0LjEwMTMzMyAzNC4xMzMzMzMtMTMuMDU2IDYuOTk3MzMzLTE5LjM3MDY2NyAyMS41MDQtMzMuNzA2NjY3IDI2LjUzODY2N2E3LjE2OCA3LjE2OCAwIDAgMC00LjE4MTMzMyA4Ljk2YzUuMzc2IDEyLjI4OCAxLjQ1MDY2NyAyNC44MzIgMS41MzYgMzcuMjA1MzMzdjQ5MS43NzZjMCA1LjAzNDY2NyAxLjM2NTMzMyA1LjcxNzMzMyA2LjkxMiA1LjcxNzMzMyAxNC4yNTA2NjcgMCAyMS43Ni0xMS45NDY2NjcgMzMuNDUwNjY3LTE2LjM4NCAxMy43Mzg2NjctNS4yMDUzMzMgMjIuNTI4LTE4LjY4OCAzNy42MzItMjMuMjEwNjY2YTI0LjQwNTMzMyAyNC40MDUzMzMgMCAwIDAgMTkuMDI5MzMzLTE3LjU3ODY2NyAyMDMuNjA1MzMzIDIwMy42MDUzMzMgMCAwIDAgMC41MTItMjcuOTg5MzMzeiIgZmlsbD0iI0U3NzIyQSIgcC1pZD0iNDQzNCI+PC9wYXRoPjxwYXRoIGQ9Ik01OTMuMjk3MDAzODYgNDcyLjg1MzE2MjY3Vjc3MS45NDMyODUzNGEyNDcuMTAxNDY0ODkgMjQ3LjEwMTQ2NDg5IDAgMCAxLTAuNjIxMzc4MzcgMzMuOTY4NjgzODQgMjkuNjE5MDM1MjUgMjkuNjE5MDM1MjUgMCAwIDEtMjMuMDk0NTYzNTcgMjEuMzMzOTkxMTNjLTE4LjMzMDY2MTkyIDUuNDg4ODQyNjgtMjguOTk3NjU2ODkgMjEuODUxODA1NjItNDUuNjcxMzEwMjMgMjguMTY5MTUxOTgtMTQuMTg4MTM5ODYgNS4zODUyNzg4MS0yMy4zMDE2ODg4OSAxOS45ODc2NzA1MS00MC41OTY3MTkzOCAxOS44ODQxMDc4NS02LjczMTU5OTQxIDAtOC41OTU3MzQ1My0wLjgyODUwNDktOC4zODg2MDgtNi45Mzg3MjQ3M1Y4NTYuODY0OTk1NTUgMjcxLjUyNjU3MDY3YzAtMTUuMDE2NjQzNTUgNC42NjAzMzc3OC0zMC4yNDA0MTM2Mi0xLjg2NDEzNTEyLTQ1LjE1MzQ5NDUxYTguNjk5Mjk3MTggOC42OTkyOTcxOCAwIDAgMSA1LjA3NDU4OTYzLTEwLjg3NDEyMTQ4YzE3LjM5ODU5NDM3LTYuMTEwMjIxMDUgMjUuMDYyMjYxMzQtMjMuNzE1OTQwNzMgNDAuOTA3NDA5NzktMzIuMjA4MTEyNiAyMi42ODAzMTA1Mi0xMi4yMjA0NDA4OSA0My44MDcxNzUxMS0yNy40NDQyMTA5NSA2NS42NTg5ODA3Mi00MS40MjUyMjQzIDQuNTU2Nzc1MTEtMi44OTk3NjUzMiA4LjA3NzkxODgyLTMuMjEwNDU0NTEgNy43NjcyMjk2NCA0LjM0OTY0ODZzMS4wMzU2MzAyMiAxMy4yNTYwNzIzMSAxLjAzNTYzMDIgMTkuOTg3NjcwNTFxMCAxNTMuNDgwNDU3NDgtMC4yMDcxMjUzMSAzMDYuNjUwMjI1Nzh6IiBmaWxsPSIjRkQ2MjAyIiBwLWlkPSI0NDM1Ij48L3BhdGg+PC9zdmc+"; + } + + /** + * IdGenerator + */ + private final IdGenerator idGenerator = new AlternativeJdkIdGenerator(); + private final AppOidcStandardConfigConverter appOidcStandardConfigConverter; + + protected OidcStandardApplicationServiceImpl(AppCertRepository appCertRepository, + AppAccountRepository appAccountRepository, + AppAccessPolicyRepository appAccessPolicyRepository, + AppRepository appRepository, + AppOidcConfigRepository appOidcConfigRepository, + AppOidcStandardConfigConverter appOidcStandardConfigConverter) { + super(appCertRepository, appAccountRepository, appAccessPolicyRepository, appRepository, + appOidcConfigRepository); + this.appOidcStandardConfigConverter = appOidcStandardConfigConverter; + } +} diff --git a/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/converter/AppOidcStandardConfigConverter.java b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/converter/AppOidcStandardConfigConverter.java new file mode 100644 index 00000000..c0175269 --- /dev/null +++ b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/converter/AppOidcStandardConfigConverter.java @@ -0,0 +1,130 @@ +/* + * eiam-application-oidc - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.oidc.converter; + +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import org.apache.commons.text.StringSubstitutor; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +import cn.topiam.employee.application.oidc.model.AppOidcStandardConfigGetResult; +import cn.topiam.employee.application.oidc.model.AppOidcStandardSaveConfigParam; +import cn.topiam.employee.common.constants.ProtocolConstants; +import cn.topiam.employee.common.entity.app.AppOidcConfigEntity; +import cn.topiam.employee.common.entity.app.po.AppOidcConfigPO; +import cn.topiam.employee.core.context.ServerContextHelp; +import cn.topiam.employee.support.util.HttpUrlUtils; +import static cn.topiam.employee.common.constants.ProtocolConstants.APP_CODE; +import static cn.topiam.employee.common.constants.ProtocolConstants.OidcEndpointConstants.OIDC_AUTHORIZE_PATH; +import static cn.topiam.employee.common.constants.ProtocolConstants.OidcEndpointConstants.WELL_KNOWN_OPENID_CONFIGURATION; + +/** + * 应用映射 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/14 22:45 + */ +@Mapper(componentModel = "spring") +public interface AppOidcStandardConfigConverter { + /** + * 实体转OIDC配置结果 + * + * @param config {@link AppOidcConfigEntity} + * @return {@link AppOidcStandardConfigGetResult} + */ + default AppOidcStandardConfigGetResult entityConverterToOidcConfigResult(AppOidcConfigPO config) { + AppOidcStandardConfigGetResult result = new AppOidcStandardConfigGetResult(); + if (Objects.isNull(config)) { + return result; + } + //协议端点域 + result.setProtocolEndpoint(getProtocolEndpointDomain(config.getAppCode())); + //认证授权类型 + result.setAuthGrantTypes(config.getAuthGrantTypes()); + //重定向URI + result.setRedirectUris(config.getRedirectUris()); + //授权范围 + result.setGrantScopes(config.getGrantScopes()); + //启用PKCE + result.setRequireProofKey(config.getRequireProofKey()); + //访问令牌有效时间 + result.setAccessTokenTimeToLive(config.getAccessTokenTimeToLive().toString()); + //刷新令牌有效时间 + result.setRefreshTokenTimeToLive(config.getRefreshTokenTimeToLive().toString()); + //ID令牌有效时间 + result.setIdTokenTimeToLive(config.getIdTokenTimeToLive().toString()); + // id 令牌签名算法 + result.setIdTokenSignatureAlgorithm(config.getIdTokenSignatureAlgorithm()); + //SSO 发起方 + result.setInitLoginType(config.getInitLoginType()); + //登录发起地址 + result.setInitLoginUrl(config.getInitLoginUrl()); + //授权类型 + result.setAuthorizationType(config.getAuthorizationType()); + return result; + } + + /** + * save 转 entity + * + * @param config {@link AppOidcConfigEntity} + * @return {@link AppOidcConfigEntity} + */ + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "remark", ignore = true) + @Mapping(target = "id", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + @Mapping(target = "appId", ignore = true) + AppOidcConfigEntity appOidcStandardSaveConfigParamToEntity(AppOidcStandardSaveConfigParam config); + + /** + * 获取协议端点 + * + * @param appCode {@link String} + * @return {@link AppOidcStandardConfigGetResult.ProtocolEndpoint} + */ + private AppOidcStandardConfigGetResult.ProtocolEndpoint getProtocolEndpointDomain(String appCode) { + //@formatter:off + AppOidcStandardConfigGetResult.ProtocolEndpoint domain = new AppOidcStandardConfigGetResult.ProtocolEndpoint(); + //issues + Map variables = new HashMap<>(16); + variables.put(APP_CODE,appCode); + StringSubstitutor sub = new StringSubstitutor(variables, "{", "}"); + //Issuer + domain.setIssuer(sub.replace(ServerContextHelp.getPortalPublicBaseUrl()+OIDC_AUTHORIZE_PATH)); + //发现端点 + domain.setDiscoveryEndpoint(HttpUrlUtils.format(ServerContextHelp.getPortalPublicBaseUrl() + sub.replace(WELL_KNOWN_OPENID_CONFIGURATION))); + //认证端点 + domain.setAuthorizationEndpoint(HttpUrlUtils.format(ServerContextHelp.getPortalPublicBaseUrl() + sub.replace(ProtocolConstants.OidcEndpointConstants.AUTHORIZATION_ENDPOINT))); + //Token端点 + domain.setTokenEndpoint(HttpUrlUtils.format(ServerContextHelp.getPortalPublicBaseUrl() + sub.replace( ProtocolConstants.OidcEndpointConstants.TOKEN_ENDPOINT))); + //Jwks端点 + domain.setJwksEndpoint(HttpUrlUtils.format(ServerContextHelp.getPortalPublicBaseUrl() + sub.replace(ProtocolConstants.OidcEndpointConstants.JWK_SET_ENDPOINT))); + //撤销端点 + domain.setRevokeEndpoint(HttpUrlUtils.format(ServerContextHelp.getPortalPublicBaseUrl()+ sub.replace(ProtocolConstants.OidcEndpointConstants.TOKEN_REVOCATION_ENDPOINT))); + //UserInfo端点 + domain.setUserinfoEndpoint(HttpUrlUtils.format(ServerContextHelp.getPortalPublicBaseUrl() + sub.replace(ProtocolConstants.OidcEndpointConstants.OIDC_USER_INFO_ENDPOINT))); + return domain; + //@formatter:on + } +} diff --git a/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/model/AppOidcStandardConfigGetResult.java b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/model/AppOidcStandardConfigGetResult.java new file mode 100644 index 00000000..3a45480f --- /dev/null +++ b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/model/AppOidcStandardConfigGetResult.java @@ -0,0 +1,202 @@ +/* + * eiam-application-oidc - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.oidc.model; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Set; + +import cn.topiam.employee.common.enums.app.AuthorizationType; +import cn.topiam.employee.common.enums.app.InitLoginType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * OIDC 配置返回 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 22:46 + */ +@Data +@Schema(description = "OIDC 配置返回结果") +public class AppOidcStandardConfigGetResult implements Serializable { + + @Serial + private static final long serialVersionUID = 4177874005424703372L; + + /** + * APP ID + */ + @Parameter(description = "appId") + private Long appId; + + /** + * SSO 发起方 + */ + @Parameter(description = "SSO 发起方") + private InitLoginType initLoginType; + + /** + * SSO 登录链接 + */ + @Parameter(description = "SSO 登录链接") + private String initLoginUrl; + + /** + * 授权范围 + */ + @Parameter(description = "SSO 授权范围") + private AuthorizationType authorizationType; + /** + * authorizationGrantTypes + */ + @Parameter(description = "认证授权类型") + private Set authGrantTypes; + + /** + * 客户端认证方式 + */ + @Parameter(description = "客户端认证方式") + private Set clientAuthMethods; + + /** + * 重定向URI + */ + @Parameter(description = "重定向URI") + private Set redirectUris; + /** + * scopes + */ + @Parameter(description = "授权范围") + private Set grantScopes; + + /** + * 启用PKCE + */ + @Parameter(description = "启用PKCE") + private Boolean requireProofKey; + + /** + * 令牌 Endpoint 身份验证签名算法 + */ + @Parameter(description = "令牌 Endpoint 身份验证签名算法") + private String tokenEndpointAuthSigningAlgorithm; + + /** + * 是否需要授权同意 + */ + @Parameter(description = "是否需要授权同意") + private Boolean requireAuthConsent; + /** + * 访问令牌有效时间 + */ + @Parameter(description = "访问令牌有效时间") + private String accessTokenTimeToLive; + /** + * 刷新令牌有效时间 + */ + @Parameter(description = "刷新令牌有效时间") + private String refreshTokenTimeToLive; + + /** + * ID token 有效时间 + */ + @Parameter(description = "ID 令牌有效时间") + private String idTokenTimeToLive; + /** + * id 令牌签名算法 + */ + @Parameter(description = "Id令牌签名算法") + private String idTokenSignatureAlgorithm; + + /** + * 协议端点域 + */ + @Parameter(description = "协议端点域") + private ProtocolEndpoint protocolEndpoint; + + /** + * Access Token 格式 + */ + @Parameter(description = "Access Token 格式") + private String accessTokenFormat; + + /** + * 是否重用刷新令牌 + */ + @Parameter(description = "是否重用刷新令牌") + private Boolean reuseRefreshToken; + + /** + * 协议端点域 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 23:37 + */ + @Data + @Schema(description = "协议端点") + public static class ProtocolEndpoint implements Serializable { + + @Serial + private static final long serialVersionUID = -2261602995152894964L; + /** + * oidcIssuer + */ + @Parameter(description = "Issuer") + private String issuer; + + /** + * discoveryEndpoint + */ + @Parameter(description = "Discovery Endpoint") + private String discoveryEndpoint; + + /** + * UserinfoEndpoint + */ + @Parameter(description = "UserInfo Endpoint") + private String userinfoEndpoint; + + /** + * jwksEndpoint + */ + @Parameter(description = "Jwks Endpoint") + private String jwksEndpoint; + + /** + * revokeEndpoint + */ + @Parameter(description = "Revoke Endpoint") + private String revokeEndpoint; + + /** + * tokenEndpoint + */ + @Parameter(description = "Token Endpoint") + private String tokenEndpoint; + + /** + * authorizationEndpoint + */ + @Parameter(description = "Authorization Endpoint") + private String authorizationEndpoint; + } +} diff --git a/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/model/AppOidcStandardSaveConfigParam.java b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/model/AppOidcStandardSaveConfigParam.java new file mode 100644 index 00000000..d254d269 --- /dev/null +++ b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/model/AppOidcStandardSaveConfigParam.java @@ -0,0 +1,151 @@ +/* + * eiam-application-oidc - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.oidc.model; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.enums.app.AuthorizationType; +import cn.topiam.employee.common.enums.app.InitLoginType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/7/10 01:45 + */ +@Data +@Schema(description = "保存 OIDC 应用配置参数") +public class AppOidcStandardSaveConfigParam implements Serializable { + + @Serial + private static final long serialVersionUID = 7257798528680745281L; + + /** + * 授权类型 + */ + @NotNull(message = "授权类型不能为空") + @Schema(description = "授权类型") + private List authGrantTypes; + + /** + * 授权类型 + */ + @NotNull(message = "授权类型不能为空") + @Schema(description = "授权类型") + private List redirectUris; + + /** + * SSO范围 + */ + @NotNull(message = "SSO范围不能为空") + @Schema(description = "SSO范围") + private AuthorizationType authorizationType; + + /** + * SSO发起方 + */ + @NotNull(message = "SSO发起方不能为空") + @Schema(description = "SSO发起方") + private InitLoginType initLoginType; + + /** + * SSO 发起登录URL + */ + @Schema(description = "SSO 发起登录URL") + private String initLoginUrl; + + /** + * 授予范围 + */ + @NotNull(message = "授予范围不能为空") + @Schema(description = "授予范围") + private List grantScopes; + + /** + * 客户端身份验证方法 + */ + @Schema(description = "客户端身份验证方法") + private List clientAuthMethods; + + /** + * 是否需要PKCE + */ + @NotNull(message = "请选择是否需要PKCE") + @Schema(description = "是否需要PKCE") + private Boolean requireProofKey; + + /** + * Access Token 生存时间 + */ + @NotBlank(message = "Access Token 生存时间不能为空") + @Schema(description = "Access Token 生存时间") + private String accessTokenTimeToLive; + + /** + * Access Token 格式 + */ + @Schema(description = "Access Token 格式") + private String accessTokenFormat; + + /** + * Refresh Token 生存时间 + */ + @NotBlank(message = "Refresh Token 生存时间不能为空") + @Schema(description = "Refresh Token 生存时间") + private String refreshTokenTimeToLive; + + /** + * Id Token 生存时间 + */ + @NotBlank(message = "Id Token 生存时间不能为空") + @Schema(description = "Id Token 生存时间") + private String idTokenTimeToLive; + + /** + * ID Token签名算法 + */ + @NotBlank(message = "ID Token签名算法不能为空") + @Schema(description = "ID Token签名算法") + private String idTokenSignatureAlgorithm; + + /** + * Token签名算法 + */ + @Schema(description = "令牌端点身份验证签名算法") + private String tokenEndpointAuthSigningAlgorithm; + + /** + * 重用刷新令牌 + */ + @Schema(description = "重用刷新令牌") + private Boolean reuseRefreshToken; + + /** + * 需要授权同意 + */ + @Schema(description = "需要授权同意") + private Boolean requireAuthConsent; + +} diff --git a/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/model/package-info.java b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/model/package-info.java new file mode 100644 index 00000000..08520c0d --- /dev/null +++ b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/model/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-oidc - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.oidc.model; \ No newline at end of file diff --git a/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/package-info.java b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/package-info.java new file mode 100644 index 00000000..b9cb5118 --- /dev/null +++ b/eiam-application/eiam-application-oidc/src/main/java/cn/topiam/employee/application/oidc/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-oidc - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.oidc; \ No newline at end of file diff --git a/eiam-application/eiam-application-saml2/pom.xml b/eiam-application/eiam-application-saml2/pom.xml new file mode 100644 index 00000000..e08972cf --- /dev/null +++ b/eiam-application/eiam-application-saml2/pom.xml @@ -0,0 +1,41 @@ + + + + + cn.topiam + eiam-application + 1.0.0-beta1 + ../pom.xml + + jar + 4.0.0 + + eiam-application-saml2 + + + cn.topiam + eiam-application-core + ${project.version} + + + \ No newline at end of file diff --git a/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/package-info.java b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/package-info.java new file mode 100644 index 00000000..9890c7b6 --- /dev/null +++ b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-saml2 - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application; \ No newline at end of file diff --git a/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/AbstractSamlAppService.java b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/AbstractSamlAppService.java new file mode 100644 index 00000000..c74c9101 --- /dev/null +++ b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/AbstractSamlAppService.java @@ -0,0 +1,348 @@ +/* + * eiam-application-saml2 - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.saml2; + +import java.util.*; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.text.StringSubstitutor; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.AlternativeJdkIdGenerator; +import org.springframework.util.CollectionUtils; +import org.springframework.util.IdGenerator; + +import cn.topiam.employee.application.AbstractApplicationService; +import cn.topiam.employee.application.Saml2ApplicationService; +import cn.topiam.employee.application.exception.AppCertNotExistException; +import cn.topiam.employee.common.entity.account.UserEntity; +import cn.topiam.employee.common.entity.app.AppAccountEntity; +import cn.topiam.employee.common.entity.app.AppCertEntity; +import cn.topiam.employee.common.entity.app.AppSaml2ConfigEntity; +import cn.topiam.employee.common.entity.app.po.AppSaml2ConfigPO; +import cn.topiam.employee.common.enums.app.AppCertUsingType; +import cn.topiam.employee.common.enums.app.SamlAttributeStatementValueType; +import cn.topiam.employee.common.enums.app.SamlNameIdValueType; +import cn.topiam.employee.common.exception.app.AppAccountNotExistException; +import cn.topiam.employee.common.repository.account.UserRepository; +import cn.topiam.employee.common.repository.app.*; +import cn.topiam.employee.common.util.SamlKeyStoreProvider; +import cn.topiam.employee.core.protocol.Saml2ProtocolConfig; +import cn.topiam.employee.core.protocol.Saml2SsoModel; +import cn.topiam.employee.core.security.util.SecurityUtils; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import static cn.topiam.employee.common.enums.app.SamlNameIdValueType.*; +import static cn.topiam.employee.core.security.util.UserUtils.getUser; + +/** + * SAML 应用配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/23 20:58 + */ +public abstract class AbstractSamlAppService extends AbstractApplicationService + implements Saml2ApplicationService { + + private static final Logger logger = LoggerFactory.getLogger(AbstractSamlAppService.class); + + /** + * 删除应用 + * + * @param appId {@link String} 应用ID + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String appId) { + //删除应用 + appRepository.deleteById(Long.valueOf(appId)); + //删除证书 + appCertRepository.deleteByAppId(Long.valueOf(appId)); + //删除应用账户 + appAccountRepository.deleteAllByAppId(Long.valueOf(appId)); + //删除应用权限策略 + appAccessPolicyRepository.deleteAllByAppId(Long.valueOf(appId)); + //删除SAML2配置 + appSaml2ConfigRepository.deleteByAppId(Long.valueOf(appId)); + } + + /** + * 获取SAML2 协议配置 + * + * @param appId {@link String} + * @return {@link Saml2ProtocolConfig} + */ + @Override + public Saml2ProtocolConfig getProtocolConfig(String appId) { + //根据提供商ID查询配置 + AppSaml2ConfigPO saml2Config = appSaml2ConfigRepository.getByAppId(Long.valueOf(appId)); + Optional signCert = appCertRepository + .findByAppIdAndUsingType(Long.valueOf(appId), AppCertUsingType.SAML_SIGN); + Optional encryptCert = appCertRepository + .findByAppIdAndUsingType(Long.valueOf(appId), AppCertUsingType.SAML_ENCRYPT); + if (signCert.isEmpty()) { + logger.error("SAML2 应用证书不存在 [{}] ", appId); + throw new AppCertNotExistException(); + } + //构建配置 + Saml2ProtocolConfig config = getSamlAppConverter() + .appSaml2ConfigPoToSaml2ProtocolConfig(saml2Config); + //签名证书 + signCert + .ifPresent(appCertEntity -> config.setIdpSignCert(SamlKeyStoreProvider.getCredential( + StringUtils.defaultString(saml2Config.getSpEntityId(), + UUID.randomUUID().toString()), + appCertEntity.getPrivateKey(), appCertEntity.getCert(), ""))); + //加密证书存在 + encryptCert + .ifPresent(appCertEntity -> config.setIdpEncryptCert(SamlKeyStoreProvider.getCredential( + StringUtils.defaultString(saml2Config.getSpEntityId(), + UUID.randomUUID().toString()), + appCertEntity.getPrivateKey(), appCertEntity.getCert(), ""))); + return config; + } + + @Override + public Saml2SsoModel getSsoModel(String appId) { + //根据提供商ID查询配置 + Saml2ProtocolConfig saml2Config = getProtocolConfig(appId); + //构建配置 + return getSamlAppConverter().saml2ProtocolConfigToSaml2SsoModel(saml2Config); + } + + private SamlAppConverter getSamlAppConverter() { + return ApplicationContextHelp.getBean(SamlAppConverter.class); + } + + /** + * AppSaml2ConfigRepository + */ + protected final AppSaml2ConfigRepository appSaml2ConfigRepository; + + /** + * IdGenerator + */ + protected final IdGenerator idGenerator; + + protected AbstractSamlAppService(AppCertRepository appCertRepository, + AppAccountRepository appAccountRepository, + AppAccessPolicyRepository appAccessPolicyRepository, + AppRepository appRepository, + AppSaml2ConfigRepository appSaml2ConfigRepository) { + super(appCertRepository, appAccountRepository, appAccessPolicyRepository, appRepository); + this.appSaml2ConfigRepository = appSaml2ConfigRepository; + this.idGenerator = new AlternativeJdkIdGenerator(); + } + + @Mapper(componentModel = "spring") + interface SamlAppConverter { + + /** + * 应用 Saml 2 配置实体到 Saml 2 协议配置 + * + * @param entity {@link AppSaml2ConfigEntity} + * @return {@link Saml2ProtocolConfig} + */ + @Mapping(target = "idpSignCert", ignore = true) + @Mapping(target = "idpEncryptCert", ignore = true) + Saml2ProtocolConfig appSaml2ConfigPoToSaml2ProtocolConfig(AppSaml2ConfigPO entity); + + /** + * 应用 Saml 2 配置实体到 Saml 2 协议配置 + * + * @param config {@link Saml2ProtocolConfig} + * @return {@link Saml2SsoModel} + */ + default Saml2SsoModel saml2ProtocolConfigToSaml2SsoModel(Saml2ProtocolConfig config) { + if (config == null) { + return null; + } + Saml2SsoModel.Saml2SsoModelBuilder saml2SsoModel = Saml2SsoModel.builder(); + saml2SsoModel.appId(config.getAppId()); + saml2SsoModel.appCode(config.getAppCode()); + saml2SsoModel.spEntityId(config.getSpEntityId()); + saml2SsoModel.spAcsUrl(config.getSpAcsUrl()); + saml2SsoModel.recipient(config.getRecipient()); + //Audience为空默认使用 SP EntityId + saml2SsoModel + .audience(StringUtils.defaultString(config.getAudience(), config.getSpEntityId())); + saml2SsoModel.spSlsUrl(config.getSpSloUrl()); + saml2SsoModel.spRequestsSigned(config.getSpRequestsSigned()); + saml2SsoModel.spSignCert(config.getSpSignCert()); + saml2SsoModel.acsBinding(config.getAcsBinding()); + saml2SsoModel.slsBinding(config.getSlsBinding()); + saml2SsoModel.nameIdFormat(config.getNameIdFormat()); + //NameID 值 + saml2SsoModel + .nameIdValue(getNameIdValue(config.getAppId(), config.getNameIdValueType())); + //断言签名相关 + saml2SsoModel.assertSigned(config.getAssertSigned()); + saml2SsoModel.assertSignAlgorithm(config.getAssertSignAlgorithm()); + //断言签名相关 + saml2SsoModel.assertEncrypted(config.getAssertEncrypted()); + saml2SsoModel.assertEncryptAlgorithm(config.getAssertEncryptAlgorithm()); + //响应签名相关 + saml2SsoModel.responseSigned(config.getResponseSigned()); + saml2SsoModel.responseSignAlgorithm(config.getResponseSignAlgorithm()); + saml2SsoModel.authnContextClassRef(config.getAuthnContextClassRef()); + + saml2SsoModel.relayState(config.getRelayState()); + //加密、签名相关证书 + saml2SsoModel.idpSignCert(config.getIdpSignCert()); + saml2SsoModel.idpEncryptCert(config.getIdpEncryptCert()); + //处理属性 + saml2SsoModel.attributeStatements( + getAttributeStatementList(config.getAppId(), config.getAttributeStatements())); + return saml2SsoModel.build(); + } + + /** + * 获取NameId value + * + * @param appId {@link String} 应用ID + * @param nameIdValueType {@link SamlNameIdValueType} + * @return {@link String} + */ + private String getNameIdValue(String appId, SamlNameIdValueType nameIdValueType) { + UserEntity user = getUser(); + //@formatter:off + //用户名 + if (USER_USERNAME.equals(nameIdValueType)) { + return user.getUsername(); + } + //姓名 + if (USER_FULL_NAME.equals(nameIdValueType)) { + return user.getFullName(); + } + //用户名 + if (USER_NICK_NAME.equals(nameIdValueType)) { + return user.getNickName(); + } + //邮箱 + if (USER_EMAIL.equals(nameIdValueType)) { + return user.getEmail(); + } + //应用用户名 + Long userId = Long.valueOf(SecurityUtils.getCurrentUserId()); + Optional optional = getAppAccountRepository().findByAppIdAndUserId(Long.valueOf(appId), userId); + if (optional.isEmpty()) { + logger.error("用户: " + SecurityUtils.getCurrentUserName() + "应用账户不存在"); + throw new AppAccountNotExistException(); + } + return optional.get().getAccount(); + //@formatter:on + } + + /** + * 获取属性List + * + * @param appId {@link String} 应用ID + * @param attributeStatements {@link List} + * @return {@link Saml2SsoModel.AttributeStatement} + */ + private List getAttributeStatementList(String appId, + List attributeStatements) { + if (!CollectionUtils.isEmpty(attributeStatements)) { + List list = new ArrayList<>(); + UserEntity user = getUser(); + //@formatter:off + //封装变量 + for (AppSaml2ConfigEntity.AttributeStatement attributeStatement : attributeStatements) { + Saml2SsoModel.AttributeStatement attributeStatementModal = new Saml2SsoModel.AttributeStatement(); + attributeStatementModal.setKey(attributeStatement.getName()); + attributeStatementModal.setNameFormat(attributeStatement.getNameFormat()); + //用户名 + if (attributeStatement.getValueExpression().contains(SamlAttributeStatementValueType.USERNAME.getExpression())){ + HashMap values = new HashMap<>(16); + values.put(SamlAttributeStatementValueType.USERNAME.getCode(), user.getUsername()); + attributeStatementModal.setValue(new StringSubstitutor(values).replace(attributeStatement.getValueExpression())); + list.add(attributeStatementModal); + } + //昵称 + else if (attributeStatement.getValueExpression().contains(SamlAttributeStatementValueType.NICK_NAME.getExpression())){ + if (StringUtils.isNotBlank(user.getNickName())) { + HashMap values = new HashMap<>(16); + values.put(SamlAttributeStatementValueType.NICK_NAME.getCode(), user.getNickName()); + attributeStatementModal.setValue(new StringSubstitutor(values).replace(attributeStatement.getValueExpression())); + list.add(attributeStatementModal); + } + } + //手机号 + else if (attributeStatement.getValueExpression().contains(SamlAttributeStatementValueType.PHONE.getExpression())){ + if (StringUtils.isNotBlank(user.getPhone())) { + HashMap values = new HashMap<>(16); + values.put(SamlAttributeStatementValueType.PHONE.getCode(), user.getPhone()); + attributeStatementModal.setValue(new StringSubstitutor(values).replace(attributeStatement.getValueExpression())); + list.add(attributeStatementModal); + } + } + //邮箱 + else if (attributeStatement.getValueExpression().contains(SamlAttributeStatementValueType.EMAIL.getExpression())){ + if (StringUtils.isNotBlank(user.getEmail())){ + HashMap values = new HashMap<>(16); + values.put(SamlAttributeStatementValueType.EMAIL.getCode(), user.getEmail()); + attributeStatementModal.setValue(new StringSubstitutor(values).replace(attributeStatement.getValueExpression())); + list.add(attributeStatementModal); + } + } + //应用用户 + else if (attributeStatement.getValueExpression().contains(SamlAttributeStatementValueType.APP_USERNAME.getExpression())){ + //应用用户名 + Long userId = Long.valueOf(SecurityUtils.getCurrentUserId()); + Optional optional = getAppAccountRepository().findByAppIdAndUserId(Long.valueOf(appId), userId); + if (optional.isEmpty()) { + logger.error("用户 [{}] 应用账户不存在",SecurityUtils.getCurrentUserName() ); + throw new AppAccountNotExistException(); + } + HashMap values = new HashMap<>(16); + values.put(SamlAttributeStatementValueType.APP_USERNAME.getCode(), optional.get().getAccount()); + attributeStatementModal.setValue(new StringSubstitutor(values).replace(attributeStatement.getValueExpression())); + list.add(attributeStatementModal); + } else { + attributeStatementModal.setValue(attributeStatement.getValueExpression()); + list.add(attributeStatementModal); + } + } + //@formatter:on + return list; + } + return new ArrayList<>(); + } + + /** + * 获取 AppAccountRepository + * + * @return {@link AppAccountRepository} + */ + private AppAccountRepository getAppAccountRepository() { + return ApplicationContextHelp.getBean(AppAccountRepository.class); + } + + /** + * 获取 UserRepository + * + * @return {@link UserRepository} + */ + private UserRepository getUserRepository() { + return ApplicationContextHelp.getBean(UserRepository.class); + } + + } +} diff --git a/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/Saml2StandardApplicationServiceImpl.java b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/Saml2StandardApplicationServiceImpl.java new file mode 100644 index 00000000..6d771996 --- /dev/null +++ b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/Saml2StandardApplicationServiceImpl.java @@ -0,0 +1,256 @@ +/* + * eiam-application-saml2 - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.saml2; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +import javax.validation.ConstraintViolationException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import com.fasterxml.jackson.databind.ObjectMapper; + +import cn.topiam.employee.application.exception.AppNotExistException; +import cn.topiam.employee.application.saml2.converter.AppSaml2StandardConfigConverter; +import cn.topiam.employee.application.saml2.model.AppSaml2StandardSaveConfigParam; +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.common.entity.app.AppEntity; +import cn.topiam.employee.common.entity.app.AppSaml2ConfigEntity; +import cn.topiam.employee.common.entity.app.po.AppSaml2ConfigPO; +import cn.topiam.employee.common.enums.app.*; +import cn.topiam.employee.common.repository.app.*; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.util.BeanUtils; +import cn.topiam.employee.support.validation.ValidationHelp; +import static org.opensaml.saml.common.xml.SAMLConstants.SAML2_POST_BINDING_URI; + +import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES; + +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; + +/** + * SAML2 用户应用 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/20 23:20 + */ +@SuppressWarnings({ "rawtypes", "DuplicatedCode" }) +@Component +public class Saml2StandardApplicationServiceImpl extends AbstractSamlAppService { + private final Logger logger = LoggerFactory + .getLogger(Saml2StandardApplicationServiceImpl.class); + + /** + * 更新应用配置 + * + * @param appId {@link String} + * @param config {@link Map} + */ + @Override + public void saveConfig(String appId, Map config) { + AppSaml2StandardSaveConfigParam model; + try { + ObjectMapper mapper = new ObjectMapper(); + String value = mapper.writeValueAsString(config); + // 指定序列化输入的类型 + mapper.configure(FAIL_ON_UNKNOWN_PROPERTIES, false); + model = mapper.readValue(value, AppSaml2StandardSaveConfigParam.class); + } catch (Exception e) { + throw new TopIamException(e.getMessage()); + } + //@formatter:off + ValidationHelp.ValidationResult validationResult = ValidationHelp.validateEntity(model); + if (validationResult.isHasErrors()) { + throw new ConstraintViolationException(validationResult.getConstraintViolations()); + } + //@formatter:on + //1、修改基本信息 + Optional optional = appRepository.findById(Long.valueOf(appId)); + if (optional.isEmpty()) { + AuditContext.setContent("保存配置失败,应用 [" + appId + "] 不存在!"); + logger.error(AuditContext.getContent()); + throw new AppNotExistException(); + } + AppEntity appEntity = optional.get(); + appEntity.setAuthorizationType(model.getAuthorizationType()); + appEntity.setInitLoginUrl(model.getInitLoginUrl()); + appEntity.setInitLoginType(model.getInitLoginType()); + appRepository.save(appEntity); + //2、修改SAML2配置 + Optional saml = appSaml2ConfigRepository + .findByAppId(Long.valueOf(appId)); + if (saml.isEmpty()) { + AuditContext.setContent("保存配置失败,应用 [" + appId + "] 不存在!"); + logger.error(AuditContext.getContent()); + throw new AppNotExistException(); + } + AppSaml2ConfigEntity entity = saml.get(); + AppSaml2ConfigEntity saml2Config = appSaml2StandardConfigConverter + .saveSaml2ConfigConverterToEntity(model); + BeanUtils.merge(saml2Config, entity, LAST_MODIFIED_BY, LAST_MODIFIED_TIME); + appSaml2ConfigRepository.save(entity); + } + + /** + * 获取配置 + * + * @param appId {@link String} + * @return {@link Map} + */ + @Override + public Object getConfig(String appId) { + AppSaml2ConfigPO po = appSaml2ConfigRepository.getByAppId(Long.valueOf(appId)); + return appSaml2StandardConfigConverter.entityConverterToSaml2ConfigResult(po); + } + + /** + * 获取应用标志 + * + * @return {@link String} + */ + @Override + public String getCode() { + return "saml2"; + } + + /** + * 获取应用名称 + * + * @return {@link String} + */ + @Override + public String getName() { + return "SAML2"; + } + + /** + * 获取应用描述 + * + * @return {@link String} + */ + @Override + public String getDescription() { + return "SAML(Security Assertion Markup Language,安全断言标记语言,版本 2.0)基于 XML 协议,使用包含断言(Assertion)的安全令牌,在授权方(TopIAM)和消费方(应用)之间传递身份信息,实现基于网络跨域的单点登录。SAML 协议是成熟的认证协议,在国内外的公有云和私有云中有非常广泛的运用。"; + } + + /** + * 获取应用类型 + * + * @return {@link AppType} + */ + @Override + public AppType getType() { + return AppType.STANDARD; + } + + /** + * 获取应用协议 + * + * @return {@link AppProtocol} + */ + @Override + public AppProtocol getProtocol() { + return AppProtocol.SAML2; + } + + /** + * 获取表单Schema + * + * @return {@link Map} + */ + @Override + public List getFormSchema() { + return new ArrayList<>(); + } + + /** + * 获取base64图标 + * + * @return {@link String} + */ + @Override + public String getBase64Icon() { + return "data:image/svg+xml;base64,PHN2ZyB0PSIxNjYwOTc4ODM3NTM4IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjIyMzIiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48cGF0aCBkPSJNNTc3LjgwODQxIDE4Ni4yOTkwNzdjLTU3LjA2NTAyNiAyNy42OTM5NDktMTU0LjMzODQ2MiAyNDAuNjMzNDM2LTE5OS41NDIxNTQgMzQ0LjU5MjQxIDI4LjgzOTM4NS02My44Njg3MTggMTQ4LjYxNDU2NC0yMTIuNDI3NDg3IDIwNi4wOTk2OTMtMjAzLjUyIDk2Ljk4Nzg5NyAyLjg0ODgyMSAyNDQuMTQxOTQ5IDI0OS42MDY1NjQgMzAzLjM3OTY5MiAzNzMuODA5MjMxLTM2LjYwOC04MS40ODY3NjktNzQuMzU0ODcyLTE4OC4yMDU5NDktMTM1LjExNTQ4Ny0yODAuNzUzMjMxLTYwLjc2Mzg5Ny05Mi41NDQtMTQzLjk0MDkyMy0yMTUuODYwNTEzLTE3NC44MjE3NDQtMjM0LjEyODQxeiIgZmlsbD0iI0NCMzkzOSIgcC1pZD0iMjIzMyI+PC9wYXRoPjxwYXRoIGQ9Ik04MjUuNDg4NDEgODMxLjgwMzA3N2M2LjAxOTI4Mi02My4xNDMzODUtMTI1LjI3OTE3OS0yNTYuOTY4MjA1LTE5MC41NjU3NDMtMzQ5LjYzNjkyMyAzOS41NTIgNTcuODQ2MTU0IDEwNC4xNTkxNzkgMjM3LjQwNzE3OSA2Ni42NTg0NjEgMjgxLjg3NTY5Mi01Mi44NzM4NDYgODEuMzYyMDUxLTM0MC4xNjQ5MjMgNzguNzI5ODQ2LTQ3Ny4wNTYgNjQuNzQxNzQ0IDg4LjYzODM1OSAxMS4xMDY0NjIgMTk5LjQyNCAzNC4zNTk3OTUgMzEwLjA2ODUxMyAzMC41ODg3MTggMTEwLjY0NDUxMy0zLjc3NDM1OSAyNTkuMjMyODIxLTEwLjY5MjkyMyAyOTAuODk0NzY5LTI3LjU2OTIzMXoiIGZpbGw9IiNDQjM5MzkiIHAtaWQ9IjIyMzQiPjwvcGF0aD48cGF0aCBkPSJNMTM3Ljg0NjE1NCA2OTYuMTkyYzUyLjg3NzEyOCAzNS4wMzU4OTcgMjg1LjY4OTQzNiAxMC40MjA1MTMgMzk4LjE4MTc0My0zLjU2NDMwOC02OS42NTQ5NzQgNy42NzAxNTQtMjU4LjQ5NDM1OS0xOS44NDY1NjQtMjgwLjA3Mzg0Ni03My44NjI1NjRDMjA5LjA1MzUzOCA1MzMuODE5MDc3IDM0Ni42MDEwMjYgMjgxLjU4MDMwOCA0MjMuMzc4MDUxIDE2Ny4zODQ2MTUgMzcxLjg1NjQxIDI0MC4zNjQzMDggMjk5LjE5MTc5NSAzMjcuMTYxNDM2IDI1MC40NDM0ODcgNDI2LjU2MTY0MSAyMDEuNjkxODk3IDUyNS45NjE4NDYgMTM3Ljg1OTI4MiA2NjAuMzE1ODk3IDEzNy44NDYxNTQgNjk2LjE5MnoiIGZpbGw9IiNDQjM5MzkiIHAtaWQ9IjIyMzUiPjwvcGF0aD48L3N2Zz4="; + } + + /** + * 创建应用 + * + * @param name {@link String} 名称 + * @param remark {@link String} 备注 + */ + @Override + public String create(String name, String remark) { + //1、创建基础信息 + AppEntity appEntity = new AppEntity(); + appEntity.setName(name); + appEntity.setCode( + org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric(32).toLowerCase()); + appEntity.setTemplate(getCode()); + appEntity.setType(AppType.STANDARD); + appEntity.setEnabled(true); + appEntity.setProtocol(getProtocol()); + appEntity.setClientId(idGenerator.generateId().toString().replace("-", "")); + appEntity.setClientSecret(idGenerator.generateId().toString().replace("-", "")); + appEntity.setInitLoginType(InitLoginType.PORTAL_OR_APP); + appEntity.setAuthorizationType(AuthorizationType.AUTHORIZATION); + appEntity.setRemark(remark); + appRepository.save(appEntity); + //2、创建证书 + createCertificate(appEntity.getId(), appEntity.getCode(), AppCertUsingType.SAML_SIGN); + createCertificate(appEntity.getId(), appEntity.getCode(), AppCertUsingType.SAML_ENCRYPT); + //3、创建配置 + AppSaml2ConfigEntity entity = new AppSaml2ConfigEntity(); + entity.setAppId(appEntity.getId()); + //Binding POST + entity.setAcsBinding(SAML2_POST_BINDING_URI); + //NameID + entity.setNameIdFormat(SamlNameIdFormatType.PERSISTENT); + //应用账户名 + entity.setNameIdValueType(SamlNameIdValueType.APP_USERNAME); + //签名非对称算法 + entity.setAssertSigned(true); + entity.setAssertSignAlgorithm(SamlSignAssertAlgorithmType.RSA_SHA256); + //加密使用的非对称算法 + entity.setAssertEncrypted(false); + entity.setAssertEncryptAlgorithm(SamlEncryptAssertAlgorithmType.RSA_SHA256); + //SAML 身份认证上下文 + entity.setAuthnContextClassRef(AuthnContextClassRefType.UNSPECIFIED_AUTHN_CTX); + appSaml2ConfigRepository.save(entity); + return appEntity.getId().toString(); + } + + private final AppSaml2StandardConfigConverter appSaml2StandardConfigConverter; + + public Saml2StandardApplicationServiceImpl(AppRepository appRepository, + AppCertRepository appCertRepository, + AppAccountRepository appAccountRepository, + AppAccessPolicyRepository appAccessPolicyRepository, + AppSaml2ConfigRepository appSaml2ConfigRepository, + AppSaml2StandardConfigConverter appSaml2StandardConfigConverter) { + super(appCertRepository, appAccountRepository, appAccessPolicyRepository, appRepository, + appSaml2ConfigRepository); + this.appSaml2StandardConfigConverter = appSaml2StandardConfigConverter; + } +} diff --git a/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/converter/AppSaml2StandardConfigConverter.java b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/converter/AppSaml2StandardConfigConverter.java new file mode 100644 index 00000000..e4104c79 --- /dev/null +++ b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/converter/AppSaml2StandardConfigConverter.java @@ -0,0 +1,117 @@ +/* + * eiam-application-saml2 - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.saml2.converter; + +import java.util.List; + +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +import cn.topiam.employee.application.saml2.model.AppSaml2StandardConfigGetResult; +import cn.topiam.employee.application.saml2.model.AppSaml2StandardSaveConfigParam; +import cn.topiam.employee.application.saml2.model.Saml2ConverterUtils; +import cn.topiam.employee.common.entity.app.AppSaml2ConfigEntity; +import cn.topiam.employee.common.entity.app.po.AppSaml2ConfigPO; + +/** + * 应用映射 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/14 22:45 + */ +@Mapper(componentModel = "spring") +public interface AppSaml2StandardConfigConverter { + /** + * 实体转Saml2配置结果 + * + * @param config {@link AppSaml2ConfigPO} + * @return {@link AppSaml2StandardConfigGetResult} + */ + default AppSaml2StandardConfigGetResult entityConverterToSaml2ConfigResult(AppSaml2ConfigPO config) { + if (config == null) { + return null; + } + AppSaml2StandardConfigGetResult result = new AppSaml2StandardConfigGetResult(); + //协议端点域 + result.setProtocolEndpoint( + Saml2ConverterUtils.getProtocolEndpointDomain(config.getAppCode().toString())); + //SpEntityId + result.setSpEntityId(config.getSpEntityId()); + //SP 单点登录 ACS URL + result.setSpAcsUrl(config.getSpAcsUrl()); + //单点登录 ACS BINDING + result.setAcsBinding(config.getAcsBinding()); + //是否对 SAML Request 签名进行验证 ,用来对SAML Request签名进行验证,对应SP元数据文件中“AuthnRequestsSigned”值 + result.setSpRequestsSigned(config.getSpRequestsSigned()); + //SP公钥证书,用来验证SAML request的签名,对应SP元数据文件中 use='signing' 证书内容 + result.setSpSignCert(config.getSpSignCert()); + //Audience + result.setSpAudience(config.getAudience()); + //NameId 值类型 + result.setNameIdValueType(config.getNameIdValueType()); + //SAML Response 中指定账户标识 NameID 字段格式。 + result.setNameIdFormat(config.getNameIdFormat()); + //是否对断言签名 + result.setAssertSigned(config.getAssertSigned()); + //断言签名使用的非对称算法 + result.setAssertSignAlgorithm(config.getAssertSignAlgorithm()); + //是否对断言加密 + result.setAssertEncrypted(config.getAssertEncrypted()); + //断言加密使用的非对称算法 + result.setAssertEncryptAlgorithm(config.getAssertEncryptAlgorithm()); + //是否对响应加密 + result.setResponseSigned(config.getResponseSigned()); + //响应加密使用的非对称算法 + result.setResponseSignAlgorithm(config.getResponseSignAlgorithm()); + //SAML 身份认证上下文 + result.setAuthnContextClassRef(config.getAuthnContextClassRef()); + //IDP 发起 SSO 登录成功后,应用应自动跳转的地址。在 SAML Response 中会在 RelayState 参数中传递,应用读取后实现跳转。 + result.setRelayState(config.getRelayState()); + //SSO 发起方 + result.setInitLoginType(config.getInitLoginType()); + //登录发起地址 + result.setInitLoginUrl(config.getInitLoginUrl()); + //授权类型 + result.setAuthorizationType(config.getAuthorizationType()); + //属性声明 + List list = config.getAttributeStatements(); + if (list != null) { + result.setAttributeStatements(list); + } + result.setAdditionalConfig(config.getAdditionalConfig()); + return result; + } + + /** + * 将 Saml 2 配置转换器保存到实体 + * + * @param param {@link AppSaml2StandardSaveConfigParam} + * @return {@link AppSaml2ConfigEntity} + */ + @Mapping(target = "slsBinding", ignore = true) + @Mapping(target = "recipient", ignore = true) + @Mapping(target = "appId", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "spMetadata", ignore = true) + @Mapping(target = "remark", ignore = true) + @Mapping(target = "id", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + AppSaml2ConfigEntity saveSaml2ConfigConverterToEntity(AppSaml2StandardSaveConfigParam param); +} diff --git a/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/AppSaml2StandardConfigGetResult.java b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/AppSaml2StandardConfigGetResult.java new file mode 100644 index 00000000..0b014777 --- /dev/null +++ b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/AppSaml2StandardConfigGetResult.java @@ -0,0 +1,170 @@ +/* + * eiam-application-saml2 - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.saml2.model; + +import java.util.List; +import java.util.Map; + +import cn.topiam.employee.common.entity.app.AppSaml2ConfigEntity; +import cn.topiam.employee.common.enums.app.*; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * Saml2 配置返回 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 22:46 + */ +@Data +@Schema(description = "Saml2 配置返回结果") +public class AppSaml2StandardConfigGetResult { + /** + * SSO 发起方 + */ + @Parameter(description = "SSO 发起方") + private InitLoginType initLoginType; + + /** + * SSO 登录链接 + */ + @Parameter(description = "SSO 登录链接") + private String initLoginUrl; + + /** + * 授权范围 + */ + @Parameter(description = "SSO 授权范围") + private AuthorizationType authorizationType; + /** + * SpEntityId + */ + @Parameter(description = "SP Entity ID") + private String spEntityId; + + /** + * SP 单点登录 ACS URL + */ + @Parameter(description = "SP 单点登录 ACS URL") + private String spAcsUrl; + + /** + * 允许使用SAML断言的资源,默认和SP Entity ID相同。 + */ + @Parameter(description = "Audience") + private String spAudience; + + /** + * 是否对 SAML Request 签名进行验证 ,用来对SAML Request签名进行验证,对应SP元数据文件中“AuthnRequestsSigned”值 + */ + @Parameter(description = "是否对 SAML Request 签名进行验证") + private Boolean spRequestsSigned; + + /** + * SP公钥证书,用来验证SAML request的签名,对应SP元数据文件中 use='signing' 证书内容 + */ + @Parameter(description = "SP公钥证书,用来验证SAML request的签名request的签名") + private String spSignCert; + + /** + * 单点登录 ACS BINDING + */ + @Parameter(name = "单点登录 ACS BINDING") + private String acsBinding; + + /** + * NameId 值类型 + */ + @Parameter(description = "NameIdType") + private SamlNameIdValueType nameIdValueType; + + /** + * SAML Response 中指定账户标识 NameID 字段格式。一般无需修改。 + */ + @Parameter(description = "NameIdFormat") + private SamlNameIdFormatType nameIdFormat; + + /** + * 是否对断言签名 + */ + @Parameter(description = "是否对断言签名") + private Boolean assertSigned; + + /** + * 断言签名使用的非对称算法 + */ + @Parameter(description = "断言签名使用的非对称算法") + private SamlSignAssertAlgorithmType assertSignAlgorithm; + + /** + * 是否对断言加密 + */ + @Parameter(description = "是否对断言加密") + private Boolean assertEncrypted; + + /** + * 加密使用的非对称算法 + */ + @Parameter(description = "加密使用的非对称算法") + private SamlEncryptAssertAlgorithmType assertEncryptAlgorithm; + + /** + * 响应是否加密 + */ + @Parameter(description = "响应是否加密") + private Boolean responseSigned; + + /** + * 响应签名使用的非对称算法 + */ + @Parameter(description = "响应签名使用的非对称算法") + private SamlSignAssertAlgorithmType responseSignAlgorithm; + + /** + * SAML 身份认证上下文 + */ + @Parameter(description = "AuthnContextClassRef") + private AuthnContextClassRefType authnContextClassRef; + + /** + * IDP 发起 SSO 登录成功后,应用应自动跳转的地址。在 SAML Response 中会在 RelayState 参数中传递,应用读取后实现跳转。 + */ + @Parameter(description = "RelayState") + private String relayState; + + /** + * 在 SAML Response 中,可以将额外用户字段(例如邮箱、显示名等)返回给应用解析。 + */ + @Parameter(description = "AttributeStatements") + private List attributeStatements; + + /** + * 协议端点域 + */ + @Parameter(description = "协议端点域") + private Saml2ProtocolEndpoint protocolEndpoint; + + /** + * 模版配置 + */ + private Map additionalConfig; + +} diff --git a/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/AppSaml2StandardSaveConfigParam.java b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/AppSaml2StandardSaveConfigParam.java new file mode 100644 index 00000000..ea549a35 --- /dev/null +++ b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/AppSaml2StandardSaveConfigParam.java @@ -0,0 +1,175 @@ +/* + * eiam-application-saml2 - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.saml2.model; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +import cn.topiam.employee.common.entity.app.AppSaml2ConfigEntity; +import cn.topiam.employee.common.enums.app.*; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/7/10 01:45 + */ +@Data +@Schema(description = "保存 SAML2 应用配置参数") +public class AppSaml2StandardSaveConfigParam implements Serializable { + + @Serial + private static final long serialVersionUID = 7257798528680745281L; + + /** + * 应用ID + */ + @Schema(description = "授权类型") + private AuthorizationType authorizationType; + + /** + * SSO 发起登录类型 + */ + @Schema(description = "SSO 发起登录类型") + private InitLoginType initLoginType; + + /** + * SSO 发起登录URL + */ + @Schema(description = "SSO 发起登录URL") + private String initLoginUrl; + + /** + * ACS URL + */ + @Schema(description = "ACS URL") + private String spAcsUrl; + + /** + * SLO URL + */ + @Schema(description = "SLO URL") + private String spSloUrl; + + /** + * SP Entity ID + */ + @Schema(description = "SP Entity ID") + private String spEntityId; + + /** + * Name ID 类型 + */ + @Schema(description = "Name ID 类型") + private SamlNameIdValueType nameIdValueType; + + /** + * RelayState + */ + @Schema(description = "RelayState") + private String relayState; + + /** + * Audience + */ + @Schema(description = "Audience") + private String audience; + + /** + * NameID 格式 + */ + @Schema(description = "NameID 格式") + private SamlNameIdFormatType nameIdFormat; + + /** + * Acs Binding 格式 + */ + @Schema(description = "ACS Binding 格式") + private String acsBinding; + + /** + * 是否签名断言 + */ + @Schema(description = "是否签名断言") + private Boolean assertSigned; + + /** + * 是否签名断言 + */ + @Schema(description = "签名断言算法") + private SamlSignAssertAlgorithmType assertSignAlgorithm; + + /** + * 是否加密断言 + */ + @Schema(description = "是否加密断言") + private Boolean assertEncrypted; + + /** + * 断言签名算法 + */ + @Schema(description = "加密断言算法") + private SamlEncryptAssertAlgorithmType assertEncryptAlgorithm; + + /** + * 是否签名断言 + */ + @Schema(description = "身份认证上下文") + private AuthnContextClassRefType authnContextClassRef; + + /** + * 响应是否加密 + */ + @Parameter(description = "响应是否加密") + private Boolean responseSigned; + + /** + * 响应签名使用的非对称算法 + */ + @Parameter(description = "响应签名使用的非对称算法") + private SamlSignAssertAlgorithmType responseSignAlgorithm; + + /** + * 在 SAML Response 中,可以将额外用户字段(例如邮箱、显示名等)返回给应用解析。 + */ + @Schema(description = "Attribute Statements") + private List attributeStatements; + + /** + * 是否验证请求签名 + */ + @Schema(description = "验证请求签名") + private Boolean spRequestsSigned; + + /** + * 请求验证证书 + */ + @Schema(description = "请求验证证书") + private String spSignCert; + + /** + * 模版配置 + */ + @Schema(description = "模版配置") + private Map additionalConfig; +} diff --git a/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/Saml2ConverterUtils.java b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/Saml2ConverterUtils.java new file mode 100644 index 00000000..5c20e71b --- /dev/null +++ b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/Saml2ConverterUtils.java @@ -0,0 +1,54 @@ +/* + * eiam-application-saml2 - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.saml2.model; + +import cn.topiam.employee.core.context.ServerContextHelp; +import static cn.topiam.employee.common.constants.ProtocolConstants.*; + +/** + * Saml2ConverterUtils + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/23 22:57 + */ +public class Saml2ConverterUtils { + /** + * 应用ID + * + * @param appCode {@link String} + * @return {@link Saml2ProtocolEndpoint} + */ + public static Saml2ProtocolEndpoint getProtocolEndpointDomain(String appCode) { + Saml2ProtocolEndpoint domain = new Saml2ProtocolEndpoint(); + //IDP + String baseUrl = ServerContextHelp.getPortalPublicBaseUrl(); + //元数据端点 + domain.setIdpMetaEndpoint(baseUrl + Saml2EndpointConstants.SAML_METADATA_PATH + .replace(APP_CODE_VARIABLE, appCode)); + //EntityId端点 + domain.setIdpEntityIdEndpoint(baseUrl + Saml2EndpointConstants.SAML_METADATA_PATH + .replace(APP_CODE_VARIABLE, appCode)); + //Sso端点 + domain.setIdpSsoEndpoint( + baseUrl + Saml2EndpointConstants.SAML_SSO_PATH.replace(APP_CODE_VARIABLE, appCode)); + //Slo端点 + domain.setIdpSloEndpoint( + baseUrl + Saml2EndpointConstants.SAML_LOGOUT_PATH.replace(APP_CODE_VARIABLE, appCode)); + return domain; + } +} diff --git a/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/Saml2ProtocolEndpoint.java b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/Saml2ProtocolEndpoint.java new file mode 100644 index 00000000..448ba76d --- /dev/null +++ b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/Saml2ProtocolEndpoint.java @@ -0,0 +1,64 @@ +/* + * eiam-application-saml2 - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.saml2.model; + +import java.io.Serial; +import java.io.Serializable; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 协议端点域 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 23:37 + */ +@Data +@Schema(description = "协议端点") +public class Saml2ProtocolEndpoint implements Serializable { + + @Serial + private static final long serialVersionUID = -2261602995152894964L; + + /** + * IDP 元数据端点 + */ + @Parameter(description = "IDP 元数据端点") + private String idpMetaEndpoint; + + /** + * IDP EntityId 端点 + */ + @Parameter(description = "IDP EntityId 端点") + private String idpEntityIdEndpoint; + + /** + * IDP SSO 端点 + */ + @Parameter(description = "IDP SSO 端点") + private String idpSsoEndpoint; + + /** + * IDP SLO 端点 + */ + @Parameter(description = "IDP SLO 端点") + private String idpSloEndpoint; +} diff --git a/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/package-info.java b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/package-info.java new file mode 100644 index 00000000..e3e82bc3 --- /dev/null +++ b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/model/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-saml2 - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.saml2.model; \ No newline at end of file diff --git a/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/package-info.java b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/package-info.java new file mode 100644 index 00000000..48f19763 --- /dev/null +++ b/eiam-application/eiam-application-saml2/src/main/java/cn/topiam/employee/application/saml2/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-application-saml2 - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.application.saml2; \ No newline at end of file diff --git a/eiam-application/pom.xml b/eiam-application/pom.xml new file mode 100644 index 00000000..450c5e16 --- /dev/null +++ b/eiam-application/pom.xml @@ -0,0 +1,66 @@ + + + + + cn.topiam + eiam + 1.0.0-beta1 + ../pom.xml + + pom + 4.0.0 + + eiam-application + + + eiam-application-core + eiam-application-saml2 + eiam-application-oidc + eiam-application-cas + eiam-application-jwt + eiam-application-form + eiam-application-all + + + + + cn.topiam + eiam-audit + ${project.version} + + + + + + src/main/java + + ** + + + **/*.java + + false + + + + \ No newline at end of file diff --git a/eiam-audit/pom.xml b/eiam-audit/pom.xml new file mode 100644 index 00000000..8788ec77 --- /dev/null +++ b/eiam-audit/pom.xml @@ -0,0 +1,42 @@ + + + + + cn.topiam + eiam + 1.0.0-beta1 + ../pom.xml + + jar + 4.0.0 + + eiam-audit + + + + cn.topiam + eiam-core + ${project.version} + + + \ No newline at end of file diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/Audit.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/Audit.java new file mode 100644 index 00000000..e5c076b1 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/Audit.java @@ -0,0 +1,49 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.annotation; + +import java.lang.annotation.*; + +import cn.topiam.employee.audit.enums.EventType; + +/** + * Audit + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/28 21:56 + */ +@Target({ ElementType.METHOD }) +@Retention(RetentionPolicy.RUNTIME) +@Inherited +@Documented +public @interface Audit { + + /** + * 类型 + * + * @return {@link Class} + */ + EventType type(); + + /** + * 审计内容 支持SPEL表达式 + * + * @return {@link String} + */ + String content() default ""; +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/AuditAspect.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/AuditAspect.java new file mode 100644 index 00000000..d258aba4 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/AuditAspect.java @@ -0,0 +1,177 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.annotation; + +import java.util.Map; +import java.util.Objects; + +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.ApplicationContext; +import org.springframework.context.expression.BeanFactoryResolver; +import org.springframework.core.DefaultParameterNameDiscoverer; +import org.springframework.expression.spel.standard.SpelExpressionParser; +import org.springframework.expression.spel.support.StandardEvaluationContext; +import org.springframework.stereotype.Component; + +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONWriter; +import com.beust.jcommander.internal.Maps; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.enums.EventStatus; +import cn.topiam.employee.audit.event.AuditEventPublish; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; +import static cn.topiam.employee.support.constant.EiamConstants.COLON; + +/** + * 审计切面 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/28 19:20 + */ +@Component +@Aspect +@AllArgsConstructor +public class AuditAspect { + + private final Logger logger = LoggerFactory + .getLogger(AuditAspect.class); + /** + * SpelExpressionParser + */ + private final SpelExpressionParser spelExpressionParser = new SpelExpressionParser(); + /** + * 参数名发现器 + */ + private final DefaultParameterNameDiscoverer parameterNameDiscoverer = new DefaultParameterNameDiscoverer(); + + private final ApplicationContext applicationContext; + + private final AuditEventPublish auditEventPublish; + + private static final String RESULT = "result"; + private static final String METHOD = "method"; + private static final String ARGS = "args"; + private static final String P = "p"; + private static final String ERROR = "error"; + + /** + * 请求Controller 日志处理 + * + * @param pjp {@link ProceedingJoinPoint} + */ + @Around(value = "@annotation(audit)", argNames = "pjp,audit") + public Object around(ProceedingJoinPoint pjp, Audit audit) throws Throwable { + boolean success = true; + Object[] parameter; + String result = ""; + StandardEvaluationContext context = new StandardEvaluationContext(); + context.setRootObject(new AuditExpressionRoot()); + context.setBeanResolver(new BeanFactoryResolver(applicationContext)); + MethodSignature signature = (MethodSignature) pjp.getSignature(); + String[] parameterNames = parameterNameDiscoverer.getParameterNames(signature.getMethod()); + Map parameterMap = Maps.newHashMap(); + if (parameterNames != null && parameterNames.length > 0) { + //获取方法参数值 + parameter = pjp.getArgs(); + for (int i = 0; i < parameter.length; i++) { + if (ObjectUtils.isNotEmpty(parameter[i])) { + context.setVariable(METHOD, signature.getMethod()); + context.setVariable(ARGS, pjp.getArgs()); + // #参数名 + context.setVariable(parameterNames[i], parameter[i]); + // #p0. + context.setVariable(P + i, parameter[i]); + parameterMap.put(parameterNames[i], parameter[i]); + } + } + } + Object proceed; + try { + proceed = pjp.proceed(); + //结果 + context.setVariable(RESULT, proceed); + } catch (Throwable e) { + success = false; + context.setVariable(ERROR, e); + throw e; + } + //正常、还是异常,都会走以下逻辑 + finally { + //@formatter:off + //内容 + Object content = null; + if (StringUtils.isNoneBlank(audit.content())) { + content = spelExpressionParser.parseExpression(audit.content()).getValue(context); + if (!Objects.isNull(content)) { + try { + content = audit.type().getDesc() + COLON + JSON.toJSONString(content); + } catch (Exception e) { + content = audit.type().getDesc() + COLON + content; + } + } + //后面有设置的内容,拼接 + if (!Objects.isNull(content) && StringUtils.isNoneBlank(AuditContext.getContent())) { + content = content + "," + spelExpressionParser.parseExpression(AuditContext.getContent()).getValue(context); + } + } + //上下文内容,自动拼接事件类型描述 + if (Objects.isNull(content) && StringUtils.isNoneBlank(AuditContext.getContent())) { + content = audit.type().getDesc() +COLON + AuditContext.getContent(); + } + if (Objects.isNull(content) && StringUtils.isBlank(AuditContext.getContent())) { + content = audit.type().getDesc(); + } + content=(content == null) ? "" : content.toString(); + //结果 + Object resultObject = spelExpressionParser.parseExpression("#" + RESULT).getValue(context); + if (!Objects.isNull(resultObject)) { + try { + if (resultObject instanceof ApiRestResult) { + success=((ApiRestResult) resultObject).getSuccess(); + } + result = JSON.toJSONString(resultObject); + } catch (Exception e) { + result = resultObject.toString(); + } + } + //错误 + if (!success) { + Object error = spelExpressionParser.parseExpression("#" + ERROR).getValue(context); + if (!Objects.isNull(error)) { + result= JSON.toJSONString(error, JSONWriter.Feature.PrettyFormat); + } + } + //@formatter:on + auditEventPublish.publish(audit.type(), parameterMap, content.toString(), + AuditContext.getTarget(), result, success ? EventStatus.SUCCESS : EventStatus.FAIL); + } + //Remove AuditContext + AuditContext.removeAuditContext(); + return proceed; + } +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/AuditExpressionOperations.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/AuditExpressionOperations.java new file mode 100644 index 00000000..72882be8 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/AuditExpressionOperations.java @@ -0,0 +1,45 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.annotation; + +import org.springframework.security.core.Authentication; + +/** + * Audit 解析器 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/28 22:45 + */ +public interface AuditExpressionOperations { + + /** + * Gets the {@link Authentication} used for evaluating the expressions + * + * @return the {@link Authentication} for evaluating the expressions + */ + Authentication getAuthentication(); + + /** + * 转JSON字符串 + * + * @param object {@link Object} + * @return {@link String} + */ + String toJsonString(Object object); + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/AuditExpressionRoot.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/AuditExpressionRoot.java new file mode 100644 index 00000000..6b2c4eca --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/AuditExpressionRoot.java @@ -0,0 +1,57 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.annotation; + +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; + +import com.alibaba.fastjson2.JSON; + +import lombok.AllArgsConstructor; + +/** + * AuditExpressionRoot + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/28 22:48 + */ +@AllArgsConstructor +public class AuditExpressionRoot implements AuditExpressionOperations { + + /** + * Gets the {@link Authentication} used for evaluating the expressions + * + * @return the {@link Authentication} for evaluating the expressions + */ + @Override + public Authentication getAuthentication() { + return SecurityContextHolder.getContext().getAuthentication(); + } + + /** + * 转为JSON字符串 + * + * @param object {@link Object} + * @return {@link String} + */ + @Override + public String toJsonString(Object object) { + return JSON.toJSONString(object); + } + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/package-info.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/package-info.java new file mode 100644 index 00000000..653cae2f --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/annotation/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.annotation; \ No newline at end of file diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/configuration/ElasticsearchConfiguration.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/configuration/ElasticsearchConfiguration.java new file mode 100644 index 00000000..70f97727 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/configuration/ElasticsearchConfiguration.java @@ -0,0 +1,217 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.configuration; + +import java.util.Map; + +import org.jetbrains.annotations.NotNull; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.convert.converter.Converter; +import org.springframework.data.convert.ReadingConverter; +import org.springframework.data.convert.WritingConverter; +import org.springframework.data.elasticsearch.core.convert.ElasticsearchCustomConversions; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.google.common.collect.Lists; + +import cn.topiam.employee.audit.enums.EventStatus; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.enums.UserType; +import cn.topiam.employee.common.geo.maxmind.enums.GeoLocationProvider; +import cn.topiam.employee.support.util.JsonUtils; + +/** + * ElasticsearchConfiguration + * + * @author TopIAM + * Created by support@topiam.cn on 2022/11/3 23:31 + */ +@Configuration +public class ElasticsearchConfiguration { + + @Bean + public ElasticsearchCustomConversions elasticsearchCustomConversions() { + return new ElasticsearchCustomConversions( + Lists.newArrayList(AuditTypeToStringConverter.INSTANCE, + StringToAuditTypeConverter.INSTANCE, EventStatusToStringConverter.INSTANCE, + StringToEventStatusConverter.INSTANCE, ActorTypeToStringConverter.INSTANCE, + StringToActorTypeConverter.INSTANCE, GeoLocationProviderToStringConverter.INSTANCE, + StringToGeoLocationProviderConverter.INSTANCE, TargetTypeToStringConverter.INSTANCE, + StringToTargetTypeConverter.INSTANCE, StringToMapConverter.INSTANCE, + MapToStringConverter.INSTANCE)); + } + + @WritingConverter + enum AuditTypeToStringConverter implements Converter { + /** + * INSTANCE + */ + INSTANCE,; + + @Override + public String convert(EventType source) { + return source.getCode(); + } + } + + @ReadingConverter + enum StringToAuditTypeConverter implements Converter { + /** + *INSTANCE + */ + INSTANCE; + + @Override + public EventType convert(@NotNull String source) { + return EventType.getType(source); + } + } + + @WritingConverter + enum ActorTypeToStringConverter implements Converter { + /** + * INSTANCE + */ + INSTANCE,; + + @Override + public String convert(UserType source) { + return source.getCode(); + } + } + + @ReadingConverter + enum StringToActorTypeConverter implements Converter { + /** + *INSTANCE + */ + INSTANCE; + + @Override + public UserType convert(@NotNull String source) { + return UserType.getType(source); + } + } + + @WritingConverter + enum TargetTypeToStringConverter implements Converter { + /** + * INSTANCE + */ + INSTANCE,; + + @Override + public String convert(TargetType source) { + return source.getCode(); + } + } + + @ReadingConverter + enum StringToTargetTypeConverter implements Converter { + /** + *INSTANCE + */ + INSTANCE; + + @Override + public TargetType convert(@NotNull String source) { + return TargetType.getType(source); + } + } + + @WritingConverter + enum GeoLocationProviderToStringConverter implements Converter { + /** + * INSTANCE + */ + INSTANCE,; + + @Override + public String convert(GeoLocationProvider source) { + return source.getCode(); + } + } + + @ReadingConverter + enum StringToGeoLocationProviderConverter implements Converter { + /** + *INSTANCE + */ + INSTANCE; + + @Override + public GeoLocationProvider convert(@NotNull String source) { + return GeoLocationProvider.getType(source); + } + } + + @WritingConverter + enum MapToStringConverter implements Converter, String> { + /** + * INSTANCE + */ + INSTANCE,; + + @Override + public String convert(@NotNull Map source) { + return JsonUtils.writeValueAsString(source); + } + } + + @ReadingConverter + enum StringToMapConverter implements Converter> { + /** + *INSTANCE + */ + INSTANCE; + + @Override + public Map convert(@NotNull String source) { + return JsonUtils.readValue(source, new TypeReference<>() { + }); + } + } + + @WritingConverter + enum EventStatusToStringConverter implements Converter { + /** + * INSTANCE + */ + INSTANCE,; + + @Override + public String convert(@NotNull EventStatus source) { + return source.getCode(); + } + } + + @ReadingConverter + enum StringToEventStatusConverter implements Converter { + /** + *INSTANCE + */ + INSTANCE; + + @Override + public EventStatus convert(@NotNull String source) { + return EventStatus.getType(source); + } + } +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/context/AuditContext.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/context/AuditContext.java new file mode 100644 index 00000000..e40679d8 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/context/AuditContext.java @@ -0,0 +1,186 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.context; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import org.springframework.util.CollectionUtils; + +import com.alibaba.ttl.TransmittableThreadLocal; + +import cn.topiam.employee.audit.entity.Target; + +/** + * AuditContext + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/23 22:39 + */ +public class AuditContext { + + /** + * 内容 + */ + private static final TransmittableThreadLocal CONTENT = new TransmittableThreadLocal<>(); + + /** + * 目标对象 + */ + private static final TransmittableThreadLocal> TARGET_LIST = new TransmittableThreadLocal<>(); + + /** + * 额外数据 + */ + private static final TransmittableThreadLocal> ADDITIONAL_DATA = new TransmittableThreadLocal<>(); + + /** + * Get Content + * + * @return {@link Object} + */ + public static String getContent() { + return CONTENT.get(); + } + + /** + * Set Content + */ + public static void setContent(String content) { + CONTENT.set(content); + } + + /** + * Remove Content + */ + public static void removeContent() { + CONTENT.remove(); + } + + /** + * Get Additional Content + * + * @return {@link Object} + */ + public static Object getAdditionalData(String key) { + return getAdditionalData().get(key); + } + + /** + * Get + * + * @return {@link Map} + */ + public static Map getAdditionalData() { + Map values = ADDITIONAL_DATA.get(); + if (CollectionUtils.isEmpty(values)) { + ADDITIONAL_DATA.set(new HashMap<>(16)); + } + return values; + } + + /** + * PUT + * + * @param key {@link String} + * @param value {@link Object} + */ + public static void putAdditionalData(String key, Object value) { + Map values = ADDITIONAL_DATA.get(); + if (CollectionUtils.isEmpty(values)) { + HashMap map = new HashMap<>(16); + map.put(key, value); + ADDITIONAL_DATA.set(map); + return; + } + values.put(key, value); + } + + /** + * PUT + * + * @param value {@link Map} + */ + public static void putAdditionalData(Map value) { + ADDITIONAL_DATA.set(value); + } + + /** + * Get Target + * + * @return {@link Object} + */ + public static List getTarget() { + return TARGET_LIST.get(); + } + + /** + * Set Target + */ + public static void setTarget(Target... target) { + if (!Objects.isNull(target)) { + TARGET_LIST.set(List.of(target)); + } + } + + /** + * Set Target + */ + public static void setTarget(List targets) { + if (!CollectionUtils.isEmpty(targets)) { + TARGET_LIST.set(targets); + } + } + + /** + * Remove Content + */ + public static void removeTarget() { + TARGET_LIST.remove(); + } + + /** + * remove + */ + public static void removeAdditionalData() { + ADDITIONAL_DATA.remove(); + } + + /** + * remove + * + * @param key {@link String} + */ + public static void removeAdditionalData(String key) { + Map values = ADDITIONAL_DATA.get(); + if (!CollectionUtils.isEmpty(values)) { + values.remove(key); + } + } + + /** + * remove + */ + public static void removeAuditContext() { + removeAdditionalData(); + removeContent(); + removeTarget(); + } +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/controller/AuditController.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/controller/AuditController.java new file mode 100644 index 00000000..5c18d79d --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/controller/AuditController.java @@ -0,0 +1,91 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.controller; + +import java.util.List; + +import javax.validation.constraints.NotNull; + +import org.springframework.http.MediaType; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import cn.topiam.employee.audit.controller.pojo.AuditDictResult; +import cn.topiam.employee.audit.controller.pojo.AuditListQuery; +import cn.topiam.employee.audit.controller.pojo.AuditListResult; +import cn.topiam.employee.audit.service.AuditService; +import cn.topiam.employee.common.constants.AuditConstants; +import cn.topiam.employee.common.enums.UserType; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; + +/** + * 系统审计 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/23 21:12 + */ +@Validated +@Tag(name = "系统审计") +@RestController +@RequestMapping(value = AuditConstants.AUDIT_PATH, produces = MediaType.APPLICATION_JSON_VALUE) +@AllArgsConstructor +public class AuditController { + + /** + * 审计列表查询 + * + * @param query {@link AuditListQuery} + * @param pageModel {@link PageModel} + * @return {@link ApiRestResult} + */ + @Operation(description = "查询审计列表") + @GetMapping(value = "/list") + public ApiRestResult> getAuditList(@Validated AuditListQuery query, + PageModel pageModel) { + Page list = auditService.getAuditList(query, pageModel); + return ApiRestResult.ok(list); + } + + /** + * 获取审计字典类型 + * + * @return {@link ApiRestResult} + */ + @Validated + @Operation(description = "获取审计类型") + @GetMapping(value = "/types/{user_type}") + public ApiRestResult> getAuditDict(@PathVariable(name = "user_type") @NotNull(message = "用户类型不能为空!") UserType userType) { + List dict = auditService.getAuditDict(userType); + return ApiRestResult.ok(dict); + } + + /** + * AuditService + */ + private final AuditService auditService; +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/controller/pojo/AuditDictResult.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/controller/pojo/AuditDictResult.java new file mode 100644 index 00000000..1c2a2f4d --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/controller/pojo/AuditDictResult.java @@ -0,0 +1,63 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.controller.pojo; + +import java.util.Set; + +import org.springdoc.api.annotations.ParameterObject; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 审计字典结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/27 22:35 + */ +@Data +@Schema(description = "审计字典结果") +@ParameterObject +public class AuditDictResult { + + @Parameter(description = "分组名") + private String name; + @Parameter(description = "分组编码") + private String code; + @Parameter(description = "类型") + private Set types; + + @Data + @Schema(description = "审计类型") + public static class AuditType { + /** + * 名称 + */ + @Parameter(description = "名称") + private String name; + + /** + * CODE + */ + @Parameter(description = "CODE") + private String code; + } + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/controller/pojo/AuditListQuery.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/controller/pojo/AuditListQuery.java new file mode 100644 index 00000000..e84119e5 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/controller/pojo/AuditListQuery.java @@ -0,0 +1,80 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.controller.pojo; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.List; + +import javax.validation.constraints.NotNull; + +import org.springdoc.api.annotations.ParameterObject; +import org.springframework.format.annotation.DateTimeFormat; + +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.enums.UserType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; +import static cn.topiam.employee.support.constant.EiamConstants.DEFAULT_DATE_TIME_FORMATTER_PATTERN; + +/** + * 查询审计日志列表入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/23 21:22 + */ +@Data +@Schema(description = "查询审计日志列表入参") +@ParameterObject +public class AuditListQuery implements Serializable { + + /** + * 用户名 + */ + @Parameter(description = "用户名") + private String username; + /** + * 审计类型 + */ + @Parameter(description = "审计类型") + private List eventType; + + /** + * 用户类型 + */ + @NotNull(message = "用户类型不能为空") + @Parameter(description = "用户类型") + private UserType userType; + + /** + * 事件开始时间 + */ + @Parameter(description = "事件开始时间") + @DateTimeFormat(pattern = DEFAULT_DATE_TIME_FORMATTER_PATTERN) + private LocalDateTime startEventTime; + + /** + * 事件结束时间 + */ + @Parameter(description = "事件结束时间") + @DateTimeFormat(pattern = DEFAULT_DATE_TIME_FORMATTER_PATTERN) + private LocalDateTime endEventTime; +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/controller/pojo/AuditListResult.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/controller/pojo/AuditListResult.java new file mode 100644 index 00000000..5bacaf49 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/controller/pojo/AuditListResult.java @@ -0,0 +1,105 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.controller.pojo; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import cn.topiam.employee.audit.entity.GeoLocation; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.entity.UserAgent; +import cn.topiam.employee.audit.enums.EventStatus; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; +import static cn.topiam.employee.support.constant.EiamConstants.DEFAULT_DATE_TIME_FORMATTER_PATTERN; + +/** + * 审计日志列表结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/24 22:07 + */ +@Data +@Schema(description = "审计日志列表结果") +public class AuditListResult implements Serializable { + /** + * ID + */ + @Schema(description = "ID") + private String id; + + /** + * 用户 + */ + @Schema(description = "用户名") + private String username; + + /** + * 用户 ID + */ + @Schema(description = "用户ID") + private String userId; + + /** + * 用户类型 + */ + @Schema(description = "用户类型") + private String userType; + + /** + * 用户代理 + */ + @Schema(description = "用户代理") + private UserAgent userAgent; + + /** + * 地理IP + */ + @Schema(description = "地理位置") + private GeoLocation geoLocation; + + /** + * 事件类型 + */ + @Schema(description = "事件类型") + private String eventType; + + /** + * 操作时间 + */ + @JsonFormat(pattern = DEFAULT_DATE_TIME_FORMATTER_PATTERN) + @Schema(description = "事件时间") + private LocalDateTime eventTime; + + /** + * 事件状态 + */ + @Schema(description = "事件状态") + private EventStatus eventStatus; + + /** + * 目标 + */ + @Schema(description = "目标") + private List targets; +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/Actor.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/Actor.java new file mode 100644 index 00000000..109873f3 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/Actor.java @@ -0,0 +1,57 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.entity; + +import java.io.Serial; +import java.io.Serializable; + +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; + +import cn.topiam.employee.common.enums.UserType; + +import lombok.Builder; +import lombok.Data; + +/** + * Actor + * @author TopIAM + * Created by support@topiam.cn on 2022/11/5 23:30 + */ +@Data +@Builder +public class Actor implements Serializable { + + public static final String ACTOR_ID = "actor.id"; + public static final String ACTOR_TYPE = "actor.type"; + + @Serial + private static final long serialVersionUID = -1144169992714000310L; + /** + * 行动者ID + */ + @Field(type = FieldType.Keyword, name = "id") + private String id; + + /** + * 行动者类型 + */ + @Field(type = FieldType.Keyword, name = "type") + private UserType type; + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/AuditElasticSearchEntity.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/AuditElasticSearchEntity.java new file mode 100644 index 00000000..93c4e6a8 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/AuditElasticSearchEntity.java @@ -0,0 +1,98 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.entity; + +import java.io.Serial; +import java.io.Serializable; +import java.time.Instant; +import java.util.List; + +import org.springframework.data.annotation.Id; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; + +import lombok.Builder; +import lombok.Data; +import static org.springframework.data.elasticsearch.annotations.DateFormat.date_hour_minute_second_millis; + +/** + * 审计elasticsearch实体 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/10/13 23:22 + */ +@Data +@Builder +public class AuditElasticSearchEntity implements Serializable { + + @Serial + private static final long serialVersionUID = 6589338521638519634L; + + @Id + @Field(type = FieldType.Keyword, name = "id") + private String id; + + /** + * Request Id + */ + @Field(type = FieldType.Keyword, name = "request_id") + private String requestId; + + /** + * Session Id + */ + @Field(type = FieldType.Keyword, name = "session_id") + private String sessionId; + + /** + * 操作者 + */ + @Field(type = FieldType.Object, name = "actor") + private Actor actor; + + /** + * 事件 + */ + @Field(type = FieldType.Object, name = "event") + private Event event; + + /** + * 操作目标 + */ + @Field(type = FieldType.Object, name = "target") + private List targets; + + /** + * UserAgent + */ + @Field(type = FieldType.Object, name = "user_agent") + private UserAgent userAgent; + + /** + * 地理位置 + */ + @Field(type = FieldType.Object, name = "geo_location") + private GeoLocation geoLocation; + + /** + * 时间戳 + */ + @Field(type = FieldType.Date, name = "@timestamp", format = date_hour_minute_second_millis) + private Instant timestamp; + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/AuditEntity.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/AuditEntity.java new file mode 100644 index 00000000..c61fdd80 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/AuditEntity.java @@ -0,0 +1,139 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.entity; + +import java.io.Serial; +import java.time.Instant; +import java.util.List; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import org.hibernate.annotations.Type; + +import cn.topiam.employee.audit.enums.EventStatus; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.enums.UserType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 审计 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/8/1 21:41 + */ +@Getter +@Setter +@ToString +@RequiredArgsConstructor +@Accessors(chain = true) +@Entity +@Table(name = "audit") +public class AuditEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = -3119319193111206582L; + + /** + * Request Id + */ + @Column(name = "request_id") + private String requestId; + + /** + * Session Id + */ + @Column(name = "session_id") + private String sessionId; + + /** + * 操作目标 + */ + @Type(type = "json") + @Column(name = "target_") + private List targets; + + /** + * UserAgent + */ + @Type(type = "json") + @Column(name = "user_agent") + private UserAgent userAgent; + + /** + * 地理位置 + */ + @Type(type = "json") + @Column(name = "geo_location") + private GeoLocation geoLocation; + + /** + * 审计事件类型 + */ + @Column(name = "event_type") + private EventType eventType; + + /** + * 参数 + */ + @Column(name = "event_param") + private String eventParam; + + /** + * 事件内容 + */ + @Column(name = "event_content") + private String eventContent; + + /** + * 事件结果 + */ + @Column(name = "event_result") + private String eventResult; + + /** + * 事件时间 + */ + @Column(name = "event_time") + private Instant eventTime; + + /** + * 事件状态 + */ + @Column(name = "event_status") + private EventStatus eventStatus; + + /** + * 操作者ID + */ + @Column(name = "actor_id") + private String actorId; + + /** + * 操作人类型 + */ + @Column(name = "actor_type") + private UserType actorType; +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/Event.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/Event.java new file mode 100644 index 00000000..d9b38412 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/Event.java @@ -0,0 +1,88 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.entity; + +import java.io.Serial; +import java.io.Serializable; +import java.time.Instant; + +import org.springframework.data.elasticsearch.annotations.DateFormat; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; + +import cn.topiam.employee.audit.enums.EventStatus; +import cn.topiam.employee.audit.enums.EventType; + +import lombok.Builder; +import lombok.Data; + +/** + * Event + * + * @author TopIAM + * Created by support@topiam.cn on 2022/11/5 23:33 + */ +@Data +@Builder +public class Event implements Serializable { + + @Serial + private static final long serialVersionUID = -1144169992714000310L; + + public static final String EVENT_TYPE = "event.type"; + public static final String EVENT_TIME = "event.time"; + + public static final String EVENT_STATUS = "event.status.keyword"; + + /** + * 审计事件类型 + */ + @Field(type = FieldType.Keyword, name = "type") + private EventType type; + + /** + * 参数 + */ + @Field(type = FieldType.Text, name = "param") + private String param; + + /** + * 事件内容 + */ + @Field(type = FieldType.Text, name = "content") + private String content; + + /** + * 事件结果 + */ + @Field(type = FieldType.Text, name = "result") + private String result; + + /** + * 事件时间 + */ + @Field(type = FieldType.Date, name = "time", format = DateFormat.date_hour_minute_second_millis) + private Instant time; + + /** + * 事件状态 + */ + @Field(type = FieldType.Keyword, name = "status") + private EventStatus status; + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/GeoLocation.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/GeoLocation.java new file mode 100644 index 00000000..be15f345 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/GeoLocation.java @@ -0,0 +1,112 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.entity; + +import java.io.Serial; +import java.io.Serializable; + +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; +import org.springframework.data.elasticsearch.annotations.GeoPointField; +import org.springframework.data.elasticsearch.core.geo.GeoPoint; + +import cn.topiam.employee.common.geo.maxmind.enums.GeoLocationProvider; + +import lombok.Builder; +import lombok.Data; + +/** + * 地理位置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/11/5 23:31 + */ +@Data +@Builder +public class GeoLocation implements Serializable { + + @Serial + private static final long serialVersionUID = -1144169992714000310L; + + /** + * IP + */ + @Field(type = FieldType.Ip, name = "ip") + private String ip; + + /** + * continent code + */ + @Field(type = FieldType.Keyword, name = "continent_code") + private String continentCode; + + /** + * continent Name + */ + @Field(type = FieldType.Text, name = "continent_code") + private String continentName; + + /** + * 国家code + */ + @Field(type = FieldType.Keyword, name = "country_code") + private String countryCode; + + /** + * 国家名称 + */ + @Field(type = FieldType.Text, name = "country_name") + private String countryName; + + /** + * 省份code + */ + @Field(type = FieldType.Keyword, name = "province_code") + private String provinceCode; + + /** + * 省份 + */ + @Field(type = FieldType.Text, name = "province_name") + private String provinceName; + + /** + * 城市code + */ + @Field(type = FieldType.Keyword, name = "city_code") + private String cityCode; + + /** + * 城市名称 + */ + @Field(type = FieldType.Text, name = "city_name") + private String cityName; + + /** + * 地理坐标 + */ + @GeoPointField + private GeoPoint point; + + /** + * 提供商 + */ + @Field(type = FieldType.Keyword, name = "provider") + private GeoLocationProvider provider; + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/Target.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/Target.java new file mode 100644 index 00000000..5a91890f --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/Target.java @@ -0,0 +1,58 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.entity; + +import java.io.Serial; +import java.io.Serializable; + +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; + +import cn.topiam.employee.audit.enums.TargetType; + +import lombok.Builder; +import lombok.Data; + +/** + * Target + * + * @author TopIAM + * Created by support@topiam.cn on 2022/11/5 23:34 + */ +@Data +@Builder +public class Target implements Serializable { + + @Serial + private static final long serialVersionUID = -1144169992714000310L; + + public static final String TARGET_ID_KEYWORD = "target.id.keyword"; + + /** + * 目标 ID + */ + @Field(type = FieldType.Keyword, name = "id") + private String id; + /** + * + * 目标类型 + */ + @Field(type = FieldType.Keyword, name = "type") + private TargetType type; + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/UserAgent.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/UserAgent.java new file mode 100644 index 00000000..03adffb3 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/entity/UserAgent.java @@ -0,0 +1,54 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.entity; + +import java.io.Serializable; + +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.annotations.FieldType; + +import lombok.Builder; +import lombok.Data; + +/** + * UserAgent + * @author TopIAM + * Created by support@topiam.cn on 2022/11/5 23:31 + */ +@Data +@Builder +public class UserAgent implements Serializable { + + @Field(type = FieldType.Keyword, name = "device_type") + private String deviceType; + + @Field(type = FieldType.Keyword, name = "platform") + private String platform; + + @Field(type = FieldType.Keyword, name = "platform_version") + private String platformVersion; + + @Field(type = FieldType.Keyword, name = "browser") + private String browser; + + @Field(type = FieldType.Keyword, name = "browser_type") + private String browserType; + + @Field(type = FieldType.Keyword, name = "browser_major_version") + private String browserMajorVersion; +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/EventStatus.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/EventStatus.java new file mode 100644 index 00000000..18226396 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/EventStatus.java @@ -0,0 +1,68 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +import lombok.Getter; + +/** + * 事件状态 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/11/6 19:57 + */ +@Getter +public enum EventStatus { + /** + * 成功 + */ + SUCCESS("success", "成功"), + /** + * 失败 + */ + FAIL("fail", "失败"); + + @JsonValue + private final String code; + private final String desc; + + EventStatus(String code, String desc) { + this.code = code; + this.desc = desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link EventStatus} + */ + @EnumConvert + public static EventStatus getType(String code) { + EventStatus[] values = values(); + for (EventStatus status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/EventType.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/EventType.java new file mode 100644 index 00000000..158629ba --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/EventType.java @@ -0,0 +1,551 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.enums; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.audit.event.type.*; +import cn.topiam.employee.common.enums.UserType; +import cn.topiam.employee.support.web.converter.EnumConvert; + +import lombok.Getter; + +/** + * 事件类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/29 21:00 + */ +@Getter +public enum EventType { + /** + * 登录门户 + */ + LOGIN_PORTAL(AuthenticationEventType.LOGIN_PORTAL), + + /** + * 登录控制台 + */ + LOGIN_CONSOLE(AuthenticationEventType.LOGIN_CONSOLE), + + /** + * 退出门户 + */ + LOGOUT_PORTAL(AuthenticationEventType.LOGOUT_PORTAL), + + /** + * 退出控制台 + */ + LOGOUT_CONSOLE(AuthenticationEventType.LOGOUT_CONSOLE), + + /** + * 注册 + */ + USER_REGISTER(AccountEventType.USER_REGISTER), + + /** + * 修改账户信息 + */ + MODIFY_ACCOUNT_INFO(AccountEventType.MODIFY_ACCOUNT_INFO), + + /** + * 修改邮箱 + */ + MODIFY_USER_EMAIL(AccountEventType.MODIFY_USER_EMAIL), + + /** + * 修改手机号 + */ + MODIFY_USER_PHONE(AccountEventType.MODIFY_USER_PHONE), + + /** + * 修改密码 + */ + MODIFY_USER_PASSWORD(AccountEventType.MODIFY_USER_PASSWORD), + + /** + * 创建用户 + */ + CREATE_USER(AccountEventType.CREATE_USER), + + /** + * 编辑用户 + */ + UPDATE_USER(AccountEventType.UPDATE_USER), + + /** + * 删除用户 + */ + DELETE_USER(AccountEventType.DELETE_USER), + + /** + * 禁用用户 + */ + DISABLE_USER(AccountEventType.DISABLE_USER), + + /** + * 启用用户 + */ + ENABLE_USER(AccountEventType.ENABLE_USER), + /** + * 绑定账号 + */ + BIND_IDP_USER(AccountEventType.BIND_IDP_USER), + /** + * 解绑账号 + */ + UNBIND_IDP_USER(AccountEventType.UNBIND_IDP_USER), + /** + * 解绑应用用户 + */ + UNBIND_APPLICATION_USER(AccountEventType.UNBIND_APPLICATION_USER), + /** + * 创建组织 + */ + CREATE_ORG(AccountEventType.CREATE_ORG), + /** + * 编辑组织 + */ + UPDATE_ORG(AccountEventType.UPDATE_ORG), + /** + * 删除组织 + */ + DELETE_ORG(AccountEventType.DELETE_ORGANIZATION), + /** + * 删除组织 + */ + MOVE_ORGANIZATION(AccountEventType.MOVE_ORGANIZATION), + /** + * 添加用户到组织 + */ + USER_ADD_ORG(AccountEventType.USER_ADD_ORG), + /** + * 用户转岗到其他组织 + */ + USER_TRANSFER_ORG(AccountEventType.USER_TRANSFER_ORG), + /** + * 从组织中移除用户 + */ + ORG_REMOVE_USER(AccountEventType.ORG_REMOVE_USER), + /** + * 登录应用 + */ + APP_SSO(AppEventType.APP_SSO), + /** + * 退出应用 + */ + SIGN_OUT_APP(AppEventType.SIGN_OUT_APP), + /** + * 添加应用 + */ + ADD_APP(AppEventType.ADD_APP), + /** + * 启用应用 + */ + ENABLE_APP(AppEventType.ENABLE_APP), + /** + * 禁用应用 + */ + DISABLE_APP(AppEventType.DISABLE_APP), + /** + * 修改应用 + */ + UPDATE_APP(AppEventType.UPDATE_APP), + /** + * 保存应用配置 + */ + SAVE_APP_CONFIG(AppEventType.SAVE_APP_CONFIG), + /** + * 删除应用 + */ + DELETE_APP(AppEventType.DELETE_APP), + /** + * 应用授权 + */ + APP_AUTHORIZATION(AppEventType.APP_ACCESS_POLICY), + /** + * 删除应用授权 + */ + APP_DELETE_ACCESS_POLICY(AppEventType.APP_DELETE_ACCESS_POLICY), + /** + * 添加应用账户 + */ + ADD_APP_ACCOUNT(AppEventType.ADD_APP_ACCOUNT), + /** + * 删除应用账户 + */ + DELETE_APP_ACCOUNT(AppEventType.DELETE_APP_ACCOUNT), + /** + * 保存SSO配置 + */ + SAVE_SSO_CONFIG(AppEventType.SAVE_SSO_CONFIG), + /** + * 添加身份提供商 + */ + ADD_IDP(AuthenticationEventType.ADD_IDP), + /** + * 编辑身份提供商 + */ + UPDATE_IDP(AuthenticationEventType.UPDATE_IDP), + /** + * 启用认证提供商 + */ + ENABLE_IDP(AuthenticationEventType.ENABLE_IDP), + /** + * 禁用认证提供商 + */ + DISABLE_IDP(AuthenticationEventType.DISABLE_IDP), + + /** + * 删除认证提供商 + */ + DELETE_IDP(AuthenticationEventType.DELETE_IDP), + + /** + * 保存安全基础设置 + */ + SAVE_LOGIN_SECURITY_BASIC_SETTINGS(SettingEventType.SAVE_LOGIN_SECURITY_BASIC_SETTINGS), + /** + * 密码策略 + */ + SAVE_PASSWORD_POLICY_SETTINGS(SettingEventType.SAVE_PASSWORD_POLICY_SETTINGS), + + /** + * 多因素认证 + */ + SAVE_MFA_SETTINGS(SettingEventType.SAVE_MFA_SETTINGS), + + /** + * 行为验证码 + */ + SAVE_CAPTCHA_PROVIDER(SettingEventType.SAVE_CAPTCHA_PROVIDER), + + /** + * 禁用行为验证码 + */ + OFF_CAPTCHA_PROVIDER(SettingEventType.OFF_CAPTCHA_PROVIDER), + + /** + * 添加管理员 + */ + ADD_ADMINISTRATOR(SettingEventType.ADD_ADMINISTRATOR), + /** + * 删除管理员 + */ + DELETE_ADMINISTRATOR(SettingEventType.DELETE_ADMINISTRATOR), + /** + * 修改管理员 + */ + UPDATE_ADMINISTRATOR(SettingEventType.UPDATE_ADMINISTRATOR), + /** + * 启用管理员 + */ + ENABLE_ADMINISTRATOR(SettingEventType.ENABLE_ADMINISTRATOR), + /** + * 禁用管理员 + */ + DISABLE_ADMINISTRATOR(SettingEventType.DISABLE_ADMINISTRATOR), + /** + * 重置管理员密码 + */ + RESET_ADMINISTRATOR_PASSWORD(SettingEventType.RESET_ADMINISTRATOR_PASSWORD), + /** + * 开启自定义修改密码邮件模板 + */ + ON_CUSTOMIZE_CHANGE_PASSWORD_MAIL(SettingEventType.ON_CUSTOMIZE_CHANGE_PASSWORD_MAIL), + + /** + * 开启自定义重置密码邮件模板 + */ + ON_CUSTOMIZE_RESET_PASSWORD_MAIL(SettingEventType.ON_CUSTOMIZE_RESET_PASSWORD_MAIL), + + /** + * 开启自定义确认重置密码邮件模板 + */ + ON_CUSTOMIZE_CONFIRM_RESET_PASSWORD_MAIL(SettingEventType.ON_CUSTOMIZE_CONFIRM_RESET_PASSWORD_MAIL), + + /** + * 开启自定义验证邮件模板 + */ + ON_CUSTOMIZE_VERIFY_MAIL(SettingEventType.ON_CUSTOMIZE_VERIFY_MAIL), + /** + * 开启自定义欢迎邮件模板 + */ + ON_CUSTOMIZE_WELCOME_MAIL(SettingEventType.ON_CUSTOMIZE_WELCOME_MAIL), + /** + * 开启自定义修改绑定邮件模板 + */ + ON_CUSTOMIZE_MODIFY_BINDING_MAIL(SettingEventType.ON_CUSTOMIZE_MODIFY_BINDING_MAIL), + /** + * 关闭自定义修改密码邮件模板 + */ + OFF_CUSTOMIZE_CHANGE_PASSWORD_MAIL(SettingEventType.OFF_CUSTOMIZE_CHANGE_PASSWORD_MAIL), + + /** + * 关闭自定义重置密码邮件模板 + */ + OFF_CUSTOMIZE_RESET_PASSWORD_MAIL(SettingEventType.OFF_CUSTOMIZE_RESET_PASSWORD_MAIL), + + /** + * 关闭自定义确认重置密码邮件模板 + */ + OFF_CUSTOMIZE_CONFIRM_RESET_PASSWORD_MAIL(SettingEventType.OFF_CUSTOMIZE_CONFIRM_RESET_PASSWORD_MAIL), + + /** + * 关闭自定义验证邮件模板 + */ + OFF_CUSTOMIZE_VERIFY_MAIL(SettingEventType.OFF_CUSTOMIZE_VERIFY_MAIL), + /** + * 关闭自定义欢迎邮件模板 + */ + OFF_CUSTOMIZE_WELCOME_MAIL(SettingEventType.OFF_CUSTOMIZE_WELCOME_MAIL), + /** + * 关闭自定义修改绑定邮件模板 + */ + OFF_CUSTOMIZE_MODIFY_BINDING_MAIL(SettingEventType.OFF_CUSTOMIZE_MODIFY_BINDING_MAIL), + + /** + * 保存自定义修改密码邮件模板 + */ + SAVE_CUSTOMIZE_CHANGE_PASSWORD_MAIL(SettingEventType.SAVE_CUSTOMIZE_CHANGE_PASSWORD_MAIL), + + /** + * 保存自定义重置密码邮件模板 + */ + SAVE_CUSTOMIZE_RESET_PASSWORD_MAIL(SettingEventType.SAVE_CUSTOMIZE_RESET_PASSWORD_MAIL), + + /** + * 保存自定义确认重置密码邮件模板 + */ + SAVE_CUSTOMIZE_CONFIRM_RESET_PASSWORD_MAIL(SettingEventType.SAVE_CUSTOMIZE_CONFIRM_RESET_PASSWORD_MAIL), + + /** + * 保存自定义验证邮件模板 + */ + SAVE_CUSTOMIZE_VERIFY_MAIL(SettingEventType.SAVE_CUSTOMIZE_VERIFY_MAIL), + /** + * 保存自定义欢迎邮件模板 + */ + SAVE_CUSTOMIZE_WELCOME_MAIL(SettingEventType.SAVE_CUSTOMIZE_WELCOME_MAIL), + /** + * 保存自定义修改绑定邮件模板 + */ + SAVE_CUSTOMIZE_MODIFY_BINDING_MAIL(SettingEventType.SAVE_CUSTOMIZE_MODIFY_BINDING_MAIL), + + /** + * 开启邮件服务 + */ + ON_MAIL_SERVICE(SettingEventType.ON_MAIL_SERVICE), + /** + * 关闭邮件服务 + */ + OFF_MAIL_SERVICE(SettingEventType.OFF_MAIL_SERVICE), + + /** + * 保存邮件服务 + */ + SAVE_MAIL_SERVICE(SettingEventType.SAVE_MAIL_SERVICE), + + /** + * 开启短信验证服务 + */ + ON_SMS_SERVICE(SettingEventType.ON_SMS_SERVICE), + + /** + * 关闭短信验证服务 + */ + OFF_SMS_SERVICE(SettingEventType.OFF_SMS_SERVICE), + + /** + * 保存短信验证服务 + */ + SAVE_SMS_SERVICE(SettingEventType.SAVE_SMS_SERVICE), + + /** + * 开启存储服务 + */ + ON_STORAGE_SERVICE(SettingEventType.ON_STORAGE_SERVICE), + /** + * 关闭存储服务 + */ + OFF_STORAGE_SERVICE(SettingEventType.OFF_STORAGE_SERVICE), + /** + * 保存存储服务 + */ + SAVE_STORAGE_SERVICE(SettingEventType.SAVE_STORAGE_SERVICE), + /** + * 开启地理位置服务 + */ + ON_GEO_LOCATION_SERVICE(SettingEventType.ON_GEO_LOCATION_SERVICE), + /** + * 关闭地理位置服务 + */ + OFF_GEO_LOCATION_SERVICE(SettingEventType.OFF_GEO_LOCATION_SERVICE), + /** + * 保存地理位置服务 + */ + SAVE_GEO_LOCATION_SERVICE(SettingEventType.SAVE_GEO_LOCATION_SERVICE), + + /** + * 下线会话 + */ + DOWN_LINE_SESSION(OtherEventType.DOWN_LINE_SESSION), + + /** + * 批量下线会话 + */ + BATCH_DOWN_LINE_SESSION(OtherEventType.BATCH_DOWN_LINE_SESSION), + + /** + * 创建用户组 + */ + CREATE_USER_GROUP(AccountEventType.CREATE_USER_GROUP), + + /** + * 修改用户组 + */ + UPDATE_USER_GROUP(AccountEventType.UPDATE_USER_GROUP), + + /** + * 删除用户组 + */ + DELETE_USER_GROUP(AccountEventType.DELETE_USER_GROUP), + + /** + * 添加用户组成员 + */ + ADD_USER_GROUP_MEMBER(AccountEventType.ADD_USER_GROUP_MEMBER), + + /** + * 移除用户组成员 + */ + REMOVE_USER_GROUP_MEMBER(AccountEventType.REMOVE_USER_GROUP_MEMBER), + + /** + * 创建身份源 + */ + CREATE_IDENTITY_RESOURCE(AccountEventType.CREATE_IDENTITY_RESOURCE), + + /** + * 修改身份源 + */ + UPDATE_IDENTITY_RESOURCE(AccountEventType.UPDATE_IDENTITY_RESOURCE), + + /** + * 删除身份源 + */ + DELETE_IDENTITY_RESOURCE(AccountEventType.DELETE_IDENTITY_RESOURCE), + + /** + * 启用身份源 + */ + ENABLE_IDENTITY_RESOURCE(AccountEventType.ENABLE_IDENTITY_RESOURCE), + + /** + * 禁用身份源 + */ + DISABLE_IDENTITY_RESOURCE(AccountEventType.DISABLE_IDENTITY_RESOURCE), + /** + * 身份源同步 + */ + IDENTITY_RESOURCE_SYNC(AccountEventType.IDENTITY_RESOURCE_SYNC), + + /** + * 保存应用资源 + */ + SAVE_APP_PERMISSION_RESOURCE(AppEventType.SAVE_APP_PERMISSION_RESOURCE), + /** + * 修改应用资源 + */ + UPDATE_APP_PERMISSION_RESOURCE(AppEventType.UPDATE_APP_PERMISSION_RESOURCE), + /** + * 删除应用资源 + */ + DELETE_APP_PERMISSION_RESOURCE(AppEventType.DELETE_APP_PERMISSION_RESOURCE), + /** + * 启用应用资源 + */ + ENABLE_APP_PERMISSION_RESOURCE(AppEventType.ENABLE_APP_PERMISSION_RESOURCE), + /** + * 禁用应用资源 + */ + DISABLE_APP_PERMISSION_RESOURCE(AppEventType.DISABLE_APP_PERMISSION_RESOURCE), + /** + * 删除用户身份提供商绑定 + */ + DELETE_USER_IDP_BIND(AppEventType.DELETE_APP_ACCOUNT), + + /** + * 添加应用角色 + */ + SAVE_APP_PERMISSION_ROLE(AppEventType.SAVE_APP_PERMISSION_ROLE), + + /** + * 修改应用角色 + */ + UPDATE_APP_PERMISSION_ROLE(AppEventType.UPDATE_APP_PERMISSION_ROLE), + + /** + * 删除应用角色 + */ + DELETE_APP_PERMISSION_ROLE(AppEventType.DELETE_APP_PERMISSION_ROLE); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + /** + * 用户类型 + */ + private final List userTypes; + /** + * 归属资源 + */ + private final Resource resource; + + EventType(Type type) { + this.code = type.getCode(); + this.desc = type.getName(); + this.resource = type.getResource(); + this.userTypes = type.getUserTypes(); + } + + /** + * 获取审计类型 + * + * @param code {@link String} + * @return {@link EventType} + */ + @EnumConvert + public static EventType getType(String code) { + EventType[] values = values(); + for (EventType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/TargetType.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/TargetType.java new file mode 100644 index 00000000..59a1de32 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/TargetType.java @@ -0,0 +1,145 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +import lombok.Getter; + +/** + * 目标类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/10/27 23:46 + */ +@Getter +public enum TargetType { + + /** + * 用户 + */ + USER("user", "用户"), + + /** + * 用户详情 + */ + USER_DETAIL("user_detail", "用户详情"), + + /** + * 用户组 + */ + USER_GROUP("user_group", "用户组"), + + /** + * 用户组成员 + */ + USER_GROUP_MEMBER("user_group_member", "用户组成员"), + + /** + * 身份源 + */ + IDENTITY_SOURCE("identity_source", "身份源"), + + /** + * 组织机构 + */ + ORGANIZATION("organization", "组织机构"), + /** + * 应用 + */ + APPLICATION("application", "应用"), + + /** + * 应用账户 + */ + APPLICATION_ACCOUNT("application_account", "应用账户"), + + /** + * 会话管理 + */ + SESSION("session", "会话管理"), + + /** + * 应用权限 + */ + APP_PERMISSION_RESOURCE("app_permission_resource", "应用权限"), + + /** + * 应用权限策略 + */ + APP_PERMISSION_POLICY("app_permission_policy", "应用权限策略"), + + /** + * 应用权限策略 + */ + APP_PERMISSION_ROLE("app_permission_role", "应用权限角色"), + + /** + * 管理员 + */ + ADMINISTRATOR("administrator", "管理员"), + + /** + * 邮件模版 + */ + MAIL_TEMPLATE("mail_template", "邮件模版"), + + /** + * 身份认证提供商 + */ + IDENTITY_PROVIDER("identity_provider", "身份认证提供商"), + + /** + * 控制台 + */ + CONSOLE("console", "控制台"), + + /** + * 门户端 + */ + PORTAL("portal", "门户端"); + + @JsonValue + private final String code; + private final String desc; + + TargetType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link EventType} + */ + @EnumConvert + public static TargetType getType(String code) { + TargetType[] values = values(); + for (TargetType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/converter/AuditTypeConverter.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/converter/AuditTypeConverter.java new file mode 100644 index 00000000..d7c0b3a7 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/converter/AuditTypeConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.audit.enums.EventType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/10 23:02 + */ +@Converter(autoApply = true) +public class AuditTypeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(EventType attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getCode(); + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public EventType convertToEntityAttribute(String dbData) { + return EventType.getType(dbData); + } +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/converter/EventStatusConverter.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/converter/EventStatusConverter.java new file mode 100644 index 00000000..18cf27fd --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/converter/EventStatusConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.audit.enums.EventStatus; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/10 23:02 + */ +@Converter(autoApply = true) +public class EventStatusConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(EventStatus attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getCode(); + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public EventStatus convertToEntityAttribute(String dbData) { + return EventStatus.getType(dbData); + } +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/converter/TargetTypeConverter.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/converter/TargetTypeConverter.java new file mode 100644 index 00000000..86c83f12 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/enums/converter/TargetTypeConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.audit.enums.TargetType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/10 23:02 + */ +@Converter(autoApply = true) +public class TargetTypeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(TargetType attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getCode(); + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public TargetType convertToEntityAttribute(String dbData) { + return TargetType.getType(dbData); + } +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/event/AuditEvent.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/AuditEvent.java new file mode 100644 index 00000000..916bbe0c --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/AuditEvent.java @@ -0,0 +1,59 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.event; + +import java.io.Serial; +import java.util.*; + +import org.springframework.context.ApplicationEvent; + +import cn.topiam.employee.audit.entity.*; + +import lombok.Getter; + +/** + * 审计事件 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/8/1 21:56 + */ +@Getter +public class AuditEvent extends ApplicationEvent { + @Serial + private static final long serialVersionUID = 3425943796938543659L; + + private final String requestId; + private final String sessionId; + private final Actor actor; + private final Event event; + private final List target; + private final UserAgent userAgent; + private final GeoLocation geoLocationModal; + + public AuditEvent(String requestId, String sessionId, Actor actor, Event event, + UserAgent userAgent, GeoLocation geoLocation, List targets) { + super(requestId); + this.requestId = requestId; + this.sessionId = sessionId; + this.actor = actor; + this.event = event; + this.target = targets; + this.userAgent = userAgent; + this.geoLocationModal = geoLocation; + } +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/event/AuditEventListener.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/AuditEventListener.java new file mode 100644 index 00000000..6a6eecd3 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/AuditEventListener.java @@ -0,0 +1,125 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.event; + +import java.time.LocalDate; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; +import java.util.List; +import java.util.Objects; + +import org.springframework.context.ApplicationListener; +import org.springframework.data.elasticsearch.core.ElasticsearchOperations; +import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; +import org.springframework.lang.NonNull; +import org.springframework.stereotype.Component; + +import cn.topiam.employee.audit.entity.*; +import cn.topiam.employee.audit.repository.*; +import cn.topiam.employee.core.configuration.EiamSupportProperties; +import static cn.topiam.employee.common.constants.AuditConstants.getAuditIndexPrefix; +import static cn.topiam.employee.support.constant.EiamConstants.DEFAULT_DATE_FORMATTER_PATTERN; + +/** + * 事件监听 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/12 22:49 + */ +@Component +public class AuditEventListener implements ApplicationListener { + + /** + * onApplicationEvent + * + * @param auditEvent {@link AuditEvent} + */ + @Override + public void onApplicationEvent(@NonNull AuditEvent auditEvent) { + Event event = auditEvent.getEvent(); + Actor actor = auditEvent.getActor(); + List target = auditEvent.getTarget(); + GeoLocation geoLocation = auditEvent.getGeoLocationModal(); + UserAgent userAgent = auditEvent.getUserAgent(); + //保存数据库 + AuditEntity entity = new AuditEntity(); + try { + entity.setRequestId(auditEvent.getRequestId()); + entity.setSessionId(auditEvent.getSessionId()); + //事件 + entity.setEventType(event.getType()); + entity.setEventContent(event.getContent()); + entity.setEventParam(event.getParam()); + entity.setEventStatus(event.getStatus()); + entity.setEventResult(event.getResult()); + entity.setEventTime(event.getTime()); + //操作目标 + entity.setTargets(target); + entity.setGeoLocation(geoLocation); + entity.setUserAgent(userAgent); + entity.setActorId(actor.getId()); + entity.setActorType(actor.getType()); + auditRepository.save(entity); + } catch (Exception ignored) { + } finally { + if (!Objects.isNull(entity.getId())) { + //保存 Elasticsearch + AuditElasticSearchEntity audit = AuditElasticSearchEntity.builder().build(); + audit.setRequestId(auditEvent.getRequestId()); + audit.setSessionId(auditEvent.getSessionId()); + audit.setId(entity.getId().toString()); + audit.setEvent(event); + audit.setTargets(target); + audit.setGeoLocation(geoLocation); + audit.setUserAgent(userAgent); + audit.setActor(actor); + audit.setTimestamp( + entity.getCreateTime().atZone(ZoneId.systemDefault()).toInstant()); + String auditIndex = getAuditIndexPrefix(eiamSupportProperties.getDemo().isOpen()) + + LocalDate.now().format(DateTimeFormatter + .ofPattern(DEFAULT_DATE_FORMATTER_PATTERN)); + elasticsearchOperations.save(audit, IndexCoordinates.of(auditIndex)); + } + } + + } + + /** + * EiamSupportProperties + */ + private final EiamSupportProperties eiamSupportProperties; + + /** + * AuditRepository + */ + private final AuditRepository auditRepository; + + /** + * ElasticsearchOperations + */ + private final ElasticsearchOperations elasticsearchOperations; + + public AuditEventListener(EiamSupportProperties eiamSupportProperties, + AuditRepository auditRepository, + ElasticsearchOperations elasticsearchOperations) { + this.eiamSupportProperties = eiamSupportProperties; + this.auditRepository = auditRepository; + this.elasticsearchOperations = elasticsearchOperations; + } + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/event/AuditEventPublish.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/AuditEventPublish.java new file mode 100644 index 00000000..1efc970c --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/AuditEventPublish.java @@ -0,0 +1,327 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.event; + +import java.time.Instant; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.ApplicationEventPublisher; +import org.springframework.data.elasticsearch.core.geo.GeoPoint; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContext; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.stereotype.Component; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.audit.entity.*; +import cn.topiam.employee.audit.enums.EventStatus; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.enums.UserType; +import cn.topiam.employee.common.geo.GeoLocationService; +import cn.topiam.employee.core.security.userdetails.UserDetails; +import cn.topiam.employee.support.context.ServletContextHelp; +import cn.topiam.employee.support.trace.TraceUtils; +import cn.topiam.employee.support.util.IpUtils; +import cn.topiam.employee.support.web.useragent.UserAgentUtils; + +import lombok.AllArgsConstructor; +import static cn.topiam.employee.core.logger.LogAspect.replaceBlank; + +/** + * 发布审计事件 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/8/1 21:04 + */ +@Component +@AllArgsConstructor +public class AuditEventPublish { + + private final Logger logger = LoggerFactory.getLogger(AuditEventPublish.class); + + /** + * 发布 审计事件 + * + * @param eventType {@link EventType} + */ + public void publish(EventType eventType, String content, EventStatus eventStatus) { + //@formatter:off + //封装操作事件 + Event event = Event.builder() + .type(eventType) + .time(Instant.now()) + .content(content) + .status(eventStatus).build(); + //封装地理位置 + GeoLocation geoLocationModal = getGeoLocation(); + //封装用户代理 + UserAgent userAgent = getUserAgent(); + //封装操作人 + Actor actor = getActor(); + //Publish AuditEvent + applicationEventPublisher.publishEvent(new AuditEvent(TraceUtils.get(), ServletContextHelp.getSession().getId(), actor, event, userAgent, geoLocationModal, null)); + //@formatter:on + } + + /** + * 发布 审计事件 + * + * @param eventType {@link EventType} + */ + public void publish(EventType eventType, Authentication authentication, EventStatus eventStatus, + List targets) { + //@formatter:off + //封装操作事件 + Event event = Event.builder() + .type(eventType) + .time(Instant.now()) + .status(eventStatus).build(); + if (authentication.getPrincipal() instanceof UserDetails){ + String username = ((UserDetails) authentication.getPrincipal()).getUsername(); + event.setContent(username+":"+event.getType().getDesc()); + } + //封装地理位置 + GeoLocation geoLocationModal = getGeoLocation(); + //封装用户代理 + UserAgent userAgent = getUserAgent(); + //封装操作人 + Actor actor = getActor(authentication); + //Publish AuditEvent + applicationEventPublisher.publishEvent(new AuditEvent(TraceUtils.get(), ServletContextHelp.getSession().getId(), actor, event, userAgent, geoLocationModal, targets)); + //@formatter:on + } + + /** + * 发布 审计事件 + * + * @param eventType {@link EventType} + */ + public void publish(EventType eventType, String content, Actor actor, EventStatus eventStatus) { + //@formatter:off + //封装操作事件 + Event event = Event.builder() + .type(eventType) + .time(Instant.now()) + .content(content) + .status(eventStatus).build(); + //封装地理位置 + GeoLocation geoLocationModal = getGeoLocation(); + //封装用户代理 + UserAgent userAgent = getUserAgent(); + //Publish AuditEvent + applicationEventPublisher.publishEvent(new AuditEvent(TraceUtils.get(), ServletContextHelp.getSession().getId(), actor, event, userAgent, geoLocationModal, null)); + //@formatter:on + } + + /** + * 发布 审计事件 + * + * @param eventType {@link EventType} + */ + public void publish(EventType eventType, Map parameters, String content, + List target, String result, EventStatus eventStatus) { + //@formatter:off + //封装操作事件 + Event event = Event.builder() + .type(eventType) + .time(Instant.now()) + .status(eventStatus).build(); + if (!Objects.isNull(parameters)){ + try { + event.setParam(replaceBlank(JSONObject.toJSONString(parameters))); + } catch (Exception e) { + event.setParam(parameters.toString()); + } + } + //描述 + if (StringUtils.isNotBlank(content)){ + event.setContent(content); + } + //事件结果 + if (StringUtils.isNotBlank(result)){ + event.setResult(result); + } + //封装地理位置 + GeoLocation geoLocationModal = getGeoLocation(); + //封装用户代理 + UserAgent userAgent = getUserAgent(); + //封装操作人 + Actor actor = getActor(); + //Publish AuditEvent + applicationEventPublisher.publishEvent(new AuditEvent(TraceUtils.get(), ServletContextHelp.getSession().getId(), actor, event, userAgent, geoLocationModal, target)); + //@formatter:on + } + + /** + * 发布 审计事件 + * + * @param eventType {@link EventType} + */ + public void publish(EventType eventType, List target, String result, + EventStatus eventStatus) { + //@formatter:off + //封装操作事件 + Event event = Event.builder() + .type(eventType) + .time(Instant.now()) + .status(eventStatus).build(); + //事件结果 + event.setResult(result); + //封装地理位置 + GeoLocation geoLocationModal = getGeoLocation(); + //封装用户代理 + UserAgent userAgent = getUserAgent(); + //封装操作人 + Actor actor = getActor(); + //Publish AuditEvent + applicationEventPublisher.publishEvent(new AuditEvent(TraceUtils.get(), ServletContextHelp.getSession().getId(), actor, event, userAgent, geoLocationModal, target)); + //@formatter:on + } + + /** + * 封装操作者 + * @return {@link Actor} + */ + private Actor getActor() { + //@formatter:off + SecurityContext securityContext = SecurityContextHolder.getContext(); + Authentication authentication = securityContext.getAuthentication(); + return Actor.builder() + .id(getActorId(authentication)) + .type(getActorType(authentication)) + .build(); + //@formatter:on + } + + /** + * 封装操作者 + * @param authentication {@link Authentication} + * @return {@link Actor} + */ + private Actor getActor(Authentication authentication) { + //@formatter:off + return Actor.builder() + .id(getActorId(authentication)) + .type(getActorType(authentication)) + .build(); + //@formatter:on + } + + private String getActorId(Authentication authentication) { + //@formatter:off + Object principal = authentication.getPrincipal(); + if (principal instanceof UserDetails) { + return ((UserDetails) principal).getId(); + } + return null; + //@formatter:on + } + + /** + * 获取行动者类型 + * + * @param authentication {@link Authentication} + * @return {@link UserType} + */ + private UserType getActorType(Authentication authentication) { + //@formatter:off + Object principal = authentication.getPrincipal(); + if (principal instanceof UserDetails) { + return ((UserDetails) principal).getUserType(); + } + return null; + //@formatter:on + } + + /** + * 获取用户代理 + * + * @return {@link UserAgent} + */ + private UserAgent getUserAgent() { + //@formatter:off + HttpServletRequest request = ServletContextHelp.getRequest(); + cn.topiam.employee.support.web.useragent.UserAgent ua = UserAgentUtils.getUserAgent(request); + return UserAgent.builder() + .browser(ua.getBrowser()) + .browserType(ua.getBrowserType()) + .browserMajorVersion(ua.getBrowserMajorVersion()) + .platform(ua.getPlatform()) + .platformVersion(ua.getPlatformVersion()) + .deviceType(ua.getDeviceType()) + .build(); + //@formatter:on + } + + /** + * 获取地理位置 + * + * @return {@link GeoLocation} + */ + private GeoLocation getGeoLocation() { + //@formatter:off + HttpServletRequest request = ServletContextHelp.getRequest(); + String ip = IpUtils.getIpAddr(request); + cn.topiam.employee.common.geo.GeoLocation geoLocation = geoLocationService.getGeoLocation(ip); + if (Objects.isNull(geoLocation)){ + return null; + } + if (IpUtils.isInternalIp(ip)){ + return GeoLocation.builder() + .ip(geoLocation.getIp()) + .provider(geoLocation.getProvider()) + .build(); + } + GeoPoint geoPoint = null; + if (!Objects.isNull(geoLocation.getLatitude()) && !Objects.isNull(geoLocation.getLongitude())) { + geoPoint = new GeoPoint(geoLocation.getLatitude(), geoLocation.getLongitude()); + } + return GeoLocation.builder() + .ip(ip) + .continentCode(geoLocation.getContinentCode()) + .continentName(geoLocation.getContinentName()) + .countryCode(geoLocation.getCountryCode()) + .countryName(geoLocation.getCountryName()) + .provinceCode(geoLocation.getProvinceCode()) + .provinceName(geoLocation.getProvinceName()) + .cityCode(geoLocation.getCityCode()) + .cityName(geoLocation.getCityName()) + .point(geoPoint) + .provider(geoLocation.getProvider()) + .build(); + //@formatter:on + } + + /** + * ApplicationEventPublisher + */ + private final ApplicationEventPublisher applicationEventPublisher; + /** + * 地理位置 + */ + private final GeoLocationService geoLocationService; + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/AccountEventType.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/AccountEventType.java new file mode 100644 index 00000000..8f02c2c3 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/AccountEventType.java @@ -0,0 +1,213 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.event.type; + +import java.util.List; + +import cn.topiam.employee.common.enums.UserType; +import static cn.topiam.employee.audit.event.type.Resource.ACCOUNT_RESOURCE; + +/** + * 账户资源 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/24 22:58 + */ +public class AccountEventType { + + /** + * 创建用户 + */ + public static Type CREATE_USER = new Type("eiam:event:account:create_user", + "创建用户", ACCOUNT_RESOURCE, List.of(UserType.ADMIN)); + /** + * 编辑用户 + */ + public static Type UPDATE_USER = new Type("eiam:event:account:update_user", + "修改用户", ACCOUNT_RESOURCE, List.of(UserType.ADMIN)); + /** + * 删除用户 + */ + public static Type DELETE_USER = new Type("eiam:event:account:delete_user", + "删除用户", ACCOUNT_RESOURCE, List.of(UserType.ADMIN)); + /** + * 禁用用户 + */ + public static Type DISABLE_USER = new Type("eiam:event:account:disabled_user", + "禁用用户", ACCOUNT_RESOURCE, List.of(UserType.ADMIN)); + /** + * 启用用户 + */ + public static Type ENABLE_USER = new Type("eiam:event:account:enabled_user", + "启用用户", ACCOUNT_RESOURCE, List.of(UserType.ADMIN)); + /** + * 创建组织 + */ + public static Type CREATE_ORG = new Type( + "eiam:event:account:create_organization", "创建组织", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); + /** + * 编辑组织 + */ + public static Type UPDATE_ORG = new Type( + "eiam:event:account:update_organization", "修改组织", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); + /** + * 删除组织 + */ + public static Type DELETE_ORGANIZATION = new Type( + "eiam:event:account:delete_organization", "删除组织", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 移动组织 + */ + public static Type MOVE_ORGANIZATION = new Type("eiam:event:account:move_organization", + "移动组织", ACCOUNT_RESOURCE, List.of(UserType.ADMIN)); + /** + * 用户转岗到其他组织 + */ + public static Type USER_TRANSFER_ORG = new Type("eiam:event:account:transfer_user", + "用户转岗", ACCOUNT_RESOURCE, List.of(UserType.ADMIN)); + /** + * 从组织中移除用户 + */ + public static Type ORG_REMOVE_USER = new Type( + "eiam:event:account:delete_user_organization", "移除组织用户", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 添加用户到组织 + */ + public static Type USER_ADD_ORG = new Type( + "eiam:event:account:user_add_organization", "组织添加用户", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 绑定账号 + */ + public static Type BIND_IDP_USER = new Type("eiam:event:account:bind_idp_user", + "绑定 IDP", ACCOUNT_RESOURCE, List.of(UserType.ADMIN, UserType.USER)); + /** + * 解绑账号 + */ + public static Type UNBIND_IDP_USER = new Type("eiam:event:account:unbind_idp_user", + "解绑 IDP", ACCOUNT_RESOURCE, List.of(UserType.ADMIN, UserType.USER)); + /** + * 用户应用解绑 + */ + public static Type UNBIND_APPLICATION_USER = new Type( + "eiam:event:account:unbind_application_user", "解绑应用账户", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); + /** + * 用户注册 + */ + public static Type USER_REGISTER = new Type("eiam:event:account:user_register", + "用户注册", ACCOUNT_RESOURCE, List.of(UserType.USER)); + + /** + * 修改账户信息 + */ + public static Type MODIFY_ACCOUNT_INFO = new Type( + "eiam:event:account:update_account_info", "修改账户", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN, UserType.USER)); + /** + * 修改邮箱 + */ + public static Type MODIFY_USER_EMAIL = new Type("eiam:event:account:update_email", + "修改邮箱", ACCOUNT_RESOURCE, List.of(UserType.ADMIN, UserType.USER)); + /** + * 修改手机号 + */ + public static Type MODIFY_USER_PHONE = new Type("eiam:event:account:update_phone", + "修改手机号", ACCOUNT_RESOURCE, List.of(UserType.ADMIN, UserType.USER)); + /** + * 修改密码 + */ + public static Type MODIFY_USER_PASSWORD = new Type("eiam:event:account:update_password", + "修改密码", ACCOUNT_RESOURCE, List.of(UserType.ADMIN, UserType.USER)); + + /** + * 创建用户组 + */ + public static Type CREATE_USER_GROUP = new Type("eiam:event:account:create_user_group", + "创建用户组", ACCOUNT_RESOURCE, List.of(UserType.ADMIN)); + /** + * 编辑用户组 + */ + public static Type UPDATE_USER_GROUP = new Type("eiam:event:account:update_user_group", + "修改用户组", ACCOUNT_RESOURCE, List.of(UserType.ADMIN)); + /** + * 删除用户组 + */ + public static Type DELETE_USER_GROUP = new Type("eiam:event:account:delete_user_group", + "删除用户组", ACCOUNT_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 添加用户组成员 + */ + public static Type ADD_USER_GROUP_MEMBER = new Type( + "eiam:event:account:add_user_group_member", "添加用户组成员", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); + /** + * 移除用户组成员 + */ + public static Type REMOVE_USER_GROUP_MEMBER = new Type( + "eiam:event:account:remove_user_group_member", "移除用户组成员", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 创建身份源 + */ + public static Type CREATE_IDENTITY_RESOURCE = new Type( + "eiam:event:account:create_identity_resource", "创建身份源", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); + /** + * 编辑身份源 + */ + public static Type UPDATE_IDENTITY_RESOURCE = new Type( + "eiam:event:account:update_identity_resource", "修改身份源", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); + /** + * 删除身份源 + */ + public static Type DELETE_IDENTITY_RESOURCE = new Type( + "eiam:event:account:delete_identity_resource", "删除身份源", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 启用身份源 + */ + public static Type ENABLE_IDENTITY_RESOURCE = new Type( + "eiam:event:account:enable_identity_resource", "启用身份源", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 禁用身份源 + */ + public static Type DISABLE_IDENTITY_RESOURCE = new Type( + "eiam:event:account:disable_identity_resource", "禁用身份源", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 禁用身份源 + */ + public static Type IDENTITY_RESOURCE_SYNC = new Type( + "eiam:event:account:identity_resource_sync", "身份源同步", ACCOUNT_RESOURCE, + List.of(UserType.ADMIN)); +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/AppEventType.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/AppEventType.java new file mode 100644 index 00000000..5b1c8c9f --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/AppEventType.java @@ -0,0 +1,165 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.event.type; + +import java.util.List; + +import cn.topiam.employee.common.enums.UserType; +import static cn.topiam.employee.audit.event.type.Resource.APP_RESOURCE; + +/** + * 应用资源 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/24 23:00 + */ +public class AppEventType { + /** + * 单点登录 + */ + public static Type APP_SSO = new Type("eiam:event:app:sso", "单点登录", + APP_RESOURCE, List.of(UserType.USER)); + /** + * 退出应用 + */ + public static Type SIGN_OUT_APP = new Type("eiam:event:app:login", "退出应用", + APP_RESOURCE, List.of(UserType.USER)); + /** + * 添加应用 + */ + public static Type ADD_APP = new Type("eiam:event:app:create", "添加应用", + APP_RESOURCE, List.of(UserType.ADMIN)); + /** + * 启用应用 + */ + public static Type ENABLE_APP = new Type("eiam:event:app:enabled", "启用应用", + APP_RESOURCE, List.of(UserType.ADMIN)); + /** + * 禁用应用 + */ + public static Type DISABLE_APP = new Type("eiam:event:app:disabled", "禁用应用", + APP_RESOURCE, List.of(UserType.ADMIN)); + /** + * 编辑应用 + */ + public static Type UPDATE_APP = new Type("eiam:event:app:update", "修改应用", + APP_RESOURCE, List.of(UserType.ADMIN)); + /** + * 保存应用配置 + */ + public static Type SAVE_APP_CONFIG = new Type("eiam:event:app:save:config", + "保存应用配置", APP_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 删除应用 + */ + public static Type DELETE_APP = new Type("eiam:event:app:delete", "删除应用", + APP_RESOURCE, List.of(UserType.ADMIN)); + /** + * 应用访问授权 + */ + public static Type APP_ACCESS_POLICY = new Type("eiam:event:app:access_policy", + "应用访问授权", APP_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 删除访问授权 + */ + public static Type APP_DELETE_ACCESS_POLICY = new Type( + "eiam:event:app:delete_access_policy", "应用访问授权", APP_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 添加应用账户 + */ + public static Type ADD_APP_ACCOUNT = new Type("eiam:event:app:add_app_account", + "添加应用账户", APP_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 删除应用账户 + */ + public static Type DELETE_APP_ACCOUNT = new Type( + "eiam:event:app:delete_app_account", "删除应用账户", APP_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 保存SSO配置 + */ + public static Type SAVE_SSO_CONFIG = new Type("eiam:event:app:save_sso_config", + "保存SSO配置", APP_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 保存应用权限资源 + */ + public static Type SAVE_APP_PERMISSION_RESOURCE = new Type( + "eiam:event:app:save_app_permission_resource", "保存应用权限资源", APP_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 修改应用权限资源 + */ + public static Type UPDATE_APP_PERMISSION_RESOURCE = new Type( + "eiam:event:app:update_app_permission_resource", "修改应用权限资源", APP_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 删除应用权限资源 + */ + public static Type DELETE_APP_PERMISSION_RESOURCE = new Type( + "eiam:event:app:delete_app_permission_resource", "删除应用权限资源", APP_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 启用应用权限资源 + */ + public static Type ENABLE_APP_PERMISSION_RESOURCE = new Type( + "eiam:event:app:enable_app_permission_resource", "启用应用权限资源", APP_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 禁用应用权限资源 + */ + public static Type DISABLE_APP_PERMISSION_RESOURCE = new Type( + "eiam:event:app:disable_app_permission_resource", "禁用应用权限资源", APP_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 删除用户身份提供商绑定 + */ + public static Type DELETE_USER_IDP_BIND = new Type( + "eiam:event:app:delete_user_idp_bind", "删除用户身份提供商绑定", APP_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 添加应用角色 + */ + public static Type SAVE_APP_PERMISSION_ROLE = new Type( + "eiam:event:app:save_app_permission_role", "添加应用角色", APP_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 修改应用角色 + */ + public static Type UPDATE_APP_PERMISSION_ROLE = new Type( + "eiam:event:app:update_app_permission_role", "修改应用角色", APP_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 删除应用角色 + */ + public static Type DELETE_APP_PERMISSION_ROLE = new Type( + "eiam:event:app:delete_app_permission_role", "删除应用角色", APP_RESOURCE, + List.of(UserType.ADMIN)); + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/AuthenticationEventType.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/AuthenticationEventType.java new file mode 100644 index 00000000..111eedd5 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/AuthenticationEventType.java @@ -0,0 +1,82 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.event.type; + +import java.util.List; + +import cn.topiam.employee.common.enums.UserType; +import static cn.topiam.employee.audit.event.type.Resource.AUTHENTICATION_RESOURCE; + +/** + * 认证资源 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/24 22:59 + */ +public class AuthenticationEventType { + + /** + * 添加身份提供商 + */ + public static Type ADD_IDP = new Type("eiam:event:idp_add", "添加身份提供商", + AUTHENTICATION_RESOURCE, List.of(UserType.ADMIN)); + /** + * 编辑身份提供商 + */ + public static Type UPDATE_IDP = new Type("eiam:event:idp_update", "修改身份提供商", + AUTHENTICATION_RESOURCE, List.of(UserType.ADMIN)); + /** + * 启用身份提供商 + */ + public static Type ENABLE_IDP = new Type("eiam:event:idp_enabled", "启用身份提供商", + AUTHENTICATION_RESOURCE, List.of(UserType.ADMIN)); + /** + * 禁用身份提供商 + */ + public static Type DISABLE_IDP = new Type("eiam:event:idp_disabled", "禁用身份提供商", + AUTHENTICATION_RESOURCE, List.of(UserType.ADMIN)); + /** + * 删除身份提供商 + */ + public static Type DELETE_IDP = new Type("eiam:event:idp_delete", "删除身份提供商", + AUTHENTICATION_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 登录控制台 + */ + public static Type LOGIN_CONSOLE = new Type("eiam:event:login:console", "登录控制台", + AUTHENTICATION_RESOURCE, List.of(UserType.ADMIN, UserType.USER)); + + /** + * 登录门户 + */ + public static Type LOGIN_PORTAL = new Type("eiam:event:login:portal", "登录门户", + AUTHENTICATION_RESOURCE, List.of(UserType.ADMIN, UserType.USER)); + + /** + * 退出控制台 + */ + public static Type LOGOUT_CONSOLE = new Type("eiam:event:logout:console", "退出控制台", + AUTHENTICATION_RESOURCE, List.of(UserType.ADMIN, UserType.USER)); + + /** + * 退出门户 + */ + public static Type LOGOUT_PORTAL = new Type("eiam:event:logout:portal", "退出门户", + AUTHENTICATION_RESOURCE, List.of(UserType.ADMIN, UserType.USER)); +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/OtherEventType.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/OtherEventType.java new file mode 100644 index 00000000..b8b557a7 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/OtherEventType.java @@ -0,0 +1,46 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.event.type; + +import java.util.List; + +import cn.topiam.employee.common.enums.UserType; +import static cn.topiam.employee.audit.event.type.Resource.OTHER_RESOURCE; + +/** + * 其他设置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/24 22:58 + */ +public class OtherEventType { + + /** + * 下线会话 + */ + public static Type DOWN_LINE_SESSION = new Type("eiam:event:other:down_line_session", + "下线会话", OTHER_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 批量下线会话 + */ + public static Type BATCH_DOWN_LINE_SESSION = new Type( + "eiam:event:other:batch_down_line_session", "批量下线会话", OTHER_RESOURCE, + List.of(UserType.ADMIN)); + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/Resource.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/Resource.java new file mode 100644 index 00000000..0340c173 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/Resource.java @@ -0,0 +1,75 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.event.type; + +import lombok.AllArgsConstructor; +import lombok.Data; + +/** + * 审计资源 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/29 21:07 + */ +@Data +@AllArgsConstructor +public class Resource { + /** + * 资源编码 + */ + private String code; + /** + * 资源名称 + */ + private String name; + + @Override + public String toString() { + return String.format("[%s](%s)", name, code); + } + + /** + * 账户 + */ + public static Resource ACCOUNT_RESOURCE = new Resource("eiam:event:resource:account", + "账户管理"); + + /** + * 认证 + */ + public static Resource AUTHENTICATION_RESOURCE = new Resource( + "eiam:event:resource:authentication", "认证管理"); + /** + * 应用 + */ + public static Resource APP_RESOURCE = new Resource("eiam:event:resource:application", + "应用管理"); + + /** + * 其他管理 + */ + public static Resource OTHER_RESOURCE = new Resource("eiam:event:resource:other", + "其他管理"); + + /** + * 系统设置 + */ + public static Resource SETTING_RESOURCE = new Resource("eiam:event:resource:settings", + "系统设置"); + +} \ No newline at end of file diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/SettingEventType.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/SettingEventType.java new file mode 100644 index 00000000..912ea646 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/SettingEventType.java @@ -0,0 +1,314 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.event.type; + +import java.util.List; + +import cn.topiam.employee.common.enums.UserType; +import static cn.topiam.employee.audit.event.type.Resource.SETTING_RESOURCE; + +/** + * 系统设置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/24 22:58 + */ +public class SettingEventType { + + /** + * 保存安全基础设置 + */ + public static Type SAVE_LOGIN_SECURITY_BASIC_SETTINGS = new Type( + "eiam:event:setting:save_security_basic", "保存安全基础设置", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 密码策略 + */ + public static Type SAVE_PASSWORD_POLICY_SETTINGS = new Type( + "eiam:event:setting:save_password_policy", "保存密码策略", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 保存多因素认证 + */ + public static Type SAVE_MFA_SETTINGS = new Type( + "eiam:event:setting:save_mfa", "保存多因素认证", SETTING_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 保存行为验证码 + */ + public static Type SAVE_CAPTCHA_PROVIDER = new Type( + "eiam:event:setting:save_captcha_provider", "保存行为验证码", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 保存行为验证码 + */ + public static Type OFF_CAPTCHA_PROVIDER = new Type( + "eiam:event:setting:off_captcha_provider", "禁用行为验证码", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 添加管理员 + */ + public static Type ADD_ADMINISTRATOR = new Type( + "eiam:event:setting:add_administrator", "添加管理员", SETTING_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 删除管理员 + */ + public static Type DELETE_ADMINISTRATOR = new Type( + "eiam:event:setting:delete_administrator", "删除管理员", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 修改管理员 + */ + public static Type UPDATE_ADMINISTRATOR = new Type( + "eiam:event:setting:update_administrator", "修改管理员", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 启用管理员 + */ + public static Type ENABLE_ADMINISTRATOR = new Type( + "eiam:event:setting:enable_administrator", "启用管理员", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 禁用管理员 + */ + public static Type DISABLE_ADMINISTRATOR = new Type( + "eiam:event:setting:disable_administrator", "禁用管理员", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + /** + * 重置管理员密码 + */ + public static Type RESET_ADMINISTRATOR_PASSWORD = new Type( + "eiam:event:setting:reset_administrator_password", "重置管理员密码", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 开启自定义修改密码邮件模板 + */ + public static Type ON_CUSTOMIZE_CHANGE_PASSWORD_MAIL = new Type( + "eiam:event:setting:on_customize_change_password_mail", "开启自定义修改密码邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 开启自定义重置密码邮件模板 + */ + public static Type ON_CUSTOMIZE_RESET_PASSWORD_MAIL = new Type( + "eiam:event:setting:on_customize_reset_password_mail", "开启自定义重置密码邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 开启自定义确认重置密码邮件模板 + */ + public static Type ON_CUSTOMIZE_CONFIRM_RESET_PASSWORD_MAIL = new Type( + "eiam:event:setting:on_customize_confirm_reset_password_mail", "开启自定义确认重置密码邮件模板", + SETTING_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 开启自定义验证邮件模板 + */ + public static Type ON_CUSTOMIZE_VERIFY_MAIL = new Type( + "eiam:event:setting:on_customize_verify_mail", "开启自定义验证邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 开启自定义欢迎邮件模板 + */ + public static Type ON_CUSTOMIZE_WELCOME_MAIL = new Type( + "eiam:event:setting:on_customize_welcome_mail", "开启自定义欢迎邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 开启自定义修改绑定邮件模板 + */ + public static Type ON_CUSTOMIZE_MODIFY_BINDING_MAIL = new Type( + "eiam:event:setting:on_customize_modify_binding:_mail", "开启自定义修改绑定邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 关闭自定义修改密码邮件模板 + */ + public static Type OFF_CUSTOMIZE_CHANGE_PASSWORD_MAIL = new Type( + "eiam:event:setting:off_customize_change_password_mail", "关闭自定义修改密码邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 关闭自定义重置密码邮件模板 + */ + public static Type OFF_CUSTOMIZE_RESET_PASSWORD_MAIL = new Type( + "eiam:event:setting:off_customize_reset_password_mail", "关闭自定义重置密码邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 关闭自定义确认重置密码邮件模板 + */ + public static Type OFF_CUSTOMIZE_CONFIRM_RESET_PASSWORD_MAIL = new Type( + "eiam:event:setting:off_customize_confirm_reset_password_mail", "关闭自定义确认重置密码邮件模板", + SETTING_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 关闭自定义验证邮件模板 + */ + public static Type OFF_CUSTOMIZE_VERIFY_MAIL = new Type( + "eiam:event:setting:off_customize_verify_mail", "关闭自定义验证邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 关闭自定义欢迎邮件模板 + */ + public static Type OFF_CUSTOMIZE_WELCOME_MAIL = new Type( + "eiam:event:setting:off_customize_welcome_mail", "关闭自定义欢迎邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 关闭自定义修改绑定邮件模板 + */ + public static Type OFF_CUSTOMIZE_MODIFY_BINDING_MAIL = new Type( + "eiam:event:setting:off_customize_modify_binding_mail", "关闭自定义修改绑定邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 保存自定义修改密码邮件模板 + */ + public static Type SAVE_CUSTOMIZE_CHANGE_PASSWORD_MAIL = new Type( + "eiam:event:setting:save_customize_change_password_mail", "保存自定义修改密码邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 保存自定义重置密码邮件模板 + */ + public static Type SAVE_CUSTOMIZE_RESET_PASSWORD_MAIL = new Type( + "eiam:event:setting:save_customize_reset_password_mail", "保存自定义重置密码邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 保存自定义确认重置密码邮件模板 + */ + public static Type SAVE_CUSTOMIZE_CONFIRM_RESET_PASSWORD_MAIL = new Type( + "eiam:event:setting:save_customize_confirm_reset_password_mail", "保存自定义确认重置密码邮件模板", + SETTING_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 保存自定义验证邮件模板 + */ + public static Type SAVE_CUSTOMIZE_VERIFY_MAIL = new Type( + "eiam:event:setting:save_customize_verify_mail", "保存自定义验证邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 保存自定义欢迎邮件模板 + */ + public static Type SAVE_CUSTOMIZE_WELCOME_MAIL = new Type( + "eiam:event:setting:save_customize_welcome_mail", "保存自定义欢迎邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 保存自定义修改绑定邮件模板 + */ + public static Type SAVE_CUSTOMIZE_MODIFY_BINDING_MAIL = new Type( + "eiam:event:setting:save_customize_modify_binding_mail", "保存自定义修改绑定邮件模板", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 开启邮件服务 + */ + public static Type ON_MAIL_SERVICE = new Type( + "eiam:event:setting:on_mail_service", "开启邮件服务", SETTING_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 关闭邮件服务 + */ + public static Type OFF_MAIL_SERVICE = new Type( + "eiam:event:setting:off_mail_service", "关闭邮件服务", SETTING_RESOURCE, List.of(UserType.ADMIN)); + + /** + * 保存邮件服务 + */ + public static Type SAVE_MAIL_SERVICE = new Type( + "eiam:event:setting:save_mail_service", "保存邮件服务", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 开启短信验证服务 + */ + public static Type ON_SMS_SERVICE = new Type( + "eiam:event:setting:on_sms_verify_service", "开启短信验证服务", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 关闭短信验证服务 + */ + public static Type OFF_SMS_SERVICE = new Type( + "eiam:event:setting:off_sms_verify_service", "关闭短信验证服务", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 保存短信验证服务 + */ + public static Type SAVE_SMS_SERVICE = new Type( + "eiam:event:setting:save_sms_verify_service", "保存短信验证服务", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 开启存储服务 + */ + public static Type ON_STORAGE_SERVICE = new Type( + "eiam:event:setting:on_storage_service", "开启存储服务", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 关闭存储服务 + */ + public static Type OFF_STORAGE_SERVICE = new Type( + "eiam:event:setting:off_storage_service", "关闭存储服务", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 保存存储服务 + */ + public static Type SAVE_STORAGE_SERVICE = new Type( + "eiam:event:setting:save_storage_service", "保存存储服务", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 开启地理位置服务 + */ + public static Type ON_GEO_LOCATION_SERVICE = new Type( + "eiam:event:setting:on_geoip_service", "开启地理位置服务", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 关闭地理位置服务 + */ + public static Type OFF_GEO_LOCATION_SERVICE = new Type( + "eiam:event:setting:off_geoip_service", "关闭地理位置服务", SETTING_RESOURCE, + List.of(UserType.ADMIN)); + + /** + * 保存地理位置服务 + */ + public static Type SAVE_GEO_LOCATION_SERVICE = new Type( + "eiam:event:setting:save_geoip_service", "保存地理位置服务", SETTING_RESOURCE, + List.of(UserType.ADMIN)); +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/Type.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/Type.java new file mode 100644 index 00000000..5eea013e --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/event/type/Type.java @@ -0,0 +1,58 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.event.type; + +import java.util.List; + +import cn.topiam.employee.common.enums.UserType; + +import lombok.AllArgsConstructor; +import lombok.Data; + +/** + * 类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/24 23:06 + */ +@Data +@AllArgsConstructor +public class Type { + /** + * 编码 + */ + private String code; + /** + * 名称 + */ + private String name; + /** + * 资源 + */ + private Resource resource; + /** + * 用户类型 + */ + private List userTypes; + + @Override + public String toString() { + return String.format("[%s](%s) %s", name, code, resource); + } + +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/package-info.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/package-info.java new file mode 100644 index 00000000..7f43f787 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/package-info.java @@ -0,0 +1,24 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +/** + * 审计事件 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/11 22:10 + */ +package cn.topiam.employee.audit; \ No newline at end of file diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/repository/AuditRepository.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/repository/AuditRepository.java new file mode 100644 index 00000000..bb6bad44 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/repository/AuditRepository.java @@ -0,0 +1,52 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.repository; + +import java.time.LocalDateTime; + +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.audit.entity.AuditEntity; + +/** + * 行为审计repository + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/11 22:32 + */ +@Repository +public interface AuditRepository extends CrudRepository, + QuerydslPredicateExecutor { + + /** + * 统计指定时间范围内用户登录失败次数 + * + * @param startTime {@link LocalDateTime} + * @param endTime {@link LocalDateTime} + * @param userId {@link Long} + * @return {@link Integer} + */ + @Query(value = "SELECT count(*) FROM `audit` WHERE event_time BETWEEN :startTime AND :endTime AND actor_id = :userId AND event_type = 'eiam:event:account:user_login_fail'", nativeQuery = true) + Integer countLoginFailByUserId(@Param("startTime") LocalDateTime startTime, + @Param("endTime") LocalDateTime endTime, + @Param("userId") Long userId); +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/repository/package-info.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/repository/package-info.java new file mode 100644 index 00000000..a1b65766 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/repository/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.repository; \ No newline at end of file diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/service/AuditService.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/service/AuditService.java new file mode 100644 index 00000000..809ee900 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/service/AuditService.java @@ -0,0 +1,52 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.service; + +import java.util.List; + +import cn.topiam.employee.audit.controller.pojo.AuditDictResult; +import cn.topiam.employee.audit.controller.pojo.AuditListQuery; +import cn.topiam.employee.audit.controller.pojo.AuditListResult; +import cn.topiam.employee.common.enums.UserType; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + * 审计service + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/10 23:06 + */ +public interface AuditService { + /** + * List + * + * @param query {@link AuditListQuery} + * @param pageModel {@link PageModel} + * @return {@link Page} + */ + Page getAuditList(AuditListQuery query, PageModel pageModel); + + /** + * 获取字典类型 + * + * @param userType {@link UserType} + * @return {@link List} + */ + List getAuditDict(UserType userType); +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/service/converter/AuditDataConverter.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/service/converter/AuditDataConverter.java new file mode 100644 index 00000000..6269b6f7 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/service/converter/AuditDataConverter.java @@ -0,0 +1,204 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.service.converter; + +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.*; +import java.util.stream.Collectors; + +import org.elasticsearch.index.query.BoolQueryBuilder; +import org.elasticsearch.index.query.QueryBuilders; +import org.elasticsearch.search.sort.FieldSortBuilder; +import org.elasticsearch.search.sort.SortBuilder; +import org.elasticsearch.search.sort.SortBuilders; +import org.elasticsearch.search.sort.SortOrder; +import org.mapstruct.Mapper; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.elasticsearch.core.SearchHits; +import org.springframework.data.elasticsearch.core.query.NativeSearchQuery; +import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import com.google.common.collect.Lists; + +import cn.topiam.employee.audit.controller.pojo.AuditListQuery; +import cn.topiam.employee.audit.controller.pojo.AuditListResult; +import cn.topiam.employee.audit.entity.*; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.entity.account.UserEntity; +import cn.topiam.employee.common.entity.setting.AdministratorEntity; +import cn.topiam.employee.common.enums.UserType; +import cn.topiam.employee.common.repository.account.UserRepository; +import cn.topiam.employee.common.repository.setting.AdministratorRepository; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import static cn.topiam.employee.audit.entity.Actor.ACTOR_ID; +import static cn.topiam.employee.audit.entity.Actor.ACTOR_TYPE; +import static cn.topiam.employee.audit.entity.Event.EVENT_TIME; +import static cn.topiam.employee.audit.entity.Event.EVENT_TYPE; + +/** + * 审计数据转换 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/14 22:45 + */ +@Mapper(componentModel = "spring") +public interface AuditDataConverter { + String SORT_EVENT_TIME = "eventTime"; + + /** + * searchHits 转审计列表 + * + * @param search {@link SearchHits} + * @param page {@link PageModel} + * @return {@link Page} + */ + default Page searchHitsConvertToAuditListResult(SearchHits search, + PageModel page) { + List list = new ArrayList<>(); + //总记录数 + search.forEach(hit -> { + AuditElasticSearchEntity content = hit.getContent(); + Event event = content.getEvent(); + AuditListResult result = new AuditListResult(); + result.setId(content.getId()); + result.setEventStatus(event.getStatus()); + result.setEventType(event.getType().getDesc()); + result.setEventTime(LocalDateTime.ofInstant(event.getTime(), ZoneId.systemDefault())); + //用户代理 + result.setUserAgent(content.getUserAgent()); + result.setGeoLocation(content.getGeoLocation()); + Actor actor = content.getActor(); + //用户ID + result.setUserId(actor.getId()); + result.setUsername(getUsername(actor.getType(), actor.getId())); + //用户类型 + result.setUserType(actor.getType().getCode()); + //操作对象 + result.setTargets(content.getTargets()); + list.add(result); + }); + //@formatter:off + Page result = new Page<>(); + result.setPagination(Page.Pagination.builder() + .total(search.getTotalHits()) + .totalPages(Math.toIntExact(search.getTotalHits() / page.getPageSize())) + .current(page.getCurrent()+1) + .build()); + result.setList(list); + //@formatter:on + return result; + } + + /** + * + * 获取用户名 + * + * @param actorId {@link String} + * @param actorType {@link UserType} + * @return {@link String} + */ + private String getUsername(UserType actorType, String actorId) { + if (!StringUtils.hasText(actorId)) { + return null; + } + if (UserType.USER.equals(actorType)) { + UserRepository repository = ApplicationContextHelp.getBean(UserRepository.class); + UserEntity user = repository.findById(Long.valueOf(actorId)).orElse(new UserEntity()); + return user.getUsername(); + } + if (UserType.ADMIN.equals(actorType)) { + AdministratorRepository repository = ApplicationContextHelp + .getBean(AdministratorRepository.class); + AdministratorEntity administrator = repository.findById(Long.valueOf(actorId)) + .orElse(new AdministratorEntity()); + return administrator.getUsername(); + } + return ""; + } + + /** + * 审计列表请求到本机搜索查询 + * + * @param query {@link AuditListQuery} + * @param page {@link PageModel} + * @return {@link NativeSearchQuery} + */ + default NativeSearchQuery auditListRequestConvertToNativeSearchQuery(AuditListQuery query, + PageModel page) { + //构建查询 builder下有 must、should 以及 mustNot 相当于 sql 中的 and、or 以及 not + BoolQueryBuilder queryBuilder = QueryBuilders.boolQuery(); + Collection> fieldSortBuilders = Lists.newArrayList(); + //用户名存在,查询用户ID + if (StringUtils.hasText(query.getUsername())) { + String actorId = ""; + if (UserType.USER.equals(query.getUserType())) { + UserRepository userRepository = ApplicationContextHelp + .getBean(UserRepository.class); + UserEntity user = userRepository.findByUsername(query.getUsername()); + if (!Objects.isNull(user)) { + actorId = user.getId().toString(); + } + } + if (UserType.ADMIN.equals(query.getUserType())) { + AdministratorRepository administratorRepository = ApplicationContextHelp + .getBean(AdministratorRepository.class); + Optional optional = administratorRepository + .findByUsername(query.getUsername()); + if (optional.isPresent()) { + actorId = optional.get().getId().toString(); + } + } + queryBuilder.must(QueryBuilders.queryStringQuery(actorId).field(ACTOR_ID)); + } + //用户类型 + queryBuilder + .must(QueryBuilders.queryStringQuery(query.getUserType().getCode()).field(ACTOR_TYPE)); + //事件类型 + if (!CollectionUtils.isEmpty(query.getEventType())) { + queryBuilder.must(QueryBuilders.termsQuery(EVENT_TYPE, + query.getEventType().stream().map(EventType::getCode).collect(Collectors.toSet()))); + } + //字段排序 + page.getSorts().forEach(sort -> { + FieldSortBuilder eventTimeSortBuilder = SortBuilders.fieldSort(EVENT_TIME) + .order(SortOrder.DESC); + if (org.apache.commons.lang3.StringUtils.equals(sort.getSorter(), SORT_EVENT_TIME)) { + if (sort.getAsc()) { + eventTimeSortBuilder.order(SortOrder.ASC); + } + } + fieldSortBuilders.add(eventTimeSortBuilder); + }); + //事件时间 + if (!Objects.isNull(query.getStartEventTime()) + && !Objects.isNull(query.getEndEventTime())) { + queryBuilder.must(QueryBuilders.rangeQuery(EVENT_TIME).gte(query.getStartEventTime()) + .lte(query.getEndEventTime())); + } + return new NativeSearchQueryBuilder().withQuery(queryBuilder) + //分页参数 + .withPageable(PageRequest.of(page.getCurrent(), page.getPageSize())) + //排序 + .withSorts(fieldSortBuilders).build(); + } +} diff --git a/eiam-audit/src/main/java/cn/topiam/employee/audit/service/impl/AuditServiceImpl.java b/eiam-audit/src/main/java/cn/topiam/employee/audit/service/impl/AuditServiceImpl.java new file mode 100644 index 00000000..e5d840f5 --- /dev/null +++ b/eiam-audit/src/main/java/cn/topiam/employee/audit/service/impl/AuditServiceImpl.java @@ -0,0 +1,127 @@ +/* + * eiam-audit - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.audit.service.impl; + +import java.util.*; +import java.util.stream.Collectors; + +import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate; +import org.springframework.data.elasticsearch.core.SearchHits; +import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; +import org.springframework.data.elasticsearch.core.query.NativeSearchQuery; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import cn.topiam.employee.audit.controller.pojo.AuditDictResult; +import cn.topiam.employee.audit.controller.pojo.AuditListQuery; +import cn.topiam.employee.audit.controller.pojo.AuditListResult; +import cn.topiam.employee.audit.entity.AuditElasticSearchEntity; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.audit.service.AuditService; +import cn.topiam.employee.audit.service.converter.AuditDataConverter; +import cn.topiam.employee.common.enums.UserType; +import cn.topiam.employee.core.configuration.EiamSupportProperties; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +import lombok.AllArgsConstructor; +import static cn.topiam.employee.common.constants.AuditConstants.getAuditIndexPrefix; + +/** + * 审计 service impl + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/10 23:06 + */ +@Service +@AllArgsConstructor +public class AuditServiceImpl implements AuditService { + + /** + * List + * + * @param query {@link AuditListQuery} + * @param page {@link PageModel} + * @return {@link Page} + */ + @Override + public Page getAuditList(AuditListQuery query, PageModel page) { + //查询入参转查询条件 + NativeSearchQuery nsq = auditDataConverter.auditListRequestConvertToNativeSearchQuery(query, + page); + //查询列表 + SearchHits search = elasticsearchRestTemplate.search(nsq, + AuditElasticSearchEntity.class, IndexCoordinates + .of(getAuditIndexPrefix(eiamSupportProperties.getDemo().isOpen()) + "*")); + //结果转返回结果 + return auditDataConverter.searchHitsConvertToAuditListResult(search, page); + } + + /** + * 获取字典类型 + * + * @param userType {@link UserType} + * @return {@link List} + */ + @Override + public List getAuditDict(UserType userType) { + List types = Arrays.asList(EventType.values()); + //获取分组 + List list = types.stream().map(EventType::getResource).toList().stream() + .distinct().toList().stream().map(resource -> { + AuditDictResult group = new AuditDictResult(); + group.setName(resource.getName()); + group.setCode(resource.getCode()); + return group; + }).collect(Collectors.toList()); + //处理每个分组的审计类型 + list.forEach(dict -> { + Set auditTypes = new HashSet<>(); + types.stream() + .filter(auditType -> auditType.getResource().getCode().equals(dict.getCode())) + .forEach(auditType -> { + if (auditType.getUserTypes().contains(userType)) { + AuditDictResult.AuditType type = new AuditDictResult.AuditType(); + type.setName(auditType.getDesc()); + type.setCode(auditType.getCode()); + auditTypes.add(type); + } + }); + dict.setTypes(auditTypes); + }); + list = list.stream().filter(i -> !CollectionUtils.isEmpty(i.getTypes())) + .collect(Collectors.toList()); + return list; + } + + /** + * EiamSupportProperties + */ + private final EiamSupportProperties eiamSupportProperties; + + /** + * ElasticsearchRestTemplate + */ + private final ElasticsearchRestTemplate elasticsearchRestTemplate; + + /** + * AuditDataConverter + */ + private final AuditDataConverter auditDataConverter; + +} diff --git a/eiam-authentication/eiam-authentication-all/pom.xml b/eiam-authentication/eiam-authentication-all/pom.xml new file mode 100644 index 00000000..5fa56a93 --- /dev/null +++ b/eiam-authentication/eiam-authentication-all/pom.xml @@ -0,0 +1,79 @@ + + + + + eiam-authentication + cn.topiam + 1.0.0-beta1 + ../pom.xml + + jar + 4.0.0 + + eiam-authentication-all + + + + + cn.topiam + eiam-authentication-dingtalk + ${project.version} + + + + cn.topiam + eiam-authentication-feishu + ${project.version} + + + + cn.topiam + eiam-authentication-qq + ${project.version} + + + + cn.topiam + eiam-authentication-wechat + ${project.version} + + + + cn.topiam + eiam-authentication-wechatwork + ${project.version} + + + + cn.topiam + eiam-authentication-sms + ${project.version} + + + + cn.topiam + eiam-authentication-mfa + ${project.version} + + + \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-core/pom.xml b/eiam-authentication/eiam-authentication-core/pom.xml new file mode 100644 index 00000000..8843fea6 --- /dev/null +++ b/eiam-authentication/eiam-authentication-core/pom.xml @@ -0,0 +1,35 @@ + + + + + eiam-authentication + cn.topiam + 1.0.0-beta1 + ../pom.xml + + 4.0.0 + + eiam-authentication-core + jar + + \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/AbstractIdentityProviderService.java b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/AbstractIdentityProviderService.java new file mode 100644 index 00000000..87c9dd50 --- /dev/null +++ b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/AbstractIdentityProviderService.java @@ -0,0 +1,31 @@ +/* + * eiam-authentication-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.common; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * AbstractIdentityProviderService + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/31 22:34 + */ +public abstract class AbstractIdentityProviderService implements IdentityProviderService { + private final Logger logger = LoggerFactory.getLogger(AbstractIdentityProviderService.class); +} diff --git a/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/IdentityProviderService.java b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/IdentityProviderService.java new file mode 100644 index 00000000..a90d64a0 --- /dev/null +++ b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/IdentityProviderService.java @@ -0,0 +1,111 @@ +/* + * eiam-authentication-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.common; + +import java.util.List; +import java.util.Map; + +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.authentication.common.config.IdentityProviderConfig; +import cn.topiam.employee.common.enums.IdentityProviderType; + +/** + * IdentityProviderService + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/20 23:20 + */ +public interface IdentityProviderService { + + /** + * 获取身份提供商标志 + * + * @return {@link String} + */ + String getCode(); + + /** + * 获取身份提供商名称 + * + * @return {@link String} + */ + String getName(); + + /** + * 获取身份提供商描述 + * + * @return {@link String} + */ + String getDescription(); + + /** + * 获取身份提供商类型 + * + * @return {@link IdentityProviderType} + */ + IdentityProviderType getType(); + + /** + * 获取表单Schema + * + * @return {@link Map} + */ + List getFormSchema(); + + /** + * 获取base64图标 + * + * @return {@link String} + */ + String getBase64Icon(); + + /** + * 创建身份提供商 + * + * @param name {@link String} 名称 + * @param remark {@link String} 备注 + * @return {@link String} 身份提供商ID + */ + @Transactional(rollbackFor = Exception.class) + String create(String name, String remark); + + /** + * 删除身份提供商 + * + * @param idpId {@link String} 身份提供商ID + */ + void delete(String idpId); + + /** + * 更新身份提供商配置 + * + * @param idpId {@link String} + * @param config {@link Map} + */ + @Transactional(rollbackFor = Exception.class) + void saveConfig(String idpId, Map config); + + /** + * 获取配置 + * + * @param idpId {@link String} + * @return {@link IdentityProviderConfig} + */ + IdentityProviderConfig getConfig(String idpId); +} diff --git a/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/IdentityProviderServiceLoader.java b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/IdentityProviderServiceLoader.java new file mode 100644 index 00000000..41192873 --- /dev/null +++ b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/IdentityProviderServiceLoader.java @@ -0,0 +1,106 @@ +/* + * eiam-authentication-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.common; + +import java.util.*; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.BeanInitializationException; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.context.*; +import org.springframework.context.annotation.Configuration; + +import cn.topiam.employee.authentication.common.exception.IdentityProviderTemplateNotExistException; + +/** + * 身份提供商加载器 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/20 19:08 + */ +@Configuration +public class IdentityProviderServiceLoader implements ApplicationContextAware { + + private final Logger logger = LoggerFactory + .getLogger(IdentityProviderServiceLoader.class); + /** + * 用于保存接口实现类名及对应的类 + */ + private Map loadMap = new HashMap<>( + 16); + /** + * key: code,value:templateImpl + */ + private final Map identityProviderServiceMap = new HashMap<>( + 16); + + /** + * Set the ApplicationContext that this object runs in. + * Normally this call will be used to initialize the object. + *

Invoked after population of normal bean properties but before an init callback such + * as {@link InitializingBean#afterPropertiesSet()} + * or a custom init-method. Invoked after {@link ResourceLoaderAware#setResourceLoader}, + * {@link ApplicationEventPublisherAware#setApplicationEventPublisher} and + * {@link MessageSourceAware}, if applicable. + * + * @param applicationContext the ApplicationContext object to be used by this object + * @throws ApplicationContextException in case of context initialization errors + * @throws BeansException if thrown by application context methods + * @see BeanInitializationException + */ + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + loadMap = applicationContext.getBeansOfType(IdentityProviderService.class); + getIdentityProviderServiceList(); + } + + /** + * 获取身份提供商列表 + * + * @return {@link List} + */ + public Set getIdentityProviderServiceList() { + List values = loadMap.values().stream().toList(); + return new HashSet<>(values); + } + + /** + * 根据CODE获取身份提供商 + * + * @param code {@link String} + * @return {@link List} + */ + public IdentityProviderService getIdentityProviderService(String code) { + IdentityProviderService impl = identityProviderServiceMap.get(code); + if (Objects.isNull(impl)) { + for (IdentityProviderService service : getIdentityProviderServiceList()) { + if (code.equals(service.getCode())) { + identityProviderServiceMap.put(code, service); + return service; + } + } + } + if (Objects.isNull(impl)) { + throw new IdentityProviderTemplateNotExistException(); + } + return impl; + } + +} diff --git a/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/config/IdentityProviderConfig.java b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/config/IdentityProviderConfig.java new file mode 100644 index 00000000..d8491caa --- /dev/null +++ b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/config/IdentityProviderConfig.java @@ -0,0 +1,40 @@ +/* + * eiam-authentication-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.common.config; + +import java.io.Serial; +import java.io.Serializable; + +import lombok.Getter; +import lombok.Setter; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/12/9 21:05 + */ +@Getter +@Setter +public class IdentityProviderConfig implements Serializable { + + @Serial + private static final long serialVersionUID = -7863290244166345243L; + /** + * 启用 + */ + private Boolean enabled; +} diff --git a/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/exception/IdentityProviderTemplateNotExistException.java b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/exception/IdentityProviderTemplateNotExistException.java new file mode 100644 index 00000000..43fad033 --- /dev/null +++ b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/exception/IdentityProviderTemplateNotExistException.java @@ -0,0 +1,34 @@ +/* + * eiam-authentication-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.common.exception; + +import cn.topiam.employee.support.exception.TopIamException; +import static org.springframework.http.HttpStatus.BAD_REQUEST; + +/** + * 身份提供商模版不存在 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/8 22:49 + */ +public class IdentityProviderTemplateNotExistException extends TopIamException { + + public IdentityProviderTemplateNotExistException() { + super("idp_template_not_exist", "身份提供商模版不存在", BAD_REQUEST); + } +} diff --git a/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/filter/AbstractIdpAuthenticationProcessingFilter.java b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/filter/AbstractIdpAuthenticationProcessingFilter.java new file mode 100644 index 00000000..b92337ec --- /dev/null +++ b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/filter/AbstractIdpAuthenticationProcessingFilter.java @@ -0,0 +1,210 @@ +/* + * eiam-authentication-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.common.filter; + +import java.io.IOException; +import java.util.Optional; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.http.HttpStatus; +import org.springframework.security.core.Authentication; +import org.springframework.security.oauth2.client.web.AuthorizationRequestRepository; +import org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizationRequestRepository; +import org.springframework.security.oauth2.core.OAuth2AuthenticationException; +import org.springframework.security.oauth2.core.OAuth2Error; +import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest; +import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.authentication.common.modal.IdpUser; +import cn.topiam.employee.authentication.common.service.UserIdpService; +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.enums.IdentityProviderType; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; +import cn.topiam.employee.core.security.authentication.IdpAuthentication; +import cn.topiam.employee.core.security.userdetails.UserDetails; +import cn.topiam.employee.core.security.util.UserUtils; +import cn.topiam.employee.support.result.ApiRestResult; +import cn.topiam.employee.support.util.HttpResponseUtils; + +import lombok.Getter; + +/** + * 身份验证处理过滤器 + *

+ * 用于处理 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/8 21:49 + */ +public abstract class AbstractIdpAuthenticationProcessingFilter extends + AbstractAuthenticationProcessingFilter { + + /** + * 用户认证 + * + * @param request {@link HttpServletRequest} + * @param response {@link HttpServletResponse} + * @param provider {@link IdentityProviderType} + * @param providerId {@link String} + * @param info {@link JSONObject} + * @return {@link Authentication} + */ + public Authentication attemptAuthentication(HttpServletRequest request, + HttpServletResponse response, + IdentityProviderType provider, String providerId, + IdpUser info) throws IOException { + info.setProviderId(providerId); + info.setProviderType(provider); + //调用接口查询是否已绑定 + if (!userIdpService.checkUserIdpIsAlreadyBind(info.getOpenId(), providerId)) { + logger.debug("【" + providerId + "】用户【" + info.getOpenId() + "】未绑定"); + //是否自动绑定 + if (!userIdpService.isAutoBindUserIdp(providerId)) { + setUserBindSessionContent(request, info); + return new IdpAuthentication(provider.getCode(), providerId); + } + //调用接口进行绑定操作 + info.setProviderId(providerId); + if (!userIdpService.bindUserIdp(UserUtils.getUser().getId().toString(), info)) { + ApiRestResult errorResult = ApiRestResult.err(); + String errMsg = "【" + providerId + "】用户【" + info.getOpenId() + "】绑定失败"; + logger.error(errMsg); + errorResult.message(errMsg); + HttpResponseUtils.flushResponseJson(response, HttpStatus.FORBIDDEN.value(), + errorResult); + return null; + } + logger.debug("【" + providerId + "】用户【" + info.getOpenId() + "】绑定成功"); + //绑定成功,直接走认证认证 + return authenticate(info.getOpenId(), provider, providerId, request); + } + logger.debug("【" + providerId + "】用户【" + info.getOpenId() + "】已绑定"); + //存在绑定更新更新账户信息 + if (!userIdpService.updateUser(info, providerId)) { + ApiRestResult errorResult = ApiRestResult.err(); + logger.error("钉钉扫码登录更新用户信息失败"); + errorResult.message("更新用户信息失败"); + HttpResponseUtils.flushResponseJson(response, HttpStatus.FORBIDDEN.value(), + errorResult); + return null; + } + return authenticate(info.getOpenId(), provider, providerId, request); + } + + /** + * 设置用户绑定session值 + * + * @param request {@link HttpServletRequest} + * @param info {@link IdpUser} + */ + private void setUserBindSessionContent(HttpServletRequest request, IdpUser info) { + request.getSession().setAttribute(TOPIAM_USER_BIND_IDP, JSONObject.toJSONString(info)); + } + + public static final String TOPIAM_USER_BIND_IDP = "TOPIAM_USER_BIND_IDP"; + + /** + * 认证 + * + * @param openId {@link String } + * @param provider {@link IdentityProviderType } + * @param providerId {@link String } + * @param request {@link HttpServletRequest } + * @return {@link Authentication } + */ + public Authentication authenticate(String openId, IdentityProviderType provider, + String providerId, HttpServletRequest request) { + //认证 + UserDetails userDetails = userIdpService.getUserDetails(openId, providerId); + IdpAuthentication token = new IdpAuthentication(userDetails, provider.getCode(), providerId, + true, userDetails.getAuthorities()); + // Allow subclasses to set the "details" property + token.setDetails(this.authenticationDetailsSource.buildDetails(request)); + return token; + } + + public IdentityProviderEntity getIdentityProviderEntity(String providerId) { + Optional optional = getIdentityProviderRepository() + .findByIdAndEnabledIsTrue(Long.valueOf(providerId)); + if (optional.isEmpty()) { + //无效身份提供商 + OAuth2Error oauth2Error = new OAuth2Error(INVALID_IDP); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + return optional.get(); + } + + public OAuth2AuthorizationRequest getOAuth2AuthorizationRequest(HttpServletRequest request, + HttpServletResponse response) { + OAuth2AuthorizationRequest authorizationRequest = getAuthorizationRequestRepository() + .removeAuthorizationRequest(request, response); + if (authorizationRequest == null) { + OAuth2Error oauth2Error = new OAuth2Error(AUTHORIZATION_REQUEST_NOT_FOUND_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + return authorizationRequest; + } + + public static final String INVALID_STATE_PARAMETER_ERROR_CODE = "invalid_state_parameter"; + public static final String INVALID_CODE_PARAMETER_ERROR_CODE = "invalid_code_parameter"; + + public static final String AUTHORIZATION_REQUEST_NOT_FOUND_ERROR_CODE = "authorization_request_not_found"; + public static final String GET_USERINFO_ERROR_CODE = "get_userinfo_error_code"; + public static final String AUTH_CODE = "authCode"; + public static final String INVALID_IDP = "invalid_idp"; + public static final String INVALID_IDP_CONFIG = "invalid_idp_config"; + + /** + * 授权请求存储库 + */ + @Getter + private final AuthorizationRequestRepository authorizationRequestRepository = new HttpSessionOAuth2AuthorizationRequestRepository(); + + /** + * 认证用户详情 + */ + @Getter + private final UserIdpService userIdpService; + + /** + * 身份提供者存储库 + */ + @Getter + private final IdentityProviderRepository identityProviderRepository; + + /** + * Creates a new instance + * + * @param defaultFilterProcessesUrl the {@link String} + * @param userIdpService {@link UserIdpService} + * @param identityProviderRepository {@link IdentityProviderRepository} + */ + protected AbstractIdpAuthenticationProcessingFilter(String defaultFilterProcessesUrl, + UserIdpService userIdpService, + IdentityProviderRepository identityProviderRepository) { + super(new AntPathRequestMatcher(defaultFilterProcessesUrl)); + this.userIdpService = userIdpService; + this.identityProviderRepository = identityProviderRepository; + } + +} diff --git a/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/modal/IdpUser.java b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/modal/IdpUser.java new file mode 100644 index 00000000..fb6efa6d --- /dev/null +++ b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/modal/IdpUser.java @@ -0,0 +1,95 @@ +/* + * eiam-authentication-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.common.modal; + +import java.util.Map; + +import cn.topiam.employee.common.enums.IdentityProviderType; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; + +/** + * IDP用户信息 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/9/18 20:23 + */ +@Data +@Builder +@AllArgsConstructor +public class IdpUser { + public IdpUser() { + } + + /** + * 账户ID + */ + private String accountId; + + /** + * 个人邮箱 + */ + private String email; + + /** + * 手机号 + */ + private String mobile; + + /** + * 昵称 + */ + private String nickName; + + /** + * 头像url + */ + private String avatarUrl; + + /** + * openId + */ + private String openId; + + /** + * 手机号对应的国家号 + */ + private String stateCode; + + /** + * unionId + */ + public String unionId; + + /** + * providerId + */ + private String providerId; + + /** + * providerType + */ + private IdentityProviderType providerType; + + /** + * 额外配置 + */ + private Map additionalInfo; +} diff --git a/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/package-info.java b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/package-info.java new file mode 100644 index 00000000..e0fb066a --- /dev/null +++ b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-authentication-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.common; \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/service/UserIdpService.java b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/service/UserIdpService.java new file mode 100644 index 00000000..5885d752 --- /dev/null +++ b/eiam-authentication/eiam-authentication-core/src/main/java/cn/topiam/employee/authentication/common/service/UserIdpService.java @@ -0,0 +1,74 @@ +/* + * eiam-authentication-core - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.common.service; + +import cn.topiam.employee.authentication.common.modal.IdpUser; +import cn.topiam.employee.core.security.userdetails.UserDetails; + +/** + * UserIdpService + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/9 21:54 + */ +public interface UserIdpService { + + /** + * 检查用户已绑定对应平台 + * + * @param openId {@link String} + * @param providerId {@link String} + * @return {@link Boolean} + */ + Boolean checkUserIdpIsAlreadyBind(String openId, String providerId); + + /** + * 是否自动绑定 + * + * @param providerId {@link String} 提供商ID + * @return {@link Boolean} + */ + Boolean isAutoBindUserIdp(String providerId); + + /** + * 绑定 + * + * @param accountId {@link String} 账户ID + * @param idpUser {@link IdpUser} 用户信息 + * @return {@link Boolean} + */ + Boolean bindUserIdp(String accountId, IdpUser idpUser); + + /** + * 更新账户信息 + * + * @param idpUser {@link IdpUser} 用户信息 + * @param providerId {@link String} 提供商ID + * @return {@link Boolean} + */ + Boolean updateUser(IdpUser idpUser, String providerId); + + /** + * 获取用户详情 + * + * @param openId {@link String} + * @param providerId {@link String} + * @return {@link UserDetails} + */ + UserDetails getUserDetails(String openId, String providerId); +} diff --git a/eiam-authentication/eiam-authentication-dingtalk/pom.xml b/eiam-authentication/eiam-authentication-dingtalk/pom.xml new file mode 100644 index 00000000..5e081e02 --- /dev/null +++ b/eiam-authentication/eiam-authentication-dingtalk/pom.xml @@ -0,0 +1,43 @@ + + + + + eiam-authentication + cn.topiam + 1.0.0-beta1 + ../pom.xml + + 4.0.0 + + eiam-authentication-dingtalk + jar + + + + cn.topiam + eiam-authentication-core + ${project.version} + + + + \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/DingTalkIdpOauthConfig.java b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/DingTalkIdpOauthConfig.java new file mode 100644 index 00000000..3a4e8eb5 --- /dev/null +++ b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/DingTalkIdpOauthConfig.java @@ -0,0 +1,52 @@ +/* + * eiam-authentication-dingtalk - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.dingtalk; + +import java.io.Serial; + +import javax.validation.constraints.NotBlank; + +import cn.topiam.employee.authentication.common.config.IdentityProviderConfig; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 钉钉Oauth配置参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/8 21:36 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DingTalkIdpOauthConfig extends IdentityProviderConfig { + @Serial + private static final long serialVersionUID = -6850223527422243076L; + + /** + * 应用 key + */ + @NotBlank(message = "应用AppKey不能为空") + private String appKey; + + /** + * 应用 Secret + */ + @NotBlank(message = "应用AppSecret不能为空") + private String appSecret; +} diff --git a/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/DingTalkIdpScanCodeConfig.java b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/DingTalkIdpScanCodeConfig.java new file mode 100644 index 00000000..79e95563 --- /dev/null +++ b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/DingTalkIdpScanCodeConfig.java @@ -0,0 +1,52 @@ +/* + * eiam-authentication-dingtalk - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.dingtalk; + +import java.io.Serial; + +import javax.validation.constraints.NotBlank; + +import cn.topiam.employee.authentication.common.config.IdentityProviderConfig; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 钉钉扫码配置参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/8 21:36 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DingTalkIdpScanCodeConfig extends IdentityProviderConfig { + @Serial + private static final long serialVersionUID = -6850223527422243076L; + + /** + * 应用 key + */ + @NotBlank(message = "应用AppKey不能为空") + private String appKey; + + /** + * 应用 Secret + */ + @NotBlank(message = "应用AppSecret不能为空") + private String appSecret; +} diff --git a/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/configurer/DingtalkOAuth2AuthenticationConfigurer.java b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/configurer/DingtalkOAuth2AuthenticationConfigurer.java new file mode 100644 index 00000000..3f1b7bfb --- /dev/null +++ b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/configurer/DingtalkOAuth2AuthenticationConfigurer.java @@ -0,0 +1,92 @@ +/* + * eiam-authentication-dingtalk - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.dingtalk.configurer; + +import org.springframework.security.config.annotation.web.HttpSecurityBuilder; +import org.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer; +import org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter; +import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.OrRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.util.Assert; + +import cn.topiam.employee.authentication.common.service.UserIdpService; +import cn.topiam.employee.authentication.dingtalk.filter.DingtalkOAuth2AuthorizationRequestRedirectFilter; +import cn.topiam.employee.authentication.dingtalk.filter.DingtalkOauthAuthenticationFilter; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; + +/** + * 认证配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/10 22:58 + */ +@SuppressWarnings("AlibabaClassNamingShouldBeCamel") +public final class DingtalkOAuth2AuthenticationConfigurer> extends + AbstractAuthenticationFilterConfigurer, DingtalkOauthAuthenticationFilter> { + private final IdentityProviderRepository identityProviderRepository; + private final UserIdpService userIdpService; + + public DingtalkOAuth2AuthenticationConfigurer(IdentityProviderRepository identityProviderRepository, + UserIdpService userIdpService) { + Assert.notNull(identityProviderRepository, "identityProviderRepository must not be null"); + Assert.notNull(userIdpService, "userIdpService must not be null"); + this.identityProviderRepository = identityProviderRepository; + this.userIdpService = userIdpService; + } + + /** + * Create the {@link RequestMatcher} given a loginProcessingUrl + * + * @param loginProcessingUrl creates the {@link RequestMatcher} based upon the + * loginProcessingUrl + * @return the {@link RequestMatcher} to use based upon the loginProcessingUrl + */ + @Override + protected RequestMatcher createLoginProcessingUrlMatcher(String loginProcessingUrl) { + return new AntPathRequestMatcher(loginProcessingUrl); + } + + @Override + public void init(H http) throws Exception { + //钉钉登录认证 + DingtalkOauthAuthenticationFilter loginAuthenticationFilter = new DingtalkOauthAuthenticationFilter( + identityProviderRepository, userIdpService); + this.setAuthenticationFilter(loginAuthenticationFilter); + //处理URL + super.loginProcessingUrl(DingtalkOauthAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI); + super.init(http); + } + + @Override + public void configure(H http) throws Exception { + //钉钉请求重定向 + DingtalkOAuth2AuthorizationRequestRedirectFilter requestRedirectFilter = new DingtalkOAuth2AuthorizationRequestRedirectFilter( + identityProviderRepository); + http.addFilterBefore(requestRedirectFilter, OAuth2AuthorizationRequestRedirectFilter.class); + http.addFilterBefore(this.getAuthenticationFilter(), OAuth2LoginAuthenticationFilter.class); + super.configure(http); + } + + public RequestMatcher getRequestMatcher() { + return new OrRequestMatcher( + DingtalkOAuth2AuthorizationRequestRedirectFilter.getRequestMatcher(), + DingtalkOauthAuthenticationFilter.getRequestMatcher()); + } +} diff --git a/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/configurer/DingtalkScanCodeAuthenticationConfigurer.java b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/configurer/DingtalkScanCodeAuthenticationConfigurer.java new file mode 100644 index 00000000..f618a3d2 --- /dev/null +++ b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/configurer/DingtalkScanCodeAuthenticationConfigurer.java @@ -0,0 +1,91 @@ +/* + * eiam-authentication-dingtalk - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.dingtalk.configurer; + +import org.springframework.security.config.annotation.web.HttpSecurityBuilder; +import org.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer; +import org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter; +import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.OrRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.util.Assert; + +import cn.topiam.employee.authentication.common.service.UserIdpService; +import cn.topiam.employee.authentication.dingtalk.filter.DingtalkScanCodeAuthenticationFilter; +import cn.topiam.employee.authentication.dingtalk.filter.DingtalkScanCodeAuthorizationRequestGetFilter; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; + +/** + * 认证配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/10 22:58 + */ +public final class DingtalkScanCodeAuthenticationConfigurer> + extends + AbstractAuthenticationFilterConfigurer, DingtalkScanCodeAuthenticationFilter> { + private final IdentityProviderRepository identityProviderRepository; + private final UserIdpService userIdpService; + + public DingtalkScanCodeAuthenticationConfigurer(IdentityProviderRepository identityProviderRepository, + UserIdpService userIdpService) { + Assert.notNull(identityProviderRepository, "identityProviderRepository must not be null"); + Assert.notNull(userIdpService, "userIdpService must not be null"); + this.identityProviderRepository = identityProviderRepository; + this.userIdpService = userIdpService; + } + + /** + * Create the {@link RequestMatcher} given a loginProcessingUrl + * + * @param loginProcessingUrl creates the {@link RequestMatcher} based upon the + * loginProcessingUrl + * @return the {@link RequestMatcher} to use based upon the loginProcessingUrl + */ + @Override + protected RequestMatcher createLoginProcessingUrlMatcher(String loginProcessingUrl) { + return new AntPathRequestMatcher(loginProcessingUrl); + } + + @Override + public void init(H http) throws Exception { + //钉钉扫码登录认证 + DingtalkScanCodeAuthenticationFilter loginAuthenticationFilter = new DingtalkScanCodeAuthenticationFilter( + identityProviderRepository, userIdpService); + this.setAuthenticationFilter(loginAuthenticationFilter); + //处理URL + super.loginProcessingUrl(DingtalkScanCodeAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI); + super.init(http); + } + + @Override + public void configure(H http) throws Exception { + //钉钉请求重定向 + DingtalkScanCodeAuthorizationRequestGetFilter requestRedirectFilter = new DingtalkScanCodeAuthorizationRequestGetFilter( + identityProviderRepository); + http.addFilterBefore(requestRedirectFilter, OAuth2AuthorizationRequestRedirectFilter.class); + http.addFilterBefore(this.getAuthenticationFilter(), OAuth2LoginAuthenticationFilter.class); + super.configure(http); + } + + public RequestMatcher getRequestMatcher() { + return new OrRequestMatcher(DingtalkScanCodeAuthenticationFilter.getRequestMatcher(), + DingtalkScanCodeAuthorizationRequestGetFilter.getRequestMatcher()); + } +} diff --git a/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/constant/DingTalkAuthenticationConstants.java b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/constant/DingTalkAuthenticationConstants.java new file mode 100644 index 00000000..365d3d62 --- /dev/null +++ b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/constant/DingTalkAuthenticationConstants.java @@ -0,0 +1,34 @@ +/* + * eiam-authentication-dingtalk - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.dingtalk.constant; + +/** + * 钉钉认证常量 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/9 21:19 + */ +public final class DingTalkAuthenticationConstants { + public static final String APP_ID = "appid"; + public static final String AUTH_CODE = "authCode"; + public static final String GET_USERINFO_BY_CODE = "https://oapi.dingtalk.com/sns/getuserinfo_bycode"; + public static final String SCAN_CODE_URL_AUTHORIZE = "https://oapi.dingtalk.com/connect/oauth2/sns_authorize"; + public static final String URL_AUTHORIZE = "https://login.dingtalk.com/oauth2/auth"; + public static final String GET_USERID_BY_UNIONID = "https://oapi.dingtalk.com/user/getUseridByUnionid"; + public static final String GET_USERINFO_BY_USERID = "https://oapi.dingtalk.com/topapi/v2/user/get"; +} diff --git a/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/filter/DingtalkOAuth2AuthorizationRequestRedirectFilter.java b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/filter/DingtalkOAuth2AuthorizationRequestRedirectFilter.java new file mode 100644 index 00000000..2b7f4312 --- /dev/null +++ b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/filter/DingtalkOAuth2AuthorizationRequestRedirectFilter.java @@ -0,0 +1,144 @@ +/* + * eiam-authentication-dingtalk - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.dingtalk.filter; + +import java.io.IOException; +import java.util.Base64; +import java.util.Map; +import java.util.Optional; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpMethod; +import org.springframework.lang.NonNull; +import org.springframework.security.crypto.keygen.Base64StringKeyGenerator; +import org.springframework.security.crypto.keygen.StringKeyGenerator; +import org.springframework.security.oauth2.client.web.AuthorizationRequestRepository; +import org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizationRequestRepository; +import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest; +import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames; +import org.springframework.security.web.DefaultRedirectStrategy; +import org.springframework.security.web.RedirectStrategy; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.util.Assert; +import org.springframework.web.filter.OncePerRequestFilter; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.authentication.dingtalk.DingTalkIdpOauthConfig; +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; +import static org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames.RESPONSE_TYPE; + +import static cn.topiam.employee.authentication.dingtalk.constant.DingTalkAuthenticationConstants.URL_AUTHORIZE; +import static cn.topiam.employee.authentication.dingtalk.filter.DingtalkOauthAuthenticationFilter.getLoginUrl; +import static cn.topiam.employee.common.enums.IdentityProviderType.DINGTALK_OAUTH; + +/** + * 微信扫码登录请求重定向过滤器 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/20 20:22 + */ +@SuppressWarnings("ALL") +public class DingtalkOAuth2AuthorizationRequestRedirectFilter extends OncePerRequestFilter { + + private final Logger logger = LoggerFactory + .getLogger(DingtalkOAuth2AuthorizationRequestRedirectFilter.class); + + /** + * 提供商ID + */ + public static final String PROVIDER_ID = "providerId"; + + /** + * AntPathRequestMatcher + */ + public static final AntPathRequestMatcher DINGTALK_OAUTH2_REQUEST_MATCHER = new AntPathRequestMatcher( + DINGTALK_OAUTH.getAuthorizationPathPrefix() + "/" + "{" + PROVIDER_ID + "}", + HttpMethod.GET.name()); + + /** + * 重定向策略 + */ + private final RedirectStrategy authorizationRedirectStrategy = new DefaultRedirectStrategy(); + + /** + * 认证请求存储库 + */ + private final AuthorizationRequestRepository authorizationRequestRepository = new HttpSessionOAuth2AuthorizationRequestRepository(); + + private static final StringKeyGenerator DEFAULT_STATE_GENERATOR = new Base64StringKeyGenerator( + Base64.getUrlEncoder()); + private final IdentityProviderRepository identityProviderRepository; + + public DingtalkOAuth2AuthorizationRequestRedirectFilter(IdentityProviderRepository identityProviderRepository) { + this.identityProviderRepository = identityProviderRepository; + } + + @Override + protected void doFilterInternal(@NonNull HttpServletRequest request, + @NonNull HttpServletResponse response, + @NonNull FilterChain filterChain) throws IOException, + ServletException { + RequestMatcher.MatchResult matcher = DINGTALK_OAUTH2_REQUEST_MATCHER.matcher(request); + if (!matcher.isMatch()) { + filterChain.doFilter(request, response); + return; + } + Map variables = matcher.getVariables(); + String providerId = variables.get(PROVIDER_ID); + Optional optional = identityProviderRepository + .findByIdAndEnabledIsTrue(Long.valueOf(providerId)); + if (optional.isEmpty()) { + throw new NullPointerException("未查询到身份提供商信息"); + } + IdentityProviderEntity entity = optional.get(); + DingTalkIdpOauthConfig config = JSONObject.parseObject(entity.getConfig(), + DingTalkIdpOauthConfig.class); + Assert.notNull(config, "钉钉登录配置不能为空"); + //构建授权请求 + OAuth2AuthorizationRequest.Builder builder = OAuth2AuthorizationRequest.authorizationCode() + .clientId(config.getAppKey()).authorizationUri(URL_AUTHORIZE) + .redirectUri(getLoginUrl(providerId)).state(DEFAULT_STATE_GENERATOR.generateKey()); + builder.parameters(parameters -> { + parameters.put(RESPONSE_TYPE, OAuth2ParameterNames.CODE); + parameters.put("prompt", "consent"); + }); + this.sendRedirectForAuthorization(request, response, builder.build()); + } + + private void sendRedirectForAuthorization(HttpServletRequest request, + HttpServletResponse response, + OAuth2AuthorizationRequest authorizationRequest) throws IOException { + this.authorizationRequestRepository.saveAuthorizationRequest(authorizationRequest, request, + response); + this.authorizationRedirectStrategy.sendRedirect(request, response, + authorizationRequest.getAuthorizationRequestUri()); + } + + public static RequestMatcher getRequestMatcher() { + return DINGTALK_OAUTH2_REQUEST_MATCHER; + } +} diff --git a/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/filter/DingtalkOauthAuthenticationFilter.java b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/filter/DingtalkOauthAuthenticationFilter.java new file mode 100644 index 00000000..b0d227aa --- /dev/null +++ b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/filter/DingtalkOauthAuthenticationFilter.java @@ -0,0 +1,210 @@ +/* + * eiam-authentication-dingtalk - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.dingtalk.filter; + +import java.io.IOException; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.http.HttpMethod; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.oauth2.core.OAuth2AuthenticationException; +import org.springframework.security.oauth2.core.OAuth2Error; +import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest; +import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; + +import com.alibaba.fastjson2.JSONObject; +import com.aliyun.dingtalkcontact_1_0.models.GetUserHeaders; +import com.aliyun.dingtalkcontact_1_0.models.GetUserResponse; +import com.aliyun.dingtalkoauth2_1_0.Client; +import com.aliyun.dingtalkoauth2_1_0.models.GetUserTokenRequest; +import com.aliyun.dingtalkoauth2_1_0.models.GetUserTokenResponse; +import com.aliyun.dingtalkoauth2_1_0.models.GetUserTokenResponseBody; +import com.aliyun.teaopenapi.models.Config; +import com.aliyun.teautil.models.RuntimeOptions; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; + +import cn.topiam.employee.authentication.common.filter.AbstractIdpAuthenticationProcessingFilter; +import cn.topiam.employee.authentication.common.modal.IdpUser; +import cn.topiam.employee.authentication.common.service.UserIdpService; +import cn.topiam.employee.authentication.dingtalk.DingTalkIdpOauthConfig; +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; +import cn.topiam.employee.core.context.ServerContextHelp; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.trace.TraceUtils; +import cn.topiam.employee.support.util.HttpUrlUtils; +import static cn.topiam.employee.authentication.dingtalk.filter.DingtalkScanCodeAuthorizationRequestGetFilter.PROVIDER_ID; +import static cn.topiam.employee.common.enums.IdentityProviderType.DINGTALK_OAUTH; + +/** + * 钉钉认证过滤器 + *

+ * https://open.dingtalk.com/document/orgapp-server/tutorial-obtaining-user-personal-information + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/8 21:11 + */ +@SuppressWarnings("DuplicatedCode") +public class DingtalkOauthAuthenticationFilter extends AbstractIdpAuthenticationProcessingFilter { + public final static String DEFAULT_FILTER_PROCESSES_URI = DINGTALK_OAUTH + .getLoginPathPrefix() + "/*"; + /** + * AntPathRequestMatcher + */ + public static final AntPathRequestMatcher REQUEST_MATCHER = new AntPathRequestMatcher( + DINGTALK_OAUTH.getLoginPathPrefix() + "/" + "{" + PROVIDER_ID + "}", HttpMethod.GET.name()); + + /** + * Creates a new instance + * + * @param identityProviderRepository the {@link IdentityProviderRepository} + * @param authenticationUserDetails {@link UserIdpService} + */ + public DingtalkOauthAuthenticationFilter(IdentityProviderRepository identityProviderRepository, + UserIdpService authenticationUserDetails) { + super(DEFAULT_FILTER_PROCESSES_URI, authenticationUserDetails, identityProviderRepository); + } + + /** + * 钉钉认证 + * + * @param request {@link HttpServletRequest} + * @param response {@link HttpServletRequest} + * @return {@link HttpServletRequest} + * @throws AuthenticationException {@link AuthenticationException} AuthenticationException + */ + @Override + public Authentication attemptAuthentication(HttpServletRequest request, + HttpServletResponse response) throws AuthenticationException, + IOException { + OAuth2AuthorizationRequest authorizationRequest = getOAuth2AuthorizationRequest(request, + response); + TraceUtils.put(UUID.randomUUID().toString()); + RequestMatcher.MatchResult matcher = REQUEST_MATCHER.matcher(request); + Map variables = matcher.getVariables(); + String providerId = variables.get(PROVIDER_ID); + //code 钉钉新版登录为 authCode + String code = request.getParameter(AUTH_CODE); + if (StringUtils.isEmpty(code)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_CODE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + // state + String state = request.getParameter(OAuth2ParameterNames.STATE); + if (StringUtils.isEmpty(state)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_STATE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + //验证state + if (!authorizationRequest.getState().equals(state)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_STATE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + //获取身份提供商 + IdentityProviderEntity provider = getIdentityProviderEntity(providerId); + DingTalkIdpOauthConfig idpOauthConfig = JSONObject.parseObject(provider.getConfig(), + DingTalkIdpOauthConfig.class); + if (Objects.isNull(idpOauthConfig)) { + logger.error("未查询到钉钉登录配置"); + //无效身份提供商 + OAuth2Error oauth2Error = new OAuth2Error(INVALID_IDP_CONFIG); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + String accessToken = getToken(code, idpOauthConfig); + Config config = new Config(); + config.protocol = "https"; + config.regionId = "central"; + GetUserHeaders getUserHeaders = new GetUserHeaders(); + getUserHeaders.xAcsDingtalkAccessToken = accessToken; + //获取用户个人信息,如需获取当前授权人的信息,unionId参数必须传me + GetUserResponse user; + try { + com.aliyun.dingtalkcontact_1_0.Client client = new com.aliyun.dingtalkcontact_1_0.Client( + config); + user = client.getUserWithOptions("me", getUserHeaders, new RuntimeOptions()); + } catch (Exception e) { + logger.error("钉钉认证获取用户信息失败: {}", e); + throw new TopIamException("钉钉认证获取用户信息失败", e); + } + //执行逻辑 + IdpUser idpUser = IdpUser.builder().openId(user.getBody().getOpenId()).build(); + return attemptAuthentication(request, response, DINGTALK_OAUTH, providerId, idpUser); + } + + /** + * 获取token + * + * @param authCode {@link String} + * @param config {@link DingTalkIdpOauthConfig} + * @return {@link String} + */ + public String getToken(String authCode, DingTalkIdpOauthConfig config) { + if (!Objects.isNull(cache)) { + cache.getIfPresent(OAuth2ParameterNames.ACCESS_TOKEN); + } + Config clientConfig = new Config(); + clientConfig.protocol = "https"; + clientConfig.regionId = "central"; + try { + Client client = new Client(clientConfig); + GetUserTokenRequest getUserTokenRequest = new GetUserTokenRequest() + //应用基础信息-应用信息的AppKey + .setClientId(config.getAppKey()) + //应用基础信息-应用信息的AppSecret + .setClientSecret(config.getAppSecret()).setCode(authCode) + .setGrantType("authorization_code"); + //获取用户个人token + GetUserTokenResponse getUserTokenResponse = client.getUserToken(getUserTokenRequest); + GetUserTokenResponseBody body = getUserTokenResponse.getBody(); + //放入缓存 + cache = CacheBuilder.newBuilder() + .concurrencyLevel(Runtime.getRuntime().availableProcessors()) + .expireAfterWrite(body.getExpireIn(), TimeUnit.SECONDS).build(); + cache.put(OAuth2ParameterNames.ACCESS_TOKEN, body.getAccessToken()); + return cache.getIfPresent(OAuth2ParameterNames.ACCESS_TOKEN); + } catch (Exception exception) { + throw new RuntimeException(exception.getMessage()); + } + } + + /** + * 缓存 + */ + private Cache cache; + + public static String getLoginUrl(String providerId) { + String url = ServerContextHelp.getPortalPublicBaseUrl() + + DINGTALK_OAUTH.getLoginPathPrefix() + "/" + providerId; + return HttpUrlUtils.format(url); + } + + public static RequestMatcher getRequestMatcher() { + return REQUEST_MATCHER; + } +} diff --git a/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/filter/DingtalkScanCodeAuthenticationFilter.java b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/filter/DingtalkScanCodeAuthenticationFilter.java new file mode 100644 index 00000000..a2df3bad --- /dev/null +++ b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/filter/DingtalkScanCodeAuthenticationFilter.java @@ -0,0 +1,245 @@ +/* + * eiam-authentication-dingtalk - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.dingtalk.filter; + +import java.io.IOException; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.http.HttpMethod; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.oauth2.core.OAuth2AuthenticationException; +import org.springframework.security.oauth2.core.OAuth2Error; +import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest; +import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; + +import com.alibaba.fastjson2.JSONObject; +import com.aliyun.dingtalkoauth2_1_0.Client; +import com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenRequest; +import com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenResponseBody; +import com.aliyun.teaopenapi.models.Config; +import com.dingtalk.api.DefaultDingTalkClient; +import com.dingtalk.api.DingTalkClient; +import com.dingtalk.api.request.OapiSnsGetuserinfoBycodeRequest; +import com.dingtalk.api.request.OapiUserGetUseridByUnionidRequest; +import com.dingtalk.api.request.OapiV2UserGetRequest; +import com.dingtalk.api.response.OapiSnsGetuserinfoBycodeResponse; +import com.dingtalk.api.response.OapiUserGetUseridByUnionidResponse; +import com.dingtalk.api.response.OapiV2UserGetResponse; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import com.taobao.api.ApiException; + +import cn.topiam.employee.authentication.common.filter.AbstractIdpAuthenticationProcessingFilter; +import cn.topiam.employee.authentication.common.modal.IdpUser; +import cn.topiam.employee.authentication.common.service.UserIdpService; +import cn.topiam.employee.authentication.dingtalk.DingTalkIdpScanCodeConfig; +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.enums.IdentityProviderType; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; +import cn.topiam.employee.core.context.ServerContextHelp; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.trace.TraceUtils; +import cn.topiam.employee.support.util.HttpUrlUtils; +import static cn.topiam.employee.authentication.dingtalk.constant.DingTalkAuthenticationConstants.*; +import static cn.topiam.employee.authentication.dingtalk.filter.DingtalkScanCodeAuthorizationRequestGetFilter.PROVIDER_ID; +import static cn.topiam.employee.common.enums.IdentityProviderType.DINGTALK_SCAN_CODE; + +/** + * 钉钉认证过滤器 + *

+ * https://open.dingtalk.com/document/orgapp-server/scan-qr-code-to-log-on-to-third-party-websites + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/8 21:11 + */ +@SuppressWarnings("DuplicatedCode") +public class DingtalkScanCodeAuthenticationFilter extends + AbstractIdpAuthenticationProcessingFilter { + public final static String DEFAULT_FILTER_PROCESSES_URI = DINGTALK_SCAN_CODE + .getLoginPathPrefix() + "/*"; + /** + * AntPathRequestMatcher + */ + public static final AntPathRequestMatcher REQUEST_MATCHER = new AntPathRequestMatcher( + DINGTALK_SCAN_CODE.getLoginPathPrefix() + "/" + "{" + PROVIDER_ID + "}", + HttpMethod.GET.name()); + + /** + * Creates a new instance + * + * @param identityProviderRepository the {@link IdentityProviderRepository} + * @param authenticationUserDetails {@link UserIdpService} + */ + public DingtalkScanCodeAuthenticationFilter(IdentityProviderRepository identityProviderRepository, + UserIdpService authenticationUserDetails) { + super(DEFAULT_FILTER_PROCESSES_URI, authenticationUserDetails, identityProviderRepository); + } + + /** + * 钉钉认证 + * + * @param request {@link HttpServletRequest} + * @param response {@link HttpServletRequest} + * @return {@link HttpServletRequest} + * @throws AuthenticationException {@link AuthenticationException} AuthenticationException + */ + @Override + public Authentication attemptAuthentication(HttpServletRequest request, + HttpServletResponse response) throws AuthenticationException, + IOException { + OAuth2AuthorizationRequest authorizationRequest = getOAuth2AuthorizationRequest(request, + response); + TraceUtils.put(UUID.randomUUID().toString()); + RequestMatcher.MatchResult matcher = REQUEST_MATCHER.matcher(request); + Map variables = matcher.getVariables(); + String providerId = variables.get(PROVIDER_ID); + //code + String code = request.getParameter(OAuth2ParameterNames.CODE); + if (StringUtils.isEmpty(code)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_CODE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + // state + String state = request.getParameter(OAuth2ParameterNames.STATE); + if (StringUtils.isEmpty(state)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_STATE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + if (!authorizationRequest.getState().equals(state)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_STATE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + //获取身份提供商 + IdentityProviderEntity provider = getIdentityProviderEntity(providerId); + DingTalkIdpScanCodeConfig config = JSONObject.parseObject(provider.getConfig(), + DingTalkIdpScanCodeConfig.class); + if (Objects.isNull(config)) { + logger.error("未查询到钉钉扫码登录配置"); + //无效身份提供商 + OAuth2Error oauth2Error = new OAuth2Error(INVALID_IDP_CONFIG); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + String accessToken = getToken(config); + // 1、通过临时授权码获取授权用户的个人信息 + DefaultDingTalkClient client = new DefaultDingTalkClient(GET_USERINFO_BY_CODE); + OapiSnsGetuserinfoBycodeRequest reqByCodeRequest = new OapiSnsGetuserinfoBycodeRequest(); + // 通过扫描二维码,跳转指定的redirect_uri后,向url中追加的code临时授权码 + reqByCodeRequest.setTmpAuthCode(code); + // 修改appid和appSecret为步骤三创建扫码登录时创建的appid和appSecret + OapiSnsGetuserinfoBycodeResponse userinfoByCodeResp; + try { + userinfoByCodeResp = client.execute(reqByCodeRequest, config.getAppKey(), + config.getAppSecret()); + } catch (ApiException e) { + throw new RuntimeException(e); + } + if (!userinfoByCodeResp.isSuccess()) { + logger.error("钉钉扫码认证获取用户信息失败: [" + userinfoByCodeResp.getBody() + "]"); + throw new TopIamException(userinfoByCodeResp.getErrmsg()); + } + // 2、根据unionid获取userid + client = new DefaultDingTalkClient(GET_USERID_BY_UNIONID); + OapiUserGetUseridByUnionidRequest req = new OapiUserGetUseridByUnionidRequest(); + req.setUnionid(userinfoByCodeResp.getUserInfo().getUnionid()); + OapiUserGetUseridByUnionidResponse rsp; + try { + rsp = client.execute(req, accessToken); + } catch (ApiException e) { + logger.error("钉钉扫码认证获取用户ID失败: [" + e.getErrMsg() + "]"); + throw new TopIamException("钉钉扫码认证获取用户ID失败", e); + } + if (!rsp.isSuccess()) { + logger.error("钉钉扫码认证获取用户ID失败: [" + rsp.getBody() + "]"); + throw new TopIamException(rsp.getErrmsg()); + } + // 3、根据userId获取用户信息 + DingTalkClient v2UserGetResponse = new DefaultDingTalkClient(GET_USERINFO_BY_USERID); + OapiV2UserGetRequest reqGetRequest = new OapiV2UserGetRequest(); + reqGetRequest.setUserid(rsp.getUserid()); + OapiV2UserGetResponse rspGetResponse; + try { + rspGetResponse = v2UserGetResponse.execute(reqGetRequest, accessToken); + } catch (ApiException e) { + logger.error("钉钉扫码认证获取用户信息失败: [" + e.getErrMsg() + "]"); + throw new TopIamException("钉钉扫码认证获取用户信息失败", e); + } + if (!rspGetResponse.isSuccess()) { + logger.error("钉钉扫码认证获取用户信息失败: [" + rspGetResponse.getBody() + "]"); + throw new TopIamException(rspGetResponse.getErrmsg()); + } + //4、执行逻辑 + OapiV2UserGetResponse.UserGetResponse result = rspGetResponse.getResult(); + IdpUser idpUser = IdpUser.builder().openId(result.getUserid()).build(); + return attemptAuthentication(request, response, IdentityProviderType.DINGTALK_SCAN_CODE, + providerId, idpUser); + } + + /** + * 获取token + * + * @return {@link String} + */ + public String getToken(DingTalkIdpScanCodeConfig config) { + if (!Objects.isNull(cache)) { + cache.getIfPresent(OAuth2ParameterNames.ACCESS_TOKEN); + } + Config clientConfig = new Config(); + clientConfig.protocol = "https"; + clientConfig.regionId = "central"; + try { + Client client = new Client(clientConfig); + GetAccessTokenRequest accessTokenRequest = new GetAccessTokenRequest(); + accessTokenRequest.setAppKey(config.getAppKey()); + accessTokenRequest.setAppSecret(config.getAppSecret()); + GetAccessTokenResponseBody body = client.getAccessToken(accessTokenRequest).getBody(); + //放入缓存 + cache = CacheBuilder.newBuilder() + .concurrencyLevel(Runtime.getRuntime().availableProcessors()) + .expireAfterWrite(body.getExpireIn(), TimeUnit.SECONDS).build(); + cache.put(OAuth2ParameterNames.ACCESS_TOKEN, body.getAccessToken()); + return cache.getIfPresent(OAuth2ParameterNames.ACCESS_TOKEN); + } catch (Exception exception) { + throw new RuntimeException(exception.getMessage()); + } + } + + /** + * 缓存 + */ + private Cache cache; + + public static String getLoginUrl(String providerId) { + String url = ServerContextHelp.getPortalPublicBaseUrl() + + DINGTALK_SCAN_CODE.getLoginPathPrefix() + "/" + providerId; + return HttpUrlUtils.format(url); + } + + public static RequestMatcher getRequestMatcher() { + return REQUEST_MATCHER; + } +} diff --git a/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/filter/DingtalkScanCodeAuthorizationRequestGetFilter.java b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/filter/DingtalkScanCodeAuthorizationRequestGetFilter.java new file mode 100644 index 00000000..38c1dfe3 --- /dev/null +++ b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/filter/DingtalkScanCodeAuthorizationRequestGetFilter.java @@ -0,0 +1,172 @@ +/* + * eiam-authentication-dingtalk - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.dingtalk.filter; + +import java.io.IOException; +import java.util.*; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.checkerframework.checker.nullness.qual.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.lang.NonNull; +import org.springframework.security.crypto.keygen.Base64StringKeyGenerator; +import org.springframework.security.crypto.keygen.StringKeyGenerator; +import org.springframework.security.oauth2.client.web.AuthorizationRequestRepository; +import org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizationRequestRepository; +import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest; +import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.util.Assert; +import org.springframework.web.filter.OncePerRequestFilter; + +import com.alibaba.fastjson2.JSONObject; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; + +import cn.topiam.employee.authentication.dingtalk.DingTalkIdpScanCodeConfig; +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; +import cn.topiam.employee.support.result.ApiRestResult; +import cn.topiam.employee.support.util.HttpResponseUtils; +import static org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames.CODE; +import static org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames.RESPONSE_TYPE; + +import static cn.topiam.employee.authentication.dingtalk.constant.DingTalkAuthenticationConstants.APP_ID; +import static cn.topiam.employee.authentication.dingtalk.constant.DingTalkAuthenticationConstants.SCAN_CODE_URL_AUTHORIZE; +import static cn.topiam.employee.authentication.dingtalk.filter.DingtalkScanCodeAuthenticationFilter.getLoginUrl; +import static cn.topiam.employee.common.enums.IdentityProviderType.DINGTALK_SCAN_CODE; + +/** + * 微信扫码登录请求重定向过滤器 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/20 20:22 + */ +@SuppressWarnings("ALL") +public class DingtalkScanCodeAuthorizationRequestGetFilter extends OncePerRequestFilter { + + private final Logger logger = LoggerFactory + .getLogger(DingtalkScanCodeAuthorizationRequestGetFilter.class); + + /** + * 提供商ID + */ + public static final String PROVIDER_ID = "providerId"; + + /** + * AntPathRequestMatcher + */ + public static final AntPathRequestMatcher DINGTALK_SCAN_CODE_REQUEST_MATCHER = new AntPathRequestMatcher( + DINGTALK_SCAN_CODE.getAuthorizationPathPrefix() + "/" + "{" + PROVIDER_ID + "}", + HttpMethod.GET.name()); + + /** + * 认证请求存储库 + */ + private final AuthorizationRequestRepository authorizationRequestRepository = new HttpSessionOAuth2AuthorizationRequestRepository(); + + private static final StringKeyGenerator DEFAULT_STATE_GENERATOR = new Base64StringKeyGenerator( + Base64.getUrlEncoder()); + private final IdentityProviderRepository identityProviderRepository; + + public DingtalkScanCodeAuthorizationRequestGetFilter(IdentityProviderRepository identityProviderRepository) { + this.identityProviderRepository = identityProviderRepository; + } + + @Override + protected void doFilterInternal(@NonNull HttpServletRequest request, + @NonNull HttpServletResponse response, + @NonNull FilterChain filterChain) throws IOException, + ServletException { + RequestMatcher.MatchResult matcher = DINGTALK_SCAN_CODE_REQUEST_MATCHER.matcher(request); + if (!matcher.isMatch()) { + filterChain.doFilter(request, response); + return; + } + Map variables = matcher.getVariables(); + //校验身份提供商 + String providerId = variables.get(PROVIDER_ID); + Optional optional = identityProviderRepository + .findByIdAndEnabledIsTrue(Long.valueOf(providerId)); + if (optional.isEmpty()) { + logger.error("身份提供商不存在"); + throw new NullPointerException("身份提供商不存在"); + } + IdentityProviderEntity entity = optional.get(); + DingTalkIdpScanCodeConfig config = JSONObject.parseObject(entity.getConfig(), + DingTalkIdpScanCodeConfig.class); + Assert.notNull(config, "钉钉登录配置不能为空"); + //构建授权请求 + //@formatter:off + HashMap<@Nullable String, @Nullable Object> attributes = Maps.newHashMap(); + String redirect = request.getParameter("redirect"); + if (StringUtils.isNoneBlank()) { + attributes.put("redirect", redirect); + } + OAuth2AuthorizationRequest.Builder builder = OAuth2AuthorizationRequest.authorizationCode() + .clientId(config.getAppKey()) + .scopes(Sets.newHashSet("snsapi_login")) + .authorizationUri(SCAN_CODE_URL_AUTHORIZE) + .redirectUri(getLoginUrl(providerId)) + .state(DEFAULT_STATE_GENERATOR.generateKey()) + .attributes(attributes); + builder.parameters(parameters -> { + HashMap linkedParameters = new LinkedHashMap<>(); + parameters.forEach((key, value) -> { + if (OAuth2ParameterNames.CLIENT_ID.equals(key)) { + linkedParameters.put(APP_ID, value); + } + if (OAuth2ParameterNames.SCOPE.equals(key)) { + linkedParameters.put(OAuth2ParameterNames.SCOPE, value); + } + if (OAuth2ParameterNames.STATE.equals(key)) { + linkedParameters.put(OAuth2ParameterNames.STATE, value); + } + if (OAuth2ParameterNames.REDIRECT_URI.equals(key)) { + linkedParameters.put(OAuth2ParameterNames.REDIRECT_URI, value); + } + }); + linkedParameters.put(RESPONSE_TYPE, CODE); + parameters.clear(); + parameters.putAll(linkedParameters); + }); + //@formatter:on + this.writeForAuthorization(request, response, builder.build()); + } + + private void writeForAuthorization(HttpServletRequest request, HttpServletResponse response, + OAuth2AuthorizationRequest authorizationRequest) throws IOException { + this.authorizationRequestRepository.saveAuthorizationRequest(authorizationRequest, request, + response); + HttpResponseUtils.flushResponseJson(response, HttpStatus.OK.value(), + ApiRestResult.ok(authorizationRequest.getAuthorizationRequestUri())); + } + + public static RequestMatcher getRequestMatcher() { + return DINGTALK_SCAN_CODE_REQUEST_MATCHER; + } +} diff --git a/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/package-info.java b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/package-info.java new file mode 100644 index 00000000..56942859 --- /dev/null +++ b/eiam-authentication/eiam-authentication-dingtalk/src/main/java/cn/topiam/employee/authentication/dingtalk/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-authentication-dingtalk - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.dingtalk; \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-feishu/pom.xml b/eiam-authentication/eiam-authentication-feishu/pom.xml new file mode 100644 index 00000000..4c9b3b6e --- /dev/null +++ b/eiam-authentication/eiam-authentication-feishu/pom.xml @@ -0,0 +1,42 @@ + + + + + eiam-authentication + cn.topiam + 1.0.0-beta1 + ../pom.xml + + 4.0.0 + + eiam-authentication-feishu + jar + + + + cn.topiam + eiam-authentication-core + ${project.version} + + + \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-feishu/src/main/java/cn/topiam/employee/authentication/feishu/configurer/package-info.java b/eiam-authentication/eiam-authentication-feishu/src/main/java/cn/topiam/employee/authentication/feishu/configurer/package-info.java new file mode 100644 index 00000000..553c02d0 --- /dev/null +++ b/eiam-authentication/eiam-authentication-feishu/src/main/java/cn/topiam/employee/authentication/feishu/configurer/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-authentication-feishu - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.feishu.configurer; \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-feishu/src/main/java/cn/topiam/employee/authentication/feishu/filter/FeiShuAuthenticationFilter.java b/eiam-authentication/eiam-authentication-feishu/src/main/java/cn/topiam/employee/authentication/feishu/filter/FeiShuAuthenticationFilter.java new file mode 100644 index 00000000..7c174b7b --- /dev/null +++ b/eiam-authentication/eiam-authentication-feishu/src/main/java/cn/topiam/employee/authentication/feishu/filter/FeiShuAuthenticationFilter.java @@ -0,0 +1,70 @@ +/* + * eiam-authentication-feishu - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.feishu.filter; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter; +import org.springframework.security.web.util.matcher.RequestMatcher; + +/** + * 飞书认证过滤器 + * https://open.feishu.cn/document/common-capabilities/sso/web-application-sso/qr-sdk-documentation + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/8 21:11 + */ +public class FeiShuAuthenticationFilter extends AbstractAuthenticationProcessingFilter { + + /** + * Creates a new instance + * + * @param requiresAuthenticationRequestMatcher the {@link RequestMatcher} used to + * determine if authentication is required. Cannot be null. + */ + protected FeiShuAuthenticationFilter(RequestMatcher requiresAuthenticationRequestMatcher) { + super(requiresAuthenticationRequestMatcher); + } + + /** + * qq认证 + * + * @param request {@link HttpServletRequest} + * @param response {@link HttpServletRequest} + * @return {@link HttpServletRequest} + * @throws AuthenticationException AuthenticationException + * @throws IOException IOException + * @throws ServletException ServletException + */ + @Override + public Authentication attemptAuthentication(HttpServletRequest request, + HttpServletResponse response) throws AuthenticationException, + IOException, + ServletException { + //@formatter:off + + //@formatter:on + return null; + } +} diff --git a/eiam-authentication/eiam-authentication-feishu/src/main/java/cn/topiam/employee/authentication/feishu/package-info.java b/eiam-authentication/eiam-authentication-feishu/src/main/java/cn/topiam/employee/authentication/feishu/package-info.java new file mode 100644 index 00000000..9469c16d --- /dev/null +++ b/eiam-authentication/eiam-authentication-feishu/src/main/java/cn/topiam/employee/authentication/feishu/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-authentication-feishu - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.feishu; \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-mfa/pom.xml b/eiam-authentication/eiam-authentication-mfa/pom.xml new file mode 100644 index 00000000..fcfc3053 --- /dev/null +++ b/eiam-authentication/eiam-authentication-mfa/pom.xml @@ -0,0 +1,42 @@ + + + + + eiam-authentication + cn.topiam + 1.0.0-beta1 + ../pom.xml + + 4.0.0 + + eiam-authentication-mfa + jar + + + + cn.topiam + eiam-authentication-core + ${project.version} + + + \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-mfa/src/main/java/cn/topiam/employee/authentication/mfa/package-info.java b/eiam-authentication/eiam-authentication-mfa/src/main/java/cn/topiam/employee/authentication/mfa/package-info.java new file mode 100644 index 00000000..3b90cde1 --- /dev/null +++ b/eiam-authentication/eiam-authentication-mfa/src/main/java/cn/topiam/employee/authentication/mfa/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-authentication-mfa - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.mfa; \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-qq/pom.xml b/eiam-authentication/eiam-authentication-qq/pom.xml new file mode 100644 index 00000000..7c60ea83 --- /dev/null +++ b/eiam-authentication/eiam-authentication-qq/pom.xml @@ -0,0 +1,42 @@ + + + + + eiam-authentication + cn.topiam + 1.0.0-beta1 + ../pom.xml + + 4.0.0 + + eiam-authentication-qq + jar + + + + cn.topiam + eiam-authentication-core + ${project.version} + + + \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/QqIdpOauthConfig.java b/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/QqIdpOauthConfig.java new file mode 100644 index 00000000..b701ec37 --- /dev/null +++ b/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/QqIdpOauthConfig.java @@ -0,0 +1,52 @@ +/* + * eiam-authentication-qq - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.qq; + +import java.io.Serial; + +import javax.validation.constraints.NotBlank; + +import cn.topiam.employee.authentication.common.config.IdentityProviderConfig; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * QQ 认证配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/4/4 23:58 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class QqIdpOauthConfig extends IdentityProviderConfig { + @Serial + private static final long serialVersionUID = -6850223527422243076L; + + /** + * APP ID + */ + @NotBlank(message = "APP ID 不能为空") + private String appId; + + /** + * APP Key + */ + @NotBlank(message = "APP KEY 不能为空") + private String appKey; +} diff --git a/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/configurer/QqOauthAuthenticationConfigurer.java b/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/configurer/QqOauthAuthenticationConfigurer.java new file mode 100644 index 00000000..a5879b62 --- /dev/null +++ b/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/configurer/QqOauthAuthenticationConfigurer.java @@ -0,0 +1,93 @@ +/* + * eiam-authentication-qq - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.qq.configurer; + +import org.springframework.security.config.annotation.web.HttpSecurityBuilder; +import org.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer; +import org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter; +import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.OrRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.util.Assert; + +import cn.topiam.employee.authentication.common.service.UserIdpService; +import cn.topiam.employee.authentication.qq.filter.QqOAuth2AuthorizationRequestRedirectFilter; +import cn.topiam.employee.authentication.qq.filter.QqOAuth2LoginAuthenticationFilter; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; + +/** + * 认证配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/10 22:58 + */ +public final class QqOauthAuthenticationConfigurer> extends + AbstractAuthenticationFilterConfigurer, QqOAuth2LoginAuthenticationFilter> { + + private final IdentityProviderRepository identityProviderRepository; + private final UserIdpService userIdpService; + + public QqOauthAuthenticationConfigurer(IdentityProviderRepository identityProviderRepository, + UserIdpService userIdpService) { + Assert.notNull(identityProviderRepository, "identityProviderRepository must not be null"); + Assert.notNull(userIdpService, "userIdpService must not be null"); + this.identityProviderRepository = identityProviderRepository; + this.userIdpService = userIdpService; + } + + /** + * Create the {@link RequestMatcher} given a loginProcessingUrl + * + * @param loginProcessingUrl creates the {@link RequestMatcher} based upon the + * loginProcessingUrl + * @return the {@link RequestMatcher} to use based upon the loginProcessingUrl + */ + @Override + protected RequestMatcher createLoginProcessingUrlMatcher(String loginProcessingUrl) { + return new AntPathRequestMatcher(loginProcessingUrl); + } + + @Override + public void init(H http) throws Exception { + //设置登录成功失败处理器 + //QQ扫码登录认证 + QqOAuth2LoginAuthenticationFilter loginAuthenticationFilter = new QqOAuth2LoginAuthenticationFilter( + identityProviderRepository, userIdpService); + this.setAuthenticationFilter(loginAuthenticationFilter); + //处理URL + super.loginProcessingUrl(QqOAuth2LoginAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI); + super.init(http); + } + + @Override + public void configure(H http) throws Exception { + //QQ扫码请求重定向 + QqOAuth2AuthorizationRequestRedirectFilter requestRedirectFilter = new QqOAuth2AuthorizationRequestRedirectFilter( + identityProviderRepository); + http.addFilterBefore(requestRedirectFilter, OAuth2AuthorizationRequestRedirectFilter.class); + http.addFilterBefore(this.getAuthenticationFilter(), OAuth2LoginAuthenticationFilter.class); + super.configure(http); + } + + public RequestMatcher getRequestMatcher() { + // + return new OrRequestMatcher(QqOAuth2AuthorizationRequestRedirectFilter.getRequestMatcher(), + QqOAuth2LoginAuthenticationFilter.getRequestMatcher()); + } +} diff --git a/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/constant/QqAuthenticationConstants.java b/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/constant/QqAuthenticationConstants.java new file mode 100644 index 00000000..f1b74eda --- /dev/null +++ b/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/constant/QqAuthenticationConstants.java @@ -0,0 +1,44 @@ +/* + * eiam-authentication-qq - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.portal.idp.qq.constant; + +/** + * 企业微信 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/9 22:19 + */ +public final class QqAuthenticationConstants { + /** + * 获取授权码地址 + */ + public static final String URL_AUTHORIZE = "https://graph.qq.com/oauth2.0/authorize"; + /** + * 获取令牌地址 + */ + public static final String URL_GET_ACCESS_TOKEN = "https://graph.qq.com/oauth2.0/token"; + /** + * 获取 openId 的地址 + */ + public static final String URL_GET_OPEN_ID = "https://graph.qq.com/oauth2.0/me"; + /** + * 获取用户信息的地址 + */ + public static final String URL_GET_USER_INFO = "https://graph.qq.com/user/get_user_info"; + +} diff --git a/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/filter/QqOAuth2AuthorizationRequestRedirectFilter.java b/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/filter/QqOAuth2AuthorizationRequestRedirectFilter.java new file mode 100644 index 00000000..6c1e509e --- /dev/null +++ b/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/filter/QqOAuth2AuthorizationRequestRedirectFilter.java @@ -0,0 +1,139 @@ +/* + * eiam-authentication-qq - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.qq.filter; + +import java.io.IOException; +import java.util.Base64; +import java.util.Map; +import java.util.Optional; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpMethod; +import org.springframework.lang.NonNull; +import org.springframework.security.crypto.keygen.Base64StringKeyGenerator; +import org.springframework.security.crypto.keygen.StringKeyGenerator; +import org.springframework.security.oauth2.client.web.AuthorizationRequestRepository; +import org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizationRequestRepository; +import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest; +import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames; +import org.springframework.security.web.DefaultRedirectStrategy; +import org.springframework.security.web.RedirectStrategy; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.util.Assert; +import org.springframework.web.filter.OncePerRequestFilter; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.authentication.qq.QqIdpOauthConfig; +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; +import static cn.topiam.employee.authentication.qq.filter.QqOAuth2LoginAuthenticationFilter.getLoginUrl; +import static cn.topiam.employee.common.enums.IdentityProviderType.QQ; +import static cn.topiam.employee.portal.idp.qq.constant.QqAuthenticationConstants.URL_AUTHORIZE; + +/** + * 微信扫码登录请求重定向过滤器 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/20 20:22 + */ +@SuppressWarnings("ALL") +public class QqOAuth2AuthorizationRequestRedirectFilter extends OncePerRequestFilter { + + private final Logger logger = LoggerFactory + .getLogger(QqOAuth2AuthorizationRequestRedirectFilter.class); + /** + * 提供商ID + */ + public static final String PROVIDER_ID = "providerId"; + + /** + * AntPathRequestMatcher + */ + public static final AntPathRequestMatcher QQ_REQUEST_MATCHER = new AntPathRequestMatcher( + QQ.getAuthorizationPathPrefix() + "/" + "{" + PROVIDER_ID + "}", HttpMethod.GET.name()); + + /** + * 重定向策略 + */ + private final RedirectStrategy authorizationRedirectStrategy = new DefaultRedirectStrategy(); + + /** + * 认证请求存储库 + */ + private final AuthorizationRequestRepository authorizationRequestRepository = new HttpSessionOAuth2AuthorizationRequestRepository(); + + private static final StringKeyGenerator DEFAULT_STATE_GENERATOR = new Base64StringKeyGenerator( + Base64.getUrlEncoder()); + private final IdentityProviderRepository identityProviderRepository; + + public QqOAuth2AuthorizationRequestRedirectFilter(IdentityProviderRepository identityProviderRepository) { + this.identityProviderRepository = identityProviderRepository; + } + + @Override + protected void doFilterInternal(@NonNull HttpServletRequest request, + @NonNull HttpServletResponse response, + @NonNull FilterChain filterChain) throws IOException, + ServletException { + RequestMatcher.MatchResult matcher = QQ_REQUEST_MATCHER.matcher(request); + if (!matcher.isMatch()) { + filterChain.doFilter(request, response); + return; + } + Map variables = matcher.getVariables(); + String providerId = variables.get(PROVIDER_ID); + Optional optional = identityProviderRepository + .findByIdAndEnabledIsTrue(Long.valueOf(providerId)); + if (optional.isEmpty()) { + throw new NullPointerException("未查询到身份提供商信息"); + } + IdentityProviderEntity entity = optional.get(); + QqIdpOauthConfig config = JSONObject.parseObject(entity.getConfig(), + QqIdpOauthConfig.class); + Assert.notNull(config, "QQ登录配置不能为空"); + //构建授权请求 + OAuth2AuthorizationRequest.Builder builder = OAuth2AuthorizationRequest.authorizationCode() + .clientId(config.getAppId()).authorizationUri(URL_AUTHORIZE) + .redirectUri(getLoginUrl(providerId)).state(DEFAULT_STATE_GENERATOR.generateKey()); + builder.parameters(parameters -> { + parameters.put(OAuth2ParameterNames.RESPONSE_TYPE, OAuth2ParameterNames.CODE); + }); + this.sendRedirectForAuthorization(request, response, builder.build()); + } + + private void sendRedirectForAuthorization(HttpServletRequest request, + HttpServletResponse response, + OAuth2AuthorizationRequest authorizationRequest) throws IOException { + this.authorizationRequestRepository.saveAuthorizationRequest(authorizationRequest, request, + response); + this.authorizationRedirectStrategy.sendRedirect(request, response, + authorizationRequest.getAuthorizationRequestUri()); + } + + public static RequestMatcher getRequestMatcher() { + return QQ_REQUEST_MATCHER; + } +} diff --git a/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/filter/QqOAuth2LoginAuthenticationFilter.java b/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/filter/QqOAuth2LoginAuthenticationFilter.java new file mode 100644 index 00000000..5d24ad46 --- /dev/null +++ b/eiam-authentication/eiam-authentication-qq/src/main/java/cn/topiam/employee/authentication/qq/filter/QqOAuth2LoginAuthenticationFilter.java @@ -0,0 +1,170 @@ +/* + * eiam-authentication-qq - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.qq.filter; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.http.HttpMethod; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.oauth2.core.OAuth2AuthenticationException; +import org.springframework.security.oauth2.core.OAuth2Error; +import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest; +import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames; +import org.springframework.security.oauth2.core.oidc.OidcScopes; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; + +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.authentication.common.filter.AbstractIdpAuthenticationProcessingFilter; +import cn.topiam.employee.authentication.common.modal.IdpUser; +import cn.topiam.employee.authentication.common.service.UserIdpService; +import cn.topiam.employee.authentication.qq.QqIdpOauthConfig; +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; +import cn.topiam.employee.core.context.ServerContextHelp; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.trace.TraceUtils; +import cn.topiam.employee.support.util.HttpClientUtils; +import static com.nimbusds.oauth2.sdk.GrantType.AUTHORIZATION_CODE; + +import static cn.topiam.employee.authentication.qq.filter.QqOAuth2AuthorizationRequestRedirectFilter.PROVIDER_ID; +import static cn.topiam.employee.common.enums.IdentityProviderType.QQ; +import static cn.topiam.employee.portal.idp.qq.constant.QqAuthenticationConstants.URL_GET_ACCESS_TOKEN; +import static cn.topiam.employee.portal.idp.qq.constant.QqAuthenticationConstants.URL_GET_OPEN_ID; + +/** + * QQ登录 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/8 21:11 + */ +@SuppressWarnings({ "AlibabaClassNamingShouldBeCamel", "DuplicatedCode" }) +public class QqOAuth2LoginAuthenticationFilter extends AbstractIdpAuthenticationProcessingFilter { + final String ERROR_CODE = "error"; + public final static String DEFAULT_FILTER_PROCESSES_URI = QQ.getLoginPathPrefix() + + "/*"; + public static final AntPathRequestMatcher REQUEST_MATCHER = new AntPathRequestMatcher( + QQ.getLoginPathPrefix() + "/" + "{" + PROVIDER_ID + "}", HttpMethod.GET.name()); + + /** + * Creates a new instance + * + * @param identityProviderRepository the {@link IdentityProviderRepository} + * @param authenticationUserDetails {@link UserIdpService} + */ + public QqOAuth2LoginAuthenticationFilter(IdentityProviderRepository identityProviderRepository, + UserIdpService authenticationUserDetails) { + super(DEFAULT_FILTER_PROCESSES_URI, authenticationUserDetails, identityProviderRepository); + } + + /** + * QQ认证 + * + * @param request {@link HttpServletRequest} + * @param response {@link HttpServletRequest} + * @return {@link HttpServletRequest} + * @throws AuthenticationException {@link AuthenticationException} AuthenticationException + */ + @Override + public Authentication attemptAuthentication(HttpServletRequest request, + HttpServletResponse response) throws AuthenticationException, + IOException { + OAuth2AuthorizationRequest authorizationRequest = getOAuth2AuthorizationRequest(request, + response); + TraceUtils.put(UUID.randomUUID().toString()); + RequestMatcher.MatchResult matcher = REQUEST_MATCHER.matcher(request); + Map variables = matcher.getVariables(); + String providerId = variables.get(PROVIDER_ID); + //code + String code = request.getParameter(OAuth2ParameterNames.CODE); + if (StringUtils.isEmpty(code)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_CODE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + // state + String state = request.getParameter(OAuth2ParameterNames.STATE); + if (StringUtils.isEmpty(state)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_STATE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + if (!authorizationRequest.getState().equals(state)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_STATE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + //获取身份提供商 + IdentityProviderEntity provider = getIdentityProviderEntity(providerId); + QqIdpOauthConfig config = JSONObject.parseObject(provider.getConfig(), + QqIdpOauthConfig.class); + if (Objects.isNull(config)) { + logger.error("未查询到QQ登录配置"); + //无效身份提供商 + OAuth2Error oauth2Error = new OAuth2Error(INVALID_IDP_CONFIG); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + //获取access token + HashMap param = new HashMap<>(16); + param.put(OAuth2ParameterNames.GRANT_TYPE, AUTHORIZATION_CODE.getValue()); + param.put(OAuth2ParameterNames.CLIENT_ID, config.getAppId().trim()); + param.put(OAuth2ParameterNames.CLIENT_SECRET, config.getAppKey().trim()); + param.put(OAuth2ParameterNames.CODE, code.trim()); + param.put(OAuth2ParameterNames.REDIRECT_URI, getLoginUrl(providerId)); + param.put("fmt", "json"); + //注意:QQ不能使用编码后的get请求,否则会报 {"error_description":"redirect uri is illegal","error":100010} + JSONObject result = JSON.parseObject(HttpClientUtils.doGet(URL_GET_ACCESS_TOKEN, param)); + if (!Objects.isNull(result.getString(ERROR_CODE))) { + logger.error("获取access_token发生错误: {}" + result.toJSONString()); + throw new TopIamException("获取access_token发生错误: " + result.toJSONString()); + } + // 获取openId信息 + param = new HashMap<>(16); + param.put(OAuth2ParameterNames.ACCESS_TOKEN, + result.getString(OAuth2ParameterNames.ACCESS_TOKEN)); + param.put("fmt", "json"); + result = JSON.parseObject(HttpClientUtils.doGet(URL_GET_OPEN_ID, param)); + if (!Objects.isNull(result.getString(ERROR_CODE))) { + logger.error("获取QQ用户OpenID发生错误: {}" + result.toJSONString()); + throw new TopIamException("获取QQ用户OpenID发生错误: " + result.toJSONString()); + } + // 返回 + String openId = result.getString(OidcScopes.OPENID); + IdpUser idpUser = IdpUser.builder().openId(openId).build(); + return attemptAuthentication(request, response, QQ, providerId, idpUser); + + } + + public static String getLoginUrl(String providerId) { + String url = ServerContextHelp.getPortalPublicBaseUrl() + "/" + QQ.getLoginPathPrefix() + + "/" + providerId; + return url.replaceAll("(?. + */ +package cn.topiam.employee.authentication.qq; \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-sms/pom.xml b/eiam-authentication/eiam-authentication-sms/pom.xml new file mode 100644 index 00000000..de986aa8 --- /dev/null +++ b/eiam-authentication/eiam-authentication-sms/pom.xml @@ -0,0 +1,42 @@ + + + + + eiam-authentication + cn.topiam + 1.0.0-beta1 + ../pom.xml + + 4.0.0 + + eiam-authentication-sms + jar + + + + cn.topiam + eiam-authentication-core + ${project.version} + + + \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/configurer/SmsAuthenticationConfigurer.java b/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/configurer/SmsAuthenticationConfigurer.java new file mode 100644 index 00000000..8756a373 --- /dev/null +++ b/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/configurer/SmsAuthenticationConfigurer.java @@ -0,0 +1,78 @@ +/* + * eiam-authentication-sms - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.sms.configurer; + +import org.springframework.security.config.annotation.web.HttpSecurityBuilder; +import org.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.util.Assert; + +import cn.topiam.employee.authentication.sms.filter.SmsAuthenticationFilter; + +/** + * 认证配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/10 22:58 + */ +public final class SmsAuthenticationConfigurer> extends + AbstractAuthenticationFilterConfigurer, SmsAuthenticationFilter> { + private final UserDetailsService userDetailsService; + + public SmsAuthenticationConfigurer(UserDetailsService userDetailsService) { + Assert.notNull(userDetailsService, "userDetailsService must not be null"); + this.userDetailsService = userDetailsService; + } + + /** + * Create the {@link RequestMatcher} given a loginProcessingUrl + * + * @param loginProcessingUrl creates the {@link RequestMatcher} based upon the + * loginProcessingUrl + * @return the {@link RequestMatcher} to use based upon the loginProcessingUrl + */ + @Override + protected RequestMatcher createLoginProcessingUrlMatcher(String loginProcessingUrl) { + return new AntPathRequestMatcher(loginProcessingUrl); + } + + @Override + public void init(H http) throws Exception { + //SMS + SmsAuthenticationFilter loginAuthenticationFilter = new SmsAuthenticationFilter( + userDetailsService); + this.setAuthenticationFilter(loginAuthenticationFilter); + //处理URL + super.loginProcessingUrl(SmsAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI); + super.init(http); + } + + @Override + public void configure(H http) throws Exception { + http.addFilterAfter(this.getAuthenticationFilter(), + UsernamePasswordAuthenticationFilter.class); + super.configure(http); + } + + public RequestMatcher getRequestMatcher() { + return SmsAuthenticationFilter.getRequestMatcher(); + } +} diff --git a/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/configurer/package-info.java b/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/configurer/package-info.java new file mode 100644 index 00000000..355381c4 --- /dev/null +++ b/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/configurer/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-authentication-sms - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.sms.configurer; \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/filter/SmsAuthenticationFilter.java b/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/filter/SmsAuthenticationFilter.java new file mode 100644 index 00000000..e11fb81b --- /dev/null +++ b/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/filter/SmsAuthenticationFilter.java @@ -0,0 +1,148 @@ +/* + * eiam-authentication-sms - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.sms.filter; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.security.authentication.AuthenticationServiceException; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.util.Assert; + +import cn.topiam.employee.core.security.authentication.SmsAuthentication; +import cn.topiam.employee.support.result.ApiRestResult; +import cn.topiam.employee.support.util.HttpResponseUtils; +import static cn.topiam.employee.common.constants.AuthorizeConstants.SMS_LOGIN; +import static cn.topiam.employee.support.exception.enums.ExceptionStatus.EX000102; + +/** + * SmsAuthenticationFilter + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/16 21:34 + */ +public class SmsAuthenticationFilter extends AbstractAuthenticationProcessingFilter { + + public static final String PHONE_KEY = "phone"; + /** + * 请求方法 + */ + public static final String METHOD = "POST"; + + private String phoneParameter = PHONE_KEY; + /** + * 是否值处理POST请求 + */ + private boolean postOnly = true; + + public final static String DEFAULT_FILTER_PROCESSES_URI = SMS_LOGIN; + + public static final RequestMatcher SMS_LOGIN_MATCHER = new AntPathRequestMatcher( + DEFAULT_FILTER_PROCESSES_URI, HttpMethod.POST.name()); + + public SmsAuthenticationFilter(UserDetailsService userDetailsService) { + super(SMS_LOGIN_MATCHER); + this.userDetailsService = userDetailsService; + } + + @Override + public Authentication attemptAuthentication(HttpServletRequest request, + HttpServletResponse response) throws AuthenticationException { + try { + if (postOnly && !METHOD.equalsIgnoreCase(request.getMethod())) { + throw new AuthenticationServiceException( + "Authentication method not supported: " + request.getMethod()); + } + // 获取手机号 + String phone = StringUtils.defaultString(obtainUsername(request), "").trim(); + UserDetails userDetails = userDetailsService.loadUserByUsername(phone); + SmsAuthentication authentication = new SmsAuthentication(userDetails, phone, + userDetails.getAuthorities()); + // Allow subclasses to set the "details" property + setDetails(request, authentication); + return authentication; + } catch (Exception e) { + HttpResponseUtils.flushResponseJson(response, HttpStatus.BAD_REQUEST.value(), + ApiRestResult.builder().status(EX000102.getCode()).message(EX000102.getMessage()) + .build()); + return null; + } + } + + /** + * Enables subclasses to override the composition of the username, such as + * by including additional values and a separator. + * + * @param request so that request attributes can be retrieved + * @return the username that will be presented in the + * Authentication request token to the + * AuthenticationManager + */ + protected String obtainUsername(HttpServletRequest request) { + return request.getParameter(phoneParameter); + } + + /** + * Provided so that subclasses may configure what is put into the + * authentication request's details property. + * + * @param request that an authentication request is being created for + * @param authRequest the authentication request object that should have its details + * set + */ + protected void setDetails(HttpServletRequest request, SmsAuthentication authRequest) { + authRequest.setDetails(authenticationDetailsSource.buildDetails(request)); + } + + /** + * Defines whether only HTTP POST requests will be allowed by this filter. + * If set to true, and an authentication request is received which is not a + * POST request, an exception will be raised immediately and authentication + * will not be attempted. The unsuccessfulAuthentication() method + * will be called as if handling a failed authentication. + *

+ * Defaults to true but may be overridden by subclasses. + */ + public void setPostOnly(boolean postOnly) { + this.postOnly = postOnly; + } + + public final String getPhoneParameter() { + return phoneParameter; + } + + public void setPhoneParameter(String phoneParameter) { + Assert.hasText(phoneParameter, "Mobile parameter must not be empty or null"); + this.phoneParameter = phoneParameter; + } + + public static RequestMatcher getRequestMatcher() { + return SMS_LOGIN_MATCHER; + } + + private final UserDetailsService userDetailsService; +} diff --git a/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/filter/package-info.java b/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/filter/package-info.java new file mode 100644 index 00000000..2b01939c --- /dev/null +++ b/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/filter/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-authentication-sms - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.sms.filter; \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/package-info.java b/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/package-info.java new file mode 100644 index 00000000..2c8abe80 --- /dev/null +++ b/eiam-authentication/eiam-authentication-sms/src/main/java/cn/topiam/employee/authentication/sms/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-authentication-sms - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.sms; \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-wechat/pom.xml b/eiam-authentication/eiam-authentication-wechat/pom.xml new file mode 100644 index 00000000..7d6bf0c9 --- /dev/null +++ b/eiam-authentication/eiam-authentication-wechat/pom.xml @@ -0,0 +1,42 @@ + + + + + eiam-authentication + cn.topiam + 1.0.0-beta1 + ../pom.xml + + 4.0.0 + + eiam-authentication-wechat + jar + + + + cn.topiam + eiam-authentication-core + ${project.version} + + + \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/WeChatIdpScanCodeConfig.java b/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/WeChatIdpScanCodeConfig.java new file mode 100644 index 00000000..7cd73424 --- /dev/null +++ b/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/WeChatIdpScanCodeConfig.java @@ -0,0 +1,51 @@ +/* + * eiam-authentication-wechat - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.wechat; + +import java.io.Serial; + +import javax.validation.constraints.NotBlank; + +import cn.topiam.employee.authentication.common.config.IdentityProviderConfig; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 微信开放平台扫码登录 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/9 22:07 21: + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WeChatIdpScanCodeConfig extends IdentityProviderConfig { + @Serial + private static final long serialVersionUID = -5831048603320371078L; + /** + * 客户端id + */ + @NotBlank(message = "应用AppId不能为空") + private String appId; + + /** + * 客户端Secret + */ + @NotBlank(message = "应用AppId不能为空") + private String appSecret; +} diff --git a/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/configurer/WeChatScanCodeAuthenticationConfigurer.java b/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/configurer/WeChatScanCodeAuthenticationConfigurer.java new file mode 100644 index 00000000..d825c90b --- /dev/null +++ b/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/configurer/WeChatScanCodeAuthenticationConfigurer.java @@ -0,0 +1,93 @@ +/* + * eiam-authentication-wechat - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.wechat.configurer; + +import org.springframework.security.config.annotation.web.HttpSecurityBuilder; +import org.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer; +import org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter; +import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.OrRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.util.Assert; + +import cn.topiam.employee.authentication.common.service.UserIdpService; +import cn.topiam.employee.authentication.wechat.filter.WeChatScanCodeAuthorizationRequestRedirectFilter; +import cn.topiam.employee.authentication.wechat.filter.WeChatScanCodeLoginAuthenticationFilter; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; + +/** + * 认证配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/10 22:58 + */ +public final class WeChatScanCodeAuthenticationConfigurer> extends + AbstractAuthenticationFilterConfigurer, WeChatScanCodeLoginAuthenticationFilter> { + + private final IdentityProviderRepository identityProviderRepository; + private final UserIdpService userIdpService; + + public WeChatScanCodeAuthenticationConfigurer(IdentityProviderRepository identityProviderRepository, + UserIdpService userIdpService) { + Assert.notNull(identityProviderRepository, "identityProviderRepository must not be null"); + Assert.notNull(userIdpService, "userIdpService must not be null"); + this.identityProviderRepository = identityProviderRepository; + this.userIdpService = userIdpService; + } + + /** + * Create the {@link RequestMatcher} given a loginProcessingUrl + * + * @param loginProcessingUrl creates the {@link RequestMatcher} based upon the + * loginProcessingUrl + * @return the {@link RequestMatcher} to use based upon the loginProcessingUrl + */ + @Override + protected RequestMatcher createLoginProcessingUrlMatcher(String loginProcessingUrl) { + return new AntPathRequestMatcher(loginProcessingUrl); + } + + @Override + public void init(H http) throws Exception { + //微信扫码登录认证 + WeChatScanCodeLoginAuthenticationFilter loginAuthenticationFilter = new WeChatScanCodeLoginAuthenticationFilter( + identityProviderRepository, userIdpService); + this.setAuthenticationFilter(loginAuthenticationFilter); + //处理URL + super.loginProcessingUrl( + WeChatScanCodeLoginAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI); + super.init(http); + } + + @Override + public void configure(H http) throws Exception { + //微信扫码请求重定向 + WeChatScanCodeAuthorizationRequestRedirectFilter requestRedirectFilter = new WeChatScanCodeAuthorizationRequestRedirectFilter( + identityProviderRepository); + http.addFilterBefore(requestRedirectFilter, OAuth2AuthorizationRequestRedirectFilter.class); + http.addFilterBefore(this.getAuthenticationFilter(), OAuth2LoginAuthenticationFilter.class); + super.configure(http); + } + + public RequestMatcher getRequestMatcher() { + return new OrRequestMatcher( + WeChatScanCodeAuthorizationRequestRedirectFilter.getRequestMatcher(), + WeChatScanCodeLoginAuthenticationFilter.getRequestMatcher()); + } +} diff --git a/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/constant/WeChatAuthenticationConstants.java b/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/constant/WeChatAuthenticationConstants.java new file mode 100644 index 00000000..7de04231 --- /dev/null +++ b/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/constant/WeChatAuthenticationConstants.java @@ -0,0 +1,37 @@ +/* + * eiam-authentication-wechat - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.wechat.constant; + +/** + * 微信认证常量 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/9 22:19 + */ +public final class WeChatAuthenticationConstants { + + public static final String AUTHORIZATION_REQUEST = "https://open.weixin.qq.com/connect/qrconnect"; + public static final String ACCESS_TOKEN = "https://api.weixin.qq.com/sns/oauth2/access_token"; + public static final String USER_INFO = "https://api.weixin.qq.com/sns/userinfo"; + public static final String APP_ID = "appId"; + public static final String SNSAPI_LOGIN = "snsapi_login"; + public static final String ERROR_CODE = "errcode"; + public static final String SECRET = "secret"; + public static final String HREF = "href"; + +} diff --git a/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/filter/WeChatScanCodeAuthorizationRequestRedirectFilter.java b/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/filter/WeChatScanCodeAuthorizationRequestRedirectFilter.java new file mode 100644 index 00000000..8f981816 --- /dev/null +++ b/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/filter/WeChatScanCodeAuthorizationRequestRedirectFilter.java @@ -0,0 +1,175 @@ +/* + * eiam-authentication-wechat - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.wechat.filter; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.*; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpMethod; +import org.springframework.lang.NonNull; +import org.springframework.security.crypto.keygen.Base64StringKeyGenerator; +import org.springframework.security.crypto.keygen.StringKeyGenerator; +import org.springframework.security.oauth2.client.web.AuthorizationRequestRepository; +import org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizationRequestRepository; +import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest; +import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames; +import org.springframework.security.web.DefaultRedirectStrategy; +import org.springframework.security.web.RedirectStrategy; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.util.Assert; +import org.springframework.web.filter.OncePerRequestFilter; + +import com.alibaba.fastjson2.JSONObject; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; + +import cn.topiam.employee.authentication.wechat.WeChatIdpScanCodeConfig; +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; +import static cn.topiam.employee.authentication.wechat.constant.WeChatAuthenticationConstants.*; +import static cn.topiam.employee.common.enums.IdentityProviderType.WECHAT_SCAN_CODE; + +/** + * 微信扫码登录请求重定向过滤器 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/20 20:22 + */ +@SuppressWarnings("DuplicatedCode") +public class WeChatScanCodeAuthorizationRequestRedirectFilter extends OncePerRequestFilter { + + private final Logger logger = LoggerFactory + .getLogger(WeChatScanCodeAuthorizationRequestRedirectFilter.class); + + /** + * 提供商ID + */ + public static final String PROVIDER_ID = "providerId"; + + /** + * AntPathRequestMatcher + */ + public static final AntPathRequestMatcher WE_CHAT_SCAN_CODE_REQUEST_MATCHER = new AntPathRequestMatcher( + WECHAT_SCAN_CODE.getAuthorizationPathPrefix() + "/" + "{" + PROVIDER_ID + "}", + HttpMethod.GET.name()); + + /** + * 重定向策略 + */ + private final RedirectStrategy authorizationRedirectStrategy = new DefaultRedirectStrategy(); + + /** + * 认证请求存储库 + */ + private final AuthorizationRequestRepository authorizationRequestRepository = new HttpSessionOAuth2AuthorizationRequestRepository(); + + private static final StringKeyGenerator DEFAULT_STATE_GENERATOR = new Base64StringKeyGenerator( + Base64.getUrlEncoder()); + private final IdentityProviderRepository identityProviderRepository; + + public WeChatScanCodeAuthorizationRequestRedirectFilter(IdentityProviderRepository identityProviderRepository) { + this.identityProviderRepository = identityProviderRepository; + } + + @Override + protected void doFilterInternal(@NonNull HttpServletRequest request, + @NonNull HttpServletResponse response, + @NonNull FilterChain filterChain) throws IOException, + ServletException { + RequestMatcher.MatchResult matcher = WE_CHAT_SCAN_CODE_REQUEST_MATCHER.matcher(request); + if (!matcher.isMatch()) { + filterChain.doFilter(request, response); + return; + } + Map variables = matcher.getVariables(); + String providerId = variables.get(PROVIDER_ID); + Optional optional = identityProviderRepository + .findByIdAndEnabledIsTrue(Long.valueOf(providerId)); + if (optional.isEmpty()) { + throw new NullPointerException("未查询到身份提供商信息"); + } + IdentityProviderEntity entity = optional.get(); + WeChatIdpScanCodeConfig config = JSONObject.parseObject(entity.getConfig(), + WeChatIdpScanCodeConfig.class); + Assert.notNull(config, "微信扫码登录配置不能为空"); + //构建授权请求 + //@formatter:off + HashMap<@Nullable String, @Nullable Object> attributes = Maps.newHashMap(); + OAuth2AuthorizationRequest.Builder builder = OAuth2AuthorizationRequest.authorizationCode() + .clientId(config.getAppId()) + .scopes(Sets.newHashSet(SNSAPI_LOGIN)) + .authorizationUri(AUTHORIZATION_REQUEST) + .redirectUri(WeChatScanCodeLoginAuthenticationFilter.getLoginUrl(providerId)) + .state(DEFAULT_STATE_GENERATOR.generateKey()) + .attributes(attributes); + //@formatter:on + builder.parameters(parameters -> { + HashMap linkedParameters = new LinkedHashMap<>(); + parameters.forEach((key, value) -> { + if (OAuth2ParameterNames.CLIENT_ID.equals(key)) { + linkedParameters.put(APP_ID, value); + } + if (OAuth2ParameterNames.SCOPE.equals(key)) { + linkedParameters.put(OAuth2ParameterNames.SCOPE, value); + } + if (OAuth2ParameterNames.STATE.equals(key)) { + linkedParameters.put(OAuth2ParameterNames.STATE, value); + } + if (OAuth2ParameterNames.REDIRECT_URI.equals(key)) { + linkedParameters.put(OAuth2ParameterNames.REDIRECT_URI, value); + } + }); + linkedParameters.put(HREF, STYLE_BASE64); + parameters.clear(); + parameters.putAll(linkedParameters); + }); + this.sendRedirectForAuthorization(request, response, builder.build()); + } + + private void sendRedirectForAuthorization(HttpServletRequest request, + HttpServletResponse response, + OAuth2AuthorizationRequest authorizationRequest) throws IOException { + this.authorizationRequestRepository.saveAuthorizationRequest(authorizationRequest, request, + response); + this.authorizationRedirectStrategy.sendRedirect(request, response, + authorizationRequest.getAuthorizationRequestUri()); + } + + private final static String STYLE = "" + + ".impowerBox .qrcode {width: 280px;border: none;margin-top:10px;}\n" + + ".impowerBox .title {display: none;}\n" + + ".impowerBox .info {display: none;}\n" + + ".status_icon {display: none}\n" + + ".impowerBox .status {text-align: center;} "; + private final static String STYLE_BASE64 = "data:text/css;base64," + Base64.getEncoder() + .encodeToString(STYLE.getBytes(StandardCharsets.UTF_8)); + + public static RequestMatcher getRequestMatcher() { + return WE_CHAT_SCAN_CODE_REQUEST_MATCHER; + } +} diff --git a/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/filter/WeChatScanCodeLoginAuthenticationFilter.java b/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/filter/WeChatScanCodeLoginAuthenticationFilter.java new file mode 100644 index 00000000..b5006916 --- /dev/null +++ b/eiam-authentication/eiam-authentication-wechat/src/main/java/cn/topiam/employee/authentication/wechat/filter/WeChatScanCodeLoginAuthenticationFilter.java @@ -0,0 +1,168 @@ +/* + * eiam-authentication-wechat - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.wechat.filter; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.http.HttpMethod; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.oauth2.core.OAuth2AuthenticationException; +import org.springframework.security.oauth2.core.OAuth2Error; +import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest; +import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames; +import org.springframework.security.oauth2.core.oidc.OidcScopes; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; + +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.authentication.common.filter.AbstractIdpAuthenticationProcessingFilter; +import cn.topiam.employee.authentication.common.modal.IdpUser; +import cn.topiam.employee.authentication.common.service.UserIdpService; +import cn.topiam.employee.authentication.wechat.WeChatIdpScanCodeConfig; +import cn.topiam.employee.authentication.wechat.constant.WeChatAuthenticationConstants; +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.enums.IdentityProviderType; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; +import cn.topiam.employee.core.context.ServerContextHelp; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.util.HttpClientUtils; +import static org.springframework.security.oauth2.core.AuthorizationGrantType.AUTHORIZATION_CODE; + +import static cn.topiam.employee.authentication.wechat.constant.WeChatAuthenticationConstants.*; +import static cn.topiam.employee.authentication.wechat.filter.WeChatScanCodeAuthorizationRequestRedirectFilter.PROVIDER_ID; +import static cn.topiam.employee.common.enums.IdentityProviderType.WECHAT_SCAN_CODE; + +/** + * 微信扫码登录过滤器 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/8 21:11 + */ +public class WeChatScanCodeLoginAuthenticationFilter extends + AbstractIdpAuthenticationProcessingFilter { + + public final static String DEFAULT_FILTER_PROCESSES_URI = WECHAT_SCAN_CODE + .getLoginPathPrefix() + "/*"; + public static final AntPathRequestMatcher REQUEST_MATCHER = new AntPathRequestMatcher( + WECHAT_SCAN_CODE.getLoginPathPrefix() + "/" + "{" + PROVIDER_ID + "}", + HttpMethod.GET.name()); + + /** + * Creates a new instance + * + * @param identityProviderRepository the {@link IdentityProviderRepository} + * @param authenticationUserDetails {@link UserIdpService} + */ + public WeChatScanCodeLoginAuthenticationFilter(IdentityProviderRepository identityProviderRepository, + UserIdpService authenticationUserDetails) { + super(DEFAULT_FILTER_PROCESSES_URI, authenticationUserDetails, identityProviderRepository); + } + + /** + * 微信认证 + * + * @param request {@link HttpServletRequest} + * @param response {@link HttpServletRequest} + * @return {@link HttpServletRequest} + * @throws AuthenticationException {@link AuthenticationException} AuthenticationException + */ + @Override + public Authentication attemptAuthentication(HttpServletRequest request, + HttpServletResponse response) throws AuthenticationException, + IOException { + OAuth2AuthorizationRequest authorizationRequest = getOAuth2AuthorizationRequest(request, + response); + RequestMatcher.MatchResult matcher = REQUEST_MATCHER.matcher(request); + Map variables = matcher.getVariables(); + String providerId = variables.get(PROVIDER_ID); + //code + String code = request.getParameter(OAuth2ParameterNames.CODE); + if (StringUtils.isEmpty(code)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_CODE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + // state + String state = request.getParameter(OAuth2ParameterNames.STATE); + if (StringUtils.isEmpty(state)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_STATE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + if (!authorizationRequest.getState().equals(state)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_STATE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + //获取身份提供商 + IdentityProviderEntity provider = getIdentityProviderEntity(providerId); + WeChatIdpScanCodeConfig config = JSONObject.parseObject(provider.getConfig(), + WeChatIdpScanCodeConfig.class); + if (Objects.isNull(config)) { + logger.error("未查询到微信扫码登录配置"); + //无效身份提供商 + OAuth2Error oauth2Error = new OAuth2Error( + AbstractIdpAuthenticationProcessingFilter.INVALID_IDP_CONFIG); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + //获取access token + HashMap param = new HashMap<>(16); + param.put(APP_ID, config.getAppId()); + param.put(SECRET, config.getAppSecret()); + param.put(OAuth2ParameterNames.CODE, code); + param.put(OAuth2ParameterNames.GRANT_TYPE, AUTHORIZATION_CODE.getValue()); + JSONObject result = JSON + .parseObject(HttpClientUtils.get(WeChatAuthenticationConstants.ACCESS_TOKEN, param)); + if (result.containsKey(ERROR_CODE)) { + logger.error("获取access_token发生错误: " + result.toJSONString()); + throw new TopIamException("获取access_token发生错误: " + result.toJSONString()); + } + // 获取user信息 + param = new HashMap<>(16); + param.put(OAuth2ParameterNames.ACCESS_TOKEN, + result.getString(OAuth2ParameterNames.ACCESS_TOKEN)); + param.put(OidcScopes.OPENID, result.getString(OidcScopes.OPENID)); + result = JSON + .parseObject(HttpClientUtils.get(WeChatAuthenticationConstants.USER_INFO, param)); + if (result.containsKey(ERROR_CODE)) { + logger.error("获取微信用户个人信息发生错误: " + result.toJSONString()); + throw new TopIamException("获取微信用户个人信息发生错误: " + result.toJSONString()); + } + // 返回 + IdpUser idpUser = IdpUser.builder().openId(param.get(OidcScopes.OPENID)).build(); + return attemptAuthentication(request, response, IdentityProviderType.WECHAT_SCAN_CODE, + providerId, idpUser); + } + + public static String getLoginUrl(String providerId) { + String url = ServerContextHelp.getPortalPublicBaseUrl() + + WECHAT_SCAN_CODE.getLoginPathPrefix() + "/" + providerId; + return url.replaceAll("(?. + */ +package cn.topiam.employee.authentication.wechat; \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-wechatwork/pom.xml b/eiam-authentication/eiam-authentication-wechatwork/pom.xml new file mode 100644 index 00000000..b9cda1de --- /dev/null +++ b/eiam-authentication/eiam-authentication-wechatwork/pom.xml @@ -0,0 +1,42 @@ + + + + + eiam-authentication + cn.topiam + 1.0.0-beta1 + ../pom.xml + + 4.0.0 + + eiam-authentication-wechatwork + jar + + + + cn.topiam + eiam-authentication-core + ${project.version} + + + \ No newline at end of file diff --git a/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/WeChatWorkIdpScanCodeConfig.java b/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/WeChatWorkIdpScanCodeConfig.java new file mode 100644 index 00000000..f5459f5d --- /dev/null +++ b/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/WeChatWorkIdpScanCodeConfig.java @@ -0,0 +1,58 @@ +/* + * eiam-authentication-wechatwork - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.wechatwork; + +import java.io.Serial; + +import javax.validation.constraints.NotBlank; + +import cn.topiam.employee.authentication.common.config.IdentityProviderConfig; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 钉钉扫码配置参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/8 21:36 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WeChatWorkIdpScanCodeConfig extends IdentityProviderConfig { + @Serial + private static final long serialVersionUID = -6850223527422243076L; + + /** + * 企业ID + */ + @NotBlank(message = "企业ID不能为空") + private String corpId; + + /** + * 应用AgentID + */ + @NotBlank(message = "应用AgentID不能为空") + private String agentId; + + /** + * 应用Secret + */ + @NotBlank(message = "应用Secret不能为空") + private String appSecret; +} diff --git a/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/configurer/WeChatWorkScanCodeAuthenticationConfigurer.java b/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/configurer/WeChatWorkScanCodeAuthenticationConfigurer.java new file mode 100644 index 00000000..9cfb16a7 --- /dev/null +++ b/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/configurer/WeChatWorkScanCodeAuthenticationConfigurer.java @@ -0,0 +1,94 @@ +/* + * eiam-authentication-wechatwork - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.wechatwork.configurer; + +import org.springframework.security.config.annotation.web.HttpSecurityBuilder; +import org.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer; +import org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter; +import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.OrRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.util.Assert; + +import cn.topiam.employee.authentication.common.service.UserIdpService; +import cn.topiam.employee.authentication.wechatwork.filter.WeChatWorkScanCodeAuthorizationRequestRedirectFilter; +import cn.topiam.employee.authentication.wechatwork.filter.WeChatWorkScanCodeLoginAuthenticationFilter; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; + +/** + * 认证配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/10 22:58 + */ +public final class WeChatWorkScanCodeAuthenticationConfigurer> + extends + AbstractAuthenticationFilterConfigurer, WeChatWorkScanCodeLoginAuthenticationFilter> { + + private final IdentityProviderRepository identityProviderRepository; + private final UserIdpService userIdpService; + + public WeChatWorkScanCodeAuthenticationConfigurer(IdentityProviderRepository identityProviderRepository, + UserIdpService userIdpService) { + Assert.notNull(identityProviderRepository, "identityProviderRepository must not be null"); + Assert.notNull(userIdpService, "userIdpService must not be null"); + this.identityProviderRepository = identityProviderRepository; + this.userIdpService = userIdpService; + } + + /** + * Create the {@link RequestMatcher} given a loginProcessingUrl + * + * @param loginProcessingUrl creates the {@link RequestMatcher} based upon the + * loginProcessingUrl + * @return the {@link RequestMatcher} to use based upon the loginProcessingUrl + */ + @Override + protected RequestMatcher createLoginProcessingUrlMatcher(String loginProcessingUrl) { + return new AntPathRequestMatcher(loginProcessingUrl); + } + + @Override + public void init(H http) throws Exception { + //微信扫码登录认证 + WeChatWorkScanCodeLoginAuthenticationFilter loginAuthenticationFilter = new WeChatWorkScanCodeLoginAuthenticationFilter( + identityProviderRepository, userIdpService); + this.setAuthenticationFilter(loginAuthenticationFilter); + //处理URL + super.loginProcessingUrl( + WeChatWorkScanCodeLoginAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI); + super.init(http); + } + + @Override + public void configure(H http) throws Exception { + //企业微信扫码请求重定向 + WeChatWorkScanCodeAuthorizationRequestRedirectFilter requestRedirectFilter = new WeChatWorkScanCodeAuthorizationRequestRedirectFilter( + identityProviderRepository); + http.addFilterBefore(requestRedirectFilter, OAuth2AuthorizationRequestRedirectFilter.class); + http.addFilterBefore(this.getAuthenticationFilter(), OAuth2LoginAuthenticationFilter.class); + super.configure(http); + } + + public RequestMatcher getRequestMatcher() { + return new OrRequestMatcher( + WeChatWorkScanCodeAuthorizationRequestRedirectFilter.getRequestMatcher(), + WeChatWorkScanCodeLoginAuthenticationFilter.getRequestMatcher()); + } +} diff --git a/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/constant/WeChatWorkAuthenticationConstants.java b/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/constant/WeChatWorkAuthenticationConstants.java new file mode 100644 index 00000000..de4aa9a7 --- /dev/null +++ b/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/constant/WeChatWorkAuthenticationConstants.java @@ -0,0 +1,37 @@ +/* + * eiam-authentication-wechatwork - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.wechatwork.constant; + +/** + * 企业微信 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/9 22:19 + */ +public final class WeChatWorkAuthenticationConstants { + public final static String APP_ID = "appid"; + public final static String AGENT_ID = "agentid"; + public final static String HREF = "href"; + public final static String LOGIN_TYPE = "login_type"; + public final static String JSSDK = "jssdk"; + public final static String URL_AUTHORIZE = "https://open.work.weixin.qq.com/wwopen/sso/v1/qrConnect"; + + public final static String GET_USER_INFO = "https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo"; + + public final static String GET_TOKEN = "https://qyapi.weixin.qq.com/cgi-bin/gettoken"; +} diff --git a/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/filter/WeChatWorkScanCodeAuthorizationRequestRedirectFilter.java b/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/filter/WeChatWorkScanCodeAuthorizationRequestRedirectFilter.java new file mode 100644 index 00000000..2f2ea065 --- /dev/null +++ b/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/filter/WeChatWorkScanCodeAuthorizationRequestRedirectFilter.java @@ -0,0 +1,164 @@ +/* + * eiam-authentication-wechatwork - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.wechatwork.filter; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.*; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpMethod; +import org.springframework.lang.NonNull; +import org.springframework.security.crypto.keygen.Base64StringKeyGenerator; +import org.springframework.security.crypto.keygen.StringKeyGenerator; +import org.springframework.security.oauth2.client.web.AuthorizationRequestRepository; +import org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizationRequestRepository; +import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest; +import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames; +import org.springframework.security.web.DefaultRedirectStrategy; +import org.springframework.security.web.RedirectStrategy; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.util.Assert; +import org.springframework.web.filter.OncePerRequestFilter; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.authentication.wechatwork.WeChatWorkIdpScanCodeConfig; +import cn.topiam.employee.authentication.wechatwork.constant.WeChatWorkAuthenticationConstants; +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; +import static cn.topiam.employee.common.enums.IdentityProviderType.WECHATWORK_SCAN_CODE; + +/** + * 微信扫码登录请求重定向过滤器 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/20 20:22 + */ +@SuppressWarnings("DuplicatedCode") +public class WeChatWorkScanCodeAuthorizationRequestRedirectFilter extends OncePerRequestFilter { + + private final Logger logger = LoggerFactory + .getLogger(WeChatWorkScanCodeAuthorizationRequestRedirectFilter.class); + + /** + * 提供商ID + */ + public static final String PROVIDER_ID = "providerId"; + + public static final AntPathRequestMatcher WECHAT_WORK_REQUEST_MATCHER = new AntPathRequestMatcher( + WECHATWORK_SCAN_CODE.getAuthorizationPathPrefix() + "/" + "{" + PROVIDER_ID + "}", + HttpMethod.GET.name()); + + /** + * 重定向策略 + */ + private final RedirectStrategy authorizationRedirectStrategy = new DefaultRedirectStrategy(); + + /** + * 认证请求存储库 + */ + private final AuthorizationRequestRepository authorizationRequestRepository = new HttpSessionOAuth2AuthorizationRequestRepository(); + + private static final StringKeyGenerator DEFAULT_STATE_GENERATOR = new Base64StringKeyGenerator( + Base64.getUrlEncoder()); + private final IdentityProviderRepository identityProviderRepository; + + public WeChatWorkScanCodeAuthorizationRequestRedirectFilter(IdentityProviderRepository identityProviderRepository) { + this.identityProviderRepository = identityProviderRepository; + } + + @Override + protected void doFilterInternal(@NonNull HttpServletRequest request, + @NonNull HttpServletResponse response, + @NonNull FilterChain filterChain) throws IOException, + ServletException { + RequestMatcher.MatchResult matcher = WECHAT_WORK_REQUEST_MATCHER.matcher(request); + if (!matcher.isMatch()) { + filterChain.doFilter(request, response); + return; + } + Map variables = matcher.getVariables(); + String providerId = variables.get(PROVIDER_ID); + Optional optional = identityProviderRepository + .findByIdAndEnabledIsTrue(Long.valueOf(providerId)); + if (optional.isEmpty()) { + throw new NullPointerException("未查询到身份提供商信息"); + } + IdentityProviderEntity entity = optional.get(); + WeChatWorkIdpScanCodeConfig config = JSONObject.parseObject(entity.getConfig(), + WeChatWorkIdpScanCodeConfig.class); + Assert.notNull(config, "企业微信扫码登录配置不能为空"); + //构建授权请求 + OAuth2AuthorizationRequest.Builder builder = OAuth2AuthorizationRequest.authorizationCode() + .clientId(config.getCorpId()) + .authorizationUri(WeChatWorkAuthenticationConstants.URL_AUTHORIZE) + .redirectUri(WeChatWorkScanCodeLoginAuthenticationFilter.getLoginUrl(providerId)) + .state(DEFAULT_STATE_GENERATOR.generateKey()); + builder.parameters(parameters -> { + HashMap linkedParameters = new LinkedHashMap<>(); + parameters.forEach((key, value) -> { + if (OAuth2ParameterNames.CLIENT_ID.equals(key)) { + linkedParameters.put(WeChatWorkAuthenticationConstants.APP_ID, value); + } + if (OAuth2ParameterNames.STATE.equals(key)) { + linkedParameters.put(OAuth2ParameterNames.STATE, value); + } + if (OAuth2ParameterNames.REDIRECT_URI.equals(key)) { + linkedParameters.put(OAuth2ParameterNames.REDIRECT_URI, value); + } + }); + linkedParameters.put(WeChatWorkAuthenticationConstants.LOGIN_TYPE, + WeChatWorkAuthenticationConstants.JSSDK); + linkedParameters.put(WeChatWorkAuthenticationConstants.AGENT_ID, config.getAgentId()); + linkedParameters.put(WeChatWorkAuthenticationConstants.HREF, STYLE_BASE64); + parameters.clear(); + parameters.putAll(linkedParameters); + }); + this.sendRedirectForAuthorization(request, response, builder.build()); + } + + private void sendRedirectForAuthorization(HttpServletRequest request, + HttpServletResponse response, + OAuth2AuthorizationRequest authorizationRequest) throws IOException { + this.authorizationRequestRepository.saveAuthorizationRequest(authorizationRequest, request, + response); + this.authorizationRedirectStrategy.sendRedirect(request, response, + authorizationRequest.getAuthorizationRequestUri()); + } + + private final static String STYLE = "" + + ".impowerBox .qrcode {width: 280px;border: none;margin-top:10px;}\n" + + ".impowerBox .title {display: none;}\n" + + ".impowerBox .info {display: none;}\n" + + ".status_icon {display: none}\n" + + ".impowerBox .status {text-align: center;} "; + private final static String STYLE_BASE64 = "data:text/css;base64," + Base64.getEncoder() + .encodeToString(STYLE.getBytes(StandardCharsets.UTF_8)); + + public static RequestMatcher getRequestMatcher() { + return WECHAT_WORK_REQUEST_MATCHER; + } +} diff --git a/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/filter/WeChatWorkScanCodeLoginAuthenticationFilter.java b/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/filter/WeChatWorkScanCodeLoginAuthenticationFilter.java new file mode 100644 index 00000000..7df2cddd --- /dev/null +++ b/eiam-authentication/eiam-authentication-wechatwork/src/main/java/cn/topiam/employee/authentication/wechatwork/filter/WeChatWorkScanCodeLoginAuthenticationFilter.java @@ -0,0 +1,197 @@ +/* + * eiam-authentication-wechatwork - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.authentication.wechatwork.filter; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.http.HttpMethod; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.oauth2.core.OAuth2AuthenticationException; +import org.springframework.security.oauth2.core.OAuth2Error; +import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest; +import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; +import org.springframework.security.web.util.matcher.RequestMatcher; + +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONObject; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; + +import cn.topiam.employee.authentication.common.filter.AbstractIdpAuthenticationProcessingFilter; +import cn.topiam.employee.authentication.common.modal.IdpUser; +import cn.topiam.employee.authentication.common.service.UserIdpService; +import cn.topiam.employee.authentication.wechatwork.WeChatWorkIdpScanCodeConfig; +import cn.topiam.employee.authentication.wechatwork.constant.WeChatWorkAuthenticationConstants; +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; +import cn.topiam.employee.core.context.ServerContextHelp; +import cn.topiam.employee.support.trace.TraceUtils; +import cn.topiam.employee.support.util.HttpClientUtils; +import static cn.topiam.employee.authentication.wechatwork.filter.WeChatWorkScanCodeAuthorizationRequestRedirectFilter.PROVIDER_ID; +import static cn.topiam.employee.common.enums.IdentityProviderType.WECHATWORK_SCAN_CODE; + +/** + * 企业微信扫码登录 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/8 21:11 + */ +@SuppressWarnings("DuplicatedCode") +public class WeChatWorkScanCodeLoginAuthenticationFilter extends + AbstractIdpAuthenticationProcessingFilter { + final String ERROR_CODE = "errcode"; + final String SUCCESS = "0"; + public final static String DEFAULT_FILTER_PROCESSES_URI = WECHATWORK_SCAN_CODE + .getLoginPathPrefix() + "/*"; + public static final AntPathRequestMatcher REQUEST_MATCHER = new AntPathRequestMatcher( + WECHATWORK_SCAN_CODE.getLoginPathPrefix() + "/" + "{" + PROVIDER_ID + "}", + HttpMethod.GET.name()); + + /** + * Creates a new instance + * + * @param identityProviderRepository the {@link IdentityProviderRepository} + * @param authenticationUserDetails {@link UserIdpService} + */ + public WeChatWorkScanCodeLoginAuthenticationFilter(IdentityProviderRepository identityProviderRepository, + UserIdpService authenticationUserDetails) { + super(DEFAULT_FILTER_PROCESSES_URI, authenticationUserDetails, identityProviderRepository); + } + + /** + * 企业微信认证 + * + * @param request {@link HttpServletRequest} + * @param response {@link HttpServletRequest} + * @return {@link HttpServletRequest} + * @throws AuthenticationException {@link AuthenticationException} AuthenticationException + */ + @Override + public Authentication attemptAuthentication(HttpServletRequest request, + HttpServletResponse response) throws AuthenticationException, + IOException { + OAuth2AuthorizationRequest authorizationRequest = getOAuth2AuthorizationRequest(request, + response); + TraceUtils.put(UUID.randomUUID().toString()); + RequestMatcher.MatchResult matcher = REQUEST_MATCHER.matcher(request); + Map variables = matcher.getVariables(); + String providerId = variables.get(PROVIDER_ID); + //code + String code = request.getParameter(OAuth2ParameterNames.CODE); + if (StringUtils.isEmpty(code)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_CODE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + // state + String state = request.getParameter(OAuth2ParameterNames.STATE); + if (StringUtils.isEmpty(state)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_STATE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + if (!authorizationRequest.getState().equals(state)) { + OAuth2Error oauth2Error = new OAuth2Error(INVALID_STATE_PARAMETER_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + //获取身份提供商 + IdentityProviderEntity provider = getIdentityProviderEntity(providerId); + WeChatWorkIdpScanCodeConfig config = JSONObject.parseObject(provider.getConfig(), + WeChatWorkIdpScanCodeConfig.class); + if (Objects.isNull(config)) { + logger.error("未查询到企业微信扫码登录配置"); + //无效身份提供商 + OAuth2Error oauth2Error = new OAuth2Error( + AbstractIdpAuthenticationProcessingFilter.INVALID_IDP_CONFIG); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + HashMap param = new HashMap<>(16); + // 获取user信息 + param.put(OAuth2ParameterNames.ACCESS_TOKEN, getToken(config)); + param.put(OAuth2ParameterNames.CODE, code); + JSONObject result = JSON.parseObject( + HttpClientUtils.get(WeChatWorkAuthenticationConstants.GET_USER_INFO, param)); + if (!Objects.equals(result.getString(ERROR_CODE), SUCCESS)) { + logger.error("获取企业微信用户个人信息失败: {}" + result.toJSONString()); + OAuth2Error oauth2Error = new OAuth2Error( + AbstractIdpAuthenticationProcessingFilter.GET_USERINFO_ERROR_CODE); + throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); + } + // 返回 + String userId = StringUtils.defaultString(result.getString("UserId"), + result.getString("OpenId")); + IdpUser idpUser = IdpUser.builder().openId(userId).build(); + return attemptAuthentication(request, response, WECHATWORK_SCAN_CODE, providerId, idpUser); + } + + /** + * 获取token + * + * @param config {@link WeChatWorkIdpScanCodeConfig} + * @return {@link String} + */ + public String getToken(WeChatWorkIdpScanCodeConfig config) { + if (!Objects.isNull(cache)) { + cache.getIfPresent(OAuth2ParameterNames.ACCESS_TOKEN); + } + //获取access token + HashMap param = new HashMap<>(16); + param.put("corpid", config.getCorpId().trim()); + param.put("corpsecret", config.getAppSecret().trim()); + JSONObject result = JSON + .parseObject(HttpClientUtils.get(WeChatWorkAuthenticationConstants.GET_TOKEN, param)); + if (!Objects.equals(result.getString(ERROR_CODE), SUCCESS)) { + logger.error("获取access_token发生错误: {}" + result.toJSONString()); + throw new OAuth2AuthenticationException( + "获取access_token发生错误: " + result.toJSONString()); + } + //放入缓存 + cache = CacheBuilder.newBuilder() + .concurrencyLevel(Runtime.getRuntime().availableProcessors()) + .expireAfterWrite(result.getInteger(OAuth2ParameterNames.EXPIRES_IN), TimeUnit.SECONDS) + .build(); + cache.put(OAuth2ParameterNames.ACCESS_TOKEN, + result.getString(OAuth2ParameterNames.ACCESS_TOKEN)); + return cache.getIfPresent(OAuth2ParameterNames.ACCESS_TOKEN); + } + + /** + * 缓存 + */ + private Cache cache; + + public static String getLoginUrl(String providerId) { + String url = ServerContextHelp.getPortalPublicBaseUrl() + + WECHATWORK_SCAN_CODE.getLoginPathPrefix() + "/" + providerId; + return url.replaceAll("(?. + */ +package cn.topiam.employee.authentication.wechatwork; \ No newline at end of file diff --git a/eiam-authentication/pom.xml b/eiam-authentication/pom.xml new file mode 100644 index 00000000..7dffc6fe --- /dev/null +++ b/eiam-authentication/pom.xml @@ -0,0 +1,54 @@ + + + + + cn.topiam + eiam + 1.0.0-beta1 + ../pom.xml + + 4.0.0 + + eiam-authentication + pom + + eiam-authentication-core + eiam-authentication-dingtalk + eiam-authentication-feishu + eiam-authentication-qq + eiam-authentication-wechat + eiam-authentication-wechatwork + eiam-authentication-sms + eiam-authentication-mfa + eiam-authentication-all + + + + + + cn.topiam + eiam-core + ${project.version} + + + \ No newline at end of file diff --git a/eiam-common/pom.xml b/eiam-common/pom.xml new file mode 100644 index 00000000..59b2a869 --- /dev/null +++ b/eiam-common/pom.xml @@ -0,0 +1,62 @@ + + + + + cn.topiam + eiam + 1.0.0-beta1 + ../pom.xml + + jar + 4.0.0 + + eiam-common + + + cn.topiam + eiam-support + ${project.version} + + + + + + src/main/java + + ** + + + **/*.java + + false + + + src/main/resources + + + **/*.* + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/constants/AccountConstants.java b/eiam-common/src/main/java/cn/topiam/employee/common/constants/AccountConstants.java new file mode 100644 index 00000000..24309a43 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/constants/AccountConstants.java @@ -0,0 +1,79 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.constants; + +import static cn.topiam.employee.support.constant.EiamConstants.API_PATH; + +/** + * 账户常量 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/26 19:07 + */ +public final class AccountConstants { + + /** + * 用户API + */ + public final static String USER_PATH = API_PATH + "/user"; + /** + * 组织机构API + */ + public final static String ORGANIZATION_PATH = API_PATH + "/organization"; + /** + * 用户组API + */ + public final static String USER_GROUP_PATH = API_PATH + "/user_group"; + /** + * 身份源API + */ + public final static String IDENTITY_SOURCE_PATH = API_PATH + "/identity_source"; + + /** + * 组名称 + */ + public static final String ACCOUNT_API_DOC_GROUP_NAME = "系统账户"; + + /** + * ACCOUNT_API_PATHS + */ + public static final String[] ACCOUNT_API_PATHS = { USER_PATH + "/**", + ORGANIZATION_PATH + "/**", + USER_GROUP_PATH + "/**", + IDENTITY_SOURCE_PATH + "/**" }; + /** + * 身份源缓存 cacheName + */ + public static final String IDS_CACHE_NAME = "ids"; + + /** + * user 缓存 cacheName + */ + public static final String USER_CACHE_NAME = "user"; + + /** + * 根部门 ID + */ + public static final String ROOT_DEPT_ID = "root"; + + /** + * 根部门名称 + */ + public static final String ROOT_DEPT_NAME = "TopIAM Employee"; + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/constants/AnalysisConstants.java b/eiam-common/src/main/java/cn/topiam/employee/common/constants/AnalysisConstants.java new file mode 100644 index 00000000..c8026bef --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/constants/AnalysisConstants.java @@ -0,0 +1,39 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.constants; + +import static cn.topiam.employee.support.constant.EiamConstants.API_PATH; + +/** + * 统计分析API常量 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/26 19:07 + */ +public final class AnalysisConstants { + + /** + * 统计分析API路径 + */ + public final static String ANALYSIS_PATH = API_PATH + "/analysis"; + + /** + * 组名称 + */ + public static final String ANALYSIS_GROUP_NAME = "统计分析"; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/constants/AppConstants.java b/eiam-common/src/main/java/cn/topiam/employee/common/constants/AppConstants.java new file mode 100644 index 00000000..4cb74072 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/constants/AppConstants.java @@ -0,0 +1,50 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.constants; + +import static cn.topiam.employee.support.constant.EiamConstants.API_PATH; +import static cn.topiam.employee.support.constant.EiamConstants.COLON; + +/** + * 应用管理常量 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/26 19:07 + */ +public final class AppConstants { + + /** + * 应用管理API路径 + */ + public final static String APP_PATH = API_PATH + "/app"; + + /** + * 组名称 + */ + public static final String APP_GROUP_NAME = "应用管理"; + + /** + * APP 配置缓存前缀 + */ + public static final String APP_CACHE_NAME_PREFIX = "app" + COLON; + + /** + * APP 应用基本信息 + */ + public static final String APP_CACHE_NAME = APP_CACHE_NAME_PREFIX + "basic"; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/constants/AuditConstants.java b/eiam-common/src/main/java/cn/topiam/employee/common/constants/AuditConstants.java new file mode 100644 index 00000000..550532cc --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/constants/AuditConstants.java @@ -0,0 +1,50 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.constants; + +import static cn.topiam.employee.support.constant.EiamConstants.API_PATH; + +/** + * 系统审计常量 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/26 19:07 + */ +public final class AuditConstants { + /** + * 系统审计API路径 + */ + public final static String AUDIT_PATH = API_PATH + "/audit"; + + /** + * 组名称 + */ + public static final String AUDIT_GROUP_NAME = "行为审计"; + + /** + * 审计es index + */ + private static final String AUDIT_INDEX_PREFIX = "topiam-audit-"; + + public static String getAuditIndexPrefix(Boolean demoEnv) { + if (demoEnv) { + return AUDIT_INDEX_PREFIX + "demo-"; + } + return AUDIT_INDEX_PREFIX; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/constants/AuthenticationConstants.java b/eiam-common/src/main/java/cn/topiam/employee/common/constants/AuthenticationConstants.java new file mode 100644 index 00000000..33a053fe --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/constants/AuthenticationConstants.java @@ -0,0 +1,36 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.constants; + +import cn.topiam.employee.support.constant.EiamConstants; + +/** + * 认证常量 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/26 19:07 + */ +public final class AuthenticationConstants { + public final static String AUTHENTICATION_PATH = EiamConstants.API_PATH + + "/authentication"; + + /** + * 认证管理 + */ + public static final String AUTHENTICATION_GROUP_NAME = "认证管理"; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/constants/AuthorizeConstants.java b/eiam-common/src/main/java/cn/topiam/employee/common/constants/AuthorizeConstants.java new file mode 100644 index 00000000..013a47d4 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/constants/AuthorizeConstants.java @@ -0,0 +1,80 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.constants; + +import cn.topiam.employee.support.constant.EiamConstants; + +/** + * AuthorizeConstants + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/8 20:12 + */ +public final class AuthorizeConstants { + /** + * LOGIN + */ + public static final String LOGIN_PATH = EiamConstants.API_PATH + "/login"; + public final static String AUTHORIZE_PATH = EiamConstants.API_PATH + "/authorize"; + public static final String AUTHORIZATION_REQUEST_URI = EiamConstants.API_PATH + + "/authorization"; + /** + * form 表单登录 + */ + public static final String FORM_LOGIN = LOGIN_PATH; + /** + * sms login 路径 + */ + public static final String SMS_LOGIN = LOGIN_PATH + "/sms"; + + /** + * maf 验证 + */ + public static final String MFA_VALIDATE = LOGIN_PATH + "/mfa/validate"; + + /** + * mfa 登录提供者 + */ + public static final String LOGIN_MFA_FACTORS = LOGIN_PATH + "/mfa/factors"; + + /** + * 登录配置 + */ + public static final String LOGIN_CONFIG = LOGIN_PATH + "/config"; + + /** + * 发送OTP + */ + public static final String LOGIN_OTP_SEND = LOGIN_PATH + "/otp/send"; + + /** + * idp 绑定用户 路径 + */ + public static final String USER_BIND_IDP = LOGIN_PATH + "/idp_bind_user"; + + /** + * 前端登录路由 + */ + public static final String FE_LOGIN = "/login"; + + /** + * LOGOUT + */ + public static final String LOGOUT = EiamConstants.API_PATH + "/logout"; + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/constants/CaptchaConstants.java b/eiam-common/src/main/java/cn/topiam/employee/common/constants/CaptchaConstants.java new file mode 100644 index 00000000..0028994e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/constants/CaptchaConstants.java @@ -0,0 +1,28 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.constants; + +/** + * 行为验证码常量 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/19 23:30 + */ +public final class CaptchaConstants { + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/constants/CommonConstants.java b/eiam-common/src/main/java/cn/topiam/employee/common/constants/CommonConstants.java new file mode 100644 index 00000000..94e1d970 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/constants/CommonConstants.java @@ -0,0 +1,45 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.constants; + +/** + * 通用配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/4/3 23:37 + */ +public final class CommonConstants { + /** + * 类型 + */ + public static final String TYPE = "@type"; + + /** + * 回调地址名称 + */ + public static final String CALLBACK_URL = "callbackUrl"; + /** + * 路径分隔符 + */ + public static final String PATH_SEPARATOR = "/"; + + /** + * 系统用户默认名称 + */ + public static final String SYSTEM_DEFAULT_USER_NAME = "topiam"; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/constants/ConfigBeanNameConstants.java b/eiam-common/src/main/java/cn/topiam/employee/common/constants/ConfigBeanNameConstants.java new file mode 100644 index 00000000..ca7c158a --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/constants/ConfigBeanNameConstants.java @@ -0,0 +1,61 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.constants; + +/** + * 配置Bean名称常量 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/3/23 22:53 + */ +public final class ConfigBeanNameConstants { + /** + * 任务执行者 + */ + public static final String TASK_EXECUTOR = "taskExecutor"; + /** + * 安全过滤器链 + */ + public static final String DEFAULT_SECURITY_FILTER_CHAIN = "defaultSecurityFilterChain"; + public static final String SOCIAL_SECURITY_FILTER_CHAIN = "socialSecurityFilterChain"; + public static final String SAML2_PROTOCOL_SECURITY_FILTER_CHAIN = "saml2ProtocolSecurityFilterChain"; + public static final String OIDC_PROTOCOL_SECURITY_FILTER_CHAIN = "oidcProtocolSecurityFilterChain"; + + /** + * 默认密码策略管理器 + */ + public static final String DEFAULT_PASSWORD_POLICY_MANAGER = "defaultPasswordPolicyManager"; + /** + * 验证码验证器 + */ + public static final String CAPTCHA_VALIDATOR = "captchaValidator"; + + /** + * 地理位置 + */ + public static final String GEO_LOCATION = "geoLocation"; + /** + * 短信提供商发送 + */ + public static final String SMS_PROVIDER_SEND = "smsProviderSend"; + /** + * 邮件提供商 + */ + public static final String MAIL_PROVIDER_SEND = "mailProviderSend"; + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/constants/ProtocolConstants.java b/eiam-common/src/main/java/cn/topiam/employee/common/constants/ProtocolConstants.java new file mode 100644 index 00000000..fe6b5132 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/constants/ProtocolConstants.java @@ -0,0 +1,147 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.constants; + +import lombok.Data; +import static com.nimbusds.openid.connect.sdk.op.OIDCProviderConfigurationRequest.OPENID_PROVIDER_WELL_KNOWN_PATH; + +import static cn.topiam.employee.common.constants.AppConstants.APP_CACHE_NAME_PREFIX; +import static cn.topiam.employee.common.constants.AuthorizeConstants.AUTHORIZE_PATH; + +/** + * Saml 常量 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/18 19:49 + */ +public final class ProtocolConstants { + /** + * 应用code + */ + public static final String APP_CODE = "appCode"; + /** + * 提供商变量 + */ + public static final String APP_CODE_VARIABLE = "{" + APP_CODE + "}"; + + /** + * 应用账户缓存名称 + */ + public static final String APP_ACCOUNT_CACHE_NAME = APP_CACHE_NAME_PREFIX + "account"; + + /** + * SAML2 配置缓存名称 + */ + public static final String SAML2_CONFIG_CACHE_NAME = APP_CACHE_NAME_PREFIX + "saml"; + + /** + * OIDC 配置缓存名称 + */ + public static final String OIDC_CONFIG_CACHE_NAME = APP_CACHE_NAME_PREFIX + "oidc"; + + /** + * APP Cert + */ + public static final String APP_CERT_CACHE_NAME = APP_CACHE_NAME_PREFIX + "cert"; + + /** + * OIDC Endpoint config + */ + @Data + public static class OidcEndpointConstants { + //@formatter:off + /** + * OIDC BASE 认证路径 + */ + public final static String OIDC_AUTHORIZE_BASE_PATH = AUTHORIZE_PATH + "/" + APP_CODE_VARIABLE; + + public final static String OIDC_AUTHORIZE_PATH = OIDC_AUTHORIZE_BASE_PATH +"/oidc"; + + public final static String OAUTH2_AUTHORIZE_PATH = OIDC_AUTHORIZE_BASE_PATH +"/oauth2"; + + /** + * OpenID Provider metadata. + */ + public static final String WELL_KNOWN_OPENID_CONFIGURATION = OIDC_AUTHORIZE_PATH +OPENID_PROVIDER_WELL_KNOWN_PATH; + + /** + * Jwk Set Endpoint + */ + public static final String JWK_SET_ENDPOINT = OIDC_AUTHORIZE_PATH + "/jwks"; + + /** + * OIDC Client Registration Endpoint + */ + public static final String OIDC_CLIENT_REGISTRATION_ENDPOINT = OIDC_AUTHORIZE_PATH + "/connect/register"; + + /** + * Authorization Endpoint + */ + public static final String AUTHORIZATION_ENDPOINT = OAUTH2_AUTHORIZE_PATH + "/auth"; + + /** + * Token Endpoint + */ + public static final String TOKEN_ENDPOINT = OAUTH2_AUTHORIZE_PATH + "/token"; + + /** + * Jwk Revocation Endpoint + */ + public static final String TOKEN_REVOCATION_ENDPOINT = OAUTH2_AUTHORIZE_PATH + "/revoke"; + + /** + * Token Introspection Endpoint + */ + public static final String TOKEN_INTROSPECTION_ENDPOINT = OAUTH2_AUTHORIZE_PATH + "/introspect"; + + /** + * OIDC User Info Endpoint + */ + public static final String OIDC_USER_INFO_ENDPOINT = OAUTH2_AUTHORIZE_PATH + "/userinfo"; + + //@formatter:on + } + + /** + * Saml2 Endpoint config + */ + @Data + public static class Saml2EndpointConstants { + /** + * SAML2 认证路径 + */ + public final static String SAML2_AUTHORIZE_BASE_PATH = AUTHORIZE_PATH + "/saml2/" + + APP_CODE_VARIABLE; + + /** + * SAML_METADATA_PATH + */ + public static final String SAML_METADATA_PATH = SAML2_AUTHORIZE_BASE_PATH + + "/metadata"; + /** + * SAML_LOGOUT_PATH + */ + public static final String SAML_LOGOUT_PATH = SAML2_AUTHORIZE_BASE_PATH + + "/logout"; + /** + * SAML_SSO_PATH + */ + public static final String SAML_SSO_PATH = SAML2_AUTHORIZE_BASE_PATH + "/sso"; + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/constants/SessionConstants.java b/eiam-common/src/main/java/cn/topiam/employee/common/constants/SessionConstants.java new file mode 100644 index 00000000..c00be432 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/constants/SessionConstants.java @@ -0,0 +1,41 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.constants; + +import cn.topiam.employee.support.constant.EiamConstants; + +/** + * SessionConstants + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/8 20:12 + */ +public final class SessionConstants { + public final static String SESSION_PATH = EiamConstants.API_PATH + "/session"; + + /** + * CURRENT_USER + */ + public static final String CURRENT_USER = SESSION_PATH + "/current_user"; + + /** + * session 当前状态 + */ + public static final String CURRENT_STATUS = SESSION_PATH + "/current_status"; + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/constants/SettingConstants.java b/eiam-common/src/main/java/cn/topiam/employee/common/constants/SettingConstants.java new file mode 100644 index 00000000..ceefb056 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/constants/SettingConstants.java @@ -0,0 +1,51 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.constants; + +import cn.topiam.employee.support.constant.EiamConstants; + +/** + * 审计常量 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/26 19:07 + */ +public final class SettingConstants { + public static final String NOT_CONFIG = "{}"; + + /** + * 系统设置API路径 + */ + public final static String SETTING_PATH = EiamConstants.API_PATH + "/setting"; + + /** + * 组名称 + */ + public static final String SETTING_GROUP_NAME = "系统设置"; + + /** + * 系统设置缓存 cacheName + */ + public static final String SETTING_CACHE_NAME = "setting"; + + /** + * admin 缓存 cacheName + */ + public static final String ADMIN_CACHE_NAME = "admin"; + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/constants/StorageConstants.java b/eiam-common/src/main/java/cn/topiam/employee/common/constants/StorageConstants.java new file mode 100644 index 00000000..f85a3103 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/constants/StorageConstants.java @@ -0,0 +1,43 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.constants; + +import cn.topiam.employee.support.constant.EiamConstants; + +/** + * 存储常量 + * + * @author TopIAM + */ +public final class StorageConstants { + + /** + * 存储API路径 + */ + public final static String STORAGE_PATH = EiamConstants.API_PATH + "/storage"; + + /** + * 文件存储 + */ + public static final String STORAGE_GROUP_NAME = "文件存储"; + + /** + * 存储缓存 cacheName + */ + public static final String STORAGE_CACHE_NAME = "storage"; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/MailSendRecordEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/MailSendRecordEntity.java new file mode 100644 index 00000000..b8132071 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/MailSendRecordEntity.java @@ -0,0 +1,90 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity; + +import java.time.LocalDateTime; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.common.enums.MailType; +import cn.topiam.employee.common.message.enums.MailProvider; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 邮件发送记录 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/8/1 19:41 + */ +@Entity +@Accessors(chain = true) +@Getter +@Setter +@ToString +@Table(name = "mail_send_record") +public class MailSendRecordEntity extends BaseEntity { + /** + * subject + */ + @Column(name = "subject_") + private String subject; + /** + * sender + */ + @Column(name = "sender_") + private String sender; + /** + * receiver + */ + @Column(name = "receiver_") + private String receiver; + /** + * content + */ + @Column(name = "content_") + private String content; + /** + * 消息类型 + */ + @Column(name = "type_") + private MailType type; + /** + * 平台 + */ + @Column(name = "provider_") + private MailProvider provider; + + /** + * 是否成功 + */ + @Column(name = "is_success") + private Boolean success; + + /** + * 发送时间 + */ + @Column(name = "send_time") + private LocalDateTime sendTime; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/SmsSendRecordEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/SmsSendRecordEntity.java new file mode 100644 index 00000000..9fdf09a0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/SmsSendRecordEntity.java @@ -0,0 +1,96 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity; + +import java.time.LocalDateTime; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.common.enums.MessageCategory; +import cn.topiam.employee.common.enums.SmsType; +import cn.topiam.employee.common.message.enums.SmsProvider; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 短信记录发送表 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/8/1 19:41 + */ +@Entity +@Accessors(chain = true) +@Getter +@Setter +@ToString +@Table(name = "sms_send_record") +public class SmsSendRecordEntity extends BaseEntity { + /** + * phone_ + */ + @Column(name = "phone_") + private String phone; + + /** + * content + */ + @Column(name = "content_") + private String content; + + /** + * 短信类型 + */ + @Column(name = "type_") + private SmsType type; + + /** + * 消息分类 + */ + @Column(name = "category_") + private MessageCategory category; + + /** + * 平台 + */ + @Column(name = "provider_") + private SmsProvider provider; + + /** + * 是否成功 + */ + @Column(name = "is_success") + private Boolean success; + + /** + * 结果 + */ + @Column(name = "result_") + private String result; + + /** + * 发送时间 + */ + @Column(name = "send_time") + private LocalDateTime sendTime; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/OrganizationEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/OrganizationEntity.java new file mode 100644 index 00000000..863058f0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/OrganizationEntity.java @@ -0,0 +1,143 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.account; + +import java.io.Serial; +import java.util.Objects; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import org.hibernate.Hibernate; + +import cn.topiam.employee.common.enums.DataOrigin; +import cn.topiam.employee.common.enums.OrganizationType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +/** + *

+ * 组织架构 + *

+ * + * @author TopIAM Automatic generated + * Created by support@topiam.cn on 2020-08-09 + */ +@Getter +@Setter +@ToString +@Entity +@Table(name = "`organization`") +public class OrganizationEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = 8143944323232082295L; + + /** + * 组织机构名称 + */ + @Column(name = "name_") + private String name; + + /** + * 机构编码 + */ + @Column(name = "code_") + private String code; + + /** + * 类型 + */ + @Column(name = "type_") + private OrganizationType type; + + /** + * 上级ID + */ + @Column(name = "parent_id") + private String parentId; + + /** + * 路径枚举ID + */ + @Column(name = "path_") + private String path; + + /** + * 路径显示名称 + */ + @Column(name = "display_path") + private String displayPath; + + /** + * 外部ID + */ + @Column(name = "external_id") + private String externalId; + + /** + * 数据来源 + */ + @Column(name = "data_origin") + private DataOrigin dataOrigin; + + /** + * 身份源id + */ + @Column(name = "identity_source_id") + private Long identitySourceId; + + /** + * 排序 + */ + @Column(name = "order_") + private Long order; + + /** + * 是否叶子节点 leaf + */ + @Column(name = "is_leaf") + private Boolean leaf; + + /** + * 是否启用 + */ + @Column(name = "is_enabled") + private Boolean enabled; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) { + return false; + } + OrganizationEntity entity = (OrganizationEntity) o; + return getId() != null && Objects.equals(getId(), entity.getId()); + } + + @Override + public int hashCode() { + return getClass().hashCode(); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/OrganizationMemberEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/OrganizationMemberEntity.java new file mode 100644 index 00000000..5720095b --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/OrganizationMemberEntity.java @@ -0,0 +1,90 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.account; + +import java.util.Objects; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import org.hibernate.Hibernate; + +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 组织机构成员 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/30 19:06 + */ +@Getter +@Setter +@ToString +@Accessors(chain = true) +@Entity +@Table(name = "`organization_member`") +public class OrganizationMemberEntity extends BaseEntity { + /** + * 组织机构ID + */ + @Column(name = "org_id") + private String orgId; + + /** + * 用户ID + */ + @Column(name = "user_id") + private Long userId; + + public OrganizationMemberEntity() { + } + + public OrganizationMemberEntity(String orgId, Long userId) { + this.orgId = orgId; + this.userId = userId; + } + + public OrganizationMemberEntity(Long id, String orgId, Long userId) { + super.setId(id); + this.orgId = orgId; + this.userId = userId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) { + return false; + } + OrganizationMemberEntity that = (OrganizationMemberEntity) o; + return getId() != null && Objects.equals(getId(), that.getId()); + } + + @Override + public int hashCode() { + return getClass().hashCode(); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserDetailEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserDetailEntity.java new file mode 100644 index 00000000..27cd0d48 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserDetailEntity.java @@ -0,0 +1,101 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.account; + +import java.io.Serial; +import java.util.Objects; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import org.hibernate.Hibernate; + +import cn.topiam.employee.common.enums.UserIdType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + *

+ * 用户详情表 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-07 + */ +@Getter +@Setter +@ToString +@Accessors(chain = true) +@Entity +@Table(name = "user_detail") +public class UserDetailEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = -3599183663669763315L; + /** + * 用户表ID + */ + @Column(name = "user_id") + private Long userId; + + /** + * 证件类型 + */ + @Column(name = "id_type") + private UserIdType idType; + + /** + * 身份证号 + */ + @Column(name = "id_card") + private String idCard; + + /** + * 个人主页 + */ + @Column(name = "website_") + private String website; + + /** + * 地址 + */ + @Column(name = "address_") + private String address; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) { + return false; + } + UserDetailEntity that = (UserDetailEntity) o; + return getId() != null && Objects.equals(getId(), that.getId()); + } + + @Override + public int hashCode() { + return getClass().hashCode(); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserEntity.java new file mode 100644 index 00000000..1ce7ad8d --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserEntity.java @@ -0,0 +1,214 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.account; + +import java.io.Serial; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.Objects; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; +import javax.persistence.Transient; + +import org.hibernate.Hibernate; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +import cn.topiam.employee.common.enums.DataOrigin; +import cn.topiam.employee.common.enums.UserStatus; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + *

+ * 用户表 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-07-31 22:10 + */ +@Getter +@Setter +@ToString +@Accessors(chain = true) +@Entity +@Table(name = "`user`") +public class UserEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = -2619231849746900857L; + + /** + * 用户名 + */ + @Column(name = "username_") + private String username; + + /** + * 密码 + */ + @Column(name = "password_") + private String password; + + /** + * 邮箱 + */ + @Column(name = "email_") + private String email; + + /** + * 手机号 + */ + @Column(name = "phone_") + private String phone; + + /** + * 手机号 + */ + @Column(name = "phone_area_code") + private String phoneAreaCode; + + /** + * 姓名 + */ + @Column(name = "full_name") + private String fullName; + + /** + * 昵称 + */ + @Column(name = "nick_name") + private String nickName; + + /** + * 头像URL + */ + @Column(name = "avatar_") + private String avatar; + + /** + * 状态 ENABLE:启用 DISABLE:禁用 LOCKING:锁定 + */ + @Column(name = "status_") + private UserStatus status; + + /** + * 数据来源 + */ + @Column(name = "data_origin") + private DataOrigin dataOrigin; + + /** + * 身份源ID + */ + @Column(name = "identity_source_id") + private Long identitySourceId; + + /** + * 邮箱验证有效 + */ + @Column(name = "email_verified") + private Boolean emailVerified; + + /** + * 手机有效 + */ + @Column(name = "phone_verified") + private Boolean phoneVerified; + + /** + * 共享秘钥-TIME OTP + */ + @Column(name = "shared_secret") + private String sharedSecret; + + /** + * 是否绑定 TOTP + */ + @Column(name = "totp_bind") + private Boolean totpBind; + + /** + * 认证次数 + */ + @Column(name = "auth_total") + private Long authTotal; + /** + * 上次认证IP + */ + @Column(name = "last_auth_ip") + private String lastAuthIp; + /** + * 上次认证时间 + */ + @Column(name = "last_auth_time") + private LocalDateTime lastAuthTime; + + /** + * 扩展参数 + */ + @Column(name = "expand_") + private String expand; + + /** + * 外部ID + */ + @Column(name = "external_id") + private String externalId; + /** + * 过期时间 + */ + @Column(name = "expire_date") + private LocalDate expireDate; + + /** + * 最后修改密码时间 + */ + @Column(name = "last_update_password_time") + private LocalDateTime lastUpdatePasswordTime; + + /** + * 暂存密码(明文) + */ + @Transient + @JsonIgnore + private String plaintext; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) { + return false; + } + UserEntity user = (UserEntity) o; + return getId() != null && Objects.equals(getId(), user.getId()); + } + + @Override + public int hashCode() { + return getClass().hashCode(); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserGroupEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserGroupEntity.java new file mode 100644 index 00000000..d34e54b0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserGroupEntity.java @@ -0,0 +1,62 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.account; + +import java.io.Serial; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + *

+ * 用户组表 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-07-31 + */ +@Getter +@Setter +@ToString +@Accessors(chain = true) +@Entity +@Table(name = "`user_group`") +public class UserGroupEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = -2619231849746900857L; + /** + * 用户名 + */ + @Column(name = "name_") + private String name; + + /** + * 密码 + */ + @Column(name = "code_") + private String code; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserGroupMemberEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserGroupMemberEntity.java new file mode 100644 index 00000000..2d00b12c --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserGroupMemberEntity.java @@ -0,0 +1,54 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.account; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 用户组成员 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/30 19:04 + */ +@Getter +@Setter +@ToString +@Accessors(chain = true) +@Entity +@Table(name = "`user_group_member`") +public class UserGroupMemberEntity extends BaseEntity { + /** + * 组ID + */ + @Column(name = "group_id") + private Long groupId; + /** + * 用户ID + */ + @Column(name = "user_id") + private Long userId; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserHistoryPasswordEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserHistoryPasswordEntity.java new file mode 100644 index 00000000..e8da0fa1 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserHistoryPasswordEntity.java @@ -0,0 +1,72 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.account; + +import java.io.Serial; +import java.time.LocalDateTime; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + *

+ * 用户历史密码表 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-07-31 + */ +@Getter +@Setter +@ToString +@Accessors(chain = true) +@Entity +@Table(name = "`user_history_password`") +public class UserHistoryPasswordEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = -2619231849746900857L; + /** + * 用户名 + */ + @Column(name = "user_id") + private String userId; + + /** + * 密码 + */ + @Column(name = "password_") + @JsonIgnore + private String password; + + /** + * 更改时间 + */ + @Column(name = "change_time") + private LocalDateTime changeTime; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserIdpBindEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserIdpBindEntity.java new file mode 100644 index 00000000..459fd305 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/UserIdpBindEntity.java @@ -0,0 +1,86 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.account; + +import java.io.Serial; +import java.time.LocalDateTime; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.common.enums.IdentityProviderType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 用户认证方式绑定表 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 20:23 + */ +@Entity +@Table(name = "user_idp_bind") +@Accessors(chain = true) +@Getter +@Setter +@ToString +public class UserIdpBindEntity extends BaseEntity { + @Serial + private static final long serialVersionUID = -14364708756807242L; + + /** + * 用户ID + */ + @Column(name = "user_id") + private Long userId; + + /** + * OpenId + */ + @Column(name = "open_id") + private String openId; + + /** + * 身份提供商 ID + */ + @Column(name = "idp_id") + private String idpId; + + /** + * 身份提供商 类型 + */ + @Column(name = "idp_type") + private IdentityProviderType idpType; + + /** + * 绑定时间 + */ + @Column(name = "bind_time") + private LocalDateTime bindTime; + + /** + * 附加信息 + */ + @Column(name = "addition_info") + private String additionInfo; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/po/UserIdpBindPo.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/po/UserIdpBindPo.java new file mode 100644 index 00000000..87c994ca --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/po/UserIdpBindPo.java @@ -0,0 +1,44 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.account.po; + +import cn.topiam.employee.common.entity.account.UserIdpBindEntity; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 用户身份提供商绑定 PO + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/10 22:46 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class UserIdpBindPo extends UserIdpBindEntity { + + /** + * 用户名称 + */ + private String userName; + + /** + * 身份认证提供商名称 + */ + private String idpName; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/po/UserPO.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/po/UserPO.java new file mode 100644 index 00000000..116befd0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/po/UserPO.java @@ -0,0 +1,44 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.account.po; + +import java.io.Serial; + +import cn.topiam.employee.common.entity.account.UserEntity; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 用户 PO + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/10 22:46 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class UserPO extends UserEntity { + + @Serial + private static final long serialVersionUID = 2330202241971348786L; + + /** + * 组织机构显示目录 + */ + private String orgDisplayPath; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/query/UserGroupMemberListQuery.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/query/UserGroupMemberListQuery.java new file mode 100644 index 00000000..bdb8fd2f --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/query/UserGroupMemberListQuery.java @@ -0,0 +1,55 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.account.query; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotEmpty; + +import org.springdoc.api.annotations.ParameterObject; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询用户列表入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Schema(description = "查询用户组成员列表入参") +@ParameterObject +public class UserGroupMemberListQuery implements Serializable { + @Serial + private static final long serialVersionUID = -7110595216804896858L; + /** + * 组ID + */ + @NotEmpty(message = "组ID不能为空") + @Parameter(description = "组ID") + private String id; + /** + * 用户名 + */ + @Parameter(description = "用户名") + private String username; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/query/UserListNotInGroupQuery.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/query/UserListNotInGroupQuery.java new file mode 100644 index 00000000..26d80569 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/query/UserListNotInGroupQuery.java @@ -0,0 +1,55 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.account.query; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotEmpty; + +import org.springdoc.api.annotations.ParameterObject; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询用户列表(不在指定用户组)入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Schema(description = "查询用户列表(不在指定用户组)入参") +@ParameterObject +public class UserListNotInGroupQuery implements Serializable { + @Serial + private static final long serialVersionUID = -7110595216804896858L; + /** + * 组ID + */ + @NotEmpty(message = "组ID不能为空") + @Parameter(description = "组ID") + private String id; + /** + * 关键字 + */ + @Parameter(description = "关键字") + private String keyword; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/query/UserListQuery.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/query/UserListQuery.java new file mode 100644 index 00000000..1e416485 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/account/query/UserListQuery.java @@ -0,0 +1,93 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.account.query; + +import java.io.Serial; +import java.io.Serializable; + +import org.springdoc.api.annotations.ParameterObject; + +import cn.topiam.employee.common.enums.DataOrigin; +import cn.topiam.employee.common.enums.UserStatus; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询用户列表入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Schema(description = "查询用户列表入参") +@ParameterObject +public class UserListQuery implements Serializable { + @Serial + private static final long serialVersionUID = -7110595216804896858L; + + /** + * 用户名 + */ + @Parameter(description = "用户名") + private String username; + + /** + * 姓名 + */ + @Parameter(description = "姓名") + private String fullName; + + /** + * 邮箱 + */ + @Parameter(description = "邮箱") + private String email; + + /** + * 手机号 + */ + @Parameter(description = "手机号") + private String phone; + + /** + * 组织ID + */ + @Parameter(description = "组织ID") + private String organizationId; + + /** + * 包含子组织 + */ + @Parameter(description = "包含子组织") + private Boolean inclSubOrganization; + + /** + * 状态 + */ + @Parameter(description = "状态") + private UserStatus status; + + /** + * 数据来源 + */ + @Parameter(description = "数据来源") + private DataOrigin dataOrigin; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/analysis/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/analysis/package-info.java new file mode 100644 index 00000000..fe66efe5 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/analysis/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.analysis; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppAccessPolicyEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppAccessPolicyEntity.java new file mode 100644 index 00000000..64f2c4a1 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppAccessPolicyEntity.java @@ -0,0 +1,62 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.common.enums.PolicySubjectType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 应用授权策略 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 19:29 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Table(name = "app_access_policy") +public class AppAccessPolicyEntity extends BaseEntity { + /** + * 应用ID + */ + @Column(name = "app_id") + private Long appId; + + /** + * 主体ID(用户、分组、组织机构) + */ + @Column(name = "subject_id") + private String subjectId; + + /** + * 主体类型(用户、分组、组织机构) + */ + @Column(name = "subject_type") + private PolicySubjectType subjectType; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppAccountEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppAccountEntity.java new file mode 100644 index 00000000..73f7c493 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppAccountEntity.java @@ -0,0 +1,61 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 应用账户 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 20:51 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Table(name = "app_account") +public class AppAccountEntity extends BaseEntity { + /** + * 应用ID + */ + @Column(name = "app_id") + private Long appId; + + /** + * 用户ID + */ + @Column(name = "user_id") + private Long userId; + + /** + * 账户名称 + */ + @Column(name = "account_") + private String account; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppCertEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppCertEntity.java new file mode 100644 index 00000000..7bc0e58b --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppCertEntity.java @@ -0,0 +1,123 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app; + +import java.math.BigInteger; +import java.time.LocalDateTime; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.common.enums.app.AppCertUsingType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 20:51 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Table(name = "app_cert") +public class AppCertEntity extends BaseEntity { + /** + * 应用ID + */ + @Column(name = "app_id") + private Long appId; + + /** + * 证书序列号 + */ + @Column(name = "serial_") + private BigInteger serial; + + /** + * 主题信息 + */ + @Column(name = "subject_") + private String subject; + + /** + * 签发者信息 + */ + @Column(name = "issuer_") + private String issuer; + + /** + * 开始时间 + */ + @Column(name = "begin_date") + private LocalDateTime beginDate; + + /** + * 结束时间 + */ + @Column(name = "end_date") + private LocalDateTime endDate; + + /** + * 有效天数 + */ + @Column(name = "validity_") + private Integer validity; + + /** + * 算法 + */ + @Column(name = "sign_algo") + private String signAlgo; + + /** + * 私钥长度 + */ + @Column(name = "key_long") + private Integer keyLong; + + /** + * 私钥 + */ + @Column(name = "private_key") + private String privateKey; + + /** + * 公钥 + */ + @Column(name = "public_key") + private String publicKey; + + /** + * 证书 + */ + @Column(name = "cert_") + private String cert; + + /** + * 使用类型 + */ + @Column(name = "using_type") + private AppCertUsingType usingType; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppEntity.java new file mode 100644 index 00000000..5c17d824 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppEntity.java @@ -0,0 +1,119 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.common.enums.app.AppProtocol; +import cn.topiam.employee.common.enums.app.AppType; +import cn.topiam.employee.common.enums.app.AuthorizationType; +import cn.topiam.employee.common.enums.app.InitLoginType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 应用 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/11 19:07 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Table(name = "app") +public class AppEntity extends BaseEntity { + + /** + * 应用名称 + */ + @Column(name = "name_") + private String name; + + /** + * 唯一CODE 不可修改 + */ + @Column(name = "code_") + private String code; + + /** + * 客户端ID + */ + @Column(name = "client_id") + private String clientId; + /** + * 客户端秘钥 + */ + @Column(name = "client_secret") + private String clientSecret; + + /** + * 模板 + */ + @Column(name = "template_") + private String template; + + /** + * 协议 + */ + @Column(name = "protocol_") + private AppProtocol protocol; + + /** + * 应用类型 + */ + @Column(name = "type_") + private AppType type; + + /** + * 应用图标 + */ + @Column(name = "icon_") + private String icon; + + /** + * SSO 发起登录类型 + */ + @Column(name = "init_login_type") + private InitLoginType initLoginType; + + /** + * SSO 发起登录URL + */ + @Column(name = "init_login_url") + private String initLoginUrl; + + /** + * SSO 授权类型 + */ + @Column(name = "authorization_type") + private AuthorizationType authorizationType; + + /** + * 是否启用 + */ + @Column(name = "is_enabled") + private Boolean enabled; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppOidcConfigEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppOidcConfigEntity.java new file mode 100644 index 00000000..ca9a3e2d --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppOidcConfigEntity.java @@ -0,0 +1,143 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app; + +import java.util.Set; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import org.hibernate.annotations.Type; +import org.hibernate.annotations.TypeDef; + +import com.vladmihalcea.hibernate.type.json.JsonStringType; + +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * APP OIDC 配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 22:31 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Table(name = "app_oidc_config") +@TypeDef(name = "json", typeClass = JsonStringType.class) +public class AppOidcConfigEntity extends BaseEntity { + + /** + * APP ID + */ + @Column(name = "app_id") + private Long appId; + + /** + * 客户端认证方式 + */ + @Column(name = "client_auth_methods") + @Type(type = "json") + private Set clientAuthMethods; + /** + * 授权类型 + */ + @Column(name = "auth_grant_types") + @Type(type = "json") + private Set authGrantTypes; + + /** + * 响应类型 + */ + @Column(name = "response_types") + @Type(type = "json") + private Set responseTypes; + + /** + * 重定向URIs + */ + @Column(name = "redirect_uris") + @Type(type = "json") + private Set redirectUris; + /** + * scopes + */ + @Column(name = "grant_scopes") + @Type(type = "json") + private Set grantScopes; + /** + * 是否需要授权同意 + */ + @Column(name = "require_auth_consent") + private Boolean requireAuthConsent; + /** + * 需要PKCE + */ + @Column(name = "require_proof_key") + private Boolean requireProofKey; + + /** + * 令牌 Endpoint 身份验证签名算法 + */ + @Column(name = "token_endpoint_auth_signing_algorithm") + private String tokenEndpointAuthSigningAlgorithm; + + /** + * 刷新 Token生存时间(分钟) + */ + @Column(name = "refresh_token_time_to_live") + private Integer refreshTokenTimeToLive; + + /** + * ID Token生存时间(分钟) + */ + @Column(name = "id_token_time_to_live") + private Integer idTokenTimeToLive; + + /** + * 访问 Token生存时间(分钟) + */ + @Column(name = "access_token_time_to_live") + private Integer accessTokenTimeToLive; + + /** + * Id Token 签名算法 + */ + @Column(name = "id_token_signature_algorithm") + private String idTokenSignatureAlgorithm; + + /** + * Access Token 格式 + */ + @Column(name = "access_token_format") + private String accessTokenFormat; + + /** + * 是否重用刷新令牌 + */ + @Column(name = "reuse_refresh_token") + private Boolean reuseRefreshToken; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppPermissionActionEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppPermissionActionEntity.java new file mode 100644 index 00000000..9638e1db --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppPermissionActionEntity.java @@ -0,0 +1,72 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app; + +import java.io.Serial; + +import javax.persistence.*; + +import cn.topiam.employee.common.enums.PermissionActionType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 应用权限 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/2 21:05 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Table(name = "`app_permission_action`") +public class AppPermissionActionEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = -3954680915360748087L; + + /** + * 权限值 + */ + @Column(name = "value_") + private String value; + /** + * 描述 + */ + @Column(name = "name_") + private String name; + + /** + * 权限类型 + */ + @Column(name = "type_") + private PermissionActionType type; + + /** + * 资源 + */ + @ManyToOne + @JoinColumn(name = "resource_id") + private AppPermissionResourceEntity resource; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppPermissionPolicyEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppPermissionPolicyEntity.java new file mode 100644 index 00000000..9df5ea1f --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppPermissionPolicyEntity.java @@ -0,0 +1,79 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.common.enums.PolicyEffect; +import cn.topiam.employee.common.enums.PolicyObjectType; +import cn.topiam.employee.common.enums.PolicySubjectType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 应用策略 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/4 19:41 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Table(name = "`app_permission_policy`") +public class AppPermissionPolicyEntity extends BaseEntity { + + /** + * 应用id + */ + @Column(name = "app_id") + private Long appId; + + /** + * 权限主体ID(用户、角色、分组、组织机构) + */ + @Column(name = "subject_id") + private String subjectId; + /** + * 权限主体类型(用户、角色、分组、组织机构) + */ + @Column(name = "subject_type") + private PolicySubjectType subjectType; + /** + * 权限客体ID(权限、角色) + */ + @Column(name = "object_id") + private Long objectId; + /** + * 权限客体类型(权限、角色) + */ + @Column(name = "object_type") + private PolicyObjectType objectType; + /** + * Effect + */ + @Column(name = "effect_") + private PolicyEffect effect; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppPermissionResourceEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppPermissionResourceEntity.java new file mode 100644 index 00000000..74773979 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppPermissionResourceEntity.java @@ -0,0 +1,89 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app; + +import java.io.Serial; +import java.util.List; + +import javax.persistence.*; + +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; +import static javax.persistence.FetchType.LAZY; + +/** + *

+ * 应用资源关联 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-10 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Table(name = "`app_permission_resource`") +public class AppPermissionResourceEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = 7342074686605139968L; + + /** + * 资源编码 + */ + @Column(name = "code_") + private String code; + + /** + * 资源名称 + */ + @Column(name = "name_") + private String name; + + /** + * 应用ID + */ + @Column(name = "app_id") + private Long appId; + + /** + * 描述 + */ + @Column(name = "desc_") + private String desc; + + /** + * 是否启用 + */ + @Column(name = "is_enabled") + private Boolean enabled; + + /** + * 权限 + */ + @ToString.Exclude + @OneToMany(mappedBy = "resource", fetch = LAZY, cascade = { CascadeType.PERSIST, + CascadeType.REMOVE }) + private List actions; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppPermissionRoleEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppPermissionRoleEntity.java new file mode 100644 index 00000000..f6cf0769 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppPermissionRoleEntity.java @@ -0,0 +1,75 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app; + +import java.io.Serial; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + *

+ * 应用角色表 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-10 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Table(name = "`app_permission_role`") +public class AppPermissionRoleEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = -7761332532995424593L; + + /** + * 角色名称 + */ + @Column(name = "name_") + private String name; + + /** + * 角色编码 + */ + @Column(name = "code_") + private String code; + + /** + * 应用ID + */ + @Column(name = "app_id") + private Long appId; + + /** + * 是否启用 + */ + @Column(name = "is_enabled") + private Boolean enabled; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppSaml2ConfigEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppSaml2ConfigEntity.java new file mode 100644 index 00000000..29b16b41 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/AppSaml2ConfigEntity.java @@ -0,0 +1,248 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import org.hibernate.annotations.Type; +import org.hibernate.annotations.TypeDef; + +import com.fasterxml.jackson.annotation.JsonAlias; +import com.vladmihalcea.hibernate.type.json.JsonStringType; + +import cn.topiam.employee.common.enums.app.*; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Data; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * APP SAML 配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 22:31 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Table(name = "app_saml2_config") +@TypeDef(name = "json", typeClass = JsonStringType.class) +public class AppSaml2ConfigEntity extends BaseEntity { + /** + * APP ID + */ + @Column(name = "app_id") + private Long appId; + + /** + * SP 元数据 + */ + @Column(name = "sp_metadata") + private String spMetadata; + + /** + * SpEntityId + */ + @Column(name = "sp_entity_id") + private String spEntityId; + + /** + * SP 单点登录 ACS URL + */ + @Column(name = "sp_acs_url") + private String spAcsUrl; + + /** + * SP 单点登出 URL + */ + @Column(name = "sp_slo_url") + private String spSloUrl; + + /** + * 是否对 SAML Request 签名进行验证 ,用来对SAML Request签名进行验证,对应SP元数据文件中“AuthnRequestsSigned”值 + */ + @Column(name = "sp_requests_signed") + private Boolean spRequestsSigned; + + /** + * SP公钥证书,用来验证SAML request的签名,对应SP元数据文件中 use='signing' 证书内容 + */ + @Column(name = "sp_sign_cert") + private String spSignCert; + + /** + * Recipient(收件人) + * + * Recipient 是指定 TopIAM 可以向其呈现断言的实体或位置的URI。 + * 此属性可以指定应将断言传递到的收件人端点。此属性有助于防止中介机构将断言重定向到其他端点。 + * 默认情况下,TopIAM 发送ACS URL作为收件人值。 + */ + @Column(name = "recipient_") + private String recipient; + + /** + * 目标受众 + * + * 指定此SAML断言的目标受众,默认和SP Entity ID相同。 + * 通常是 URL,但在技术上可以格式化为任何数据字符串 + */ + @Column(name = "audience_") + private String audience; + + /** + * 单点登录 ACS BINDING + */ + @Column(name = "acs_binding") + private String acsBinding; + + /** + * 单点登出 SLS BINDING + */ + @Column(name = "sls_binding") + private String slsBinding; + + /** + * SAML Response 中指定账户标识 NameID 字段格式。一般无需修改。 + */ + @Column(name = "nameid_format") + private SamlNameIdFormatType nameIdFormat; + + /** + * NameId + */ + @Column(name = "nameid_value_type") + private SamlNameIdValueType nameIdValueType; + + /** + * 签名断言 + */ + @Column(name = "assert_signed") + private Boolean assertSigned; + + /** + * 断言签名使用的非对称算法 + */ + @Column(name = "assert_sign_algorithm") + private SamlSignAssertAlgorithmType assertSignAlgorithm; + + /** + * 加密断言 + */ + @Column(name = "assert_encrypted") + private Boolean assertEncrypted; + + /** + * 断言加密使用的非对称算法 + */ + @Column(name = "assert_encrypt_algorithm") + private SamlEncryptAssertAlgorithmType assertEncryptAlgorithm; + + /** + * 响应是否加密 + */ + @Column(name = "response_signed") + private Boolean responseSigned; + + /** + * 响应签名使用的非对称算法 + */ + @Column(name = "response_sign_algorithm") + private SamlSignAssertAlgorithmType responseSignAlgorithm; + + /** + * SAML 身份认证上下文 + */ + @Column(name = "authn_context_classref") + private AuthnContextClassRefType authnContextClassRef; + + /** + * IDP 发起 SSO 登录成功后,应用应自动跳转的地址。在 SAML Response 中会在 RelayState 参数中传递,应用读取后实现跳转。 + */ + @Column(name = "relay_state") + private String relayState; + + /** + * 在 SAML Response 中,可以将额外用户字段(例如邮箱、显示名等)返回给应用解析。 + */ + @Type(type = "json") + @Column(name = "attribute_statements") + private List attributeStatements; + + /** + * 模版配置 + */ + @Type(type = "json") + @Column(name = "additional_config") + private Map additionalConfig; + + @Data + public static class AttributeStatement implements Serializable { + + @Serial + private static final long serialVersionUID = -7186912435615904210L; + + /** + * key + */ + private String key; + + /** + * 名称 + */ + private String name; + + /** + * nameFormat + */ + private AttributeNameFormat nameFormat; + + /** + * value + */ + @JsonAlias({ "value", "valueExpression" }) + private String valueExpression; + + public AttributeStatement() { + } + + public AttributeStatement(String name, String valueExpression) { + this.name = name; + this.valueExpression = valueExpression; + this.nameFormat = AttributeNameFormat.UNSPECIFIED; + } + + public AttributeStatement(String name, AttributeNameFormat nameFormat, + String valueExpression) { + this.name = name; + this.valueExpression = valueExpression; + this.nameFormat = nameFormat; + } + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppAccessPolicyPO.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppAccessPolicyPO.java new file mode 100644 index 00000000..d0458de6 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppAccessPolicyPO.java @@ -0,0 +1,60 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app.po; + +import cn.topiam.employee.common.entity.app.AppAccessPolicyEntity; +import cn.topiam.employee.common.enums.app.AppProtocol; +import cn.topiam.employee.common.enums.app.AppType; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 应用授权策略po + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/10 22:46 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class AppAccessPolicyPO extends AppAccessPolicyEntity { + /** + * 应用名称 + */ + private String appName; + + /** + * 模板 + */ + private String appTemplate; + + /** + * 协议 + */ + private AppProtocol appProtocol; + + /** + * 应用类型 + */ + private AppType appType; + + /** + * 授权主体 + */ + private String subjectName; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppAccountPO.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppAccountPO.java new file mode 100644 index 00000000..6bfcc3f8 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppAccountPO.java @@ -0,0 +1,61 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app.po; + +import cn.topiam.employee.common.entity.app.AppAccountEntity; +import cn.topiam.employee.common.enums.app.AppProtocol; +import cn.topiam.employee.common.enums.app.AppType; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 应用账户po + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/10 22:46 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class AppAccountPO extends AppAccountEntity { + + /** + * 用户名称 + */ + private String username; + + /** + * 应用名称 + */ + private String appName; + + /** + * 模板 + */ + private String appTemplate; + + /** + * 协议 + */ + private AppProtocol appProtocol; + + /** + * 应用类型 + */ + private AppType appType; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppOidcConfigPO.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppOidcConfigPO.java new file mode 100644 index 00000000..69ba289a --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppOidcConfigPO.java @@ -0,0 +1,75 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app.po; + +import cn.topiam.employee.common.entity.app.AppOidcConfigEntity; +import cn.topiam.employee.common.enums.app.AuthorizationType; +import cn.topiam.employee.common.enums.app.InitLoginType; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/23 20:45 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class AppOidcConfigPO extends AppOidcConfigEntity { + + /** + * 应用编码 + */ + private String appCode; + + /** + * 模版 + */ + private String appTemplate; + + /** + * 客户端ID + */ + private String clientId; + + /** + * 客户端秘钥 + */ + private String clientSecret; + + /** + * SSO 发起方 + */ + private InitLoginType initLoginType; + + /** + * SSO 登录链接 + */ + private String initLoginUrl; + + /** + * 授权范围 + */ + private AuthorizationType authorizationType; + + /** + * 应用是否启用 + */ + private Boolean enabled; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppPermissionPolicyPO.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppPermissionPolicyPO.java new file mode 100644 index 00000000..d2838bab --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppPermissionPolicyPO.java @@ -0,0 +1,93 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app.po; + +import java.io.Serial; +import java.io.Serializable; + +import cn.topiam.employee.common.enums.PolicyEffect; +import cn.topiam.employee.common.enums.PolicyObjectType; +import cn.topiam.employee.common.enums.PolicySubjectType; + +import lombok.Data; +import lombok.experimental.Accessors; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 策略分页查询结果 + * + * @author TopIAM + */ +@Data +@Accessors(chain = true) +@Schema(description = "分页查询策略结果") +public class AppPermissionPolicyPO implements Serializable { + + @Serial + private static final long serialVersionUID = 3320953184046791392L; + + /** + * 授权主体名称 + */ + @Parameter(description = "授权主体名称") + private String subjectName; + + /** + * 权限客体名菜 + */ + @Parameter(description = "授权客体名称") + private String objectName; + + /** + * ID + */ + @Parameter(description = "id") + private Long id; + + /** + * 授权主体id + */ + @Parameter(description = "授权主体id") + private String subjectId; + + /** + * 权限主体类型(用户、角色、分组、组织机构) + */ + @Parameter(description = "授权主体类型") + private PolicySubjectType subjectType; + + /** + * 权限客体ID + */ + @Parameter(description = "授权客体id") + private Long objectId; + + /** + * 权限客体类型(权限、角色) + */ + @Parameter(description = "授权客体类型") + private PolicyObjectType objectType; + + /** + * 授权作用 + */ + @Parameter(description = "授权作用") + private PolicyEffect effect; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppSaml2ConfigPO.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppSaml2ConfigPO.java new file mode 100644 index 00000000..98db1811 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/po/AppSaml2ConfigPO.java @@ -0,0 +1,81 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app.po; + +import org.opensaml.security.credential.Credential; + +import cn.topiam.employee.common.entity.app.AppSaml2ConfigEntity; +import cn.topiam.employee.common.enums.app.AuthorizationType; +import cn.topiam.employee.common.enums.app.InitLoginType; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/23 20:45 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class AppSaml2ConfigPO extends AppSaml2ConfigEntity { + /** + * APP CODE + */ + private String appCode; + + /** + * 模版 + */ + private String appTemplate; + + /** + * 客户端ID + */ + private String clientId; + + /** + * 客户端秘钥 + */ + private String clientSecret; + + /** + * SSO 发起方 + */ + private InitLoginType initLoginType; + + /** + * SSO 登录链接 + */ + private String initLoginUrl; + + /** + * 授权范围 + */ + private AuthorizationType authorizationType; + + /** + * IDP 签名证书 + */ + private Credential idpSignCert; + + /** + * IDP 加密证书 + */ + private Credential idpEncryptCert; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/query/AppAccessPolicyQuery.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/query/AppAccessPolicyQuery.java new file mode 100644 index 00000000..fa552384 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/query/AppAccessPolicyQuery.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app.query; + +import org.springdoc.api.annotations.ParameterObject; + +import cn.topiam.employee.common.enums.PolicySubjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 应用授权策略查询参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/27 19:29 + */ +@Data +@Schema(description = "应用授权策略查询参数") +@ParameterObject +public class AppAccessPolicyQuery { + + /** + * 应用id + */ + @Parameter(description = "应用ID") + private String appId; + + /** + * 授权主体 + */ + @Parameter(description = "授权主体名称") + private String subjectName; + + /** + * 授权主体ID + */ + @Parameter(description = "授权主体ID") + private String subjectId; + + /** + * 主体类型(用户、分组、组织机构) + */ + @Parameter(description = "主体类型") + private PolicySubjectType subjectType; + + /** + * 应用名称 + */ + @Parameter(description = "应用名称") + private String appName; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/query/AppAccountQuery.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/query/AppAccountQuery.java new file mode 100644 index 00000000..064bc9ee --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/query/AppAccountQuery.java @@ -0,0 +1,64 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app.query; + +import org.springdoc.api.annotations.ParameterObject; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * AppAccountCreateParam 应用账户查询入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/24 22:13 + */ +@Data +@Schema(description = "应用账户查询入参") +@ParameterObject +public class AppAccountQuery { + + /** + * appId + */ + @Parameter(description = "appId") + private String appId; + /** + * 用户ID + */ + @Parameter(description = "用户ID") + private String userId; + /** + * 用户名 + */ + @Parameter(description = "用户名") + private String username; + /** + * 账户名称 + */ + @Parameter(description = "账户名称") + private String account; + + /** + * 应用名称 + */ + @Parameter(description = "应用名称") + private String appName; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/query/AppPolicyQuery.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/query/AppPolicyQuery.java new file mode 100644 index 00000000..4b38146f --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/query/AppPolicyQuery.java @@ -0,0 +1,83 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app.query; + +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import org.springdoc.api.annotations.ParameterObject; + +import cn.topiam.employee.common.enums.PolicyEffect; +import cn.topiam.employee.common.enums.PolicyObjectType; +import cn.topiam.employee.common.enums.PolicySubjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 分页查询策略入参 + * + * @author TopIAM + */ +@Data +@Schema(description = "查询权限策略列表入参") +@ParameterObject +public class AppPolicyQuery implements Serializable { + + /** + * 所属应用 + */ + @NotNull(message = "资源所属应用不能为空") + @Parameter(description = "所属应用") + private Long appId; + + /** + * 授权主体Id + */ + @Parameter(description = "授权主体Id") + private String subjectId; + + /** + * 权限主体类型(用户、角色、分组、组织机构) + */ + @NotNull(message = "授权主体类型不能为空") + @Parameter(description = "授权主体类型") + private PolicySubjectType subjectType; + + /** + * 授权客体Id + */ + @Parameter(description = "授权客体Id") + private String objectId; + + /** + * 权限客体类型(权限、角色) + */ + @NotNull(message = "授权客体类型不能为空") + @Parameter(description = "授权客体类型") + private PolicyObjectType objectType; + + /** + * 规则效果 + */ + @Parameter(description = "规则效果") + private PolicyEffect effect; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/standard/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/standard/package-info.java new file mode 100644 index 00000000..da8c9533 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/standard/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.app.standard; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/authentication/IdentityProviderEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/authentication/IdentityProviderEntity.java new file mode 100644 index 00000000..a6e5eddd --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/authentication/IdentityProviderEntity.java @@ -0,0 +1,96 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.authentication; + +import java.io.Serial; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.common.enums.IdentityProviderCategory; +import cn.topiam.employee.common.enums.IdentityProviderType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + *

+ * 社交身份认证源配置 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-16 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Table(name = "identity_provider") +public class IdentityProviderEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = -7936931011805155568L; + + /** + * 名称 + */ + @Column(name = "name_") + private String name; + + /** + * 唯一CODE 不可修改 + */ + @Column(name = "code_") + private String code; + + /** + * 平台 + */ + @Column(name = "type_") + private IdentityProviderType type; + + /** + * 分类 + */ + @Column(name = "category_") + private IdentityProviderCategory category; + + /** + * 配置JSON串 + */ + @Column(name = "config_") + private String config; + + /** + * 是否启用 + */ + @Column(name = "is_enabled") + private Boolean enabled; + + /** + * 是否展示 + */ + @Column(name = "is_displayed") + private Boolean displayed; + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/IdentitySourceEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/IdentitySourceEntity.java new file mode 100644 index 00000000..ff4d9bd5 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/IdentitySourceEntity.java @@ -0,0 +1,108 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.identitysource; + +import java.io.Serial; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import org.hibernate.annotations.Type; + +import cn.topiam.employee.common.entity.identitysource.config.JobConfig; +import cn.topiam.employee.common.entity.identitysource.config.StrategyConfig; +import cn.topiam.employee.common.enums.identityprovider.IdentitySourceProvider; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + *

+ * 社交身份认证源配置 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-16 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Slf4j +@Table(name = "identity_source") +public class IdentitySourceEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = -7936931011805155568L; + /** + * 名称 + */ + @Column(name = "name_") + private String name; + + /** + * 唯一CODE 不可修改 + */ + @Column(name = "code_") + private String code; + + /** + * 平台 + */ + @Column(name = "provider_") + private IdentitySourceProvider provider; + + /** + * 基础配置JSON串 + */ + @Column(name = "basic_config") + private String basicConfig; + + /** + * 同步策略JSON串 + */ + @Column(name = "strategy_config") + @Type(type = "json") + private StrategyConfig strategyConfig; + + /** + * 执行计划JSON串 + */ + @Column(name = "job_config") + @Type(type = "json") + private JobConfig jobConfig; + + /** + * 是否启用 + */ + @Column(name = "is_enabled") + private Boolean enabled; + + /** + * 是否已配置 + */ + @Column(name = "is_configured") + private Boolean configured; + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/IdentitySourceEventRecordEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/IdentitySourceEventRecordEntity.java new file mode 100644 index 00000000..3cb96865 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/IdentitySourceEventRecordEntity.java @@ -0,0 +1,99 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.identitysource; + +import java.time.LocalDateTime; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.common.enums.SyncStatus; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceActionType; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceObjectType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 身份源事件记录 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/22 23:51 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@NoArgsConstructor +@Table(name = "identity_source_event_record") +public class IdentitySourceEventRecordEntity extends BaseEntity { + + /** + * 身份源ID + */ + @Column(name = "identity_source_id") + private Long identitySourceId; + + /** + * 动作类型 + */ + @Column(name = "action_type") + private IdentitySourceActionType actionType; + + /** + * 对象ID + */ + @Column(name = "object_id") + private String objectId; + + /** + * 对象名称 + */ + @Column(name = "object_name") + private String objectName; + + /** + * 对象类型 + */ + @Column(name = "object_type") + private IdentitySourceObjectType objectType; + + /** + * 事件时间 + */ + @Column(name = "event_time") + private LocalDateTime eventTime; + + /** + * 事件状态 + */ + @Column(name = "status_") + private SyncStatus status; + + /** + * 描述 + */ + @Column(name = "desc_") + private String desc; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/IdentitySourceSyncHistoryEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/IdentitySourceSyncHistoryEntity.java new file mode 100644 index 00000000..ec61fde5 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/IdentitySourceSyncHistoryEntity.java @@ -0,0 +1,117 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.identitysource; + +import java.time.LocalDateTime; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.common.enums.SyncStatus; +import cn.topiam.employee.common.enums.TriggerType; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceObjectType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 身份源同步记录表 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/22 23:51 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@NoArgsConstructor +@Table(name = "identity_source_sync_history") +public class IdentitySourceSyncHistoryEntity extends BaseEntity { + + /** + * 批号 + */ + @Column(name = "batch_") + private String batch; + + /** + * 身份源ID + */ + @Column(name = "identity_source_id") + private Long identitySourceId; + + /** + * 创建数量 + */ + @Column(name = "created_count") + private Integer createdCount; + + /** + * 更新数量 + */ + @Column(name = "updated_count") + private Integer updatedCount; + + /** + * 删除数量 + */ + @Column(name = "deleted_count") + private Integer deletedCount; + + /** + * 跳过数量 + */ + @Column(name = "skipped_count") + private Integer skippedCount; + + /** + * 开始时间 + */ + @Column(name = "start_time") + private LocalDateTime startTime; + + /** + * 结束时间 + */ + @Column(name = "end_time") + private LocalDateTime endTime; + + /** + * 对象类型(用户、组织) + */ + @Column(name = "object_type") + private IdentitySourceObjectType objectType; + + /** + * 触发类型(手动、任务、事件) + */ + @Column(name = "trigger_type") + private TriggerType triggerType; + + /** + * 触发类型(手动、任务、事件) + */ + @Column(name = "status_") + private SyncStatus status; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/IdentitySourceSyncRecordEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/IdentitySourceSyncRecordEntity.java new file mode 100644 index 00000000..79b95485 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/IdentitySourceSyncRecordEntity.java @@ -0,0 +1,91 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.identitysource; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.common.enums.SyncStatus; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceActionType; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceObjectType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 身份源同步详情 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/22 23:51 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@NoArgsConstructor +@Table(name = "identity_source_sync_record") +public class IdentitySourceSyncRecordEntity extends BaseEntity { + + /** + * 同步历史ID + */ + @Column(name = "sync_history_id") + private Long syncHistoryId; + + /** + * 动作类型 + */ + @Column(name = "action_type") + private IdentitySourceActionType actionType; + + /** + * 对象ID + */ + @Column(name = "object_id") + private String objectId; + + /** + * 对象名称 + */ + @Column(name = "object_name") + private String objectName; + + /** + * 对象类型 + */ + @Column(name = "object_type") + private IdentitySourceObjectType objectType; + + /** + * 状态 + */ + @Column(name = "status_") + private SyncStatus status; + + /** + * 描述 + */ + @Column(name = "desc_") + private String desc; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/config/JobConfig.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/config/JobConfig.java new file mode 100644 index 00000000..40e8daed --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/config/JobConfig.java @@ -0,0 +1,249 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.identitysource.config; + +import java.text.ParseException; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import java.util.List; +import java.util.Objects; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +import org.springframework.scheduling.support.CronExpression; + +import com.alibaba.fastjson2.annotation.JSONField; +import com.cronutils.builder.CronBuilder; +import com.cronutils.model.Cron; +import com.cronutils.model.CronType; +import com.cronutils.model.definition.CronDefinitionBuilder; +import com.cronutils.model.field.expression.Every; +import com.cronutils.model.field.expression.FieldExpression; +import com.cronutils.model.field.value.IntegerFieldValue; +import com.fasterxml.jackson.annotation.JsonAlias; +import com.fasterxml.jackson.annotation.JsonIgnore; + +import cn.topiam.employee.support.exception.TopIamException; + +import lombok.Data; +import lombok.extern.slf4j.Slf4j; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; +import static com.cronutils.model.field.expression.FieldExpressionFactory.*; + +/** + * 任务配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/9/24 23:09 + */ +@Slf4j +@Data +@Schema(description = "任务配置") +public class JobConfig { + /** + * 模式 + */ + @Parameter(description = "任务执行模式") + @NotNull(message = "请选择任务执行模式") + private Mode mode; + + /** + * 任务执行星期值 + */ + @NotNull(message = "请选择任务执行星期值") + @Parameter(description = "任务执行星期值") + private List dayOfWeek; + + /** + * 值 + */ + @Parameter(description = "任务执行值") + @NotEmpty(message = "任务执行值不能为空") + @JsonAlias({ "time", "interval" }) + private String value; + + public enum Mode { + /** + * 周期 + */ + period, + /** + * 定时 + */ + timed + } + + /** + * 星期几 + */ + public enum DayOfWeek { + /** + * 总是 + */ + always(between(1, 7)), + /** + * 周一 + */ + monday(on(1)), + /** + * 周二 + */ + tuesday(on(2)), + /** + * 周三 + */ + wednesday(on(3)), + /** + * 周四 + */ + thursday(on(4)), + /** + * 周五 + */ + friday(on(5)), + /** + * 周六 + */ + saturday(on(6)), + /** + * 周天 + */ + sunday(on(7)); + + private final FieldExpression code; + + DayOfWeek(FieldExpression code) { + this.code = code; + } + + public FieldExpression getCode() { + return code; + } + } + + /** + * 获取表达式 + * + * @return {@link String} + */ + @JSONField(serialize = false, deserialize = false) + @JsonIgnore + public String getCronExpression(CronType cronType) { + if (!(cronType.equals(CronType.SPRING) || cronType.equals(CronType.QUARTZ))) { + throw new TopIamException("不支持该类型 [" + cronType + "]"); + } + //小时 + FieldExpression hour = always(); + //分钟 + FieldExpression minute = always(); + //秒 + FieldExpression second = always(); + //处理星期 + FieldExpression dayOfWeek = null; + if (this.dayOfWeek.contains(DayOfWeek.always)) { + dayOfWeek = DayOfWeek.always.getCode(); + } else { + for (DayOfWeek week : this.dayOfWeek) { + if (Objects.isNull(dayOfWeek)) { + dayOfWeek = week.getCode(); + continue; + } + dayOfWeek = dayOfWeek.and(week.getCode()); + } + } + //模式为定时 解析时分秒 + if (mode.equals(JobConfig.Mode.timed)) { + LocalTime time = LocalTime.parse(value, DateTimeFormatter.ofPattern("H[H]:mm:ss")); + hour = on(time.getHour()); + minute = on(time.getMinute()); + second = on(time.getSecond()); + } + //模式为周期(0- 某个小时)执行 + if (mode.equals(JobConfig.Mode.period)) { + hour = new Every(on(0), new IntegerFieldValue(Integer.parseInt(value))); + minute = on(0); + second = on(0); + } + /* + * Java(Quartz) + * * * * * * * * + * - - - - - - - + * | | | | | | | + * | | | | | | + year [optional] + * | | | | | +----- day of week (1 - 7) sun,mon,tue,wed,thu,fri,sat + * | | | | +---------- month (1 - 12) OR jan,feb,mar,apr ... + * | | | +--------------- day of month (1 - 31) + * | | +-------------------- hour (0 - 23) + * | +------------------------- min (0 - 59) + * +------------------------------ second (0 - 59) + */ + + /* + * Java(Spring) + * * * * * * * * + * - - - - - - - + * | | | | | | | + * | | | | | | + year [optional] + * | | | | | +----- day of week (1 - 7) sun,mon,tue,wed,thu,fri,sat + * | | | | +---------- month (1 - 12) OR jan,feb,mar,apr ... + * | | | +--------------- day of month (1 - 31) + * | | +-------------------- hour (0 - 23) + * | +------------------------- min (0 - 59) + * +------------------------------ second (0 - 59) + */ + CronBuilder cronBuilder = CronBuilder + .cron(CronDefinitionBuilder.instanceDefinitionFor(cronType)) + //秒 + .withSecond(second) + //分钟 + .withMinute(minute) + //小时 + .withHour(hour) + //天 + .withDoM(questionMark()) + //月份 + .withMonth(always()) + //星期几 + .withDoW(dayOfWeek); + //年 + if (cronType.equals(CronType.QUARTZ)) { + cronBuilder.withYear(always()); + } + Cron cron = cronBuilder.instance(); + // Obtain the string expression + String cronAsString = cron.asString(); + //QUARTZ + if (cronType.equals(CronType.QUARTZ)) { + try { + org.quartz.CronExpression cronExpression = new org.quartz.CronExpression( + cronAsString); + log.debug("Quartz Cron Expression: \n{} ", cronExpression.getExpressionSummary()); + return cronExpression.toString(); + } catch (ParseException exception) { + throw new RuntimeException(exception); + } + } + //SPRING + CronExpression parse = CronExpression.parse(cronAsString); + log.debug("Spring Cron Expression: {} ", parse); + return parse.toString(); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/config/StrategyConfig.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/config/StrategyConfig.java new file mode 100644 index 00000000..19ca62d8 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/identitysource/config/StrategyConfig.java @@ -0,0 +1,87 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.identitysource.config; + +import javax.validation.Valid; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 策略配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/9/24 23:10 + */ +@Data +@Schema(description = "策略配置") +public class StrategyConfig { + + /** + * 组织策略 + */ + @Valid + @NotNull(message = "组织策略不能为空") + @Parameter(description = "组织策略") + private Organization organization; + + /** + * 用户策略 + */ + @Valid + @NotNull(message = "用户策略不能为空") + @Parameter(description = "用户策略") + private User user; + + @Data + public static class Organization { + + /** + * 目标ID + */ + @NotEmpty(message = "目标ID不能为空") + @Parameter(description = "目标ID") + private String targetId; + } + + @Data + public static class User { + + /** + * 默认密码 + */ + @Parameter(description = "默认密码") + private String defaultPassword; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + + /** + * 邮件通知 + */ + @Parameter(description = "邮件通知") + private Boolean emailNotify; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/package-info.java new file mode 100644 index 00000000..d6c7356a --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/setting/AdministratorEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/setting/AdministratorEntity.java new file mode 100644 index 00000000..bd286eef --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/setting/AdministratorEntity.java @@ -0,0 +1,118 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.setting; + +import java.io.Serial; +import java.time.LocalDateTime; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.common.enums.UserStatus; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + *

+ * 管理员表 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-07-31 + */ +@Getter +@Setter +@ToString +@Accessors(chain = true) +@Entity +@Table(name = "`administrator`") +public class AdministratorEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = -2619231849746900857L; + + /** + * 用户名 + */ + @Column(name = "username_") + private String username; + + /** + * 密码 + */ + @Column(name = "password_") + private String password; + + /** + * 邮箱 + */ + @Column(name = "email_") + private String email; + + /** + * 手机号 + */ + @Column(name = "phone_") + private String phone; + + /** + * 头像URL + */ + @Column(name = "avatar_") + private String avatar; + + /** + * 状态 ENABLE:启用 DISABLE:禁用 LOCKING:锁定 + */ + @Column(name = "status_") + private UserStatus status; + + /** + * 邮箱验证有效 + */ + @Column(name = "email_verified") + private Boolean emailVerified; + + /** + * 认证次数 + */ + @Column(name = "auth_total") + private Long authTotal; + /** + * 上次认证IP + */ + @Column(name = "last_auth_ip") + private String lastAuthIp; + + /** + * 上次认证时间 + */ + @Column(name = "last_auth_time") + private LocalDateTime lastAuthTime; + + /** + * 扩展参数 + */ + @Column(name = "expand_") + private String expand; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/setting/MailTemplateEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/setting/MailTemplateEntity.java new file mode 100644 index 00000000..b8dead60 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/setting/MailTemplateEntity.java @@ -0,0 +1,78 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.setting; + +import java.io.Serial; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.common.enums.MailType; +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + *

+ * 邮件模板 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-13 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Table(name = "mail_template") +public class MailTemplateEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = 5983857137670090984L; + /** + * 模板类型 + */ + @Column(name = "type_") + private MailType type; + + /** + * 发送人 + *

+ * 你可以包括以下宏命令:${client_name},${time},${user_email},${client_description},${verify_code}。 例如:${client_name} + */ + @Column(name = "sender_") + private String sender; + + /** + * 主题 + * 你可以包括以下宏:${client_name},${time},${client_description},${user_email}。 例如:你正在修改绑定邮箱,你的验证码为:${verify_code}! + */ + @Column(name = "subject_") + private String subject; + + /** + * 内容 + */ + @Column(name = "content_") + private String content; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/setting/SettingEntity.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/setting/SettingEntity.java new file mode 100644 index 00000000..96cb3905 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/setting/SettingEntity.java @@ -0,0 +1,63 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.setting; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import cn.topiam.employee.support.repository.domain.BaseEntity; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + *

+ * 设置表 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-10-01 + */ +@Getter +@Setter +@ToString +@Entity +@Accessors(chain = true) +@Table(name = "`setting`") +public class SettingEntity extends BaseEntity { + + /** + * name + */ + @Column(name = "name_") + private String name; + /** + * value + */ + @Column(name = "value_") + private String value; + /** + * desc + */ + @Column(name = "desc_") + private String desc; + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/setting/config/SmsConfig.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/setting/config/SmsConfig.java new file mode 100644 index 00000000..156ba6b5 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/setting/config/SmsConfig.java @@ -0,0 +1,81 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.entity.setting.config; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; + +import cn.topiam.employee.common.enums.Language; +import cn.topiam.employee.common.enums.SmsType; +import cn.topiam.employee.common.message.enums.SmsProvider; +import cn.topiam.employee.common.message.sms.SmsProviderConfig; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; + +/** + * 短信配置 + * + * @author TopIAM + */ +@Data +public class SmsConfig implements Serializable { + + @Serial + private static final long serialVersionUID = 5293005308937620292L; + + /** + * 提供商 + */ + private SmsProvider provider; + + /** + * 语言 + */ + private Language language; + + /** + * 配置 + */ + private SmsProviderConfig config; + + /** + * 模版配置 + */ + private List templates; + + public SmsConfig() { + } + + @Data + public static class TemplateConfig implements Serializable { + + @Serial + private static final long serialVersionUID = 2801844583775238689L; + + @Parameter(description = "短信类型") + private SmsType type; + @Parameter(description = "模板ID/CODE") + private String code; + + public TemplateConfig() { + } + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/AuthenticationType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/AuthenticationType.java new file mode 100644 index 00000000..e7b5bfb4 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/AuthenticationType.java @@ -0,0 +1,86 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 认证方式 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/31 22:45 + */ +public enum AuthenticationType implements BaseEnum { + /** + * from表单 + */ + FORM("form", "FORM表单"), + /** + * 短信验证码 + */ + SMS("sms", "短信验证码"), + /** + * 社交认证 + */ + SOCIAL("social", "社交认证"); + + @JsonValue + private String code; + + private String desc; + + AuthenticationType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + /** + * 获取认证平台 + * + * @param code {@link String} + * @return {@link AuthenticationType} + */ + @EnumConvert + public static AuthenticationType getType(String code) { + AuthenticationType[] values = values(); + for (AuthenticationType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + throw new NullPointerException("未获取到对应平台"); + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getDesc() { + return desc; + } + + public void setDesc(String desc) { + this.desc = desc; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/BaseEnum.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/BaseEnum.java new file mode 100644 index 00000000..6936b003 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/BaseEnum.java @@ -0,0 +1,40 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +/** + * + * @author TopIAM + * Created by support@topiam.cn on 2022/11/27 23:46 + */ +public interface BaseEnum { + /** + * 获取code + * + * @return {@link String} + */ + String getCode(); + + /** + * 获取desc + * + * @return {@link String} + */ + String getDesc(); + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/CaptchaProviderType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/CaptchaProviderType.java new file mode 100644 index 00000000..cfc350ea --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/CaptchaProviderType.java @@ -0,0 +1,87 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 验证码提供类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/7 20:01 + */ +public enum CaptchaProviderType implements BaseEnum { + + /** + * ALIYUN + */ + ALIYUN("aliyun", "阿里云"), + /** + *TENCENT + */ + TENCENT("tencent", "腾讯"), + /** + *GEE_TEST + */ + GEE_TEST("geetest", "极验"), + /** + *HCAPTCHA + */ + HCAPTCHA("hcaptcha", "Hcaptcha"), + /** + *RECAPTCHA + */ + RECAPTCHA("recaptcha", "reCAPTCHA"); + + @JsonValue + private final String code; + private final String desc; + + /** + * 获取提供商 + * + * @param code {@link String} + * @return {@link CaptchaProviderType} + */ + @EnumConvert + public static CaptchaProviderType getType(String code) { + CaptchaProviderType[] values = values(); + for (CaptchaProviderType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + throw new NullPointerException("未获取到对应提供商"); + } + + CaptchaProviderType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + @Override + public String getDesc() { + return null; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/CheckValidityType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/CheckValidityType.java new file mode 100644 index 00000000..9c7835cb --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/CheckValidityType.java @@ -0,0 +1,47 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +/** + * 检查有效性类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/17 19:22 + */ +public enum CheckValidityType { + /** + * 邮箱 + */ + EMAIL, + /** + * 手机号 + */ + PHONE, + /** + * 名称 + */ + NAME, + /** + * 编码 + */ + CODE, + /** + * 用户名 + */ + USERNAME; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/DataOrigin.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/DataOrigin.java new file mode 100644 index 00000000..33491834 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/DataOrigin.java @@ -0,0 +1,106 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.alibaba.fastjson2.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 数据来源 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/7 20:35 + */ +public enum DataOrigin implements BaseEnum { + + /** + * 系统添加 + */ + INPUT("input", "自建"), + /** + * 钉钉 + */ + DING_TALK("dingtalk", "钉钉导入"), + + /** + * 企业微信 + */ + WECHAT_WORK("wechat", "企业微信导入"), + /** + * 飞书 + */ + FEI_SHU("feishu", "飞书导入"); + + /** + * code + */ + @JsonValue + @JSONField + private final String code; + /** + * desc + */ + private final String desc; + + DataOrigin(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取来源 + * + * @param code {@link String} + * @return {@link OrganizationType} + */ + @EnumConvert + public static DataOrigin getType(String code) { + DataOrigin[] values = values(); + for (DataOrigin source : values) { + if (String.valueOf(source.getCode()).equals(code)) { + return source; + } + } + return null; + } + + public static DataOrigin getName(String name) { + DataOrigin[] values = values(); + for (DataOrigin source : values) { + if (source.name().equals(name)) { + return source; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/EnumDeserializer.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/EnumDeserializer.java new file mode 100644 index 00000000..ecdace2f --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/EnumDeserializer.java @@ -0,0 +1,72 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import java.io.IOException; +import java.util.Arrays; +import java.util.Objects; + +import org.apache.commons.lang3.StringUtils; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.BeanProperty; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.deser.ContextualDeserializer; + +/** + * EnumDeserializer + * + * @author TopIAM + * Created by support@topiam.cn on 2022/11/27 23:48 + */ +public class EnumDeserializer extends JsonDeserializer implements ContextualDeserializer { + /** + * 记录枚举字段的类,用于获取其定义的所有枚举值 + */ + private Class propertyClass; + + public EnumDeserializer() { + } + + public EnumDeserializer(Class propertyClass) { + this.propertyClass = propertyClass; + } + + @Override + public BaseEnum deserialize(JsonParser jsonParser, + DeserializationContext deserializationContext) throws IOException { + String value = jsonParser.getValueAsString(); + if (StringUtils.isBlank(value)) { + return null; + } + // 调用Class的这个方法,获取枚举类的所有枚举值 + return Arrays.stream(propertyClass.getEnumConstants()) + .filter(e -> Objects.equals(e.getCode(), value)).findAny() + .orElseThrow(() -> new IllegalArgumentException( + "No such code of " + propertyClass.getSimpleName())); + } + + @Override + public JsonDeserializer createContextual(DeserializationContext ctxt, + BeanProperty property) { + // 获取枚举字段的类型Class + return new ListEnumDeserializer( + (Class) property.getType().getRawClass()); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/IdentityProviderCategory.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/IdentityProviderCategory.java new file mode 100644 index 00000000..34f25536 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/IdentityProviderCategory.java @@ -0,0 +1,93 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import java.util.List; + +import com.google.common.collect.Lists; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 身份源类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/3/21 23:07 + */ +public enum IdentityProviderCategory implements BaseEnum { + /** + * 社交 + */ + social("social", "社交", Lists.newArrayList( + IdentityProviderType.QQ, + IdentityProviderType.WECHAT_SCAN_CODE, + IdentityProviderType.WEIBO, + IdentityProviderType.GITHUB, + IdentityProviderType.GOOGLE, + IdentityProviderType.ALIPAY)), + /** + * 企业 + */ + enterprise("enterprise", "企业", Lists + .newArrayList( + IdentityProviderType.WECHATWORK_SCAN_CODE, + IdentityProviderType.DINGTALK_SCAN_CODE, + IdentityProviderType.DINGTALK_OAUTH, + IdentityProviderType.LDAP)); + + private final String code; + + private final String desc; + + private final List providers; + + IdentityProviderCategory(String code, String desc, List providers) { + this.code = code; + this.desc = desc; + this.providers = providers; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + public List getProviders() { + return providers; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link AuthenticationType} + */ + @EnumConvert + public static IdentityProviderCategory getType(String code) { + IdentityProviderCategory[] values = values(); + for (IdentityProviderCategory status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + throw new NullPointerException("未获取到对应平台"); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/IdentityProviderType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/IdentityProviderType.java new file mode 100644 index 00000000..5699dc9c --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/IdentityProviderType.java @@ -0,0 +1,133 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; +import static cn.topiam.employee.common.constants.AuthorizeConstants.AUTHORIZATION_REQUEST_URI; +import static cn.topiam.employee.common.constants.AuthorizeConstants.LOGIN_PATH; + +/** + * 认证提供商 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/13 22:18 + */ +public enum IdentityProviderType implements BaseEnum { + /** + * 微信扫码登录 + */ + WECHAT_SCAN_CODE("wechat_scan_code", "微信扫码登录", + "通过微信扫码进行身份认证"), + /** + * 钉钉扫码登录 + */ + DINGTALK_SCAN_CODE("dingtalk_scan_code", + "钉钉扫码认证", + + "通过钉钉扫码进行身份认证"), + /** + * 钉钉Oauth2 + */ + DINGTALK_OAUTH("dingtalk_oauth", "钉钉Oauth认证", + "通过钉钉进行身份认证"), + /** + * 企业微信 + */ + WECHATWORK_SCAN_CODE("wechatwork_scan_code", + "企业微信扫码认证", + + "通过企业微信同步的用户可使用企业微信扫码登录进行身份认证"), + /** + * QQ + */ + QQ("qq_oauth", "QQ认证", "通过QQ进行身份认证"), + /** + * 微博 + */ + WEIBO("weibo_oauth", "微博认证", "通过微博进行身份认证"), + /** + * Github + */ + GITHUB("github_oauth", "Github", + "通过 GitHub 进行身份认证"), + /** + * Google + */ + GOOGLE("google_oauth", "Google", + "通过 Google 进行身份认证"), + /** + * 支付宝扫码认证 + */ + ALIPAY("alipay_oauth", "支付宝认证", + "通过支付宝进行身份认证"), + + /** + * LDAP + */ + LDAP("ldap", "LDAP 认证源", "通过 LDAP 认证源进行身份验证"); + + @JsonValue + private final String code; + private final String name; + private final String desc; + + IdentityProviderType(String code, String name, String desc) { + this.code = code; + this.name = name; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public String getDesc() { + return desc; + } + + public String getAuthorizationPathPrefix() { + return AUTHORIZATION_REQUEST_URI + "/" + getCode(); + } + + public String getLoginPathPrefix() { + return LOGIN_PATH + "/" + getCode(); + } + + /** + * 获取认证平台 + * + * @param code {@link String} + * @return {@link IdentityProviderType} + */ + @EnumConvert + public static IdentityProviderType getType(String code) { + IdentityProviderType[] values = values(); + for (IdentityProviderType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/Language.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/Language.java new file mode 100644 index 00000000..4f1ae7b0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/Language.java @@ -0,0 +1,90 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 语言 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/9 21:04 + */ +public enum Language implements BaseEnum { + /** + * 英语 + */ + EN("en", "英语"), + /** + * 中文 + */ + ZH("zh", "中文"); + + /** + * code + */ + @JsonValue + private final String locale; + /** + * desc + */ + private final String desc; + + Language(String locale, String desc) { + this.locale = locale; + this.desc = desc; + } + + public String getLocale() { + return locale; + } + + @Override + public String getCode() { + return locale; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link OrganizationType} + */ + @EnumConvert + public static Language getType(String code) { + Language[] values = values(); + for (Language status : values) { + if (String.valueOf(status.getLocale()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return this.getLocale(); + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/ListEnumDeserializer.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/ListEnumDeserializer.java new file mode 100644 index 00000000..940ba366 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/ListEnumDeserializer.java @@ -0,0 +1,91 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import java.io.IOException; +import java.lang.reflect.Field; +import java.util.*; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.deser.ContextualDeserializer; +import com.fasterxml.jackson.databind.node.ArrayNode; + +/** + * ListEnumDeserializer + * + * @author TopIAM + * Created by support@topiam.cn on 2022/11/27 22:00 + */ +public class ListEnumDeserializer extends JsonDeserializer> + implements ContextualDeserializer { + /** + * 记录枚举字段的类,用于获取其定义的所有枚举值 + */ + private Class propertyClass; + + public ListEnumDeserializer() { + } + + public ListEnumDeserializer(Class propertyClass) { + this.propertyClass = propertyClass; + } + + @Override + public List deserialize(JsonParser jp, + DeserializationContext cxt) throws IOException { + ArrayNode treeNode = jp.readValueAsTree(); + Field field; + try { + field = jp.getCurrentValue().getClass().getDeclaredField(jp.currentName()); + } catch (NoSuchFieldException e) { + return null; + } + field.setAccessible(true); + if (!field.getType().equals(List.class)) { + return null; + } + List result = new ArrayList<>(); + Iterator elements = treeNode.elements(); + while (elements.hasNext()) { + String value = elements.next().asText(); + try { + //设置值 + BaseEnum anEnum = Arrays.stream(propertyClass.getEnumConstants()) + .filter(e -> Objects.equals(e.getCode(), value)).findAny() + .orElseThrow(() -> new IllegalArgumentException( + "No such code of " + propertyClass.getSimpleName())); + result.add(anEnum); + } catch (IllegalArgumentException ignored) { + } + } + if (result.isEmpty()) { + return null; + } else { + return result; + } + } + + @Override + public JsonDeserializer createContextual(DeserializationContext ctxt, + BeanProperty property) { + // 获取枚举字段的类型Class + return new ListEnumDeserializer( + (Class) property.getType().getContentType().getRawClass()); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/MailType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/MailType.java new file mode 100644 index 00000000..4d818b17 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/MailType.java @@ -0,0 +1,197 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 邮件模板类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/13 23:02 + */ +public enum MailType implements BaseEnum { + + /** + * 绑定邮箱 + */ + BIND_EMAIL("bind_email", "绑定邮箱", "每当用户绑定邮箱时,都会发送此电子邮件。", + "您正在绑定邮箱,验证码为:${verify_code}", "系统账户", + getMailContentPath() + "bind-mail-content.html"), + /** + * 修改绑定邮件 + */ + UPDATE_BIND_MAIL("update_bind_mail", "修改绑定邮件", + "每当用户需要修改绑定邮箱、发送验证码时,都会发送此电子邮件。", + "您正在修改绑定邮箱,验证码为:${verify_code}", "系统账户", + getMailContentPath() + "update-bind-mail-content.html"), + + /** + * 忘记密码 暂未实现 + */ + FORGET_PASSWORD("forget_password", "忘记密码", + "每当用户忘记密码时,都会发送此电子邮件。", + "您正在修改密码,验证码为:${verify_code}", "系统账户", + getMailContentPath() + "update-password-content.html"), + /** + * 修改密码 + */ + UPDATE_PASSWORD("update_password", "修改密码", + "每当用户要求更改密码时,都会发送此电子邮件。", + "您正在修改密码,验证码为:${verify_code}", "系统账户", + getMailContentPath() + "update-password-content.html"), + /** + * 重置密码 + */ + RESET_PASSWORD("reset_password", "重置密码", + "每当用户要求更改密码时,都会发送此电子邮件。", + "您正在重置密码,验证码为:${verify_code}", "系统账户", + getMailContentPath() + "reset-password-content.html"), + /** + * 重置密码成功 TODO 提示信息调整 + */ + RESET_PASSWORD_CONFIRM("reset_password_confirm", "重置密码成功", + "每当用户重置密码成功时,都会发送此电子邮件。", + "您已成功重置密码,如非本人操作请立即修改账户密码", "系统账户", + getMailContentPath() + "reset-password-confirm-content.html"), + + /** + * 验证邮箱 + */ + VERIFY_EMAIL("verify_email", "验证邮箱", + "用户用邮箱初次注册时会发送一封验证邮箱的链接,用户点击邮件内的网址即可完成验证。", + "请点击此链接进行验证: ${verify_link}", "系统账户", + getMailContentPath() + "verify-email-content.html"), + /** + * 二次验证 + */ + AGAIN_VERIFY("again_verify", "二次验证", + "管理员开启邮件二次认证后,用户使用账号密码登录,选择邮件二次认证时。", + "您正在进行二次认证,验证码为:${verify_code},${expire_time}分钟内有效。", + "系统账户", getMailContentPath() + + "again-verify-mail-content.html"), + /** + * 欢迎邮件 + */ + WELCOME_MAIL("welcome_mail", "欢迎邮件", + "一旦用户验证其电子邮件地址,将发送此电子邮件。 如果验证电子邮件已关闭, 则会在用户第一次注册或登录时发送。", + "你已注册成功", + + "系统账户", getMailContentPath() + + "welcome-mail-content.html"), + + /** + * 密码过期提醒 + */ + PASSWORD_SOON_EXPIRED_REMIND("password_soon_expired_remind", + "密码即将到期提醒", + "用户距离上次修改密码有效期即将过期时,都会发送此电子邮件。", + "您的密码将于${expire_days}天后过期, 请尽快修改密码。", + "系统账户", getMailContentPath() + + "password-soon-expired-content.html"), + /** + * 风险预警 暂不实现 + */ + WARNING("warning", "风险预警", "用户每次执行风险操作,都会发送此电子邮件。", + "您的账号存在风险操作, 验证码为:${verify_code}。", "系统账户", + getMailContentPath() + "warning-content.html"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * 名称 + */ + private final String name; + /** + * desc + */ + private final String desc; + /** + * 主题 + */ + private final String subject; + /** + * 发件人 + */ + private final String sender; + /** + * 内容 + */ + private final String content; + + MailType(String code, String name, String desc, String subject, String sender, String content) { + this.code = code; + this.name = name; + this.desc = desc; + this.subject = subject; + this.sender = sender; + this.content = content; + } + + @Override + public String getCode() { + return code; + } + + @Override + public String getDesc() { + return desc; + } + + public String getContent() { + return content; + } + + public String getSubject() { + return subject; + } + + public String getName() { + return name; + } + + public String getSender() { + return sender; + } + + static String getMailContentPath() { + return "mail/content/"; + } + + @EnumConvert + public static MailType getType(String code) { + MailType[] values = values(); + for (MailType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + throw new NullPointerException("未找到该类型"); + } + + @Override + public String toString() { + return this.code; + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/MessageCategory.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/MessageCategory.java new file mode 100644 index 00000000..b5270e55 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/MessageCategory.java @@ -0,0 +1,85 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 消息分类 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/9 21:04 + */ +public enum MessageCategory implements BaseEnum { + /** + * 验证码 + */ + CODE("code", "验证码"), + /** + * 通知 + */ + NOTICE("notice", "通知"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + MessageCategory(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link OrganizationType} + */ + @EnumConvert + public static MessageCategory getType(String code) { + MessageCategory[] values = values(); + for (MessageCategory status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/MessageNoticeChannel.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/MessageNoticeChannel.java new file mode 100644 index 00000000..af1740d6 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/MessageNoticeChannel.java @@ -0,0 +1,87 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 消息类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/25 19:19 + */ +public enum MessageNoticeChannel implements BaseEnum { + /** + * 邮件 + */ + MAIL("mail", "邮件"), + /** + * 短信 + */ + SMS("sms", "短信"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + MessageNoticeChannel(String code, String desc) { + this.code = code; + this.desc = desc; + } + + @Override + public String getCode() { + return code; + } + + @Override + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link OrganizationType} + */ + @EnumConvert + public static MessageNoticeChannel getType(String code) { + MessageNoticeChannel[] values = values(); + for (MessageNoticeChannel status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/MfaFactor.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/MfaFactor.java new file mode 100644 index 00000000..50920b17 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/MfaFactor.java @@ -0,0 +1,89 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * MFA方式 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/19 23:12 + */ +public enum MfaFactor implements BaseEnum { + /** + * SMS + */ + SMS_OTP("sms_otp", "短信验证码"), + /** + * 邮件验证码 + */ + EMAIL_OTP("email_otp", "邮件验证码"), + + /** + * APP TOTP + */ + APP_TOTP("app_totp", "APP TOTP"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + MfaFactor(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link OrganizationType} + */ + @EnumConvert + public static MfaFactor getType(String code) { + MfaFactor[] values = values(); + for (MfaFactor status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/MfaMode.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/MfaMode.java new file mode 100644 index 00000000..198ce2ab --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/MfaMode.java @@ -0,0 +1,88 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * MFA 模式 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/19 23:04 + */ +public enum MfaMode implements BaseEnum { + /** + * 常开模式 + */ + ALWAYS("always", "常开模式"), + /** + * 关闭 + */ + NONE("none", "关闭"), + /** + * 智能模式 + */ + SMART("smart", "智能模式"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + MfaMode(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link OrganizationType} + */ + @EnumConvert + public static MfaMode getType(String code) { + MfaMode[] values = values(); + for (MfaMode status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/OrganizationType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/OrganizationType.java new file mode 100644 index 00000000..809f2451 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/OrganizationType.java @@ -0,0 +1,92 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 组织机构类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/9 21:04 + */ +public enum OrganizationType implements BaseEnum { + /** + * 集团 + */ + GROUP("group", "集团"), + /** + * 公司 + */ + COMPANY("company", "公司"), + /** + * 部门 + */ + DEPARTMENT("department", "部门"), + /** + * 单位 + */ + UNIT("unit", "单位"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + OrganizationType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link OrganizationType} + */ + @EnumConvert + public static OrganizationType getType(String code) { + OrganizationType[] values = values(); + for (OrganizationType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/PasswordStrength.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/PasswordStrength.java new file mode 100644 index 00000000..3046bcdb --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/PasswordStrength.java @@ -0,0 +1,39 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +/** + * 密码强度 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/4 22:45 + */ +public enum PasswordStrength { + /** + * 低 + */ + LOW, + /** + * 中 + */ + MEDIUM, + /** + * 高 + */ + HIGHER +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/PermissionActionType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/PermissionActionType.java new file mode 100644 index 00000000..20de77b5 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/PermissionActionType.java @@ -0,0 +1,82 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * 权限类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/10 22:51 + */ +public enum PermissionActionType implements BaseEnum { + /** + * 菜单 + */ + MENU("MENU", "菜单"), + /** + * 按钮 + */ + BUTTON("BUTTON", "按钮"), + /** + * API + */ + API("API", "API"), + /** + * 数据 + */ + DATA("DATA", "数据"), + /** + * 其他 + */ + OTHER("OTHER", "其他"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + PermissionActionType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + public static PermissionActionType getType(String code) { + PermissionActionType[] values = values(); + for (PermissionActionType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/PolicyEffect.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/PolicyEffect.java new file mode 100644 index 00000000..9ef756ce --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/PolicyEffect.java @@ -0,0 +1,79 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 规则效果 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/4 19:07 + */ +public enum PolicyEffect implements BaseEnum { + /** + * 允许 + */ + Allow("ALLOW", "允许"), + /** + * 拒绝 + */ + Deny("DENY", "拒绝"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + PolicyEffect(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link PolicyEffect} + */ + @EnumConvert + public static PolicyEffect getType(String code) { + PolicyEffect[] values = values(); + for (PolicyEffect status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/PolicyObjectType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/PolicyObjectType.java new file mode 100644 index 00000000..33fe671a --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/PolicyObjectType.java @@ -0,0 +1,83 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 权限策略客体类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/4 19:05 + */ +public enum PolicyObjectType implements BaseEnum { + /** + * 角色 + */ + ROLE("ROLE", "角色"), + /** + * 权限 + */ + PERMISSION("PERMISSION", "权限"), + /** + * 资源 + */ + RESOURCE("RESOURCE", "资源"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + PolicyObjectType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link PolicyObjectType} + */ + @EnumConvert + public static PolicyObjectType getType(String code) { + PolicyObjectType[] values = values(); + for (PolicyObjectType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/PolicySubjectType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/PolicySubjectType.java new file mode 100644 index 00000000..571cc080 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/PolicySubjectType.java @@ -0,0 +1,92 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 权限策略主体类型 + * 用户、角色、分组、组织机构 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/4 19:05 + */ +public enum PolicySubjectType implements BaseEnum { + /** + * 角色 + */ + ROLE("ROLE", "角色"), + /** + * 用户 + */ + USER("USER", "用户"), + /** + * 组织机构 + */ + ORGANIZATION("ORGANIZATION", "组织机构"), + /** + * 分组 + */ + USER_GROUP("USER_GROUP", "分组"), + /** + * TODO 客户端 + */ + CLIENT("CLIENT", "客户端"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + PolicySubjectType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link PolicySubjectType} + */ + @EnumConvert + public static PolicySubjectType getType(String code) { + PolicySubjectType[] values = values(); + for (PolicySubjectType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/SecretType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/SecretType.java new file mode 100644 index 00000000..3f6822c6 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/SecretType.java @@ -0,0 +1,84 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +import lombok.Getter; +import static cn.topiam.employee.support.constant.EiamConstants.TOPIAM_ENCRYPT_SECRET; +import static cn.topiam.employee.support.constant.EiamConstants.TOPIAM_LOGIN_SECRET; + +/** + * 秘钥类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/9 23:15 + */ +public enum SecretType implements BaseEnum { + /** + * 登录 + */ + LOGIN("login", TOPIAM_LOGIN_SECRET, "登录"), + /** + * 加密 + */ + ENCRYPT("encrypt", TOPIAM_ENCRYPT_SECRET, "加密"); + + @Getter + @JsonValue + private final String code; + @Getter + private final String key; + + private final String desc; + + SecretType(String code, String key, String desc) { + this.code = code; + this.key = key; + this.desc = desc; + } + + /** + * 获取来源 + * + * @param code {@link String} + * @return {@link OrganizationType} + */ + @EnumConvert + public static SecretType getType(String code) { + SecretType[] values = values(); + for (SecretType source : values) { + if (String.valueOf(source.getCode()).equals(code)) { + return source; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } + + @Override + public String getDesc() { + return desc; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/SmsType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/SmsType.java new file mode 100644 index 00000000..2064bf43 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/SmsType.java @@ -0,0 +1,147 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 短信类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/25 19:19 + */ +public enum SmsType implements BaseEnum { + /** + * 绑定手机号 + */ + BIND_PHONE("bind_phone", "绑定手机号", MessageCategory.CODE), + /** + * 绑定,修改手机号成功 + */ + BIND_PHONE_SUCCESS("bind_phone_success", "绑定手机号成功", + MessageCategory.CODE), + /** + * 修改绑定手机号 + */ + UPDATE_PHONE("update_phone", "修改手机号", + MessageCategory.CODE), + /** + * 忘记密码 暂未实现 + */ + FORGET_PASSWORD("forget_password", "忘记密码", + MessageCategory.CODE), + /** + * 修改密码 + */ + UPDATE_PASSWORD("update_password", "修改密码", + MessageCategory.CODE), + /** + * 重置密码 + */ + RESET_PASSWORD("reset_password", "重置密码", + MessageCategory.NOTICE), + /** + * 重置密码成功 + */ + RESET_PASSWORD_SUCCESS("reset_password_success", "重置密码成功", + MessageCategory.NOTICE), + /** + * 登录验证 未使用 + */ + LOGIN("login", "登录验证", MessageCategory.CODE), + + /** + * 二次验证 + */ + AGAIN_VERIFY("again_verify", "二次验证", MessageCategory.CODE), + + /** + * 欢迎短信 + */ + WELCOME_SMS("welcome_sms", "欢迎短信", MessageCategory.NOTICE), + + /** + * 密码过期提醒 + */ + PASSWORD_SOON_EXPIRED_REMIND("password_soon_expired_remind", + "密码过期提醒", + MessageCategory.NOTICE), + + /** + * 风险预警 暂不实现 + */ + WARING("warning", "风险预警", MessageCategory.NOTICE); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + /** + * 短信类型 + */ + private final MessageCategory category; + + SmsType(String code, String desc, MessageCategory category) { + this.code = code; + this.desc = desc; + this.category = category; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + public MessageCategory getCategory() { + return category; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link OrganizationType} + */ + @EnumConvert + public static SmsType getType(String code) { + SmsType[] values = values(); + for (SmsType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/SyncStatus.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/SyncStatus.java new file mode 100644 index 00000000..1c38b587 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/SyncStatus.java @@ -0,0 +1,85 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 同步状态 + * + * @author TopIAM + */ +public enum SyncStatus implements BaseEnum { + /** + * 成功 + */ + SUCCESS("success", "成功"), + /** + * 失败 + */ + FAIL("fail", "失败"), + /** + * 跳过 + */ + SKIP("skip", "跳过"), + /** + * 同步中 + */ + PENDING("pending", "同步中"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + SyncStatus(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + @EnumConvert + public static SyncStatus getStatus(String code) { + SyncStatus[] values = values(); + for (SyncStatus status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/TriggerType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/TriggerType.java new file mode 100644 index 00000000..df775aff --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/TriggerType.java @@ -0,0 +1,73 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 触发类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/3/9 23:47 + */ +public enum TriggerType implements BaseEnum { + /** + * 手动触发 + */ + MANUAL("manual", "手动触发"), + /** + * 任务触发 + */ + JOB("job", "任务触发"); + + @JsonValue + private final String code; + private final String desc; + + TriggerType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link TriggerType} + */ + @EnumConvert + public static TriggerType getType(String code) { + TriggerType[] values = values(); + for (TriggerType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/UserGender.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/UserGender.java new file mode 100644 index 00000000..00460e36 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/UserGender.java @@ -0,0 +1,77 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 用户性别 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/7/17 19:28 + */ +public enum UserGender implements BaseEnum { + /** + * 男 + */ + MALE("1", "男"), + /** + * 女 + */ + FEMALE("0", "女"), + /** + * 未知 + */ + UNKNOWN("-1", "未知"); + + @JsonValue + private final String code; + private final String desc; + + UserGender(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取认证平台 + * + * @param code {@link String} + * @return {@link UserGender} + */ + @EnumConvert + public static UserGender getType(String code) { + UserGender[] values = values(); + for (UserGender status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + throw new NullPointerException("未获取到对应性别"); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/UserIdType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/UserIdType.java new file mode 100644 index 00000000..61d33234 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/UserIdType.java @@ -0,0 +1,91 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.alibaba.fastjson2.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * + * @author TopIAM + * Created by support@topiam.cn on 2022/10/6 22:11 + */ +public enum UserIdType implements BaseEnum { + /** + * 身份证号 + */ + IDENTITY_CARD("identity_card", "身份证号"); + + /** + * code + */ + @JsonValue + @JSONField + private final String code; + /** + * desc + */ + private final String desc; + + UserIdType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取来源 + * + * @param code {@link String} + * @return {@link OrganizationType} + */ + @EnumConvert + public static UserIdType getType(String code) { + UserIdType[] values = values(); + for (UserIdType source : values) { + if (String.valueOf(source.getCode()).equals(code)) { + return source; + } + } + return null; + } + + public static UserIdType getName(String name) { + UserIdType[] values = values(); + for (UserIdType source : values) { + if (source.name().equals(name)) { + return source; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/UserStatus.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/UserStatus.java new file mode 100644 index 00000000..33115891 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/UserStatus.java @@ -0,0 +1,92 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 用户状态 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/31 22:50 + */ +public enum UserStatus implements BaseEnum { + /** + * 已启用 + */ + ENABLE("enabled", "启用"), + /** + * 已禁用 + */ + DISABLE("disabled", "禁用"), + + /** + * 已锁定 + */ + LOCKED("locked", "锁定"), + /** + * 过期锁定 + */ + EXPIRED_LOCKED("expired_locked", "过期锁定"), + /** + * 密码过期锁定 + */ + PASS_WORD_EXPIRED_LOCKED("password_expired_locked", + "密码过期锁定"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + UserStatus(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + @EnumConvert + public static UserStatus getStatus(String code) { + UserStatus[] values = values(); + for (UserStatus status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/UserType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/UserType.java new file mode 100644 index 00000000..781cf293 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/UserType.java @@ -0,0 +1,90 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 用户类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/22 23:35 + */ +public enum UserType implements BaseEnum { + /** + * 用户 + */ + USER("user", "用户"), + /** + * 管理员 + */ + ADMIN("admin", "管理员"), + /** + * 开发人员 + */ + DEVELOPER("developer", "开发人员"), + /** + * 未知 + */ + UNKNOWN("unknown", "未知"); + + @JsonValue + private String code; + + private String desc; + + UserType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + /** + * 获取审计类型 + * + * @param code {@link String} + * @return {@link UserType} + */ + @EnumConvert + public static UserType getType(String code) { + UserType[] values = values(); + for (UserType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + throw new NullPointerException("未获取到类型"); + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getDesc() { + return desc; + } + + public void setDesc(String desc) { + this.desc = desc; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AppCertUsingType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AppCertUsingType.java new file mode 100644 index 00000000..02c6ef91 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AppCertUsingType.java @@ -0,0 +1,76 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.common.enums.BaseEnum; +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 证书使用类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 22:28 + */ +public enum AppCertUsingType implements BaseEnum { + /** + * OIDC JWK + */ + OIDC_JWK("oidc_jwk", "OIDC JWK"), + /** + * SAML签名 + */ + SAML_SIGN("saml_sign", "SAML 签名"), + /** + * SAML 加密 + */ + SAML_ENCRYPT("saml_encrypt", "SAML 加密"); + + @JsonValue + private final String code; + /** + * name + */ + private final String desc; + + AppCertUsingType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + @Override + public String getDesc() { + return desc; + } + + @EnumConvert + public static AppCertUsingType getType(String code) { + AppCertUsingType[] values = values(); + for (AppCertUsingType type : values) { + if (String.valueOf(type.getCode()).equals(code)) { + return type; + } + } + return null; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AppProtocol.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AppProtocol.java new file mode 100644 index 00000000..29ba3a96 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AppProtocol.java @@ -0,0 +1,88 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.common.enums.BaseEnum; +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 应用模板 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/11/29 22:27 + */ +public enum AppProtocol implements BaseEnum { + /** + * OIDC + */ + OIDC("oidc", "OIDC"), + + /** + * SAML + */ + SAML2("saml2", "SAML 2.0"), + + /** + * CAS + */ + CAS("cas", "CAS"), + + /** + * JWT + */ + JWT("jwt", "JWT"), + + /** + * FORM表单 + */ + FORM("form", "表单代填"); + + @JsonValue + private final String code; + /** + * name + */ + private final String desc; + + AppProtocol(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + @Override + public String getDesc() { + return desc; + } + + @EnumConvert + public static AppProtocol getType(String code) { + AppProtocol[] values = values(); + for (AppProtocol source : values) { + if (String.valueOf(source.getCode()).equals(code)) { + return source; + } + } + return null; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AppType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AppType.java new file mode 100644 index 00000000..1b2d9b70 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AppType.java @@ -0,0 +1,101 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.common.enums.BaseEnum; +import cn.topiam.employee.common.enums.OrganizationType; +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 应用类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 20:21 + */ +public enum AppType implements BaseEnum { + + /** + * 定制应用 + */ + CUSTOM_MADE("custom_made", "定制应用"), + /** + * 标准应用 + */ + STANDARD("standard", "标准应用"), + /** + * 自研 + */ + SELF_DEVELOPED("self_developed", "自研应用"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + AppType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取来源 + * + * @param code {@link String} + * @return {@link OrganizationType} + */ + @EnumConvert + public static AppType getType(String code) { + AppType[] values = values(); + for (AppType source : values) { + if (String.valueOf(source.getCode()).equals(code)) { + return source; + } + } + return null; + } + + public static AppType getName(String name) { + AppType[] values = values(); + for (AppType source : values) { + if (source.name().equals(name)) { + return source; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AttributeNameFormat.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AttributeNameFormat.java new file mode 100644 index 00000000..2877bea9 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AttributeNameFormat.java @@ -0,0 +1,72 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +import org.opensaml.saml.saml2.core.Attribute; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 属性 AttributeNameFormat + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/31 22:02 + */ +public enum AttributeNameFormat { + /** + * URI for unspecified name format. + */ + UNSPECIFIED(Attribute.UNSPECIFIED), + /** + * basic + */ + BASIC(Attribute.BASIC), + /** + * URI_REFERENCE + */ + URI_REFERENCE(Attribute.URI_REFERENCE); + + @JsonValue + private final String value; + + AttributeNameFormat(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @EnumConvert + public static AttributeNameFormat getType(String code) { + AttributeNameFormat[] values = values(); + for (AttributeNameFormat status : values) { + if (String.valueOf(status.getValue()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return value; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AuthnContextClassRefType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AuthnContextClassRefType.java new file mode 100644 index 00000000..c489629e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AuthnContextClassRefType.java @@ -0,0 +1,74 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +import org.opensaml.saml.saml2.core.AuthnContext; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * Authn 上下文类引用类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 23:44 + */ +public enum AuthnContextClassRefType { + + /** + * URI for unspecified authentication context. + */ + UNSPECIFIED_AUTHN_CTX(AuthnContext.UNSPECIFIED_AUTHN_CTX), + /** + * URI for Password authentication context. + */ + PASSWORD_AUTHN_CTX(AuthnContext.PASSWORD_AUTHN_CTX), + + /** + * URI for Password Protected Transport authentication context. + */ + PPT_AUTHN_CTX(AuthnContext.PPT_AUTHN_CTX); + + @JsonValue + private final String value; + + AuthnContextClassRefType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @EnumConvert + public static AuthnContextClassRefType getType(String code) { + AuthnContextClassRefType[] values = values(); + for (AuthnContextClassRefType status : values) { + if (String.valueOf(status.getValue()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return value; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AuthorizationType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AuthorizationType.java new file mode 100644 index 00000000..42b9ba8f --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/AuthorizationType.java @@ -0,0 +1,85 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.common.enums.BaseEnum; +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * SSO 授权类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/27 23:25 + */ +public enum AuthorizationType implements BaseEnum { + /** + * 手动授权 + */ + AUTHORIZATION("authorization", "手动授权"), + /** + * 全员可访问 + */ + ALL_ACCESS("all_access", "全员可访问"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + AuthorizationType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link AuthorizationType} + */ + @EnumConvert + public static AuthorizationType getType(String code) { + AuthorizationType[] values = values(); + for (AuthorizationType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/InitLoginType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/InitLoginType.java new file mode 100644 index 00000000..79ebe84c --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/InitLoginType.java @@ -0,0 +1,85 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.common.enums.BaseEnum; +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * Sso 发起方 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 23:33 + */ +public enum InitLoginType implements BaseEnum { + /** + * 仅应用发起SSO,OIDC协议应用默认取值。当SAML应用指定为该方式时,InitLoginUrl必须指定。 + */ + APP("only_app_init_sso", "只允许应用发起"), + /** + * 支持门户或者应用发起SSO,SAML协议应用默认取值范围。当OIDC协议指定为该方式时,InitLoginUrl必须指定。 + */ + PORTAL_OR_APP("portal_or_app_init_sso", "支持门户和应用发起"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + InitLoginType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link InitLoginType} + */ + @EnumConvert + public static InitLoginType getType(String code) { + InitLoginType[] values = values(); + for (InitLoginType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlAttributeStatementValueType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlAttributeStatementValueType.java new file mode 100644 index 00000000..f6f3af91 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlAttributeStatementValueType.java @@ -0,0 +1,104 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.common.enums.BaseEnum; +import cn.topiam.employee.support.web.converter.EnumConvert; +import static org.apache.commons.text.StringSubstitutor.DEFAULT_VAR_END; +import static org.apache.commons.text.StringSubstitutor.DEFAULT_VAR_START; + +/** + * Saml 2 AttributeStatementValue 类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:26 + */ +public enum SamlAttributeStatementValueType implements BaseEnum { + /** + * 手机号 + */ + PHONE("user.phone", + DEFAULT_VAR_START + + "user.phone" + + DEFAULT_VAR_END), + /** + * 用户名 + */ + USERNAME("user.username", + DEFAULT_VAR_START + "user.username" + + DEFAULT_VAR_END), + /** + * 昵称 + */ + NICK_NAME("user.nickName", + DEFAULT_VAR_START + "user.nickName" + + DEFAULT_VAR_END), + /** + * 邮箱 + */ + EMAIL("user.email", + DEFAULT_VAR_START + + "user.email" + + DEFAULT_VAR_END), + /** + * 应用用户名 + */ + APP_USERNAME("app_user.username", + DEFAULT_VAR_START + "app_user.username" + + DEFAULT_VAR_END); + + @JsonValue + private final String code; + private final String expression; + + SamlAttributeStatementValueType(String code, String expression) { + this.code = code; + this.expression = expression; + } + + @EnumConvert + public static SamlAttributeStatementValueType getType(String code) { + SamlAttributeStatementValueType[] values = values(); + for (SamlAttributeStatementValueType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + public String getCode() { + return code; + } + + @Override + public String getDesc() { + return null; + } + + public String getExpression() { + return expression; + } + + @Override + public String toString() { + return code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlEncryptAssertAlgorithmType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlEncryptAssertAlgorithmType.java new file mode 100644 index 00000000..c40f64ad --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlEncryptAssertAlgorithmType.java @@ -0,0 +1,64 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; +import static org.opensaml.xmlsec.encryption.support.EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES256; + +/** + * Saml 加密算法类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:37 + */ +public enum SamlEncryptAssertAlgorithmType { + + /** + * Block Encryption - REQUIRED AES-256. + */ + RSA_SHA256(ALGO_ID_BLOCKCIPHER_AES256); + + @JsonValue + private final String value; + + SamlEncryptAssertAlgorithmType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @EnumConvert + public static SamlEncryptAssertAlgorithmType getType(String code) { + SamlEncryptAssertAlgorithmType[] values = values(); + for (SamlEncryptAssertAlgorithmType status : values) { + if (String.valueOf(status.getValue()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return value; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlNameIdFormatType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlNameIdFormatType.java new file mode 100644 index 00000000..01d87f28 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlNameIdFormatType.java @@ -0,0 +1,80 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +import org.opensaml.saml.saml2.core.NameIDType; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * NameIdFormatType + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:33 + */ +public enum SamlNameIdFormatType { + + /** + * URI for unspecified name format. + */ + UNSPECIFIED(NameIDType.UNSPECIFIED), + + /** + * URI for persistent name format. + */ + PERSISTENT(NameIDType.PERSISTENT), + + /** + * URI for transient name format. + */ + TRANSIENT(NameIDType.TRANSIENT), + + /** + * URI for email name format. + */ + EMAIL(NameIDType.EMAIL); + + @JsonValue + private final String value; + + SamlNameIdFormatType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @EnumConvert + public static SamlNameIdFormatType getType(String code) { + SamlNameIdFormatType[] values = values(); + for (SamlNameIdFormatType status : values) { + if (String.valueOf(status.getValue()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return value; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlNameIdValueType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlNameIdValueType.java new file mode 100644 index 00000000..57495e8e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlNameIdValueType.java @@ -0,0 +1,78 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * NameID + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:49 + */ +public enum SamlNameIdValueType { + /** + * 用户名 + */ + USER_USERNAME("user.username"), + /** + * 姓名 + */ + USER_FULL_NAME("user.fullName"), + /** + * 昵称 + */ + USER_NICK_NAME("user.nickName"), + /** + * 邮箱 + */ + USER_EMAIL("user.email"), + /** + * 应用账户 + */ + APP_USERNAME("app_user.username"); + + @JsonValue + private final String code; + + SamlNameIdValueType(String code) { + this.code = code; + } + + public String getCode() { + return code; + } + + @EnumConvert + public static SamlNameIdValueType getType(String code) { + SamlNameIdValueType[] values = values(); + for (SamlNameIdValueType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlParseMetadataType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlParseMetadataType.java new file mode 100644 index 00000000..3c259933 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlParseMetadataType.java @@ -0,0 +1,35 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +/** + * Saml 2 解析元数据类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/30 22:43 + */ +public enum SamlParseMetadataType { + /** + * 文件 + */ + FILE, + /** + * URL + */ + URL +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlSignAssertAlgorithmType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlSignAssertAlgorithmType.java new file mode 100644 index 00000000..7a88303a --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlSignAssertAlgorithmType.java @@ -0,0 +1,64 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; +import static org.opensaml.xmlsec.signature.support.SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256; + +/** + * Saml 签名使用的非对称算法 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:37 + */ +public enum SamlSignAssertAlgorithmType { + + /** + * Signature - Required RSAwithSHA256. + */ + RSA_SHA256(ALGO_ID_SIGNATURE_RSA_SHA256); + + @JsonValue + private final String value; + + SamlSignAssertAlgorithmType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @EnumConvert + public static SamlSignAssertAlgorithmType getType(String code) { + SamlSignAssertAlgorithmType[] values = values(); + for (SamlSignAssertAlgorithmType status : values) { + if (String.valueOf(status.getValue()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return value; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlSignResponseAlgorithmType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlSignResponseAlgorithmType.java new file mode 100644 index 00000000..8f80df57 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/SamlSignResponseAlgorithmType.java @@ -0,0 +1,64 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; +import static org.opensaml.xmlsec.signature.support.SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256; + +/** + * Saml Response 使用的非对称算法 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:37 + */ +public enum SamlSignResponseAlgorithmType { + + /** + * Signature - Required RSAwithSHA256. + */ + RSA_SHA256(ALGO_ID_SIGNATURE_RSA_SHA256); + + @JsonValue + private final String value; + + SamlSignResponseAlgorithmType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @EnumConvert + public static SamlSignResponseAlgorithmType getType(String code) { + SamlSignResponseAlgorithmType[] values = values(); + for (SamlSignResponseAlgorithmType status : values) { + if (String.valueOf(status.getValue()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return value; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/AppCertUsingTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/AppCertUsingTypeConverter.java new file mode 100644 index 00000000..53105ad0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/AppCertUsingTypeConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.app.AppCertUsingType; + +/** + * 应用证书使用类型转换器 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 23:48 + */ +@Converter(autoApply = true) +public class AppCertUsingTypeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(AppCertUsingType attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getCode(); + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public AppCertUsingType convertToEntityAttribute(String dbData) { + return AppCertUsingType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/AppProtocolConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/AppProtocolConverter.java new file mode 100644 index 00000000..2499a9c6 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/AppProtocolConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.app.AppProtocol; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 23:48 + */ +@Converter(autoApply = true) +public class AppProtocolConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(AppProtocol attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getCode(); + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public AppProtocol convertToEntityAttribute(String dbData) { + return AppProtocol.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/AppTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/AppTypeConverter.java new file mode 100644 index 00000000..5626e4ff --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/AppTypeConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.app.AppType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 23:48 + */ +@Converter(autoApply = true) +public class AppTypeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(AppType attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getCode(); + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public AppType convertToEntityAttribute(String dbData) { + return AppType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlAttributeNameFormatConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlAttributeNameFormatConverter.java new file mode 100644 index 00000000..c474920e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlAttributeNameFormatConverter.java @@ -0,0 +1,48 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.app.AttributeNameFormat; + +/** + * SamlNameIdFormatTypeConverter + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:33 + */ +@Converter(autoApply = true) +public class SamlAttributeNameFormatConverter implements + AttributeConverter { + @Override + public String convertToDatabaseColumn(AttributeNameFormat attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getValue(); + } + + @Override + public AttributeNameFormat convertToEntityAttribute(String dbData) { + return AttributeNameFormat.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlAttributeStatementValueTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlAttributeStatementValueTypeConverter.java new file mode 100644 index 00000000..688300a7 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlAttributeStatementValueTypeConverter.java @@ -0,0 +1,48 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.app.SamlAttributeStatementValueType; + +/** + * Saml 2 AttributeStatementValue 类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:26 + */ +@Converter(autoApply = true) +public class SamlAttributeStatementValueTypeConverter implements + AttributeConverter { + @Override + public String convertToDatabaseColumn(SamlAttributeStatementValueType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + @Override + public SamlAttributeStatementValueType convertToEntityAttribute(String dbData) { + return SamlAttributeStatementValueType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlAuthnContextClassRefTypeConvert.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlAuthnContextClassRefTypeConvert.java new file mode 100644 index 00000000..619f6960 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlAuthnContextClassRefTypeConvert.java @@ -0,0 +1,47 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.app.AuthnContextClassRefType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:26 + */ +@Converter(autoApply = true) +public class SamlAuthnContextClassRefTypeConvert implements + AttributeConverter { + + @Override + public String convertToDatabaseColumn(AuthnContextClassRefType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getValue(); + } + return null; + } + + @Override + public AuthnContextClassRefType convertToEntityAttribute(String dbData) { + return AuthnContextClassRefType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlEncryptAssertAlgorithmTypeConvert.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlEncryptAssertAlgorithmTypeConvert.java new file mode 100644 index 00000000..6ae8dc5b --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlEncryptAssertAlgorithmTypeConvert.java @@ -0,0 +1,49 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.app.SamlEncryptAssertAlgorithmType; + +/** + * Saml 加密断言算法类型转换 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:26 + */ +@Converter(autoApply = true) +public class SamlEncryptAssertAlgorithmTypeConvert implements + AttributeConverter { + + @Override + public String convertToDatabaseColumn(SamlEncryptAssertAlgorithmType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getValue(); + } + return null; + } + + @Override + public SamlEncryptAssertAlgorithmType convertToEntityAttribute(String dbData) { + return SamlEncryptAssertAlgorithmType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlNameIdFormatTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlNameIdFormatTypeConverter.java new file mode 100644 index 00000000..c9fbeb00 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlNameIdFormatTypeConverter.java @@ -0,0 +1,48 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.app.SamlNameIdFormatType; + +/** + * SamlNameIdFormatTypeConverter + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:33 + */ +@Converter(autoApply = true) +public class SamlNameIdFormatTypeConverter implements + AttributeConverter { + @Override + public String convertToDatabaseColumn(SamlNameIdFormatType attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getValue(); + } + + @Override + public SamlNameIdFormatType convertToEntityAttribute(String dbData) { + return SamlNameIdFormatType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlNameIdTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlNameIdTypeConverter.java new file mode 100644 index 00000000..01eddda9 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlNameIdTypeConverter.java @@ -0,0 +1,45 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.app.SamlNameIdValueType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:25 + */ +@Converter(autoApply = true) +public class SamlNameIdTypeConverter implements AttributeConverter { + @Override + public String convertToDatabaseColumn(SamlNameIdValueType attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getCode(); + } + + @Override + public SamlNameIdValueType convertToEntityAttribute(String dbData) { + return SamlNameIdValueType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlSignAssertAlgorithmTypeConvert.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlSignAssertAlgorithmTypeConvert.java new file mode 100644 index 00000000..158fdf92 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlSignAssertAlgorithmTypeConvert.java @@ -0,0 +1,47 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.app.SamlSignAssertAlgorithmType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:26 + */ +@Converter(autoApply = true) +public class SamlSignAssertAlgorithmTypeConvert implements + AttributeConverter { + + @Override + public String convertToDatabaseColumn(SamlSignAssertAlgorithmType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getValue(); + } + return null; + } + + @Override + public SamlSignAssertAlgorithmType convertToEntityAttribute(String dbData) { + return SamlSignAssertAlgorithmType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlSignResponseAlgorithmTypeConvert.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlSignResponseAlgorithmTypeConvert.java new file mode 100644 index 00000000..f030cdb1 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SamlSignResponseAlgorithmTypeConvert.java @@ -0,0 +1,47 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.app.SamlSignResponseAlgorithmType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/5/22 23:26 + */ +@Converter(autoApply = true) +public class SamlSignResponseAlgorithmTypeConvert implements + AttributeConverter { + + @Override + public String convertToDatabaseColumn(SamlSignResponseAlgorithmType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getValue(); + } + return null; + } + + @Override + public SamlSignResponseAlgorithmType convertToEntityAttribute(String dbData) { + return SamlSignResponseAlgorithmType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SsoInitiatorConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SsoInitiatorConverter.java new file mode 100644 index 00000000..e64e2f12 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SsoInitiatorConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.app.InitLoginType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 23:48 + */ +@Converter(autoApply = true) +public class SsoInitiatorConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(InitLoginType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public InitLoginType convertToEntityAttribute(String dbData) { + return InitLoginType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SsoScopeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SsoScopeConverter.java new file mode 100644 index 00000000..87fc2366 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/app/converter/SsoScopeConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.app.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.app.AuthorizationType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 23:48 + */ +@Converter(autoApply = true) +public class SsoScopeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(AuthorizationType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public AuthorizationType convertToEntityAttribute(String dbData) { + return AuthorizationType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/DataOriginConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/DataOriginConverter.java new file mode 100644 index 00000000..213522d3 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/DataOriginConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.DataOrigin; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 23:48 + */ +@Converter(autoApply = true) +public class DataOriginConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(DataOrigin attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public DataOrigin convertToEntityAttribute(String dbData) { + return DataOrigin.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/IdentityProviderCategoryConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/IdentityProviderCategoryConverter.java new file mode 100644 index 00000000..1ace4051 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/IdentityProviderCategoryConverter.java @@ -0,0 +1,68 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.IdentityProviderCategory; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 19:42 + */ +@Converter(autoApply = true) +public class IdentityProviderCategoryConverter implements + AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(IdentityProviderCategory attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public IdentityProviderCategory convertToEntityAttribute(String dbData) { + return IdentityProviderCategory.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/IdentityProviderTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/IdentityProviderTypeConverter.java new file mode 100644 index 00000000..2857b423 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/IdentityProviderTypeConverter.java @@ -0,0 +1,68 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.IdentityProviderType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 19:42 + */ +@Converter(autoApply = true) +public class IdentityProviderTypeConverter implements + AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(IdentityProviderType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public IdentityProviderType convertToEntityAttribute(String dbData) { + return IdentityProviderType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/LanguageConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/LanguageConverter.java new file mode 100644 index 00000000..7bdd26f4 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/LanguageConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.Language; + +/** + * LanguageConverter + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/5 21:49 + */ +@Converter(autoApply = true) +public class LanguageConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(Language attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getLocale(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public Language convertToEntityAttribute(String dbData) { + return Language.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/MailTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/MailTypeConverter.java new file mode 100644 index 00000000..ae50e520 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/MailTypeConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.MailType; + +/** + * MailTemplateTypeReadingConverter + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/5 21:49 + */ +@Converter(autoApply = true) +public class MailTypeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(MailType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public MailType convertToEntityAttribute(String dbData) { + return MailType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/MessageCategoryConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/MessageCategoryConverter.java new file mode 100644 index 00000000..5dd2b7db --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/MessageCategoryConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.MessageCategory; + +/** + * MessageCategoryConverter + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/5 21:49 + */ +@Converter(autoApply = true) +public class MessageCategoryConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(MessageCategory attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public MessageCategory convertToEntityAttribute(String dbData) { + return MessageCategory.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/MfaMannerConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/MfaMannerConverter.java new file mode 100644 index 00000000..0b109343 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/MfaMannerConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.MfaFactor; + +/** + * MfaManner Converter + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/19 23:04 + */ +@Converter(autoApply = true) +public class MfaMannerConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(MfaFactor attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public MfaFactor convertToEntityAttribute(String dbData) { + return MfaFactor.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/MfaModeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/MfaModeConverter.java new file mode 100644 index 00000000..ab1e0bc5 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/MfaModeConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.MfaMode; + +/** + * MFA Converter + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/19 23:04 + */ +@Converter(autoApply = true) +public class MfaModeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(MfaMode attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public MfaMode convertToEntityAttribute(String dbData) { + return MfaMode.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/OrganizationTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/OrganizationTypeConverter.java new file mode 100644 index 00000000..922ccc81 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/OrganizationTypeConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.OrganizationType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 23:49 + */ +@Converter(autoApply = true) +public class OrganizationTypeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(OrganizationType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public OrganizationType convertToEntityAttribute(String dbData) { + return OrganizationType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/PermissionActionConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/PermissionActionConverter.java new file mode 100644 index 00000000..019fbf84 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/PermissionActionConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.PermissionActionType; + +/** + * PermissionActionConverter + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/10 22:51 + */ +@Converter(autoApply = true) +public class PermissionActionConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(PermissionActionType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public PermissionActionType convertToEntityAttribute(String dbData) { + return PermissionActionType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/PolicyEffectConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/PolicyEffectConverter.java new file mode 100644 index 00000000..9b767fb1 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/PolicyEffectConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.PolicyEffect; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/4 19:07 + */ +@Converter(autoApply = true) +public class PolicyEffectConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(PolicyEffect attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public PolicyEffect convertToEntityAttribute(String dbData) { + return PolicyEffect.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/PolicyObjectTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/PolicyObjectTypeConverter.java new file mode 100644 index 00000000..707babaa --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/PolicyObjectTypeConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.PolicyObjectType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/4 19:07 + */ +@Converter(autoApply = true) +public class PolicyObjectTypeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(PolicyObjectType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public PolicyObjectType convertToEntityAttribute(String dbData) { + return PolicyObjectType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/PolicySubjectConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/PolicySubjectConverter.java new file mode 100644 index 00000000..2caed30d --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/PolicySubjectConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.PolicySubjectType; + +/** + * 规则效果 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/4 19:07 + */ +@Converter(autoApply = true) +public class PolicySubjectConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(PolicySubjectType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public PolicySubjectType convertToEntityAttribute(String dbData) { + return PolicySubjectType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/SmsTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/SmsTypeConverter.java new file mode 100644 index 00000000..0b76f8cb --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/SmsTypeConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.SmsType; + +/** + * SendScenesConverter + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/5 21:49 + */ +@Converter(autoApply = true) +public class SmsTypeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(SmsType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public SmsType convertToEntityAttribute(String dbData) { + return SmsType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/SyncStatusConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/SyncStatusConverter.java new file mode 100644 index 00000000..c877a616 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/SyncStatusConverter.java @@ -0,0 +1,68 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.SyncStatus; + +/** + * SyncStatusConverter + * + * @author TopIAM + * Created by support@topiam.cn on 2022/10/8 21:11 + */ +@Converter(autoApply = true) +public class SyncStatusConverter implements AttributeConverter { + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(SyncStatus attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public SyncStatus convertToEntityAttribute(String dbData) { + return SyncStatus.getStatus(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/TriggerTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/TriggerTypeConverter.java new file mode 100644 index 00000000..15842a91 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/TriggerTypeConverter.java @@ -0,0 +1,66 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.TriggerType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 23:49 + */ +@Converter(autoApply = true) +public class TriggerTypeConverter implements AttributeConverter { + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(TriggerType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public TriggerType convertToEntityAttribute(String dbData) { + return TriggerType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/UserIdTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/UserIdTypeConverter.java new file mode 100644 index 00000000..4eeecd63 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/UserIdTypeConverter.java @@ -0,0 +1,68 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.UserIdType; + +/** + * 证件类型 + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 23:48 + */ +@Converter(autoApply = true) +public class UserIdTypeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(UserIdType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public UserIdType convertToEntityAttribute(String dbData) { + return UserIdType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/UserStatusConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/UserStatusConverter.java new file mode 100644 index 00000000..8a5b5f66 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/UserStatusConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.UserStatus; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 23:49 + */ +@Converter(autoApply = true) +public class UserStatusConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(UserStatus attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public UserStatus convertToEntityAttribute(String dbData) { + return UserStatus.getStatus(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/UserTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/UserTypeConverter.java new file mode 100644 index 00000000..6d22f4a2 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/UserTypeConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.UserType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/10 23:02 + */ +@Converter(autoApply = true) +public class UserTypeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(UserType attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getCode(); + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public UserType convertToEntityAttribute(String dbData) { + return UserType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/package-info.java new file mode 100644 index 00000000..42d0e07b --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/converter/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.converter; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/identityprovider/IdentitySourceProvider.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/identityprovider/IdentitySourceProvider.java new file mode 100644 index 00000000..5d008ca5 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/identityprovider/IdentitySourceProvider.java @@ -0,0 +1,94 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.identityprovider; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.common.enums.BaseEnum; +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 身份源提供商 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/13 22:18 + */ +public enum IdentitySourceProvider implements BaseEnum { + /** + * 钉钉身份源 + */ + DINGTALK("dingtalk", "钉钉", + "钉钉(Ding Talk)是阿里巴巴集团打造的企业级智能移动办公平台,是数字经济时代的企业组织协同办公和应用开发平台。"), + + /** + * 企业微信 + */ + WECHAT_WORK("wechat_work", "企业微信", + "企业微信是腾讯微信团队打造的企业通讯与办公工具,具有与微信一致的沟通体验,丰富的OA应用,和连接微信生态的能力,可帮助企业连接内部、连接生态伙伴、连接消费者。专业协作、安全管理、人即服务。"), + /** + * 飞书 + */ + FEISHU("feishu", "飞书", + "飞书是字节跳动于2016年自研的新一代一站式协作平台,是保障字节跳动全球数万人高效协作的办公工具。飞书将即时沟通、日历、云文档、云盘和工作台深度整合,通过开放兼容的平台,让成员在一处即可实现高效的沟通和流畅的协作,全方位提升企业效率。"), + + /** + * AD + */ + WINDOWS_AD("windows-ad", "Windows AD", + "使用Windows AD身份源同步数据"), + + /** + * LDAP + */ + LDAP("ldap", "LDAP", + "LDAP 是轻量目录访问协议,你可以理解为一个树型结构,用来存储用户和组织信息的数据库"); + + @JsonValue + private final String code; + private final String name; + private final String desc; + + IdentitySourceProvider(String code, String name, String desc) { + this.code = code; + this.name = name; + this.desc = desc; + } + + @EnumConvert + public static IdentitySourceProvider getType(String code) { + IdentitySourceProvider[] values = values(); + for (IdentitySourceProvider value : values) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public String getDesc() { + return desc; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/identityprovider/converter/IdentitySourceProviderConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/identityprovider/converter/IdentitySourceProviderConverter.java new file mode 100644 index 00000000..3384548d --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/identityprovider/converter/IdentitySourceProviderConverter.java @@ -0,0 +1,70 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.identityprovider.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.identityprovider.IdentitySourceProvider; + +/** + * 身份源提供商 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/13 22:18 + */ +@Converter(autoApply = true) +public class IdentitySourceProviderConverter implements + AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(IdentitySourceProvider attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public IdentitySourceProvider convertToEntityAttribute(String dbData) { + return IdentitySourceProvider.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/identitysource/IdentitySourceActionType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/identitysource/IdentitySourceActionType.java new file mode 100644 index 00000000..bc59f4ea --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/identitysource/IdentitySourceActionType.java @@ -0,0 +1,89 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.identitysource; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.common.enums.BaseEnum; +import cn.topiam.employee.common.enums.OrganizationType; +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * @author TopIAM + */ + +public enum IdentitySourceActionType implements BaseEnum { + + /** + * 新增 + */ + INSERT("insert", "新增"), + /** + * 修改 + */ + UPDATE("update", "修改"), + /** + * 删除 + */ + DELETE("delete", "删除"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + IdentitySourceActionType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link OrganizationType} + */ + @EnumConvert + public static IdentitySourceActionType getType(String code) { + IdentitySourceActionType[] values = values(); + for (IdentitySourceActionType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/identitysource/IdentitySourceObjectType.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/identitysource/IdentitySourceObjectType.java new file mode 100644 index 00000000..2fc2f1f4 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/identitysource/IdentitySourceObjectType.java @@ -0,0 +1,87 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.identitysource; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.common.enums.BaseEnum; +import cn.topiam.employee.common.enums.OrganizationType; +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 对象类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/9 21:04 + */ +public enum IdentitySourceObjectType implements BaseEnum { + + /** + * 用户 + */ + USER("user", "用户"), + /** + * 组织 + */ + ORGANIZATION("organization", "组织"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + IdentitySourceObjectType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link OrganizationType} + */ + @EnumConvert + public static IdentitySourceObjectType getType(String code) { + IdentitySourceObjectType[] values = values(); + for (IdentitySourceObjectType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/identitysource/converter/IdentitySourceActionTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/identitysource/converter/IdentitySourceActionTypeConverter.java new file mode 100644 index 00000000..9a574bd5 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/identitysource/converter/IdentitySourceActionTypeConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.identitysource.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.identitysource.IdentitySourceActionType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 19:42 + */ +@Converter(autoApply = true) +public class IdentitySourceActionTypeConverter implements + AttributeConverter { + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(IdentitySourceActionType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public IdentitySourceActionType convertToEntityAttribute(String dbData) { + return IdentitySourceActionType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/identitysource/converter/IdentitySourceObjectTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/identitysource/converter/IdentitySourceObjectTypeConverter.java new file mode 100644 index 00000000..795da6bc --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/identitysource/converter/IdentitySourceObjectTypeConverter.java @@ -0,0 +1,67 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.identitysource.converter; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.enums.identitysource.IdentitySourceObjectType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/11 23:49 + */ +@Converter(autoApply = true) +public class IdentitySourceObjectTypeConverter implements + AttributeConverter { + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(IdentitySourceObjectType attribute) { + if (!Objects.isNull(attribute)) { + return attribute.getCode(); + } + return null; + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public IdentitySourceObjectType convertToEntityAttribute(String dbData) { + return IdentitySourceObjectType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/package-info.java new file mode 100644 index 00000000..17e9289d --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/setting/converter/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/setting/converter/package-info.java new file mode 100644 index 00000000..8a11dcd9 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/setting/converter/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.setting.converter; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/enums/setting/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/enums/setting/package-info.java new file mode 100644 index 00000000..f162a958 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/enums/setting/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.enums.setting; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/BindMfaNotFoundSecretException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/BindMfaNotFoundSecretException.java new file mode 100644 index 00000000..4d923ea7 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/BindMfaNotFoundSecretException.java @@ -0,0 +1,34 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception; + +import org.springframework.http.HttpStatus; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 绑定MFA 不存在秘钥异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/8 22:42 + */ +public class BindMfaNotFoundSecretException extends TopIamException { + public BindMfaNotFoundSecretException() { + super("bind_mfa_not_found_secret_error", "绑定TOTP 不存在秘钥", HttpStatus.BAD_REQUEST); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/InvalidMfaCodeException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/InvalidMfaCodeException.java new file mode 100644 index 00000000..1912a6b0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/InvalidMfaCodeException.java @@ -0,0 +1,35 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception; + +import org.springframework.http.HttpStatus; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * InvalidMfaCodeException + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/11 19:15 + */ +public class InvalidMfaCodeException extends TopIamException { + + public InvalidMfaCodeException() { + super("invalid_mfa_code_error", "Mfa 代码无效", HttpStatus.BAD_REQUEST); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/LoginOtpActionNotSupportException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/LoginOtpActionNotSupportException.java new file mode 100644 index 00000000..7e041dab --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/LoginOtpActionNotSupportException.java @@ -0,0 +1,32 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 登录OTP action 不支持 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/7 23:24 + */ +public class LoginOtpActionNotSupportException extends TopIamException { + public LoginOtpActionNotSupportException() { + super("login_otp_not_support_error", "登录 OTP Action 不支持", DEFAULT_STATUS); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/MailMessageSendException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/MailMessageSendException.java new file mode 100644 index 00000000..eaebf1a0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/MailMessageSendException.java @@ -0,0 +1,58 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 邮件消息发送失败 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/25 19:43 + */ +public class MailMessageSendException extends TopIamException { + /** + * Constructs a new runtime exception with the specified detail message. + * The cause is not initialized, and may subsequently be initialized by a + * call to {@link #initCause}. + * + * @param message the detail message. The detail message is saved for + * later retrieval by the {@link #getMessage()} method. + */ + public MailMessageSendException(String message) { + super(message); + } + + /** + * Constructs a new runtime exception with the specified detail message and + * cause.

Note that the detail message associated with + * {@code cause} is not automatically incorporated in + * this runtime exception's detail message. + * + * @param message the detail message (which is saved for later retrieval + * by the {@link #getMessage()} method). + * @param cause the cause (which is saved for later retrieval by the + * {@link #getCause()} method). (A null value is + * permitted, and indicates that the cause is nonexistent or + * unknown.) + * @since 1.4 + */ + public MailMessageSendException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/MailProviderException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/MailProviderException.java new file mode 100644 index 00000000..863b7e11 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/MailProviderException.java @@ -0,0 +1,56 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception; + +import java.io.Serial; + +import org.springframework.http.HttpStatus; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 邮件服务异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/19 22:53 + */ +public class MailProviderException extends TopIamException { + @Serial + private static final long serialVersionUID = 6249098979022610064L; + + public MailProviderException(String msg, Throwable t) { + super(msg, t); + } + + public MailProviderException(String msg) { + super(msg); + } + + public MailProviderException(String msg, HttpStatus status) { + super(msg, status); + } + + public MailProviderException(String error, String description, HttpStatus status) { + super(error, description, status); + } + + public MailProviderException(Throwable cause, String error, String description, + HttpStatus status) { + super(cause, error, description, status); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/MailTemplateException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/MailTemplateException.java new file mode 100644 index 00000000..925a1797 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/MailTemplateException.java @@ -0,0 +1,56 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception; + +import java.io.Serial; + +import org.springframework.http.HttpStatus; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 邮件模板异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/18 21:36 + */ +public class MailTemplateException extends TopIamException { + @Serial + private static final long serialVersionUID = -6497956209061617684L; + + public MailTemplateException(String msg, Throwable t) { + super(msg, t); + } + + public MailTemplateException(String msg) { + super(msg); + } + + public MailTemplateException(String msg, HttpStatus status) { + super(msg, status); + } + + public MailTemplateException(String error, String description, HttpStatus status) { + super(error, description, status); + } + + public MailTemplateException(Throwable cause, String error, String description, + HttpStatus status) { + super(cause, error, description, status); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/MessageSendException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/MessageSendException.java new file mode 100644 index 00000000..c41b7bbd --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/MessageSendException.java @@ -0,0 +1,36 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception; + +import org.springframework.http.HttpStatus; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 消息 发送异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/7 23:03 + */ +public class MessageSendException extends TopIamException { + + public MessageSendException(Throwable throwable) { + super(throwable, "message_send_error", "发送短信消息失败", HttpStatus.INTERNAL_SERVER_ERROR); + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/OtpSendException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/OtpSendException.java new file mode 100644 index 00000000..20543143 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/OtpSendException.java @@ -0,0 +1,34 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * OTP 发送异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/7 23:03 + */ +public class OtpSendException extends TopIamException { + + public OtpSendException(String message) { + super("otp_send_error", message, DEFAULT_STATUS); + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/PasswordValidatedFailException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/PasswordValidatedFailException.java new file mode 100644 index 00000000..36be9323 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/PasswordValidatedFailException.java @@ -0,0 +1,38 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception; + +import org.springframework.http.HttpStatus; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 密码验证异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/8 22:09 + */ +public class PasswordValidatedFailException extends TopIamException { + public PasswordValidatedFailException() { + super("password_validated_fail_error", "密码错误,身份验证失败", HttpStatus.BAD_REQUEST); + } + + public PasswordValidatedFailException(String description) { + super("password_validated_fail_error", description, HttpStatus.BAD_REQUEST); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/PrepareBindMfaException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/PrepareBindMfaException.java new file mode 100644 index 00000000..5ecbc560 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/PrepareBindMfaException.java @@ -0,0 +1,35 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception; + +import org.springframework.http.HttpStatus; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 准备绑定MFA异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/4/9 23:41 + */ +public class PrepareBindMfaException extends TopIamException { + + public PrepareBindMfaException(String msg) { + super("prepare_bind_mfa_error", msg, HttpStatus.BAD_REQUEST); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/UserNotFoundException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/UserNotFoundException.java new file mode 100644 index 00000000..bd010be0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/UserNotFoundException.java @@ -0,0 +1,34 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception; + +import org.springframework.http.HttpStatus; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 未找到用户异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/8 22:09 + */ +public class UserNotFoundException extends TopIamException { + public UserNotFoundException() { + super("user_not_found_error", "未找到用户异常", HttpStatus.UNAUTHORIZED); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppAccountExistException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppAccountExistException.java new file mode 100644 index 00000000..2720acd1 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppAccountExistException.java @@ -0,0 +1,33 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception.app; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 应用账户已存在 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/8 22:49 + */ +public class AppAccountExistException extends TopIamException { + + public AppAccountExistException() { + super("app_account_exist", "应用账户已存在", DEFAULT_STATUS); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppAccountNotExistException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppAccountNotExistException.java new file mode 100644 index 00000000..e1135474 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppAccountNotExistException.java @@ -0,0 +1,33 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception.app; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 应用账户不存在异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/8 22:49 + */ +public class AppAccountNotExistException extends TopIamException { + + public AppAccountNotExistException() { + super("app_account_not_exist", "应用账户不存在", DEFAULT_STATUS); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppPolicyNotExistException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppPolicyNotExistException.java new file mode 100644 index 00000000..30d53c48 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppPolicyNotExistException.java @@ -0,0 +1,32 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception.app; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 应用策略不存在异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/8 22:23 + */ +public class AppPolicyNotExistException extends TopIamException { + public AppPolicyNotExistException() { + super("app_policy_not_exist", "应用策略不存在", DEFAULT_STATUS); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppResourceNotExistException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppResourceNotExistException.java new file mode 100644 index 00000000..65f443d7 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppResourceNotExistException.java @@ -0,0 +1,32 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception.app; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 应用资源不存在异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/8 22:23 + */ +public class AppResourceNotExistException extends TopIamException { + public AppResourceNotExistException() { + super("app_resource_not_exist", "应用资源不存在", DEFAULT_STATUS); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppRoleNotExistException.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppRoleNotExistException.java new file mode 100644 index 00000000..5458e39c --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/AppRoleNotExistException.java @@ -0,0 +1,32 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception.app; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 应用角色不存在异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/8 22:23 + */ +public class AppRoleNotExistException extends TopIamException { + public AppRoleNotExistException() { + super("app_role_not_exist", "应用角色不存在", DEFAULT_STATUS); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/package-info.java new file mode 100644 index 00000000..592b0d56 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/app/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception.app; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/exception/handler/GlobalExceptionHandler.java b/eiam-common/src/main/java/cn/topiam/employee/common/exception/handler/GlobalExceptionHandler.java new file mode 100644 index 00000000..50d0362e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/exception/handler/GlobalExceptionHandler.java @@ -0,0 +1,111 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.exception.handler; + +import javax.validation.ConstraintViolationException; + +import org.springframework.boot.autoconfigure.web.ServerProperties; +import org.springframework.boot.web.servlet.error.DefaultErrorAttributes; +import org.springframework.http.HttpStatus; +import org.springframework.validation.BindException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import org.springframework.web.context.request.WebRequest; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.util.WebUtils; + +import cn.topiam.employee.support.exception.TopIamException; + +import lombok.AllArgsConstructor; + +/** + * 全局异常处理 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/20 20:55 + */ +@AllArgsConstructor +@RestControllerAdvice +public class GlobalExceptionHandler { + /** + * Exception + * + * @return {@link ModelAndView} + */ + @ExceptionHandler(value = Exception.class) + public ModelAndView exception(WebRequest request, Exception e) { + request.setAttribute(WebUtils.ERROR_STATUS_CODE_ATTRIBUTE, + HttpStatus.INTERNAL_SERVER_ERROR.value(), WebRequest.SCOPE_REQUEST); + setExceptionAttribute(request, e); + return new ModelAndView(serverProperties.getError().getPath()); + } + + /** + * TopIamException + * + * @return {@link ModelAndView} + */ + @ExceptionHandler(value = TopIamException.class) + public ModelAndView topIamException(WebRequest request, TopIamException e) { + request.setAttribute(WebUtils.ERROR_STATUS_CODE_ATTRIBUTE, e.getHttpStatus().value(), + WebRequest.SCOPE_REQUEST); + return new ModelAndView(serverProperties.getError().getPath()); + } + + /** + * BindException + * + * HandlerExceptionResolver 默认处理为400状态码,这里设置为500,并转发到异常处理页面。 + * + * @return {@link ModelAndView} + */ + @ExceptionHandler(value = BindException.class) + public ModelAndView bindException(WebRequest request) { + request.setAttribute(WebUtils.ERROR_STATUS_CODE_ATTRIBUTE, HttpStatus.BAD_REQUEST.value(), + WebRequest.SCOPE_REQUEST); + return new ModelAndView(serverProperties.getError().getPath()); + } + + /** + * ConstraintViolationException + * + * HandlerExceptionResolver 默认处理为400状态码,这里设置为500,并转发到异常处理页面。 + * + * @return {@link ModelAndView} + */ + @ExceptionHandler(value = ConstraintViolationException.class) + public ModelAndView constraintViolationException(WebRequest request) { + request.setAttribute(WebUtils.ERROR_STATUS_CODE_ATTRIBUTE, HttpStatus.BAD_REQUEST.value(), + WebRequest.SCOPE_REQUEST); + return new ModelAndView(serverProperties.getError().getPath()); + } + + private void setExceptionAttribute(WebRequest request, Exception exception) { + request.setAttribute(WebUtils.ERROR_EXCEPTION_ATTRIBUTE, exception, + WebRequest.SCOPE_REQUEST); + request.setAttribute(DefaultErrorAttributes.class.getName() + ".ERROR", exception, + WebRequest.SCOPE_REQUEST); + request.setAttribute(WebUtils.ERROR_EXCEPTION_TYPE_ATTRIBUTE, exception.getClass(), + WebRequest.SCOPE_REQUEST); + } + + /** + * ServerProperties + */ + private final ServerProperties serverProperties; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/geo/GeoLocation.java b/eiam-common/src/main/java/cn/topiam/employee/common/geo/GeoLocation.java new file mode 100644 index 00000000..bae1d1e5 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/geo/GeoLocation.java @@ -0,0 +1,107 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.geo; + +import java.io.Serial; +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import cn.topiam.employee.common.geo.maxmind.enums.GeoLocationProvider; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * GeoLocationResponse + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/27 19:31 + */ +@Data +@Accessors(chain = true) +@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS) +public class GeoLocation implements Serializable { + + @Serial + private static final long serialVersionUID = 991484919483509517L; + + public GeoLocation() { + } + + /** + * IP + */ + private String ip; + + /** + * continent code + */ + private String continentCode; + + /** + * continent Name + */ + private String continentName; + + /** + * 国家/地区code + */ + private String countryCode; + + /** + * 国家 + */ + private String countryName; + + /** + * 城市code + */ + private String cityCode; + + /** + * 城市 + */ + private String cityName; + + /** + * 省份code + */ + private String provinceCode; + + /** + * 省份 + */ + private String provinceName; + + /** + * 经度 WGS84坐标 + */ + private Double latitude; + + /** + * 维度 WGS84坐标 + */ + private Double longitude; + + /** + * 提供商 + */ + private GeoLocationProvider provider; + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/geo/GeoLocationProviderConfig.java b/eiam-common/src/main/java/cn/topiam/employee/common/geo/GeoLocationProviderConfig.java new file mode 100644 index 00000000..bbb714a7 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/geo/GeoLocationProviderConfig.java @@ -0,0 +1,59 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.geo; + +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.geo.maxmind.enums.GeoLocationProvider; + +import lombok.Data; + +/** + * MaxmindProviderSetting + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 19:10 + */ +@Data +public class GeoLocationProviderConfig { + + public GeoLocationProviderConfig() { + } + + public GeoLocationProviderConfig(GeoLocationProvider provider, GeoLocationConfig config) { + this.provider = provider; + this.config = config; + } + + /** + * 平台 + */ + @NotNull(message = "平台不能为空") + private GeoLocationProvider provider; + + /** + * 配置 + */ + private GeoLocationConfig config; + + @Data + public static class GeoLocationConfig { + private static final long serialVersionUID = 5611656522133230183L; + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/geo/GeoLocationService.java b/eiam-common/src/main/java/cn/topiam/employee/common/geo/GeoLocationService.java new file mode 100644 index 00000000..bf91daca --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/geo/GeoLocationService.java @@ -0,0 +1,42 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.geo; + +/** + * Geo + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/27 19:20 + */ +public interface GeoLocationService { + + /** + * 获取地理库文件 + * + */ + void download(); + + /** + * 获取地理位置 + * + * @param remote {@link String} + * @return {@link GeoLocationService} + */ + GeoLocation getGeoLocation(String remote); + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/geo/NoneGeoLocationServiceImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/geo/NoneGeoLocationServiceImpl.java new file mode 100644 index 00000000..c417ab25 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/geo/NoneGeoLocationServiceImpl.java @@ -0,0 +1,46 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.geo; + +/** + * None + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/27 19:20 + */ +public class NoneGeoLocationServiceImpl implements GeoLocationService { + + /** + * 获取地理库文件 + */ + @Override + public void download() { + + } + + /** + * 获取地理位置 + * + * @param remote {@link String} + * @return {@link GeoLocationService} + */ + @Override + public GeoLocation getGeoLocation(String remote) { + return new GeoLocation().setIp(remote); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/MaxmindGeoLocationServiceImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/MaxmindGeoLocationServiceImpl.java new file mode 100644 index 00000000..09103196 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/MaxmindGeoLocationServiceImpl.java @@ -0,0 +1,259 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.geo.maxmind; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.InetAddress; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.List; +import java.util.Objects; + +import org.apache.commons.codec.digest.DigestUtils; +import org.apache.commons.compress.archivers.tar.TarArchiveEntry; +import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; +import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.io.IOUtils; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; +import org.springframework.web.client.ResourceAccessException; +import org.springframework.web.client.RestTemplate; + +import com.maxmind.db.CHMCache; +import com.maxmind.geoip2.DatabaseReader; +import com.maxmind.geoip2.model.CityResponse; +import com.maxmind.geoip2.record.*; + +import cn.topiam.employee.common.geo.GeoLocation; +import cn.topiam.employee.common.geo.GeoLocationService; +import cn.topiam.employee.support.constant.EiamConstants; +import cn.topiam.employee.support.util.IpUtils; + +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; + +import dev.failsafe.Failsafe; +import dev.failsafe.RetryPolicy; +import static cn.topiam.employee.common.geo.maxmind.enums.GeoLocationProvider.MAXMIND; + +/** + * GeoIp + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/26 19:26 + */ +@Slf4j +@Getter +public class MaxmindGeoLocationServiceImpl implements GeoLocationService { + + private final DatabaseReader reader; + private final MaxmindProviderConfig maxmindProviderConfig; + private final RestTemplate restTemplate; + private final Integer MAX_RETRIES = 1999999999; + + public MaxmindGeoLocationServiceImpl(MaxmindProviderConfig maxmindProviderConfig, + RestTemplate restTemplate) throws IOException { + this.maxmindProviderConfig = maxmindProviderConfig; + this.restTemplate = restTemplate; + download(); + this.reader = new DatabaseReader.Builder(new File(EiamConstants.IPADDRESS_FILE_PATH)) + .withCache(new CHMCache()).locales(List.of("zh-CN")).build(); + } + + /** + * 获取地理位置 + * + * @param remote {@link String} + * @return {@link String} + */ + @Override + public GeoLocation getGeoLocation(String remote) { + if (IpUtils.isInternalIp(remote)) { + GeoLocation geoLocation = new GeoLocation(); + geoLocation.setIp(remote); + return geoLocation; + } + try { + CityResponse cityResponse = this.reader.tryCity(InetAddress.getByName(remote)) + .orElseThrow(); + // 获取国家信息 + Country country = cityResponse.getCountry(); + //省份信息 + Subdivision subdivision = cityResponse.getMostSpecificSubdivision(); + // 城市信息 + City city = cityResponse.getCity(); + Location location = cityResponse.getLocation(); + if (Objects.isNull(location)) { + return null; + } + //大陆信息 + Continent continent = cityResponse.getContinent(); + //@formatter:off + return new GeoLocation() + .setIp(remote) + .setContinentCode(continent.getGeoNameId().toString()) + .setContinentName(continent.getName()) + .setCountryName(country.getName()) + .setCountryCode(country.getGeoNameId().toString()) + .setCityName(city.getName()) + .setCityCode(String.valueOf(city.getGeoNameId())) + .setProvinceName(subdivision.getName()) + .setProvinceCode(subdivision.getIsoCode()) + .setLongitude(location.getLongitude()) + .setLatitude(location.getLatitude()) + .setProvider(MAXMIND); + //@formatter:on + } catch (Exception e) { + log.error("获取IP地理位置发生异常 IP:[{}], 异常: {}", remote, e.getMessage()); + return new GeoLocation(); + } + } + + @Override + public void download() { + if (checkDbFileIsUpdate()) { + //@formatter:off + RetryPolicy retryPolicy = RetryPolicy.builder() + .handle(ResourceAccessException.class) + .withDelay(Duration.ofSeconds(1)) + .withMaxRetries(MAX_RETRIES) + .onFailure(event -> log.error("下载IP库发生网络异常")) + .onRetry(event -> log.error("下载IP库发生网络异常, 开始第: {} 次重试",event.getExecutionCount())) + .build(); + ResponseEntity bytes = Failsafe.with(retryPolicy).get(() -> restTemplate.exchange(String.format(MAXMIND.getDownloadUrl(), maxmindProviderConfig.getSessionKey()), HttpMethod.GET, null, byte[].class)); + //@formatter:on + File path = new File(EiamConstants.IPADDRESS_FILE_DIRECTORY); + try { + if (!path.exists()) { + if (!path.mkdirs()) { + throw new IOException("创建文件路径失败"); + } + } + File file = new File(EiamConstants.IPADDRESS_FILE_TAR); + if (!file.exists()) { + if (!file.createNewFile()) { + throw new IOException("创建IP库文件失败"); + } + } + try (FileOutputStream out = new FileOutputStream(file)) { + out.write(Objects.requireNonNull(bytes.getBody()), 0, bytes.getBody().length); + out.flush(); + } catch (Exception e) { + log.error("IP库文件写入异常: {}", e.getMessage()); + } + unTar(file, EiamConstants.IPADDRESS_FILE_DIRECTORY); + } catch (Exception e) { + log.error("下载IP库发生异常: {}", e.getMessage()); + } + } else { + log.debug("IP地理库无需更新"); + } + } + + /** + * 检查更新 + */ + public Boolean checkDbFileIsUpdate() { + //@formatter:off + RetryPolicy retryPolicy = RetryPolicy.builder() + .handle(ResourceAccessException.class) + .withDelay(Duration.ofSeconds(1)) + .withMaxRetries(MAX_RETRIES) + .onFailure(event -> log.error("检查IP库更新失败")) + .onRetry(event -> log.error("检查IP库更新发生网络异常, 开始第: {} 次重试",event.getExecutionCount())) + .build(); + return Failsafe.with(retryPolicy).get(() -> { + File ipDb = new File(EiamConstants.IPADDRESS_FILE_TAR); + if (ipDb.exists()) { + ResponseEntity sha256FileByte = restTemplate.exchange( + String.format(MAXMIND.getSha256Url(), + this.maxmindProviderConfig.getSessionKey()), + HttpMethod.GET, null, byte[].class); + File sha256File = new File(EiamConstants.SHA256_FILE_PATH); + FileUtils.writeByteArrayToFile(sha256File, + Objects.requireNonNull(sha256FileByte.getBody())); + String sha256 = FileUtils.readFileToString(sha256File, StandardCharsets.UTF_8); + return !checkFileSha256(ipDb, sha256.split(" ")[0]); + } + return true; + }); + //@formatter:on + } + + /** + * + * @param file tar.gz 文件 + * @param extractPath 要解压到的目录 + */ + public static void unTar(File file, String extractPath) throws Exception { + // decompressing *.tar.gz files to tar + TarArchiveInputStream fin = new TarArchiveInputStream( + new GzipCompressorInputStream(new FileInputStream(file))); + File extractFolder = new File(extractPath); + TarArchiveEntry entry; + // 将 tar 文件解压到 extractPath 目录下 + while ((entry = fin.getNextTarEntry()) != null) { + if (entry.isDirectory()) { + continue; + } + File curfile = new File(extractFolder, FilenameUtils.getName(entry.getName())); + File parent = curfile.getParentFile(); + if (!parent.exists()) { + if (!parent.mkdirs()) { + throw new IOException("Create file path exception"); + } + } + // 将文件写出到解压的目录 + IOUtils.copy(fin, new FileOutputStream(curfile)); + } + } + + /** + * 检查文件的SHA256 是否正确 + * + * @param file 文件 + * @param sha256 SHA256结果值 + */ + public static Boolean checkFileSha256(File file, String sha256) { + String sha256Hex; + FileInputStream inputStream = null; + try { + inputStream = new FileInputStream(file); + sha256Hex = DigestUtils.sha256Hex(inputStream); + if (sha256Hex.equals(sha256)) { + return true; + } + } catch (IOException e) { + log.error("SHA256检查文件完整性失败", e); + } finally { + if (inputStream != null) { + try { + inputStream.close(); + } catch (IOException e) { + log.error("InputStream close exception: {}", e.getMessage()); + } + } + } + return false; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/MaxmindProviderConfig.java b/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/MaxmindProviderConfig.java new file mode 100644 index 00000000..9a03d5a6 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/MaxmindProviderConfig.java @@ -0,0 +1,40 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.geo.maxmind; + +import javax.validation.constraints.NotEmpty; + +import cn.topiam.employee.common.geo.GeoLocationProviderConfig; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/23 20:33 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class MaxmindProviderConfig extends GeoLocationProviderConfig.GeoLocationConfig { + /** + * 密码 + */ + @NotEmpty(message = "密码不能为空") + private String sessionKey; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/UpdateMaxmindTaskConfiguration.java b/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/UpdateMaxmindTaskConfiguration.java new file mode 100644 index 00000000..ee5194c0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/UpdateMaxmindTaskConfiguration.java @@ -0,0 +1,61 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.geo.maxmind; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import cn.topiam.employee.common.geo.GeoLocationService; + +import lombok.RequiredArgsConstructor; + +/** + * 更新 maxmind 数据库 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/7 22:25 + */ +@Component +@RequiredArgsConstructor +public class UpdateMaxmindTaskConfiguration { + private final Logger logger = LoggerFactory.getLogger(UpdateMaxmindTaskConfiguration.class); + + /** + * 每天一点执行ip库文件更新 + */ + @Scheduled(cron = "0 0 1 * * ?") + public void update() { + try { + if (geoLocationService instanceof MaxmindGeoLocationServiceImpl) { + logger.info("执行IP库文件更新定时任务开始"); + MaxmindGeoLocationServiceImpl maxmindGeoLocation = (MaxmindGeoLocationServiceImpl) geoLocationService; + if (maxmindGeoLocation.checkDbFileIsUpdate()) { + maxmindGeoLocation.download(); + } + logger.info("执行IP库文件更新定时任务结束"); + } + } catch (Exception e) { + logger.error("执行IP库文件更新定时发生异常:{}", e.getMessage()); + } + } + + private final GeoLocationService geoLocationService; + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/enums/GeoLocationProvider.java b/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/enums/GeoLocationProvider.java new file mode 100644 index 00000000..f01a4f61 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/enums/GeoLocationProvider.java @@ -0,0 +1,96 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.geo.maxmind.enums; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 地理位置提供商配置 + * + * @author TopIAM + */ +public enum GeoLocationProvider implements Serializable { + + /** + * maxmind + */ + MAXMIND("maxmind", "MAXMIND", + "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=%s&suffix=tar.gz", + "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=%s&suffix=tar.gz.sha256"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * 名称 + */ + private final String name; + /** + * 库文件下载地址 + */ + private final String downloadUrl; + /** + * sha256校验文件下载地址 + */ + private final String sha256Url; + + GeoLocationProvider(String code, String name, String downloadUrl, String sha256Url) { + this.code = code; + this.name = name; + this.downloadUrl = downloadUrl; + this.sha256Url = sha256Url; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public String getDownloadUrl() { + return downloadUrl; + } + + public String getSha256Url() { + return sha256Url; + } + + @EnumConvert + public static GeoLocationProvider getType(String code) { + GeoLocationProvider[] values = values(); + for (GeoLocationProvider status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + throw new NullPointerException("未找到该平台"); + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/package-info.java new file mode 100644 index 00000000..ac575451 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/geo/maxmind/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.geo.maxmind; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/geo/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/geo/package-info.java new file mode 100644 index 00000000..4d973f7a --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/geo/package-info.java @@ -0,0 +1,24 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +/** + * geoip + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/26 19:27 + */ +package cn.topiam.employee.common.geo; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/geo/taobao/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/geo/taobao/package-info.java new file mode 100644 index 00000000..2053f23d --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/geo/taobao/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.geo.taobao; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/SendMessageException.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/SendMessageException.java new file mode 100644 index 00000000..c936c68e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/SendMessageException.java @@ -0,0 +1,105 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message; + +import java.io.Serial; + +import cn.topiam.employee.common.message.enums.MessageType; + +/** + * 消息发送异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/19 22:53 + */ +public class SendMessageException extends RuntimeException { + @Serial + private static final long serialVersionUID = 6249098979022610064L; + private MessageType messageType; + + /** + * Constructs a new runtime exception with the specified detail message. + * The cause is not initialized, and may subsequently be initialized by a + * call to {@link #initCause}. + * + * @param message the detail message. The detail message is saved for + * later retrieval by the {@link #getMessage()} method. + */ + public SendMessageException(MessageType messageType, String message) { + super(message); + this.messageType = messageType; + } + + public MessageType getMessageType() { + return messageType; + } + + /** + * Constructs a new runtime exception with the specified detail message and + * cause.

Note that the detail message associated with + * {@code cause} is not automatically incorporated in + * this runtime exception's detail message. + * + * @param message the detail message (which is saved for later retrieval + * by the {@link #getMessage()} method). + * @param cause the cause (which is saved for later retrieval by the + * {@link #getCause()} method). (A null value is + * permitted, and indicates that the cause is nonexistent or + * unknown.) + * @since 1.4 + */ + public SendMessageException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructs a new runtime exception with the specified cause and a + * detail message of (cause==null ? null : cause.toString()) + * (which typically contains the class and detail message of + * cause). This constructor is useful for runtime exceptions + * that are little more than wrappers for other throwables. + * + * @param cause the cause (which is saved for later retrieval by the + * {@link #getCause()} method). (A null value is + * permitted, and indicates that the cause is nonexistent or + * unknown.) + * @since 1.4 + */ + public SendMessageException(Throwable cause) { + super(cause); + } + + /** + * Constructs a new runtime exception with the specified detail + * message, cause, suppression enabled or disabled, and writable + * stack trace enabled or disabled. + * + * @param message the detail message. + * @param cause the cause. (A {@code null} value is permitted, + * and indicates that the cause is nonexistent or unknown.) + * @param enableSuppression whether or not suppression is enabled + * or disabled + * @param writableStackTrace whether or not the stack trace should + * be writable + * @since 1.7 + */ + public SendMessageException(String message, Throwable cause, boolean enableSuppression, + boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/SmsProviderException.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/SmsProviderException.java new file mode 100644 index 00000000..969231fd --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/SmsProviderException.java @@ -0,0 +1,94 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message; + +/** + * 邮件服务异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/19 22:53 + */ +public class SmsProviderException extends RuntimeException { + private static final long serialVersionUID = 6249098979022610064L; + + /** + * Constructs a new runtime exception with the specified detail message. + * The cause is not initialized, and may subsequently be initialized by a + * call to {@link #initCause}. + * + * @param message the detail message. The detail message is saved for + * later retrieval by the {@link #getMessage()} method. + */ + public SmsProviderException(String message) { + super(message); + } + + /** + * Constructs a new runtime exception with the specified detail message and + * cause.

Note that the detail message associated with + * {@code cause} is not automatically incorporated in + * this runtime exception's detail message. + * + * @param message the detail message (which is saved for later retrieval + * by the {@link #getMessage()} method). + * @param cause the cause (which is saved for later retrieval by the + * {@link #getCause()} method). (A null value is + * permitted, and indicates that the cause is nonexistent or + * unknown.) + * @since 1.4 + */ + public SmsProviderException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructs a new runtime exception with the specified cause and a + * detail message of (cause==null ? null : cause.toString()) + * (which typically contains the class and detail message of + * cause). This constructor is useful for runtime exceptions + * that are little more than wrappers for other throwables. + * + * @param cause the cause (which is saved for later retrieval by the + * {@link #getCause()} method). (A null value is + * permitted, and indicates that the cause is nonexistent or + * unknown.) + * @since 1.4 + */ + public SmsProviderException(Throwable cause) { + super(cause); + } + + /** + * Constructs a new runtime exception with the specified detail + * message, cause, suppression enabled or disabled, and writable + * stack trace enabled or disabled. + * + * @param message the detail message. + * @param cause the cause. (A {@code null} value is permitted, + * and indicates that the cause is nonexistent or unknown.) + * @param enableSuppression whether or not suppression is enabled + * or disabled + * @param writableStackTrace whether or not the stack trace should + * be writable + * @since 1.7 + */ + public SmsProviderException(String message, Throwable cause, boolean enableSuppression, + boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/MailProvider.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/MailProvider.java new file mode 100644 index 00000000..a4d6012d --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/MailProvider.java @@ -0,0 +1,118 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.enums; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 邮件提供商配置 + * + * @author TopIAM + */ +public enum MailProvider implements Serializable { + + /** + * 自定义 + */ + CUSTOMIZE("customize", "自定义", null, null, null), + /** + * 腾讯企业邮 + */ + TENCENT("tencent", "腾讯企业邮", "smtp.exmail.qq.com", + 25, 465), + /** + * 阿里企业邮 + */ + ALIYUN("aliyun", "阿里企业邮", "smtp.mxhichina.com", + 25, 465), + /** + * 网易 + */ + NETEASE("netease", "网易企业邮", "smtp.163.com", 25, + 465); + + /** + * code + */ + @JsonValue + private final String code; + /** + * 名称 + */ + private final String name; + /** + * smtp 地址 + */ + private final String smtpUrl; + /** + * 端口 + */ + private final Integer port; + /** + * SSL 端口 + */ + private final Integer sslPort; + + MailProvider(String code, String name, String smtpUrl, Integer port, Integer sslPort) { + this.code = code; + this.name = name; + this.smtpUrl = smtpUrl; + this.port = port; + this.sslPort = sslPort; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + @EnumConvert + public static MailProvider getType(String code) { + MailProvider[] values = values(); + for (MailProvider status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + throw new NullPointerException("未找到该平台"); + } + + public String getSmtpUrl() { + return smtpUrl; + } + + public Integer getPort() { + return port; + } + + public Integer getSslPort() { + return sslPort; + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/MailSafetyType.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/MailSafetyType.java new file mode 100644 index 00000000..c5f33d54 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/MailSafetyType.java @@ -0,0 +1,86 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.enums; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 邮件安全方式 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/19 23:09 + */ +public enum MailSafetyType implements Serializable { + /** + * 无 + */ + None("none", "无"), + /** + * SSL + */ + SSL("ssl", "SSL"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * 描述 + */ + private final String desc; + + /** + * 构造 + * + * @param code {@link String} + * @param desc {@link String} + */ + MailSafetyType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + @EnumConvert + public static MailSafetyType getType(String code) { + MailSafetyType[] values = values(); + for (MailSafetyType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + throw new NullPointerException("未找到该类型"); + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + @Override + public String toString() { + return code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/MessageType.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/MessageType.java new file mode 100644 index 00000000..d1371a08 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/MessageType.java @@ -0,0 +1,87 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.enums; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 消息类型 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/25 19:19 + */ +public enum MessageType implements Serializable { + /** + * 邮件 + */ + MAIL("mail", "邮件"), + /** + * 短信 + */ + SMS("sms", "短信"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + MessageType(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + /** + * 获取类型 + * + * @param code {@link String} + * @return {@link String} + */ + @EnumConvert + public static MessageType getType(String code) { + MessageType[] values = values(); + for (MessageType status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + return null; + } + + @Override + public String toString() { + return this.code; + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/SmsProvider.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/SmsProvider.java new file mode 100644 index 00000000..62cca1fc --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/SmsProvider.java @@ -0,0 +1,85 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.enums; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 短信平台 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/19 + */ +public enum SmsProvider implements Serializable { + + /** + * 阿里云 + */ + ALIYUN("aliyun", "阿里云"), + /** + * 腾讯云 + */ + TENCENT("tencent", "腾讯云"), + /** + * 七牛 + */ + QINIU("qiniu", "七牛"); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + + SmsProvider(String code, String desc) { + this.code = code; + this.desc = desc; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + @EnumConvert + public static SmsProvider getType(String code) { + SmsProvider[] values = values(); + for (SmsProvider status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + throw new NullPointerException("未找到该平台"); + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/convert/MailProviderPlatformConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/convert/MailProviderPlatformConverter.java new file mode 100644 index 00000000..432437fd --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/convert/MailProviderPlatformConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.enums.convert; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.message.enums.MailProvider; + +/** + * MailProviderPlatformReadingConverter + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/5 21:45 + */ +@Converter(autoApply = true) +public class MailProviderPlatformConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(MailProvider attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getCode(); + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public MailProvider convertToEntityAttribute(String dbData) { + return MailProvider.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/convert/MailSafetyTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/convert/MailSafetyTypeConverter.java new file mode 100644 index 00000000..9f72722f --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/convert/MailSafetyTypeConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.enums.convert; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.message.enums.MailSafetyType; + +/** + * ReadingConverter + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/5 20:39 + */ +@Converter(autoApply = true) +public class MailSafetyTypeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(MailSafetyType attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getCode(); + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public MailSafetyType convertToEntityAttribute(String dbData) { + return MailSafetyType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/convert/MessageTypeConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/convert/MessageTypeConverter.java new file mode 100644 index 00000000..816ad53a --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/convert/MessageTypeConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.enums.convert; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.message.enums.MessageType; + +/** + * MessageType + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/5 21:49 + */ +@Converter(autoApply = true) +public class MessageTypeConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(MessageType attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getCode(); + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public MessageType convertToEntityAttribute(String dbData) { + return MessageType.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/convert/SmsProviderConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/convert/SmsProviderConverter.java new file mode 100644 index 00000000..a154b938 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/enums/convert/SmsProviderConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.enums.convert; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.message.enums.SmsProvider; + +/** + * SmsPlatformWritingConverter + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/5 21:52 + */ +@Converter(autoApply = true) +public class SmsProviderConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(SmsProvider attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getCode(); + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public SmsProvider convertToEntityAttribute(String dbData) { + return SmsProvider.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/DefaultMailProviderSendImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/DefaultMailProviderSendImpl.java new file mode 100644 index 00000000..f60cc45b --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/DefaultMailProviderSendImpl.java @@ -0,0 +1,142 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.mail; + +import java.util.Date; +import java.util.Properties; + +import javax.mail.internet.MimeMessage; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.task.TaskExecutor; +import org.springframework.mail.javamail.JavaMailSender; +import org.springframework.mail.javamail.JavaMailSenderImpl; +import org.springframework.mail.javamail.MimeMessageHelper; + +import com.alibaba.fastjson2.JSON; + +import cn.topiam.employee.common.message.SendMessageException; +import cn.topiam.employee.common.message.enums.MailProvider; +import cn.topiam.employee.common.message.enums.MailSafetyType; +import cn.topiam.employee.common.message.enums.MessageType; +import static org.apache.commons.codec.CharEncoding.UTF_8; +import static org.apache.commons.lang3.BooleanUtils.TRUE; + +/** + * 默认邮件发送实现类 + * + * @author TopIAM + * Created by support@topiam.cn on 2021-10-02 21:40 + **/ +public class DefaultMailProviderSendImpl implements MailProviderSend { + + private final Logger log = LoggerFactory + .getLogger(DefaultMailProviderSendImpl.class); + public static final String MAIL_SMTP_SOCKET_FACTORY_CLASS = "mail.smtp.socketFactory.class"; + public static final String JAVAX_NET_SSL_SSLSOCKET_FACTORY = "javax.net.ssl.SSLSocketFactory"; + public static final String MAIL_SMTP_AUTH = "mail.smtp.auth"; + private final MailProviderConfig mailProvider; + + public DefaultMailProviderSendImpl(MailProviderConfig mailProvider, TaskExecutor taskExecutor) { + this.mailProvider = mailProvider; + this.javaMailSender = init(mailProvider); + this.taskExecutor = taskExecutor; + } + + /** + * init + * + * @param mailProvider {@link MailProviderConfig} + * @return {@link JavaMailSender} + */ + public JavaMailSender init(MailProviderConfig mailProvider) { + JavaMailSenderImpl javaMailSender = new JavaMailSenderImpl(); + javaMailSender.setHost(mailProvider.getSmtpUrl()); + javaMailSender.setUsername(mailProvider.getUsername()); + javaMailSender.setPassword(mailProvider.getDecryptSecret()); + javaMailSender.setDefaultEncoding(UTF_8); + javaMailSender.setPort(mailProvider.getPort()); + if (mailProvider.getSafetyType() == MailSafetyType.SSL) { + Properties properties = new Properties(); + properties.setProperty(MAIL_SMTP_AUTH, TRUE); + properties.setProperty(MAIL_SMTP_SOCKET_FACTORY_CLASS, JAVAX_NET_SSL_SSLSOCKET_FACTORY); + javaMailSender.setJavaMailProperties(properties); + } + return javaMailSender; + } + + /** + * send + * @param sendMail {@link SendMailRequest} + */ + @Override + public void sendMail(SendMailRequest sendMail) { + send(sendMail, false); + } + + /** + * sendMailHtml + * + * @param sendMail {@link SendMailRequest} + */ + @Override + public void sendMailHtml(SendMailRequest sendMail) { + send(sendMail, true); + } + + /** + * 发送邮件 + * + * @param sendMail {@link SendMailRequest} + * @param isHtml {@link Boolean} + */ + private void send(SendMailRequest sendMail, boolean isHtml) { + log.info("发送邮件消息入参: {}", JSON.toJSONString(sendMail)); + try { + MimeMessage mimeMessage = javaMailSender.createMimeMessage(); + MimeMessageHelper messageHelper = new MimeMessageHelper(mimeMessage, false, UTF_8); + //设置发件人 + messageHelper.setFrom(mailProvider.getUsername(), sendMail.getSender()); + messageHelper.setTo(sendMail.getReceiver()); + messageHelper.setSubject(sendMail.getSubject()); + //设置邮件消息 + messageHelper.setText(sendMail.getBody(), isHtml); + //设置发送的日期 + messageHelper.setSentDate(new Date()); + taskExecutor.execute(() -> javaMailSender.send(mimeMessage)); + } catch (Exception e) { + log.info("发送邮件消息失败: {}", e.getMessage()); + throw new SendMessageException(MessageType.MAIL, e.getMessage()); + } + } + + @Override + public MailProvider getProvider() { + return mailProvider.getProvider(); + } + + /** + * JavaMailSender + */ + private final JavaMailSender javaMailSender; + /** + * ThreadPoolTaskExecutor + */ + private final TaskExecutor taskExecutor; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/MailNoneProviderSend.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/MailNoneProviderSend.java new file mode 100644 index 00000000..c5c9fa8f --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/MailNoneProviderSend.java @@ -0,0 +1,44 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.mail; + +import cn.topiam.employee.common.message.enums.MailProvider; + +/** + * None + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/27 21:06 + */ +public class MailNoneProviderSend implements MailProviderSend { + + @Override + public void sendMail(SendMailRequest sendMailParam) { + + } + + @Override + public void sendMailHtml(SendMailRequest sendMailParam) { + + } + + @Override + public MailProvider getProvider() { + return null; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/MailProviderConfig.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/MailProviderConfig.java new file mode 100644 index 00000000..859614d8 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/MailProviderConfig.java @@ -0,0 +1,91 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.mail; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.message.enums.MailProvider; +import cn.topiam.employee.common.message.enums.MailSafetyType; +import cn.topiam.employee.support.util.AesUtils; + +import lombok.Builder; +import lombok.Data; + +/** + * MailProviderConfig + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 19:10 + */ +@Data +@Builder +public class MailProviderConfig { + public MailProviderConfig() { + } + + public MailProviderConfig(MailProvider provider, String smtpUrl, Integer port, + MailSafetyType safetyType, String username, String secret) { + this.provider = provider; + this.smtpUrl = smtpUrl; + this.port = port; + this.safetyType = safetyType; + this.username = username; + this.secret = secret; + } + + /** + * 平台 + */ + @NotNull(message = "平台不能为空") + private MailProvider provider; + + /** + * smtp地址 + */ + @NotEmpty(message = "smtp地址不能为空") + private String smtpUrl; + + /** + * 端口 + */ + @NotNull(message = "端口号不能为空") + private Integer port; + + /** + * 安全验证 + */ + @NotNull(message = "安全验证方式不能为空") + private MailSafetyType safetyType; + + /** + * 用户名 + */ + @NotEmpty(message = "用户名不能为空") + private String username; + + /** + * 密码 + */ + @NotEmpty(message = "密码不能为空") + private String secret; + + public String getDecryptSecret() { + return AesUtils.decrypt(this.secret); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/MailProviderSend.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/MailProviderSend.java new file mode 100644 index 00000000..51b0b5e0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/MailProviderSend.java @@ -0,0 +1,49 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.mail; + +import cn.topiam.employee.common.message.enums.MailProvider; + +/** + * 邮件收发统一接口 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/27 21:06 + */ +public interface MailProviderSend { + + /** + * 发送普通邮件 + * + * @param sendMailParam 发送邮件的参数 + */ + void sendMail(SendMailRequest sendMailParam); + + /** + * 发送html的邮件 + * + * @param sendMailParam 发送邮件的参数 + */ + void sendMailHtml(SendMailRequest sendMailParam); + + /** + * 服务商类型 + * @return {@link MailProvider} + */ + MailProvider getProvider(); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/SendMailRequest.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/SendMailRequest.java new file mode 100644 index 00000000..73bc757e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/SendMailRequest.java @@ -0,0 +1,48 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.mail; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 发送邮件参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/27 21:08 + */ +@Data +@Accessors(chain = true) +public class SendMailRequest { + /** + * 发送人 + */ + private String sender; + /** + * 收件人 + */ + private String receiver; + /** + * 主题 + */ + private String subject; + /** + * 内容 + */ + private String body; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/package-info.java new file mode 100644 index 00000000..a2ab3e10 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/mail/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.mail; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SendSmsRequest.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SendSmsRequest.java new file mode 100644 index 00000000..94fd9af2 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SendSmsRequest.java @@ -0,0 +1,47 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms; + +import java.io.Serializable; +import java.util.Map; + +import lombok.Data; + +/** + * 短信发送入参 + * + * @author TopIAM + */ +@Data +public class SendSmsRequest implements Serializable { + + /** + * 手机号 + */ + private String phone; + + /** + * 模板 + */ + private String template; + + /** + * 参数 + */ + private Map parameters; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsNoneProviderSend.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsNoneProviderSend.java new file mode 100644 index 00000000..db921ba8 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsNoneProviderSend.java @@ -0,0 +1,38 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms; + +import cn.topiam.employee.common.message.enums.SmsProvider; + +/** + * None + * + * @author TopIAM + * Created by support@topiam.cn on 2022/4/20 23:48 + */ +public class SmsNoneProviderSend implements SmsProviderSend { + @Override + public SmsResponse send(SendSmsRequest request) { + return null; + } + + @Override + public SmsProvider getProvider() { + return null; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsProviderConfig.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsProviderConfig.java new file mode 100644 index 00000000..00ea07b9 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsProviderConfig.java @@ -0,0 +1,54 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.message.enums.SmsProvider; + +/** + * 验证码提供商配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 19:10 + */ +public class SmsProviderConfig implements Serializable { + + @Serial + private static final long serialVersionUID = 5611656522133230183L; + + /** + * 平台 + */ + @NotNull(message = "平台类型不能为空") + private SmsProvider provider; + + public SmsProvider getProvider() { + return provider; + } + + public void setProvider(SmsProvider provider) { + this.provider = provider; + } + + public SmsProviderConfig() { + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsProviderSend.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsProviderSend.java new file mode 100644 index 00000000..6fddf48d --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsProviderSend.java @@ -0,0 +1,51 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import cn.topiam.employee.common.message.enums.SmsProvider; + +/** + * 短信发送 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/27 21:03 + */ +public interface SmsProviderSend { + + Logger log = LoggerFactory.getLogger(SmsProviderSend.class); + + /** + * 发送短信验证码 + *

+ * 如果是腾讯云,params要用LinkedHashMap,保证顺序 + * + * @param request {@link SendSmsRequest} + * @return {@link SmsResponse} + */ + SmsResponse send(SendSmsRequest request); + + /** + * 服务商类型 + * + * @return {@link SmsProvider} + */ + SmsProvider getProvider(); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsResponse.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsResponse.java new file mode 100644 index 00000000..6a05edd3 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsResponse.java @@ -0,0 +1,50 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms; + +import java.io.Serializable; + +import cn.topiam.employee.common.message.enums.SmsProvider; + +import lombok.AllArgsConstructor; +import lombok.Data; + +/** + * 短信发送返回 + * + * @author TopIAM + */ +@Data +@AllArgsConstructor +public class SmsResponse implements Serializable { + + /** + * 消息 + */ + private String message; + + /** + * 是否成功 + */ + private Boolean success; + + /** + * 提供商 + */ + private SmsProvider provider; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsSendProviderFactory.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsSendProviderFactory.java new file mode 100644 index 00000000..630fdeb0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/SmsSendProviderFactory.java @@ -0,0 +1,60 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms; + +import cn.topiam.employee.common.message.enums.SmsProvider; +import cn.topiam.employee.common.message.sms.aliyun.AliyunSmsProviderConfig; +import cn.topiam.employee.common.message.sms.aliyun.AliyunSmsProviderSend; +import cn.topiam.employee.common.message.sms.qiniu.QiNiuSmsProviderConfig; +import cn.topiam.employee.common.message.sms.qiniu.QiNiuSmsProviderSend; +import cn.topiam.employee.common.message.sms.tencent.TencentSmsProviderConfig; +import cn.topiam.employee.common.message.sms.tencent.TencentSmsProviderSend; + +/** + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/10 19:40 + */ +public class SmsSendProviderFactory { + + private SmsSendProviderFactory() { + } + + /** + * 获取实例化 + * + * @param config {@link SmsProviderConfig} + * @return {@link SmsProviderSend} + */ + public static SmsProviderSend newInstance(SmsProviderConfig config) { + SmsProvider provider = config.getProvider(); + //阿里云 + if (SmsProvider.ALIYUN.equals(provider)) { + return new AliyunSmsProviderSend((AliyunSmsProviderConfig) config); + } + //腾讯 + if (SmsProvider.TENCENT.equals(provider)) { + return new TencentSmsProviderSend((TencentSmsProviderConfig) config); + } + //七牛 + if (SmsProvider.QINIU.equals(provider)) { + return new QiNiuSmsProviderSend((QiNiuSmsProviderConfig) config); + } + throw new IllegalArgumentException("暂未支持该短信提供商类型"); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/aliyun/AliyunSmsProviderConfig.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/aliyun/AliyunSmsProviderConfig.java new file mode 100644 index 00000000..42add9d1 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/aliyun/AliyunSmsProviderConfig.java @@ -0,0 +1,56 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms.aliyun; + +import javax.validation.constraints.NotEmpty; + +import cn.topiam.employee.common.message.sms.SmsProviderConfig; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 验证码提供商配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 19:10 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class AliyunSmsProviderConfig extends SmsProviderConfig { + public AliyunSmsProviderConfig() { + } + + /** + * accessKeyId + */ + @NotEmpty(message = "accessKeyId不能为空") + private String accessKeyId; + + /** + * accessKeySecret + */ + @NotEmpty(message = "accessKeySecret不能为空") + private String accessKeySecret; + + /** + * signNme + */ + @NotEmpty(message = "signNme不能为空") + private String signName; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/aliyun/AliyunSmsProviderSend.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/aliyun/AliyunSmsProviderSend.java new file mode 100644 index 00000000..8dd42493 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/aliyun/AliyunSmsProviderSend.java @@ -0,0 +1,84 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms.aliyun; + +import com.alibaba.fastjson2.JSON; +import com.aliyun.dysmsapi20170525.Client; +import com.aliyun.dysmsapi20170525.models.SendSmsResponse; +import com.aliyun.tea.TeaException; +import com.aliyun.teaopenapi.models.Config; +import com.aliyun.teautil.models.RuntimeOptions; + +import cn.topiam.employee.common.message.enums.SmsProvider; +import cn.topiam.employee.common.message.sms.SendSmsRequest; +import cn.topiam.employee.common.message.sms.SmsProviderSend; +import cn.topiam.employee.common.message.sms.SmsResponse; + +/** + * 阿里云短信发送 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/4/14 23:04 + */ +@SuppressWarnings("ALL") +public class AliyunSmsProviderSend implements SmsProviderSend { + + private final AliyunSmsProviderConfig config; + private Client client; + + public AliyunSmsProviderSend(AliyunSmsProviderConfig config) { + this.config = config; + Config aliConfig = new Config(); + aliConfig.setAccessKeyId(config.getAccessKeyId()); + aliConfig.setAccessKeySecret(config.getAccessKeySecret()); + aliConfig.setEndpoint("dysmsapi.aliyuncs.com"); + try { + this.client = new Client(aliConfig); + } catch (Exception e) { + log.error("阿里云短信客戶端初始化失败: [{}]", e.getMessage()); + } + } + + @Override + public SmsResponse send(SendSmsRequest sendSmsParam) { + try { + RuntimeOptions runtimeOptions = new RuntimeOptions(); + com.aliyun.dysmsapi20170525.models.SendSmsRequest request = new com.aliyun.dysmsapi20170525.models.SendSmsRequest() + .setPhoneNumbers(sendSmsParam.getPhone()).setSignName(this.config.getSignName()) + .setTemplateCode(sendSmsParam.getTemplate()) + .setTemplateParam(JSON.toJSONString(sendSmsParam.getParameters())); + SendSmsResponse sendSmsResponse = this.client.sendSmsWithOptions(request, + runtimeOptions); + String code = sendSmsResponse.getBody().getCode(); + String message = sendSmsResponse.getBody().getMessage(); + return new SmsResponse(message, "OK".equals(code), SmsProvider.ALIYUN); + } catch (TeaException error) { + log.error("阿里云发送短信异常: [{}]", error.message); + return new SmsResponse(error.message, Boolean.FALSE, SmsProvider.ALIYUN); + } catch (Exception exception) { + TeaException error = new TeaException(exception.getMessage(), exception); + log.error("阿里云发送短信异常: [{}]", error.message); + return new SmsResponse(error.message, Boolean.FALSE, SmsProvider.ALIYUN); + } + } + + @Override + public SmsProvider getProvider() { + return SmsProvider.ALIYUN; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/aliyun/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/aliyun/package-info.java new file mode 100644 index 00000000..365b28d1 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/aliyun/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms.aliyun; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/package-info.java new file mode 100644 index 00000000..2b9bb7ea --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/qiniu/QiNiuSmsProviderConfig.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/qiniu/QiNiuSmsProviderConfig.java new file mode 100644 index 00000000..16b70266 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/qiniu/QiNiuSmsProviderConfig.java @@ -0,0 +1,49 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms.qiniu; + +import javax.validation.constraints.NotEmpty; + +import cn.topiam.employee.common.message.sms.SmsProviderConfig; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 验证码提供商配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 19:10 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class QiNiuSmsProviderConfig extends SmsProviderConfig { + public QiNiuSmsProviderConfig() { + } + + /** + * accessKey + */ + @NotEmpty(message = "accessKey不能为空") + private String accessKey; + /** + * secretKey + */ + @NotEmpty(message = "secretKey不能为空") + private String secretKey; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/qiniu/QiNiuSmsProviderSend.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/qiniu/QiNiuSmsProviderSend.java new file mode 100644 index 00000000..415ee3e6 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/qiniu/QiNiuSmsProviderSend.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms.qiniu; + +import org.springframework.util.StringUtils; + +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONObject; +import com.qiniu.common.QiniuException; +import com.qiniu.http.Response; +import com.qiniu.sms.SmsManager; +import com.qiniu.util.Auth; + +import cn.topiam.employee.common.message.enums.SmsProvider; +import cn.topiam.employee.common.message.sms.SendSmsRequest; +import cn.topiam.employee.common.message.sms.SmsProviderSend; +import cn.topiam.employee.common.message.sms.SmsResponse; + +/** + * 七牛短信发送 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/4/14 23:04 + */ +public class QiNiuSmsProviderSend implements SmsProviderSend { + private final SmsManager smsManager; + + public QiNiuSmsProviderSend(QiNiuSmsProviderConfig config) { + Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey()); + // 实例化一个SmsManager对象 + this.smsManager = new SmsManager(auth); + } + + @Override + public SmsResponse send(SendSmsRequest sendSmsParam) { + try { + Response resp = smsManager.sendSingleMessage(sendSmsParam.getTemplate(), + sendSmsParam.getPhone(), sendSmsParam.getParameters()); + JSONObject response = JSON.parseObject(resp.bodyString()); + if (response.containsKey("message_id") + && StringUtils.hasText(response.getString("message_id"))) { + return new SmsResponse("成功", Boolean.TRUE, SmsProvider.QINIU); + } + } catch (QiniuException e) { + log.error("七牛发送短信异常: [{}]", e.getMessage()); + } + return new SmsResponse("失败", Boolean.FALSE, SmsProvider.QINIU); + } + + @Override + public SmsProvider getProvider() { + return SmsProvider.QINIU; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/qiniu/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/qiniu/package-info.java new file mode 100644 index 00000000..e67f664c --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/qiniu/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms.qiniu; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/tencent/TencentSmsProviderConfig.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/tencent/TencentSmsProviderConfig.java new file mode 100644 index 00000000..ba252db0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/tencent/TencentSmsProviderConfig.java @@ -0,0 +1,68 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms.tencent; + +import javax.validation.constraints.NotEmpty; + +import cn.topiam.employee.common.message.sms.SmsProviderConfig; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 验证码提供商配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 19:10 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class TencentSmsProviderConfig extends SmsProviderConfig { + public TencentSmsProviderConfig() { + } + + /** + * secretId + */ + @NotEmpty(message = "SecretId不能为空") + private String secretId; + + /** + * secretKey + */ + @NotEmpty(message = "SecretKey不能为空") + private String secretKey; + + /** + * 短信应用ID + */ + @NotEmpty(message = "短信应用ID不能为空") + private String sdkAppId; + + /** + * 短信签名内容 + */ + @NotEmpty(message = "短信签名内容不能为空") + private String signName; + + /** + * Region + */ + @NotEmpty(message = "Region不能为空") + private String region; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/tencent/TencentSmsProviderSend.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/tencent/TencentSmsProviderSend.java new file mode 100644 index 00000000..651fc34e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/tencent/TencentSmsProviderSend.java @@ -0,0 +1,135 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms.tencent; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import com.tencentcloudapi.common.Credential; +import com.tencentcloudapi.common.exception.TencentCloudSDKException; +import com.tencentcloudapi.sms.v20210111.SmsClient; +import com.tencentcloudapi.sms.v20210111.models.SendSmsResponse; +import com.tencentcloudapi.sms.v20210111.models.SendStatus; + +import cn.topiam.employee.common.message.enums.SmsProvider; +import cn.topiam.employee.common.message.sms.SendSmsRequest; +import cn.topiam.employee.common.message.sms.SmsProviderSend; +import cn.topiam.employee.common.message.sms.SmsResponse; + +/** + * 腾讯短信发送 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/4/14 23:04 + */ +public class TencentSmsProviderSend implements SmsProviderSend { + private final TencentSmsProviderConfig config; + private final SmsClient client; + + public TencentSmsProviderSend(TencentSmsProviderConfig config) { + this.config = config; + /* 必要步骤: + * 实例化一个认证对象,入参需要传入腾讯云账户密钥对secretId,secretKey。 + * 这里采用的是从环境变量读取的方式,需要在环境变量中先设置这两个值。 + * 你也可以直接在代码中写死密钥对,但是小心不要将代码复制、上传或者分享给他人, + * 以免泄露密钥对危及你的财产安全。 + * SecretId、SecretKey 查询: https://console.cloud.tencent.com/cam/capi */ + Credential cred = new Credential(config.getSecretId(), config.getSecretKey()); + /* 实例化要请求产品(以sms为例)的client对象 + * 第二个参数是地域信息,可以直接填写字符串ap-guangzhou + * 支持的地域列表参考 https://cloud.tencent.com/document/api/382/52071#.E5.9C.B0.E5.9F.9F.E5.88.97.E8.A1.A8 + */ + this.client = new SmsClient(cred, config.getRegion()); + } + + @Override + public SmsResponse send(SendSmsRequest sendSmsParam) { + try { + /* 实例化一个请求对象,根据调用的接口和实际情况,可以进一步设置请求参数 + * 你可以直接查询SDK源码确定接口有哪些属性可以设置 + * 属性可能是基本类型,也可能引用了另一个数据结构 + * 推荐使用IDE进行开发,可以方便的跳转查阅各个接口和数据结构的文档说明 */ + com.tencentcloudapi.sms.v20210111.models.SendSmsRequest req = new com.tencentcloudapi.sms.v20210111.models.SendSmsRequest(); + /* 填充请求参数,这里request对象的成员变量即对应接口的入参 + * 你可以通过官网接口文档或跳转到request对象的定义处查看请求参数的定义 + * 基本类型的设置: + * 帮助链接: + * 短信控制台: https://console.cloud.tencent.com/smsv2 + * 腾讯云短信小助手: https://cloud.tencent.com/document/product/382/3773#.E6.8A.80.E6.9C.AF.E4.BA.A4.E6.B5.81 */ + + /* 短信应用ID: 短信SdkAppId在 [短信控制台] 添加应用后生成的实际SdkAppId,示例如1400006666 */ + // 应用 ID 可前往 [短信控制台](https://console.cloud.tencent.com/smsv2/app-manage) 查看 + req.setSmsSdkAppId(this.config.getSdkAppId()); + + /* 短信签名内容: 使用 UTF-8 编码,必须填写已审核通过的签名 */ + // 签名信息可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-sign) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-sign) 的签名管理查看 + req.setSignName(this.config.getSignName()); + + /* 模板 ID: 必须填写已审核通过的模板 ID */ + // 模板 ID 可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-template) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-template) 的正文模板管理查看 + String templateId = sendSmsParam.getTemplate(); + req.setTemplateId(templateId); + + /* 模板参数: 模板参数的个数需要与 TemplateId 对应模板的变量个数保持一致,若无模板参数,则设置为空 */ + Map parameters = sendSmsParam.getParameters(); + List templateParamList = new ArrayList<>(); + parameters.forEach((key, value) -> { + templateParamList.add(value); + }); + req.setTemplateParamSet(templateParamList.toArray(new String[0])); + /* 下发手机号码,采用 E.164 标准,+[国家或地区码][手机号] + * 示例如:+8613711112222, 其中前面有一个+号 ,86为国家码,13711112222为手机号,最多不要超过200个手机号 */ + String phone = sendSmsParam.getPhone(); + String[] phoneNumber = { phone.startsWith("+") ? phone : "+86" + phone }; + req.setPhoneNumberSet(phoneNumber); + + /* 用户的 session 内容(无需要可忽略): 可以携带用户侧 ID 等上下文信息,server 会原样返回 */ + String sessionContext = ""; + req.setSessionContext(sessionContext); + /* 短信码号扩展号(无需要可忽略): 默认未开通,如需开通请联系 [腾讯云短信小助手] */ + String extendCode = ""; + req.setExtendCode(extendCode); + /* 国际/港澳台短信 SenderId(无需要可忽略): 国内短信填空,默认未开通,如需开通请联系 [腾讯云短信小助手] */ + String senderid = ""; + req.setSenderId(senderid); + /* 通过 client 对象调用 SendSms 方法发起请求。注意请求方法名与请求对象是对应的 + * 返回的 res 是一个 SendSmsResponse 类的实例,与请求对象对应 */ + SendSmsResponse res = client.SendSms(req); + /* 当出现以下错误码时,快速解决方案参考 + * [FailedOperation.SignatureIncorrectOrUnapproved](https://cloud.tencent.com/document/product/382/9558#.E7.9F.AD.E4.BF.A1.E5.8F.91.E9.80.81.E6.8F.90.E7.A4.BA.EF.BC.9Afailedoperation.signatureincorrectorunapproved-.E5.A6.82.E4.BD.95.E5.A4.84.E7.90.86.EF.BC.9F) + * [FailedOperation.TemplateIncorrectOrUnapproved](https://cloud.tencent.com/document/product/382/9558#.E7.9F.AD.E4.BF.A1.E5.8F.91.E9.80.81.E6.8F.90.E7.A4.BA.EF.BC.9Afailedoperation.templateincorrectorunapproved-.E5.A6.82.E4.BD.95.E5.A4.84.E7.90.86.EF.BC.9F) + * [UnauthorizedOperation.SmsSdkAppIdVerifyFail](https://cloud.tencent.com/document/product/382/9558#.E7.9F.AD.E4.BF.A1.E5.8F.91.E9.80.81.E6.8F.90.E7.A4.BA.EF.BC.9Aunauthorizedoperation.smssdkappidverifyfail-.E5.A6.82.E4.BD.95.E5.A4.84.E7.90.86.EF.BC.9F) + * [UnsupportedOperation.ContainDomesticAndInternationalPhoneNumber](https://cloud.tencent.com/document/product/382/9558#.E7.9F.AD.E4.BF.A1.E5.8F.91.E9.80.81.E6.8F.90.E7.A4.BA.EF.BC.9Aunsupportedoperation.containdomesticandinternationalphonenumber-.E5.A6.82.E4.BD.95.E5.A4.84.E7.90.86.EF.BC.9F) + * 更多错误,可咨询[腾讯云助手](https://tccc.qcloud.com/web/im/index.html#/chat?webAppId=8fa15978f85cb41f7e2ea36920cb3ae1&title=Sms) + */ + log.info(SendSmsResponse.toJsonString(res)); + SendStatus sendStatus = res.getSendStatusSet()[0]; + return new SmsResponse(sendStatus.getMessage(), "Ok".equals(sendStatus.getCode()), + SmsProvider.TENCENT); + } catch (TencentCloudSDKException e) { + log.error("腾讯云发送短信异常, code: [{}], message: [{}]", e.getErrorCode(), e.getMessage()); + return new SmsResponse(e.getMessage(), Boolean.FALSE, SmsProvider.TENCENT); + } + } + + @Override + public SmsProvider getProvider() { + return SmsProvider.TENCENT; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/tencent/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/tencent/package-info.java new file mode 100644 index 00000000..81b01266 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/message/sms/tencent/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.message.sms.tencent; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/package-info.java new file mode 100644 index 00000000..c0d73399 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/MailSendRecordRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/MailSendRecordRepository.java new file mode 100644 index 00000000..b8450180 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/MailSendRecordRepository.java @@ -0,0 +1,33 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository; + +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.MailSendRecordEntity; + +/** + * MailSendRecordRepository + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/3 03:38 + */ +@Repository +public interface MailSendRecordRepository extends CrudRepository { +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/SmsSendRecordRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/SmsSendRecordRepository.java new file mode 100644 index 00000000..214be14e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/SmsSendRecordRepository.java @@ -0,0 +1,31 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository; + +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.SmsSendRecordEntity; + +/** + * @author TopIAM + */ +@Repository +public interface SmsSendRecordRepository extends CrudRepository { + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/OrganizationMemberCustomizedRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/OrganizationMemberCustomizedRepository.java new file mode 100644 index 00000000..39150e1d --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/OrganizationMemberCustomizedRepository.java @@ -0,0 +1,38 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import java.util.List; + +import cn.topiam.employee.common.entity.account.OrganizationMemberEntity; + +/** + * 组织成员 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/10/2 02:53 + */ +public interface OrganizationMemberCustomizedRepository { + + /** + * 批量保存 + * + * @param list {@link String} + */ + void batchSave(List list); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/OrganizationMemberRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/OrganizationMemberRepository.java new file mode 100644 index 00000000..a6f0be7a --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/OrganizationMemberRepository.java @@ -0,0 +1,77 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.account.OrganizationMemberEntity; + +/** + * 组织机构成员 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/30 03:06 + */ +@Repository +public interface OrganizationMemberRepository extends JpaRepository, + QuerydslPredicateExecutor, + OrganizationMemberCustomizedRepository { + + /** + * 根据组织机构ID和用户ID删除 + * + * @param orgId {@link Long} + * @param userId {@link Long} + */ + @Transactional(rollbackFor = Exception.class) + void deleteByOrgIdAndUserId(@Param("orgId") String orgId, @Param("userId") Long userId); + + /** + * 根据根据用户id查询关联的组织 + * + * @param userId {@link Long} + * @return {@link List} + */ + List findAllByUserId(@Param("userId") Long userId); + + /** + * 根据用户ID 批量删除关联关系 + * + * @param userIds {@link String} + */ + @Modifying + @Query(value = "DELETE FROM organization_member WHERE user_id IN :userIds", nativeQuery = true) + void deleteAllByUserId(@Param("userIds") Iterable userIds); + + /** + * 根据用户ID 删除关联关系 + * + * @param id {@link String} + */ + @Modifying + @Query(value = "DELETE FROM organization_member WHERE user_id = :id", nativeQuery = true) + void deleteByUserId(@Param("id") Long id); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/OrganizationRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/OrganizationRepository.java new file mode 100644 index 00000000..2b488abf --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/OrganizationRepository.java @@ -0,0 +1,200 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import java.io.Serializable; +import java.util.Collection; +import java.util.List; +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.account.OrganizationEntity; +import cn.topiam.employee.common.enums.DataOrigin; + +/** + *

+ * 组织架构 Repository 接口 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-09 + */ +@Repository +public interface OrganizationRepository extends CrudRepository, + PagingAndSortingRepository, + JpaSpecificationExecutor, + QuerydslPredicateExecutor, + OrganizationRepositoryCustomized { + + /** + * 根据名称查询数量 + * + * @param s {@link String} + * @return {@link Long} + */ + Long countByName(String s); + + /** + * 根据名称查询组织机构 + * + * @param name {@link String} + * @return {@link OrganizationEntity} + */ + OrganizationEntity findByName(String name); + + /** + * 查询子组织 + * + * @param parentId {@link String} + * @return {@link OrganizationEntity} + */ + List findByParentId(String parentId); + + /** + * 查询子组织根据sort排序 + * + * @param parentId {@link String} + * @return {@link OrganizationEntity} + */ + List findByParentIdOrderByOrderAsc(String parentId); + + /** + * 移动组织机构 + * + * @param id {@link String} + * @param parentId {@link String} + */ + @Transactional(rollbackFor = Exception.class) + @Modifying + @Query(value = "UPDATE OrganizationEntity SET parentId =:parentId WHERE id =:id") + void moveOrganization(@Param(value = "id") String id, + @Param(value = "parentId") String parentId); + + /** + * 更新叶子接点 + * + * @param id {@link String} + * @param isLeaf {@link Boolean} + */ + @Transactional(rollbackFor = Exception.class) + @Modifying + @Query(value = "UPDATE OrganizationEntity set leaf =:isLeaf WHERE id =:id") + void updateIsLeaf(@Param(value = "id") String id, @Param(value = "isLeaf") Boolean isLeaf); + + /** + * 更新启用/禁用 + * + * @param id {@link Serializable} + * @param status {@link Boolean} + * @return {@link Integer} + */ + @Modifying + @Query(value = "UPDATE OrganizationEntity set enabled =:status WHERE id =:id") + Integer updateStatus(@Param(value = "id") String id, @Param(value = "status") Boolean status); + + /** + * 根据名称或编码查询组织机构 + * + * @param keyWord {@link String} + * @return {@link OrganizationEntity} + */ + @Query(value = "FROM OrganizationEntity WHERE name LIKE %:keyWord% OR code LIKE %:keyWord%") + List findByNameLikeOrCodeLike(@Param(value = "keyWord") String keyWord); + + /** + * 查询指定id返回组织机构 + * + * @param id {@link Collection} + * @return {@link OrganizationEntity} + */ + List findByIdInOrderByCreateTimeDesc(Collection id); + + /** + * 根据外部用id查询组织 + * + * @param deptIdList {@link String} + * @return {@link OrganizationEntity} + */ + List findByExternalIdIn(List deptIdList); + + /** + * 根据外部用id查询组织 + * + * @param deptId {@link String} + * @return {@link OrganizationEntity} + */ + Optional findByExternalId(String deptId); + + /** + * 根据外部用id查询组织 + * + * @param externalId {@link String} + * @param identitySourceId {@link Long} + * @return {@link OrganizationEntity} + */ + OrganizationEntity findByExternalIdAndIdentitySourceId(String externalId, + Long identitySourceId); + + /** + * 根据外部用id查询组织 + * + * @param externalId {@link String} + * @param identitySourceId {@link Long} + * @return {@link List} + */ + List findByExternalIdInAndIdentitySourceId(List externalId, + Long identitySourceId); + + /** + * 查询子组织 + * + * @param parentId {@link String} + * @param dataOrigin {@link DataOrigin} + * @param identitySourceId {@link String} + * @return {@link OrganizationEntity} + */ + List findByParentIdAndDataOriginAndIdentitySourceId(String parentId, + DataOrigin dataOrigin, + Long identitySourceId); + + /** + * 根据身份源ID获取所有数据 + * + * @param identitySourceId {@link Long} + * @return {@link List} + */ + List findByIdentitySourceId(Long identitySourceId); + + /** + * 通过parentId查询 + * + * @param parentIds {@link List} + * @return {@link List} + */ + List findByIdInOrderByOrderAsc(Collection parentIds); + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/OrganizationRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/OrganizationRepositoryCustomized.java new file mode 100644 index 00000000..eed6a7c6 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/OrganizationRepositoryCustomized.java @@ -0,0 +1,43 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import java.util.List; + +import cn.topiam.employee.common.entity.account.OrganizationEntity; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 21:27 + */ +public interface OrganizationRepositoryCustomized { + + /** + * 批量保存 + * + * @param list {@link List} + */ + void batchSave(List list); + + /** + * 批量更新 + * + * @param list {@link List} + */ + void batchUpdate(List list); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserDetailRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserDetailRepository.java new file mode 100644 index 00000000..f3574304 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserDetailRepository.java @@ -0,0 +1,79 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.account.UserDetailEntity; + +/** + *

+ * 用户详情表 Repository 接口 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-07 + */ +@Repository +public interface UserDetailRepository extends PagingAndSortingRepository, + CrudRepository, + QuerydslPredicateExecutor, + UserDetailRepositoryCustomized { + /** + * 根据user id查询用户详情 + * + * @param user {@link String} + * @return {@link UserDetailEntity} + */ + Optional findByUserId(Long user); + + /** + * 根据用户ID删除用户 + * + * @param userId {@link Long} + */ + void deleteByUserId(Long userId); + + /** + * 根据用户ID批量删除用户 + * + * @param userIds {@link String} + */ + @Modifying + @Query(value = "DELETE FROM UserDetailEntity WHERE userId IN (:userIds)") + void deleteAllByUserId(@Param("userIds") Iterable userIds); + + /** + * 根据用户ID查询用户详情 + * + * @param userIds {@link List} + * @return {@link List} + */ + @Modifying + @Query(value = "SELECT * FROM user_detail WHERE user_detail.user_id IN :userIds", nativeQuery = true) + List findAllByUserIds(@Param("userIds") Iterable userIds); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserDetailRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserDetailRepositoryCustomized.java new file mode 100644 index 00000000..ed552fe3 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserDetailRepositoryCustomized.java @@ -0,0 +1,45 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import java.util.ArrayList; +import java.util.List; + +import cn.topiam.employee.common.entity.account.UserDetailEntity; + +/** + * User Detail Repository Customized + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 20:27 + */ +public interface UserDetailRepositoryCustomized { + /** + * 批量新增 + * + * @param list {@link List} + */ + void batchSave(List list); + + /** + * 批量更新 + * + * @param list {@link List} + */ + void batchUpdate(ArrayList list); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserGroupMemberRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserGroupMemberRepository.java new file mode 100644 index 00000000..3782d4cf --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserGroupMemberRepository.java @@ -0,0 +1,78 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.account.UserGroupMemberEntity; + +/** + * 用户组成员 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/30 03:04 + */ +@Repository +public interface UserGroupMemberRepository extends JpaRepository, + QuerydslPredicateExecutor, + UserGroupMemberRepositoryCustomized { + + /** + * 根据用户组ID和用户ID删除 + * + * @param groupId {@link String} + * @param userId {@link String} + */ + @Transactional(rollbackFor = Exception.class) + void deleteByGroupIdAndUserId(@Param("groupId") Long groupId, @Param("userId") Long userId); + + /** + * 根据用户id所有用户组关联信息 + * + * @param userId {@link Long} + * + * @return {@link List} + */ + List findByUserId(@Param("userId") Long userId); + + /** + * 根据用户ID 批量删除关联关系 + * + * @param userIds {@link String} + */ + @Modifying + @Query(value = "DELETE FROM user_group_member WHERE user_id IN :userIds", nativeQuery = true) + void deleteAllByUserId(@Param("userIds") Iterable userIds); + + /** + * 根据用户ID 删除关联关系 + * + * @param id {@link Long} + */ + @Modifying + @Query(value = "DELETE FROM user_group_member WHERE user_id = :id", nativeQuery = true) + void deleteByUserId(@Param("id") Long id); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserGroupMemberRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserGroupMemberRepositoryCustomized.java new file mode 100644 index 00000000..676d0238 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserGroupMemberRepositoryCustomized.java @@ -0,0 +1,39 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import cn.topiam.employee.common.entity.account.po.UserPO; +import cn.topiam.employee.common.entity.account.query.UserGroupMemberListQuery; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 21:27 + */ +public interface UserGroupMemberRepositoryCustomized { + /** + * 获取用户组成员列表 + * + * @param query {@link UserGroupMemberListQuery} + * @param pageable {@link Pageable} + * @return {@link Page} + */ + Page getUserGroupMemberList(UserGroupMemberListQuery query, Pageable pageable); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserGroupRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserGroupRepository.java new file mode 100644 index 00000000..f1559baf --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserGroupRepository.java @@ -0,0 +1,40 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.account.UserGroupEntity; + +/** + *

+ * 用户组表 Repository 接口 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-07-31 + */ +@Repository +public interface UserGroupRepository extends CrudRepository, + PagingAndSortingRepository, + QuerydslPredicateExecutor { + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserHistoryPasswordRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserHistoryPasswordRepository.java new file mode 100644 index 00000000..6e7bda28 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserHistoryPasswordRepository.java @@ -0,0 +1,49 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import java.util.List; + +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.account.UserHistoryPasswordEntity; + +/** + *

+ * 用户历史密码表 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-07-31 + */ +@Repository +public interface UserHistoryPasswordRepository extends + CrudRepository, + PagingAndSortingRepository, + QuerydslPredicateExecutor { + /** + * 根据用户ID查询历史密码 + * + * @param userId {@link String} 用户ID + * @return {@link List } + */ + List findByUserId(String userId); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserIdpRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserIdpRepository.java new file mode 100644 index 00000000..7b8e1dfa --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserIdpRepository.java @@ -0,0 +1,37 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.account.UserIdpBindEntity; + +/** + * 用户身份绑定表 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/4/3 22:18 + */ +@Repository +public interface UserIdpRepository extends CrudRepository, + QuerydslPredicateExecutor, + UserIdpRepositoryCustomized { + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserIdpRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserIdpRepositoryCustomized.java new file mode 100644 index 00000000..2e82cb98 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserIdpRepositoryCustomized.java @@ -0,0 +1,58 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import java.util.Optional; + +import cn.topiam.employee.common.entity.account.po.UserIdpBindPo; +import cn.topiam.employee.support.repository.page.domain.Page; + +/** + * UserIdp Repository Customized + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 20:27 + */ +public interface UserIdpRepositoryCustomized { + + /** + * 根据身份源ID和openId查询 + * + * @param idpId {@link String} + * @param openId {@link String} + * @return {@link Optional} + */ + Optional findByIdpIdAndOpenId(String idpId, String openId); + + /** + * 根据身份源ID和userId查询 + * + * @param idpId {@link String} + * @param userId {@link String} + * @return {@link Optional} + */ + Optional findByIdpIdAndUserId(String idpId, Long userId); + + /** + * 查询用户身份提供商绑定 + * + * @param userId {@link Long} + * @return {@link Page} + */ + Iterable getUserIdpBindList(Long userId); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserRepository.java new file mode 100644 index 00000000..f30102c5 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserRepository.java @@ -0,0 +1,271 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import java.time.LocalDateTime; +import java.util.Collection; +import java.util.List; +import java.util.Optional; + +import org.jetbrains.annotations.NotNull; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.account.UserEntity; +import cn.topiam.employee.common.enums.DataOrigin; +import cn.topiam.employee.common.enums.UserStatus; +import static cn.topiam.employee.common.constants.AccountConstants.USER_CACHE_NAME; + +/** + *

+ * 用户表 Repository 接口 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-07-31 + */ +@Repository +@CacheConfig(cacheNames = { USER_CACHE_NAME }) +public interface UserRepository extends CrudRepository, + PagingAndSortingRepository, + QuerydslPredicateExecutor, UserRepositoryCustomized { + /** + * findById + * + * @param id must not be {@literal null}. + * @return {@link UserEntity} + */ + @NotNull + @Override + @Cacheable(key = "#p0", unless = "#result==null") + Optional findById(@NotNull Long id); + + /** + * findById + * + * @param id must not be {@literal null}. + */ + @Override + @CacheEvict(allEntries = true) + void deleteById(@NotNull Long id); + + /** + * findById + * + * @param ids must not be {@literal null}. + */ + @Override + @CacheEvict(allEntries = true) + void deleteAllById(@NotNull Iterable ids); + + /** + * save + * + * @param entity must not be {@literal null}. + * @return {@link UserEntity} + * @param {@link UserEntity} + */ + @Override + @CacheEvict(allEntries = true) + S save(@NotNull S entity); + + /** + * 根据用户名查询用户信息 + * + * @param username {@link String} + * @return {@link UserEntity} + */ + UserEntity findByUsername(String username); + + /** + * 根据手机号查询用户信息 + * + * @param phone {@link String} + * @return {@link UserEntity} + */ + UserEntity findByPhone(String phone); + + /** + * 根据邮件查询用户信息 + * + * @param username {@link String} + * @return {@link UserEntity} + */ + UserEntity findByEmail(String username); + + /** + * 根据扩展ID查询用户信息 + * + * @param id {@link String} + * @return {@link UserEntity} + */ + Optional findByExternalId(String id); + + /** + * 根据扩展ID查询用户信息 + * + * @param ids {@link Collection} + * @return {@link UserEntity} + */ + List findByExternalIdIn(Collection ids); + + /** + * 更新用户密码 + * + * @param id {@link Long} + * @param password {@link String} + * @param lastUpdatePasswordTime {@link LocalDateTime} + * @return {@link Integer} + */ + @Transactional(rollbackFor = Exception.class) + @Modifying + @CacheEvict(allEntries = true) + @Query(value = "update UserEntity set password =:password,lastUpdatePasswordTime = :lastUpdatePasswordTime where id=:id") + Integer updateUserPassword(@Param(value = "id") Long id, + @Param(value = "password") String password, + @Param(value = "lastUpdatePasswordTime") LocalDateTime lastUpdatePasswordTime); + + /** + * 更新用户邮箱 + * + * @param id {@link Long} + * @param email {@link String} + * @return {@link Integer} + */ + @Transactional(rollbackFor = Exception.class) + @Modifying + @CacheEvict(allEntries = true) + @Query(value = "update UserEntity set email =:email where id=:id") + Integer updateUserEmail(@Param(value = "id") Long id, @Param(value = "email") String email); + + /** + * 更新用户手机号 + * + * @param id {@link Long} + * @param phone {@link String} + * @return {@link Integer} + */ + @Transactional(rollbackFor = Exception.class) + @Modifying + @CacheEvict(allEntries = true) + @Query(value = "update UserEntity set phone =:phone where id=:id") + Integer updateUserPhone(@Param(value = "id") Long id, @Param(value = "phone") String phone); + + /** + * 更新用户状态 + * + * @param id {@link Long} + * @param status {@link UserStatus} + * @return {@link Integer} + */ + @Transactional(rollbackFor = Exception.class) + @Modifying + @CacheEvict(allEntries = true) + @Query(value = "update UserEntity set status=:status where id=:id") + Integer updateUserStatus(@Param(value = "id") Long id, + @Param(value = "status") UserStatus status); + + /** + * 查找密码过期警告用户 + * + * @param expireWarnDays {@link Integer} 即将到期日期 + * @return {@link UserEntity} + */ + @Query(value = "SELECT * FROM `user` WHERE DATE_ADD(DATE_FORMAT(last_update_password_time,'%Y-%m-%d'), INTERVAL :expireWarnDays DAY ) <= CURDATE() and user.status_ != 'locked'", nativeQuery = true) + List findPasswordExpireWarnUser(@Param(value = "expireWarnDays") Integer expireWarnDays); + + /** + * 查询密码已过期用户 + * + * @param expireDays {@link Integer} 密码过期日期 + * @return {@link UserEntity} + */ + @Query(value = "SELECT * FROM `user` WHERE DATE_ADD(DATE_FORMAT(last_update_password_time,'%Y-%m-%d'), INTERVAL :expireDays DAY ) BETWEEN DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 HOUR),'%Y-%m-%d %h') AND DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 HOUR),'%Y-%m-%d %h') and user.status_ != 'password_expired_locked'", nativeQuery = true) + List findPasswordExpireUser(@Param(value = "expireDays") Integer expireDays); + + /** + * 查询已到期用户 + * + * @return {@link UserEntity} + */ + @Query(value = "SELECT * from `user` WHERE expire_date <= CURDATE() and status_ != 'expired_locked'", nativeQuery = true) + List findExpireUser(); + + /** + * 更新用户共享密钥 + * + * @param id {@link Long} + * @param sharedSecret {@link String} + * @param totpBind {@link Boolean} + * @return {@link Integer} + */ + @CacheEvict(allEntries = true) + @Modifying + @Query(value = "update UserEntity set sharedSecret=:sharedSecret, totpBind=:totpBind where id=:id") + Integer updateUserSharedSecretAndTotpBind(@Param(value = "id") Long id, + @Param(value = "sharedSecret") String sharedSecret, + @Param(value = "totpBind") Boolean totpBind); + + /** + * 根据第三方扩展ID 删除用户 + * + * @param externalIds {@link List} + */ + void deleteAllByExternalIdIn(Collection externalIds); + + /** + * 根据用户名查询全部 + * + * @param usernames {@link String} + * @return {@link List} + */ + List findAllByUsernameIn(@Param("usernames") Collection usernames); + + /** + * 根据手机号查询全部 + * + * @param phones {@link String} + * @return {@link List} + */ + List findAllByPhoneIn(@Param("phones") Collection phones); + + /** + * 根据email模糊查询 + * + * @param emails {@link String} + * @return {@link List} + */ + List findAllByEmailIn(@Param("emails") Collection emails); + + /** + * 按Id查找不在Id中 + * @param ids {@link Collection} + * @param dataOrigin {@link DataOrigin} + * @return {@link List} + */ + List findAllByIdNotInAndDataOrigin(Collection ids, DataOrigin dataOrigin); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserRepositoryCustomized.java new file mode 100644 index 00000000..bebcbd3e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/UserRepositoryCustomized.java @@ -0,0 +1,105 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import cn.topiam.employee.common.entity.account.UserEntity; +import cn.topiam.employee.common.entity.account.po.UserPO; +import cn.topiam.employee.common.entity.account.query.UserListNotInGroupQuery; +import cn.topiam.employee.common.entity.account.query.UserListQuery; + +/** + * User Repository Customized + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 20:27 + */ +public interface UserRepositoryCustomized { + /** + * 获取用户列表 + * + * @param pageable {@link Pageable} + * @param query {@link UserListQuery} + * @return {@link Page} + */ + Page getUserList(UserListQuery query, Pageable pageable); + + /** + * 获取用户组成员列表 + * + * @param query {@link UserListNotInGroupQuery} + * @param pageable {@link Pageable} + * @return {@link Page} + */ + Page getUserListNotInGroupId(UserListNotInGroupQuery query, Pageable pageable); + + /** + * 根据组织ID查询用户列表 + * + * @param organizationId {@link String} + * @return {@link List} + */ + List findAllByOrgId(String organizationId); + + /** + * 根据组织ID、数据来源查询用户列表 + * + * @param organizationId {@link String} + * @param identitySourceId {@link Long} + * @return {@link List} + */ + List findAllByOrgIdAndIdentitySourceId(String organizationId, + Long identitySourceId); + + /** + * 按组织外部 ID 和数据来源查找用户列表 + * + * @param externalId {@link String} + * @param identitySourceId {@link Long} + * @return {@link List} + */ + List findAllByOrgExternalIdAndIdentitySourceId(String externalId, + Long identitySourceId); + + /** + * 不在组织下和数据来源查找用户列表 + * + * @param identitySourceId {@link Long} + * @return {@link List} + */ + List findAllByOrgIdNotExistAndIdentitySourceId(Long identitySourceId); + + /** + * 批量新增 + * + * @param list {@link List} + */ + void batchSave(List list); + + /** + * 批量更新 + * + * @param list {@link List} + */ + void batchUpdate(List list); + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/OrganizationMemberCustomizedRepositoryImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/OrganizationMemberCustomizedRepositoryImpl.java new file mode 100644 index 00000000..a9bc5571 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/OrganizationMemberCustomizedRepositoryImpl.java @@ -0,0 +1,73 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account.impl; + +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.List; + +import org.jetbrains.annotations.NotNull; +import org.springframework.jdbc.core.BatchPreparedStatementSetter; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.account.OrganizationMemberEntity; +import cn.topiam.employee.common.repository.account.OrganizationMemberCustomizedRepository; + +/** + * + * @author TopIAM + * Created by support@topiam.cn on 2022/10/2 02:54 + */ +@Repository +public class OrganizationMemberCustomizedRepositoryImpl implements + OrganizationMemberCustomizedRepository { + + @Override + public void batchSave(List list) { + jdbcTemplate.batchUpdate( + "INSERT INTO organization_member (id_, org_id, user_id,create_by,create_time,update_by,update_time,remark_) VALUES (?,?,?,?,?,?,?,?)", + new BatchPreparedStatementSetter() { + + @Override + public void setValues(@NotNull PreparedStatement ps, int i) throws SQLException { + OrganizationMemberEntity entity = list.get(i); + ps.setLong(1, entity.getId()); + ps.setString(2, entity.getOrgId()); + ps.setLong(3, entity.getUserId()); + ps.setString(4, entity.getCreateBy()); + ps.setTimestamp(5, Timestamp.valueOf(entity.getCreateTime())); + ps.setString(6, entity.getUpdateBy()); + ps.setTimestamp(7, Timestamp.valueOf(entity.getUpdateTime())); + ps.setString(8, entity.getRemark()); + } + + @Override + public int getBatchSize() { + return list.size(); + } + }); + } + + private final JdbcTemplate jdbcTemplate; + + public OrganizationMemberCustomizedRepositoryImpl(JdbcTemplate jdbcTemplate) { + this.jdbcTemplate = jdbcTemplate; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/OrganizationRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/OrganizationRepositoryCustomizedImpl.java new file mode 100644 index 00000000..8e80e25b --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/OrganizationRepositoryCustomizedImpl.java @@ -0,0 +1,128 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account.impl; + +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.List; +import java.util.Objects; + +import org.jetbrains.annotations.NotNull; +import org.springframework.jdbc.core.BatchPreparedStatementSetter; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.account.OrganizationEntity; +import cn.topiam.employee.common.repository.account.OrganizationRepositoryCustomized; + +/** + * + * @author TopIAM + * Created by support@topiam.cn on 2022/9/24 23:12 + */ +@Repository +public class OrganizationRepositoryCustomizedImpl implements OrganizationRepositoryCustomized { + + /** + * 批量保存 + * + * @param list {@link List} + */ + @Override + public void batchSave(List list) { + jdbcTemplate.batchUpdate( + "INSERT INTO organization (id_, code_, name_, parent_id, is_leaf, external_id, data_origin, type_, is_enabled, order_, path_, display_path, identity_source_id,create_by,create_time,update_by,update_time,remark_) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", + new BatchPreparedStatementSetter() { + @Override + public void setValues(@NotNull PreparedStatement ps, int i) throws SQLException { + OrganizationEntity entity = list.get(i); + ps.setString(1, entity.getId()); + ps.setString(2, entity.getCode()); + ps.setString(3, entity.getName()); + ps.setString(4, entity.getParentId()); + ps.setBoolean(5, entity.getLeaf()); + ps.setString(6, entity.getExternalId()); + ps.setString(7, entity.getDataOrigin().getCode()); + ps.setString(8, entity.getType().getCode()); + ps.setBoolean(9, entity.getEnabled()); + ps.setObject(10, !Objects.isNull(entity.getOrder()) ? entity.getOrder() : null); + ps.setString(11, entity.getPath()); + ps.setString(12, entity.getDisplayPath()); + ps.setLong(13, entity.getIdentitySourceId()); + ps.setString(14, entity.getCreateBy()); + ps.setTimestamp(15, Timestamp.valueOf(entity.getCreateTime())); + ps.setString(16, entity.getUpdateBy()); + ps.setTimestamp(17, Timestamp.valueOf(entity.getUpdateTime())); + ps.setString(18, entity.getRemark()); + } + + @Override + public int getBatchSize() { + return list.size(); + } + }); + } + + /** + * 批量更新 + * + * @param list {@link List} + */ + @Override + public void batchUpdate(List list) { + jdbcTemplate.batchUpdate( + "UPDATE organization SET code_=?, name_=?, parent_id=?, is_leaf=?, external_id=?, data_origin=?, type_=? ,is_enabled=?,order_=?, path_=?,display_path=?,identity_source_id=?,create_by=?,create_time=?,update_by=?,update_time=?,remark_=? WHERE id_=?", + new BatchPreparedStatementSetter() { + + @Override + public void setValues(@NotNull PreparedStatement ps, int i) throws SQLException { + OrganizationEntity entity = list.get(i); + ps.setString(1, entity.getCode()); + ps.setString(2, entity.getName()); + ps.setString(3, entity.getParentId()); + ps.setBoolean(4, entity.getLeaf()); + ps.setString(5, entity.getExternalId()); + ps.setString(6, entity.getDataOrigin().getCode()); + ps.setString(7, entity.getType().getCode()); + ps.setBoolean(8, entity.getEnabled()); + ps.setObject(9, Objects.isNull(entity.getOrder()) ? null : entity.getOrder()); + ps.setString(10, entity.getPath()); + ps.setString(11, entity.getDisplayPath()); + ps.setLong(12, entity.getIdentitySourceId()); + ps.setString(13, entity.getCreateBy()); + ps.setTimestamp(14, Timestamp.valueOf(entity.getCreateTime())); + ps.setString(15, entity.getUpdateBy()); + ps.setTimestamp(16, Timestamp.valueOf(entity.getUpdateTime())); + ps.setString(17, entity.getRemark()); + ps.setString(18, entity.getId()); + } + + @Override + public int getBatchSize() { + return list.size(); + } + }); + } + + private final JdbcTemplate jdbcTemplate; + + public OrganizationRepositoryCustomizedImpl(JdbcTemplate jdbcTemplate) { + this.jdbcTemplate = jdbcTemplate; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/UserDetailRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/UserDetailRepositoryCustomizedImpl.java new file mode 100644 index 00000000..677a956d --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/UserDetailRepositoryCustomizedImpl.java @@ -0,0 +1,120 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account.impl; + +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import org.jetbrains.annotations.NotNull; +import org.springframework.jdbc.core.BatchPreparedStatementSetter; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.account.UserDetailEntity; +import cn.topiam.employee.common.repository.account.UserDetailRepositoryCustomized; + +/** + * User Detail Repository Customized + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 20:27 + */ +@Repository +public class UserDetailRepositoryCustomizedImpl implements UserDetailRepositoryCustomized { + + /** + * 批量更新或新增 + * + * @param data {@link List} + */ + @Override + public void batchSave(List data) { + jdbcTemplate.batchUpdate( + "INSERT INTO user_detail (id_, user_id, id_type, id_card, website_,address_,create_by,create_time,update_by,update_time,remark_) values (?,?,?,?,?,?,?,?,?,?,?)", + new BatchPreparedStatementSetter() { + + @Override + public void setValues(@NotNull PreparedStatement ps, int i) throws SQLException { + UserDetailEntity entity = data.get(i); + ps.setLong(1, entity.getId()); + ps.setLong(2, entity.getUserId()); + ps.setString(3, + Objects.isNull(entity.getIdType()) ? null : entity.getIdType().getCode()); + ps.setString(4, entity.getIdCard()); + ps.setString(5, entity.getWebsite()); + ps.setString(6, entity.getAddress()); + ps.setString(7, entity.getCreateBy()); + ps.setTimestamp(8, Timestamp.valueOf(entity.getCreateTime())); + ps.setString(9, entity.getUpdateBy()); + ps.setTimestamp(10, Timestamp.valueOf(entity.getUpdateTime())); + ps.setString(11, entity.getRemark()); + } + + @Override + public int getBatchSize() { + return data.size(); + } + }); + } + + /** + * 批量更新 + * + * @param list {@link List} + */ + @Override + public void batchUpdate(ArrayList list) { + jdbcTemplate.batchUpdate( + "UPDATE user_detail SET user_id=?,id_type=?, id_card=?, website_=? ,address_=?,create_by=?,create_time=?,update_by=?,update_time=?,remark_=? WHERE id_=?", + new BatchPreparedStatementSetter() { + + @Override + public void setValues(@NotNull PreparedStatement ps, int i) throws SQLException { + UserDetailEntity entity = list.get(i); + ps.setLong(1, entity.getUserId()); + ps.setString(2, + Objects.isNull(entity.getIdType()) ? null : entity.getIdType().getCode()); + ps.setString(3, entity.getIdCard()); + ps.setString(4, entity.getWebsite()); + ps.setString(5, entity.getAddress()); + ps.setString(6, entity.getCreateBy()); + ps.setTimestamp(7, Timestamp.valueOf(entity.getCreateTime())); + ps.setString(8, entity.getUpdateBy()); + ps.setTimestamp(9, Timestamp.valueOf(entity.getUpdateTime())); + ps.setString(10, entity.getRemark()); + ps.setLong(11, entity.getId()); + } + + @Override + public int getBatchSize() { + return list.size(); + } + }); + } + + private final JdbcTemplate jdbcTemplate; + + public UserDetailRepositoryCustomizedImpl(JdbcTemplate jdbcTemplate) { + this.jdbcTemplate = jdbcTemplate; + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/UserGroupMemberRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/UserGroupMemberRepositoryCustomizedImpl.java new file mode 100644 index 00000000..e5200266 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/UserGroupMemberRepositoryCustomizedImpl.java @@ -0,0 +1,113 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account.impl; + +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.Pageable; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.account.po.UserPO; +import cn.topiam.employee.common.entity.account.query.UserGroupMemberListQuery; +import cn.topiam.employee.common.repository.account.UserGroupMemberRepositoryCustomized; +import cn.topiam.employee.common.repository.account.impl.mapper.UserPoMapper; + +import lombok.AllArgsConstructor; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 21:27 + */ +@Repository +@AllArgsConstructor +public class UserGroupMemberRepositoryCustomizedImpl implements + UserGroupMemberRepositoryCustomized { + /** + * 获取用户组成员列表 + * + * @param query {@link UserGroupMemberListQuery} + * @param pageable {@link Pageable} + * @return {@link Page} + */ + @SuppressWarnings("DuplicatedCode") + @Override + public Page getUserGroupMemberList(UserGroupMemberListQuery query, Pageable pageable) { + //@formatter:off + StringBuilder builder = new StringBuilder(""" + SELECT + `u`.id_, + `u`.username_, + `u`.password_, + `u`.email_, + `u`.phone_, + `u`.phone_area_code, + `u`.full_name, + `u`.nick_name, + `u`.avatar_, + `u`.status_, + `u`.data_origin, + `u`.email_verified, + `u`.phone_verified, + `u`.shared_secret, + `u`.totp_bind, + `u`.auth_total, + `u`.last_auth_ip, + `u`.last_auth_time, + `u`.expand_, + `u`.external_id, + `u`.expire_date, + `u`.create_by, + `u`.create_time, + `u`.update_by, + `u`.update_time, + `u`.remark_, + group_concat( organization_.display_path ) AS org_display_path + FROM + user_group_member ugm + INNER JOIN user u ON ugm.user_id = u.id_ + INNER JOIN user_group ug ON ug.id_ = ugm.group_id + LEFT JOIN organization_member ON ( u.id_ = organization_member.user_id ) + LEFT JOIN organization organization_ ON ( organization_.id_ = organization_member.org_id ) + WHERE + ugm.group_id = '%s' + AND ug.id_ = '%s' + """.formatted(query.getId(), query.getId())); + //用户名 + if (StringUtils.isNoneBlank(query.getUsername())) { + builder.append(" AND username_='%").append(query.getUsername()).append("%'"); + } + builder.append("GROUP BY `u`.id_"); + //@formatter:on + String sql = builder.toString(); + List list = jdbcTemplate.query( + builder.append(" LIMIT ").append(pageable.getPageNumber() * pageable.getPageSize()) + .append(",").append(pageable.getPageSize()).toString(), + new UserPoMapper()); + //@formatter:off + String countSql = "SELECT count(*) FROM (" + sql + ") user_"; + //@formatter:on + Integer count = jdbcTemplate.queryForObject(countSql, Integer.class); + return new PageImpl<>(list, pageable, count); + } + + private final JdbcTemplate jdbcTemplate; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/UserIdpRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/UserIdpRepositoryCustomizedImpl.java new file mode 100644 index 00000000..dc339a0a --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/UserIdpRepositoryCustomizedImpl.java @@ -0,0 +1,120 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account.impl; + +import java.util.Objects; +import java.util.Optional; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.account.po.UserIdpBindPo; +import cn.topiam.employee.common.repository.account.UserIdpRepositoryCustomized; +import cn.topiam.employee.common.repository.account.impl.mapper.UserIdpBindPoMapper; +import cn.topiam.employee.support.repository.page.domain.Page; + +import lombok.AllArgsConstructor; +import static cn.topiam.employee.common.constants.AccountConstants.USER_CACHE_NAME; + +/** + * UserIdp Repository Customized + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 20:27 + */ +@Repository +@CacheConfig(cacheNames = { USER_CACHE_NAME }) +@AllArgsConstructor +public class UserIdpRepositoryCustomizedImpl implements UserIdpRepositoryCustomized { + + /** + * 根据身份源ID和openId查询 + * + * @param idpId {@link String} + * @param openId {@link String} + * @return {@link Optional} + */ + @Override + public Optional findByIdpIdAndOpenId(String idpId, String openId) { + //@formatter:off + StringBuilder builder = new StringBuilder("SELECT uidp.*,`user`.username_,idp.name_ as idp_name FROM user_idp_bind uidp LEFT JOIN `user` ON uidp.user_id = `user`.id_ LEFT JOIN identity_provider idp ON uidp.idp_id = idp.id_ WHERE 1=1"); + //身份提供商ID + if (StringUtils.isNoneBlank(idpId)) { + builder.append(" AND uidp.idp_id = '").append(idpId).append("'"); + } + //OPEN ID + if (StringUtils.isNoneBlank(openId)) { + builder.append(" AND uidp.open_id = '").append(openId).append("'"); + } + //@formatter:on + String sql = builder.toString(); + UserIdpBindPo userIdpBindPo = jdbcTemplate.queryForObject(sql, new UserIdpBindPoMapper()); + return Optional.ofNullable(userIdpBindPo); + } + + /** + * 根据身份源ID和userId查询 + * + * @param idpId {@link String} + * @param userId {@link String} + * @return {@link Optional} + */ + @Override + public Optional findByIdpIdAndUserId(String idpId, Long userId) { + //@formatter:off + StringBuilder builder = new StringBuilder("SELECT uidp.*,`user`.username_,idp.name_ as idp_name FROM user_idp_bind uidp LEFT JOIN `user` ON uidp.user_id = `user`.id_ LEFT JOIN identity_provider idp ON uidp.idp_id = idp.id_ WHERE 1=1"); + //身份提供商ID + if (StringUtils.isNoneBlank(idpId)) { + builder.append(" AND uidp.idp_id = '").append(idpId).append("'"); + } + //用户ID + if (Objects.nonNull(userId)) { + builder.append(" AND uidp.user_id = '").append(userId).append("'"); + } + //@formatter:on + String sql = builder.toString(); + UserIdpBindPo userIdpBindPo = jdbcTemplate.queryForObject(sql, new UserIdpBindPoMapper()); + return Optional.ofNullable(userIdpBindPo); + } + + /** + * 查询用户身份提供商绑定 + * + * @param userId {@link Long} + * @return {@link Page} + */ + @Override + public Iterable getUserIdpBindList(Long userId) { + //@formatter:off + StringBuilder builder = new StringBuilder("SELECT uidp.*,idp.name_ as idp_name FROM user_idp_bind uidp LEFT JOIN identity_provider idp ON uidp.idp_id = idp.id_ WHERE 1=1"); + //用户ID + if (Objects.nonNull(userId)) { + builder.append(" AND uidp.user_id = '").append(userId).append("'"); + } + //@formatter:on + String sql = builder.toString(); + return jdbcTemplate.query(sql, new UserIdpBindPoMapper()); + } + + /** + * JdbcTemplate + */ + private final JdbcTemplate jdbcTemplate; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/UserRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/UserRepositoryCustomizedImpl.java new file mode 100644 index 00000000..aceca4fe --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/UserRepositoryCustomizedImpl.java @@ -0,0 +1,355 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account.impl; + +import java.sql.Date; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.List; +import java.util.Objects; + +import org.apache.commons.lang3.StringUtils; +import org.jetbrains.annotations.NotNull; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.Pageable; +import org.springframework.jdbc.core.BatchPreparedStatementSetter; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.account.UserEntity; +import cn.topiam.employee.common.entity.account.po.UserPO; +import cn.topiam.employee.common.entity.account.query.UserListNotInGroupQuery; +import cn.topiam.employee.common.entity.account.query.UserListQuery; +import cn.topiam.employee.common.repository.account.UserRepositoryCustomized; +import cn.topiam.employee.common.repository.account.impl.mapper.UserEntityMapper; +import cn.topiam.employee.common.repository.account.impl.mapper.UserPoMapper; + +import lombok.AllArgsConstructor; +import static cn.topiam.employee.common.constants.AccountConstants.USER_CACHE_NAME; + +/** + * User Repository Customized + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 20:27 + */ +@Repository +@CacheConfig(cacheNames = { USER_CACHE_NAME }) +@AllArgsConstructor +public class UserRepositoryCustomizedImpl implements UserRepositoryCustomized { + + /** + * 获取用户列表 + * + * @param pageable {@link Pageable} + * @param query {@link UserListQuery} + * @return {@link Page} + */ + @SuppressWarnings("DuplicatedCode") + @Override + public Page getUserList(UserListQuery query, Pageable pageable) { + //@formatter:off + StringBuilder builder = new StringBuilder("SELECT `user`.id_, `user`.username_,`user`.password_, `user`.email_, `user`.phone_,`user`.phone_area_code, `user`.full_name ,`user`.nick_name, `user`.avatar_ , `user`.status_, `user`.data_origin, `user`.email_verified, `user`.phone_verified, `user`.shared_secret, `user`.totp_bind , `user`.auth_total, `user`.last_auth_ip, `user`.last_auth_time, `user`.expand_, `user`.external_id , `user`.expire_date,`user`.create_by, `user`.create_time, `user`.update_by , `user`.update_time, `user`.remark_, group_concat(organization_.display_path) AS org_display_path FROM `user` INNER JOIN `organization_member` ON (`user`.id_ = organization_member.user_id) INNER JOIN `organization` organization_ ON (organization_.id_ = organization_member.org_id) WHERE 1=1"); + //组织条件 + if (StringUtils.isNoneBlank(query.getOrganizationId())) { + //包含子节点 + if (Boolean.TRUE.equals(query.getInclSubOrganization())) { + builder.append(" AND FIND_IN_SET('").append(query.getOrganizationId()).append("', REPLACE(organization_.path_, '/', ','))> 0"); + } + else { + builder.append(" AND organization_.id_ = '").append(query.getOrganizationId()).append("'"); + } + } + //用户名条件 + if (StringUtils.isNoneBlank(query.getUsername())) { + builder.append(" AND `user`.username_ LIKE '%").append(query.getUsername()).append("%'"); + } + //姓名 + if (StringUtils.isNoneBlank(query.getFullName())) { + builder.append(" AND `user`.full_name LIKE '%").append(query.getFullName()).append("%'"); + } + //手机号条件 + if (StringUtils.isNoneBlank(query.getPhone())) { + builder.append(" AND `user`.phone_ = '").append(query.getPhone()).append("'"); + } + //邮箱地址条件 + if (StringUtils.isNoneBlank(query.getEmail())) { + builder.append(" AND `user`.email_ LIKE '%").append(query.getEmail()).append("%'"); + } + //状态条件 + if (!Objects.isNull(query.getStatus())) { + builder.append(" AND `user`.status_ = '").append(query.getStatus().getCode()).append("'"); + } + //数据来源 + if (!Objects.isNull(query.getDataOrigin())) { + builder.append(" AND `user`.data_origin = '").append(query.getDataOrigin().getCode()).append("'"); + } + builder.append(" GROUP BY `user`.id_"); + //@formatter:on + String sql = builder.toString(); + List list = jdbcTemplate.query( + builder.append(" LIMIT ").append(pageable.getPageNumber() * pageable.getPageSize()) + .append(",").append(pageable.getPageSize()).toString(), + new UserPoMapper()); + //@formatter:off + String countSql = "SELECT count(*) FROM (" + sql + ") user_"; + //@formatter:on + Integer count = jdbcTemplate.queryForObject(countSql, Integer.class); + return new PageImpl<>(list, pageable, count); + } + + /** + * 获取用户组成员列表 + * + * @param query {@link UserListNotInGroupQuery} + * @param pageable {@link Pageable} + * @return {@link Page} + */ + @Override + public Page getUserListNotInGroupId(UserListNotInGroupQuery query, Pageable pageable) { + //@formatter:off + StringBuilder builder = new StringBuilder("SELECT\n" + + " \t`user`.id_,\n" + + " \t`user`.username_,\n" + + " \t`user`.password_,\n" + + " \t`user`.email_,\n" + + " \t`user`.phone_,\n" + + " \t`user`.phone_area_code,\n" + + " \t`user`.full_name,\n" + + " \t`user`.nick_name,\n" + + " \t`user`.avatar_,\n" + + " \t`user`.status_,\n" + + " \t`user`.data_origin,\n" + + " \t`user`.email_verified,\n" + + " \t`user`.phone_verified,\n" + + " \t`user`.shared_secret,\n" + + " \t`user`.totp_bind,\n" + + " \t`user`.auth_total,\n" + + " \t`user`.last_auth_ip,\n" + + " \t`user`.last_auth_time,\n" + + " \t`user`.expand_,\n" + + " \t`user`.external_id,\n" + + " \t`user`.expire_date,\n" + + " \t`user`.create_by,\n" + + " \t`user`.create_time,\n" + + " \t`user`.update_by,\n" + + " \t`user`.update_time,\n" + + " \t`user`.remark_,\n" + + " \tgroup_concat( organization_.display_path ) AS org_display_path \n" + + " FROM\n" + + " `user` \n" + + " LEFT JOIN `organization_member` ON ( `user`.id_ = organization_member.user_id )\n" + + " LEFT JOIN `organization` organization_ ON ( organization_.id_ = organization_member.org_id ) \n" + + " WHERE\n" + + " \tuser.id_ NOT IN (\n" + + " \tSELECT\n" + + " \t\tu.id_ \n" + + " \tFROM\n" + + " \t\tuser u\n" + + " \t\tINNER JOIN user_group_member ugm ON ugm.user_id = u.id_\n" + + " \t\tINNER JOIN user_group ug ON ug.id_ = ugm.group_id \n" + + " \tWHERE\n" + + " \tug.id_ = '%s' AND ugm.group_id = '%s')".formatted(query.getId(), query.getId())); + if (StringUtils.isNoneBlank(query.getKeyword())) { + builder.append(" AND user.username_ LIKE '%").append(query.getKeyword()).append("%'"); + builder.append(" OR user.full_name LIKE '%").append(query.getKeyword()).append("%'"); + builder.append(" OR user.phone_ = '").append(query.getKeyword()).append("'"); + builder.append(" OR user.email_ = '").append(query.getKeyword()).append("'"); + } + builder.append(" GROUP BY `user`.id_"); + //@formatter:on + String sql = builder.toString(); + List list = jdbcTemplate.query( + builder.append(" LIMIT ").append(pageable.getPageNumber() * pageable.getPageSize()) + .append(",").append(pageable.getPageSize()).toString(), + new UserPoMapper()); + //@formatter:off + String countSql = "SELECT COUNT(*) FROM(" + sql + ") user_"; + //@formatter:on + Integer count = jdbcTemplate.queryForObject(countSql, Integer.class); + return new PageImpl<>(list, pageable, count); + } + + /** + * 根据组织ID查询用户列表 + * + * @param organizationId {@link String} + * @return {@link List} + */ + @Override + public List findAllByOrgId(String organizationId) { + return jdbcTemplate.query( + "SELECT `user`.id_, `user`.username_, user.password_,`user`.email_, `user`.phone_,user.phone_area_code, `user`.full_name ,`user`.nick_name ,`user`.avatar_ , `user`.status_, `user`.data_origin, `user`.email_verified, `user`.shared_secret, `user`.totp_bind , `user`.auth_total, `user`.last_auth_ip, `user`.last_auth_time, `user`.expand_, `user`.external_id , `user`.expire_date,`user`.identity_source_id, `user`.create_by, `user`.create_time, `user`.update_by, `user`.update_time , `user`.remark_ FROM `user` INNER JOIN `organization_member` ON `user`.id_ = organization_member.user_id INNER JOIN `organization` organization_ ON organization_.id_ = organization_member.org_id WHERE 1 = 1 AND organization_.id_ = '" + + organizationId + "'" + "GROUP BY `user`.id_", + new UserEntityMapper()); + } + + /** + * 根据组织ID、数据来源查询用户列表 + * + * @param organizationId {@link String} + * @param identitySourceId {@link Long} + * @return {@link List} + */ + @Override + public List findAllByOrgIdAndIdentitySourceId(String organizationId, + Long identitySourceId) { + return jdbcTemplate.query( + "SELECT `user`.id_, `user`.username_, user.password_,`user`.email_, `user`.phone_,user.phone_area_code, `user`.full_name ,`user`.nick_name ,`user`.avatar_ , `user`.status_, `user`.data_origin, `user`.email_verified, `user`.shared_secret, `user`.totp_bind , `user`.auth_total, `user`.last_auth_ip, `user`.last_auth_time, `user`.expand_, `user`.external_id , `user`.expire_date,`user`.identity_source_id , `user`.create_by, `user`.create_time, `user`.update_by, `user`.update_time , `user`.remark_ FROM `user` INNER JOIN `organization_member` ON `user`.id_ = organization_member.user_id INNER JOIN `organization` organization_ ON organization_.id_ = organization_member.org_id WHERE 1 = 1 AND organization_.id_ = '" + + organizationId + "' AND user.identity_source_id = '" + + identitySourceId + "' GROUP BY `user`.id_", + new UserEntityMapper()); + } + + /** + * 按组织外部 ID 和数据来源查找用户列表 + * + * @param externalId {@link String} + * @param identitySourceId {@link Long} + * @return {@link List} + */ + @Override + public List findAllByOrgExternalIdAndIdentitySourceId(String externalId, + Long identitySourceId) { + return jdbcTemplate.query( + "SELECT `user`.id_, `user`.username_, user.password_,`user`.email_, `user`.phone_,user.phone_area_code, `user`.full_name ,`user`.nick_name ,`user`.avatar_ , `user`.status_, `user`.data_origin, `user`.email_verified,`user`.phone_verified, `user`.shared_secret, `user`.totp_bind , `user`.auth_total, `user`.last_auth_ip, `user`.last_auth_time, `user`.expand_, `user`.external_id , `user`.expire_date, `user`.create_by, `user`.create_time, `user`.update_by, `user`.update_time , `user`.remark_ FROM `user` INNER JOIN `organization_member` ON `user`.id_ = organization_member.user_id INNER JOIN `organization` organization_ ON organization_.id_ = organization_member.org_id WHERE 1 = 1 AND organization_.id_ = '" + + externalId + "' AND user.identity_source_id = '" + + identitySourceId + "' GROUP BY `user`.id_", + new UserPoMapper()); + } + + @Override + public List findAllByOrgIdNotExistAndIdentitySourceId(Long identitySourceId) { + return jdbcTemplate.query( + "SELECT * FROM(SELECT `user`.id_, `user`.username_, user.password_, `user`.email_, `user`.phone_, `user`.phone_area_code, `user`.full_name, `user`.nick_name, `user`.avatar_, `user`.status_, `user`.data_origin, user.identity_source_id,`user`.email_verified, `user`.shared_secret, `user`.totp_bind, `user`.auth_total, `user`.last_auth_ip, `user`.last_auth_time, `user`.expand_, `user`.external_id, `user`.expire_date, `user`.create_by, `user`.create_time, `user`.update_by, `user`.update_time, `user`.remark_ FROM `user` LEFT JOIN `organization_member` ON `user`.id_ = organization_member.user_id LEFT JOIN `organization` organization_ ON organization_.id_ = organization_member.org_id WHERE `organization_member`.user_id IS NULL) user WHERE user.identity_source_id = '" + + identitySourceId + "'" + "GROUP BY `user`.id_", + new UserEntityMapper()); + } + + /** + * 批量新增或更新 + * + * @param list {@link List} + */ + @Override + @CacheEvict(allEntries = true) + public void batchSave(List list) { + //@formatter:off + jdbcTemplate.batchUpdate( + "INSERT INTO user (id_, username_, password_, email_, phone_, phone_area_code, full_name,nick_name, avatar_, external_id, expire_date, status_, email_verified, phone_verified,shared_secret, auth_total,last_auth_ip,last_auth_time,expand_,data_origin,identity_source_id,totp_bind,last_update_password_time ,create_by,create_time,update_by,update_time,remark_) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ", + new BatchPreparedStatementSetter() { + + @Override + public void setValues(@NotNull PreparedStatement ps, int i) throws SQLException { + UserEntity entity = list.get(i); + ps.setLong(1, entity.getId()); + ps.setString(2, entity.getUsername()); + ps.setString(3, entity.getPassword()); + ps.setObject(4, StringUtils.isBlank(entity.getEmail())?null:entity.getEmail()); + ps.setObject(5, StringUtils.isBlank(entity.getPhone())?null:entity.getPhone()); + ps.setString(6, entity.getPhoneAreaCode()); + ps.setString(7, entity.getFullName()); + ps.setString(8, entity.getNickName()); + ps.setString(9, entity.getAvatar()); + ps.setString(10, entity.getExternalId()); + ps.setDate(11, Date.valueOf(entity.getExpireDate())); + ps.setString(12, entity.getStatus().getCode()); + ps.setBoolean(13, !Objects.isNull(entity.getEmailVerified()) && entity.getEmailVerified()); + ps.setBoolean(14, !Objects.isNull(entity.getPhoneVerified()) && entity.getPhoneVerified()); + ps.setString(15, entity.getSharedSecret()); + ps.setLong(16, Objects.isNull(entity.getAuthTotal())?0L:entity.getAuthTotal()); + ps.setString(17, entity.getLastAuthIp()); + ps.setTimestamp(18, !Objects.isNull(entity.getLastAuthTime()) ? Timestamp.valueOf(entity.getLastAuthTime()) : null); + ps.setString(19, entity.getExpand()); + ps.setString(20, entity.getDataOrigin().getCode()); + ps.setObject(21, entity.getIdentitySourceId()); + ps.setBoolean(22, !Objects.isNull(entity.getTotpBind()) && entity.getTotpBind()); + ps.setTimestamp(23, !Objects.isNull(entity.getLastUpdatePasswordTime())?Timestamp.valueOf(entity.getLastUpdatePasswordTime()):null); + ps.setString(24, entity.getCreateBy()); + ps.setTimestamp(25, Timestamp.valueOf(entity.getCreateTime())); + ps.setString(26, entity.getUpdateBy()); + ps.setTimestamp(27, Timestamp.valueOf(entity.getUpdateTime())); + ps.setString(28, entity.getRemark()); + } + + @Override + public int getBatchSize() { + return list.size(); + } + }); + //@formatter:on + } + + @Override + @CacheEvict(allEntries = true) + public void batchUpdate(List list) { + //@formatter:off + jdbcTemplate.batchUpdate( + "UPDATE user SET username_=?, password_=?, email_=?, phone_=?, phone_area_code=?,full_name=?,nick_name=?, avatar_=?, external_id=?, expire_date=?, status_=?, email_verified=?, phone_verified=?,shared_secret=?, auth_total=?,last_auth_ip=?,last_auth_time=?,expand_=?,data_origin=?,identity_source_id=?,totp_bind=?,last_update_password_time =?,create_by=?,create_time=?,update_by=?,update_time=?,remark_=? WHERE id_=?", + new BatchPreparedStatementSetter() { + + @Override + public void setValues(@NotNull PreparedStatement ps, int i) throws SQLException { + UserEntity entity = list.get(i); + ps.setString(1, entity.getUsername()); + ps.setString(2, entity.getPassword()); + ps.setObject(3, StringUtils.isBlank(entity.getEmail())?null:entity.getEmail()); + ps.setObject(4, StringUtils.isBlank(entity.getPhone())?null:entity.getPhone()); + ps.setString(5, entity.getPhoneAreaCode()); + ps.setString(6, entity.getFullName()); + ps.setString(7, entity.getNickName()); + ps.setString(8, entity.getAvatar()); + ps.setString(9, entity.getExternalId()); + ps.setDate(10, Date.valueOf(entity.getExpireDate())); + ps.setString(11, entity.getStatus().getCode()); + ps.setBoolean(12, !Objects.isNull(entity.getEmailVerified()) && entity.getEmailVerified()); + ps.setBoolean(13, !Objects.isNull(entity.getPhoneVerified()) && entity.getPhoneVerified()); + ps.setString(14, entity.getSharedSecret()); + ps.setLong(15, entity.getAuthTotal()); + ps.setString(16, entity.getLastAuthIp()); + ps.setTimestamp(17, !Objects.isNull(entity.getLastAuthTime()) ? Timestamp.valueOf(entity.getLastAuthTime()) : null); + ps.setString(18, entity.getExpand()); + ps.setString(19, entity.getDataOrigin().getCode()); + ps.setObject(20, entity.getIdentitySourceId()); + ps.setBoolean(21, !Objects.isNull(entity.getTotpBind()) && entity.getTotpBind()); + ps.setTimestamp(22, !Objects.isNull(entity.getLastUpdatePasswordTime())?Timestamp.valueOf(entity.getLastUpdatePasswordTime()):null); + ps.setString(23, entity.getCreateBy()); + ps.setTimestamp(24, Timestamp.valueOf(entity.getCreateTime())); + ps.setString(25, entity.getUpdateBy()); + ps.setTimestamp(26, Timestamp.valueOf(entity.getUpdateTime())); + ps.setString(27, entity.getRemark()); + ps.setLong(28, entity.getId()); + } + + @Override + public int getBatchSize() { + return list.size(); + } + }); + //@formatter:on + } + + /** + * JdbcTemplate + */ + private final JdbcTemplate jdbcTemplate; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/mapper/UserEntityMapper.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/mapper/UserEntityMapper.java new file mode 100644 index 00000000..f1a3dac6 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/mapper/UserEntityMapper.java @@ -0,0 +1,83 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account.impl.mapper; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.jdbc.core.RowMapper; +import org.springframework.lang.NonNull; + +import cn.topiam.employee.common.entity.account.UserEntity; +import cn.topiam.employee.common.enums.DataOrigin; +import cn.topiam.employee.common.enums.UserStatus; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 22:25 + */ +@SuppressWarnings("DuplicatedCode") +public class UserEntityMapper implements RowMapper { + /** + * Implementations must implement this method to map each row of data + * in the ResultSet. This method should not call {@code next()} on + * the ResultSet; it is only supposed to map values of the current row. + * + * @param rs the ResultSet to map (pre-initialized for the current row) + * @param rowNum the number of the current row + * @return the result object for the current row (may be {@code null}) + * @throws SQLException if an SQLException is encountered getting + * column values (that is, there's no need to catch SQLException) + */ + @Override + public UserEntity mapRow(@NonNull ResultSet rs, int rowNum) throws SQLException { + //@formatter:off + UserEntity user = new UserEntity(); + user.setId(rs.getLong("id_")); + user.setUsername(rs.getString("username_")); + user.setPassword(rs.getString("password_")); + user.setEmail(rs.getString("email_")); + user.setPhone(rs.getString("phone_")); + user.setPhoneAreaCode(rs.getString("phone_area_code")); + user.setFullName(rs.getString("full_name")); + user.setNickName(rs.getString("nick_name")); + user.setAvatar(rs.getString("avatar_")); + user.setStatus(UserStatus.getStatus(rs.getString("status_"))); + user.setDataOrigin(DataOrigin.getType(rs.getString("data_origin"))); + user.setEmailVerified(rs.getBoolean("email_verified")); + user.setSharedSecret(rs.getString("shared_secret")); + user.setTotpBind(rs.getBoolean("totp_bind")); + user.setAuthTotal(rs.getLong("auth_total")); + user.setLastAuthIp(rs.getString("last_auth_ip")); + user.setLastAuthTime(ObjectUtils.isNotEmpty(rs.getTimestamp("last_auth_time")) ? rs.getTimestamp("last_auth_time").toLocalDateTime() : null); + user.setExpand(rs.getString("expand_")); + user.setExternalId(rs.getString("external_id")); + user.setIdentitySourceId(rs.getLong("identity_source_id")); + user.setExpireDate(ObjectUtils.isNotEmpty(rs.getTimestamp("expire_date")) ? rs.getDate("expire_date").toLocalDate() : null); + user.setLastAuthTime(ObjectUtils.isNotEmpty(rs.getTimestamp("last_auth_time")) ? rs.getTimestamp("last_auth_time").toLocalDateTime() : null); + //额外数据 + user.setCreateBy(rs.getString("create_by")); + user.setCreateTime(ObjectUtils.isNotEmpty(rs.getTimestamp("create_time")) ? rs.getTimestamp("create_time").toLocalDateTime() : null); + user.setUpdateBy(rs.getString("update_by")); + user.setUpdateTime(ObjectUtils.isNotEmpty(rs.getTimestamp("update_time")) ? rs.getTimestamp("update_time").toLocalDateTime() : null); + user.setRemark(rs.getString("remark_")); + return user; + //@formatter:on + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/mapper/UserIdpBindPoMapper.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/mapper/UserIdpBindPoMapper.java new file mode 100644 index 00000000..0b0f5851 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/mapper/UserIdpBindPoMapper.java @@ -0,0 +1,89 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account.impl.mapper; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.jdbc.core.RowMapper; +import org.springframework.lang.NonNull; + +import cn.topiam.employee.common.entity.account.po.UserIdpBindPo; +import cn.topiam.employee.common.enums.IdentityProviderType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 22:25 + */ +@SuppressWarnings("DuplicatedCode") +public class UserIdpBindPoMapper implements RowMapper { + /** + * Implementations must implement this method to map each row of data + * in the ResultSet. This method should not call {@code next()} on + * the ResultSet; it is only supposed to map values of the current row. + * + * @param rs the ResultSet to map (pre-initialized for the current row) + * @param rowNum the number of the current row + * @return the result object for the current row (may be {@code null}) + * @throws SQLException if an SQLException is encountered getting + * column values (that is, there's no need to catch SQLException) + */ + @Override + public UserIdpBindPo mapRow(@NonNull ResultSet rs, int rowNum) throws SQLException { + //@formatter:off + UserIdpBindPo userIdpBindPo = new UserIdpBindPo(); + userIdpBindPo.setId(rs.getLong("id_")); + userIdpBindPo.setUserId(rs.getLong("user_id")); + userIdpBindPo.setOpenId(rs.getString("open_id")); + userIdpBindPo.setIdpId(rs.getString("idp_id")); + userIdpBindPo.setIdpType(IdentityProviderType.getType(rs.getString("idp_type"))); + userIdpBindPo.setBindTime(rs.getTimestamp("bind_time").toLocalDateTime()); + userIdpBindPo.setAdditionInfo(rs.getString("addition_info")); + if (isExistColumn(rs, "username_")) { + userIdpBindPo.setUserName(rs.getString("username_")); + } + userIdpBindPo.setIdpName(rs.getString("idp_name")); + //额外数据 + userIdpBindPo.setCreateBy(rs.getString("create_by")); + userIdpBindPo.setCreateTime(ObjectUtils.isNotEmpty(rs.getTimestamp("create_time")) ? rs.getTimestamp("create_time").toLocalDateTime() : null); + userIdpBindPo.setUpdateBy(rs.getString("update_by")); + userIdpBindPo.setUpdateTime(ObjectUtils.isNotEmpty(rs.getTimestamp("update_time")) ? rs.getTimestamp("update_time").toLocalDateTime() : null); + userIdpBindPo.setRemark(rs.getString("remark_")); + //@formatter:on + return userIdpBindPo; + } + + /** + * 判断查询结果集中是否存在某列 + * + * @param rs 查询结果集 + * @param columnName 列名 + * @return true 存在; false 不存在 + */ + private boolean isExistColumn(ResultSet rs, String columnName) { + try { + if (rs.findColumn(columnName) > 0) { + return true; + } + } catch (SQLException e) { + return false; + } + return false; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/mapper/UserPoMapper.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/mapper/UserPoMapper.java new file mode 100644 index 00000000..a4a120b7 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/account/impl/mapper/UserPoMapper.java @@ -0,0 +1,84 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.account.impl.mapper; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.jdbc.core.RowMapper; +import org.springframework.lang.NonNull; + +import cn.topiam.employee.common.entity.account.po.UserPO; +import cn.topiam.employee.common.enums.DataOrigin; +import cn.topiam.employee.common.enums.UserStatus; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 22:25 + */ +@SuppressWarnings("DuplicatedCode") +public class UserPoMapper implements RowMapper { + /** + * Implementations must implement this method to map each row of data + * in the ResultSet. This method should not call {@code next()} on + * the ResultSet; it is only supposed to map values of the current row. + * + * @param rs the ResultSet to map (pre-initialized for the current row) + * @param rowNum the number of the current row + * @return the result object for the current row (may be {@code null}) + * @throws SQLException if an SQLException is encountered getting + * column values (that is, there's no need to catch SQLException) + */ + @Override + public UserPO mapRow(@NonNull ResultSet rs, int rowNum) throws SQLException { + //@formatter:off + UserPO user = new UserPO(); + user.setId(rs.getLong("id_")); + user.setUsername(rs.getString("username_")); + user.setPassword(rs.getString("password_")); + user.setEmail(rs.getString("email_")); + user.setPhone(rs.getString("phone_")); + user.setPhoneAreaCode(rs.getString("phone_area_code")); + user.setFullName(rs.getString("full_name")); + user.setNickName(rs.getString("nick_name")); + user.setAvatar(rs.getString("avatar_")); + user.setStatus(UserStatus.getStatus(rs.getString("status_"))); + user.setDataOrigin(DataOrigin.getType(rs.getString("data_origin"))); + user.setEmailVerified(rs.getBoolean("email_verified")); + user.setPhoneVerified(rs.getBoolean("phone_verified")); + user.setSharedSecret(rs.getString("shared_secret")); + user.setTotpBind(rs.getBoolean("totp_bind")); + user.setAuthTotal(rs.getLong("auth_total")); + user.setLastAuthIp(rs.getString("last_auth_ip")); + user.setLastAuthTime(ObjectUtils.isNotEmpty(rs.getTimestamp("last_auth_time")) ? rs.getTimestamp("last_auth_time").toLocalDateTime() : null); + user.setExpand(rs.getString("expand_")); + user.setExternalId(rs.getString("external_id")); + user.setExpireDate(ObjectUtils.isNotEmpty(rs.getTimestamp("expire_date")) ? rs.getDate("expire_date").toLocalDate() : null); + user.setLastAuthTime(ObjectUtils.isNotEmpty(rs.getTimestamp("last_auth_time")) ? rs.getTimestamp("last_auth_time").toLocalDateTime() : null); + user.setOrgDisplayPath(rs.getString("org_display_path")); + //额外数据 + user.setCreateBy(rs.getString("create_by")); + user.setCreateTime(ObjectUtils.isNotEmpty(rs.getTimestamp("create_time")) ? rs.getTimestamp("create_time").toLocalDateTime() : null); + user.setUpdateBy(rs.getString("update_by")); + user.setUpdateTime(ObjectUtils.isNotEmpty(rs.getTimestamp("update_time")) ? rs.getTimestamp("update_time").toLocalDateTime() : null); + user.setRemark(rs.getString("remark_")); + //@formatter:on + return user; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppAccessPolicyRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppAccessPolicyRepository.java new file mode 100644 index 00000000..f184fd19 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppAccessPolicyRepository.java @@ -0,0 +1,57 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.app.AppAccessPolicyEntity; +import cn.topiam.employee.common.enums.PolicySubjectType; + +/** + * 应用授权策略 Repository + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 19:54 + */ +@Repository +public interface AppAccessPolicyRepository extends JpaRepository, + QuerydslPredicateExecutor, + AppAccessPolicyRepositoryCustomized { + /** + * 根据应用ID删除所有数据 + * + * @param appId {@link Long} + */ + void deleteAllByAppId(Long appId); + + /** + * 根据应用ID、主体ID,主体类型查询 + * + * @param appId {@link Long} + * @param subjectId {@link String} + * @param subjectType {@link PolicySubjectType} + * @return {@link AppAccessPolicyEntity} + */ + Optional findByAppIdAndSubjectIdAndSubjectType(Long appId, + String subjectId, + PolicySubjectType subjectType); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppAccessPolicyRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppAccessPolicyRepositoryCustomized.java new file mode 100644 index 00000000..99b8f19c --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppAccessPolicyRepositoryCustomized.java @@ -0,0 +1,43 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import cn.topiam.employee.common.entity.account.query.UserListQuery; +import cn.topiam.employee.common.entity.app.po.AppAccessPolicyPO; +import cn.topiam.employee.common.entity.app.query.AppAccessPolicyQuery; + +/** + * 应用访问策略 Repository Customized + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/26 23:40 + */ +public interface AppAccessPolicyRepositoryCustomized { + + /** + * 获取应用授权策略列表 + * + * @param pageable {@link Pageable} + * @param query {@link UserListQuery} + * @return {@link Page} + */ + Page getAppPolicyList(AppAccessPolicyQuery query, Pageable pageable); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppAccountRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppAccountRepository.java new file mode 100644 index 00000000..d712f088 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppAccountRepository.java @@ -0,0 +1,90 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import java.util.Optional; + +import org.jetbrains.annotations.NotNull; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.app.AppAccountEntity; +import static cn.topiam.employee.common.constants.ProtocolConstants.APP_ACCOUNT_CACHE_NAME; + +/** + * 应用账户 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/3 22:26 + */ +@Repository +@CacheConfig(cacheNames = { APP_ACCOUNT_CACHE_NAME }) +public interface AppAccountRepository extends JpaRepository, + QuerydslPredicateExecutor, + AppAccountRepositoryCustomized { + /** + * save + * + * @param entity must not be {@literal null}. + * @param {@link S} + * @return {@link AppAccountEntity} + */ + @NotNull + @Override + @CacheEvict(allEntries = true) + S save(@NotNull S entity); + + /** + * delete + * + * @param id must not be {@literal null}. + */ + @CacheEvict(allEntries = true) + @Override + void deleteById(@NotNull Long id); + + /** + * 根据应用ID,用户ID查询应用账户 + * + * @param appId {@link Long} + * @param userId {@link Long} + * @return {@link Optional} + */ + @Cacheable + Optional findByAppIdAndUserId(Long appId, Long userId); + + /** + * 根据appid删除所有的数据 + * + * @param appId {@link Long} + */ + @CacheEvict(allEntries = true) + void deleteAllByAppId(Long appId); + + /** + * 根据userId 删除用户数据 + * + * @param userId {@link Long} + */ + @CacheEvict(allEntries = true) + void deleteByUserId(Long userId); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppAccountRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppAccountRepositoryCustomized.java new file mode 100644 index 00000000..d3a26a62 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppAccountRepositoryCustomized.java @@ -0,0 +1,43 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import cn.topiam.employee.common.entity.account.query.UserListQuery; +import cn.topiam.employee.common.entity.app.po.AppAccountPO; +import cn.topiam.employee.common.entity.app.query.AppAccountQuery; + +/** + * 应用账户 Repository Customized + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/26 23:40 + */ +public interface AppAccountRepositoryCustomized { + + /** + * 获取应用账户列表 + * + * @param pageable {@link Pageable} + * @param query {@link UserListQuery} + * @return {@link Page} + */ + Page getAppAccountList(AppAccountQuery query, Pageable pageable); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppCertRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppCertRepository.java new file mode 100644 index 00000000..2d489bef --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppCertRepository.java @@ -0,0 +1,92 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import java.util.Optional; + +import org.jetbrains.annotations.NotNull; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; + +import cn.topiam.employee.common.entity.app.AppCertEntity; +import cn.topiam.employee.common.entity.app.AppOidcConfigEntity; +import cn.topiam.employee.common.enums.app.AppCertUsingType; +import static cn.topiam.employee.common.constants.ProtocolConstants.APP_CERT_CACHE_NAME; + +/** + * AppCertificateRepository + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 20:52 + */ +@CacheConfig(cacheNames = { APP_CERT_CACHE_NAME }) +public interface AppCertRepository extends JpaRepository, + QuerydslPredicateExecutor { + /** + * 根据应用ID查询证书 + * + * @param appId {@link Long} + * @param usingType {@link AppCertUsingType} + * @return {@link AppCertEntity} + */ + @Cacheable(key = "#p1.code+':'+#p0", unless = "#result==null") + Optional findByAppIdAndUsingType(Long appId, AppCertUsingType usingType); + + /** + * save + * + * @param entity must not be {@literal null}. + * @param {@link S} + * @return {@link AppCertEntity} + */ + @NotNull + @Override + @CacheEvict(allEntries = true) + S save(@NotNull S entity); + + /** + * delete + * + * @param id must not be {@literal null}. + */ + @CacheEvict(allEntries = true) + @Override + void deleteById(@NotNull Long id); + + /** + * 根据应用ID删除应用 + * + * @param appId {@link Long} + */ + @CacheEvict(allEntries = true) + void deleteByAppId(Long appId); + + /** + * find by id + * + * @param id must not be {@literal null}. + * @return {@link AppOidcConfigEntity} + */ + @NotNull + @Override + @Cacheable + Optional findById(@NotNull Long id); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppOidcConfigRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppOidcConfigRepository.java new file mode 100644 index 00000000..7d1a278d --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppOidcConfigRepository.java @@ -0,0 +1,76 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import java.util.Optional; + +import org.jetbrains.annotations.NotNull; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.app.AppOidcConfigEntity; +import static cn.topiam.employee.common.constants.ProtocolConstants.OIDC_CONFIG_CACHE_NAME; + +/** + * @author TopIAM + */ +@Repository +@CacheConfig(cacheNames = { OIDC_CONFIG_CACHE_NAME }) +public interface AppOidcConfigRepository extends JpaRepository, + QuerydslPredicateExecutor, + AppOidcConfigRepositoryCustomized { + /** + * 按应用 ID 删除 + * + * @param appId {@link Long} + */ + @CacheEvict(allEntries = true) + void deleteByAppId(Long appId); + + /** + * delete + * + * @param id must not be {@literal null}. + */ + @CacheEvict(allEntries = true) + @Override + void deleteById(@NotNull Long id); + + /** + * save + * + * @param entity must not be {@literal null}. + * @param {@link S} + * @return {@link AppOidcConfigEntity} + */ + @NotNull + @Override + @CacheEvict(allEntries = true) + S save(@NotNull S entity); + + /** + * 根据应用ID获取配置 + * + * @param appId {@link Long} + * @return {@link AppOidcConfigEntity} + */ + Optional findByAppId(Long appId); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppOidcConfigRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppOidcConfigRepositoryCustomized.java new file mode 100644 index 00000000..70718744 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppOidcConfigRepositoryCustomized.java @@ -0,0 +1,50 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import cn.topiam.employee.common.entity.app.po.AppOidcConfigPO; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/10 22:32 + */ +public interface AppOidcConfigRepositoryCustomized { + /** + * 根据应用ID获取 + * + * @param appId {@link Long} + * @return {@link AppOidcConfigPO} + */ + AppOidcConfigPO getByAppId(Long appId); + + /** + * 根据应用 Client 获取 + * + * @param clientId {@link String} + * @return {@link AppOidcConfigPO} + */ + AppOidcConfigPO getByClientId(String clientId); + + /** + * 根据应用编码查询应用配置 + * + * @param appCode {@link String} + * @return {@link AppOidcConfigPO} + */ + AppOidcConfigPO findByAppCode(String appCode); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionActionRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionActionRepository.java new file mode 100644 index 00000000..740d2ed2 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionActionRepository.java @@ -0,0 +1,46 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import java.util.List; + +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.app.AppPermissionActionEntity; +import cn.topiam.employee.common.entity.app.AppPermissionResourceEntity; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/22 23:06 + */ +@Repository +public interface AppPermissionActionRepository extends + CrudRepository, + PagingAndSortingRepository, + QuerydslPredicateExecutor { + /** + * findAllByResource + * + * @param resource {@link AppPermissionResourceEntity} + * @return {@link List} + */ + List findAllByResource(AppPermissionResourceEntity resource); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionPolicyRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionPolicyRepository.java new file mode 100644 index 00000000..fa684653 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionPolicyRepository.java @@ -0,0 +1,75 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import java.io.Serializable; +import java.util.Collection; + +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.app.AppPermissionPolicyEntity; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/4 22:44 + */ +@Repository +public interface AppPermissionPolicyRepository extends AppPermissionPolicyRepositoryCustomized, + CrudRepository, + PagingAndSortingRepository, + QuerydslPredicateExecutor { + /** + * 按主体 ID 删除所有 + * + * @param subjectIds {@link String} + */ + void deleteAllBySubjectIdIn(Collection subjectIds); + + /** + * 按客体 ID 删除所有 + * + * @param objectIds {@link String} + */ + void deleteAllByObjectIdIn(Collection objectIds); + + /** + * 根据主体删除所有 + * + * @param objectId + */ + void deleteAllByObjectId(Long objectId); + + /** + * 更新启用/禁用 + * + * @param id {@link Serializable} + * @param status {@link Boolean} + * @return {@link Integer} + */ + @Transactional(rollbackFor = Exception.class) + @Modifying + @Query(value = "UPDATE AppPermissionResourceEntity set enabled =:status WHERE id =:id") + Integer updateStatus(@Param(value = "id") Long id, @Param(value = "status") Boolean status); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionPolicyRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionPolicyRepositoryCustomized.java new file mode 100644 index 00000000..974661a7 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionPolicyRepositoryCustomized.java @@ -0,0 +1,39 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import cn.topiam.employee.common.entity.app.po.AppPermissionPolicyPO; +import cn.topiam.employee.common.entity.app.query.AppPolicyQuery; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/4 22:44 + */ +public interface AppPermissionPolicyRepositoryCustomized { + /** + * 分页查询权限策略 + * + * @param query {@link AppPolicyQuery} + * @param request {@link Pageable} + * @return {@link AppPermissionPolicyPO} + */ + Page findPage(AppPolicyQuery query, Pageable request); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionResourceRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionResourceRepository.java new file mode 100644 index 00000000..0817df81 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionResourceRepository.java @@ -0,0 +1,43 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.app.AppPermissionResourceEntity; +import cn.topiam.employee.common.repository.authorization.ResourceRepositoryCustomized; + +/** + *

+ * 资源权限 Repository 接口 SystemRepositoryCustomized + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-10 + */ +@Repository +public interface AppPermissionResourceRepository extends + CrudRepository, + ResourceRepositoryCustomized, + PagingAndSortingRepository, + QuerydslPredicateExecutor { + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionRoleRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionRoleRepository.java new file mode 100644 index 00000000..e5ab1a5e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppPermissionRoleRepository.java @@ -0,0 +1,55 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.app.AppPermissionRoleEntity; +import cn.topiam.employee.common.repository.authorization.RoleRepositoryCustomized; + +/** + *

+ * 角色表 Repository 接口 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-10 + */ +@Repository +public interface AppPermissionRoleRepository extends CrudRepository, + RoleRepositoryCustomized, + PagingAndSortingRepository, + QuerydslPredicateExecutor { + /** + * 更新角色状态 + * + * @param id {@link String} + * @param enabled {@link String} + */ + @Transactional(rollbackFor = Exception.class) + @Modifying + @Query(value = "update app_permission_role set is_enabled = ?2 where id_ = ?1", nativeQuery = true) + void updateStatus(@Param(value = "id") String id, @Param(value = "enabled") Boolean enabled); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppRepository.java new file mode 100644 index 00000000..733bec8a --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppRepository.java @@ -0,0 +1,99 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import java.util.Optional; + +import org.jetbrains.annotations.NotNull; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.app.AppEntity; +import static cn.topiam.employee.common.constants.AppConstants.APP_CACHE_NAME; + +/** + * @author TopIAM + */ +@Repository +@CacheConfig(cacheNames = { APP_CACHE_NAME }) +public interface AppRepository extends JpaRepository, + QuerydslPredicateExecutor, AppRepositoryCustomized { + /** + * 根据应用ID查询已启用应用 + * + * @param id {@link Long} + * @return {@link AppEntity} + */ + @Cacheable + Optional findByIdAndEnabledTrue(Long id); + + /** + * save + * + * @param entity must not be {@literal null}. + * @param {@link S} + * @return {@link AppEntity} + */ + @NotNull + @Override + @CacheEvict(allEntries = true) + S save(@NotNull S entity); + + /** + * delete + * + * @param id must not be {@literal null}. + */ + @Override + @CacheEvict(allEntries = true) + void deleteById(@NotNull Long id); + + /** + * find by id + * + * @param id must not be {@literal null}. + * @return {@link AppEntity} + */ + @NotNull + @Override + @Cacheable + Optional findById(@NotNull Long id); + + /** + * 根据clientId获取配置 + * + * @param clientId {@link String} + * @return {@link AppEntity} + */ + @Cacheable + AppEntity findByClientId(String clientId); + + /** + * findByCode + * + * @param appCode {@link String} + * @return {@link AppEntity} + */ + @NotNull + @Cacheable + Optional findByCode(String appCode); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppRepositoryCustomized.java new file mode 100644 index 00000000..fa47ff2f --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppRepositoryCustomized.java @@ -0,0 +1,56 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.repository.query.Param; + +import cn.topiam.employee.common.entity.app.AppEntity; + +/** + * 应用 Repository Customized + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/26 23:40 + */ +public interface AppRepositoryCustomized { + + /** + * 更新应用状态 + * + * @param id {@link Long} + * @param enabled {@link Boolean} + * @return {@link Boolean} + */ + Integer updateAppStatus(@Param(value = "id") Long id, + @Param(value = "enabled") Boolean enabled); + + /** + * + * 获取我的应用列表 + * + * @param name {@link String} + * @param userId {@link Long} + * @param pageable {@link Pageable} + * @return {@link List} + */ + Page getAppList(Long userId, String name, Pageable pageable); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppSaml2ConfigRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppSaml2ConfigRepository.java new file mode 100644 index 00000000..03aaec12 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppSaml2ConfigRepository.java @@ -0,0 +1,76 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import java.util.Optional; + +import org.jetbrains.annotations.NotNull; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.app.AppSaml2ConfigEntity; +import static cn.topiam.employee.common.constants.ProtocolConstants.SAML2_CONFIG_CACHE_NAME; + +/** + * @author TopIAM + */ +@Repository +@CacheConfig(cacheNames = { SAML2_CONFIG_CACHE_NAME }) +public interface AppSaml2ConfigRepository extends JpaRepository, + QuerydslPredicateExecutor, + AppSaml2ConfigRepositoryCustomized { + /** + * 按应用 ID 删除 + * + * @param appId {@link Long} + */ + @CacheEvict(allEntries = true) + void deleteByAppId(Long appId); + + /** + * delete + * + * @param id must not be {@literal null}. + */ + @CacheEvict(allEntries = true) + @Override + void deleteById(@NotNull Long id); + + /** + * save + * + * @param entity must not be {@literal null}. + * @param {@link S} + * @return {@link AppSaml2ConfigEntity} + */ + @NotNull + @Override + @CacheEvict(allEntries = true) + S save(@NotNull S entity); + + /** + * 根据应用ID获取配置 + * + * @param id {@link Long} + * @return {@link AppSaml2ConfigEntity} + */ + Optional findByAppId(Long id); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppSaml2ConfigRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppSaml2ConfigRepositoryCustomized.java new file mode 100644 index 00000000..49476277 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/AppSaml2ConfigRepositoryCustomized.java @@ -0,0 +1,42 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; + +import cn.topiam.employee.common.entity.app.po.AppSaml2ConfigPO; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/10 22:32 + */ +public interface AppSaml2ConfigRepositoryCustomized { + /** + * 根据应用ID获取 + * + * @param appId {@link Long} + * @return {@link AppSaml2ConfigPO} + */ + AppSaml2ConfigPO getByAppId(Long appId); + + /** + * 根据应用code获取应用 + * + * @param appCode {@link String} + * @return {@link AppSaml2ConfigPO} + */ + AppSaml2ConfigPO findByAppCode(String appCode); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppAccessPolicyRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppAccessPolicyRepositoryCustomizedImpl.java new file mode 100644 index 00000000..100827c4 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppAccessPolicyRepositoryCustomizedImpl.java @@ -0,0 +1,97 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl; + +import java.util.List; + +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.Pageable; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.account.query.UserListQuery; +import cn.topiam.employee.common.entity.app.po.AppAccessPolicyPO; +import cn.topiam.employee.common.entity.app.query.AppAccessPolicyQuery; +import cn.topiam.employee.common.repository.app.AppAccessPolicyRepositoryCustomized; +import cn.topiam.employee.common.repository.app.impl.mapper.AppAccessPolicyPoMapper; + +import lombok.AllArgsConstructor; + +/** + * AppPolicy Repository Customized + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 20:27 + */ +@Repository +@AllArgsConstructor +public class AppAccessPolicyRepositoryCustomizedImpl implements + AppAccessPolicyRepositoryCustomized { + + /** + * 获取应用授权策略列表 + * + * @param pageable {@link Pageable} + * @param query {@link UserListQuery} + * @return {@link Page} + */ + @Override + public Page getAppPolicyList(AppAccessPolicyQuery query, Pageable pageable) { + //@formatter:off + StringBuilder builder = new StringBuilder("SELECT a.id_,a.app_id,a.subject_id,a.subject_type,a.create_time,`subject`.name_,app.name_ as app_name,app.type_ as app_type,app.template_ as app_template,app.protocol_ as app_protocol FROM app_access_policy a LEFT JOIN app ON a.app_id = app.id_ LEFT JOIN "); + builder.append("(SELECT id_,name_ FROM user_group UNION ALL SELECT id_,name_ FROM organization UNION ALL SELECT id_,username_ as name_ FROM `user`) `subject` ON a.subject_id = `subject`.id_ WHERE 1=1"); + if (ObjectUtils.isNotEmpty(query.getSubjectType())) { + builder.append(" AND a.subject_type = '").append(query.getSubjectType().getCode()).append("'"); + } + //主体名称 + if (StringUtils.isNotEmpty(query.getSubjectName())) { + builder.append(" AND subject.name_ like '%").append(query.getSubjectName()).append("%'"); + } + //主体ID + if (StringUtils.isNotBlank(query.getSubjectId())) { + builder.append(" AND a.subject_id = '").append(query.getSubjectId()).append("'"); + } + //应用ID + if (StringUtils.isNotEmpty(query.getAppId())) { + builder.append(" AND a.app_id = '").append(query.getAppId()).append("'"); + } + //应用名称 + if (StringUtils.isNotBlank(query.getAppName())) { + builder.append(" AND app.name_ like '%").append(query.getAppName()).append("'"); + } + //@formatter:on + String sql = builder.toString(); + List list = jdbcTemplate.query( + builder.append(" LIMIT ").append(pageable.getPageNumber() * pageable.getPageSize()) + .append(",").append(pageable.getPageSize()).toString(), + new AppAccessPolicyPoMapper()); + //@formatter:off + String countSql = "SELECT count(*) FROM (" + sql + ") app_access_policy_"; + //@formatter:on + Integer count = jdbcTemplate.queryForObject(countSql, Integer.class); + return new PageImpl<>(list, pageable, count); + } + + /** + * JdbcTemplate + */ + private final JdbcTemplate jdbcTemplate; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppAccountRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppAccountRepositoryCustomizedImpl.java new file mode 100644 index 00000000..20987bb3 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppAccountRepositoryCustomizedImpl.java @@ -0,0 +1,98 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl; + +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.Pageable; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.account.query.UserListQuery; +import cn.topiam.employee.common.entity.app.po.AppAccountPO; +import cn.topiam.employee.common.entity.app.query.AppAccountQuery; +import cn.topiam.employee.common.repository.app.AppAccountRepositoryCustomized; +import cn.topiam.employee.common.repository.app.impl.mapper.AppAccountPoMapper; + +import lombok.AllArgsConstructor; + +/** + * AppAccount Repository Customized + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 20:27 + */ +@Repository +@AllArgsConstructor +public class AppAccountRepositoryCustomizedImpl implements AppAccountRepositoryCustomized { + + /** + * 获取应用账户列表 + * + * @param pageable {@link Pageable} + * @param query {@link UserListQuery} + * @return {@link Page} + */ + @Override + public Page getAppAccountList(AppAccountQuery query, Pageable pageable) { + //@formatter:off + StringBuilder builder = new StringBuilder("SELECT a.id_,a.app_id,a.user_id,a.account_,a.create_time,u.username_,p.name_ as app_name,p.type_ as app_type,p.template_ as app_template,p.protocol_ as app_protocol FROM app_account a LEFT JOIN `user` u ON a.user_id = u.id_ LEFT JOIN app p ON a.app_id = p.id_ WHERE 1=1"); + //用户名 + if (StringUtils.isNoneBlank(query.getUsername())) { + builder.append(" AND u.username_ like '%").append(query.getUsername()).append("%'"); + } + //用户ID + if (StringUtils.isNoneBlank(query.getUserId())) { + builder.append(" AND u.id_ = '").append(query.getUserId()).append("%'"); + } + //账户名称 + if (StringUtils.isNoneBlank(query.getAccount())) { + builder.append(" AND a.account_ like '%").append(query.getAccount()).append("%'"); + } + + //应用id + if (StringUtils.isNoneBlank(query.getAppId())) { + builder.append(" AND a.app_id = '").append(query.getAppId()).append("%'"); + } + + //应用名称 + if(StringUtils.isNotBlank(query.getAppName())){ + builder.append(" AND p.name_ like '%").append(query.getAppName()).append("%'"); + } + //@formatter:on + String sql = builder.toString(); + List list = jdbcTemplate + .query( + builder.append(" LIMIT ").append(pageable.getPageNumber() * pageable.getPageSize()) + .append(",").append(pageable.getPageSize()).toString(), + new AppAccountPoMapper()); + //@formatter:off + String countSql = "SELECT count(*) FROM (" + sql + ") app_account_"; + //@formatter:on + Integer count = jdbcTemplate.queryForObject(countSql, Integer.class); + return new PageImpl<>(list, pageable, count); + } + + /** + * JdbcTemplate + */ + private final JdbcTemplate jdbcTemplate; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppOidcConfigRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppOidcConfigRepositoryCustomizedImpl.java new file mode 100644 index 00000000..a53eb3f6 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppOidcConfigRepositoryCustomizedImpl.java @@ -0,0 +1,95 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl; + +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.dao.EmptyResultDataAccessException; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.app.po.AppOidcConfigPO; +import cn.topiam.employee.common.repository.app.AppOidcConfigRepositoryCustomized; +import cn.topiam.employee.common.repository.app.impl.mapper.AppOidcConfigPoMapper; + +import lombok.AllArgsConstructor; +import static cn.topiam.employee.common.constants.ProtocolConstants.OIDC_CONFIG_CACHE_NAME; + +/** + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/23 20:51 + */ +@Repository +@AllArgsConstructor +@CacheConfig(cacheNames = { OIDC_CONFIG_CACHE_NAME }) +public class AppOidcConfigRepositoryCustomizedImpl implements AppOidcConfigRepositoryCustomized { + private final String SELECT_SQL = "SELECT aoc.*,app.init_login_url,app.init_login_type,app.authorization_type,app.template_,app.code_,app.is_enabled,app.client_id,app.client_secret from app left join app_oidc_config aoc on app.id_ = aoc.app_id where 1=1"; + + /** + * 根据应用ID获取 + * + * @param appId {@link Long} + * @return {@link AppOidcConfigPO} + */ + @Override + @Cacheable(key = "#p0", unless = "#result==null") + public AppOidcConfigPO getByAppId(Long appId) { + //@formatter:off + String sql =SELECT_SQL+ " AND app_id = " + appId; + //@formatter:on + return jdbcTemplate.queryForObject(sql, new AppOidcConfigPoMapper()); + } + + @Override + @Cacheable(key = "#p0", unless = "#result==null") + public AppOidcConfigPO getByClientId(String clientId) { + //@formatter:off + try { + String sql = SELECT_SQL+ " AND app.client_id = " + "'"+clientId+"'"; + return jdbcTemplate.queryForObject(sql, new AppOidcConfigPoMapper()); + } catch (EmptyResultDataAccessException e){ + return null; + } + //@formatter:on + } + + /** + * 根据应用编码查询应用配置 + * + * @param appCode {@link String} + * @return {@link AppOidcConfigPO} + */ + @Override + @Cacheable(key = "#p0", unless = "#result==null") + public AppOidcConfigPO findByAppCode(String appCode) { + //@formatter:off + String sql = SELECT_SQL + " AND app.code_ = " + "'"+appCode+"'"; + //@formatter:on + try { + return jdbcTemplate.queryForObject(sql, new AppOidcConfigPoMapper()); + } catch (EmptyResultDataAccessException e) { + return null; + } + } + + /** + * JdbcTemplate + */ + private final JdbcTemplate jdbcTemplate; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppPermissionPolicyRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppPermissionPolicyRepositoryCustomizedImpl.java new file mode 100644 index 00000000..dc91773e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppPermissionPolicyRepositoryCustomizedImpl.java @@ -0,0 +1,130 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.Pageable; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; +import org.springframework.util.ObjectUtils; + +import com.google.common.collect.Lists; + +import cn.topiam.employee.common.entity.app.po.AppPermissionPolicyPO; +import cn.topiam.employee.common.entity.app.query.AppPolicyQuery; +import cn.topiam.employee.common.repository.app.AppPermissionPolicyRepositoryCustomized; +import cn.topiam.employee.common.repository.app.impl.mapper.AppPermissionPolicyPoMapper; + +import lombok.RequiredArgsConstructor; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/4 22:46 + */ +@Repository +@RequiredArgsConstructor +public class AppPermissionPolicyRepositoryCustomizedImpl implements + AppPermissionPolicyRepositoryCustomized { + + private String leftJoin(String table, String condition) { + return " LEFT JOIN " + table + " ON " + condition; + } + + @Override + public Page findPage(AppPolicyQuery query, Pageable pageable) { + //查询条件 + //@formatter:off + // 所属应用 + StringBuilder where = new StringBuilder("WHERE policy.app_id = '").append(query.getAppId()).append("' "); + // 主体类型 + where.append(" AND policy.subject_type = '").append(query.getSubjectType().getCode()).append("' "); + // 客体类型 + where.append(" AND policy.object_type = '").append(query.getObjectType().getCode()).append("' "); + // 主体id + if (!ObjectUtils.isEmpty(query.getSubjectId())) { + where.append("policy.subject_id = '").append(query.getSubjectId()).append("' "); + } + // 客体id + if (!ObjectUtils.isEmpty(query.getObjectId())) { + where.append("policy.object_id = '").append(query.getObjectId()).append("' "); + } + // 授权效果 + if (!ObjectUtils.isEmpty(query.getEffect())) { + where.append("policy.effect = '").append(query.getEffect().getCode()).append("' "); + } + + List fields = Lists.newArrayList("policy.subject_id", "policy.object_id", "policy.subject_type", "policy.object_type", "policy.id", "policy.effect"); + String subjectJoin; + String objectJoin = null; + switch (query.getSubjectType()) { + case USER -> { + subjectJoin = leftJoin("app_account account", "policy.subject_id = account.id"); + fields.add("account.account as subject_name"); + } + case USER_GROUP -> { + subjectJoin = leftJoin("user_group group", "policy.subject_id = group.id"); + fields.add("group.name as subject_name"); + } + case ORGANIZATION -> { + subjectJoin = leftJoin("organization org", "policy.subject_id = org.id"); + fields.add("org.name as subject_name"); + } + case ROLE -> { + subjectJoin = leftJoin("app_permission_role role", "policy.subject_id = role.id"); + fields.add("role.name as subject_name"); + } + default -> throw new RuntimeException("暂不支持"); + } + switch (query.getObjectType()) { + case PERMISSION -> { + objectJoin = leftJoin("app_permission_action action", "policy.subject_id = action.id"); + fields.add("action.name as object_name"); + } + case ROLE -> { + objectJoin = leftJoin("app_permission_role role2", "policy.subject_id = role2.id"); + fields.add("role2.name as object_name"); + } + case RESOURCE -> { + objectJoin = leftJoin("app_permission_resource resource", "policy.subject_id = resource.id"); + fields.add("resource.name as object_name"); + } + } + StringBuilder selectSql = new StringBuilder("SELECT ").append(String.join(", ", fields)) + .append(" FROM app_permission_policy policy ").append(subjectJoin).append(objectJoin); + + // @formatter:off + List list = jdbcTemplate + .query( + selectSql.append(" LIMIT ").append(pageable.getPageNumber() * pageable.getPageSize()) + .append(",").append(pageable.getPageSize()).toString(), + new AppPermissionPolicyPoMapper()); + //@formatter:off + String countSql = "SELECT count(*) FROM (" + selectSql + ") app_policy_"; + //@formatter:on + Integer count = jdbcTemplate.queryForObject(countSql, Integer.class); + return new PageImpl<>(list, pageable, count); + } + + /** + * JdbcTemplate + */ + private final JdbcTemplate jdbcTemplate; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppRepositoryCustomizedImpl.java new file mode 100644 index 00000000..2831ffa0 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppRepositoryCustomizedImpl.java @@ -0,0 +1,131 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.Pageable; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import com.google.common.collect.Lists; + +import cn.topiam.employee.common.entity.account.OrganizationMemberEntity; +import cn.topiam.employee.common.entity.account.UserGroupMemberEntity; +import cn.topiam.employee.common.entity.app.AppEntity; +import cn.topiam.employee.common.repository.account.OrganizationMemberRepository; +import cn.topiam.employee.common.repository.account.UserGroupMemberRepository; +import cn.topiam.employee.common.repository.app.AppRepositoryCustomized; +import cn.topiam.employee.common.repository.app.impl.mapper.AppEntityMapper; + +import lombok.AllArgsConstructor; + +/** + * App Repository Customized + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 20:27 + */ +@Repository +@AllArgsConstructor +public class AppRepositoryCustomizedImpl implements AppRepositoryCustomized { + + /** + * 更新应用状态 + * + * @param id {@link Long} + * @param enabled {@link Boolean} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Integer updateAppStatus(Long id, Boolean enabled) { + StringBuilder builder = new StringBuilder("UPDATE app SET is_enabled=?where id_=?"); + //@formatter:on + return jdbcTemplate.queryForObject(builder.toString(), Integer.class, enabled, id); + } + + /** + * 获取我的应用列表 + * + * @param name {@link String} + * @param userId {@link Long} + * @param pageable {@link String} + * @return {@link List} + */ + @Override + public Page getAppList(Long userId, String name, Pageable pageable) { + List paramList = Lists.newArrayList(); + //当前用户加入的用户组Id + List groupIdList = userGroupMemberRepository.findByUserId(userId).stream() + .map(UserGroupMemberEntity::getGroupId).toList(); + //当前用户加入的组织id + List orgId = organizationMemberRepository.findAllByUserId(userId).stream() + .map(OrganizationMemberEntity::getOrgId).toList(); + paramList.addAll(groupIdList); + paramList.addAll(orgId); + paramList.add(userId); + Map paramMap = new HashMap<>(16); + paramMap.put("subjectIds", paramList); + //@formatter:off + StringBuilder builder = new StringBuilder("SELECT distinct app.* from app LEFT JOIN app_access_policy app_acce ON app.id_ = app_acce.app_id WHERE app_acce.subject_id in (:subjectIds) "); + //用户名 + if (StringUtils.isNoneBlank(name)) { + builder.append(" AND app.name_ like '%").append(name).append("%'"); + } + //@formatter:on + String sql = builder.toString(); + List list = namedParameterJdbcTemplate.query( + builder.append(" LIMIT ").append(pageable.getPageNumber() * pageable.getPageSize()) + .append(",").append(pageable.getPageSize()).toString(), + paramMap, new AppEntityMapper()); + //@formatter:off + String countSql = "SELECT count(*) FROM (" + sql + ") app_account_"; + //@formatter:on + Integer count = namedParameterJdbcTemplate.queryForObject(countSql, paramMap, + Integer.class); + return new PageImpl<>(list, pageable, count); + } + + /** + * JdbcTemplate + */ + private final JdbcTemplate jdbcTemplate; + + /** + * NamedParameterJdbcTemplate + */ + private final NamedParameterJdbcTemplate namedParameterJdbcTemplate; + + /** + * UserGroupMemberRepository + */ + private final UserGroupMemberRepository userGroupMemberRepository; + + /** + * OrganizationMemberRepository + */ + private final OrganizationMemberRepository organizationMemberRepository; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppSaml2ConfigRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppSaml2ConfigRepositoryCustomizedImpl.java new file mode 100644 index 00000000..2e9355cf --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppSaml2ConfigRepositoryCustomizedImpl.java @@ -0,0 +1,71 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl; + +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.constants.ProtocolConstants; +import cn.topiam.employee.common.entity.app.po.AppSaml2ConfigPO; +import cn.topiam.employee.common.repository.app.AppSaml2ConfigRepositoryCustomized; +import cn.topiam.employee.common.repository.app.impl.mapper.AppSaml2ConfigPoMapper; + +import lombok.AllArgsConstructor; + +/** + * + * @author TopIAM + * Created by support@topiam.cn on 2022/8/23 20:51 + */ +@Repository +@AllArgsConstructor +@CacheConfig(cacheNames = { ProtocolConstants.SAML2_CONFIG_CACHE_NAME }) +public class AppSaml2ConfigRepositoryCustomizedImpl implements AppSaml2ConfigRepositoryCustomized { + /** + * 根据应用ID获取 + * + * @param appId {@link Long} + * @return {@link AppSaml2ConfigPO} + */ + @Override + @Cacheable(key = "#p0", unless = "#result==null") + public AppSaml2ConfigPO getByAppId(Long appId) { + //@formatter:off + String sql = "select as2c.*,app.init_login_url,app.init_login_type,app.authorization_type,app.template_,app.code_,client_id,client_secret from app left join app_saml2_config as2c on app.id_ = as2c.app_id where 1=1" + + " AND app_id = " + appId; + //@formatter:on + return jdbcTemplate.queryForObject(sql, new AppSaml2ConfigPoMapper()); + } + + @Override + @Cacheable(key = "#p0", unless = "#result==null") + public AppSaml2ConfigPO findByAppCode(String appCode) { + //@formatter:off + String sql = "select as2c.*,app.init_login_url,app.init_login_type,app.authorization_type,app.template_,app.code_,client_id,client_secret from app left join app_saml2_config as2c on app.id_ = as2c.app_id where 1=1" + + " AND code_ = " + "'"+appCode+"'"; + //@formatter:on + return jdbcTemplate.queryForObject(sql, new AppSaml2ConfigPoMapper()); + } + + /** + * JdbcTemplate + */ + private final JdbcTemplate jdbcTemplate; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/ResourceRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/ResourceRepositoryCustomizedImpl.java new file mode 100644 index 00000000..f8676754 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/ResourceRepositoryCustomizedImpl.java @@ -0,0 +1,38 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl; + +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.repository.authorization.ResourceRepositoryCustomized; + +import lombok.AllArgsConstructor; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/10 22:08 + */ +@Repository +@AllArgsConstructor +public class ResourceRepositoryCustomizedImpl implements ResourceRepositoryCustomized { + /** + * JdbcTemplate + */ + private final JdbcTemplate jdbcTemplate; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/RoleRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/RoleRepositoryCustomizedImpl.java new file mode 100644 index 00000000..965d2c07 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/RoleRepositoryCustomizedImpl.java @@ -0,0 +1,40 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl; + +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.repository.authorization.RoleRepositoryCustomized; + +import lombok.AllArgsConstructor; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/10 22:08 + */ +@Repository +@AllArgsConstructor +public class RoleRepositoryCustomizedImpl implements RoleRepositoryCustomized { + + /** + * JdbcTemplate + */ + private final JdbcTemplate jdbcTemplate; + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppAccessPolicyPoMapper.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppAccessPolicyPoMapper.java new file mode 100644 index 00000000..43d74baf --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppAccessPolicyPoMapper.java @@ -0,0 +1,64 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl.mapper; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.time.LocalDateTime; + +import org.springframework.jdbc.core.RowMapper; + +import cn.topiam.employee.common.entity.app.po.AppAccessPolicyPO; +import cn.topiam.employee.common.enums.PolicySubjectType; +import cn.topiam.employee.common.enums.app.AppProtocol; +import cn.topiam.employee.common.enums.app.AppType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 22:25 + */ +public class AppAccessPolicyPoMapper implements RowMapper { + + /** + * Implementations must implement this method to map each row of data + * in the ResultSet. This method should not call {@code next()} on + * the ResultSet; it is only supposed to map values of the current row. + * + * @param rs the ResultSet to map (pre-initialized for the current row) + * @param rowNum the number of the current row + * @return the result object for the current row (may be {@code null}) + * @throws SQLException if an SQLException is encountered getting + * column values (that is, there's no need to catch SQLException) + */ + @SuppressWarnings("DuplicatedCode") + @Override + public AppAccessPolicyPO mapRow(ResultSet rs, int rowNum) throws SQLException { + AppAccessPolicyPO appAccount = new AppAccessPolicyPO(); + appAccount.setId(rs.getLong("id_")); + appAccount.setAppId(rs.getLong("app_id")); + appAccount.setSubjectId(rs.getString("subject_id")); + appAccount.setSubjectType(PolicySubjectType.getType(rs.getString("subject_type"))); + appAccount.setSubjectName(rs.getString("name_")); + appAccount.setCreateTime(rs.getObject("create_time", LocalDateTime.class)); + appAccount.setAppName(rs.getString("app_name")); + appAccount.setAppType(AppType.getType(rs.getString("app_type"))); + appAccount.setAppTemplate(rs.getString("app_template")); + appAccount.setAppProtocol(AppProtocol.getType(rs.getString("app_protocol"))); + return appAccount; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppAccountPoMapper.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppAccountPoMapper.java new file mode 100644 index 00000000..2b5f2546 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppAccountPoMapper.java @@ -0,0 +1,62 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl.mapper; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.time.LocalDateTime; + +import org.springframework.jdbc.core.RowMapper; + +import cn.topiam.employee.common.entity.app.po.AppAccountPO; +import cn.topiam.employee.common.enums.app.AppProtocol; +import cn.topiam.employee.common.enums.app.AppType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 22:25 + */ +public class AppAccountPoMapper implements RowMapper { + + /** + * Implementations must implement this method to map each row of data + * in the ResultSet. This method should not call {@code next()} on + * the ResultSet; it is only supposed to map values of the current row. + * + * @param rs the ResultSet to map (pre-initialized for the current row) + * @param rowNum the number of the current row + * @return the result object for the current row (may be {@code null}) + * @throws SQLException if an SQLException is encountered getting + * column values (that is, there's no need to catch SQLException) + */ + @Override + public AppAccountPO mapRow(ResultSet rs, int rowNum) throws SQLException { + AppAccountPO appAccount = new AppAccountPO(); + appAccount.setId(rs.getLong("id_")); + appAccount.setAppId(rs.getLong("app_id")); + appAccount.setUserId(rs.getLong("user_id")); + appAccount.setAccount(rs.getString("account_")); + appAccount.setUsername(rs.getString("username_")); + appAccount.setCreateTime(rs.getObject("create_time", LocalDateTime.class)); + appAccount.setAppName(rs.getString("app_name")); + appAccount.setAppType(AppType.getType(rs.getString("app_type"))); + appAccount.setAppTemplate(rs.getString("app_template")); + appAccount.setAppProtocol(AppProtocol.getType(rs.getString("app_protocol"))); + return appAccount; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppEntityMapper.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppEntityMapper.java new file mode 100644 index 00000000..073e3712 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppEntityMapper.java @@ -0,0 +1,68 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl.mapper; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.springframework.jdbc.core.RowMapper; + +import cn.topiam.employee.common.entity.app.AppEntity; +import cn.topiam.employee.common.enums.app.AppProtocol; +import cn.topiam.employee.common.enums.app.AppType; +import cn.topiam.employee.common.enums.app.AuthorizationType; +import cn.topiam.employee.common.enums.app.InitLoginType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 22:25 + */ +public class AppEntityMapper implements RowMapper { + + /** + * Implementations must implement this method to map each row of data + * in the ResultSet. This method should not call {@code next()} on + * the ResultSet; it is only supposed to map values of the current row. + * + * @param rs the ResultSet to map (pre-initialized for the current row) + * @param rowNum the number of the current row + * @return the result object for the current row (may be {@code null}) + * @throws SQLException if an SQLException is encountered getting + * column values (that is, there's no need to catch SQLException) + */ + @Override + public AppEntity mapRow(ResultSet rs, int rowNum) throws SQLException { + AppEntity appEntity = new AppEntity(); + appEntity.setId(rs.getLong("id_")); + appEntity.setCode(rs.getString("code_")); + appEntity.setName(rs.getString("name_")); + appEntity.setClientId(rs.getString("client_id")); + appEntity.setClientSecret(rs.getString("client_secret")); + appEntity.setTemplate(rs.getString("template_")); + appEntity.setProtocol(AppProtocol.getType(rs.getString("protocol_"))); + appEntity.setType(AppType.getType(rs.getString("type_"))); + appEntity.setIcon(rs.getString("icon_")); + appEntity.setInitLoginType(InitLoginType.getType(rs.getString("init_login_type"))); + appEntity.setInitLoginUrl(rs.getString("init_login_url")); + appEntity + .setAuthorizationType(AuthorizationType.getType(rs.getString("authorization_type"))); + appEntity.setEnabled(rs.getBoolean("is_enabled")); + appEntity.setRemark(rs.getString("remark_")); + return appEntity; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppOidcConfigPoMapper.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppOidcConfigPoMapper.java new file mode 100644 index 00000000..8eefe006 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppOidcConfigPoMapper.java @@ -0,0 +1,91 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl.mapper; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.time.LocalDateTime; +import java.util.Set; + +import org.springframework.jdbc.core.RowMapper; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.common.entity.app.po.AppOidcConfigPO; +import cn.topiam.employee.common.enums.app.AuthorizationType; +import cn.topiam.employee.common.enums.app.InitLoginType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 22:25 + */ +@SuppressWarnings({ "DuplicatedCode", "unchecked" }) +public class AppOidcConfigPoMapper implements RowMapper { + + /** + * Implementations must implement this method to map each row of data + * in the ResultSet. This method should not call {@code next()} on + * the ResultSet; it is only supposed to map values of the current row. + * + * @param rs the ResultSet to map (pre-initialized for the current row) + * @param rowNum the number of the current row + * @return the result object for the current row (may be {@code null}) + * @throws SQLException if an SQLException is encountered getting + * column values (that is, there's no need to catch SQLException) + */ + @Override + public AppOidcConfigPO mapRow(ResultSet rs, int rowNum) throws SQLException { + //@formatter:off + AppOidcConfigPO appAccount = new AppOidcConfigPO(); + appAccount.setAppId(rs.getLong("id_")); + appAccount.setAppId(rs.getLong("app_id")); + //应用表相关 + appAccount.setAppCode(rs.getString("code_")); + appAccount.setAppTemplate(rs.getString("template_")); + appAccount.setEnabled(rs.getBoolean("is_enabled")); + appAccount.setClientId(rs.getString("client_id")); + appAccount.setClientSecret(rs.getString("client_secret")); + appAccount.setInitLoginType(InitLoginType.getType(rs.getString("init_login_type"))); + appAccount.setInitLoginUrl(rs.getString("init_login_url")); + appAccount.setAuthorizationType(AuthorizationType.getType(rs.getString("authorization_type"))); + //配置相关 + appAccount.setClientAuthMethods(JSONObject.parseObject(rs.getString("client_auth_methods"), Set.class)); + appAccount.setAuthGrantTypes(JSONObject.parseObject(rs.getString("auth_grant_types"), Set.class)); + appAccount.setResponseTypes(JSONObject.parseObject(rs.getString("response_types"), Set.class)); + appAccount.setRedirectUris(JSONObject.parseObject(rs.getString("redirect_uris"), Set.class)); + appAccount.setGrantScopes(JSONObject.parseObject(rs.getString("grant_scopes"), Set.class)); + appAccount.setRequireAuthConsent(rs.getBoolean("require_auth_consent")); + appAccount.setRequireProofKey(rs.getBoolean("require_proof_key")); + appAccount.setTokenEndpointAuthSigningAlgorithm( + rs.getString("token_endpoint_auth_signing_algorithm")); + appAccount.setRefreshTokenTimeToLive(rs.getInt("refresh_token_time_to_live")); + appAccount.setAccessTokenFormat(rs.getString("access_token_format")); + appAccount.setAccessTokenTimeToLive(rs.getInt("access_token_time_to_live")); + appAccount.setIdTokenTimeToLive(rs.getInt("id_token_time_to_live")); + appAccount.setIdTokenSignatureAlgorithm(rs.getString("id_token_signature_algorithm")); + appAccount.setReuseRefreshToken(rs.getBoolean("reuse_refresh_token")); + //创建修改相关 + appAccount.setCreateBy(rs.getString("create_by")); + appAccount.setCreateTime(rs.getObject("create_time", LocalDateTime.class)); + appAccount.setUpdateBy(rs.getString("update_by")); + appAccount.setCreateTime(rs.getObject("update_time", LocalDateTime.class)); + appAccount.setRemark(rs.getString("remark_")); + return appAccount; + //@formatter:on + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppPermissionPolicyPoMapper.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppPermissionPolicyPoMapper.java new file mode 100644 index 00000000..0f59940a --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppPermissionPolicyPoMapper.java @@ -0,0 +1,62 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl.mapper; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.springframework.jdbc.core.RowMapper; + +import cn.topiam.employee.common.entity.app.po.AppPermissionPolicyPO; +import cn.topiam.employee.common.enums.PolicyEffect; +import cn.topiam.employee.common.enums.PolicyObjectType; +import cn.topiam.employee.common.enums.PolicySubjectType; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 23:25 + */ +public class AppPermissionPolicyPoMapper implements RowMapper { + + /** + * Implementations must implement this method to map each row of data + * in the ResultSet. This method should not call {@code next()} on + * the ResultSet; it is only supposed to map values of the current row. + * + * @param rs the ResultSet to map (pre-initialized for the current row) + * @param rowNum the number of the current row + * @return the result object for the current row (may be {@code null}) + * @throws SQLException if an SQLException is encountered getting + * column values (that is, there's no need to catch SQLException) + */ + @SuppressWarnings("DuplicatedCode") + @Override + public AppPermissionPolicyPO mapRow(ResultSet rs, int rowNum) throws SQLException { + AppPermissionPolicyPO appPermissionPolicyPo = new AppPermissionPolicyPO(); + appPermissionPolicyPo.setId(rs.getLong("id_")); + appPermissionPolicyPo.setEffect(PolicyEffect.getType(rs.getString("effect"))); + appPermissionPolicyPo.setSubjectId(rs.getString("subject_id")); + appPermissionPolicyPo + .setSubjectType(PolicySubjectType.getType(rs.getString("subject_type"))); + appPermissionPolicyPo.setSubjectName(rs.getString("subject_name")); + appPermissionPolicyPo.setObjectId(rs.getLong("object_id")); + appPermissionPolicyPo.setObjectType(PolicyObjectType.getType(rs.getString("object_type"))); + appPermissionPolicyPo.setObjectName(rs.getString("object_name")); + return appPermissionPolicyPo; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppSaml2ConfigPoMapper.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppSaml2ConfigPoMapper.java new file mode 100644 index 00000000..aab982c3 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/mapper/AppSaml2ConfigPoMapper.java @@ -0,0 +1,128 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app.impl.mapper; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.time.LocalDateTime; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.jdbc.core.RowMapper; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.ObjectMapper; + +import cn.topiam.employee.common.entity.app.AppSaml2ConfigEntity; +import cn.topiam.employee.common.entity.app.po.AppSaml2ConfigPO; +import cn.topiam.employee.common.enums.app.*; +import cn.topiam.employee.support.exception.TopIamException; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 22:25 + */ +@SuppressWarnings("DuplicatedCode") +public class AppSaml2ConfigPoMapper implements RowMapper { + + /** + * Implementations must implement this method to map each row of data + * in the ResultSet. This method should not call {@code next()} on + * the ResultSet; it is only supposed to map values of the current row. + * + * @param rs the ResultSet to map (pre-initialized for the current row) + * @param rowNum the number of the current row + * @return the result object for the current row (may be {@code null}) + * @throws SQLException if an SQLException is encountered getting + * column values (that is, there's no need to catch SQLException) + */ + @Override + public AppSaml2ConfigPO mapRow(ResultSet rs, int rowNum) throws SQLException { + AppSaml2ConfigPO appAccount = new AppSaml2ConfigPO(); + appAccount.setAppId(rs.getLong("id_")); + appAccount.setAppId(rs.getLong("app_id")); + appAccount.setAppCode(rs.getString("code_")); + appAccount.setClientId(rs.getString("client_id")); + appAccount.setClientSecret(rs.getString("client_secret")); + appAccount.setSpMetadata(rs.getString("sp_metadata")); + appAccount.setSpEntityId(rs.getString("sp_entity_id")); + appAccount.setSpAcsUrl(rs.getString("sp_acs_url")); + appAccount.setRecipient(rs.getString("recipient_")); + appAccount.setAudience(rs.getString("audience_")); + appAccount.setSpSloUrl(rs.getString("sp_slo_url")); + appAccount.setSpRequestsSigned(rs.getBoolean("sp_requests_signed")); + appAccount.setSpSignCert(rs.getString("sp_sign_cert")); + appAccount.setAcsBinding(rs.getString("acs_binding")); + appAccount.setSlsBinding(rs.getString("sls_binding")); + appAccount.setNameIdFormat(SamlNameIdFormatType.getType(rs.getString("nameid_format"))); + appAccount + .setNameIdValueType(SamlNameIdValueType.getType(rs.getString("nameid_value_type"))); + //加密断言 + appAccount.setAssertSigned(rs.getBoolean("assert_signed")); + appAccount.setAssertSignAlgorithm( + SamlSignAssertAlgorithmType.getType(rs.getString("assert_sign_algorithm"))); + //签名断言 + appAccount.setAssertEncrypted(rs.getBoolean("assert_encrypted")); + appAccount.setAssertEncryptAlgorithm( + SamlEncryptAssertAlgorithmType.getType(rs.getString("assert_encrypt_algorithm"))); + //响应签名 + appAccount.setResponseSigned(rs.getBoolean("response_signed")); + appAccount.setResponseSignAlgorithm( + SamlSignAssertAlgorithmType.getType(rs.getString("response_sign_algorithm"))); + + appAccount.setAuthnContextClassRef( + AuthnContextClassRefType.getType(rs.getString("authn_context_classref"))); + appAccount.setRelayState(rs.getString("relay_state")); + appAccount.setInitLoginType(InitLoginType.getType(rs.getString("init_login_type"))); + appAccount.setInitLoginUrl(rs.getString("init_login_url")); + appAccount.setAppTemplate(rs.getString("template_")); + appAccount + .setAuthorizationType(AuthorizationType.getType(rs.getString("authorization_type"))); + try { + //属性语句 + String attributeStatements = rs.getString("attribute_statements"); + if (StringUtils.isNotBlank(attributeStatements)) { + JavaType attributeStatementType = objectMapper.getTypeFactory() + .constructCollectionType(List.class, + AppSaml2ConfigEntity.AttributeStatement.class); + List attributeStatement = objectMapper + .readValue(rs.getString("attribute_statements"), attributeStatementType); + appAccount.setAttributeStatements(attributeStatement); + } + + //额外参数 + String additionalConfig = rs.getString("additional_config"); + if (StringUtils.isNotBlank(additionalConfig)) { + appAccount.setAdditionalConfig(objectMapper + .readValue(rs.getString("additional_config"), new TypeReference<>() { + })); + } + } catch (Exception e) { + throw new TopIamException(e.getMessage()); + } + appAccount.setCreateBy(rs.getString("create_by")); + appAccount.setCreateTime(rs.getObject("create_time", LocalDateTime.class)); + appAccount.setUpdateBy(rs.getString("update_by")); + appAccount.setCreateTime(rs.getObject("update_time", LocalDateTime.class)); + appAccount.setRemark(rs.getString("remark_")); + return appAccount; + } + + private final ObjectMapper objectMapper = new ObjectMapper(); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/package-info.java new file mode 100644 index 00000000..44157282 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.app; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/authentication/IdentityProviderRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/authentication/IdentityProviderRepository.java new file mode 100644 index 00000000..9d474867 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/authentication/IdentityProviderRepository.java @@ -0,0 +1,130 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.authentication; + +import java.util.List; +import java.util.Optional; + +import org.jetbrains.annotations.NotNull; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.enums.IdentityProviderType; + +/** + *

+ * 身份认证源配置 Repository 接口 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-16 + */ +@Repository +@CacheConfig(cacheNames = "idp") +public interface IdentityProviderRepository extends CrudRepository, + PagingAndSortingRepository, + QuerydslPredicateExecutor { + /** + * 根据平台类型查询认证源配置 + * + * @param type {@link IdentityProviderType} + * @return {@link IdentityProviderEntity} + */ + List findByType(IdentityProviderType type); + + /** + * 根据平台类型查询是否显示 + * + * @return {@link List} + */ + List findByEnabledIsTrueAndDisplayedIsTrue(); + + /** + * 查询启用的社交认证源 + * + * @return {@link List} + */ + List findByEnabledIsTrue(); + + /** + * save + * + * @param entity {@link S} + * @param {@link S} + * @return {@link IdentityProviderEntity} + */ + @NotNull + @Override + @CacheEvict(allEntries = true) + S save(@NotNull S entity); + + /** + * Deletes the entity with the given id. + * + * @param id must not be {@literal null}. + * @throws IllegalArgumentException in case the given {@literal id} is {@literal null} + */ + @Override + @CacheEvict(allEntries = true) + void deleteById(@NotNull Long id); + + /** + * Retrieves an entity by its id. + * + * @param id must not be {@literal null}. + * @return the entity with the given id or {@literal Optional#empty()} if none found. + * @throws IllegalArgumentException if {@literal id} is {@literal null}. + */ + @NotNull + @Override + @Cacheable(key = "#a0") + Optional findById(@NotNull Long id); + + /** + * 更新社交认证源状态 + * + * @param id {@link Long} + * @param enabled {@link Boolean} + * @return {@link Boolean} + */ + @Transactional(rollbackFor = Exception.class) + @Modifying + @CacheEvict(allEntries = true) + @Query(value = "UPDATE IdentityProviderEntity SET enabled=:enabled where id=:id") + Integer updateIdentityProviderStatus(@Param(value = "id") Long id, + @Param(value = "enabled") Boolean enabled); + + /** + * 根据ID查找,并且为启用 + * + * @param id {@link Long} + * @return {@link IdentityProviderEntity} + */ + @Cacheable(key = "#a0", unless = "#result == null") + Optional findByIdAndEnabledIsTrue(Long id); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/authorization/ResourceRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/authorization/ResourceRepositoryCustomized.java new file mode 100644 index 00000000..e9c73d57 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/authorization/ResourceRepositoryCustomized.java @@ -0,0 +1,25 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.authorization; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 20:48 + */ +public interface ResourceRepositoryCustomized { +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/authorization/RoleRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/authorization/RoleRepositoryCustomized.java new file mode 100644 index 00000000..dd5260ce --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/authorization/RoleRepositoryCustomized.java @@ -0,0 +1,26 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.authorization; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/10 22:32 + */ +public interface RoleRepositoryCustomized { + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceEventRecordRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceEventRecordRepository.java new file mode 100644 index 00000000..2ac58618 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceEventRecordRepository.java @@ -0,0 +1,37 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.identitysource; + +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.identitysource.IdentitySourceEventRecordEntity; + +/** + * 身份源事件记录 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/3/15 20:35 + */ +@Repository +public interface IdentitySourceEventRecordRepository extends + PagingAndSortingRepository, + QuerydslPredicateExecutor, + IdentitySourceEventRecordRepositoryCustomized { +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceEventRecordRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceEventRecordRepositoryCustomized.java new file mode 100644 index 00000000..872872d1 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceEventRecordRepositoryCustomized.java @@ -0,0 +1,37 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.identitysource; + +import java.util.List; + +import cn.topiam.employee.common.entity.identitysource.IdentitySourceEventRecordEntity; + +/** + * 身份源事件记录 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/3/15 20:35 + */ +public interface IdentitySourceEventRecordRepositoryCustomized { + /** + * 批量保存 + * + * @param list {@link List} + */ + void batchSave(List list); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceRepository.java new file mode 100644 index 00000000..75c7cfaa --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceRepository.java @@ -0,0 +1,129 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.identitysource; + +import java.util.List; +import java.util.Optional; + +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.lang.NonNull; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.constants.AccountConstants; +import cn.topiam.employee.common.entity.identitysource.IdentitySourceEntity; + +/** + *

+ * 身份认证源配置 Repository 接口 + *

+ * 部分操作使用了缓存,后期更改使用,请务必注意! + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-16 + */ +@Repository +@CacheConfig(cacheNames = { AccountConstants.IDS_CACHE_NAME }) +public interface IdentitySourceRepository extends CrudRepository, + PagingAndSortingRepository, + QuerydslPredicateExecutor { + /** + * 根据ID查询 + * + * @param id {@link Long} + * @return {@link IdentitySourceEntity} + */ + @Override + @Cacheable(key = "#p0", unless = "#result==null") + Optional findById(Long id); + + /** + * 查询启用的身份源 + * + * @return {@link List} + */ + @Cacheable + List findByEnabledIsTrue(); + + /** + * 更新身份源状态 + * + * @param id {@link Long} + * @param enabled {@link Boolean} + * @return {@link Boolean} + */ + @Transactional(rollbackFor = Exception.class) + @Modifying + @CacheEvict(allEntries = true) + @Query(value = "UPDATE IdentitySourceEntity SET enabled=:enabled where id=:id") + Integer updateIdentitySourceStatus(@Param(value = "id") Long id, + @Param(value = "enabled") Boolean enabled); + + /** + * Saves a given entity. Use the returned instance for further operations as the save operation might have changed the + * entity instance completely. + * + * @param entity must not be {@literal null}. + * @return the saved entity; will never be {@literal null}. + * @throws IllegalArgumentException in case the given {@literal entity} is {@literal null}. + */ + @Override + @NonNull + @CacheEvict(allEntries = true) + S save(@NonNull S entity); + + /** + * Deletes the entity with the given id. + * + * @param id must not be {@literal null}. + * @throws IllegalArgumentException in case the given {@literal id} is {@literal null} + */ + @Override + @CacheEvict(allEntries = true) + void deleteById(@NonNull Long id); + + /** + * 更新设分院策略 + * + * @param id {@link Long} 主键 + * @param strategyConfig {@link String} 策略 + */ + @Transactional(rollbackFor = Exception.class) + @Modifying + @CacheEvict(allEntries = true) + @Query(value = "UPDATE IdentitySourceEntity SET strategyConfig=:strategyConfig where id=:id") + void updateStrategyConfig(@Param(value = "id") Long id, + @Param(value = "strategyConfig") String strategyConfig); + + /** + * 根据code查询 + * + * @param code {@link String} + * @return {@link IdentitySourceEntity} + */ + Optional findByCode(String code); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceSyncHistoryRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceSyncHistoryRepository.java new file mode 100644 index 00000000..79245cbf --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceSyncHistoryRepository.java @@ -0,0 +1,38 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.identitysource; + +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.identitysource.IdentitySourceSyncHistoryEntity; + +/** + * 身份源同步结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/3/15 20:35 + */ +@Repository +public interface IdentitySourceSyncHistoryRepository extends + CrudRepository, + PagingAndSortingRepository, + QuerydslPredicateExecutor { +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceSyncRecordRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceSyncRecordRepository.java new file mode 100644 index 00000000..ebf89475 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceSyncRecordRepository.java @@ -0,0 +1,37 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.identitysource; + +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.identitysource.IdentitySourceSyncRecordEntity; + +/** + * 身份源同步详情 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/3/15 20:35 + */ +@Repository +public interface IdentitySourceSyncRecordRepository extends + PagingAndSortingRepository, + QuerydslPredicateExecutor, + IdentitySourceSyncRecordRepositoryCustomized { +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceSyncRecordRepositoryCustomized.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceSyncRecordRepositoryCustomized.java new file mode 100644 index 00000000..8e01fb8e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/IdentitySourceSyncRecordRepositoryCustomized.java @@ -0,0 +1,37 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.identitysource; + +import java.util.List; + +import cn.topiam.employee.common.entity.identitysource.IdentitySourceSyncRecordEntity; + +/** + * 身份源同步记录 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/3/15 20:35 + */ +public interface IdentitySourceSyncRecordRepositoryCustomized { + /** + * 批量保存 + * + * @param list {@link List} + */ + void batchSave(List list); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/impl/IdentitySourceEventRecordRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/impl/IdentitySourceEventRecordRepositoryCustomizedImpl.java new file mode 100644 index 00000000..f705697c --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/impl/IdentitySourceEventRecordRepositoryCustomizedImpl.java @@ -0,0 +1,83 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.identitysource.impl; + +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.List; +import java.util.Objects; + +import org.jetbrains.annotations.NotNull; +import org.springframework.jdbc.core.BatchPreparedStatementSetter; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.identitysource.IdentitySourceEventRecordEntity; +import cn.topiam.employee.common.repository.identitysource.IdentitySourceEventRecordRepositoryCustomized; + +/** + * + * @author TopIAM + * Created by support@topiam.cn on 2022/10/10 23:33 + */ +@SuppressWarnings("DuplicatedCode") +@Repository +public class IdentitySourceEventRecordRepositoryCustomizedImpl implements + IdentitySourceEventRecordRepositoryCustomized { + + @Override + public void batchSave(List list) { + jdbcTemplate.batchUpdate( + "INSERT INTO identity_source_event_record (id_, identity_source_id, action_type, object_id, object_name, object_type, status_,event_time,desc_,create_by,create_time,update_by,update_time,remark_) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)", + new BatchPreparedStatementSetter() { + @Override + public void setValues(@NotNull PreparedStatement ps, int i) throws SQLException { + //@formatter:off + IdentitySourceEventRecordEntity entity = list.get(i); + ps.setLong(1, entity.getId()); + ps.setLong(2, entity.getIdentitySourceId()); + ps.setString(3, Objects.isNull(entity.getActionType()) ? null : entity.getActionType().getCode()); + ps.setString(4, entity.getObjectId()); + ps.setString(5, entity.getObjectName()); + ps.setString(6, Objects.isNull(entity.getObjectType()) ? null : entity.getObjectType().getCode()); + ps.setString(7, Objects.isNull(entity.getStatus()) ? null : entity.getStatus().getCode()); + ps.setTimestamp(8, Timestamp.valueOf(entity.getEventTime())); + ps.setString(9, entity.getDesc()); + ps.setString(10, entity.getCreateBy()); + ps.setTimestamp(11, Timestamp.valueOf(entity.getCreateTime())); + ps.setString(12, entity.getUpdateBy()); + ps.setTimestamp(13, Timestamp.valueOf(entity.getUpdateTime())); + ps.setString(14, entity.getRemark()); + //@formatter:on + } + + @Override + public int getBatchSize() { + return list.size(); + } + }); + } + + private final JdbcTemplate jdbcTemplate; + + public IdentitySourceEventRecordRepositoryCustomizedImpl(JdbcTemplate jdbcTemplate) { + this.jdbcTemplate = jdbcTemplate; + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/impl/IdentitySourceSyncRecordRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/impl/IdentitySourceSyncRecordRepositoryCustomizedImpl.java new file mode 100644 index 00000000..c5a9d0b8 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/identitysource/impl/IdentitySourceSyncRecordRepositoryCustomizedImpl.java @@ -0,0 +1,81 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.identitysource.impl; + +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.List; +import java.util.Objects; + +import org.jetbrains.annotations.NotNull; +import org.springframework.jdbc.core.BatchPreparedStatementSetter; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import cn.topiam.employee.common.entity.identitysource.IdentitySourceSyncRecordEntity; +import cn.topiam.employee.common.repository.identitysource.IdentitySourceSyncRecordRepositoryCustomized; + +/** + * 身份源同步记录 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/3/15 20:35 + */ +@Repository +public class IdentitySourceSyncRecordRepositoryCustomizedImpl implements + IdentitySourceSyncRecordRepositoryCustomized { + + @Override + public void batchSave(List list) { + jdbcTemplate.batchUpdate( + "INSERT INTO identity_source_sync_record (id_, sync_history_id, action_type, object_id, object_name, object_type, status_,desc_,create_by,create_time,update_by,update_time,remark_) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)", + new BatchPreparedStatementSetter() { + @Override + public void setValues(@NotNull PreparedStatement ps, int i) throws SQLException { + //@formatter:off + IdentitySourceSyncRecordEntity entity = list.get(i); + ps.setLong(1, entity.getId()); + ps.setLong(2, entity.getSyncHistoryId()); + ps.setString(3, Objects.isNull(entity.getActionType()) ? null : entity.getActionType().getCode()); + ps.setString(4, entity.getObjectId()); + ps.setString(5, entity.getObjectName()); + ps.setString(6, Objects.isNull(entity.getObjectType()) ? null : entity.getObjectType().getCode()); + ps.setString(7, Objects.isNull(entity.getStatus()) ? null : entity.getStatus().getCode()); + ps.setString(8, entity.getDesc()); + ps.setString(9, entity.getCreateBy()); + ps.setTimestamp(10, Timestamp.valueOf(entity.getCreateTime())); + ps.setString(11, entity.getUpdateBy()); + ps.setTimestamp(12, Timestamp.valueOf(entity.getUpdateTime())); + ps.setString(13, entity.getRemark()); + //@formatter:on + } + + @Override + public int getBatchSize() { + return list.size(); + } + }); + } + + private final JdbcTemplate jdbcTemplate; + + public IdentitySourceSyncRecordRepositoryCustomizedImpl(JdbcTemplate jdbcTemplate) { + this.jdbcTemplate = jdbcTemplate; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/package-info.java new file mode 100644 index 00000000..4564b023 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/setting/AdministratorRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/setting/AdministratorRepository.java new file mode 100644 index 00000000..badb996a --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/setting/AdministratorRepository.java @@ -0,0 +1,133 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.setting; + +import java.util.Optional; + +import org.jetbrains.annotations.NotNull; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.setting.AdministratorEntity; +import static cn.topiam.employee.common.constants.SettingConstants.ADMIN_CACHE_NAME; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/13 22:09 + */ +@Repository +@CacheConfig(cacheNames = { ADMIN_CACHE_NAME }) +public interface AdministratorRepository extends CrudRepository, + QuerydslPredicateExecutor { + + /** + * findById + * + * @param id must not be {@literal null}. + * @return {@link AdministratorEntity} + */ + @NotNull + @Override + @Cacheable(key = "#p0", unless = "#result==null") + Optional findById(@NotNull Long id); + + /** + * findById + * + * @param id must not be {@literal null}. + */ + @Override + @CacheEvict(allEntries = true) + void deleteById(@NotNull Long id); + + /** + * findById + * + * @param ids must not be {@literal null}. + */ + @Override + @CacheEvict(allEntries = true) + void deleteAllById(@NotNull Iterable ids); + + /** + * save + * + * @param entity must not be {@literal null}. + * @return {@link AdministratorEntity} + * @param + */ + @Override + @CacheEvict(allEntries = true) + S save(@NotNull S entity); + + /** + * 根据用户名查询 + * + * @param username {@link String} + * @return {@link AdministratorEntity} + */ + Optional findByUsername(String username); + + /** + * 根据手机号查询 + * + * @param phone {@link String} + * @return {@link AdministratorEntity} + */ + Optional findByPhone(String phone); + + /** + * 根据邮箱查询 + * + * @param email {@link String} + * @return {@link AdministratorEntity} + */ + Optional findByEmail(String email); + + /** + * 更新管理员状态 + * + * @param id {@link String} + * @param status {@link String} + */ + @Transactional(rollbackFor = Exception.class) + @Modifying + @CacheEvict(allEntries = true) + @Query(value = "update administrator set status_ = ?2 where id_ = ?1", nativeQuery = true) + void updateStatus(@Param(value = "id") String id, @Param(value = "status") String status); + + /** + * 更新代码 + * + * @param id {@link String} + * @param password {@link String} + */ + @Transactional(rollbackFor = Exception.class) + @Modifying + @CacheEvict(allEntries = true) + @Query(value = "update administrator set password_ = ?2 where id_ = ?1", nativeQuery = true) + void updatePassword(@Param(value = "id") String id, @Param(value = "password") String password); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/setting/MailTemplateRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/setting/MailTemplateRepository.java new file mode 100644 index 00000000..017a625e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/setting/MailTemplateRepository.java @@ -0,0 +1,53 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.setting; + +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.setting.MailTemplateEntity; +import cn.topiam.employee.common.enums.MailType; + +/** + *

+ * 邮件模板 Repository 接口 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-13 + */ +@Repository +public interface MailTemplateRepository extends CrudRepository { + /** + * 根据类型查询模板 + * + * @param type {@link MailType} + * @return {@link MailTemplateEntity} + */ + MailTemplateEntity findByType(@Param("type") MailType type); + + /** + * 根据模块类型删除模块 + * + * @param type {@link MailType} + */ + @Transactional(rollbackFor = Exception.class) + void deleteByType(@Param("type") MailType type); +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/setting/SettingRepository.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/setting/SettingRepository.java new file mode 100644 index 00000000..bef45d55 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/setting/SettingRepository.java @@ -0,0 +1,106 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.repository.setting; + +import java.util.List; +import java.util.Objects; + +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.setting.SettingEntity; +import cn.topiam.employee.support.util.BeanUtils; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; + +/** + * 设置表 Repository 接口 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/5 22:09 + */ +@Repository +public interface SettingRepository extends CrudRepository { + /** + * 根据KEY查询 + * + * @param name {@link String} + * @return {@link SettingEntity} + */ + SettingEntity findByName(String name); + + /** + * 根据KEY查询 + * + * @param name {@link String} + * @return {@link SettingEntity} + */ + List findByNameLike(String name); + + /** + * 根据类型查询安全配置 + * + * @param names {@link List} + * @return {@link SettingEntity} + */ + List findByNameIn(List names); + + /** + * 根据名称查询是否存在 + * + * @param name {@link String} + * @return {@link Boolean} + */ + Boolean existsByName(String name); + + /** + * 根据名称删除 + * + * @param name {@link String} + */ + @Transactional(rollbackFor = Exception.class) + void deleteByName(String name); + + /** + * 根据名称列表删除 + * + * @param names {@link String} + */ + @Transactional(rollbackFor = Exception.class) + void deleteByNameIn(List names); + + /** + * 保存配置 + * + * @param list {@link List} + * @return {@link Boolean} + */ + default Boolean saveConfig(List list) { + for (SettingEntity setting : list) { + SettingEntity type = findByName(setting.getName()); + if (Objects.isNull(type)) { + save(setting); + continue; + } + BeanUtils.merge(setting, type, LAST_MODIFIED_BY, LAST_MODIFIED_TIME); + save(type); + } + return true; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/AbstractStorage.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/AbstractStorage.java new file mode 100644 index 00000000..495238cb --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/AbstractStorage.java @@ -0,0 +1,65 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage; + +import java.util.UUID; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.web.multipart.MultipartFile; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/10 20:36 + */ +public class AbstractStorage implements Storage { + protected StorageConfig config; + public static final String SEPARATOR = "/"; + public static final String JOINER = "-"; + public static final int EXPIRY_SECONDS = 3600; + + public AbstractStorage(StorageConfig config) { + this.config = config; + } + + /** + * 判断域名是否为https + * + * @param url + * @return + */ + public boolean getUrlSecure(String url) { + return "https:".equals(url.split("//")[0]); + } + + public String getFileName(String fileName, MultipartFile file) { + if (StringUtils.isBlank(fileName)) { + fileName = file.getOriginalFilename(); + } + return UUID.randomUUID().toString().replace(JOINER, "").toLowerCase() + JOINER + fileName; + } + + @Override + public String upload(String fileName, MultipartFile file) throws StorageProviderException { + return null; + } + + @Override + public String download(String path) throws StorageProviderException { + return null; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/Storage.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/Storage.java new file mode 100644 index 00000000..5b49c5ef --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/Storage.java @@ -0,0 +1,47 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage; + +import org.springframework.web.multipart.MultipartFile; + +/** + * 存储 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/10 20:29 + */ +public interface Storage { + /** + * 上传文件 + * + * @param fileName {@link String} + * @param file {@link MultipartFile} + * @return path + * @throws Exception Exception + */ + String upload(String fileName, MultipartFile file) throws Exception; + + /** + * 下载文件 + * + * @param path {@link String} + * @return path {@link String} + * @throws Exception Exception + */ + String download(String path) throws Exception; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/StorageConfig.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/StorageConfig.java new file mode 100644 index 00000000..1193f06b --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/StorageConfig.java @@ -0,0 +1,74 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage; + +import javax.validation.constraints.NotEmpty; + +import cn.topiam.employee.common.storage.enums.StorageProvider; + +import lombok.Builder; +import lombok.Data; + +/** + * 存储配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 19:10 + */ +@Data +@Builder +public class StorageConfig { + public StorageConfig() { + } + + public StorageConfig(StorageProvider provider) { + this.provider = provider; + } + + public StorageConfig(StorageProvider provider, Config config) { + this.provider = provider; + this.config = config; + } + + /** + * 平台 + */ + @NotEmpty(message = "平台类型不能为空") + private StorageProvider provider; + + /** + * 配置 + */ + private Config config; + + /** + * Config + */ + @Data + public static class Config { + /** + * 域名 + */ + @NotEmpty(message = "访问域名不能为空") + private String domain; + /** + * 存储位置 + */ + private String location; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/StorageFactory.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/StorageFactory.java new file mode 100644 index 00000000..3f0b90ea --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/StorageFactory.java @@ -0,0 +1,48 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage; + +import java.lang.reflect.Constructor; + +/** + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/10 20:40 + */ +public class StorageFactory { + + private StorageFactory() { + } + + /** + * 获取实例化 + * + * @param config {@link StorageConfig} + * @return {@link Storage} + */ + @SuppressWarnings("JavaReflectionInvocation") + public static Storage getStorage(StorageConfig config) { + try { + Constructor constructor = config.getProvider().getStorage() + .getDeclaredConstructor(StorageConfig.class); + return constructor.newInstance(config); + } catch (Exception e) { + throw new StorageProviderException(e.getMessage(), e); + } + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/StorageProviderException.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/StorageProviderException.java new file mode 100644 index 00000000..e9e1af5d --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/StorageProviderException.java @@ -0,0 +1,56 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage; + +import java.io.Serial; + +import org.springframework.http.HttpStatus; + +import cn.topiam.employee.support.exception.TopIamException; + +/** + * 存储服务异常 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/19 22:53 + */ +public class StorageProviderException extends TopIamException { + @Serial + private static final long serialVersionUID = 6249098979022610064L; + + public StorageProviderException(String msg, Throwable t) { + super(msg, t); + } + + public StorageProviderException(String msg) { + super(msg); + } + + public StorageProviderException(String msg, HttpStatus status) { + super(msg, status); + } + + public StorageProviderException(String error, String description, HttpStatus status) { + super(error, description, status); + } + + public StorageProviderException(Throwable cause, String error, String description, + HttpStatus status) { + super(cause, error, description, status); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/controller/StorageFileResource.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/controller/StorageFileResource.java new file mode 100644 index 00000000..ff3e29bc --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/controller/StorageFileResource.java @@ -0,0 +1,90 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage.controller; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import cn.topiam.employee.common.constants.StorageConstants; +import cn.topiam.employee.common.storage.Storage; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; + +/** + * 存储配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/30 21:16 + */ +@Validated +@Tag(name = "存储文件") +@RestController +@RequestMapping(value = StorageConstants.STORAGE_PATH, produces = MediaType.APPLICATION_JSON_VALUE) +@AllArgsConstructor +@Slf4j +public class StorageFileResource { + + /** + * 上传文件 + * + * @return {@link ApiRestResult} + */ + @Operation(summary = "上传文件") + @PostMapping(value = "/upload") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN) or hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).USER)") + public ApiRestResult uploadFile(@Schema(description = "文件名") String fileName, + @Schema(description = "文件") MultipartFile file) { + try { + return ApiRestResult.ok(storage.upload(fileName, file)); + } catch (Exception e) { + log.error("Failed to upload storage file: {}", e.getMessage(), e); + return ApiRestResult.err(e.getMessage()); + } + } + + /** + * 获取存储文件路径 + * + * @return {@link ApiRestResult} + */ + @Operation(summary = "获取存储文件路径") + @GetMapping(value = "/get") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN) or hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).USER)") + public ApiRestResult getUrl(@Schema(description = "文件路径") @RequestParam String path) { + try { + return ApiRestResult.ok(storage.download(path)); + } catch (Exception e) { + log.error("Failed to get storage file: {}", e.getMessage(), e); + return ApiRestResult.err(e.getMessage()); + } + } + + /** + * Storage + */ + private final Storage storage; +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/enums/StorageProvider.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/enums/StorageProvider.java new file mode 100644 index 00000000..afb92cc5 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/enums/StorageProvider.java @@ -0,0 +1,107 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage.enums; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonValue; + +import cn.topiam.employee.common.storage.Storage; +import cn.topiam.employee.common.storage.impl.*; +import cn.topiam.employee.support.web.converter.EnumConvert; + +/** + * 短信平台 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/19 + */ +public enum StorageProvider implements Serializable { + + /** + * 阿里云 + */ + ALIYUN_OSS("aliyun_oss", "阿里云OSS", + AliYunOssStorage.class), + /** + * 腾讯云 + */ + TENCENT_COS("tencent_cos", "腾讯云COS", + TencentCosStorage.class), + /** + * 七牛 + */ + QINIU_KODO("qiniu_kodo", "七牛云Kodo", + QiNiuKodoStorage.class), + /** + * 本地存储 + */ + LOCAL("local", "本地存储", LocalStorage.class), + /** + * minio + */ + MINIO("minio", "minio", MinIoStorage.class); + + /** + * code + */ + @JsonValue + private final String code; + /** + * desc + */ + private final String desc; + /** + * Storage + */ + private final Class storage; + + StorageProvider(String code, String desc, Class storage) { + this.code = code; + this.desc = desc; + this.storage = storage; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } + + public Class getStorage() { + return storage; + } + + @EnumConvert + public static StorageProvider getType(String code) { + StorageProvider[] values = values(); + for (StorageProvider status : values) { + if (String.valueOf(status.getCode()).equals(code)) { + return status; + } + } + throw new NullPointerException("未找到该平台"); + } + + @Override + public String toString() { + return this.code; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/enums/convert/StorageProviderConverter.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/enums/convert/StorageProviderConverter.java new file mode 100644 index 00000000..b7e1a53e --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/enums/convert/StorageProviderConverter.java @@ -0,0 +1,69 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage.enums.convert; + +import java.util.Objects; + +import javax.persistence.AttributeConverter; +import javax.persistence.Converter; + +import cn.topiam.employee.common.storage.enums.StorageProvider; + +/** + * SmsPlatformWritingConverter + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/5 21:52 + */ +@Converter(autoApply = true) +public class StorageProviderConverter implements AttributeConverter { + + /** + * Converts the value stored in the entity attribute into the + * data representation to be stored in the database. + * + * @param attribute the entity attribute value to be converted + * @return the converted data to be stored in the database + * column + */ + @Override + public String convertToDatabaseColumn(StorageProvider attribute) { + if (Objects.isNull(attribute)) { + return null; + } + return attribute.getCode(); + } + + /** + * Converts the data stored in the database column into the + * value to be stored in the entity attribute. + * Note that it is the responsibility of the converter writer to + * specify the correct dbData type for the corresponding + * column for use by the JDBC driver: i.e., persistence providers are + * not expected to do such type conversion. + * + * @param dbData the data from the database column to be + * converted + * @return the converted value to be stored in the entity + * attribute + */ + @Override + public StorageProvider convertToEntityAttribute(String dbData) { + return StorageProvider.getType(dbData); + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/AliYunOssStorage.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/AliYunOssStorage.java new file mode 100644 index 00000000..a98c6b76 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/AliYunOssStorage.java @@ -0,0 +1,145 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage.impl; + +import java.net.URL; +import java.util.Date; + +import javax.validation.constraints.NotEmpty; + +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.web.multipart.MultipartFile; + +import com.aliyun.oss.HttpMethod; +import com.aliyun.oss.OSS; +import com.aliyun.oss.OSSClientBuilder; +import com.aliyun.oss.model.CreateBucketRequest; +import com.aliyun.oss.model.GeneratePresignedUrlRequest; +import com.aliyun.oss.model.PutObjectRequest; + +import cn.topiam.employee.common.storage.AbstractStorage; +import cn.topiam.employee.common.storage.StorageConfig; +import cn.topiam.employee.common.storage.StorageProviderException; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.extern.slf4j.Slf4j; + +/** + * 阿里云OSS + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/10 20:28 + */ +@Slf4j +public class AliYunOssStorage extends AbstractStorage { + + private final Config aliYunConfig; + private final OSS ossClient; + + public AliYunOssStorage(StorageConfig config) { + super(config); + aliYunConfig = (Config) config.getConfig(); + // 创建OSSClient实例。 + ossClient = new OSSClientBuilder().build(aliYunConfig.getEndpoint(), + aliYunConfig.getAccessKeyId(), aliYunConfig.getAccessKeySecret()); + createBucket(); + } + + private void createBucket() { + // 判断存储空间examplebucket是否存在。如果返回值为true,则存储空间存在,否则存储空间不存在。 + boolean exists = ossClient.doesBucketExist(aliYunConfig.getBucket()); + if (!exists) { + // 创建CreateBucketRequest对象。 + CreateBucketRequest createBucketRequest = new CreateBucketRequest( + aliYunConfig.getBucket()); + // 创建存储空间。 + ossClient.createBucket(createBucketRequest); + } + } + + @Override + public String upload(String fileName, MultipartFile file) throws StorageProviderException { + try { + super.upload(fileName, file); + String key = aliYunConfig.getLocation() + SEPARATOR + getFileName(fileName, file); + // 创建PutObjectRequest对象。 + // 依次填写Bucket名称(例如examplebucket)和Object完整路径(例如exampledir/exampleobject.txt)。Object完整路径中不能包含Bucket名称。 + PutObjectRequest putObjectRequest = new PutObjectRequest(aliYunConfig.getBucket(), key, + file.getInputStream()); + // 上传字符串 + ossClient.putObject(putObjectRequest); + return aliYunConfig.getDomain() + SEPARATOR + aliYunConfig.getBucket() + SEPARATOR + + key; + } catch (Exception e) { + log.error("ali yun upload exception: {}", e.getMessage(), e); + throw new StorageProviderException("ali yun upload exception", e); + } + } + + @Override + public String download(String path) throws StorageProviderException { + super.download(path); + /** + * 所有OSS支持的请求和各种Header参数,在URL中进行签名的算法和在Header中包含签名的算法基本一样。 + * 生成URL中的签名字符串时,除了将Date参数替换为Expires参数外,仍然包含CONTENT-TYPE、CONTENT-MD5、CanonicalizedOSSHeaders等在Header中包含签名中定义的Header(请求中虽然仍有Date请求Header,但无需将Date加入签名字符串中)。 + * 在URL中包含签名时必须对URL进行urlencode。如果在URL中多次传入Signature、Expires或OSSAccessKeyId,则以第一次传入的值为准。 + * 使用URL签名时,OSS会先验证请求时间是否晚于Expires时间,然后再验证签名。 + * urlencode(base64(hmac-sha1(AccessKeySecret, + * VERB + "\n" + * + CONTENT-MD5 + "\n" + * + CONTENT-TYPE + "\n" + * + EXPIRES + "\n" + * + CanonicalizedOSSHeaders + * + CanonicalizedResource))) + */ + GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest( + aliYunConfig.getBucket(), path, HttpMethod.GET); + request.setExpiration(DateUtils.addSeconds(new Date(), EXPIRY_SECONDS)); + URL url = ossClient.generatePresignedUrl(request); + return url.toString(); + } + + /** + * 阿里云OSS配置 + */ + @EqualsAndHashCode(callSuper = true) + @Data + public static class Config extends StorageConfig.Config { + /** + * accessKeyId + */ + @NotEmpty(message = "AccessKeyId不能为空") + private String accessKeyId; + /** + * accessKeySecret + */ + @NotEmpty(message = "AccessKeySecret不能为空") + private String accessKeySecret; + /** + * endpoint + */ + @NotEmpty(message = "Endpoint不能为空") + private String endpoint; + /** + * bucket + */ + @NotEmpty(message = "Bucket不能为空") + private String bucket; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/LocalStorage.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/LocalStorage.java new file mode 100644 index 00000000..0b27e167 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/LocalStorage.java @@ -0,0 +1,59 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage.impl; + +import org.springframework.web.multipart.MultipartFile; + +import cn.topiam.employee.common.storage.AbstractStorage; +import cn.topiam.employee.common.storage.StorageConfig; +import cn.topiam.employee.common.storage.StorageProviderException; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 本地存储配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/10 20:32 + */ +public class LocalStorage extends AbstractStorage { + + public LocalStorage(StorageConfig config) { + super(config); + } + + @Override + public String upload(String fileName, MultipartFile file) throws StorageProviderException { + return super.upload(fileName, file); + } + + @Override + public String download(String path) throws StorageProviderException { + return super.download(path); + } + + /** + * 本地存储 + */ + @EqualsAndHashCode(callSuper = true) + @Data + public static class Config extends StorageConfig.Config { + + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/MinIoStorage.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/MinIoStorage.java new file mode 100644 index 00000000..99b9c476 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/MinIoStorage.java @@ -0,0 +1,134 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage.impl; + +import java.io.IOException; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; + +import javax.validation.constraints.NotEmpty; + +import org.springframework.web.multipart.MultipartFile; + +import cn.topiam.employee.common.storage.AbstractStorage; +import cn.topiam.employee.common.storage.StorageConfig; +import cn.topiam.employee.common.storage.StorageProviderException; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.extern.slf4j.Slf4j; + +import io.minio.*; +import io.minio.errors.*; +import io.minio.http.Method; + +/** + * minio + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/10 20:32 + */ +@Slf4j +public class MinIoStorage extends AbstractStorage { + + private final MinioClient minioClient; + private final Config minioConfig; + + public MinIoStorage(StorageConfig config) { + super(config); + try { + minioConfig = (Config) this.config.getConfig(); + this.minioClient = MinioClient.builder().endpoint(minioConfig.getEndpoint()) + .credentials(minioConfig.getAccessKey(), minioConfig.getSecretKey()).build(); + createBucket(this.minioClient, minioConfig); + } catch (Exception e) { + log.error("create bucket excception: {}", e.getMessage(), e); + throw new StorageProviderException("create bucket excception", e); + } + } + + private void createBucket(MinioClient minioClient, + Config minioConfig) throws ServerException, InsufficientDataException, + ErrorResponseException, IOException, + NoSuchAlgorithmException, InvalidKeyException, + InvalidResponseException, XmlParserException, + InternalException { + boolean found = minioClient + .bucketExists(BucketExistsArgs.builder().bucket(minioConfig.getBucket()).build()); + if (!found) { + log.warn("{} does not exist", minioConfig.getBucket()); + minioClient + .makeBucket(MakeBucketArgs.builder().bucket(minioConfig.getBucket()).build()); + } + } + + @Override + public String upload(String fileName, MultipartFile file) throws StorageProviderException { + try { + super.upload(fileName, file); + String key = this.minioConfig.getLocation() + SEPARATOR + getFileName(fileName, file); + this.minioClient.putObject(PutObjectArgs.builder().bucket(this.minioConfig.getBucket()) + .object(key).stream(file.getInputStream(), file.getSize(), 5 * 1024 * 1024) + .contentType(file.getContentType()).build()); + return this.minioConfig.getDomain() + SEPARATOR + this.minioConfig.getBucket() + + SEPARATOR + minioConfig.getBucket() + SEPARATOR + key; + } catch (Exception e) { + log.error("minio download exception: {}", e.getMessage(), e); + throw new StorageProviderException("minio upload exception", e); + } + } + + @Override + public String download(String path) throws StorageProviderException { + try { + super.download(path); + String downloadUrl = this.minioClient.getPresignedObjectUrl( + GetPresignedObjectUrlArgs.builder().bucket(minioConfig.getBucket()).object(path) + .method(Method.GET).expiry(EXPIRY_SECONDS).build()); + return downloadUrl.replace(minioConfig.getEndpoint(), minioConfig.getDomain()); + } catch (Exception e) { + log.error("minio download exception: {}", e.getMessage(), e); + throw new StorageProviderException("minio upload exception", e); + } + } + + @EqualsAndHashCode(callSuper = true) + @Data + public static class Config extends StorageConfig.Config { + /** + * AccessKey + */ + @NotEmpty(message = "AccessKey不能为空") + private String accessKey; + /** + * SecretKey + */ + @NotEmpty(message = "SecretKey不能为空") + private String secretKey; + /** + * endpoint + */ + @NotEmpty(message = "Endpoint不能为空") + private String endpoint; + /** + * bucket + */ + @NotEmpty(message = "Bucket不能为空") + private String bucket; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/QiNiuKodoStorage.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/QiNiuKodoStorage.java new file mode 100644 index 00000000..dac186a6 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/QiNiuKodoStorage.java @@ -0,0 +1,155 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage.impl; + +import javax.validation.constraints.NotEmpty; + +import org.springframework.web.multipart.MultipartFile; + +import com.alibaba.fastjson2.JSON; +import com.qiniu.common.QiniuException; +import com.qiniu.http.Response; +import com.qiniu.storage.Configuration; +import com.qiniu.storage.DownloadUrl; +import com.qiniu.storage.Region; +import com.qiniu.storage.UploadManager; +import com.qiniu.storage.model.DefaultPutRet; +import com.qiniu.util.Auth; + +import cn.topiam.employee.common.storage.AbstractStorage; +import cn.topiam.employee.common.storage.StorageConfig; +import cn.topiam.employee.common.storage.StorageProviderException; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.extern.slf4j.Slf4j; + +/** + * 七牛kodo + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/10 20:33 + */ +@Slf4j +public class QiNiuKodoStorage extends AbstractStorage { + + private final UploadManager uploadManager; + private final Config qiNiuConfig; + + public QiNiuKodoStorage(StorageConfig config) { + super(config); + qiNiuConfig = (Config) this.config.getConfig(); + Configuration cfg = new Configuration(Region.huadong()); + uploadManager = new UploadManager(cfg); + // try { + // createBucket(cfg); + // } catch (Exception e) { + // log.error("create bucket error: {}", e.getMessage(), e); + // } + } + + // private void createBucket(Configuration cfg) { + // try { + // Auth auth = Auth.create(qiNiuConfig.getAccessKey(), qiNiuConfig.getSecretKey()); + // BucketManager bucketManager = new BucketManager(auth, cfg); + // Response response = bucketManager.createBucket(qiNiuConfig.getBucket(), "z0"); + // //解析创建成功的结果 + // BucketInfo putRet = JSON.parseObject(response.bodyString(), BucketInfo.class); + // log.info("qi niu create bucket response: {}", putRet); + // } catch (QiniuException ex) { + // Response r = ex.response; + // log.error("qi niu create bucket fail response: {}", r.toString()); + // try { + // log.error("qi niu create bucket fail response body: {}", r.bodyString()); + // } catch (QiniuException ex2) { + // //ignore + // } + // throw new StorageProviderException("qiu niu create bucket exception", ex); + // } + // } + + @Override + public String upload(String fileName, MultipartFile file) throws StorageProviderException { + try { + super.upload(fileName, file); + Auth auth = Auth.create(qiNiuConfig.getAccessKey(), qiNiuConfig.getSecretKey()); + String upToken = auth.uploadToken(qiNiuConfig.getBucket()); + Response response = uploadManager.put(file.getBytes(), + qiNiuConfig.getLocation() + SEPARATOR + getFileName(fileName, file), upToken, null, + null, true); + //解析上传成功的结果 + DefaultPutRet putRet = JSON.parseObject(response.bodyString(), DefaultPutRet.class); + log.info("qi niu upload response: {}", putRet); + return qiNiuConfig.getDomain() + SEPARATOR + putRet.key; + } catch (QiniuException ex) { + Response r = ex.response; + log.error("qi niu upload fail response: {}", r.toString()); + try { + log.error("qi niu upload fail response body: {}", r.bodyString()); + } catch (QiniuException ex2) { + //ignore + } + throw new StorageProviderException("qiu niu upload exception", ex); + } catch (Exception e) { + throw new StorageProviderException("qiu niu upload exception", e); + } + } + + @Override + public String download(String path) throws StorageProviderException { + try { + super.download(path); + DownloadUrl url = new DownloadUrl(qiNiuConfig.getDomain(), + getUrlSecure(qiNiuConfig.getDomain()), path); + Auth auth = Auth.create(qiNiuConfig.getAccessKey(), qiNiuConfig.getSecretKey()); + // 1小时,可以自定义链接过期时间 + return url.buildURL(auth, EXPIRY_SECONDS); + } catch (QiniuException ex) { + Response r = ex.response; + log.error("qi niu download fail response: {}", r.toString()); + try { + log.error("qi niu download fail response body: {}", r.bodyString()); + } catch (QiniuException ex2) { + //ignore + } + throw new StorageProviderException("qiu niu download exception", ex); + } catch (Exception e) { + throw new StorageProviderException("qiu niu download exception", e); + } + } + + @EqualsAndHashCode(callSuper = true) + @Data + public static class Config extends StorageConfig.Config { + /** + * AccessKey + */ + @NotEmpty(message = "AccessKey不能为空") + private String accessKey; + /** + * SecretKey + */ + @NotEmpty(message = "SecretKey不能为空") + private String secretKey; + /** + * bucket + */ + @NotEmpty(message = "Bucket不能为空") + private String bucket; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/TencentCosStorage.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/TencentCosStorage.java new file mode 100644 index 00000000..c8362bf9 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/impl/TencentCosStorage.java @@ -0,0 +1,173 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage.impl; + +import java.net.URL; +import java.util.Date; + +import javax.validation.constraints.NotEmpty; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.web.multipart.MultipartFile; + +import com.qcloud.cos.COSClient; +import com.qcloud.cos.ClientConfig; +import com.qcloud.cos.auth.BasicCOSCredentials; +import com.qcloud.cos.auth.COSCredentials; +import com.qcloud.cos.exception.CosClientException; +import com.qcloud.cos.exception.CosServiceException; +import com.qcloud.cos.http.HttpMethodName; +import com.qcloud.cos.http.HttpProtocol; +import com.qcloud.cos.model.*; +import com.qcloud.cos.region.Region; + +import cn.topiam.employee.common.storage.AbstractStorage; +import cn.topiam.employee.common.storage.StorageConfig; +import cn.topiam.employee.common.storage.StorageProviderException; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.extern.slf4j.Slf4j; + +/** + * 腾讯cos + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/10 20:29 + */ +@Slf4j +public class TencentCosStorage extends AbstractStorage { + private final Config tencentConfig; + private final COSClient cosClient; + + public TencentCosStorage(StorageConfig config) { + super(config); + // 1 初始化用户身份信息(secretId, secretKey)。 + // SECRETID和SECRETKEY请登录访问管理控制台 https://console.cloud.tencent.com/cam/capi 进行查看和管理 + tencentConfig = (Config) this.config.getConfig(); + COSCredentials cred = new BasicCOSCredentials(tencentConfig.getSecretId(), + tencentConfig.getSecretKey()); + // 2 设置 bucket 的地域, COS 地域的简称请参照 https://cloud.tencent.com/document/product/436/6224 + // clientConfig 中包含了设置 region, https(默认 http), 超时, 代理等 set 方法, 使用可参见源码或者常见问题 Java SDK 部分。 + ClientConfig clientConfig = new ClientConfig(new Region(tencentConfig.getRegion())); + clientConfig.setHttpProtocol(HttpProtocol.https); + // 3 生成 cos 客户端。 + cosClient = new COSClient(cred, clientConfig); + createBucket(); + } + + private void createBucket() throws StorageProviderException { + HeadBucketResult headBucketResult = cosClient + .headBucket(new HeadBucketRequest(tencentConfig.getBucket())); + if (StringUtils.isEmpty(headBucketResult.getBucketRegion())) { + // 存储桶名称,格式: BucketName-APPID + String bucket = String.join(tencentConfig.getBucket(), JOINER, + tencentConfig.getAppId()); + CreateBucketRequest createBucketRequest = new CreateBucketRequest(bucket); + // 设置 bucket 的权限为 Private(私有读写)、其他可选有 PublicRead(公有读私有写)、PublicReadWrite(公有读写) + createBucketRequest.setCannedAcl(CannedAccessControlList.PublicRead); + try { + cosClient.createBucket(createBucketRequest); + } catch (CosServiceException serverException) { + log.error("tencent create bucket server exception: {}", + serverException.getErrorMessage(), serverException); + } catch (CosClientException clientException) { + log.error("tencent create bucket client exception: {}", + clientException.getMessage(), clientException); + } + throw new StorageProviderException("tencent create bucket exception"); + } + } + + @Override + public String upload(String fileName, MultipartFile file) throws StorageProviderException { + try { + super.upload(fileName, file); + PutObjectRequest putObjectRequest = new PutObjectRequest(tencentConfig.getBucket(), + tencentConfig.getLocation() + SEPARATOR + getFileName(fileName, file), + file.getInputStream(), null); + cosClient.putObject(putObjectRequest); + return tencentConfig.getDomain() + SEPARATOR + tencentConfig.getBucket() + SEPARATOR + + putObjectRequest.getKey(); + } catch (Exception e) { + log.error("tencent upload exception: {}", e.getMessage(), e); + throw new StorageProviderException("tencent upload exception", e); + } + } + + @Override + public String download(String path) throws StorageProviderException { + try { + // 初始化永久密钥信息 + // SECRETID和SECRETKEY请登录访问管理控制台进行查看和管理 + COSCredentials cred = new BasicCOSCredentials(tencentConfig.getSecretId(), + tencentConfig.getSecretKey()); + Region region = new Region("COS_REGION"); + ClientConfig clientConfig = new ClientConfig(region); + // 如果要生成一个使用 https 协议的 URL,则设置此行,推荐设置。 + clientConfig.setHttpProtocol(HttpProtocol.https); + // 生成 cos 客户端。 + COSClient cosClient = new COSClient(cred, clientConfig); + GeneratePresignedUrlRequest req = new GeneratePresignedUrlRequest( + tencentConfig.getBucket(), path, HttpMethodName.GET); + // 设置签名过期时间(可选), 若未进行设置, 则默认使用 ClientConfig 中的签名过期时间(1小时) + // 可以设置任意一个未来的时间,推荐是设置 10 分钟到 3 天的过期时间 + // 这里设置签名在半个小时后过期 + req.setExpiration(DateUtils.addSeconds(new Date(), EXPIRY_SECONDS)); + URL url = cosClient.generatePresignedUrl(req); + return url.toString(); + } catch (Exception e) { + log.error("tencent download exception: {}", e.getMessage(), e); + throw new StorageProviderException("tencent download exception", e); + } + } + + /** + * 腾讯cos配置 + */ + @EqualsAndHashCode(callSuper = true) + @Data + public static class Config extends StorageConfig.Config { + /** + * AppId + */ + @NotEmpty(message = "AppId不能为空") + private String appId; + /** + * secretId + */ + @NotEmpty(message = "SecretId不能为空") + private String secretId; + /** + * SecretKey + */ + @NotEmpty(message = "SecretKey不能为空") + private String secretKey; + /** + * Region + */ + @NotEmpty(message = "Region不能为空") + private String region; + /** + * bucket + */ + @NotEmpty(message = "Bucket不能为空") + private String bucket; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/storage/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/storage/package-info.java new file mode 100644 index 00000000..66bfe8b5 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/storage/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.storage; \ No newline at end of file diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/util/InputStreamMetadataResolver.java b/eiam-common/src/main/java/cn/topiam/employee/common/util/InputStreamMetadataResolver.java new file mode 100644 index 00000000..d93aa7ea --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/util/InputStreamMetadataResolver.java @@ -0,0 +1,75 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.util; + +import java.io.InputStream; + +import javax.annotation.Nonnull; + +import org.opensaml.saml.metadata.resolver.impl.AbstractReloadingMetadataResolver; + +import cn.topiam.employee.support.util.Md5Utils; + +import net.shibboleth.utilities.java.support.resolver.ResolverException; + +/** + * InputStreamMetadataResolver + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/30 23:50 + */ +public class InputStreamMetadataResolver extends AbstractReloadingMetadataResolver { + private InputStream inputStream; + + public InputStream getInputStream() { + return inputStream; + } + + public void setInputStream(InputStream inputStream) { + this.inputStream = inputStream; + } + + public InputStreamMetadataResolver(@Nonnull final InputStream inputStream) { + super(); + setInputStream(inputStream); + } + + /** + * Gets an identifier which may be used to distinguish this metadata in logging statements. + * + * @return identifier which may be used to distinguish this metadata in logging statements + */ + @Override + protected String getMetadataIdentifier() { + return Md5Utils.md516(getInputStream().toString()); + } + + /** + * Fetches metadata from a source. + * + * @return the fetched metadata, or null if the metadata is known not to have changed since the last retrieval + */ + @Override + protected byte[] fetchMetadata() { + try { + return inputstreamToByteArray(inputStream); + } catch (ResolverException e) { + throw new RuntimeException(e); + } + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/util/RequestUtils.java b/eiam-common/src/main/java/cn/topiam/employee/common/util/RequestUtils.java new file mode 100644 index 00000000..68682da1 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/util/RequestUtils.java @@ -0,0 +1,84 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.util; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.StringReader; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; + +import lombok.AccessLevel; +import lombok.NoArgsConstructor; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022-03-02 22:57 + */ +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public class RequestUtils { + /** + **把request转换成json数据 + */ + public static String getBody(HttpServletRequest request) { + StringBuilder sb = new StringBuilder(); + try (BufferedReader reader = new BufferedReader( + new InputStreamReader(request.getInputStream(), StandardCharsets.UTF_8))) { + String line; + while ((line = reader.readLine()) != null) { + sb.append(line); + } + } catch (IOException e) { + e.printStackTrace(); + } + return sb.toString(); + } + + /** + **把request转换成xml数据 + */ + public static T getXml(HttpServletRequest request, Class clazz) throws JAXBException { + String body = getBody(request); + StringReader reader = new StringReader(body); + return (T) JAXBContext.newInstance(clazz).createUnmarshaller().unmarshal(reader); + } + + /** + **把request转换成map数据 + */ + public static Map getParams(HttpServletRequest request) { + Map params = new HashMap<>(16); + Map requestParams = request.getParameterMap(); + for (Map.Entry entry : requestParams.entrySet()) { + String[] values = entry.getValue(); + String valueStr = ""; + for (int i = 0; i < values.length; i++) { + valueStr = (i == values.length - 1) ? valueStr + values[i] + : valueStr + values[i] + ","; + } + params.put(entry.getKey(), valueStr); + } + return params; + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/util/SamlKeyStoreProvider.java b/eiam-common/src/main/java/cn/topiam/employee/common/util/SamlKeyStoreProvider.java new file mode 100644 index 00000000..eeaa18a8 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/util/SamlKeyStoreProvider.java @@ -0,0 +1,172 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.util; + +import java.io.IOException; +import java.io.InputStream; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.cert.Certificate; +import java.security.cert.CertificateException; +import java.util.*; + +import org.opensaml.core.criterion.EntityIdCriterion; +import org.opensaml.saml.saml2.metadata.EntityDescriptor; +import org.opensaml.security.credential.Credential; +import org.opensaml.security.credential.impl.KeyStoreCredentialResolver; +import org.opensaml.xmlsec.config.impl.DefaultSecurityConfigurationBootstrap; +import org.opensaml.xmlsec.keyinfo.KeyInfoGenerator; +import org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager; +import org.opensaml.xmlsec.signature.KeyInfo; + +import cn.topiam.employee.support.exception.TopIamException; + +import net.shibboleth.utilities.java.support.resolver.CriteriaSet; +import net.shibboleth.utilities.java.support.resolver.ResolverException; +import static org.springframework.util.StringUtils.hasText; + +import static cn.topiam.employee.common.util.SamlUtils.getParserPool; + +/** + * 用于解析证书与私钥的工具类 + * + * @author TopIAM + */ +public class SamlKeyStoreProvider { + + private static final char[] DEFAULT_KS_PASSWD = UUID.randomUUID().toString().toCharArray(); + + /** + * 获取 KeyInfo + * + * @param credential {@link Credential} + * @return {@link KeyInfo} + */ + public static KeyInfo getKeyInfo(Credential credential) { + try { + NamedKeyInfoGeneratorManager manager = DefaultSecurityConfigurationBootstrap + .buildBasicKeyInfoGeneratorManager(); + KeyInfoGenerator generator = Objects + .requireNonNull(manager.getDefaultManager().getFactory(credential)).newInstance(); + return generator.generate(credential); + } catch (Exception e) { + throw new TopIamException(e.getMessage()); + } + } + + public static KeyStore getKeyStore(String entityId, String privateKey, String certificateString, + String password) { + try { + KeyStore ks = KeyStore.getInstance("JKS"); + ks.load(null, DEFAULT_KS_PASSWD); + + byte[] certBytes = X509Utilities.getDer(certificateString); + Certificate certificate = X509Utilities.getCertificate(certBytes); + ks.setCertificateEntry(entityId, certificate); + + if (hasText(privateKey)) { + PrivateKey pkey = X509Utilities.readPrivateKey(privateKey, password); + ks.setKeyEntry(entityId, pkey, password.toCharArray(), + new Certificate[] { certificate }); + } + + return ks; + } catch (KeyStoreException | NoSuchAlgorithmException | CertificateException + | IOException e) { + throw new RuntimeException(e); + } + } + + private static KeyStoreCredentialResolver getCredentialsResolver(String entityId, String key, + String cer, String password) { + KeyStore ks = getKeyStore(entityId, key, cer, password); + Map passwords = hasText(key) ? Collections.singletonMap(entityId, password) + : Collections.emptyMap(); + return new KeyStoreCredentialResolver(ks, passwords); + } + + public static Credential getCredential(String entityId, String key, String cer, + String password) { + try { + KeyStoreCredentialResolver resolver = getCredentialsResolver(entityId, key, cer, + password); + CriteriaSet cs = new CriteriaSet(); + EntityIdCriterion criteria = new EntityIdCriterion(entityId); + cs.add(criteria); + return resolver.resolveSingle(cs); + } catch (ResolverException e) { + throw new RuntimeException("Can't obtain private key", e); + } + } + + /** + * 获取 KeyStoreCredentialResolver + * + * @param entityId {@link String} + * @param credential {@link String} + * @return {@link KeyStoreCredentialResolver} + */ + public static KeyStoreCredentialResolver getKeyStoreCredentialResolver(String entityId, + String credential) { + + KeyStore keyStore = getKeyStore(entityId, credential); + return new KeyStoreCredentialResolver(keyStore, new HashMap<>(16)); + } + + public static KeyStore getKeyStore(String entityId, String cert) { + try { + KeyStore ks = KeyStore.getInstance("JKS"); + ks.load(null, DEFAULT_KS_PASSWD); + + byte[] certBytes = X509Utilities.getDer(cert); + Certificate certificate = X509Utilities.getCertificate(certBytes); + ks.setCertificateEntry(entityId, certificate); + return ks; + } catch (KeyStoreException | NoSuchAlgorithmException | CertificateException + | IOException e) { + throw new RuntimeException(e); + } + } + + /** + * 获取 EntityDescriptor + * + * @param inputStream {@link InputStream} + * @return {@link EntityDescriptor} + */ + public static List getEntityDescriptors(InputStream inputStream) { + List list = new ArrayList<>(); + try { + InputStreamMetadataResolver idpMetaDataProvider = new InputStreamMetadataResolver( + inputStream); + idpMetaDataProvider.setRequireValidMetadata(true); + idpMetaDataProvider.setId(idpMetaDataProvider.getClass().getCanonicalName()); + idpMetaDataProvider.setParserPool(getParserPool()); + idpMetaDataProvider.initialize(); + for (EntityDescriptor idpEntityDescriptor : idpMetaDataProvider) { + list.add(idpEntityDescriptor); + } + } catch (Exception e) { + throw new TopIamException(e.getMessage(), e); + } + return list; + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/util/SamlUtils.java b/eiam-common/src/main/java/cn/topiam/employee/common/util/SamlUtils.java new file mode 100644 index 00000000..571bc387 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/util/SamlUtils.java @@ -0,0 +1,207 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.util; + +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.atomic.AtomicBoolean; + +import javax.servlet.http.HttpServletRequest; +import javax.xml.namespace.QName; + +import org.opensaml.core.config.ConfigurationService; +import org.opensaml.core.config.InitializationException; +import org.opensaml.core.config.InitializationService; +import org.opensaml.core.xml.XMLObject; +import org.opensaml.core.xml.XMLObjectBuilderFactory; +import org.opensaml.core.xml.config.XMLObjectProviderRegistry; +import org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport; +import org.opensaml.core.xml.io.Marshaller; +import org.opensaml.core.xml.io.MarshallingException; +import org.opensaml.messaging.context.MessageContext; +import org.opensaml.saml.common.SAMLObject; +import org.opensaml.saml.common.SignableSAMLObject; +import org.opensaml.saml.saml2.binding.decoding.impl.HTTPPostDecoder; +import org.opensaml.saml.saml2.binding.decoding.impl.HTTPRedirectDeflateDecoder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.w3c.dom.Element; + +import cn.topiam.employee.support.exception.TopIamException; + +import net.shibboleth.utilities.java.support.component.ComponentInitializationException; +import net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy; +import net.shibboleth.utilities.java.support.security.impl.SecureRandomIdentifierGenerationStrategy; +import net.shibboleth.utilities.java.support.xml.BasicParserPool; +import net.shibboleth.utilities.java.support.xml.ParserPool; +import net.shibboleth.utilities.java.support.xml.SerializeSupport; +import static org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport.getMarshallerFactory; +import static org.opensaml.saml.common.xml.SAMLConstants.POST_METHOD; + +/** + * SAML utils + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/18 21:54 + */ +public class SamlUtils { + private final static Logger logger = LoggerFactory.getLogger(SamlUtils.class); + private static final AtomicBoolean INITIALIZED = new AtomicBoolean(false); + + /** + * transformSamlObject2String + * + * @param samlObject {@link SAMLObject} + * @return {@link String} + */ + public static String transformSamlObject2String(SAMLObject samlObject) { + try { + return SerializeSupport.nodeToString( + Objects.requireNonNull(getMarshallerFactory().getMarshaller(samlObject)) + .marshall(samlObject)); + } catch (Exception e) { + throw new TopIamException(e.getMessage()); + } + } + + private static final IdentifierGenerationStrategy IDENTIFIER_GENERATION_STRATEGY; + + static { + IDENTIFIER_GENERATION_STRATEGY = new SecureRandomIdentifierGenerationStrategy(); + + } + + public static T buildSamlObject(final Class clazz) { + T object; + try { + XMLObjectBuilderFactory builderFactory = XMLObjectProviderRegistrySupport + .getBuilderFactory(); + QName defaultElementName = (QName) clazz.getDeclaredField("DEFAULT_ELEMENT_NAME") + .get(null); + object = (T) builderFactory.getBuilder(defaultElementName) + .buildObject(defaultElementName); + } catch (IllegalAccessException | NoSuchFieldException e) { + throw new IllegalArgumentException("Could not create SAML object"); + } + + return object; + } + + public static String generateSecureRandomId() { + return IDENTIFIER_GENERATION_STRATEGY.generateIdentifier(); + } + + public static void logSamlObject(final XMLObject object) { + Element element = null; + + if (object instanceof SignableSAMLObject && ((SignableSAMLObject) object).isSigned() + && object.getDOM() != null) { + element = object.getDOM(); + } else { + try { + Marshaller out = XMLObjectProviderRegistrySupport.getMarshallerFactory() + .getMarshaller(object); + out.marshall(object); + element = object.getDOM(); + + } catch (MarshallingException e) { + logger.error(e.getMessage(), e); + } + } + + String xmlString = SerializeSupport.prettyPrintXML(element); + + logger.info("\n" + xmlString); + + } + + /** + * 初始化openSaml + */ + public static void initOpenSaml() { + if (INITIALIZED.compareAndSet(false, true)) { + logger.trace("Initializing OpenSAML"); + XMLObjectProviderRegistry registry = new XMLObjectProviderRegistry(); + ConfigurationService.register(XMLObjectProviderRegistry.class, registry); + registry.setParserPool(getParserPool()); + try { + InitializationService.initialize(); + logger.debug("Initialized OpenSAML"); + } catch (InitializationException e) { + logger.error(e.getMessage(), e); + } + } + logger.debug("Refused to re-initialize OpenSAML"); + } + + @SuppressWarnings("HttpUrlsUsage") + public static ParserPool getParserPool() { + BasicParserPool parserPool = new BasicParserPool(); + parserPool.setMaxPoolSize(100); + parserPool.setCoalescing(true); + parserPool.setIgnoreComments(true); + parserPool.setIgnoreElementContentWhitespace(true); + parserPool.setNamespaceAware(true); + parserPool.setExpandEntityReferences(false); + parserPool.setXincludeAware(false); + + final Map features = new HashMap<>(16); + features.put("http://xml.org/sax/features/external-general-entities", Boolean.FALSE); + features.put("http://xml.org/sax/features/external-parameter-entities", Boolean.FALSE); + features.put("http://apache.org/xml/features/disallow-doctype-decl", Boolean.TRUE); + features.put("http://apache.org/xml/features/validation/schema/normalized-value", + Boolean.FALSE); + features.put("http://javax.xml.XMLConstants/feature/secure-processing", Boolean.TRUE); + parserPool.setBuilderFeatures(features); + parserPool.setBuilderAttributes(new HashMap<>(16)); + try { + parserPool.initialize(); + } catch (ComponentInitializationException e) { + logger.error(e.getMessage(), e); + } + + return parserPool; + } + + /** + * 获取 Message Context + * + * @param request {@link HttpServletRequest} + * @return {@link MessageContext} + */ + public static MessageContext getMessageContext(HttpServletRequest request) { + try { + if (request.getMethod().equals(POST_METHOD)) { + HTTPPostDecoder decoder = new HTTPPostDecoder(); + decoder.setHttpServletRequest(request); + decoder.initialize(); + decoder.decode(); + return decoder.getMessageContext(); + } + //GET + HTTPRedirectDeflateDecoder decoder = new HTTPRedirectDeflateDecoder(); + decoder.setHttpServletRequest(request); + decoder.initialize(); + decoder.decode(); + return decoder.getMessageContext(); + } catch (Exception e) { + throw new TopIamException(e.getMessage(), e); + } + } +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/util/X509Utilities.java b/eiam-common/src/main/java/cn/topiam/employee/common/util/X509Utilities.java new file mode 100644 index 00000000..045a7608 --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/util/X509Utilities.java @@ -0,0 +1,136 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.util; + +import java.io.ByteArrayInputStream; +import java.io.CharArrayReader; +import java.io.IOException; +import java.security.*; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.security.interfaces.RSAPrivateKey; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.PKCS8EncodedKeySpec; + +import javax.xml.bind.DatatypeConverter; + +import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; +import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo; +import org.bouncycastle.openssl.PEMDecryptorProvider; +import org.bouncycastle.openssl.PEMEncryptedKeyPair; +import org.bouncycastle.openssl.PEMKeyPair; +import org.bouncycastle.openssl.PEMParser; +import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; +import org.bouncycastle.openssl.jcajce.JcePEMDecryptorProviderBuilder; + +/** + * 读取证书和私钥的工具类 + * + * @author TopIAM + */ +public class X509Utilities { + + public static final String BEGIN_CERT = "-----BEGIN CERTIFICATE-----\n"; + public static final String END_CERT = "-----END CERTIFICATE-----"; + public static final String BEGIN_KEY = "-----BEGIN RSA PRIVATE KEY-----\n"; + public static final String END_KEY = "-----END RSA PRIVATE KEY-----"; + + public static byte[] getDer(String combinedKeyAndCertPem, String begin, String end) { + String[] tokens = combinedKeyAndCertPem.split(begin); + tokens = tokens[0].split(end); + return getDer(tokens[0]); + } + + public static byte[] getDer(String pem) { + String data = keyCleanup(pem); + + return DatatypeConverter.parseBase64Binary(data); + } + + public static String keyCleanup(String pem) { + return pem.replace(BEGIN_CERT, "").replace(END_CERT, "").replace(BEGIN_KEY, "") + .replace(END_KEY, "").replace("\n", "").trim(); + } + + public static X509Certificate getCertificate(byte[] der) throws CertificateException { + CertificateFactory factory = CertificateFactory.getInstance("X.509"); + return (X509Certificate) factory.generateCertificate(new ByteArrayInputStream(der)); + } + + public static RSAPrivateKey getPrivateKey(byte[] der, + String algorithm) throws InvalidKeySpecException, + NoSuchAlgorithmException { + PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(der); + KeyFactory factory = KeyFactory.getInstance(algorithm); + return (RSAPrivateKey) factory.generatePrivate(spec); + } + + public static PrivateKey readPrivateKey(String pem, String passphrase) throws IOException { + + PEMParser parser = new PEMParser(new CharArrayReader(pem.toCharArray())); + Object obj = parser.readObject(); + parser.close(); + JcaPEMKeyConverter converter = new JcaPEMKeyConverter().setProvider("BC"); + KeyPair kp; + if (obj == null) { + throw new NullPointerException("Unable to decode PEM key:" + pem); + } else if (obj instanceof PEMEncryptedKeyPair) { + // Encrypted key - we will use provided password + PEMEncryptedKeyPair ckp = (PEMEncryptedKeyPair) obj; + PEMDecryptorProvider decProv = new JcePEMDecryptorProviderBuilder() + .build(passphrase.toCharArray()); + kp = converter.getKeyPair(ckp.decryptKeyPair(decProv)); + } else if (obj instanceof PrivateKeyInfo) { + PrivateKeyInfo privateKeyInfo = (PrivateKeyInfo) obj; + return converter.getPrivateKey(privateKeyInfo); + } else { + // Unencrypted key - no password needed + PEMKeyPair ukp = (PEMKeyPair) obj; + kp = converter.getKeyPair(ukp); + } + return kp.getPrivate(); + } + + public static PublicKey readPublicKey(String pem, String passphrase) throws IOException { + + PEMParser parser = new PEMParser(new CharArrayReader(pem.toCharArray())); + Object obj = parser.readObject(); + parser.close(); + JcaPEMKeyConverter converter = new JcaPEMKeyConverter().setProvider("BC"); + KeyPair kp; + if (obj == null) { + throw new NullPointerException("Unable to decode PEM key:" + pem); + } else if (obj instanceof PEMEncryptedKeyPair) { + // Encrypted key - we will use provided password + PEMEncryptedKeyPair ckp = (PEMEncryptedKeyPair) obj; + PEMDecryptorProvider decProv = new JcePEMDecryptorProviderBuilder() + .build(passphrase.toCharArray()); + kp = converter.getKeyPair(ckp.decryptKeyPair(decProv)); + } else if (obj instanceof SubjectPublicKeyInfo) { + SubjectPublicKeyInfo privateKeyInfo = (SubjectPublicKeyInfo) obj; + return converter.getPublicKey(privateKeyInfo); + } else { + // Unencrypted key - no password needed + PEMKeyPair ukp = (PEMKeyPair) obj; + kp = converter.getKeyPair(ukp); + } + return kp.getPublic(); + } + +} diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/util/package-info.java b/eiam-common/src/main/java/cn/topiam/employee/common/util/package-info.java new file mode 100644 index 00000000..fc58057c --- /dev/null +++ b/eiam-common/src/main/java/cn/topiam/employee/common/util/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-common - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.common.util; \ No newline at end of file diff --git a/eiam-common/src/main/resources/config/logback-spring.xml b/eiam-common/src/main/resources/config/logback-spring.xml new file mode 100644 index 00000000..2e31559a --- /dev/null +++ b/eiam-common/src/main/resources/config/logback-spring.xml @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + utf-8 + + + + + + ${CONSOLE_LOG_PATTERN} + utf-8 + + + ERROR + ACCEPT + DENY + + + ${ROOT}%d/%d-error-%i.log + ${MAXHISTORY} + + ${FILESIZE} + + + + + + + ${CONSOLE_LOG_PATTERN} + utf-8 + + + WARN + ACCEPT + DENY + + + ${ROOT}%d/%d-warn-%i.log + ${MAXHISTORY} + + ${FILESIZE} + + + + + + + ${CONSOLE_LOG_PATTERN} + utf-8 + + + INFO + ACCEPT + DENY + + + ${ROOT}%d/%d-info-%i.log + ${MAXHISTORY} + + ${FILESIZE} + + + + + + + ${CONSOLE_LOG_PATTERN} + utf-8 + + + DEBUG + ACCEPT + DENY + + + ${ROOT}%d/%d-debug-%i.log + ${MAXHISTORY} + + ${FILESIZE} + + + + + + + ${CONSOLE_LOG_PATTERN} + utf-8 + + + TRACE + ACCEPT + DENY + + + ${ROOT}%d/%d-trace-%i.log + ${MAXHISTORY} + + ${FILESIZE} + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eiam-common/src/main/resources/db/changelog/administrator-changelog.xml b/eiam-common/src/main/resources/db/changelog/administrator-changelog.xml new file mode 100644 index 00000000..417a4260 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/administrator-changelog.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/app-changelog.xml b/eiam-common/src/main/resources/db/changelog/app-changelog.xml new file mode 100644 index 00000000..3acdc71f --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/app-changelog.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/app_access_policy-changelog.xml b/eiam-common/src/main/resources/db/changelog/app_access_policy-changelog.xml new file mode 100644 index 00000000..7a9375d4 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/app_access_policy-changelog.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/app_account-changelog.xml b/eiam-common/src/main/resources/db/changelog/app_account-changelog.xml new file mode 100644 index 00000000..a1b17ec5 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/app_account-changelog.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/app_cert-changelog.xml b/eiam-common/src/main/resources/db/changelog/app_cert-changelog.xml new file mode 100644 index 00000000..a6e6d2ce --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/app_cert-changelog.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/app_oidc_config-changelog.xml b/eiam-common/src/main/resources/db/changelog/app_oidc_config-changelog.xml new file mode 100644 index 00000000..7613ce3a --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/app_oidc_config-changelog.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/app_permission_action-changelog.xml b/eiam-common/src/main/resources/db/changelog/app_permission_action-changelog.xml new file mode 100644 index 00000000..65d290d9 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/app_permission_action-changelog.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/app_permission_policy-changelog.xml b/eiam-common/src/main/resources/db/changelog/app_permission_policy-changelog.xml new file mode 100644 index 00000000..356bfae7 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/app_permission_policy-changelog.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/app_permission_resource-changelog.xml b/eiam-common/src/main/resources/db/changelog/app_permission_resource-changelog.xml new file mode 100644 index 00000000..db230196 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/app_permission_resource-changelog.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/app_permission_role-changelog.xml b/eiam-common/src/main/resources/db/changelog/app_permission_role-changelog.xml new file mode 100644 index 00000000..f9bccb39 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/app_permission_role-changelog.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/app_saml2_config-changelog.xml b/eiam-common/src/main/resources/db/changelog/app_saml2_config-changelog.xml new file mode 100644 index 00000000..9f361e74 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/app_saml2_config-changelog.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/audit-changelog.xml b/eiam-common/src/main/resources/db/changelog/audit-changelog.xml new file mode 100644 index 00000000..ca2b3a1c --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/audit-changelog.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/identity_provider-changelog.xml b/eiam-common/src/main/resources/db/changelog/identity_provider-changelog.xml new file mode 100644 index 00000000..2026fade --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/identity_provider-changelog.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eiam-common/src/main/resources/db/changelog/identity_source-changelog.xml b/eiam-common/src/main/resources/db/changelog/identity_source-changelog.xml new file mode 100644 index 00000000..a9076f45 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/identity_source-changelog.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eiam-common/src/main/resources/db/changelog/identity_source_event_record-changelog.xml b/eiam-common/src/main/resources/db/changelog/identity_source_event_record-changelog.xml new file mode 100644 index 00000000..6b371e49 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/identity_source_event_record-changelog.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eiam-common/src/main/resources/db/changelog/identity_source_sync_history-changelog.xml b/eiam-common/src/main/resources/db/changelog/identity_source_sync_history-changelog.xml new file mode 100644 index 00000000..cbcd7b13 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/identity_source_sync_history-changelog.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eiam-common/src/main/resources/db/changelog/identity_source_sync_record-changelog.xml b/eiam-common/src/main/resources/db/changelog/identity_source_sync_record-changelog.xml new file mode 100644 index 00000000..8127440a --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/identity_source_sync_record-changelog.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eiam-common/src/main/resources/db/changelog/mail_send_record-changelog.xml b/eiam-common/src/main/resources/db/changelog/mail_send_record-changelog.xml new file mode 100644 index 00000000..081dc3b6 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/mail_send_record-changelog.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/mail_template-changelog.xml b/eiam-common/src/main/resources/db/changelog/mail_template-changelog.xml new file mode 100644 index 00000000..f8055832 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/mail_template-changelog.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/organization-changelog.xml b/eiam-common/src/main/resources/db/changelog/organization-changelog.xml new file mode 100644 index 00000000..2c18e666 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/organization-changelog.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/organization_member-changelog.xml b/eiam-common/src/main/resources/db/changelog/organization_member-changelog.xml new file mode 100644 index 00000000..8de7b968 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/organization_member-changelog.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/setting-changlog.xml b/eiam-common/src/main/resources/db/changelog/setting-changlog.xml new file mode 100644 index 00000000..100c107d --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/setting-changlog.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/sms_send_record-changelog.xml b/eiam-common/src/main/resources/db/changelog/sms_send_record-changelog.xml new file mode 100644 index 00000000..91e50b60 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/sms_send_record-changelog.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/user-changelog.xml b/eiam-common/src/main/resources/db/changelog/user-changelog.xml new file mode 100644 index 00000000..f581695e --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/user-changelog.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/user_detail-changelog.xml b/eiam-common/src/main/resources/db/changelog/user_detail-changelog.xml new file mode 100644 index 00000000..6e9c0ba9 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/user_detail-changelog.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/user_group-changelog.xml b/eiam-common/src/main/resources/db/changelog/user_group-changelog.xml new file mode 100644 index 00000000..5a9d79b3 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/user_group-changelog.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/user_group_member-changelog.xml b/eiam-common/src/main/resources/db/changelog/user_group_member-changelog.xml new file mode 100644 index 00000000..dac8f0f0 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/user_group_member-changelog.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/changelog/user_history_password-changelog.xml b/eiam-common/src/main/resources/db/changelog/user_history_password-changelog.xml new file mode 100644 index 00000000..0f478818 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/user_history_password-changelog.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eiam-common/src/main/resources/db/changelog/user_idp_bind-changlog.xml b/eiam-common/src/main/resources/db/changelog/user_idp_bind-changlog.xml new file mode 100644 index 00000000..bc179af1 --- /dev/null +++ b/eiam-common/src/main/resources/db/changelog/user_idp_bind-changlog.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eiam-common/src/main/resources/db/eiam-changelog-master.xml b/eiam-common/src/main/resources/db/eiam-changelog-master.xml new file mode 100644 index 00000000..86ea095d --- /dev/null +++ b/eiam-common/src/main/resources/db/eiam-changelog-master.xml @@ -0,0 +1,29 @@ + + + + + + diff --git a/eiam-common/src/main/resources/dictionaries/10k-most-common.txt b/eiam-common/src/main/resources/dictionaries/10k-most-common.txt new file mode 100644 index 00000000..c03abe88 --- /dev/null +++ b/eiam-common/src/main/resources/dictionaries/10k-most-common.txt @@ -0,0 +1,10000 @@ +password +123456 +12345678 +1234 +qwerty +12345 +dragon +pussy +baseball +football +letmein +monkey +696969 +abc123 +mustang +michael +shadow +master +jennifer +111111 +2000 +jordan +superman +harley +1234567 +fuckme +hunter +fuckyou +trustno1 +ranger +buster +thomas +tigger +robert +soccer +fuck +batman +test +pass +killer +hockey +george +charlie +andrew +michelle +love +sunshine +jessica +asshole +6969 +pepper +daniel +access +123456789 +654321 +joshua +maggie +starwars +silver +william +dallas +yankees +123123 +ashley +666666 +hello +amanda +orange +biteme +freedom +computer +sexy +thunder +nicole +ginger +heather +hammer +summer +corvette +taylor +fucker +austin +1111 +merlin +matthew +121212 +golfer +cheese +princess +martin +chelsea +patrick +richard +diamond +yellow +bigdog +secret +asdfgh +sparky +cowboy +camaro +anthony +matrix +falcon +iloveyou +bailey +guitar +jackson +purple +scooter +phoenix +aaaaaa +morgan +tigers +porsche +mickey +maverick +cookie +nascar +peanut +justin +131313 +money +horny +samantha +panties +steelers +joseph +snoopy +boomer +whatever +iceman +smokey +gateway +dakota +cowboys +eagles +chicken +dick +black +zxcvbn +please +andrea +ferrari +knight +hardcore +melissa +compaq +coffee +booboo +bitch +johnny +bulldog +xxxxxx +welcome +james +player +ncc1701 +wizard +scooby +charles +junior +internet +bigdick +mike +brandy +tennis +blowjob +banana +monster +spider +lakers +miller +rabbit +enter +mercedes +brandon +steven +fender +john +yamaha +diablo +chris +boston +tiger +marine +chicago +rangers +gandalf +winter +bigtits +barney +edward +raiders +porn +badboy +blowme +spanky +bigdaddy +johnson +chester +london +midnight +blue +fishing +000000 +hannah +slayer +11111111 +rachel +sexsex +redsox +thx1138 +asdf +marlboro +panther +zxcvbnm +arsenal +oliver +qazwsx +mother +victoria +7777777 +jasper +angel +david +winner +crystal +golden +butthead +viking +jack +iwantu +shannon +murphy +angels +prince +cameron +girls +madison +wilson +carlos +hooters +willie +startrek +captain +maddog +jasmine +butter +booger +angela +golf +lauren +rocket +tiffany +theman +dennis +liverpoo +flower +forever +green +jackie +muffin +turtle +sophie +danielle +redskins +toyota +jason +sierra +winston +debbie +giants +packers +newyork +jeremy +casper +bubba +112233 +sandra +lovers +mountain +united +cooper +driver +tucker +helpme +fucking +pookie +lucky +maxwell +8675309 +bear +suckit +gators +5150 +222222 +shithead +fuckoff +jaguar +monica +fred +happy +hotdog +tits +gemini +lover +xxxxxxxx +777777 +canada +nathan +victor +florida +88888888 +nicholas +rosebud +metallic +doctor +trouble +success +stupid +tomcat +warrior +peaches +apples +fish +qwertyui +magic +buddy +dolphins +rainbow +gunner +987654 +freddy +alexis +braves +cock +2112 +1212 +cocacola +xavier +dolphin +testing +bond007 +member +calvin +voodoo +7777 +samson +alex +apollo +fire +tester +walter +beavis +voyager +peter +porno +bonnie +rush2112 +beer +apple +scorpio +jonathan +skippy +sydney +scott +red123 +power +gordon +travis +beaver +star +jackass +flyers +boobs +232323 +zzzzzz +steve +rebecca +scorpion +doggie +legend +ou812 +yankee +blazer +bill +runner +birdie +bitches +555555 +parker +topgun +asdfasdf +heaven +viper +animal +2222 +bigboy +4444 +arthur +baby +private +godzilla +donald +williams +lifehack +phantom +dave +rock +august +sammy +cool +brian +platinum +jake +bronco +paul +mark +frank +heka6w2 +copper +billy +cumshot +garfield +willow +cunt +little +carter +slut +albert +69696969 +kitten +super +jordan23 +eagle1 +shelby +america +11111 +jessie +house +free +123321 +chevy +bullshit +white +broncos +horney +surfer +nissan +999999 +saturn +airborne +elephant +marvin +shit +action +adidas +qwert +kevin +1313 +explorer +walker +police +christin +december +benjamin +wolf +sweet +therock +king +online +dickhead +brooklyn +teresa +cricket +sharon +dexter +racing +penis +gregory +0000 +teens +redwings +dreams +michigan +hentai +magnum +87654321 +nothing +donkey +trinity +digital +333333 +stella +cartman +guinness +123abc +speedy +buffalo +kitty +pimpin +eagle +einstein +kelly +nelson +nirvana +vampire +xxxx +playboy +louise +pumpkin +snowball +test123 +girl +sucker +mexico +beatles +fantasy +ford +gibson +celtic +marcus +cherry +cassie +888888 +natasha +sniper +chance +genesis +hotrod +reddog +alexande +college +jester +passw0rd +bigcock +smith +lasvegas +carmen +slipknot +3333 +death +kimberly +1q2w3e +eclipse +1q2w3e4r +stanley +samuel +drummer +homer +montana +music +aaaa +spencer +jimmy +carolina +colorado +creative +hello1 +rocky +goober +friday +bollocks +scotty +abcdef +bubbles +hawaii +fluffy +mine +stephen +horses +thumper +5555 +pussies +darkness +asdfghjk +pamela +boobies +buddha +vanessa +sandman +naughty +douglas +honda +matt +azerty +6666 +shorty +money1 +beach +loveme +4321 +simple +poohbear +444444 +badass +destiny +sarah +denise +vikings +lizard +melanie +assman +sabrina +nintendo +water +good +howard +time +123qwe +november +xxxxx +october +leather +bastard +young +101010 +extreme +hard +password1 +vincent +pussy1 +lacrosse +hotmail +spooky +amateur +alaska +badger +paradise +maryjane +poop +crazy +mozart +video +russell +vagina +spitfire +anderson +norman +eric +cherokee +cougar +barbara +long +420420 +family +horse +enigma +allison +raider +brazil +blonde +jones +55555 +dude +drowssap +jeff +school +marshall +lovely +1qaz2wsx +jeffrey +caroline +franklin +booty +molly +snickers +leslie +nipples +courtney +diesel +rocks +eminem +westside +suzuki +daddy +passion +hummer +ladies +zachary +frankie +elvis +reggie +alpha +suckme +simpson +patricia +147147 +pirate +tommy +semperfi +jupiter +redrum +freeuser +wanker +stinky +ducati +paris +natalie +babygirl +bishop +windows +spirit +pantera +monday +patches +brutus +houston +smooth +penguin +marley +forest +cream +212121 +flash +maximus +nipple +bobby +bradley +vision +pokemon +champion +fireman +indian +softball +picard +system +clinton +cobra +enjoy +lucky1 +claire +claudia +boogie +timothy +marines +security +dirty +admin +wildcats +pimp +dancer +hardon +veronica +fucked +abcd1234 +abcdefg +ironman +wolverin +remember +great +freepass +bigred +squirt +justice +francis +hobbes +kermit +pearljam +mercury +domino +9999 +denver +brooke +rascal +hitman +mistress +simon +tony +bbbbbb +friend +peekaboo +naked +budlight +electric +sluts +stargate +saints +bondage +brittany +bigman +zombie +swimming +duke +qwerty1 +babes +scotland +disney +rooster +brenda +mookie +swordfis +candy +duncan +olivia +hunting +blink182 +alicia +8888 +samsung +bubba1 +whore +virginia +general +passport +aaaaaaaa +erotic +liberty +arizona +jesus +abcd +newport +skipper +rolltide +balls +happy1 +galore +christ +weasel +242424 +wombat +digger +classic +bulldogs +poopoo +accord +popcorn +turkey +jenny +amber +bunny +mouse +007007 +titanic +liverpool +dreamer +everton +friends +chevelle +carrie +gabriel +psycho +nemesis +burton +pontiac +connor +eatme +lickme +roland +cumming +mitchell +ireland +lincoln +arnold +spiderma +patriots +goblue +devils +eugene +empire +asdfg +cardinal +brown +shaggy +froggy +qwer +kawasaki +kodiak +people +phpbb +light +54321 +kramer +chopper +hooker +honey +whynot +lesbian +lisa +baxter +adam +snake +teen +ncc1701d +qqqqqq +airplane +britney +avalon +sandy +sugar +sublime +stewart +wildcat +raven +scarface +elizabet +123654 +trucks +wolfpack +pervert +lawrence +raymond +redhead +american +alyssa +bambam +movie +woody +shaved +snowman +tiger1 +chicks +raptor +1969 +stingray +shooter +france +stars +madmax +kristen +sports +jerry +789456 +garcia +simpsons +lights +ryan +looking +chronic +alison +hahaha +packard +hendrix +perfect +service +spring +srinivas +spike +katie +252525 +oscar +brother +bigmac +suck +single +cannon +georgia +popeye +tattoo +texas +party +bullet +taurus +sailor +wolves +panthers +japan +strike +flowers +pussycat +chris1 +loverboy +berlin +sticky +marina +tarheels +fisher +russia +connie +wolfgang +testtest +mature +bass +catch22 +juice +michael1 +nigger +159753 +women +alpha1 +trooper +hawkeye +head +freaky +dodgers +pakistan +machine +pyramid +vegeta +katana +moose +tinker +coyote +infinity +inside +pepsi +letmein1 +bang +control +hercules +morris +james1 +tickle +outlaw +browns +billybob +pickle +test1 +michele +antonio +sucks +pavilion +changeme +caesar +prelude +tanner +adrian +darkside +bowling +wutang +sunset +robbie +alabama +danger +zeppelin +juan +rusty +pppppp +nick +2001 +ping +darkstar +madonna +qwe123 +bigone +casino +cheryl +charlie1 +mmmmmm +integra +wrangler +apache +tweety +qwerty12 +bobafett +simone +none +business +sterling +trevor +transam +dustin +harvey +england +2323 +seattle +ssssss +rose +harry +openup +pandora +pussys +trucker +wallace +indigo +storm +malibu +weed +review +babydoll +doggy +dilbert +pegasus +joker +catfish +flipper +valerie +herman +fuckit +detroit +kenneth +cheyenne +bruins +stacey +smoke +joey +seven +marino +fetish +xfiles +wonder +stinger +pizza +babe +pretty +stealth +manutd +gracie +gundam +cessna +longhorn +presario +mnbvcxz +wicked +mustang1 +victory +21122112 +shelly +awesome +athena +q1w2e3r4 +help +holiday +knicks +street +redneck +12341234 +casey +gizmo +scully +dragon1 +devildog +triumph +eddie +bluebird +shotgun +peewee +ronnie +angel1 +daisy +special +metallica +madman +country +impala +lennon +roscoe +omega +access14 +enterpri +miranda +search +smitty +blizzard +unicorn +tight +rick +ronald +asdf1234 +harrison +trigger +truck +danny +home +winnie +beauty +thailand +1234567890 +cadillac +castle +tyler +bobcat +buddy1 +sunny +stones +asian +freddie +chuck +butt +loveyou +norton +hellfire +hotsex +indiana +short +panzer +lonewolf +trumpet +colors +blaster +12121212 +fireball +logan +precious +aaron +elaine +jungle +atlanta +gold +corona +curtis +nikki +polaris +timber +theone +baller +chipper +orlando +island +skyline +dragons +dogs +benson +licker +goldie +engineer +kong +pencil +basketba +open +hornet +world +linda +barbie +chan +farmer +valentin +wetpussy +indians +larry +redman +foobar +travel +morpheus +bernie +target +141414 +hotstuff +photos +laura +savage +holly +rocky1 +fuck_inside +dollar +turbo +design +newton +hottie +moon +202020 +blondes +4128 +lestat +avatar +future +goforit +random +abgrtyu +jjjjjj +cancer +q1w2e3 +smiley +goldberg +express +virgin +zipper +wrinkle1 +stone +andy +babylon +dong +powers +consumer +dudley +monkey1 +serenity +samurai +99999999 +bigboobs +skeeter +lindsay +joejoe +master1 +aaaaa +chocolat +christia +birthday +stephani +tang +1234qwer +alfred +ball +98765432 +maria +sexual +maxima +77777777 +sampson +buckeye +highland +kristin +seminole +reaper +bassman +nugget +lucifer +airforce +nasty +watson +warlock +2121 +philip +always +dodge +chrissy +burger +bird +snatch +missy +pink +gang +maddie +holmes +huskers +piglet +photo +joanne +hamilton +dodger +paladin +christy +chubby +buckeyes +hamlet +abcdefgh +bigfoot +sunday +manson +goldfish +garden +deftones +icecream +blondie +spartan +julie +harold +charger +brandi +stormy +sherry +pleasure +juventus +rodney +galaxy +holland +escort +zxcvb +planet +jerome +wesley +blues +song +peace +david1 +ncc1701e +1966 +51505150 +cavalier +gambit +karen +sidney +ripper +oicu812 +jamie +sister +marie +martha +nylons +aardvark +nadine +minnie +whiskey +bing +plastic +anal +babylon5 +chang +savannah +loser +racecar +insane +yankees1 +mememe +hansolo +chiefs +fredfred +freak +frog +salmon +concrete +yvonne +zxcv +shamrock +atlantis +warren +wordpass +julian +mariah +rommel +1010 +harris +predator +sylvia +massive +cats +sammy1 +mister +stud +marathon +rubber +ding +trunks +desire +montreal +justme +faster +kathleen +irish +1999 +bertha +jessica1 +alpine +sammie +diamonds +tristan +00000 +swinger +shan +stallion +pitbull +letmein2 +roberto +ready +april +palmer +ming +shadow1 +audrey +chong +clitoris +wang +shirley +fuckers +jackoff +bluesky +sundance +renegade +hollywoo +151515 +bernard +wolfman +soldier +picture +pierre +ling +goddess +manager +nikita +sweety +titans +hang +fang +ficken +niners +bottom +bubble +hello123 +ibanez +webster +sweetpea +stocking +323232 +tornado +lindsey +content +bruce +buck +aragorn +griffin +chen +campbell +trojan +christop +newman +wayne +tina +rockstar +father +geronimo +pascal +crimson +brooks +hector +penny +anna +google +camera +chandler +fatcat +lovelove +cody +cunts +waters +stimpy +finger +cindy +wheels +viper1 +latin +robin +greenday +987654321 +creampie +brendan +hiphop +willy +snapper +funtime +duck +trombone +adult +cotton +cookies +kaiser +mulder +westham +latino +jeep +ravens +aurora +drizzt +madness +energy +kinky +314159 +sophia +stefan +slick +rocker +55555555 +freeman +french +mongoose +speed +dddddd +hong +henry +hungry +yang +catdog +cheng +ghost +gogogo +randy +tottenha +curious +butterfl +mission +january +singer +sherman +shark +techno +lancer +lalala +autumn +chichi +orion +trixie +clifford +delta +bobbob +bomber +holden +kang +kiss +1968 +spunky +liquid +mary +beagle +granny +network +bond +kkkkkk +millie +1973 +biggie +beetle +teacher +susan +toronto +anakin +genius +dream +cocks +dang +bush +karate +snakes +bangkok +callie +fuckyou2 +pacific +daytona +kelsey +infantry +skywalke +foster +felix +sailing +raistlin +vanhalen +huang +herbert +jacob +blackie +tarzan +strider +sherlock +lang +gong +sang +dietcoke +ultimate +tree +shai +sprite +ting +artist +chai +chao +devil +python +ninja +misty +ytrewq +sweetie +superfly +456789 +tian +jing +jesus1 +freedom1 +dian +drpepper +potter +chou +darren +hobbit +violet +yong +shen +phillip +maurice +gloria +nolimit +mylove +biscuit +yahoo +shasta +sex4me +smoker +smile +pebbles +pics +philly +tong +tintin +lesbians +marlin +cactus +frank1 +tttttt +chun +danni +emerald +showme +pirates +lian +dogg +colleen +xiao +xian +tazman +tanker +patton +toshiba +richie +alberto +gotcha +graham +dillon +rang +emily +keng +jazz +bigguy +yuan +woman +tomtom +marion +greg +chaos +fossil +flight +racerx +tuan +creamy +boss +bobo +musicman +warcraft +window +blade +shuang +sheila +shun +lick +jian +microsoft +rong +allen +feng +getsome +sally +quality +kennedy +morrison +1977 +beng +wwwwww +yoyoyo +zhang +seng +teddy +joanna +andreas +harder +luke +qazxsw +qian +cong +chuan +deng +nang +boeing +keeper +western +isabelle +1963 +subaru +sheng +thuglife +teng +jiong +miao +martina +mang +maniac +pussie +tracey +a1b2c3 +clayton +zhou +zhuang +xing +stonecol +snow +spyder +liang +jiang +memphis +regina +ceng +magic1 +logitech +chuang +dark +million +blow +sesame +shao +poison +titty +terry +kuan +kuai +kyle +mian +guan +hamster +guai +ferret +florence +geng +duan +pang +maiden +quan +velvet +nong +neng +nookie +buttons +bian +bingo +biao +zhong +zeng +xiong +zhun +ying +zong +xuan +zang +0.0.000 +suan +shei +shui +sharks +shang +shua +small +peng +pian +piao +liao +meng +miami +reng +guang +cang +change +ruan +diao +luan +lucas +qing +chui +chuo +cuan +nuan +ning +heng +huan +kansas +muscle +monroe +weng +whitney +1passwor +bluemoon +zhui +zhua +xiang +zheng +zhen +zhei +zhao +zhan +yomama +zhai +zhuo +zuan +tarheel +shou +shuo +tiao +lady +leonard +leng +kuang +jiao +13579 +basket +qiao +qiong +qiang +chuai +nian +niao +niang +huai +22222222 +bianca +zhuan +zhuai +shuan +shuai +stardust +jumper +margaret +archie +66666666 +charlott +forget +qwertz +bones +history +milton +waterloo +2002 +stuff +11223344 +office +oldman +preston +trains +murray +vertigo +246810 +black1 +swallow +smiles +standard +alexandr +parrot +luther +user +nicolas +1976 +surfing +pioneer +pete +masters +apple1 +asdasd +auburn +hannibal +frontier +panama +lucy +buffy +brianna +welcome1 +vette +blue22 +shemale +111222 +baggins +groovy +global +turner +181818 +1979 +blades +spanking +life +byteme +lobster +collins +dawg +hilton +japanese +1970 +1964 +2424 +polo +markus +coco +deedee +mikey +1972 +171717 +1701 +strip +jersey +green1 +capital +sasha +sadie +putter +vader +seven7 +lester +marcel +banshee +grendel +gilbert +dicks +dead +hidden +iloveu +1980 +sound +ledzep +michel +147258 +female +bugger +buffett +bryan +hell +kristina +molson +2020 +wookie +sprint +thanks +jericho +102030 +grace +fuckin +mandy +ranger1 +trebor +deepthroat +bonehead +molly1 +mirage +models +1984 +2468 +stuart +showtime +squirrel +pentium +mario +anime +gator +powder +twister +connect +neptune +bruno +butts +engine +eatshit +mustangs +woody1 +shogun +septembe +pooh +jimbo +roger +annie +bacon +center +russian +sabine +damien +mollie +voyeur +2525 +363636 +leonardo +camel +chair +germany +giant +qqqq +nudist +bone +sleepy +tequila +megan +fighter +garrett +dominic +obiwan +makaveli +vacation +walnut +1974 +ladybug +cantona +ccbill +satan +rusty1 +passwor1 +columbia +napoleon +dusty +kissme +motorola +william1 +1967 +zzzz +skater +smut +play +matthew1 +robinson +valley +coolio +dagger +boner +bull +horndog +jason1 +blake +penguins +rescue +griffey +8j4ye3uz +californ +champs +qwertyuiop +portland +queen +colt45 +boat +xxxxxxx +xanadu +tacoma +mason +carpet +gggggg +safety +palace +italia +stevie +picturs +picasso +thongs +tempest +ricardo +roberts +asd123 +hairy +foxtrot +gary +nimrod +hotboy +343434 +1111111 +asdfghjkl +goose +overlord +blood +wood +stranger +454545 +shaolin +sooners +socrates +spiderman +peanuts +maxine +rogers +13131313 +andrew1 +filthy +donnie +ohyeah +africa +national +kenny +keith +monique +intrepid +jasmin +pickles +assass +fright +potato +darwin +hhhhhh +kingdom +weezer +424242 +pepsi1 +throat +romeo +gerard +looker +puppy +butch +monika +suzanne +sweets +temple +laurie +josh +megadeth +analsex +nymets +ddddddd +bigballs +support +stick +today +down +oakland +oooooo +qweasd +chucky +bridge +carrot +chargers +discover +dookie +condor +night +butler +hoover +horny1 +isabella +sunrise +sinner +jojo +megapass +martini +assfuck +grateful +ffffff +abigail +esther +mushroom +janice +jamaica +wright +sims +space +there +timmy +7654321 +77777 +cccccc +gizmodo +roxanne +ralph +tractor +cristina +dance +mypass +hongkong +helena +1975 +blue123 +pissing +thomas1 +redred +rich +basketball +attack +cash +satan666 +drunk +dixie +dublin +bollox +kingkong +katrina +miles +1971 +22222 +272727 +sexx +penelope +thompson +anything +bbbb +battle +grizzly +passat +porter +tracy +defiant +bowler +knickers +monitor +wisdom +wild +slappy +thor +letsgo +robert1 +feet +rush +brownie +hudson +098765 +playing +playtime +lightnin +melvin +atomic +bart +hawk +goku +glory +llllll +qwaszx +cosmos +bosco +knights +bentley +beast +slapshot +lewis +assword +frosty +gillian +sara +dumbass +mallard +dddd +deanna +elwood +wally +159357 +titleist +angelo +aussie +guest +golfing +doobie +loveit +chloe +elliott +werewolf +vipers +janine +1965 +blabla +surf +sucking +tardis +serena +shelley +thegame +legion +rebels +fernando +fast +gerald +sarah1 +double +onelove +loulou +toto +crash +blackcat +0007 +tacobell +soccer1 +jedi +manuel +method +river +chase +ludwig +poopie +derrick +boob +breast +kittycat +isabel +belly +pikachu +thunder1 +thankyou +jose +celeste +celtics +frances +frogger +scoobydo +sabbath +coltrane +budman +willis +jackal +bigger +zzzzz +silvia +sooner +licking +gopher +geheim +lonestar +primus +pooper +newpass +brasil +heather1 +husker +element +moomoo +beefcake +zzzzzzzz +tammy +shitty +smokin +personal +jjjj +anthony1 +anubis +backup +gorilla +fuckface +painter +lowrider +punkrock +traffic +claude +daniela +dale +delta1 +nancy +boys +easy +kissing +kelley +wendy +theresa +amazon +alan +fatass +dodgeram +dingdong +malcolm +qqqqqqqq +breasts +boots +honda1 +spidey +poker +temp +johnjohn +miguel +147852 +archer +asshole1 +dogdog +tricky +crusader +weather +syracuse +spankme +speaker +meridian +amadeus +back +harley1 +falcons +dorothy +turkey50 +kenwood +keyboard +ilovesex +1978 +blackman +shazam +shalom +lickit +jimbob +richmond +roller +carson +check +fatman +funny +garbage +sandiego +loving +magnus +cooldude +clover +mobile +bell +payton +plumber +texas1 +tool +topper +jenna +mariners +rebel +harmony +caliente +celica +fletcher +german +diana +oxford +osiris +orgasm +punkin +porsche9 +tuesday +close +breeze +bossman +kangaroo +billie +latinas +judith +astros +scruffy +donna +qwertyu +davis +hearts +kathy +jammer +java +springer +rhonda +ricky +1122 +goodtime +chelsea1 +freckles +flyboy +doodle +city +nebraska +bootie +kicker +webmaster +vulcan +iverson +191919 +blueeyes +stoner +321321 +farside +rugby +director +pussy69 +power1 +bobbie +hershey +hermes +monopoly +west +birdman +blessed +blackjac +southern +peterpan +thumbs +lawyer +melinda +fingers +fuckyou1 +rrrrrr +a1b2c3d4 +coke +nicola +bohica +heart +elvis1 +kids +blacky +stories +sentinel +snake1 +phoebe +jesse +richard1 +1234abcd +guardian +candyman +fisting +scarlet +dildo +pancho +mandingo +lucky7 +condom +munchkin +billyboy +summer1 +student +sword +skiing +sergio +site +sony +thong +rootbeer +assassin +cassidy +frederic +fffff +fitness +giovanni +scarlett +durango +postal +achilles +dawn +dylan +kisses +warriors +imagine +plymouth +topdog +asterix +hallo +cameltoe +fuckfuck +bridget +eeeeee +mouth +weird +will +sithlord +sommer +toby +theking +juliet +avenger +backdoor +goodbye +chevrole +faith +lorraine +trance +cosworth +brad +houses +homers +eternity +kingpin +verbatim +incubus +1961 +blond +zaphod +shiloh +spurs +station +jennie +maynard +mighty +aliens +hank +charly +running +dogman +omega1 +printer +aggies +chocolate +deadhead +hope +javier +bitch1 +stone55 +pineappl +thekid +lizzie +rockets +ashton +camels +formula +forrest +rosemary +oracle +rain +pussey +porkchop +abcde +clancy +nellie +mystic +inferno +blackdog +steve1 +pauline +alexander +alice +alfa +grumpy +flames +scream +lonely +puffy +proxy +valhalla +unreal +cynthia +herbie +engage +yyyyyy +010101 +solomon +pistol +melody +celeb +flying +gggg +santiago +scottie +oakley +portugal +a12345 +newbie +mmmm +venus +1qazxsw2 +beverly +zorro +work +writer +stripper +sebastia +spread +phil +tobias +links +members +metal +1221 +andre +565656 +funfun +trojans +again +cyber +hurrican +moneys +1x2zkg8w +zeus +thing +tomato +lion +atlantic +celine +usa123 +trans +account +aaaaaaa +homerun +hyperion +kevin1 +blacks +44444444 +skittles +sean +hastings +fart +gangbang +fubar +sailboat +older +oilers +craig +conrad +church +damian +dean +broken +buster1 +hithere +immortal +sticks +pilot +peters +lexmark +jerkoff +maryland +anders +cheers +possum +columbus +cutter +muppet +beautiful +stolen +swordfish +sport +sonic +peter1 +jethro +rockon +asdfghj +pass123 +paper +pornos +ncc1701a +bootys +buttman +bonjour +escape +1960 +becky +bears +362436 +spartans +tinman +threesom +lemons +maxmax +1414 +bbbbb +camelot +chad +chewie +gogo +fusion +saint +dilligaf +nopass +myself +hustler +hunter1 +whitey +beast1 +yesyes +spank +smudge +pinkfloy +patriot +lespaul +annette +hammers +catalina +finish +formula1 +sausage +scooter1 +orioles +oscar1 +over +colombia +cramps +natural +eating +exotic +iguana +bella +suckers +strong +sheena +start +slave +pearl +topcat +lancelot +angelica +magelan +racer +ramona +crunch +british +button +eileen +steph +456123 +skinny +seeking +rockhard +chief +filter +first +freaks +sakura +pacman +poontang +dalton +newlife +homer1 +klingon +watcher +walleye +tasha +tasty +sinatra +starship +steel +starbuck +poncho +amber1 +gonzo +grover +catherin +carol +candle +firefly +goblin +scotch +diver +usmc +huskies +eleven +kentucky +kitkat +israel +beckham +bicycle +yourmom +studio +tara +33333333 +shane +splash +jimmy1 +reality +12344321 +caitlin +focus +sapphire +mailman +raiders1 +clark +ddddd +hopper +excalibu +more +wilbur +illini +imperial +phillips +lansing +maxx +gothic +golfball +carlton +camille +facial +front242 +macdaddy +qwer1234 +vectra +cowboys1 +crazy1 +dannyboy +jane +betty +benny +bennett +leader +martinez +aquarius +barkley +hayden +caught +franky +ffff +floyd +sassy +pppp +pppppppp +prodigy +clarence +noodle +eatpussy +vortex +wanking +beatrice +billy1 +siemens +pedro +phillies +research +groups +carolyn +chevy1 +cccc +fritz +gggggggg +doughboy +dracula +nurses +loco +madrid +lollipop +trout +utopia +chrono +cooler +conner +nevada +wibble +werner +summit +marco +marilyn +1225 +babies +capone +fugazi +panda +mama +qazwsxed +puppies +triton +9876 +command +nnnnnn +ernest +momoney +iforgot +wolfie +studly +shawn +renee +alien +hamburg +81fukkc +741852 +catman +china +forgot +gagging +scott1 +drew +oregon +qweqwe +train +crazybab +daniel1 +cutlass +brothers +holes +heidi +mothers +music1 +what +walrus +1957 +bigtime +bike +xtreme +simba +ssss +rookie +angie +bathing +fresh +sanchez +rotten +maestro +luis +look +turbo1 +99999 +butthole +hhhh +elijah +monty +bender +yoda +shania +shock +phish +thecat +rightnow +reagan +baddog +asia +greatone +gateway1 +randall +abstr +napster +brian1 +bogart +high +hitler +emma +kill +weaver +wildfire +jackson1 +isaiah +1981 +belinda +beaner +yoyo +0.0.0.000 +super1 +select +snuggles +slutty +some +phoenix1 +technics +toon +raven1 +rayray +123789 +1066 +albion +greens +fashion +gesperrt +santana +paint +powell +credit +darling +mystery +bowser +bottle +brucelee +hehehe +kelly1 +mojo +1998 +bikini +woofwoof +yyyy +strap +sites +spears +theodore +julius +richards +amelia +central +f**k +nyjets +punisher +username +vanilla +twisted +bryant +brent +bunghole +here +elizabeth +erica +kimber +viagra +veritas +pony +pool +titts +labtec +lifetime +jenny1 +masterbate +mayhem +redbull +govols +gremlin +505050 +gmoney +rupert +rovers +diamond1 +lorenzo +trident +abnormal +davidson +deskjet +cuddles +nice +bristol +karina +milano +vh5150 +jarhead +1982 +bigbird +bizkit +sixers +slider +star69 +starfish +penetration +tommy1 +john316 +meghan +michaela +market +grant +caligula +carl +flicks +films +madden +railroad +cosmo +cthulhu +bradford +br0d3r +military +bearbear +swedish +spawn +patrick1 +polly +these +todd +reds +anarchy +groove +franco +fuckher +oooo +tyrone +vegas +airbus +cobra1 +christine +clips +delete +duster +kitty1 +mouse1 +monkeys +jazzman +1919 +262626 +swinging +stroke +stocks +sting +pippen +labrador +jordan1 +justdoit +meatball +females +saturday +park +vector +cooter +defender +desert +demon +nike +bubbas +bonkers +english +kahuna +wildman +4121 +sirius +static +piercing +terror +teenage +leelee +marissa +microsof +mechanic +robotech +rated +hailey +chaser +sanders +salsero +nuts +macross +quantum +rachael +tsunami +universe +daddy1 +cruise +nguyen +newpass6 +nudes +hellyeah +vernon +1959 +zaq12wsx +striker +sixty +steele +spice +spectrum +smegma +thumb +jjjjjjjj +mellow +astrid +cancun +cartoon +sabres +samiam +pants +oranges +oklahoma +lust +coleman +denali +nude +noodles +buzz +brest +hooter +mmmmmmmm +warthog +bloody +blueblue +zappa +wolverine +sniffing +lance +jean +jjjjj +harper +calico +freee +rover +door +pooter +closeup +bonsai +evelyn +emily1 +kathryn +keystone +iiii +1955 +yzerman +theboss +tolkien +jill +megaman +rasta +bbbbbbbb +bean +handsome +hal9000 +goofy +gringo +gofish +gizmo1 +samsam +scuba +onlyme +tttttttt +corrado +clown +clapton +deborah +boris +bulls +vivian +jayhawk +bethany +wwww +sharky +seeker +ssssssss +somethin +pillow +thesims +lighter +lkjhgf +melissa1 +marcius2 +barry +guiness +gymnast +casey1 +goalie +godsmack +doug +lolo +rangers1 +poppy +abby +clemson +clipper +deeznuts +nobody +holly1 +elliot +eeee +kingston +miriam +belle +yosemite +sucked +sex123 +sexy69 +pic\'s +tommyboy +lamont +meat +masterbating +marianne +marc +gretzky +happyday +frisco +scratch +orchid +orange1 +manchest +quincy +unbelievable +aberdeen +dawson +nathalie +ne1469 +boxing +hill +korn +intercourse +161616 +1985 +ziggy +supersta +stoney +senior +amature +barber +babyboy +bcfields +goliath +hack +hardrock +children +frodo +scout +scrappy +rosie +qazqaz +tracker +active +craving +commando +cohiba +deep +cyclone +dana +bubba69 +katie1 +mpegs +vsegda +jade +irish1 +better +sexy1 +sinclair +smelly +squerting +lions +jokers +jeanette +julia +jojojo +meathead +ashley1 +groucho +cheetah +champ +firefox +gandalf1 +packer +magnolia +love69 +tyler1 +typhoon +tundra +bobby1 +kenworth +village +volley +beth +wolf359 +0420 +000007 +swimmer +skydive +smokes +patty +peugeot +pompey +legolas +kristy +redhot +rodman +redalert +having +grapes +4runner +carrera +floppy +dollars +ou8122 +quattro +adams +cloud9 +davids +nofear +busty +homemade +mmmmm +whisper +vermont +webmaste +wives +insertion +jayjay +philips +phone +topher +tongue +temptress +midget +ripken +havefun +gretchen +canon +celebrity +five +getting +ghetto +direct +otto +ragnarok +trinidad +usnavy +conover +cruiser +dalshe +nicole1 +buzzard +hottest +kingfish +misfit +moore +milfnew +warlord +wassup +bigsexy +blackhaw +zippy +shearer +tights +thursday +kungfu +labia +journey +meatloaf +marlene +rider +area51 +batman1 +bananas +636363 +cancel +ggggg +paradox +mack +lynn +queens +adults +aikido +cigars +nova +hoosier +eeyore +moose1 +warez +interacial +streaming +313131 +pertinant +pool6123 +mayday +rivers +revenge +animated +banker +baddest +gordon24 +ccccc +fortune +fantasies +touching +aisan +deadman +homepage +ejaculation +whocares +iscool +jamesbon +1956 +1pussy +womam +sweden +skidoo +spock +sssss +petra +pepper1 +pinhead +micron +allsop +amsterda +army +aside +gunnar +666999 +chip +foot +fowler +february +face +fletch +george1 +sapper +science +sasha1 +luckydog +lover1 +magick +popopo +public +ultima +derek +cypress +booker +businessbabe +brandon1 +edwards +experience +vulva +vvvv +jabroni +bigbear +yummy +010203 +searay +secret1 +showing +sinbad +sexxxx +soleil +software +piccolo +thirteen +leopard +legacy +jensen +justine +memorex +marisa +mathew +redwing +rasputin +134679 +anfield +greenbay +gore +catcat +feather +scanner +pa55word +contortionist +danzig +daisy1 +hores +erik +exodus +vinnie +iiiiii +zero +1001 +subway +tank +second +snapple +sneakers +sonyfuck +picks +poodle +test1234 +their +llll +junebug +june +marker +mellon +ronaldo +roadkill +amanda1 +asdfjkl +beaches +greene +great1 +cheerleaers +force +doitnow +ozzy +madeline +radio +tyson +christian +daphne +boxster +brighton +housewifes +emmanuel +emerson +kkkk +mnbvcx +moocow +vides +wagner +janet +1717 +bigmoney +blonds +1000 +storys +stereo +4545 +420247 +seductive +sexygirl +lesbean +live +justin1 +124578 +animals +balance +hansen +cabbage +canadian +gangbanged +dodge1 +dimas +lori +loud +malaka +puss +probes +adriana +coolman +crawford +dante +nacked +hotpussy +erotica +kool +mirror +wearing +implants +intruder +bigass +zenith +woohoo +womans +tanya +tango +stacy +pisces +laguna +krystal +maxell +andyod22 +barcelon +chainsaw +chickens +flash1 +downtown +orgasms +magicman +profit +pusyy +pothead +coconut +chuckie +contact +clevelan +designer +builder +budweise +hotshot +horizon +hole +experienced +mondeo +wifes +1962 +strange +stumpy +smiths +sparks +slacker +piper +pitchers +passwords +laptop +jeremiah +allmine +alliance +bbbbbbb +asscock +halflife +grandma +hayley +88888 +cecilia +chacha +saratoga +sandy1 +santos +doogie +number +positive +qwert40 +transexual +crow +close-up +darrell +bonita +ib6ub9 +volvo +jacob1 +iiiii +beastie +sunnyday +stoned +sonics +starfire +snapon +pictuers +pepe +testing1 +tiberius +lisalisa +lesbain +litle +retard +ripple +austin1 +badgirl +golfgolf +flounder +garage +royals +dragoon +dickie +passwor +ocean +majestic +poppop +trailers +dammit +nokia +bobobo +br549 +emmitt +knock +minime +mikemike +whitesox +1954 +3232 +353535 +seamus +solo +sparkle +sluttey +pictere +titten +lback +1024 +angelina +goodluck +charlton +fingerig +gallaries +goat +ruby +passme +oasis +lockerroom +logan1 +rainman +twins +treasure +absolutely +club +custom +cyclops +nipper +bucket +homepage- +hhhhh +momsuck +indain +2345 +beerbeer +bimmer +susanne +stunner +stevens +456456 +shell +sheba +tootsie +tiny +testerer +reefer +really +1012 +harcore +gollum +545454 +chico +caveman +carole +fordf150 +fishes +gaymen +saleen +doodoo +pa55w0rd +looney +presto +qqqqq +cigar +bogey +brewer +helloo +dutch +kamikaze +monte +wasser +vietnam +visa +japanees +0123 +swords +slapper +peach +jump +marvel +masterbaiting +march +redwood +rolling +1005 +ametuer +chiks +cathy +callaway +fucing +sadie1 +panasoni +mamas +race +rambo +unknown +absolut +deacon +dallas1 +housewife +kristi +keywest +kirsten +kipper +morning +wings +idiot +18436572 +1515 +beating +zxczxc +sullivan +303030 +shaman +sparrow +terrapin +jeffery +masturbation +mick +redfish +1492 +angus +barrett +goirish +hardcock +felicia +forfun +galary +freeporn +duchess +olivier +lotus +pornographic +ramses +purdue +traveler +crave +brando +enter1 +killme +moneyman +welder +windsor +wifey +indon +yyyyy +stretch +taylor1 +4417 +shopping +picher +pickup +thumbnils +johnboy +jets +jess +maureen +anne +ameteur +amateurs +apollo13 +hambone +goldwing +5050 +charley +sally1 +doghouse +padres +pounding +quest +truelove +underdog +trader +crack +climber +bolitas +bravo +hohoho +model +italian +beanie +beretta +wrestlin +stroker +tabitha +sherwood +sexyman +jewels +johannes +mets +marcos +rhino +bdsm +balloons +goodman +grils +happy123 +flamingo +games +route66 +devo +dino +outkast +paintbal +magpie +llllllll +twilight +critter +christie +cupcake +nickel +bullseye +krista +knickerless +mimi +murder +videoes +binladen +xerxes +slim +slinky +pinky +peterson +thanatos +meister +menace +ripley +retired +albatros +balloon +bank +goten +5551212 +getsdown +donuts +divorce +nwo4life +lord +lost +underwear +tttt +comet +deer +damnit +dddddddd +deeznutz +nasty1 +nonono +nina +enterprise +eeeee +misfit99 +milkman +vvvvvv +isaac +1818 +blueboy +beans +bigbutt +wyatt +tech +solution +poetry +toolman +laurel +juggalo +jetski +meredith +barefoot +50spanks +gobears +scandinavian +original +truman +cubbies +nitram +briana +ebony +kings +warner +bilbo +yumyum +zzzzzzz +stylus +321654 +shannon1 +server +secure +silly +squash +starman +steeler +staples +phrases +techniques +laser +135790 +allan +barker +athens +cbr600 +chemical +fester +gangsta +fucku2 +freeze +game +salvador +droopy +objects +passwd +lllll +loaded +louis +manchester +losers +vedder +clit +chunky +darkman +damage +buckshot +buddah +boobed +henti +hillary +webber +winter1 +ingrid +bigmike +beta +zidane +talon +slave1 +pissoff +person +thegreat +living +lexus +matador +readers +riley +roberta +armani +ashlee +goldstar +5656 +cards +fmale +ferris +fuking +gaston +fucku +ggggggg +sauron +diggler +pacers +looser +pounded +premier +pulled +town +trisha +triangle +cornell +collin +cosmic +deeper +depeche +norway +bright +helmet +kristine +kendall +mustard +misty1 +watch +jagger +bertie +berger +word +3x7pxr +silver1 +smoking +snowboar +sonny +paula +penetrating +photoes +lesbens +lambert +lindros +lillian +roadking +rockford +1357 +143143 +asasas +goodboy +898989 +chicago1 +card +ferrari1 +galeries +godfathe +gawker +gargoyle +gangster +rubble +rrrr +onetime +pussyman +pooppoop +trapper +twenty +abraham +cinder +company +newcastl +boricua +bunny1 +boxer +hotred +hockey1 +hooper +edward1 +evan +kris +misery +moscow +milk +mortgage +bigtit +show +snoopdog +three +lionel +leanne +joshua1 +july +1230 +assholes +cedric +fallen +farley +gene +frisky +sanity +script +divine +dharma +lucky13 +property +tricia +akira +desiree +broadway +butterfly +hunt +hotbox +hootie +heat +howdy +earthlink +karma +kiteboy +motley +westwood +1988 +bert +blackbir +biggles +wrench +working +wrestle +slippery +pheonix +penny1 +pianoman +tomorrow +thedude +jenn +jonjon +jones1 +mattie +memory +micheal +roadrunn +arrow +attitude +azzer +seahawks +diehard +dotcom +lola +tunafish +chivas +cinnamon +clouds +deluxe +northern +nuclear +north +boom +boobie +hurley +krishna +momomo +modles +volume +23232323 +bluedog +wwwwwww +zerocool +yousuck +pluto +limewire +link +joung +marcia +awnyce +gonavy +haha +films+pic+galeries +fabian +francois +girsl +fuckthis +girfriend +rufus +drive +uncencored +a123456 +airport +clay +chrisbln +combat +cygnus +cupoi +never +netscape +brett +hhhhhhhh +eagles1 +elite +knockers +kendra +mommy +1958 +tazmania +shonuf +piano +pharmacy +thedog +lips +jillian +jenkins +midway +arsenal1 +anaconda +australi +gromit +gotohell +787878 +66666 +carmex2 +camber +gator1 +ginger1 +fuzzy +seadoo +dorian +lovesex +rancid +uuuuuu +911911 +nature +bulldog1 +helen +health +heater +higgins +kirk +monalisa +mmmmmmm +whiteout +virtual +ventura +jamie1 +japanes +james007 +2727 +2469 +blam +bitchass +believe +zephyr +stiffy +sweet1 +silent +southpar +spectre +tigger1 +tekken +lenny +lakota +lionking +jjjjjjj +medical +megatron +1369 +hawaiian +gymnastic +golfer1 +gunners +7779311 +515151 +famous +glass +screen +rudy +royal +sanfran +drake +optimus +panther1 +love1 +mail +maggie1 +pudding +venice +aaron1 +delphi +niceass +bounce +busted +house1 +killer1 +miracle +momo +musashi +jammin +2003 +234567 +wp2003wp +submit +silence +sssssss +state +spikes +sleeper +passwort +toledo +kume +media +meme +medusa +mantis +remote +reading +reebok +1017 +artemis +hampton +harry1 +cafc91 +fettish +friendly +oceans +oooooooo +mango +ppppp +trainer +troy +uuuu +909090 +cross +death1 +news +bullfrog +hokies +holyshit +eeeeeee +mitch +jasmine1 +& +& +sergeant +spinner +leon +jockey +records +right +babyblue +hans +gooner +474747 +cheeks +cars +candice +fight +glow +pass1234 +parola +okokok +pablo +magical +major +ramsey +poseidon +989898 +confused +circle +crusher +cubswin +nnnn +hollywood +erin +kotaku +milo +mittens +whatsup +vvvvv +iomega +insertions +bengals +bermuda +biit +yellow1 +012345 +spike1 +south +sowhat +pitures +peacock +pecker +theend +juliette +jimmie +romance +augusta +hayabusa +hawkeyes +castro +florian +geoffrey +dolly +lulu +qaz123 +usarmy +twinkle +cloud +chuckles +cold +hounddog +hover +hothot +europa +ernie +kenshin +kojak +mikey1 +water1 +196969 +because +wraith +zebra +wwwww +33333 +simon1 +spider1 +snuffy +philippe +thunderb +teddy1 +lesley +marino13 +maria1 +redline +renault +aloha +antoine +handyman +cerberus +gamecock +gobucks +freesex +duffman +ooooo +papa +nuggets +magician +longbow +preacher +porno1 +county +chrysler +contains +dalejr +darius +darlene +dell +navy +buffy1 +hedgehog +hoosiers +honey1 +hott +heyhey +europe +dutchess +everest +wareagle +ihateyou +sunflowe +3434 +senators +shag +spoon +sonoma +stalker +poochie +terminal +terefon +laurence +maradona +maryann +marty +roman +1007 +142536 +alibaba +america1 +bartman +astro +goth +century +chicken1 +cheater +four +ghost1 +passpass +oral +r2d2c3po +civic +cicero +myxworld +kkkkk +missouri +wishbone +infiniti +jameson +1a2b3c +1qwerty +wonderboy +skip +shojou +stanford +sparky1 +smeghead +poiuy +titanium +torres +lantern +jelly +jeanne +meier +1213 +bayern +basset +gsxr750 +cattle +charlene +fishing1 +fullmoon +gilles +dima +obelix +popo +prissy +ramrod +unique +absolute +bummer +hotone +dynasty +entry +konyor +missy1 +moses +282828 +yeah +xyz123 +stop +426hemi +404040 +seinfeld +simmons +pingpong +lazarus +matthews +marine1 +manning +recovery +12345a +beamer +babyface +greece +gustav +7007 +charity +camilla +ccccccc +faggot +foxy +frozen +gladiato +duckie +dogfood +paranoid +packers1 +longjohn +radical +tuna +clarinet +claudio +circus +danny1 +novell +nights +bonbon +kashmir +kiki +mortimer +modelsne +moondog +monaco +vladimir +insert +1953 +zxc123 +supreme +3131 +sexxx +selena +softail +poipoi +pong +together +mars +martin1 +rogue +alone +avalanch +audia4 +55bgates +cccccccc +chick +came11 +figaro +geneva +dogboy +dnsadm +dipshit +paradigm +othello +operator +officer +malone +post +rafael +valencia +tripod +choice +chopin +coucou +coach +cocksuck +common +creature +borussia +book +browning +heritage +hiziad +homerj +eight +earth +millions +mullet +whisky +jacques +store +4242 +speedo +starcraf +skylar +spaceman +piggy +pierce +tiger2 +legos +lala +jezebel +judy +joker1 +mazda +barton +baker +727272 +chester1 +fishman +food +rrrrrrrr +sandwich +dundee +lumber +magazine +radar +ppppppp +tranny +aaliyah +admiral +comics +cleo +delight +buttfuck +homeboy +eternal +kilroy +kellie +khan +violin +wingman +walmart +bigblue +blaze +beemer +beowulf +bigfish +yyyyyyy +woodie +yeahbaby +0123456 +tbone +style +syzygy +starter +lemon +linda1 +merlot +mexican +11235813 +anita +banner +bangbang +badman +barfly +grease +carla +charles1 +ffffffff +screw +doberman +diane +dogshit +overkill +counter +coolguy +claymore +demons +demo +nomore +normal +brewster +hhhhhhh +hondas +iamgod +enterme +everett +electron +eastside +kayla +minimoni +mybaby +wildbill +wildcard +ipswich +200000 +bearcat +zigzag +yyyyyyyy +xander +sweetnes +369369 +skyler +skywalker +pigeon +peyton +tipper +lilly +asdf123 +alphabet +asdzxc +babybaby +banane +barnes +guyver +graphics +grand +chinook +florida1 +flexible +fuckinside +otis +ursitesux +tototo +trust +tower +adam12 +christma +corey +chrome +buddie +bombers +bunker +hippie +keegan +misfits +vickie +292929 +woofer +wwwwwwww +stubby +sheep +secrets +sparta +stang +spud +sporty +pinball +jorge +just4fun +johanna +maxxxx +rebecca1 +gunther +fatima +fffffff +freeway +garion +score +rrrrr +sancho +outback +maggot +puddin +trial +adrienne +987456 +colton +clyde +brain +brains +hoops +eleanor +dwayne +kirby +mydick +villa +19691969 +bigcat +becker +shiner +silverad +spanish +templar +lamer +juicy +marsha +mike1 +maximum +rhiannon +real +1223 +10101010 +arrows +andres +alucard +baldwin +baron +avenue +ashleigh +haggis +channel +cheech +safari +ross +dog123 +orion1 +paloma +qwerasdf +presiden +vegitto +trees +969696 +adonis +colonel +cookie1 +newyork1 +brigitte +buddyboy +hellos +heineken +dwight +eraser +kerstin +motion +moritz +millwall +visual +jaybird +1983 +beautifu +bitter +yvette +zodiac +steven1 +sinister +slammer +smashing +slick1 +sponge +teddybea +theater +this +ticklish +lipstick +jonny +massage +mann +reynolds +ring +1211 +amazing +aptiva +applepie +bailey1 +guitar1 +chanel +canyon +gagged +fuckme1 +rough +digital1 +dinosaur +punk +98765 +90210 +clowns +cubs +daniels +deejay +nigga +naruto +boxcar +icehouse +hotties +electra +kent +widget +india +insanity +1986 +2004 +best +bluefish +bingo1 +***** +stratus +strength +sultan +storm1 +44444 +4200 +sentnece +season +sexyboy +sigma +smokie +spam +point +pippo +ticket +temppass +joel +manman +medicine +1022 +anton +almond +bacchus +aztnm +axio +awful +bamboo +hakr +gregor +hahahaha +5678 +casanova +caprice +camero1 +fellow +fountain +dupont +dolphin1 +dianne +paddle +magnet +qwert1 +pyon +porsche1 +tripper +vampires +coming +noway +burrito +bozo +highheel +hughes +hookem +eddie1 +ellie +entropy +kkkkkkkk +kkkkkkk +illinois +jacobs +1945 +1951 +24680 +21212121 +100000 +stonecold +taco +subzero +sharp +sexxxy +skolko +shanna +skyhawk +spurs1 +sputnik +piazza +testpass +letter +lane +kurt +jiggaman +matilda +1224 +harvard +hannah1 +525252 +4ever +carbon +chef +federico +ghosts +gina +scorpio1 +rt6ytere +madison1 +loki +raquel +promise +coolness +christina +coldbeer +citadel +brittney +highway +evil +monarch +morgan1 +washingt +1997 +bella1 +berry +yaya +yolanda +superb +taxman +studman +stephanie +3636 +sherri +sheriff +shepherd +poland +pizzas +tiffany1 +toilet +latina +lassie +larry1 +joseph1 +mephisto +meagan +marian +reptile +rico +razor +1013 +barron +hammer1 +gypsy +grande +carroll +camper +chippy +cat123 +call +chimera +fiesta +glock +glenn +domain +dieter +dragonba +onetwo +nygiants +odessa +password2 +louie +quartz +prowler +prophet +towers +ultra +cocker +corleone +dakota1 +cumm +nnnnnnn +natalia +boxers +hugo +heynow +hollow +iceberg +elvira +kittykat +kate +kitchen +wasabi +vikings1 +impact +beerman +string +sleep +splinter +snoopy1 +pipeline +pocket +legs +maple +mickey1 +manuela +mermaid +micro +meowmeow +redbird +alisha +baura +battery +grass +chevys +chestnut +caravan +carina +charmed +fraser +frogman +diving +dogger +draven +drifter +oatmeal +paris1 +longdong +quant4307s +rachel1 +vegitta +cole +cobras +corsair +dadada +noelle +mylife +nine +bowwow +body +hotrats +eastwood +moonligh +modena +wave +illusion +iiiiiii +jayhawks +birgit +zone +sutton +susana +swingers +shocker +shrimp +sexgod +squall +stefanie +squeeze +soul +patrice +poiu +players +tigers1 +toejam +tickler +line +julie1 +jimbo1 +jefferso +juanita +michael2 +rodeo +robot +1023 +annie1 +bball +guess +happy2 +charter +farm +flasher +falcon1 +fiction +fastball +gadget +scrabble +diaper +dirtbike +dinner +oliver1 +partner +paco +lucille +macman +poopy +popper +postman +ttttttt +ursula +acura +cowboy1 +conan +daewoo +cyrus +customer +nation +nemrac58 +nnnnn +nextel +bolton +bobdylan +hopeless +eureka +extra +kimmie +kcj9wx5n +killbill +musica +volkswag +wage +windmill +wert +vintage +iloveyou1 +itsme +bessie +zippo +311311 +starligh +smokey1 +spot +snappy +soulmate +plasma +thelma +tonight +krusty +just4me +mcdonald +marius +rochelle +rebel1 +1123 +alfredo +aubrey +audi +chantal +fick +goaway +roses +sales +rusty2 +dirt +dogbone +doofus +ooooooo +oblivion +mankind +luck +mahler +lllllll +pumper +puck +pulsar +valkyrie +tupac +compass +concorde +costello +cougars +delaware +niceguy +nocturne +bob123 +boating +bronze +hopkins +herewego +hewlett +houhou +hubert +earnhard +eeeeeeee +keller +mingus +mobydick +venture +verizon +imation +1950 +1948 +1949 +223344 +bigbig +blossom +zack +wowwow +sissy +skinner +spiker +square +snooker +sluggo +player1 +junk +jeannie +jsbach +jumbo +jewel +medic +robins +reddevil +reckless +123456a +1125 +1031 +beacon +astra +gumby +hammond +hassan +757575 +585858 +chillin +fuck1 +sander +lowell +radiohea +upyours +trek +courage +coolcool +classics +choochoo +darryl +nikki1 +nitro +bugs +boytoy +ellen +excite +kirsty +kane +wingnut +wireless +icu812 +1master +beatle +bigblock +blanca +wolfen +summer99 +sugar1 +tartar +sexysexy +senna +sexman +sick +someone +soprano +pippin +platypus +pixies +telephon +land +laura1 +laurent +rimmer +road +report +1020 +12qwaszx +arturo +around +hamish +halifax +fishhead +forum +dododo +doit +outside +paramedi +lonesome +mandy1 +twist +uuuuu +uranus +ttttt +butcher +bruce1 +helper +hopeful +eduard +dusty1 +kathy1 +katherin +moonbeam +muscles +monster1 +monkeybo +morton +windsurf +vvvvvvv +vivid +install +1947 +187187 +1941 +1952 +tatiana +susan1 +31415926 +sinned +sexxy +senator +sebastian +shadows +smoothie +snowflak +playstat +playa +playboy1 +toaster +jerry1 +marie1 +mason1 +merlin1 +roger1 +roadster +112358 +1121 +andrea1 +bacardi +auto +hardware +hardy +789789 +5555555 +captain1 +flores +fergus +sascha +rrrrrrr +dome +onion +nutter +lololo +qqqqqqq +quick +undertak +uuuuuuuu +uuuuuuu +criminal +cobain +cindy1 +coors +dani +descent +nimbus +nomad +nanook +norwich +bomb +bombay +broker +hookup +kiwi +winners +jackpot +1a2b3c4d +1776 +beardog +bighead +blast +bird33 +0987 +stress +shot +spooge +pelican +peepee +perry +pointer +titan +thedoors +jeremy1 +annabell +altima +baba +hallie +hate +hardone +5454 +candace +catwoman +flip +faithful +finance +farmboy +farscape +genesis1 +salomon +destroy +papers +option +page +loser1 +lopez +r2d2 +pumpkins +training +chriss +cumcum +ninjas +ninja1 +hung +erika +eduardo +killers +miller1 +islander +jamesbond +intel +jarvis +19841984 +2626 +bizzare +blue12 +biker +yoyoma +sushi +styles +shitface +series +shanti +spanker +steffi +smart +sphinx +please1 +paulie +pistons +tiburon +limited +maxwell1 +mdogg +rockies +armstron +alexia +arlene +alejandr +arctic +banger +audio +asimov +augustus +grandpa +753951 +4you +chilly +care1839 +chapman +flyfish +fantasia +freefall +santa +sandrine +oreo +ohshit +macbeth +madcat +loveya +mallory +rage +quentin +qwerqwer +project +ramirez +colnago +citizen +chocha +cobalt +crystal1 +dabears +nevets +nineinch +broncos1 +helene +huge +edgar +epsilon +easter +kestrel +moron +virgil +winston1 +warrior1 +iiiiiiii +iloveyou2 +1616 +beat +bettina +woowoo +zander +straight +shower +sloppy +specialk +tinkerbe +jellybea +reader +romero +redsox1 +ride +1215 +1112 +annika +arcadia +answer +baggio +base +guido +555666 +carmel +cayman +cbr900rr +chips +gabriell +gertrude +glennwei +roxy +sausages +disco +pass1 +luna +lovebug +macmac +queenie +puffin +vanguard +trip +trinitro +airwolf +abbott +aaa111 +cocaine +cisco +cottage +dayton +deadly +datsun +bricks +bumper +eldorado +kidrock +wizard1 +whiskers +wind +wildwood +istheman +interest +italy +25802580 +benoit +bigones +woodland +wolfpac +strawber +suicide +3030 +sheba1 +sixpack +peace1 +physics +pearson +tigger2 +toad +megan1 +meow +ringo +roll +amsterdam +717171 +686868 +5424 +catherine +canuck +football1 +footjob +fulham +seagull +orgy +lobo +mancity +truth +trace +vancouve +vauxhall +acidburn +derf +myspace1 +boozer +buttercu +howell +hola +easton +minemine +munch +jared +1dragon +biology +bestbuy +bigpoppa +blackout +blowfish +bmw325 +bigbob +stream +talisman +tazz +sundevil +3333333 +skate +shutup +shanghai +shop +spencer1 +slowhand +polish +pinky1 +tootie +thecrow +leroy +jonathon +jubilee +jingle +martine +matrix1 +manowar +michaels +messiah +mclaren +resident +reilly +redbaron +rollins +romans +return +rivera +andromed +athlon +beach1 +badgers +guitars +harald +harddick +gotribe +6996 +7grout +5wr2i7h8 +635241 +chase1 +carver +charlotte +fallout +fiddle +fredrick +fenris +francesc +fortuna +ferguson +fairlane +felipe +felix1 +forward +gasman +frost +fucks +sahara +sassy1 +dogpound +dogbert +divx1 +manila +loretta +priest +pornporn +quasar +venom +987987 +access1 +clippers +daylight +decker +daman +data +dentist +crusty +nathan1 +nnnnnnnn +bruno1 +bucks +brodie +budapest +kittens +kerouac +mother1 +waldo1 +wedding +whistler +whatwhat +wanderer +idontkno +1942 +1946 +bigdawg +bigpimp +zaqwsx +414141 +3000gt +434343 +shoes +serpent +starr +smurf +pasword +tommie +thisisit +lake +john1 +robotics +redeye +rebelz +1011 +alatam +asses +asians +bama +banzai +harvest +gonzalez +hair +hanson +575757 +5329 +cascade +chinese +fatty +fender1 +flower2 +funky +sambo +drummer1 +dogcat +dottie +oedipus +osama +macleod +prozac +private1 +rampage +punch +presley +concord +cook +cinema +cornwall +cleaner +christopher +ciccio +corinne +clutch +corvet07 +daemon +bruiser +boiler +hjkl +eyes +egghead +expert +ethan +kasper +mordor +wasted +jamess +iverson3 +bluesman +zouzou +090909 +1002 +switch +stone1 +4040 +sisters +sexo +shawna +smith1 +sperma +sneaky +polska +thewho +terminat +krypton +lawson +library +lekker +jules +johnson1 +johann +justus +rockie +romano +aspire +bastards +goodie +cheese1 +fenway +fishon +fishin +fuckoff1 +girls1 +sawyer +dolores +desmond +duane +doomsday +pornking +ramones +rabbits +transit +aaaaa1 +clock +delilah +noel +boyz +bookworm +bongo +bunnies +brady +buceta +highbury +henry1 +heels +eastern +krissy +mischief +mopar +ministry +vienna +weston +wildone +vodka +jayson +bigbooty +beavis1 +betsy +xxxxxx1 +yogibear +000001 +0815 +zulu +420000 +september +sigmar +sprout +stalin +peggy +patch +lkjhgfds +lagnaf +rolex +redfox +referee +123123123 +1231 +angus1 +ariana +ballin +attila +hall +greedy +grunt +747474 +carpedie +cecile +caramel +foxylady +field +gatorade +gidget +futbol +frosch +saiyan +schmidt +drums +donner +doggy1 +drum +doudou +pack +pain +nutmeg +quebec +valdepen +trash +triple +tosser +tuscl +track +comfort +choke +comein +cola +deputy +deadpool +bremen +borders +bronson +break +hotass +hotmail1 +eskimo +eggman +koko +kieran +katrin +kordell1 +komodo +mone +munich +vvvvvvvv +winger +jaeger +ivan +jackson5 +2222222 +bergkamp +bennie +bigben +zanzibar +worm +xxx123 +sunny1 +373737 +services +sheridan +slater +slayer1 +snoop +stacie +peachy +thecure +times +little1 +jennaj +marquis +middle +rasta69 +1114 +aries +havana +gratis +calgary +checkers +flanker +salope +dirty1 +draco +dogface +luv2epus +rainbow6 +qwerty123 +umpire +turnip +vbnm +tucson +troll +aileen +codered +commande +damon +nana +neon +nico +nightwin +neil +boomer1 +bushido +hotmail0 +horace +enternow +kaitlyn +keepout +karen1 +mindy +mnbv +viewsoni +volcom +wizards +wine +1995 +berkeley +bite +zach +woodstoc +tarpon +shinobi +starstar +phat +patience +patrol +toolbox +julien +johnny1 +joebob +marble +riders +reflex +120676 +1235 +angelus +anthrax +atlas +hawks +grandam +harlem +hawaii50 +gorgeous +655321 +cabron +challeng +callisto +firewall +firefire +fischer +flyer +flower1 +factory +federal +gambler +frodo1 +funk +sand +sam123 +scania +dingo +papito +passmast +olive +palermo +ou8123 +lock +ranch +pride +randy1 +twiggy +travis1 +transfer +treetop +addict +admin1 +963852 +aceace +clarissa +cliff +cirrus +clifton +colin +bobdole +bonner +bogus +bonjovi +bootsy +boater +elway7 +edison +kelvin +kenny1 +moonshin +montag +moreno +wayne1 +white1 +jazzy +jakejake +1994 +1991 +2828 +blunt +bluejays +beau +belmont +worthy +systems +sensei +southpark +stan +peeper +pharao +pigpen +tomahawk +teensex +leedsutd +larkin +jermaine +jeepster +jimjim +josephin +melons +marlon +matthias +marriage +robocop +1003 +1027 +antelope +azsxdc +gordo +hazard +granada +8989 +7894 +ceasar +cabernet +cheshire +california +chelle +candy1 +fergie +fanny +fidelio +giorgio +fuckhead +ruth +sanford +diego +dominion +devon +panic +longer +mackie +qawsed +trucking +twelve +chloe1 +coral +daddyo +nostromo +boyboy +booster +bucky +honolulu +esquire +dynamite +motor +mollydog +wilder +windows1 +waffle +wallet +warning +virus +washburn +wealth +vincent1 +jabber +jaguars +javelin +irishman +idefix +bigdog1 +blue42 +blanked +blue32 +biteme1 +bearcats +blaine +yessir +sylveste +team +stephan +sunfire +tbird +stryker +3ip76k2 +sevens +sheldon +pilgrim +tenchi +titman +leeds +lithium +lander +linkin +landon +marijuan +mariner +markie +midnite +reddwarf +1129 +123asd +12312312 +allstar +albany +asdf12 +antonia +aspen +hardball +goldfing +7734 +49ers +carlo +chambers +cable +carnage +callum +carlos1 +fitter +fandango +festival +flame +gofast +gamma +fucmy69 +scrapper +dogwood +django +magneto +loose +premium +addison +9999999 +abc1234 +cromwell +newyear +nichole +bookie +burns +bounty +brown1 +bologna +earl +entrance +elway +killjoy +kerry +keenan +kick +klondike +mini +mouser +mohammed +wayer +impreza +irene +insomnia +24682468 +2580 +24242424 +billbill +bellaco +blessing +blues1 +bedford +blanco +blunts +stinks +teaser +streets +sf49ers +shovel +solitude +spikey +sonia +pimpdadd +timeout +toffee +lefty +johndoe +johndeer +mega +manolo +mentor +margie +ratman +ridge +record +rhodes +robin1 +1124 +1210 +1028 +1226 +another +babylove +barbados +harbor +gramma +646464 +carpente +chaos1 +fishbone +fireblad +glasgow +frogs +scissors +screamer +salem +scuba1 +ducks +driven +doggies +dicky +donovan +obsidian +rams +progress +tottenham +aikman +comanche +corolla +clarke +conway +cumslut +cyborg +dancing +boston1 +bong +houdini +helmut +elvisp +edge +keksa12 +misha +monty1 +monsters +wetter +watford +wiseguy +veronika +visitor +janelle +1989 +1987 +20202020 +biatch +beezer +bigguns +blueball +bitchy +wyoming +yankees2 +wrestler +stupid1 +sealteam +sidekick +simple1 +smackdow +sporting +spiral +smeller +sperm +plato +tophat +test2 +theatre +thick +toomuch +leigh +jello +jewish +junkie +maxim +maxime +meadow +remingto +roofer +124038 +1018 +1269 +1227 +123457 +arkansas +alberta +aramis +andersen +beaker +barcelona +baltimor +googoo +goochi +852456 +4711 +catcher +carman +champ1 +chess +fortress +fishfish +firefigh +geezer +rsalinas +samuel1 +saigon +scooby1 +doors +dick1 +devin +doom +dirk +doris +dontknow +load +magpies +manfred +raleigh +vader1 +universa +tulips +defense +mygirl +burn +bowtie +bowman +holycow +heinrich +honeys +enforcer +katherine +minerva +wheeler +witch +waterboy +jaime +irving +1992 +23skidoo +bimbo +blue11 +birddog +woodman +womble +zildjian +030303 +stinker +stoppedby +sexybabe +speakers +slugger +spotty +smoke1 +polopolo +perfect1 +things +torpedo +tender +thrasher +lakeside +lilith +jimmys +jerk +junior1 +marsh +masamune +rice +root +1214 +april1 +allgood +bambi +grinch +767676 +5252 +cherries +chipmunk +cezer121 +carnival +capecod +finder +flint +fearless +goats +funstuff +gideon +savior +seabee +sandro +schalke +salasana +disney1 +duckman +options +pancake +pantera1 +malice +lookin +love123 +lloyd +qwert123 +puppet +prayers +union +tracer +crap +creation +cwoui +nascar24 +hookers +hollie +hewitt +estrella +erection +ernesto +ericsson +edthom +kaylee +kokoko +kokomo +kimball +morales +mooses +monk +walton +weekend +inter +internal +1michael +1993 +19781978 +25252525 +worker +summers +surgery +shibby +shamus +skibum +sheepdog +sex69 +spliff +slipper +spoons +spanner +snowbird +slow +toriamos +temp123 +tennesse +lakers1 +jomama +julio +mazdarx7 +rosario +recon +riddle +room +revolver +1025 +1101 +barney1 +babycake +baylor +gotham +gravity +hallowee +hancock +616161 +515000 +caca +cannabis +castor +chilli +fdsa +getout +fuck69 +gators1 +sail +sable +rumble +dolemite +dork +dickens +duffer +dodgers1 +painting +onions +logger +lorena +lookout +magic32 +port +poon +prime +twat +coventry +citroen +christmas +civicsi +cocksucker +coochie +compaq1 +nancy1 +buzzer +boulder +butkus +bungle +hogtied +honor +hero +hotgirls +hilary +heidi1 +eggplant +mustang6 +mortal +monkey12 +wapapapa +wendy1 +volleyba +vibrate +vicky +bledsoe +blink +birthday4 +woof +xxxxx1 +talk +stephen1 +suburban +stock +tabatha +sheeba +start1 +soccer10 +something +starcraft +soccer12 +peanut1 +plastics +penthous +peterbil +tools +tetsuo +torino +tennis1 +termite +ladder +last +lemmein +lakewood +jughead +melrose +megane +reginald +redone +request +angela1 +alive +alissa +goodgirl +gonzo1 +golden1 +gotyoass +656565 +626262 +capricor +chains +calvin1 +foolish +fallon +getmoney +godfather +gabber +gilligan +runaway +salami +dummy +dungeon +dudedude +dumb +dope +opus +paragon +oxygen +panhead +pasadena +opendoor +odyssey +magellan +lottie +printing +pressure +prince1 +trustme +christa +court +davies +neville +nono +bread +buffet +hound +kajak +killkill +mona +moto +mildred +winner1 +vixen +whiteboy +versace +winona +voyager1 +instant +indy +jackjack +bigal +beech +biggun +blake1 +blue99 +big1 +woods +synergy +success1 +336699 +sixty9 +shark1 +skin +simba1 +sharpe +sebring +spongebo +spunk +springs +sliver +phialpha +password9 +pizza1 +plane +perkins +pookey +tickling +lexingky +lawman +joe123 +jolly +mike123 +romeo1 +redheads +reserve +apple123 +alanis +ariane +antony +backbone +aviation +band +hand +green123 +haley +carlitos +byebye +cartman1 +camden +chewy +camaross +favorite6 +forumwp +franks +ginscoot +fruity +sabrina1 +devil666 +doughnut +pantie +oldone +paintball +lumina +rainbow1 +prosper +total +true +umbrella +ajax +951753 +achtung +abc12345 +compact +color +corn +complete +christi +closer +corndog +deerhunt +darklord +dank +nimitz +brandy1 +bowl +breanna +holidays +hetfield +holein1 +hillbill +hugetits +east +evolutio +kenobi +whiplash +waldo +wg8e3wjf +wing +istanbul +invis +1996 +benton +bigjohn +bluebell +beef +beater +benji +bluejay +xyzzy +wrestling +storage +superior +suckdick +taichi +stellar +stephane +shaker +skirt +seymour +semper +splurge +squeak +pearls +playball +pitch +phyllis +pooky +piss +tomas +titfuck +joemama +johnny5 +marcello +marjorie +married +maxi +rhubarb +rockwell +ratboy +reload +rooney +redd +1029 +1030 +1220 +anchor +bbking +baritone +gryphon +gone +57chevy +494949 +celeron +fishy +gladiator +fucker1 +roswell +dougie +downer +dicker +diva +domingo +donjuan +nympho +omar +praise +racers +trick +trauma +truck1 +trample +acer +corwin +cricket1 +clemente +climax +denmark +cuervo +notnow +nittany +neutron +native +bosco1 +buffa +breaker +hello2 +hydro +estelle +exchange +explore +kisskiss +kittys +kristian +montecar +modem +mississi +mooney +weiner +washington +20012001 +bigdick1 +bibi +benfica +yahoo1 +striper +tabasco +supra +383838 +456654 +seneca +serious +shuttle +socks +stanton +penguin1 +pathfind +testibil +thethe +listen +lightning +lighting +jeter2 +marma +mark1 +metoo +republic +rollin +redleg +redbone +redskin +rocco +1245 +armand +anthony7 +altoids +andrews +barley +away +asswipe +bauhaus +bbbbbb1 +gohome +harrier +golfpro +goldeney +818181 +6666666 +5000 +5rxypn +cameron1 +calling +checker +calibra +fields +freefree +faith1 +fist +fdm7ed +finally +giraffe +glasses +giggles +fringe +gate +georgie +scamper +rrpass1 +screwyou +duffy +deville +dimples +pacino +ontario +passthie +oberon +quest1 +postov1000 +puppydog +puffer +raining +protect +qwerty7 +trey +tribe +ulysses +tribal +adam25 +a1234567 +compton +collie +cleopatr +contract +davide +norris +namaste +myrtle +buffalo1 +bonovox +buckley +bukkake +burning +burner +bordeaux +burly +hun999 +emilie +elmo +enters +enrique +keisha +mohawk +willard +vgirl +whale +vince +jayden +jarrett +1812 +1943 +222333 +bigjim +bigd +zoom +wordup +ziggy1 +yahooo +workout +young1 +written +xmas +zzzzzz1 +surfer1 +strife +sunlight +tasha1 +skunk +shauna +seth +soft +sprinter +peaches1 +planes +pinetree +plum +pimping +theforce +thedon +toocool +leeann +laddie +list +lkjh +lara +joke +jupiter1 +mckenzie +matty +rene +redrose +1200 +102938 +annmarie +alexa +antares +austin31 +ground +goose1 +737373 +78945612 +789987 +6464 +calimero +caster +casper1 +cement +chevrolet +chessie +caddy +chill +child +canucks +feeling +favorite +fellatio +f00tball +francine +gateway2 +gigi +gamecube +giovanna +rugby1 +scheisse +dshade +dudes +dixie1 +owen +offshore +olympia +lucas1 +macaroni +manga +pringles +puff +tribble +trouble1 +ussy +core +clint +coolhand +colonial +colt +debra +darthvad +dealer +cygnusx1 +natalie1 +newark +husband +hiking +errors +eighteen +elcamino +emmett +emilia +koolaid +knight1 +murphy1 +volcano +idunno +2005 +2233 +block +benito +blueberr +biguns +yamahar1 +zapper +zorro1 +0911 +3006 +sixsix +shopper +siobhan +sextoy +stafford +snowboard +speedway +sounds +pokey +peabody +playboy2 +titi +think +toast +toonarmy +lister +lambda +joecool +jonas +joyce +juniper +mercer +max123 +manny +massimo +mariposa +met2002 +reggae +ricky1 +1236 +1228 +1016 +all4one +arianna +baberuth +asgard +gonzales +484848 +5683 +6669 +catnip +chiquita +charisma +capslock +cashmone +chat +figure +galant +frenchy +gizmodo1 +girlies +gabby +garner +screwy +doubled +divers +dte4uw +done +dragonfl +maker +locks +rachelle +treble +twinkie +trailer +tropical +acid +crescent +cooking +cococo +cory +dabomb +daffy +dandfa +cyrano +nathanie +briggs +boners +helium +horton +hoffman +hellas +espresso +emperor +killa +kikimora +wanda +w4g8at +verona +ilikeit +iforget +1944 +20002000 +birthday1 +beatles1 +blue1 +bigdicks +beethove +blacklab +blazers +benny1 +woodwork +0069 +0101 +taffy +susie +survivor +swim +stokes +4567 +shodan +spoiled +steffen +pissed +pavlov +pinnacle +place +petunia +terrell +thirty +toni +tito +teenie +lemonade +lily +lillie +lalakers +lebowski +lalalala +ladyboy +jeeper +joyjoy +mercury1 +mantle +mannn +rocknrol +riversid +reeves +123aaa +11112222 +121314 +1021 +1004 +1120 +allen1 +ambers +amstel +ambrose +alice1 +alleycat +allegro +ambrosia +alley +australia +hatred +gspot +graves +goodsex +hattrick +harpoon +878787 +8inches +4wwvte +cassandr +charlie123 +case +chavez +fighting +gabriela +gatsby +fudge +gerry +generic +gareth +fuckme2 +samm +sage +seadog +satchmo +scxakv +santafe +dipper +dingle +dizzy +outoutout +madmad +london1 +qbg26i +pussy123 +randolph +vaughn +tzpvaw +vamp +comedy +comp +cowgirl +coldplay +dawgs +delaney +nt5d27 +novifarm +needles +notredam +newness +mykids +bryan1 +bouncer +hihihi +honeybee +iceman1 +herring +horn +hook +hotlips +dynamo +klaus +kittie +kappa +kahlua +muffy +mizzou +mohamed +musical +wannabe +wednesda +whatup +weller +waterfal +willy1 +invest +blanche +bear1 +billabon +youknow +zelda +yyyyyy1 +zachary1 +01234567 +070462 +zurich +superstar +storms +tail +stiletto +strat +427900 +sigmachi +shelter +shells +sexy123 +smile1 +sophie1 +stefano +stayout +somerset +smithers +playmate +pinkfloyd +phish1 +payday +thebear +telefon +laetitia +kswbdu +larson +jetta +jerky +melina +metro +revoluti +retire +respect +1216 +1201 +1204 +1222 +1115 +archange +barry1 +handball +676767 +chandra +chewbacc +flesh +furball +gocubs +fruit +fullback +gman +gentle +dunbar +dewalt +dominiqu +diver1 +dhip6a +olemiss +ollie +mandrake +mangos +pretzel +pusssy +tripleh +valdez +vagabond +clean +comment +crew +clovis +deaths +dandan +csfbr5yy +deadspin +darrel +ninguna +noah +ncc74656 +bootsie +bp2002 +bourbon +brennan +bumble +books +hose +heyyou +houston1 +hemlock +hippo +hornets +hurricane +horseman +hogan +excess +extensa +muffin1 +virginie +werdna +idontknow +info +iron +jack1 +1bitch +151nxjmt +bendover +bmwbmw +bills +zaq123 +wxcvbn +surprise +supernov +tahoe +talbot +simona +shakur +sexyone +seviyi +sonja +smart1 +speed1 +pepito +phantom1 +playoffs +terry1 +terrier +laser1 +lite +lancia +johngalt +jenjen +jolene +midori +message +maserati +matteo +mental +miami1 +riffraff +ronald1 +reason +rhythm +1218 +1026 +123987 +1015 +1103 +armada +architec +austria +gotmilk +hawkins +gray +camila +camp +cambridg +charge +camero +flex +foreplay +getoff +glacier +glotest +froggie +gerbil +rugger +sanity72 +salesman +donna1 +dreaming +deutsch +orchard +oyster +palmtree +ophelia +pajero +m5wkqf +magenta +luckyone +treefrog +vantage +usmarine +tyvugq +uptown +abacab +aaaaaa1 +advance +chuck1 +delmar +darkange +cyclones +nate +navajo +nope +border +bubba123 +building +iawgk2 +hrfzlz +dylan1 +enrico +encore +emilio +eclipse1 +killian +kayleigh +mutant +mizuno +mustang2 +video1 +viewer +weed420 +whales +jaguar1 +insight +1990 +159159 +1love +bliss +bears1 +bigtruck +binder +bigboss +blitz +xqgann +yeahyeah +zeke +zardoz +stickman +table +3825 +signal +sentra +side +shiva +skipper1 +singapor +southpaw +sonora +squid +slamdunk +slimjim +placid +photon +placebo +pearl1 +test12 +therock1 +tiger123 +leinad +legman +jeepers +joeblow +mccarthy +mike23 +redcar +rhinos +rjw7x4 +1102 +13576479 +112211 +alcohol +gwju3g +greywolf +7bgiqk +7878 +535353 +4snz9g +candyass +cccccc1 +carola +catfight +cali +fister +fosters +finland +frankie1 +gizzmo +fuller +royalty +rugrat +sandie +rudolf +dooley +dive +doreen +dodo +drop +oemdlg +out3xf +paddy +opennow +puppy1 +qazwsxedc +pregnant +quinn +ramjet +under +uncle +abraxas +corner +creed +cocoa +crown +cows +cn42qj +dancer1 +death666 +damned +nudity +negative +nimda2k +buick +bobb +braves1 +brook +henrik +higher +hooligan +dust +everlast +karachi +mortis +mulligan +monies +motocros +wally1 +weapon +waterman +view +willie1 +vicki +inspiron +1test +2929 +bigblack +xytfu7 +yackwin +zaq1xsw2 +yy5rbfsc +100100 +0660 +tahiti +takehana +talks +332211 +3535 +sedona +seawolf +skydiver +shine +spleen +slash +spjfet +special1 +spooner +slimshad +sopranos +spock1 +penis1 +patches1 +terri +thierry +thething +toohot +large +limpone +johnnie +mash4077 +matchbox +masterp +maxdog +ribbit +reed +rita +rockin +redhat +rising +1113 +14789632 +1331 +allday +aladin +andrey +amethyst +ariel +anytime +baseball1 +athome +basil +goofy1 +greenman +gustavo +goofball +ha8fyp +goodday +778899 +charon +chappy +castillo +caracas +cardiff +capitals +canada1 +cajun +catter +freddy1 +favorite2 +frazier +forme +follow +forsaken +feelgood +gavin +gfxqx686 +garlic +sarge +saskia +sanjose +russ +salsa +dilbert1 +dukeduke +downhill +longhair +loop +locutus +lockdown +malachi +mamacita +lolipop +rainyday +pumpkin1 +punker +prospect +rambo1 +rainbows +quake +twin +trinity1 +trooper1 +aimee +citation +coolcat +crappy +default +dental +deniro +d9ungl +daddys +napoli +nautica +nermal +bukowski +brick +bubbles1 +bogota +board +branch +breath +buds +hulk +humphrey +hitachi +evans +ender +export +kikiki +kcchiefs +kram +morticia +montrose +mongo +waqw3p +wizzard +visited +whdbtp +whkzyc +image +154ugeiu +1fuck +binky +blind +bigred1 +blubber +benz +becky1 +year2005 +wonderfu +wooden +xrated +0001 +tampabay +survey +tammy1 +stuffer +3mpz4r +3000 +3some +selina +sierra1 +shampoo +silk +shyshy +slapnuts +standby +spartan1 +sprocket +sometime +stanley1 +poker1 +plus +thought +theshit +torture +thinking +lavalamp +light1 +laserjet +jediknig +jjjjj1 +jocelyn +mazda626 +menthol +maximo +margaux +medic1 +release +richter +rhino1 +roach +renate +repair +reveal +1209 +1234321 +amigos +apricot +alexandra +asdfgh1 +hairball +hatter +graduate +grimace +7xm5rq +6789 +cartoons +capcom +cheesy +cashflow +carrots +camping +fanatic +fool +format +fleming +girlie +glover +gilmore +gardner +safeway +ruthie +dogfart +dondon +diapers +outsider +odin +opiate +lollol +love12 +loomis +mallrats +prague +primetime21 +pugsley +program +r29hqq +touch +valleywa +airman +abcdefg1 +darkone +cummer +dempsey +damn +nadia +natedogg +nineball +ndeyl5 +natchez +newone +normandy +nicetits +buddy123 +buddys +homely +husky +iceland +hr3ytm +highlife +holla +earthlin +exeter +eatmenow +kimkim +karine +k2trix +kernel +kirkland +money123 +moonman +miles1 +mufasa +mousey +wilma +wilhelm +whites +warhamme +instinct +jackass1 +2277 +20spanks +blobby +blair +blinky +bikers +blackjack +becca +blue23 +xman +wyvern +085tzzqi +zxzxzx +zsmj2v +suede +t26gn4 +sugars +sylvie +tantra +swoosh +swiss +4226 +4271 +321123 +383pdjvl +shoe +shane1 +shelby1 +spades +spain +smother +soup +sparhawk +pisser +photo1 +pebble +phones +peavey +picnic +pavement +terra +thistle +tokyo +therapy +lives +linden +kronos +lilbit +linux +johnston +material +melanie1 +marbles +redlight +reno +recall +1208 +1138 +1008 +alchemy +aolsucks +alexalex +atticus +auditt +ballet +b929ezzh +goodyear +hanna +griffith +gubber +863abgsg +7474 +797979 +464646 +543210 +4zqauf +4949 +ch5nmk +carlito +chewey +carebear +caleb +checkmat +cheddar +chachi +fever +forgetit +fine +forlife +giants1 +gates +getit +gamble +gerhard +galileo +g3ujwg +ganja +rufus1 +rushmore +scouts +discus +dudeman +olympus +oscars +osprey +madcow +locust +loyola +mammoth +proton +rabbit1 +question +ptfe3xxp +pwxd5x +purple1 +punkass +prophecy +uyxnyd +tyson1 +aircraft +access99 +abcabc +cocktail +colts +civilwar +cleveland +claudia1 +contour +clement +dddddd1 +cypher +denied +dapzu455 +dagmar +daisydog +name +noles +butters +buford +hoochie +hotel +hoser +eddy +ellis +eldiablo +kingrich +mudvayne +motown +mp8o6d +wife +vipergts +italiano +innocent +2055 +2211 +beavers +bloke +blade1 +yamato +zooropa +yqlgr667 +050505 +zxcvbnm1 +zw6syj +suckcock +tango1 +swing +stern +stephens +swampy +susanna +tammie +445566 +333666 +380zliki +sexpot +sexylady +sixtynin +sickboy +spiffy +sleeping +skylark +sparkles +slam +pintail +phreak +places +teller +timtim +tires +thighs +left +latex +llamas +letsdoit +lkjhg +landmark +letters +lizzard +marlins +marauder +metal1 +manu +register +righton +1127 +alain +alcat +amigo +basebal1 +azertyui +attract +azrael +hamper +gotenks +golfgti +gutter +hawkwind +h2slca +harman +grace1 +6chid8 +789654 +canine +casio +cazzo +chamber +cbr900 +cabrio +calypso +capetown +feline +flathead +fisherma +flipmode +fungus +goal +g9zns4 +full +giggle +gabriel1 +fuck123 +saffron +dogmeat +dreamcas +dirtydog +dunlop +douche +dresden +dickdick +destiny1 +pappy +oaktree +lydia +luft4 +puta +prayer +ramada +trumpet1 +vcradq +tulip +tracy71 +tycoon +aaaaaaa1 +conquest +click +chitown +corps +creepers +constant +couples +code +cornhole +danman +dada +density +d9ebk7 +cummins +darth +cute +nash +nirvana1 +nixon +norbert +nestle +brenda1 +bonanza +bundy +buddies +hotspur +heavy +horror +hufmqw +electro +erasure +enough +elisabet +etvww4 +ewyuza +eric1 +kinder +kenken +kismet +klaatu +musician +milamber +willi +waiting +isacs155 +igor +1million +1letmein +x35v8l +yogi +ywvxpz +xngwoj +zippy1 +020202 +**** +stonewal +sweeney +story +sentry +sexsexsex +spence +sonysony +smirnoff +star12 +solace +sledge +states +snyder +star1 +paxton +pentagon +pkxe62 +pilot1 +pommes +paulpaul +plants +tical +tictac +toes +lighthou +lemans +kubrick +letmein22 +letmesee +jys6wz +jonesy +jjjjjj1 +jigga +joelle +mate +merchant +redstorm +riley1 +rosa +relief +14141414 +1126 +allison1 +badboy1 +asthma +auggie +basement +hartley +hartford +hardwood +gumbo +616913 +57np39 +56qhxs +4mnveh +cake +forbes +fatluvr69 +fqkw5m +fidelity +feathers +fresno +godiva +gecko +gladys +gibson1 +gogators +fridge +general1 +saxman +rowing +sammys +scotts +scout1 +sasasa +samoht +dragon69 +ducky +dragonball +driller +p3wqaw +nurse +papillon +oneone +openit +optimist +longshot +portia +rapier +pussy2 +ralphie +tuxedo +ulrike +undertow +trenton +copenhag +come +delldell +culinary +deltas +mytime +nicky +nickie +noname +noles1 +bucker +bopper +bullock +burnout +bryce +hedges +ibilltes +hihje863 +hitter +ekim +espana +eatme69 +elpaso +envelope +express1 +eeeeee1 +eatme1 +karaoke +kara +mustang5 +misses +wellingt +willem +waterski +webcam +jasons +infinite +iloveyou! +jakarta +belair +bigdad +beerme +yoshi +yinyang +zimmer +x24ik3 +063dyjuy +0000007 +ztmfcq +stopit +stooges +survival +stockton +symow8 +strato +2hot4u +ship +simons +skins +shakes +sex1 +shield +snacks +softtail +slimed123 +pizzaman +pipe +pitt +pathetic +pinto +tigercat +tonton +lager +lizzy +juju +john123 +jennings +josiah +jesse1 +jordon +jingles +martian +mario1 +rootedit +rochard +redwine +requiem +riverrat +rats +1117 +1014 +1205 +althea +allie +amor +amiga +alpina +alert +atreides +banana1 +bahamut +hart +golfman +happines +7uftyx +5432 +5353 +5151 +4747 +byron +chatham +chadwick +cherie +foxfire +ffvdj474 +freaked +foreskin +gayboy +gggggg1 +glenda +gameover +glitter +funny1 +scoobydoo +scroll +rudolph +saddle +saxophon +dingbat +digimon +omicron +parsons +ohio +panda1 +loloxx +macintos +lululu +lollypop +racer1 +queen1 +qwertzui +prick +upnfmc +tyrant +trout1 +9skw5g +aceman +adelaide +acls2h +aaabbb +acapulco +aggie +comcast +craft +crissy +cloudy +cq2kph +custer +d6o8pm +cybersex +davecole +darian +crumbs +daisey +davedave +dasani +needle +mzepab +myporn +narnia +nineteen +booger1 +bravo1 +budgie +btnjey +highlander +hotel6 +humbug +edwin +ewtosi +kristin1 +kobe +knuckles +keith1 +katarina +muff +muschi +montana1 +wingchun +wiggle +whatthe +walking +watching +vette1 +vols +virago +intj3a +ishmael +intern +jachin +illmatic +199999 +2010 +beck +blender +bigpenis +bengal +blue1234 +your +zaqxsw +xray +xxxxxxx1 +zebras +yanks +worlds +tadpole +stripes +svetlana +3737 +4343 +3728 +4444444 +368ejhih +solar +sonne +smalls +sniffer +sonata +squirts +pitcher +playstation +pktmxr +pescator +points +texaco +lesbos +lilian +l8v53x +jo9k2jw2 +jimbeam +josie +jimi +jupiter2 +jurassic +marines1 +maya +rocket1 +ringer +14725836 +12345679 +1219 +123098 +1233 +alessand +althor +angelika +arch +armando +alpha123 +basher +barefeet +balboa +bbbbb1 +banks +badabing +harriet +gopack +golfnut +gsxr1000 +gregory1 +766rglqy +8520 +753159 +8dihc6 +69camaro +666777 +cheeba +chino +calendar +cheeky +camel1 +fishcake +falling +flubber +giuseppe +gianni +gloves +gnasher23 +frisbee +fuzzy1 +fuzzball +sauce +save13tx +schatz +russell1 +sandra1 +scrotum +scumbag +sabre +samdog +dripping +dragon12 +dragster +paige +orwell +mainland +lunatic +lonnie +lotion +maine +maddux +qn632o +poophead +rapper +porn4life +producer +rapunzel +tracks +velocity +vanessa1 +ulrich +trueblue +vampire1 +abacus +902100 +crispy +corky +crane +chooch +d6wnro +cutie +deal +dabulls +dehpye +navyseal +njqcw4 +nownow +nigger1 +nightowl +nonenone +nightmar +bustle +buddy2 +boingo +bugman +bulletin +bosshog +bowie +hybrid +hillside +hilltop +hotlegs +honesty +hzze929b +hhhhh1 +hellohel +eloise +evilone +edgewise +e5pftu +eded +embalmer +excalibur +elefant +kenzie +karl +karin +killah +kleenex +mouses +mounta1n +motors +mutley +muffdive +vivitron +winfield +wednesday +w00t88 +iloveit +jarjar +incest +indycar +17171717 +1664 +17011701 +222777 +2663 +beelch +benben +yitbos +yyyyy1 +yasmin +zapata +zzzzz1 +stooge +tangerin +taztaz +stewart1 +summer69 +sweetness +system1 +surveyor +stirling +3qvqod +3way +456321 +sizzle +simhrq +shrink +shawnee +someday +sparty +ssptx452 +sphere +spark +slammed +sober +persian +peppers +ploppy +pn5jvw +poobear +pianos +plaster +testme +tiff +thriller +larissa +lennox +jewell +master12 +messier +rockey +1229 +1217 +1478 +1009 +anastasi +almighty +amonra +aragon +argentin +albino +azazel +grinder +6uldv8 +83y6pv +8888888 +4tlved +515051 +carsten +changes +flanders +flyers88 +ffffff1 +firehawk +foreman +firedog +flashman +ggggg1 +gerber +godspeed +galway +giveitup +funtimes +gohan +giveme +geryfe +frenchie +sayang +rudeboy +savanna +sandals +devine +dougal +drag0n +dga9la +disaster +desktop +only +onlyone +otter +pandas +mafia +lombard +luckys +lovejoy +lovelife +manders +product +qqh92r +qcmfd454 +pork +radar1 +punani +ptbdhw +turtles +undertaker +trs8f7 +tramp +ugejvp +abba +911turbo +acdc +abcd123 +clever +corina +cristian +create +crash1 +colony +crosby +delboy +daniele +davinci +daughter +notebook +niki +nitrox +borabora +bonzai +budd +brisbane +hotter +heeled +heroes +hooyah +hotgirl +i62gbq +horse1 +hills +hpk2qc +epvjb6 +echo +korean +kristie +mnbvc +mohammad +mind +mommy1 +munster +wade +wiccan +wanted +jacket +2369 +bettyboo +blondy +bismark +beanbag +bjhgfi +blackice +yvtte545 +ynot +yess +zlzfrh +wolvie +007bond +****** +tailgate +tanya1 +sxhq65 +stinky1 +3234412 +3ki42x +seville +shimmer +sheryl +sienna +shitshit +skillet +seaman +sooners1 +solaris +smartass +pastor +pasta +pedros +pennywis +pfloyd +tobydog +thetruth +lethal +letme1n +leland +jenifer +mario66 +micky +rocky2 +rewq +ripped +reindeer +1128 +1207 +1104 +1432 +aprilia +allstate +alyson +bagels +basic +baggies +barb +barrage +greatest +gomez +guru +guard +72d5tn +606060 +4wcqjn +caldwell +chance1 +catalog +faust +film +flange +fran +fartman +geil +gbhcf2 +fussball +glen +fuaqz4 +gameboy +garnet +geneviev +rotary +seahawk +russel +saab +seal +samadams +devlt4 +ditto +drevil +drinker +deuce +dipstick +donut +octopus +ottawa +losangel +loverman +porky +q9umoz +rapture +pump +pussy4me +university +triplex +ue8fpw +trent +trophy +turbos +troubles +agent +aaa340 +churchil +crazyman +consult +creepy +craven +class +cutiepie +ddddd1 +dejavu +cuxldv +nettie +nbvibt +nikon +niko +norwood +nascar1 +nolan +bubba2 +boobear +boogers +buff +bullwink +bully +bulldawg +horsemen +escalade +editor +eagle2 +dynamic +ella +efyreg +edition +kidney +minnesot +mogwai +morrow +msnxbi +moonlight +mwq6qlzo +wars +werder +verygood +voodoo1 +wheel +iiiiii1 +159951 +1624 +1911a1 +2244 +bellagio +bedlam +belkin +bill1 +woodrow +xirt2k +worship +?????? +tanaka +swift +susieq +sundown +sukebe +tales +swifty +2fast4u +senate +sexe +sickness +shroom +shaun +seaweed +skeeter1 +status +snicker +sorrow +spanky1 +spook +patti +phaedrus +pilots +pinch +peddler +theo +thumper1 +tessie +tiger7 +tmjxn151 +thematri +l2g7k3 +letmeinn +lazy +jeffjeff +joan +johnmish +mantra +mariana +mike69 +marshal +mart +mazda6 +riptide +robots +rental +1107 +1130 +142857 +11001001 +1134 +armored +alvin +alec +allnight +alright +amatuers +bartok +attorney +astral +baboon +bahamas +balls1 +bassoon +hcleeb +happyman +granite +graywolf +golf1 +gomets +8vjzus +7890 +789123 +8uiazp +5757 +474jdvff +551scasi +50cent +camaro1 +cherry1 +chemist +final +firenze +fishtank +farrell +freewill +glendale +frogfrog +gerhardt +ganesh +same +scirocco +devilman +doodles +dinger +okinawa +olympic +nursing +orpheus +ohmygod +paisley +pallmall +null +lounge +lunchbox +manhatta +mahalo +mandarin +qwqwqw +qguvyt +pxx3eftp +president +rambler +puzzle +poppy1 +turk182 +trotter +vdlxuc +trish +tugboat +valiant +tracie +uwrl7c +chris123 +coaster +cmfnpu +decimal +debbie1 +dandy +daedalus +dede +natasha1 +nissan1 +nancy123 +nevermin +napalm +newcastle +boats +branden +britt +bonghit +hester +ibxnsm +hhhhhh1 +holger +durham +edmonton +erwin +equinox +dvader +kimmy +knulla +mustafa +monsoon +mistral +morgana +monica1 +mojave +month +monterey +mrbill +vkaxcs +victor1 +wacker +wendell +violator +vfdhif +wilson1 +wavpzt +verena +wildstar +winter99 +iqzzt580 +jarrod +imback +1914 +19741974 +1monkey +1q2w3e4r5t +2500 +2255 +blank +bigshow +bigbucks +blackcoc +zoomer +wtcacq +wobble +xmen +xjznq5 +yesterda +yhwnqc +zzzxxx +streak +393939 +2fchbg +skinhead +skilled +shakira +shaft +shadow12 +seaside +sigrid +sinful +silicon +smk7366 +snapshot +sniper1 +soccer11 +staff +slap +smutty +peepers +pleasant +plokij +pdiddy +pimpdaddy +thrust +terran +topaz +today1 +lionhear +littlema +lauren1 +lincoln1 +lgnu9d +laughing +juneau +methos +medina +merlyn +rogue1 +romulus +redshift +1202 +1469 +12locked +arizona1 +alfarome +al9agd +aol123 +altec +apollo1 +arse +baker1 +bbb747 +bach +axeman +astro1 +hawthorn +goodfell +hawks1 +gstring +hannes +8543852 +868686 +4ng62t +554uzpad +5401 +567890 +5232 +catfood +frame +flow +fire1 +flipflop +fffff1 +fozzie +fluff +garrison +fzappa +furious +round +rustydog +sandberg +scarab +satin +ruger +samsung1 +destin +diablo2 +dreamer1 +detectiv +dominick +doqvq3 +drywall +paladin1 +papabear +offroad +panasonic +nyyankee +luetdi +qcfmtz +pyf8ah +puddles +privacy +rainer +pussyeat +ralph1 +princeto +trivia +trewq +tri5a3 +advent +9898 +agyvorc +clarkie +coach1 +courier +contest +christo +corinna +chowder +concept +climbing +cyzkhw +davidb +dad2ownu +days +daredevi +de7mdf +nose +necklace +nazgul +booboo1 +broad +bonzo +brenna +boot +butch1 +huskers1 +hgfdsa +hornyman +elmer +elektra +england1 +elodie +kermit1 +knife +kaboom +minute +modern +motherfucker +morten +mocha +monday1 +morgoth +ward +weewee +weenie +walters +vorlon +website +wahoo +ilovegod +insider +jayman +1911 +1dallas +1900 +1ranger +201jedlz +2501 +1qaz +bertram +bignuts +bigbad +beebee +billows +belize +bebe +wvj5np +wu4etd +yamaha1 +wrinkle5 +zebra1 +yankee1 +zoomzoom +09876543 +0311 +????? +stjabn +tainted +3tmnej +shoot +skooter +skelter +sixteen +starlite +smack +spice1 +stacey1 +smithy +perrin +pollux +peternorth +pixie +paulina +piston +pick +poets +pine +toons +tooth +topspin +kugm7b +legends +jeepjeep +juliana +joystick +junkmail +jojojojo +jonboy +judge +midland +meteor +mccabe +matter +mayfair +meeting +merrill +raul +riches +reznor +rockrock +reboot +reject +robyn +renee1 +roadway +rasta220 +1411 +1478963 +1019 +archery +allman +andyandy +barks +bagpuss +auckland +gooseman +hazmat +gucci +guns +grammy +happydog +greek +7kbe9d +7676 +6bjvpe +5lyedn +5858 +5291 +charlie2 +chas +c7lrwu +candys +chateau +ccccc1 +cardinals +fear +fihdfv +fortune12 +gocats +gaelic +fwsadn +godboy +gldmeo +fx3tuo +fubar1 +garland +generals +gforce +rxmtkp +rulz +sairam +dunhill +division +dogggg +detect +details +doll +drinks +ozlq6qwm +ov3ajy +lockout +makayla +macgyver +mallorca +loves +prima +pvjegu +qhxbij +raphael +prelude1 +totoro +tusymo +trousers +tunnel +valeria +tulane +turtle1 +tracy1 +aerosmit +abbey1 +address +clticic +clueless +cooper1 +comets +collect +corbin +delpiero +derick +cyprus +dante1 +dave1 +nounours +neal +nexus6 +nero +nogard +norfolk +brent1 +booyah +bootleg +buckaroo +bulls23 +bulls1 +booper +heretic +icecube +hellno +hounds +honeydew +hooters1 +hoes +howie +hevnm4 +hugohugo +eighty +epson +evangeli +eeeee1 +eyphed diff --git a/eiam-common/src/main/resources/mail/content/again-verify-mail-content.html b/eiam-common/src/main/resources/mail/content/again-verify-mail-content.html new file mode 100644 index 00000000..63b316e0 --- /dev/null +++ b/eiam-common/src/main/resources/mail/content/again-verify-mail-content.html @@ -0,0 +1,46 @@ + +
+ + + + + + + + + +
+ ${client_name} +
+
+

+ + 亲爱的用户:${user_email} + +

+

您正在进行二次认证,验证码为:${verify_code} ,5分钟内有效,请及时处理。

+

${client_name} 官方团队

+

${time}

+
+
+
\ No newline at end of file diff --git a/eiam-common/src/main/resources/mail/content/bind-mail-content.html b/eiam-common/src/main/resources/mail/content/bind-mail-content.html new file mode 100644 index 00000000..b4771e80 --- /dev/null +++ b/eiam-common/src/main/resources/mail/content/bind-mail-content.html @@ -0,0 +1,47 @@ + +
+ + + + + + + + + +
+ ${client_name} +
+
+

+ + 亲爱的用户:${user_email} + +

+

您正在绑定邮箱, 您的验证码为:${verify_code}, 请尽快验证并保管好验证码。

+

${client_name} 官方团队

+

${time}

+
+
+
+ \ No newline at end of file diff --git a/eiam-common/src/main/resources/mail/content/password-soon-expired-content.html b/eiam-common/src/main/resources/mail/content/password-soon-expired-content.html new file mode 100644 index 00000000..6ea9fe99 --- /dev/null +++ b/eiam-common/src/main/resources/mail/content/password-soon-expired-content.html @@ -0,0 +1,46 @@ + +
+ + + + + + + + + +
+ ${client_name} +
+
+

+ + 亲爱的用户:${user_email} + +

+

您的密码将于${remain_days}天后过期, 请尽快修改密码。

+

${client_name} 官方团队

+

${time}

+
+
+
\ No newline at end of file diff --git a/eiam-common/src/main/resources/mail/content/reset-password-confirm-content.html b/eiam-common/src/main/resources/mail/content/reset-password-confirm-content.html new file mode 100644 index 00000000..2dddb185 --- /dev/null +++ b/eiam-common/src/main/resources/mail/content/reset-password-confirm-content.html @@ -0,0 +1,46 @@ + +
+ + + + + + + + + +
+ ${client_name} +
+
+

+ + 亲爱的用户:${user_email} + +

+

您已成功重置密码,如非本人操作请立即修改邮箱账户密码。

+

${client_name} 官方团队

+

${time}

+
+
+
\ No newline at end of file diff --git a/eiam-common/src/main/resources/mail/content/reset-password-content.html b/eiam-common/src/main/resources/mail/content/reset-password-content.html new file mode 100644 index 00000000..2d2801a3 --- /dev/null +++ b/eiam-common/src/main/resources/mail/content/reset-password-content.html @@ -0,0 +1,46 @@ + +
+ + + + + + + + + +
+ ${client_name} +
+
+

+ + 亲爱的用户:${user_email} + +

+

您正在重置密码, 您的验证码为:${verify_code},请尽快验证并保管好验证码。

+

${client_name} 官方团队

+

${time}

+
+
+
\ No newline at end of file diff --git a/eiam-common/src/main/resources/mail/content/update-bind-mail-content.html b/eiam-common/src/main/resources/mail/content/update-bind-mail-content.html new file mode 100644 index 00000000..ef098abf --- /dev/null +++ b/eiam-common/src/main/resources/mail/content/update-bind-mail-content.html @@ -0,0 +1,47 @@ + +
+ + + + + + + + + +
+ ${client_name} +
+
+

+ + 亲爱的用户:${user_email} + +

+

您正在修改绑定邮箱, 您的验证码为:${verify_code}, 请尽快验证并保管好验证码。

+

${client_name} 官方团队

+

${time}

+
+
+
+ \ No newline at end of file diff --git a/eiam-common/src/main/resources/mail/content/update-password-content.html b/eiam-common/src/main/resources/mail/content/update-password-content.html new file mode 100644 index 00000000..bb132870 --- /dev/null +++ b/eiam-common/src/main/resources/mail/content/update-password-content.html @@ -0,0 +1,46 @@ + +
+ + + + + + + + + +
+ ${client_name} +
+
+

+ + 亲爱的用户:${user_email} + +

+

您正在修改密码, 您的验证码为:${verify_code},请尽快验证并保管好验证码。

+

${client_name} 官方团队

+

${time}

+
+
+
\ No newline at end of file diff --git a/eiam-common/src/main/resources/mail/content/verify-email-content.html b/eiam-common/src/main/resources/mail/content/verify-email-content.html new file mode 100644 index 00000000..b40af66b --- /dev/null +++ b/eiam-common/src/main/resources/mail/content/verify-email-content.html @@ -0,0 +1,54 @@ + +
+ + + + + + + + + +
+ ${client_name} +
+
+

+ + 亲爱的用户:${user_email} + +

+

检测到您的邮箱还未验证, 请点击以下按钮或复制以下链接验证邮箱

+ ${verify_link} +
+
+ 现在验证 +

${client_name} 官方团队

+

${time}

+
+
+
+ \ No newline at end of file diff --git a/eiam-common/src/main/resources/mail/content/warning-content.html b/eiam-common/src/main/resources/mail/content/warning-content.html new file mode 100644 index 00000000..8047298f --- /dev/null +++ b/eiam-common/src/main/resources/mail/content/warning-content.html @@ -0,0 +1,47 @@ + +
+ + + + + + + + + +
+ ${client_name} +
+
+

+ + 亲爱的用户:${user_email} + +

+

您的账号存在风险操作, 验证码为:${verify_code}, 请尽快验证并保管好验证码。

+

${client_name} 官方团队

+

${time}

+
+
+
+ \ No newline at end of file diff --git a/eiam-common/src/main/resources/mail/content/welcome-mail-content.html b/eiam-common/src/main/resources/mail/content/welcome-mail-content.html new file mode 100644 index 00000000..e299447d --- /dev/null +++ b/eiam-common/src/main/resources/mail/content/welcome-mail-content.html @@ -0,0 +1,46 @@ + +
+ + + + + + + + + +
+ ${client_name} +
+
+

亲爱的用户:${user_email}

+

感谢您加入 ${client_name}

+

+ ${client_description} +

+

${client_name} 官方团队

+

${time}

+
+
+
diff --git a/eiam-common/src/main/resources/sms/template/sms-template_en.properties b/eiam-common/src/main/resources/sms/template/sms-template_en.properties new file mode 100644 index 00000000..1f6e4f3b --- /dev/null +++ b/eiam-common/src/main/resources/sms/template/sms-template_en.properties @@ -0,0 +1,30 @@ +# +# eiam-common - Employee Identity and Access Management Program +# Copyright © 2020-2022 TopIAM (support@topiam.cn) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +bind_phone=Verification code: ${verify_code} (valid for ${expire_time} minutes). Do not share this code with anyone. +bind_phone_success=Dear users: Hello! Your account "Username ${username}" has been successfully bound to the current mobile phone number. +update_phone=Verification code: ${verify_code} (valid for ${expire_time} minutes). Do not share this code with anyone. +forget_password=Verification code: ${verify_code} (valid for ${expire_time} minutes). Do not share this code with anyone. +update_password=Verification code: ${verify_code} (valid for ${expire_time} minutes). Do not share this code with anyone. +login=Verification code: ${verify_code} (valid for ${expire_time} minutes). Do not share this code with anyone. +again_verify=Verification code: ${verify_code} (valid for ${expire_time} minutes). Do not share this code with anyone. +welcome_sms=Dear user: ${username}, the initial password of your TopIAM account is ${password}. +reset_password=Verification code: ${verify_code} (valid for ${expire_time} minutes). Do not share this code with anyone. +reset_password_success=Username: ${username}; password: ${password}. Do not share them with anyone. +warning=Dear user: Hello! It is detected that your account "Username ${username}" has an abnormal risk, you can go to User Center-Account Settings-Risk Events to view the details of the abnormality. +password_soon_expired_remind=Your password will expire in ${expire_days} days. Please change your password as soon as possible. \ No newline at end of file diff --git a/eiam-common/src/main/resources/sms/template/sms-template_zh.properties b/eiam-common/src/main/resources/sms/template/sms-template_zh.properties new file mode 100644 index 00000000..19f6be26 --- /dev/null +++ b/eiam-common/src/main/resources/sms/template/sms-template_zh.properties @@ -0,0 +1,30 @@ +# +# eiam-common - Employee Identity and Access Management Program +# Copyright © 2020-2022 TopIAM (support@topiam.cn) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +bind_phone=\u9A8C\u8BC1\u7801${verify_code}\uFF0C\u8BE5\u9A8C\u8BC1\u7801${expire_time}\u5206\u949F\u5185\u6709\u6548\uFF0C\u8BF7\u52FF\u6CC4\u9732\u4E8E\u4ED6\u4EBA\u3002 +bind_phone_success=\u5C0A\u656C\u7684\u7528\u6237\uFF1A\u4F60\u597D\uFF01\u60A8\u7684\u8D26\u53F7\u201C\u7528\u6237\u540D ${username}\u201D\u6210\u529F\u7ED1\u5B9A\u5F53\u524D\u624B\u673A\u53F7\u3002 +update_phone=\u9A8C\u8BC1\u7801${verify_code}\uFF0C\u8BE5\u9A8C\u8BC1\u7801${expire_time}\u5206\u949F\u5185\u6709\u6548\uFF0C\u8BF7\u52FF\u6CC4\u9732\u4E8E\u4ED6\u4EBA\u3002 +forget_password=\u9A8C\u8BC1\u7801${verify_code}\uFF0C\u8BE5\u9A8C\u8BC1\u7801${expire_time}\u5206\u949F\u5185\u6709\u6548\uFF0C\u8BF7\u52FF\u6CC4\u9732\u4E8E\u4ED6\u4EBA\u3002 +update_password=\u9A8C\u8BC1\u7801${verify_code}\uFF0C\u8BE5\u9A8C\u8BC1\u7801${expire_time}\u5206\u949F\u5185\u6709\u6548\uFF0C\u8BF7\u52FF\u6CC4\u9732\u4E8E\u4ED6\u4EBA\u3002 +login=\u9A8C\u8BC1\u7801${verify_code}\uFF0C\u8BE5\u9A8C\u8BC1\u7801${expire_time}\u5206\u949F\u5185\u6709\u6548\uFF0C\u8BF7\u52FF\u6CC4\u9732\u4E8E\u4ED6\u4EBA\u3002 +again_verify=\u9A8C\u8BC1\u7801${verify_code}\uFF0C\u8BE5\u9A8C\u8BC1\u7801${expire_time}\u5206\u949F\u5185\u6709\u6548\uFF0C\u8BF7\u52FF\u6CC4\u9732\u4E8E\u4ED6\u4EBA\u3002 +welcome_sms=\u5c0a\u656c\u7684\u7528\u6237\uff1a${username}\uff0c\u60a8\u7684 TopIAM \u8d26\u6237\u7684\u521d\u59cb\u5bc6\u7801\u662f\uff1a${password} +reset_password=\u9A8C\u8BC1\u7801${verify_code}\uFF0C\u8BE5\u9A8C\u8BC1\u7801${expire_time}\u5206\u949F\u5185\u6709\u6548\uFF0C\u8BF7\u52FF\u6CC4\u9732\u4E8E\u4ED6\u4EBA\u3002 +reset_password_success=\u7528\u6237\u540D${username}\uFF0C\u5BC6\u7801${password}\uFF0C\u8BF7\u52FF\u6CC4\u9732\u4E8E\u4ED6\u4EBA\u3002 +warning=\u5C0A\u656C\u7684\u7528\u6237\uFF1A\u4F60\u597D\uFF01\u68C0\u6D4B\u5230\u60A8\u7684\u8D26\u53F7\u201C\u7528\u6237\u540D ${username}\u201D\u5B58\u5728\u5F02\u5E38\u98CE\u9669\uFF0C\u60A8\u53EF\u81F3\u7528\u6237\u4E2D\u5FC3-\u8D26\u53F7\u8BBE\u7F6E-\u98CE\u9669\u4E8B\u4EF6\u67E5\u770B\u5F02\u5E38\u8BE6\u60C5\u3002 +password_soon_expired_remind=\u60A8\u7684\u5BC6\u7801\u5C06\u4E8E${expire_days}\u5929\u540E\u8FC7\u671F, \u8BF7\u5C3D\u5FEB\u4FEE\u6539\u5BC6\u7801\u3002 \ No newline at end of file diff --git a/eiam-console/Dockerfile b/eiam-console/Dockerfile new file mode 100644 index 00000000..0db3b787 --- /dev/null +++ b/eiam-console/Dockerfile @@ -0,0 +1,48 @@ +# +# eiam-console - Employee Identity and Access Management Program +# Copyright © 2020-2022 TopIAM (support@topiam.cn) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +FROM azul/zulu-openjdk:17-jre as build +WORKDIR /workspace/app + +ARG JAR_FILE=target/topiam-employee-console-*.jar +COPY ${JAR_FILE} target/application.jar +RUN java -Djarmode=layertools -jar target/application.jar extract --destination target/extracted + +FROM azul/zulu-openjdk:17-jre + +ARG EXTRACTED=/workspace/app/target/extracted +WORKDIR topiam +COPY --from=build ${EXTRACTED}/dependencies/ ./ +COPY --from=build ${EXTRACTED}/spring-boot-loader/ ./ +COPY --from=build ${EXTRACTED}/snapshot-dependencies/ ./ +COPY --from=build ${EXTRACTED}/application/ ./ + + +ENV TZ=Asia/Shanghai +RUN sed -i 's/archive.ubuntu.com/cn.archive.ubuntu.com/g' /etc/apt/sources.list \ + && apt-get update \ + && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \ + && apt-get install tzdata \ + && apt-get clean \ + && apt-get autoclean \ + && apt-get autoremove \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ + +EXPOSE 1898 + +ENTRYPOINT ["java","-XX:TieredStopAtLevel=1","-Djava.security.egd=file:/dev/./urandom","-Dspring.main.lazy-initialization=false","org.springframework.boot.loader.JarLauncher"] \ No newline at end of file diff --git a/eiam-console/pom.xml b/eiam-console/pom.xml new file mode 100644 index 00000000..109448cd --- /dev/null +++ b/eiam-console/pom.xml @@ -0,0 +1,131 @@ + + + + + cn.topiam + eiam + 1.0.0-beta1 + ../pom.xml + + 4.0.0 + + eiam-console + + + + + cn.topiam + eiam-audit + ${project.version} + + + + cn.topiam + eiam-application-all + ${project.version} + + + + cn.topiam + eiam-authentication-all + ${project.version} + + + + cn.topiam + eiam-identity-source-all + ${project.version} + + + + cn.topiam + eiam-protocol-all + ${project.version} + + + + cn.topiam + eiam-core + ${project.version} + + + + + + topiam-employee-console-${project.version} + + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + org.apache.maven.plugins + maven-clean-plugin + ${maven-clean-plugin.version} + + + + src/main/console-fe/ + false + + build/** + yarn.lock + src/.umi-production/** + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${java.source.version} + ${java.target.version} + + + + + + + src/main/console-fe/build + fe + + + src/main/resources + + **/* + + + + + \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/EiamConsoleApplication.java b/eiam-console/src/main/java/cn/topiam/employee/EiamConsoleApplication.java new file mode 100644 index 00000000..42ed1d85 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/EiamConsoleApplication.java @@ -0,0 +1,36 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.web.servlet.ServletComponentScan; + +/** + * 应用程序启动入口 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/9 + */ +@ServletComponentScan +@SpringBootApplication +public class EiamConsoleApplication { + public static void main(String[] args) { + SpringApplication.run(EiamConsoleApplication.class, args); + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/ServletInitializer.java b/eiam-console/src/main/java/cn/topiam/employee/ServletInitializer.java new file mode 100644 index 00000000..0df482fb --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/ServletInitializer.java @@ -0,0 +1,36 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee; + +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +/** + * servlet 3.0 + + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/9 + */ +public class ServletInitializer extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(EiamConsoleApplication.class); + } + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/configuration/ConsoleApiConfiguration.java b/eiam-console/src/main/java/cn/topiam/employee/console/configuration/ConsoleApiConfiguration.java new file mode 100644 index 00000000..42a77e55 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/configuration/ConsoleApiConfiguration.java @@ -0,0 +1,140 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.configuration; + +import org.springdoc.core.GroupedOpenApi; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; + +import cn.topiam.employee.EiamConsoleApplication; +import cn.topiam.employee.common.constants.AuthenticationConstants; +import cn.topiam.employee.support.util.AppVersionUtils; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Contact; +import io.swagger.v3.oas.models.info.Info; +import static cn.topiam.employee.common.constants.AccountConstants.ACCOUNT_API_DOC_GROUP_NAME; +import static cn.topiam.employee.common.constants.AccountConstants.ACCOUNT_API_PATHS; +import static cn.topiam.employee.common.constants.AnalysisConstants.ANALYSIS_GROUP_NAME; +import static cn.topiam.employee.common.constants.AnalysisConstants.ANALYSIS_PATH; +import static cn.topiam.employee.common.constants.AppConstants.APP_GROUP_NAME; +import static cn.topiam.employee.common.constants.AppConstants.APP_PATH; +import static cn.topiam.employee.common.constants.AuthenticationConstants.AUTHENTICATION_PATH; +import static cn.topiam.employee.common.constants.SettingConstants.SETTING_GROUP_NAME; +import static cn.topiam.employee.common.constants.SettingConstants.SETTING_PATH; + +/** + * ApiConfiguration + * + * @author TopIAM + * Created by support@topiam.cn on 2019/5/16 20:28 + */ +@Configuration +public class ConsoleApiConfiguration { + + public ConsoleApiConfiguration(Environment environment) { + this.environment = environment; + } + + /** + * 账户 RestAPI + * + * @return {@link GroupedOpenApi} + */ + @Bean + public GroupedOpenApi accountRestApi() { + return GroupedOpenApi.builder().group(ACCOUNT_API_DOC_GROUP_NAME) + .pathsToMatch(ACCOUNT_API_PATHS).build(); + } + + /** + * 应用管理 RestAPI + * + * @return {@link GroupedOpenApi} + */ + @Bean + public GroupedOpenApi applicationRestApi() { + return GroupedOpenApi.builder().group(APP_GROUP_NAME).pathsToMatch(APP_PATH + "/**") + .build(); + } + + /** + * 系统认证 RestAPI + * + * @return {@link GroupedOpenApi} + */ + @Bean + public GroupedOpenApi authenticationRestApi() { + return GroupedOpenApi.builder().group(AuthenticationConstants.AUTHENTICATION_GROUP_NAME) + .pathsToMatch(AUTHENTICATION_PATH + "/**").build(); + } + + /** + * 分析 RestAPI + * + * @return {@link GroupedOpenApi} + */ + @Bean + public GroupedOpenApi analysisRestApi() { + return GroupedOpenApi.builder().group(ANALYSIS_GROUP_NAME) + .pathsToMatch(ANALYSIS_PATH + "/**").build(); + } + + /** + * 系统设置 RestAPI + * + * @return {@link GroupedOpenApi} + */ + @Bean + public GroupedOpenApi settingRestApi() { + return GroupedOpenApi.builder().group(SETTING_GROUP_NAME).pathsToMatch(SETTING_PATH + "/**") + .build(); + } + + /** + * API INFO + * + * @return {@link Info} + */ + private Info info() { + Contact contact = new Contact(); + contact.setEmail("support@topiam.cn"); + contact.setName("TopIAM"); + contact.setUrl("https://eiam.topiam.cn"); + return new Info() + //title + .title(environment.getProperty("spring.application.name")) + //描述 + .description("REST API 文档") + //服务条款网址 + .termsOfService("https://eiam.topiam.cn") + //内容 + .contact(contact) + //版本 + .version(AppVersionUtils.getVersion(EiamConsoleApplication.class)); + } + + @Bean + public OpenAPI openApi() { + return new OpenAPI().info(info()); + } + + private final Environment environment; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/configuration/ConsoleFrontendConfiguration.java b/eiam-console/src/main/java/cn/topiam/employee/console/configuration/ConsoleFrontendConfiguration.java new file mode 100644 index 00000000..be2f6109 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/configuration/ConsoleFrontendConfiguration.java @@ -0,0 +1,55 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.configuration; + +import java.io.IOException; + +import org.jetbrains.annotations.NotNull; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.Resource; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.servlet.resource.PathResourceResolver; + +/** + * 控制台前端配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/12/4 21:49 + */ +@Configuration +public class ConsoleFrontendConfiguration implements WebMvcConfigurer { + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + // 映射静态资源根目录到 frontend + registry.addResourceHandler("/**").addResourceLocations("classpath:/fe/") + .resourceChain(true).addResolver(new PathResourceResolver() { + // 后端匹配不到路由时转给前端 + @Override + protected Resource getResource(@NotNull String resourcePath, + @NotNull Resource location) throws IOException { + Resource resource = super.getResource(resourcePath, location); + if (resource == null) { + resource = super.getResource("index.html", location); + } + return resource; + } + }); + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/configuration/ConsoleSecurityConfiguration.java b/eiam-console/src/main/java/cn/topiam/employee/console/configuration/ConsoleSecurityConfiguration.java new file mode 100644 index 00000000..cc818664 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/configuration/ConsoleSecurityConfiguration.java @@ -0,0 +1,307 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.configuration; + +import java.util.Objects; +import java.util.stream.Collectors; + +import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.cloud.context.config.annotation.RefreshScope; +import org.springframework.context.annotation.Bean; +import org.springframework.http.HttpMethod; +import org.springframework.security.config.Customizer; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.*; +import org.springframework.security.web.SecurityFilterChain; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.security.web.csrf.CookieCsrfTokenRepository; +import org.springframework.security.web.header.writers.ReferrerPolicyHeaderWriter; +import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.session.security.web.authentication.SpringSessionRememberMeServices; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; + +import cn.topiam.employee.common.constants.AuthorizeConstants; +import cn.topiam.employee.common.entity.setting.SettingEntity; +import cn.topiam.employee.common.geo.GeoLocationService; +import cn.topiam.employee.common.repository.setting.SettingRepository; +import cn.topiam.employee.console.security.handler.*; +import cn.topiam.employee.console.security.listener.ConsoleAuthenticationFailureEventListener; +import cn.topiam.employee.console.security.listener.ConsoleAuthenticationSuccessEventListener; +import cn.topiam.employee.console.security.listener.ConsoleLogoutSuccessEventListener; +import cn.topiam.employee.console.security.listener.ConsoleSessionInformationExpiredStrategy; +import cn.topiam.employee.core.endpoint.security.PublicSecretEndpoint; +import cn.topiam.employee.core.security.form.FormLoginSecretFilter; + +import lombok.RequiredArgsConstructor; +import static org.springframework.boot.autoconfigure.security.StaticResourceLocation.*; +import static org.springframework.security.config.Customizer.withDefaults; + +import static cn.topiam.employee.common.constants.AuthorizeConstants.FE_LOGIN; +import static cn.topiam.employee.common.constants.AuthorizeConstants.LOGIN_PATH; +import static cn.topiam.employee.common.constants.ConfigBeanNameConstants.DEFAULT_SECURITY_FILTER_CHAIN; +import static cn.topiam.employee.common.constants.SessionConstants.CURRENT_STATUS; +import static cn.topiam.employee.core.setting.constant.SecuritySettingConstants.*; +import static cn.topiam.employee.support.constant.EiamConstants.*; + +/** + * ConsoleSecurityConfiguration + * + * @author TopIAM + * Created by support@topiam.cn on 2019/9/27 22:54 + */ +@EnableWebSecurity +@RequiredArgsConstructor +public class ConsoleSecurityConfiguration { + /** + * SecurityFilterChain + * + * @param http {@link HttpSecurity} + * @return {@link SecurityFilterChain} + * @throws Exception Exception + */ + @RefreshScope + @Bean(name = DEFAULT_SECURITY_FILTER_CHAIN) + public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { + // @formatter:off + // 系统配置 + http + //认证请求 + .authorizeHttpRequests(authorizeRequests()) + // 表单登录配置 + .formLogin(withFormLoginConfigurerDefaults()) + //x509 + .x509(withDefaults()) + //异常处理 + .exceptionHandling(withExceptionConfigurerDefaults()) + //记住我 + .rememberMe(withRememberMeConfigurerDefaults(settingRepository)) + //CSRF + .csrf(withCsrfConfigurerDefaults()) + //headers + .headers(withHeadersConfigurerDefaults()) + //cors + .cors(withCorsConfigurerDefaults()) + //退出配置 + .logout(withLogoutConfigurerDefaults()) + //会话管理器 + .sessionManagement(withSessionManagementConfigurerDefaults(settingRepository)); + //表单登录解密过滤器 + http.addFilterBefore(new FormLoginSecretFilter(), UsernamePasswordAuthenticationFilter.class); + // @formatter:on + return http.build(); + } + + /** + * 认证请求 + * + * @return {@link AuthorizeHttpRequestsConfigurer} + */ + public Customizer.AuthorizationManagerRequestMatcherRegistry> authorizeRequests() { + //@formatter:off + return registry -> { + //静态资源 + registry.antMatchers( + CSS.getPatterns().collect(Collectors.joining()), + JAVA_SCRIPT.getPatterns().collect(Collectors.joining()), + IMAGES.getPatterns().collect(Collectors.joining()), + WEB_JARS.getPatterns().collect(Collectors.joining()), + FAVICON.getPatterns().collect(Collectors.joining())).permitAll(); + //当前会话状态 + registry.antMatchers(HttpMethod.GET, CURRENT_STATUS).permitAll(); + //公钥 + registry.antMatchers(HttpMethod.GET, PublicSecretEndpoint.PUBLIC_SECRET_PATH).permitAll(); + //发送OPT + registry.antMatchers(HttpMethod.POST, LOGIN_PATH + "/opt/send").permitAll(); + //健康检查端点 + registry.antMatchers(webEndpointProperties.getBasePath()+"/**").permitAll(); + //其他全部认证 + registry.antMatchers(API_PATH+"/**").authenticated(); + }; + } + + /** + * session 管理器 + * + * @return {@link SessionManagementConfigurer} + */ + public Customizer> withSessionManagementConfigurerDefaults(SettingRepository settingRepository) { + SettingEntity setting = settingRepository.findByName(SECURITY_SESSION_MAXIMUM); + return configurer -> { + configurer.sessionFixation().changeSessionId(); + //用户并发 + String defaultSessionMaximum = SECURITY_BASIC_DEFAULT_SETTINGS + .get(SECURITY_SESSION_MAXIMUM); + String sessionMaximum = Objects.isNull(setting) ? defaultSessionMaximum + : "0".equals(setting.getValue()) ? defaultSessionMaximum : setting.getValue(); + configurer.maximumSessions(Integer.parseInt(sessionMaximum)) + .expiredSessionStrategy(new ConsoleSessionInformationExpiredStrategy()); + }; + } + + /** + * session 退出过滤器 + * + * @return {@link LogoutConfigurer} + */ + public Customizer> withLogoutConfigurerDefaults() { + return configurer -> { + configurer.logoutUrl(AuthorizeConstants.LOGOUT); + configurer.logoutSuccessHandler(new ConsoleLogoutSuccessHandler()); + configurer.permitAll(); + }; + } + + /** + * headers 过滤器 + * + * @return {@link HeadersConfigurer} + */ + public Customizer> withHeadersConfigurerDefaults() { + //@formatter:off + return configurer -> { + configurer.xssProtection(xssProtection -> xssProtection.block(false)); + configurer.frameOptions(HeadersConfigurer.FrameOptionsConfig::sameOrigin); + configurer.contentSecurityPolicy( + "default-src 'self'; " + + "frame-src 'self' data:; " + + "frame-ancestors 'self' https://eiam.topiam.cn data:; " + + "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://storage.googleapis.com; " + + "style-src 'self' https://fonts.googleapis.com https://cdn.jsdelivr.net 'unsafe-inline'; " + + "img-src 'self' https://img.alicdn.com https://static-legacy.dingtalk.com https://joeschmoe.io data:; " + + "font-src 'self' https://fonts.gstatic.com data:; "+ + "worker-src 'self' https://storage.googleapis.com blob:;"); + configurer.referrerPolicy( + ReferrerPolicyHeaderWriter.ReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN); + configurer + .referrerPolicy( + ReferrerPolicyHeaderWriter.ReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN) + .and().permissionsPolicy().policy( + "camera=(), fullscreen=(self), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), midi=(), payment=(), sync-xhr=()"); + configurer.frameOptions().deny(); + }; + //@formatter:on + } + + /** + * Cors 过滤器 + * + * @return {@link HeadersConfigurer} + */ + public Customizer> withCorsConfigurerDefaults() { + return configurer -> configurer.configurationSource(new UrlBasedCorsConfigurationSource()); + } + + /** + * 异常处理器 + * + * @return {@link ExceptionHandlingConfigurer} + */ + public Customizer> withExceptionConfigurerDefaults() { + return configurer -> { + configurer.authenticationEntryPoint(new ConsoleAuthenticationEntryPoint()); + configurer.accessDeniedHandler(new ConsoleAccessDeniedHandler()); + }; + } + + /** + * withRememberMeConfigurerDefaults + * + * @return {@link RememberMeConfigurer} + */ + public Customizer> withRememberMeConfigurerDefaults(SettingRepository settingRepository) { + SpringSessionRememberMeServices rememberMeServices = new SpringSessionRememberMeServices(); + rememberMeServices.setAlwaysRemember(false); + SettingEntity setting = settingRepository.findByName(SECURITY_BASIC_REMEMBER_ME_VALID_TIME); + String rememberMeValiditySeconds = Objects.isNull(setting) + ? SECURITY_BASIC_DEFAULT_SETTINGS.get(SECURITY_BASIC_REMEMBER_ME_VALID_TIME) + : setting.getValue(); + rememberMeServices.setValiditySeconds(Integer.parseInt(rememberMeValiditySeconds)); + return configurer -> configurer.rememberMeServices(rememberMeServices); + } + + /** + * csrf + * + * @return {@link CsrfConfigurer} + */ + public Customizer> withCsrfConfigurerDefaults(RequestMatcher... ignoringRequestMatchers) { + return csrf -> { + CookieCsrfTokenRepository repository = CookieCsrfTokenRepository.withHttpOnlyFalse(); + repository.setCookieName(DEFAULT_CSRF_COOKIE_NAME); + repository.setHeaderName(DEFAULT_CSRF_HEADER_NAME); + csrf.ignoringRequestMatchers(ignoringRequestMatchers).csrfTokenRepository(repository); + }; + } + + /** + * form + * + * @return {@link FormLoginConfigurer} + */ + public Customizer> withFormLoginConfigurerDefaults() { + // @formatter:off + return configurer -> { + configurer.loginPage(FE_LOGIN); + configurer.loginProcessingUrl(AuthorizeConstants.FORM_LOGIN); + configurer.successHandler(new ConsoleAuthenticationSuccessHandler()); + configurer.failureHandler(new ConsoleAuthenticationFailureHandler()); + }; + // @formatter:on + } + + /** + * 身份验证成功事件监听器 + * + * @return {@link ConsoleAuthenticationSuccessEventListener} + */ + @Bean + @ConditionalOnMissingBean + public ConsoleAuthenticationSuccessEventListener authenticationSuccessEventListener() { + return new ConsoleAuthenticationSuccessEventListener(geoLocationService); + } + + /** + * 身份验证失败事件监听器 + * + * @return {@link ConsoleAuthenticationFailureEventListener} + */ + @Bean + @ConditionalOnMissingBean + public ConsoleAuthenticationFailureEventListener authenticationFailureEventListener() { + return new ConsoleAuthenticationFailureEventListener(); + } + + /** + * 退出成功事件监听器 + * + * @return {@link ConsoleLogoutSuccessEventListener} + */ + @Bean + @ConditionalOnMissingBean + public ConsoleLogoutSuccessEventListener logoutSuccessEventListener() { + return new ConsoleLogoutSuccessEventListener(); + } + + private final SettingRepository settingRepository; + + private final GeoLocationService geoLocationService; + + private final WebEndpointProperties webEndpointProperties; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/configuration/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/configuration/package-info.java new file mode 100644 index 00000000..1bfb0f01 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/configuration/package-info.java @@ -0,0 +1,24 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +/** + * Configuration + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/10 22:26 + */ +package cn.topiam.employee.console.configuration; diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/constants/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/constants/package-info.java new file mode 100644 index 00000000..402e89a8 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/constants/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.constants; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/CurrentUserEndpoint.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/CurrentUserEndpoint.java new file mode 100644 index 00000000..bf6c9b05 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/CurrentUserEndpoint.java @@ -0,0 +1,131 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller; + +import java.io.Serializable; +import java.util.Optional; + +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.stereotype.Component; + +import com.alibaba.fastjson2.JSON; + +import cn.topiam.employee.common.entity.setting.AdministratorEntity; +import cn.topiam.employee.common.exception.UserNotFoundException; +import cn.topiam.employee.common.repository.setting.AdministratorRepository; +import cn.topiam.employee.core.security.userdetails.UserDetails; +import cn.topiam.employee.core.security.util.SecurityUtils; +import cn.topiam.employee.support.result.ApiRestResult; +import cn.topiam.employee.support.util.DesensitizationUtil; +import cn.topiam.employee.support.util.HttpResponseUtils; + +import lombok.Data; +import lombok.extern.slf4j.Slf4j; + +import io.swagger.v3.oas.annotations.media.Schema; +import static cn.topiam.employee.common.constants.SessionConstants.CURRENT_USER; + +/** + * 当前用户 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/23 20:49 + */ +@Slf4j +@Component +@WebServlet(value = CURRENT_USER) +public class CurrentUserEndpoint extends HttpServlet { + + @Override + public void doGet(HttpServletRequest req, HttpServletResponse resp) { + //当前用户名 + UserDetails userDetails = SecurityUtils.getCurrentUser(); + Optional optional = administratorRepository + .findById(Long.valueOf(userDetails.getId())); + if (optional.isEmpty()) { + SecurityContextHolder.clearContext(); + throw new UserNotFoundException(); + } + AdministratorEntity administrator = optional.get(); + CurrentUserResult result = new CurrentUserResult(); + //用户ID + result.setAccountId(userDetails.getId()); + //用户名 + result.setUsername(administrator.getUsername()); + //头像 + result.setAvatar(administrator.getAvatar()); + //邮箱 + result.setEmail(DesensitizationUtil.emailEncrypt(administrator.getEmail())); + //手机号 + result.setPhone(DesensitizationUtil.phoneEncrypt(administrator.getPhone())); + ApiRestResult build = ApiRestResult. builder() + .result(result).build(); + HttpResponseUtils.flushResponse(resp, JSON.toJSONString(build)); + } + + /** + * 当前用户结果返回 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/10/26 23:16 + */ + @Data + @Schema(description = "当前用户结果") + public static class CurrentUserResult implements Serializable { + /** + * 帐户ID + */ + @Schema(description = "帐户ID") + private String accountId; + + /** + * 用户名 + */ + @Schema(description = "用户名") + private String username; + + /** + * 头像 + */ + @Schema(description = "头像") + private String avatar; + + /** + * 邮箱 + */ + @Schema(description = "邮箱") + private String email; + + /** + * 手机号 + */ + @Schema(description = "手机号") + private String phone; + } + + private final AdministratorRepository administratorRepository; + + public CurrentUserEndpoint(AdministratorRepository administratorRepository) { + this.administratorRepository = administratorRepository; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/FrontendForwardController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/FrontendForwardController.java new file mode 100644 index 00000000..386e7a62 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/FrontendForwardController.java @@ -0,0 +1,41 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +/** + * ForwardController + * + * @author TopIAM + * Created by support@topiam.cn on 2022/12/4 22:16 + */ +@Controller +public class FrontendForwardController { + + /** + * forward + * + * @return forward to client {@code index.html}. + */ + @GetMapping(value = "/") + public String forward() { + return "forward:index.html"; + } +} \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/account/OrganizationController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/account/OrganizationController.java new file mode 100644 index 00000000..35b80a1c --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/account/OrganizationController.java @@ -0,0 +1,241 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.account; + +import java.util.List; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.constants.AccountConstants; +import cn.topiam.employee.console.pojo.result.account.OrganizationChildResult; +import cn.topiam.employee.console.pojo.result.account.OrganizationResult; +import cn.topiam.employee.console.pojo.result.account.OrganizationRootResult; +import cn.topiam.employee.console.pojo.result.account.OrganizationTreeResult; +import cn.topiam.employee.console.pojo.save.account.OrganizationCreateParam; +import cn.topiam.employee.console.pojo.update.account.OrganizationUpdateParam; +import cn.topiam.employee.console.service.account.OrganizationService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.result.ApiRestResult; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; + +/** + * 系统账户-组织架构 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/11 19:18 + */ +@Validated +@Tag(name = "组织架构") +@RestController +@RequestMapping(value = AccountConstants.ORGANIZATION_PATH, produces = MediaType.APPLICATION_JSON_VALUE) +public class OrganizationController { + + /** + * 创建组织架构 + * + * @param param {@link OrganizationCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @PostMapping(value = "/create") + @Audit(type = EventType.CREATE_ORG) + @Operation(summary = "创建组织") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult createOrganization(@RequestBody @Validated OrganizationCreateParam param) { + return ApiRestResult. builder().result(organizationService.createOrg(param)) + .build(); + } + + /** + * 修改组织架构 + * + * @param param {@link OrganizationUpdateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "修改组织") + @Audit(type = EventType.UPDATE_ORG) + @PutMapping(value = "/update") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult updateOrganization(@RequestBody @Validated OrganizationUpdateParam param) { + return ApiRestResult. builder().result(organizationService.updateOrg(param)) + .build(); + } + + /** + * 删除组织架构 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "删除组织") + @Audit(type = EventType.DELETE_ORG) + @DeleteMapping(value = "/delete/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult deleteOrganization(@PathVariable(value = "id") String id) { + return ApiRestResult. builder().result(organizationService.deleteOrg(id)).build(); + } + + /** + * 删除组织架构 + * + * @param ids {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "批量删除组织") + @Audit(type = EventType.DELETE_ORG) + @DeleteMapping(value = "/batch_delete") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult batchDeleteOrganization(String[] ids) { + return ApiRestResult. builder().result(organizationService.batchDeleteOrg(ids)) + .build(); + } + + /** + * 启用组织 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "启用组织") + @PutMapping(value = "/enable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult enableOrganization(@PathVariable(value = "id") String id) { + return ApiRestResult. builder() + .result(organizationService.updateStatus(id, Boolean.TRUE)).build(); + } + + /** + * 禁用组织 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "禁用组织") + @PutMapping(value = "/disable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disableOrganization(@PathVariable(value = "id") String id) { + return ApiRestResult. builder() + .result(organizationService.updateStatus(id, Boolean.FALSE)).build(); + } + + /** + * 移动组织架构 + * + * @param id {@link String} + * @param parentId {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "移动组织") + @Audit(type = EventType.MOVE_ORGANIZATION) + @PutMapping(value = "/move") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult moveOrganization(@RequestParam(value = "id") String id, + @RequestParam(value = "parentId") String parentId) { + return ApiRestResult. builder() + .result(organizationService.moveOrganization(id, parentId)).build(); + } + + /** + * 查询根组织 + * + * @return {@link List} + */ + @GetMapping(value = "/get_root") + @Operation(summary = "获取根组织") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getRootOrganization() { + OrganizationRootResult result = organizationService.getRootOrganization(); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 查询子组织 + * + * @return {@link List} + */ + @GetMapping(value = "/get_child") + @Operation(summary = "获取下级组织") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getChildOrganization(@RequestParam(value = "parentId") String parentId) { + List list = organizationService.getChildOrganization(parentId); + return ApiRestResult.> builder().result(list).build(); + } + + /** + * 查询子组织 + * + * @return {@link List} + */ + @GetMapping(value = "/filter_tree") + @Operation(summary = "获取下级组织") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> filterOrganizationTree(@RequestParam(value = "keyWord") String keyWord) { + List list = organizationService.filterOrganizationTree(keyWord); + return ApiRestResult.> builder().result(list).build(); + } + + /** + * 根据ID查询组织 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Operation(summary = "获取组织信息") + @GetMapping(value = "/get/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getOrganization(@PathVariable(value = "id") String id) { + OrganizationResult result = organizationService.getOrganization(id); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 组织架构服务实现类 + */ + private final OrganizationService organizationService; + + /** + * 构造 + * + * @param organizationService {@link OrganizationService} + */ + public OrganizationController(OrganizationService organizationService) { + this.organizationService = organizationService; + } + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/account/UserController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/account/UserController.java new file mode 100644 index 00000000..7497079b --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/account/UserController.java @@ -0,0 +1,381 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.account; + +import java.io.Serializable; +import java.util.List; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.entity.account.query.UserListNotInGroupQuery; +import cn.topiam.employee.common.entity.account.query.UserListQuery; +import cn.topiam.employee.common.enums.*; +import cn.topiam.employee.console.pojo.result.account.UserListResult; +import cn.topiam.employee.console.pojo.result.account.UserLoginAuditListResult; +import cn.topiam.employee.console.pojo.result.account.UserResult; +import cn.topiam.employee.console.pojo.result.app.UserIdpBindListResult; +import cn.topiam.employee.console.pojo.save.account.UserCreateParam; +import cn.topiam.employee.console.pojo.update.account.ResetPasswordParam; +import cn.topiam.employee.console.pojo.update.account.UserUpdateParam; +import cn.topiam.employee.console.service.account.UserService; +import cn.topiam.employee.console.service.app.UserIdpBindService; +import cn.topiam.employee.core.security.otp.OtpContextHelp; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; +import lombok.Data; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AccountConstants.USER_PATH; + +/** + * 系统账户-用户 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/11 19:18 + */ +@Validated +@Tag(name = "用户管理") +@RestController +@AllArgsConstructor +@RequestMapping(value = USER_PATH, produces = MediaType.APPLICATION_JSON_VALUE) +public class UserController { + + /** + * 获取用户列表 + * + * @param page {@link PageModel} + * @return {@link UserListQuery} + */ + @Operation(summary = "获取用户列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getUserList(PageModel page, + @Validated UserListQuery query) { + return ApiRestResult.> builder() + .result(userService.getUserList(page, query)).build(); + } + + /** + * 获取用户列表(不在指定用户组) + * + * @param query {@link UserListNotInGroupQuery} 分组ID + * @return {@link Boolean} + */ + @Operation(summary = "获取用户列表(不在指定用户组)") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + @GetMapping(value = "/notin_group_list") + public ApiRestResult> getUserListNotInGroup(PageModel model, + @Validated UserListNotInGroupQuery query) { + return ApiRestResult.> builder() + .result(userService.getUserListNotInGroup(model, query)).build(); + } + + /** + * 创建用户 + * + * @param param {@link UserCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "创建用户") + @Audit(type = EventType.CREATE_USER) + @PostMapping(value = "/create") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult createUser(@RequestBody @Validated UserCreateParam param) { + return ApiRestResult. builder().result(userService.createUser(param)).build(); + } + + /** + * 更改系统用户 + * + * @param param {@link UserCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "修改用户") + @Audit(type = EventType.UPDATE_USER) + @PutMapping(value = "/update") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult updateUser(@RequestBody @Validated UserUpdateParam param) { + return ApiRestResult. builder().result(userService.updateUser(param)).build(); + } + + /** + * 删除用户 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "删除用户") + @Audit(type = EventType.DELETE_USER) + @DeleteMapping(value = "/delete/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult deleteUser(@PathVariable(value = "id") String id) { + return ApiRestResult. builder().result(userService.deleteUser(id)).build(); + } + + /** + * 批量删除用户 + * + * @param ids {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "批量删除用户") + @Audit(type = EventType.DELETE_USER) + @DeleteMapping(value = "/batch_delete") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult batchDeleteUser(String[] ids) { + return ApiRestResult. builder().result(userService.batchDeleteUser(ids)).build(); + } + + /** + * 获取用户 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Operation(summary = "获取用户信息") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + @GetMapping(value = "/get/{id}") + public ApiRestResult getUser(@PathVariable(value = "id") String id) { + return ApiRestResult. builder().result(userService.getUser(id)).build(); + } + + /** + * 启用用户 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Operation(summary = "启用用户") + @Audit(type = EventType.ENABLE_USER) + @PutMapping(value = "/enable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult enableUser(@PathVariable(value = "id") String id) { + Boolean result = userService.changeUserStatus(Long.valueOf(id), UserStatus.ENABLE); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 禁用用户 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "禁用用户") + @Audit(type = EventType.DISABLE_USER) + @PutMapping(value = "/disable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disableUser(@PathVariable(value = "id") String id) { + Boolean result = userService.changeUserStatus(Long.valueOf(id), UserStatus.DISABLE); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 用户转岗 + * + * @param userId {@link String} + * @param orgId {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "用户转岗") + @PutMapping(value = "/transfer") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult userTransfer(@Parameter(description = "用户ID") @NotBlank(message = "用户ID不能为空") String userId, + @Parameter(description = "组织ID") @NotBlank(message = "组织ID不能为空") String orgId) { + return ApiRestResult. builder().result(userService.userTransfer(userId, orgId)) + .build(); + } + + /** + * 用户离职 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "用户离职") + @Audit(type = EventType.ORG_REMOVE_USER) + @DeleteMapping(value = "/resign/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult userResign(@PathVariable(value = "id") String id) { + return ApiRestResult. builder() + .result(userService.changeUserStatus(Long.valueOf(id), UserStatus.LOCKED)).build(); + } + + /** + * 重置用户密码 + * + * @param param {@link ResetPasswordParam} + * @return Boolean + */ + @Lock + @Preview + @Operation(summary = "重置用户密码") + @Audit(type = EventType.MODIFY_USER_PASSWORD) + @PutMapping(value = "/reset_password") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult resetUserPassword(@Validated @RequestBody ResetPasswordParam param) { + return ApiRestResult. builder().result(userService.resetUserPassword(param)) + .build(); + } + + /** + * 参数有效性验证 + * + * @return {@link Boolean} + */ + @Operation(summary = "参数有效性验证") + @GetMapping(value = "/param_check") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult userParamCheck(@Parameter(description = "验证类型") @NotNull(message = "验证类型不能为空") CheckValidityType type, + @Parameter(description = "值") @NotEmpty(message = "验证值不能为空") String value, + @Parameter(description = "ID") Long id) { + Boolean result = userService.userParamCheck(type, value, id); + //返回 + return ApiRestResult. builder().result(result).build(); + } + + /** + * 查询用户登录审计列表 + * + * @param id {@link Long} + * @param pageModel {@link PageModel} + * @return {@link ApiRestResult} + */ + @Operation(description = "查询用户登录审计列表") + @GetMapping(value = "/login_audit/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getUserLoginAuditList(@Parameter(description = "ID") Long id, + PageModel pageModel) { + Page list = userService.findUserLoginAuditList(id, pageModel); + return ApiRestResult.ok(list); + } + + /** + * 查询用户身份提供商绑定 + * + * @param userId {@link String} + * @return {@link UserIdpBindListResult} + */ + @Operation(summary = "查询用户身份提供商绑定") + @GetMapping(value = "/idp_bind") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getUserIdpBindList(@Validated @RequestParam(value = "userId", required = false) @Parameter(description = "ID") @NotBlank(message = "用户ID不能为空") String userId) { + return ApiRestResult.> builder() + .result(userIdpBindService.getUserIdpBindList(userId)).build(); + } + + /** + * 删除用户身份提供商绑定 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "删除用户身份提供商绑定") + @Audit(type = EventType.DELETE_USER_IDP_BIND) + @DeleteMapping(value = "/unbind_idp") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult unbindUserIdp(@Validated @RequestParam(value = "id", required = false) @Parameter(description = "ID") @NotBlank(message = "绑定ID不能为空") String id) { + return ApiRestResult. builder().result(userIdpBindService.unbindUserIdpBind(id)) + .build(); + } + + /** + * 发送 OPT + * + * @return {@link ApiRestResult} + */ + @PostMapping("/otp") + @Lock(namespaces = "otp") + public ResponseEntity> send(@Validated SendOptRequest request) { + otpContextHelp.sendOtp(request.getTarget(), request.getType(), request.getChannel()); + return ResponseEntity.ok(ApiRestResult.ok()); + } + + /** + * 发送 OTP 请求 + */ + @Data + public static class SendOptRequest implements Serializable { + /** + * 发送场景 + */ + @Parameter(description = "type") + @NotNull(message = "发送场景不能为空") + private String type; + + /** + * 渠道 + */ + @Parameter(description = "channel") + @NotNull(message = "消息渠道不能为空") + private MessageNoticeChannel channel; + + /** + * 目标 + */ + @Parameter(description = "target") + private String target; + } + + /** + * 用户服务类 + */ + private final UserService userService; + + /** + * OTP + */ + private final OtpContextHelp otpContextHelp; + + /** + * UserIdpBindService + */ + private final UserIdpBindService userIdpBindService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/account/UserGroupController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/account/UserGroupController.java new file mode 100644 index 00000000..35ea410a --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/account/UserGroupController.java @@ -0,0 +1,230 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.account; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import com.google.common.collect.Lists; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.entity.account.UserGroupEntity; +import cn.topiam.employee.common.entity.account.query.UserGroupMemberListQuery; +import cn.topiam.employee.common.entity.account.query.UserListQuery; +import cn.topiam.employee.console.converter.account.UserGroupConverter; +import cn.topiam.employee.console.pojo.query.account.UserGroupListQuery; +import cn.topiam.employee.console.pojo.result.account.UserGroupListResult; +import cn.topiam.employee.console.pojo.result.account.UserGroupMemberListResult; +import cn.topiam.employee.console.pojo.result.account.UserGroupResult; +import cn.topiam.employee.console.pojo.save.account.UserCreateParam; +import cn.topiam.employee.console.pojo.save.account.UserGroupCreateParam; +import cn.topiam.employee.console.pojo.update.account.UserGroupUpdateParam; +import cn.topiam.employee.console.service.account.UserGroupService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AccountConstants.USER_GROUP_PATH; + +/** + * 用户组 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/11 19:18 + */ +@Validated +@AllArgsConstructor +@Tag(name = "用户分组") +@RestController +@RequestMapping(value = USER_GROUP_PATH, produces = MediaType.APPLICATION_JSON_VALUE) +public class UserGroupController { + + /** + * 获取分组列表 + * + * @param page {@link PageModel} + * @return {@link UserListQuery} + */ + @Operation(summary = "获取用户组列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getUserGroupList(PageModel page, + UserGroupListQuery query) { + Page list = userGroupService.getUserGroupList(page, query); + return ApiRestResult.> builder().result(list).build(); + } + + /** + * 创建分组 + * + * @param param {@link UserCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "创建用户组") + @Audit(type = EventType.CREATE_USER_GROUP) + @PostMapping(value = "/create") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult createUserGroup(@RequestBody @Validated UserGroupCreateParam param) { + return ApiRestResult. builder().result(userGroupService.createUserGroup(param)) + .build(); + } + + /** + * 更改用户分组 + * + * @param param {@link UserCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "修改用户组") + @Audit(type = EventType.UPDATE_USER_GROUP) + @PutMapping(value = "/update") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult updateUserGroup(@RequestBody @Validated UserGroupUpdateParam param) { + return ApiRestResult. builder().result(userGroupService.updateUserGroup(param)) + .build(); + } + + /** + * 删除分组 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "删除用户组") + @Audit(type = EventType.DELETE_USER_GROUP) + @DeleteMapping(value = "/delete/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult deleteUserGroup(@PathVariable(value = "id") String id) { + return ApiRestResult. builder().result(userGroupService.deleteUserGroup(id)) + .build(); + } + + /** + * 根据ID查询用户分组 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Operation(summary = "获取用户组信息") + @GetMapping(value = "/get/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getUserGroup(@PathVariable(value = "id") String id) { + UserGroupEntity entity = userGroupService.getUserGroup(Long.valueOf(id)); + UserGroupResult result = userGroupConverter.entityConvertToUserGroupResult(entity); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 添加分组用户 + * + * @param userIds {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Validated + @Operation(summary = "添加用户组成员") + @Audit(type = EventType.ADD_USER_GROUP_MEMBER) + @PostMapping(value = "/add_member/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult addMember(@PathVariable(value = "id") String id, + @NotNull(message = "成员ID不能为空") @Parameter(description = "成员ID") String[] userIds) { + return ApiRestResult. builder().result(userGroupService.addMember(id, userIds)) + .build(); + } + + /** + * 移除分组用户 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "移除用户组成员") + @Audit(type = EventType.REMOVE_USER_GROUP_MEMBER) + @DeleteMapping(value = "/remove_member/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult removeMember(@PathVariable(value = "id") String id, + @NotEmpty(message = "用户ID不能为空") @Parameter(description = "ID") String userId) { + return ApiRestResult. builder().result(userGroupService.removeMember(id, userId)) + .build(); + } + + /** + * 批量移除分组内用户 + * + * @param userIds {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Validated + @Operation(summary = "批量移除分组成员") + @Audit(type = EventType.REMOVE_USER_GROUP_MEMBER) + @DeleteMapping(value = "/batch/remove_member/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult batchRemoveMember(@PathVariable String id, + @NotNull(message = "用户ID集合不能为空") @Parameter(description = "ID集合") String[] userIds) { + return ApiRestResult. builder() + .result(userGroupService.batchRemoveMember(id, Lists.newArrayList(userIds))).build(); + } + + /** + * 获取分组用户 + * + * @param query {@link UserGroupMemberListQuery} 参数 + * @return {@link Boolean} + */ + @Operation(summary = "获取用户组成员") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + @GetMapping(value = "/{id}/member_list") + public ApiRestResult> getUserGroupMemberList(PageModel model, + UserGroupMemberListQuery query) { + return ApiRestResult.> builder() + .result(userGroupService.getUserGroupMemberList(model, query)).build(); + } + + /** + * 用户组数据映射 + */ + private final UserGroupConverter userGroupConverter; + /** + * 用户分组service + */ + private final UserGroupService userGroupService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/account/UserIdpBindController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/account/UserIdpBindController.java new file mode 100644 index 00000000..b865fe06 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/account/UserIdpBindController.java @@ -0,0 +1,42 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.account; + +import org.springframework.http.MediaType; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AccountConstants.USER_PATH; + +/** + * 用户身份提供商绑定 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 19:06 + */ +@Validated +@Tag(name = "用户身份提供商绑定关系") +@RestController +@AllArgsConstructor +@RequestMapping(value = USER_PATH + "/idp", produces = MediaType.APPLICATION_JSON_VALUE) +public class UserIdpBindController { + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/analysis/AnalysisController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/analysis/AnalysisController.java new file mode 100644 index 00000000..2357626b --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/analysis/AnalysisController.java @@ -0,0 +1,166 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.analysis; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import cn.topiam.employee.audit.enums.EventStatus; +import cn.topiam.employee.console.pojo.query.analysis.AnalysisQuery; +import cn.topiam.employee.console.pojo.result.analysis.AppVisitRankResult; +import cn.topiam.employee.console.pojo.result.analysis.AuthnHotProviderResult; +import cn.topiam.employee.console.pojo.result.analysis.AuthnQuantityResult; +import cn.topiam.employee.console.pojo.result.analysis.OverviewResult; +import cn.topiam.employee.console.service.analysis.AnalysisService; +import cn.topiam.employee.support.result.ApiRestResult; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AnalysisConstants.ANALYSIS_GROUP_NAME; +import static cn.topiam.employee.common.constants.AnalysisConstants.ANALYSIS_PATH; + +/** + * 统计分析 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/10/13 22:00 + */ +@Validated +@Tag(name = ANALYSIS_GROUP_NAME) +@RestController +@RequestMapping(ANALYSIS_PATH) +public class AnalysisController { + + /** + * 概述 + * + * @return {@link OverviewResult} + */ + @GetMapping("/overview") + @Operation(summary = "概述") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult overview() { + return ApiRestResult.ok(analysisService.overview()); + } + + /** + * 认证量 + * + * @param query {@link AnalysisQuery} + * @return {@link AuthnQuantityResult} + */ + @GetMapping("/authn/quantity") + @Operation(summary = "认证量") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> authnQuantity(@Validated AnalysisQuery query) { + if (true) { + return ApiRestResult.ok(analysisService.authnQuantity(query)); + } + List list = new ArrayList<>(); + list.add(new AuthnQuantityResult("一月", 18L, EventStatus.SUCCESS.getDesc())); + list.add(new AuthnQuantityResult("二月", 28L, EventStatus.SUCCESS.getDesc())); + list.add(new AuthnQuantityResult("三月", 39L, EventStatus.SUCCESS.getDesc())); + list.add(new AuthnQuantityResult("四月", 81L, EventStatus.SUCCESS.getDesc())); + list.add(new AuthnQuantityResult("五月", 47L, EventStatus.SUCCESS.getDesc())); + list.add(new AuthnQuantityResult("六月", 20L, EventStatus.SUCCESS.getDesc())); + list.add(new AuthnQuantityResult("七月", 24L, EventStatus.SUCCESS.getDesc())); + list.add(new AuthnQuantityResult("八月", 35L, EventStatus.SUCCESS.getDesc())); + //失败 + list.add(new AuthnQuantityResult("一月", 12L, EventStatus.FAIL.getDesc())); + list.add(new AuthnQuantityResult("二月", 23L, EventStatus.FAIL.getDesc())); + list.add(new AuthnQuantityResult("三月", 34L, EventStatus.FAIL.getDesc())); + list.add(new AuthnQuantityResult("四月", 99L, EventStatus.FAIL.getDesc())); + list.add(new AuthnQuantityResult("五月", 52L, EventStatus.FAIL.getDesc())); + list.add(new AuthnQuantityResult("六月", 35L, EventStatus.FAIL.getDesc())); + list.add(new AuthnQuantityResult("七月", 37L, EventStatus.FAIL.getDesc())); + list.add(new AuthnQuantityResult("八月", 42L, EventStatus.FAIL.getDesc())); + return ApiRestResult.ok(list); + } + + /** + * 热门认证提供商 + * + * @return {@link List} + */ + @GetMapping("/authn/hot_provider") + @Operation(summary = "热门认证提供商") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> authnHotProvider(@Validated AnalysisQuery query) { + ArrayList list = new ArrayList<>() { + { + add(new AuthnHotProviderResult("微信扫码登录", 1000L)); + add(new AuthnHotProviderResult("钉钉扫码登录", 100L)); + add(new AuthnHotProviderResult("企业微信", 99L)); + add(new AuthnHotProviderResult("QQ", 88L)); + add(new AuthnHotProviderResult("Github", 77L)); + add(new AuthnHotProviderResult("支付宝扫码认证", 66L)); + add(new AuthnHotProviderResult("LDAP", 55L)); + add(new AuthnHotProviderResult("微博", 10L)); + } + }; + return ApiRestResult.ok(list); + } + + /** + * 登录区域 + */ + @GetMapping("/authn/zone") + @Operation(summary = "登录区域") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public void authnZone(@Validated AnalysisQuery query) { + + } + + /** + * 访问应用排名 + * + * @param query {@link AnalysisQuery} + * @return {@link AuthnQuantityResult} + */ + @GetMapping("/app/visit_rank") + @Operation(summary = "访问应用排名") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> appVisitRank(@Validated AnalysisQuery query) { + if (true) { + return ApiRestResult.ok(analysisService.appVisitRank(query)); + } + List list = new ArrayList<>(); + list.add(new AppVisitRankResult("阿里云用户", 145L)); + list.add(new AppVisitRankResult("腾讯云用户", 61L)); + list.add(new AppVisitRankResult("华为云", 52L)); + list.add(new AppVisitRankResult("百度云用户", 48L)); + list.add(new AppVisitRankResult("阿里云角色", 38L)); + list.add(new AppVisitRankResult("百度云角色", 28L)); + list.add(new AppVisitRankResult("腾讯云角色", 22L)); + list.add(new AppVisitRankResult("OIDC", 10L)); + return ApiRestResult.ok(list); + } + + private final AnalysisService analysisService; + + public AnalysisController(AnalysisService analysisService) { + this.analysisService = analysisService; + } + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/analysis/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/analysis/package-info.java new file mode 100644 index 00000000..91f42dfc --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/analysis/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.analysis; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppAccessPolicyController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppAccessPolicyController.java new file mode 100644 index 00000000..ce5eac37 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppAccessPolicyController.java @@ -0,0 +1,112 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.app; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.entity.app.query.AppAccessPolicyQuery; +import cn.topiam.employee.console.pojo.result.app.AppAccessPolicyResult; +import cn.topiam.employee.console.pojo.result.app.AppAccountListResult; +import cn.topiam.employee.console.pojo.save.app.AppAccessPolicyCreateParam; +import cn.topiam.employee.console.pojo.save.app.AppAccountCreateParam; +import cn.topiam.employee.console.service.app.AppAccessPolicyService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AppConstants.APP_PATH; + +/** + * 应用访问授权策略 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 19:58 + */ +@Validated +@Tag(name = "应用访问授权策略") +@RestController +@AllArgsConstructor +@RequestMapping(value = APP_PATH + "/access_policy", produces = MediaType.APPLICATION_JSON_VALUE) +public class AppAccessPolicyController { + + /** + * 获取应用访问授权策略列表 + * + * @param page {@link PageModel} + * @param query {@link AppAccessPolicyQuery} + * @return {@link AppAccountListResult} + */ + @Operation(summary = "获取应用访问授权策略列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getAppAccessPolicyList(PageModel page, + @Validated AppAccessPolicyQuery query) { + return ApiRestResult.> builder() + .result(appAccessPolicyService.getAppAccessPolicyList(page, query)).build(); + } + + /** + * 创建应用访问授权策略 + * + * @param param {@link AppAccountCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "创建应用访问授权策略") + @Audit(type = EventType.APP_AUTHORIZATION) + @PostMapping(value = "/create") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult createAppAccessPolicy(@RequestBody @Validated AppAccessPolicyCreateParam param) { + return ApiRestResult. builder() + .result(appAccessPolicyService.createAppAccessPolicy(param)).build(); + } + + /** + * 删除应用访问授权策略 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "删除应用访问授权策略") + @Audit(type = EventType.APP_DELETE_ACCESS_POLICY) + @DeleteMapping(value = "/delete/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult deleteAppAccessPolicy(@PathVariable(value = "id") String id) { + return ApiRestResult. builder() + .result(appAccessPolicyService.deleteAppAccessPolicy(id)).build(); + } + + /** + * AppPolicyService + */ + private final AppAccessPolicyService appAccessPolicyService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppAccountController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppAccountController.java new file mode 100644 index 00000000..10d7c4bd --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppAccountController.java @@ -0,0 +1,111 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.app; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.entity.app.query.AppAccountQuery; +import cn.topiam.employee.console.pojo.result.app.AppAccountListResult; +import cn.topiam.employee.console.pojo.save.app.AppAccountCreateParam; +import cn.topiam.employee.console.service.app.AppAccountService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AppConstants.APP_PATH; + +/** + * 应用账户资源 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 19:06 + */ +@Validated +@Tag(name = "应用账户") +@RestController +@AllArgsConstructor +@RequestMapping(value = APP_PATH + "/account", produces = MediaType.APPLICATION_JSON_VALUE) +public class AppAccountController { + + /** + * AppAccountService + */ + private final AppAccountService appAccountService; + + /** + * 获取应用账户列表 + * + * @param page {@link PageModel} + * @param query {@link AppAccountQuery} + * @return {@link AppAccountListResult} + */ + @Operation(summary = "获取应用账户列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getAppAccountList(PageModel page, + @Validated AppAccountQuery query) { + return ApiRestResult.> builder() + .result(appAccountService.getAppAccountList(page, query)).build(); + } + + /** + * 创建应用账户 + * + * @param param {@link AppAccountCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "创建应用账户") + @Audit(type = EventType.ADD_APP_ACCOUNT) + @PostMapping(value = "/create") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult createAppAccount(@RequestBody @Validated AppAccountCreateParam param) { + return ApiRestResult. builder().result(appAccountService.createAppAccount(param)) + .build(); + } + + /** + * 删除应用账户 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "删除应用账户") + @Audit(type = EventType.DELETE_APP_ACCOUNT) + @DeleteMapping(value = "/delete/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult deleteAppAccount(@PathVariable(value = "id") String id) { + return ApiRestResult. builder().result(appAccountService.deleteAppAccount(id)) + .build(); + } + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppCertController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppCertController.java new file mode 100644 index 00000000..5d7f082d --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppCertController.java @@ -0,0 +1,69 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.app; + +import java.util.List; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import cn.topiam.employee.application.saml2.model.AppSaml2StandardConfigGetResult; +import cn.topiam.employee.console.pojo.query.app.AppCertQuery; +import cn.topiam.employee.console.pojo.result.app.AppCertListResult; +import cn.topiam.employee.console.service.app.AppCertService; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AppConstants.APP_PATH; + +/** + * 应用证书 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 21:38 + */ +@Validated +@Tag(name = "应用证书") +@RestController +@AllArgsConstructor +@RequestMapping(value = APP_PATH + "/cert", produces = MediaType.APPLICATION_JSON_VALUE) +public class AppCertController { + + /** + * 获取应用证书列表 + * + * @param query {@link AppCertQuery} + * @return {@link AppSaml2StandardConfigGetResult} + */ + @Operation(summary = "获取应用证书列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getAppCertificateListResult(@Validated AppCertQuery query) { + List list = appCertService.getAppCertListResult(query); + return ApiRestResult.> builder().result(list).build(); + } + + private final AppCertService appCertService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppController.java new file mode 100644 index 00000000..cfdc6502 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppController.java @@ -0,0 +1,207 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.app; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.application.saml2.model.AppSaml2StandardConfigGetResult; +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.console.pojo.query.app.AppQuery; +import cn.topiam.employee.console.pojo.result.app.AppCreateResult; +import cn.topiam.employee.console.pojo.result.app.AppGetResult; +import cn.topiam.employee.console.pojo.result.app.AppListResult; +import cn.topiam.employee.console.pojo.save.app.AppCreateParam; +import cn.topiam.employee.console.pojo.update.app.AppSaveConfigParam; +import cn.topiam.employee.console.pojo.update.app.AppUpdateParam; +import cn.topiam.employee.console.service.app.AppService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AppConstants.APP_PATH; + +/** + * 应用管理 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/24 22:35 + */ +@Validated +@Tag(name = "应用管理") +@RestController +@AllArgsConstructor +@RequestMapping(value = APP_PATH, produces = MediaType.APPLICATION_JSON_VALUE) +public class AppController { + + /** + * 获取应用列表 + * + * @param page {@link PageModel} + * @return {@link AppQuery} + */ + @Operation(summary = "获取应用列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getAppList(PageModel page, AppQuery query) { + Page list = appService.getAppList(page, query); + return ApiRestResult.> builder().result(list).build(); + } + + /** + * 创建应用 + * + * @param param {@link AppCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "创建应用") + @Audit(type = EventType.ADD_APP) + @PostMapping(value = "/create") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult createApp(@RequestBody @Validated AppCreateParam param) { + return ApiRestResult. builder().result(appService.createApp(param)) + .build(); + } + + /** + * 修改应用 + * + * @param param {@link AppUpdateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "修改应用") + @Audit(type = EventType.UPDATE_APP) + @PutMapping(value = "/update") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult updateApp(@RequestBody @Validated AppUpdateParam param) { + return ApiRestResult. builder().result(appService.updateApp(param)).build(); + } + + /** + * 更新应用配置 + * + * @param param {@link AppSaveConfigParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "保存应用配置") + @Audit(type = EventType.UPDATE_APP) + @PutMapping(value = "/save/config") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult saveAppConfig(@RequestBody @Validated AppSaveConfigParam param) { + return ApiRestResult. builder().result(appService.saveAppConfig(param)).build(); + } + + /** + * 获取应用配置 + * + * @param appId {@link String} + * @return {@link AppSaml2StandardConfigGetResult} + */ + @Operation(summary = "获取应用配置") + @GetMapping(value = "/get/config/{appId}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getAppConfig(@PathVariable String appId) { + Object config = appService.getAppConfig(appId); + return ApiRestResult.builder().result(config).build(); + } + + /** + * 删除应用 + * + * @param id {@link Long} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "删除应用") + @Audit(type = EventType.DELETE_APP) + @DeleteMapping(value = "/delete/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult deleteApp(@PathVariable(value = "id") String id) { + return ApiRestResult. builder().result(appService.deleteApp(Long.valueOf(id))) + .build(); + } + + /** + * 获取应用信息 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Operation(summary = "获取应用信息") + @GetMapping(value = "/get/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getApp(@PathVariable(value = "id") String id) { + AppGetResult result = appService.getApp(Long.valueOf(id)); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 启用应用 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "启用应用") + @Audit(type = EventType.ENABLE_APP) + @PutMapping(value = "/enable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult enableIdentitySource(@PathVariable(value = "id") String id) { + boolean result = appService.enableApp(id); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 禁用应用 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "禁用应用") + @Audit(type = EventType.DISABLE_APP) + @PutMapping(value = "/disable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disableIdentitySource(@PathVariable(value = "id") String id) { + boolean result = appService.disableApp(id); + return ApiRestResult. builder().result(result).build(); + } + + /** + * ApplicationService + */ + private final AppService appService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppPermissionActionController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppPermissionActionController.java new file mode 100644 index 00000000..4b06b32f --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppPermissionActionController.java @@ -0,0 +1,76 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.app; + +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import cn.topiam.employee.console.pojo.query.app.AppPermissionActionListQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionActionListResult; +import cn.topiam.employee.console.service.app.AppPermissionActionService; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.RequiredArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AppConstants.APP_PATH; + +/** + * 应用权限-权限 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 20:28 + */ +@RequiredArgsConstructor +@Validated +@Tag(name = "应用权限-权限项") +@RequestMapping(value = APP_PATH + + "/permission/action", produces = MediaType.APPLICATION_JSON_VALUE) +@RestController +public class AppPermissionActionController { + + /** + * logger + */ + private final Logger logger = LoggerFactory.getLogger(AppPermissionActionController.class); + + /** + * 获取所有权限 + * + * @return {@link AppPermissionActionListResult} + */ + @Operation(summary = "获取权限项列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getPermissionActionList(@Validated AppPermissionActionListQuery query) { + List list = appPermissionActionService + .getPermissionActionList(query); + return ApiRestResult.> builder().result(list).build(); + } + + private final AppPermissionActionService appPermissionActionService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppPermissionPolicyController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppPermissionPolicyController.java new file mode 100644 index 00000000..208f77b7 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppPermissionPolicyController.java @@ -0,0 +1,142 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.app; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.common.entity.app.query.AppPolicyQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionPolicyGetResult; +import cn.topiam.employee.console.pojo.result.app.AppPermissionPolicyListResult; +import cn.topiam.employee.console.pojo.result.app.AppPermissionRoleListResult; +import cn.topiam.employee.console.pojo.save.app.AppPermissionPolicyCreateParam; +import cn.topiam.employee.console.pojo.save.app.AppPermissionRoleCreateParam; +import cn.topiam.employee.console.pojo.update.app.AppPermissionPolicyUpdateParam; +import cn.topiam.employee.console.pojo.update.app.PermissionRoleUpdateParam; +import cn.topiam.employee.console.service.app.AppPermissionPolicyService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.RequiredArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AppConstants.APP_PATH; + +/** + * 应用权限 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/12 22:30 + */ +@Validated +@Tag(name = "应用权限-授权策略") +@RequestMapping(value = APP_PATH + + "/permission/policy", produces = MediaType.APPLICATION_JSON_VALUE) +@RestController +@RequiredArgsConstructor +public class AppPermissionPolicyController { + + /** + * 获取所有策略(分页) + * + * @param page {@link PageModel} + * @return {@link AppPermissionRoleListResult} + */ + @Operation(summary = "获取策略列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getPermissionPolicyList(PageModel page, + @Validated AppPolicyQuery query) { + Page result = permissionPolicyService + .getPermissionPolicyList(page, query); + return ApiRestResult.> builder().result(result).build(); + } + + /** + * 创建资源 + * + * @param param {@link AppPermissionRoleCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "创建资源") + @PostMapping(value = "/create") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult createPolicy(@Validated @RequestBody AppPermissionPolicyCreateParam param) { + return ApiRestResult. builder() + .result(permissionPolicyService.createPermissionPolicy(param)).build(); + } + + /** + * 修改资源 + * + * @param param {@link PermissionRoleUpdateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "修改资源") + @PutMapping(value = "/update/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult updatePolicy(@Validated AppPermissionPolicyUpdateParam param) { + return ApiRestResult. builder() + .result(permissionPolicyService.updatePermissionPolicy(param)).build(); + } + + /** + * 删除资源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "删除资源") + @DeleteMapping(value = "/delete/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult deletePermissionPolicy(@PathVariable(value = "id") String id) { + return ApiRestResult. builder() + .result(permissionPolicyService.deletePermissionPolicy(id)).build(); + } + + /** + * 获取资源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "获取资源信息") + @GetMapping(value = "/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getPermissionPolicy(@PathVariable(value = "id") String id) { + //返回 + return ApiRestResult. builder() + .result(permissionPolicyService.getPermissionPolicy(id)).build(); + } + + private final AppPermissionPolicyService permissionPolicyService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppPermissionResourceController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppPermissionResourceController.java new file mode 100644 index 00000000..68ba1ed2 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppPermissionResourceController.java @@ -0,0 +1,213 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.app; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.enums.CheckValidityType; +import cn.topiam.employee.console.pojo.query.app.AppResourceListQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionResourceGetResult; +import cn.topiam.employee.console.pojo.result.app.AppPermissionResourceListResult; +import cn.topiam.employee.console.pojo.result.app.AppPermissionRoleListResult; +import cn.topiam.employee.console.pojo.save.app.AppPermissionResourceCreateParam; +import cn.topiam.employee.console.pojo.save.app.AppPermissionRoleCreateParam; +import cn.topiam.employee.console.pojo.update.app.AppPermissionResourceUpdateParam; +import cn.topiam.employee.console.pojo.update.app.PermissionRoleUpdateParam; +import cn.topiam.employee.console.service.app.AppPermissionResourceService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.RequiredArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AppConstants.APP_PATH; + +/** + * 应用权限 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/7/12 22:30 + */ +@Validated +@Tag(name = "应用权限-资源") +@RequestMapping(value = APP_PATH + + "/permission/resource", produces = MediaType.APPLICATION_JSON_VALUE) +@RestController +@RequiredArgsConstructor +public class AppPermissionResourceController { + + /** + * logger + */ + private final Logger logger = LoggerFactory.getLogger(AppPermissionResourceController.class); + + /** + * 获取所有资源(分页) + * + * @param page {@link PageModel} + * @return {@link AppPermissionRoleListResult} + */ + @Operation(summary = "获取资源列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getPermissionResourceList(PageModel page, + @Validated AppResourceListQuery query) { + Page result = appPermissionResourceService + .getPermissionResourceList(page, query); + return ApiRestResult.> builder().result(result) + .build(); + } + + /** + * 创建资源 + * + * @param param {@link AppPermissionRoleCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "创建资源") + @Audit(type = EventType.SAVE_APP_PERMISSION_RESOURCE) + @PostMapping(value = "/create") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult createResource(@Validated @RequestBody AppPermissionResourceCreateParam param) { + return ApiRestResult. builder() + .result(appPermissionResourceService.createPermissionResource(param)).build(); + } + + /** + * 修改资源 + * + * @param param {@link PermissionRoleUpdateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "修改资源") + @Audit(type = EventType.UPDATE_APP_PERMISSION_RESOURCE) + @PutMapping(value = "/update") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult updateResource(@RequestBody @Validated AppPermissionResourceUpdateParam param) { + return ApiRestResult. builder() + .result(appPermissionResourceService.updatePermissionResource(param)).build(); + } + + /** + * 删除资源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "删除资源") + @Audit(type = EventType.DELETE_APP_PERMISSION_RESOURCE) + @DeleteMapping(value = "/delete/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult deletePermissionResource(@PathVariable(value = "id") String id) { + return ApiRestResult. builder() + .result(appPermissionResourceService.deletePermissionResource(id)).build(); + } + + /** + * 获取资源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Operation(summary = "获取资源信息") + @GetMapping(value = "/get/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getPermissionResource(@PathVariable(value = "id") String id) { + //返回 + return ApiRestResult. builder() + .result(appPermissionResourceService.getPermissionResource(id)).build(); + } + + /** + * 启用资源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "启用资源") + @Audit(type = EventType.ENABLE_APP_PERMISSION_RESOURCE) + @PutMapping(value = "/enable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult enableOrganization(@PathVariable(value = "id") Long id) { + return ApiRestResult. builder() + .result(appPermissionResourceService.updateStatus(id, Boolean.TRUE)).build(); + } + + /** + * 禁用资源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "禁用资源") + @Audit(type = EventType.DISABLE_APP_PERMISSION_RESOURCE) + @PutMapping(value = "/disable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disableOrganization(@PathVariable(value = "id") Long id) { + return ApiRestResult. builder() + .result(appPermissionResourceService.updateStatus(id, Boolean.FALSE)).build(); + } + + /** + * 参数有效性验证 + * + * @return {@link Boolean} + */ + @Operation(summary = "参数有效性验证") + @GetMapping(value = "/param_check") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult resourceParamCheck(@Parameter(description = "验证类型") @NotNull(message = "验证类型不能为空") CheckValidityType type, + @Parameter(description = "值") @NotEmpty(message = "验证值不能为空") String value, + @Parameter(description = "应用ID") @NotNull(message = "应用ID不能为空") Long appId, + @Parameter(description = "ID") Long id) { + Boolean result = appPermissionResourceService.permissionResourceParamCheck(type, value, + appId, id); + //返回 + return ApiRestResult. builder().result(result).build(); + } + + /** + * 资源服务类 + */ + private final AppPermissionResourceService appPermissionResourceService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppPermissionRoleController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppPermissionRoleController.java new file mode 100644 index 00000000..6bbafef9 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppPermissionRoleController.java @@ -0,0 +1,205 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.app; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.enums.CheckValidityType; +import cn.topiam.employee.console.pojo.query.app.AppPermissionRoleListQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionRoleListResult; +import cn.topiam.employee.console.pojo.result.app.AppPermissionRoleResult; +import cn.topiam.employee.console.pojo.save.app.AppPermissionRoleCreateParam; +import cn.topiam.employee.console.pojo.update.app.PermissionRoleUpdateParam; +import cn.topiam.employee.console.service.app.AppPermissionRoleService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.RequiredArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AppConstants.APP_PATH; + +/** + * 应用角色 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 20:28 + */ +@RequiredArgsConstructor +@Validated +@Tag(name = "应用权限-角色") +@RequestMapping(value = APP_PATH + "/permission/role", produces = MediaType.APPLICATION_JSON_VALUE) +@RestController +public class AppPermissionRoleController { + + /** + * logger + */ + private final Logger logger = LoggerFactory.getLogger(AppPermissionRoleController.class); + + /** + * 获取所有角色(分页) + * + * @param page {@link PageModel} + * @return {@link AppPermissionRoleListResult} + */ + @Operation(summary = "获取角色列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getPermissionRoleList(PageModel page, + @Validated AppPermissionRoleListQuery query) { + Page result = appPermissionRoleService + .getPermissionRoleList(page, query); + return ApiRestResult.> builder().result(result).build(); + } + + /** + * 创建角色 + * + * @param param {@link AppPermissionRoleCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "创建角色") + @Audit(type = EventType.SAVE_APP_PERMISSION_ROLE) + @PostMapping(value = "/create") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult createPermissionRole(@Validated @RequestBody AppPermissionRoleCreateParam param) { + return ApiRestResult. builder() + .result(appPermissionRoleService.createPermissionRole(param)).build(); + } + + /** + * 修改角色 + * + * @param param {@link PermissionRoleUpdateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "修改角色") + @Audit(type = EventType.UPDATE_APP_PERMISSION_ROLE) + @PutMapping(value = "/update") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult updatePermissionRole(@RequestBody @Validated PermissionRoleUpdateParam param) { + return ApiRestResult. builder() + .result(appPermissionRoleService.updatePermissionRole(param)).build(); + } + + /** + * 删除角色 + * + * @param ids {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "删除角色") + @Audit(type = EventType.DELETE_APP_PERMISSION_ROLE) + @DeleteMapping(value = "/delete/{ids}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult deletePermissionRole(@PathVariable(value = "ids") String ids) { + return ApiRestResult. builder() + .result(appPermissionRoleService.deletePermissionRole(ids)).build(); + } + + /** + * 获取角色 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Operation(summary = "获取角色信息") + @GetMapping(value = "/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getPermissionRole(@PathVariable(value = "id") Long id) { + AppPermissionRoleResult details = appPermissionRoleService.getPermissionRole(id); + //返回 + return ApiRestResult. builder().result(details).build(); + } + + /** + * 启用角色 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "启用角色") + @PutMapping(value = "/enable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult enablePermissionRole(@PathVariable(value = "id") String id) { + Boolean result = appPermissionRoleService.updatePermissionRoleStatus(id, Boolean.TRUE); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 禁用角色 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "禁用角色") + @PutMapping(value = "/disable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disablePermissionRole(@PathVariable(value = "id") String id) { + Boolean result = appPermissionRoleService.updatePermissionRoleStatus(id, Boolean.FALSE); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 参数有效性验证 + * + * @return {@link Boolean} + */ + @Operation(summary = "参数有效性验证") + @GetMapping(value = "/param_check") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult permissionRoleParamCheck(@Parameter(description = "验证类型") @NotNull(message = "验证类型不能为空") CheckValidityType type, + @Parameter(description = "值") @NotEmpty(message = "验证值不能为空") String value, + @Parameter(description = "应用ID") @NotNull(message = "应用ID不能为空") Long appId, + @Parameter(description = "ID") Long id) { + Boolean result = appPermissionRoleService.permissionRoleParamCheck(type, value, appId, id); + //返回 + return ApiRestResult. builder().result(result).build(); + } + + /** + * 角色服务类 + */ + private final AppPermissionRoleService appPermissionRoleService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppSaml2Controller.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppSaml2Controller.java new file mode 100644 index 00000000..92c276a7 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppSaml2Controller.java @@ -0,0 +1,105 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.app; + +import java.io.IOException; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import cn.topiam.employee.console.pojo.result.app.ParseSaml2MetadataResult; +import cn.topiam.employee.console.service.app.AppSaml2Service; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AppConstants.APP_PATH; + +/** + * SAML2 应用配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 21:38 + */ +@Validated +@Tag(name = "SAML2 应用元数据解析") +@RestController +@AllArgsConstructor +@RequestMapping(value = APP_PATH + "/saml2", produces = MediaType.APPLICATION_JSON_VALUE) +public class AppSaml2Controller { + + /** + * 解析SAML metadata + * + * @param metadataUrl {@link String} + * @return {@link Boolean} + */ + @Lock + @Operation(summary = "通过 Metadata URL 解析元数据") + @PostMapping(value = "/parse/metadata_url") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult parseSaml2MetadataUrl(@Parameter(description = "元数据 URL") @RequestParam String metadataUrl) { + ParseSaml2MetadataResult result = appSaml2Service.parseSaml2MetadataUrl(metadataUrl); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 解析SAML metadata + * + * @param metadataFile {@link MultipartFile} + * @return {@link Boolean} + */ + @Lock + @Operation(summary = "通过 Metadata File 解析元数据") + @PostMapping(value = "/parse/metadata_file", consumes = { MediaType.MULTIPART_FORM_DATA_VALUE }, produces = { MediaType.APPLICATION_JSON_VALUE }) + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult parseSaml2MetadataFile(@RequestPart(value = "file") @Parameter(description = "元数据文件") final MultipartFile metadataFile) throws IOException { + ParseSaml2MetadataResult result = appSaml2Service + .parseSaml2Metadata(metadataFile.getInputStream()); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 下载 IDP SAML2 元数据 + * + * @param appId {@link String} + */ + @Lock + @Operation(summary = "下载 IDP SAML2 元数据") + @GetMapping(value = "/download/idp_metadata_file") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public void downloadSaml2IdpMetadataFile(@Valid @Parameter(description = "应用ID") @NotBlank(message = "应用ID不能为空") @RequestParam(value = "appId", required = false) String appId) throws IOException { + appSaml2Service.downloadSaml2IdpMetadataFile(appId); + } + + /** + * AppSaml2Service + */ + private final AppSaml2Service appSaml2Service; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppTemplateController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppTemplateController.java new file mode 100644 index 00000000..f205d274 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/app/AppTemplateController.java @@ -0,0 +1,87 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.app; + +import java.util.List; +import java.util.Map; + +import javax.validation.constraints.NotEmpty; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import cn.topiam.employee.common.enums.app.AppType; +import cn.topiam.employee.console.pojo.result.app.AppTemplateResult; +import cn.topiam.employee.console.service.app.AppTemplateService; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.RequiredArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AppConstants.APP_PATH; + +/** + * 应用模板 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/27 19:28 + */ +@Validated +@Tag(name = "应用模板") +@RestController +@RequiredArgsConstructor +@RequestMapping(value = APP_PATH + "/template", produces = MediaType.APPLICATION_JSON_VALUE) +public class AppTemplateController { + + /** + * 获取模板列表 + * + * @return {@link AppTemplateResult} + */ + @Operation(summary = "模板列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getAppTemplateList(@Parameter(description = "模板类型") @RequestParam(value = "type", required = false) String type, + @RequestParam(value = "name", required = false) String name) { + return ApiRestResult.ok(templateService.getAppTemplateList(AppType.getType(type), name)); + } + + /** + * 模板表单架构 + * + * @return {@link AppTemplateResult} + */ + @Operation(summary = "模板表单架构") + @GetMapping(value = "/form_schema") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getAppTemplateFormSchema(@Validated @Parameter(description = "模板编码") @NotEmpty(message = "模板编码不能为空") @RequestParam(value = "code", required = false) String code) { + return ApiRestResult.ok(templateService.getAppTemplateFormSchema(code)); + } + + /** + * ApplicationTemplateService + */ + private final AppTemplateService templateService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/authentication/IdentityProviderController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/authentication/IdentityProviderController.java new file mode 100644 index 00000000..6aff3b16 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/authentication/IdentityProviderController.java @@ -0,0 +1,178 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.authentication; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.constants.AuthenticationConstants; +import cn.topiam.employee.console.pojo.query.authentication.IdentityProviderListQuery; +import cn.topiam.employee.console.pojo.result.authentication.IdentityProviderCreateResult; +import cn.topiam.employee.console.pojo.result.authentication.IdentityProviderListResult; +import cn.topiam.employee.console.pojo.result.authentication.IdentityProviderResult; +import cn.topiam.employee.console.pojo.save.authentication.IdentityProviderCreateParam; +import cn.topiam.employee.console.pojo.update.authentication.IdpUpdateParam; +import cn.topiam.employee.console.service.authentication.IdentityProviderService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; + +/** + * 身份提供商 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/11 19:18 + */ +@Tag(name = "身份提供商") +@Validated +@RestController +@RequestMapping(value = AuthenticationConstants.AUTHENTICATION_PATH + + "/idp", produces = MediaType.APPLICATION_JSON_VALUE) +@AllArgsConstructor +public class IdentityProviderController { + + /** + * 获取列表 + * + * @return {@link IdentityProviderListResult} + */ + @Operation(summary = "提供商列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getIdentityProviderList(PageModel pageModel, + IdentityProviderListQuery query) { + Page results = identityProviderService + .getIdentityProviderList(pageModel, query); + return ApiRestResult.> builder().result(results).build(); + } + + /** + * 创建提供商 + * + * @param param {@link IdentityProviderCreateParam} + * @return {@link IdentityProviderCreateResult} + */ + @Lock + @Preview + @Operation(summary = "创建提供商") + @Audit(type = EventType.ADD_IDP) + @PostMapping(value = "/create") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult createIdentityProvider(@RequestBody @Validated IdentityProviderCreateParam param) { + IdentityProviderCreateResult result = identityProviderService.createIdp(param); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 修改提供商 + * + * @param param {@link IdentityProviderCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "修改提供商") + @Audit(type = EventType.UPDATE_IDP) + @PutMapping(value = "/update") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult updateIdentityProvider(@RequestBody @Validated IdpUpdateParam param) { + boolean success = identityProviderService.updateIdentityProvider(param); + return ApiRestResult. builder().result(success).build(); + } + + /** + * 详情 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Operation(summary = "获取提供商信息") + @GetMapping(value = "/get/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getIdentityProvider(@PathVariable(value = "id") String id) { + IdentityProviderResult result = identityProviderService.getIdentityProvider(id); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 启用提供商 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "启用提供商") + @Audit(type = EventType.ENABLE_IDP) + @PutMapping(value = "/enable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult enableIdentityProvider(@PathVariable(value = "id") String id) { + boolean result = identityProviderService.updateIdentityProviderStatus(id, true); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 禁用提供商 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "禁用提供商") + @Audit(type = EventType.DISABLE_IDP) + @PutMapping(value = "/disable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disableIdentityProvider(@PathVariable(value = "id") String id) { + boolean result = identityProviderService.updateIdentityProviderStatus(id, false); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 删除提供商 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "删除提供商") + @Audit(type = EventType.DELETE_IDP) + @DeleteMapping(value = "/delete/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult deleteIdentityProvider(@PathVariable(value = "id") String id) { + boolean result = identityProviderService.deleteIdentityProvider(id); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 身份提供商服务 + */ + private final IdentityProviderService identityProviderService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/identitysource/IdentitySourceController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/identitysource/IdentitySourceController.java new file mode 100644 index 00000000..83ba11ef --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/identitysource/IdentitySourceController.java @@ -0,0 +1,245 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.identitysource; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.entity.identitysource.IdentitySourceEntity; +import cn.topiam.employee.console.converter.identitysource.IdentitySourceConverter; +import cn.topiam.employee.console.pojo.other.IdentitySourceConfigValidatorParam; +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceListQuery; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceConfigGetResult; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceGetResult; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceListResult; +import cn.topiam.employee.console.pojo.save.identitysource.IdentitySourceConfigSaveParam; +import cn.topiam.employee.console.pojo.save.identitysource.IdentitySourceCreateParam; +import cn.topiam.employee.console.pojo.save.identitysource.IdentitySourceCreateResult; +import cn.topiam.employee.console.pojo.update.identity.IdentitySourceUpdateParam; +import cn.topiam.employee.console.service.identitysource.IdentitySourceService; +import cn.topiam.employee.identitysource.core.event.IdentitySourceEventUtils; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AccountConstants.IDENTITY_SOURCE_PATH; + +/** + * 身份源管理 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/11 19:18 + */ +@Validated +@Tag(name = "身份源管理") +@RestController +@AllArgsConstructor +@RequestMapping(value = IDENTITY_SOURCE_PATH, produces = MediaType.APPLICATION_JSON_VALUE) +public class IdentitySourceController { + + /** + * 获取列表 + * + * @return {@link IdentitySourceListResult} + */ + @Operation(summary = "身份源列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getIdentitySourceList(PageModel pageModel, + IdentitySourceListQuery query) { + Page results = identitySourceService.getIdentitySourceList(query, + pageModel); + return ApiRestResult.> builder().result(results).build(); + } + + /** + * 创建身份源 + * + * @param param {@link IdentitySourceCreateParam} + * @return {@link IdentitySourceCreateResult} + */ + @Lock + @Preview + @Operation(summary = "创建身份源") + @Audit(type = EventType.CREATE_IDENTITY_RESOURCE) + @PostMapping(value = "/create") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult createIdentitySource(@RequestBody @Validated IdentitySourceCreateParam param) { + IdentitySourceCreateResult result = identitySourceService.createIdentitySource(param); + IdentitySourceEventUtils.register(result.getId()); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 修改身份源 + * + * @param param {@link IdentitySourceCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "修改身份源") + @Audit(type = EventType.UPDATE_IDENTITY_RESOURCE) + @PutMapping(value = "/update") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult updateIdentitySource(@RequestBody @Validated IdentitySourceUpdateParam param) { + boolean success = identitySourceService.updateIdentitySource(param); + //注册 + IdentitySourceEventUtils.register(param.getId()); + return ApiRestResult. builder().result(success).build(); + } + + /** + * 保存身份源配置 + * + * @param param {@link IdentitySourceCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "保存身份源配置") + @PutMapping(value = "/save/config") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult saveIdentitySourceConfig(@RequestBody @Validated IdentitySourceConfigSaveParam param) { + boolean success = identitySourceService.saveIdentitySourceConfig(param); + //注册 + IdentitySourceEventUtils.register(param.getId()); + return ApiRestResult. builder().result(success).build(); + } + + /** + * 获取身份源配置 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Operation(summary = "获取身份源配置") + @GetMapping(value = "/get/config/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getIdentitySourceConfig(@PathVariable(value = "id") String id) { + IdentitySourceEntity entity = identitySourceService.getIdentitySource(id); + IdentitySourceConfigGetResult result = identitySourceConverter + .entityConverterToIdentitySourceConfigGetResult(entity); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 获取认证源信息 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Operation(summary = "获取认证源") + @GetMapping(value = "/get/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getIdentitySource(@PathVariable(value = "id") String id) { + IdentitySourceEntity entity = identitySourceService.getIdentitySource(id); + IdentitySourceGetResult result = identitySourceConverter + .entityConverterToIdentitySourceGetResult(entity); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 启用身份源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "启用身份源") + @Audit(type = EventType.ENABLE_IDENTITY_RESOURCE) + @PutMapping(value = "/enable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult enableIdentitySource(@PathVariable(value = "id") String id) { + boolean result = identitySourceService.enableIdentitySource(id); + //注册 + IdentitySourceEventUtils.register(id); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 禁用身份源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "禁用身份源") + @Audit(type = EventType.DISABLE_IDENTITY_RESOURCE) + @PutMapping(value = "/disable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disableIdentitySource(@PathVariable(value = "id") String id) { + boolean result = identitySourceService.disableIdentitySource(id); + //移除 + IdentitySourceEventUtils.destroy(id); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 删除身份源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "删除身份源") + @Audit(type = EventType.DELETE_IDENTITY_RESOURCE) + @DeleteMapping(value = "/delete/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult deleteIdentitySource(@PathVariable String id) { + boolean success = identitySourceService.deleteIdentitySource(id); + //移除 + IdentitySourceEventUtils.destroy(id); + return ApiRestResult. builder().result(success).build(); + } + + /** + * 身份源配置验证 + * + * @param param {@link IdentitySourceConfigValidatorParam} + * @return {@link Boolean} + */ + @Operation(summary = "身份源配置验证") + @PostMapping(value = "/config_validator") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult identitySourceConfigValidator(@RequestBody @Validated IdentitySourceConfigValidatorParam param) { + boolean success = identitySourceService.identitySourceConfigValidator(param); + return ApiRestResult. builder().result(success).build(); + } + + /** + * 身份源服务 + */ + private final IdentitySourceService identitySourceService; + + private final IdentitySourceConverter identitySourceConverter; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/identitysource/IdentitySourceEventController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/identitysource/IdentitySourceEventController.java new file mode 100644 index 00000000..54de9211 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/identitysource/IdentitySourceEventController.java @@ -0,0 +1,74 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.identitysource; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceEventRecordListQuery; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceEventRecordListResult; +import cn.topiam.employee.console.service.identitysource.IdentitySourceEventRecordService; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AccountConstants.IDENTITY_SOURCE_PATH; + +/** + * 身份源事件记录 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/11 19:18 + */ +@Validated +@Tag(name = "身份源事件") +@RestController +@AllArgsConstructor +@RequestMapping(value = IDENTITY_SOURCE_PATH + + "/event", produces = MediaType.APPLICATION_JSON_VALUE) +public class IdentitySourceEventController { + + /** + * 身份源事件列表 + * + * @return {@link IdentitySourceEventRecordListResult} + */ + @Operation(summary = "身份源事件列表") + @GetMapping(value = "/record_list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getIdentitySourceSynchronizeRecordList(PageModel pageModel, + IdentitySourceEventRecordListQuery query) { + Page results = identitySourceEventRecordService + .getIdentitySourceEventRecordList(query, pageModel); + return ApiRestResult.> builder().result(results) + .build(); + } + + /** + * 身份源同步Service + */ + private final IdentitySourceEventRecordService identitySourceEventRecordService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/identitysource/IdentitySourceSyncController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/identitysource/IdentitySourceSyncController.java new file mode 100644 index 00000000..9dd9fce6 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/identitysource/IdentitySourceSyncController.java @@ -0,0 +1,110 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.identitysource; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceSyncHistoryListQuery; +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceSyncRecordListQuery; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceSyncHistoryListResult; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceSyncRecordListResult; +import cn.topiam.employee.console.service.identitysource.IdentitySourceSyncService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.AccountConstants.IDENTITY_SOURCE_PATH; + +/** + * 身份源同步记录 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/11 19:18 + */ +@Validated +@Tag(name = "身份源同步") +@RestController +@AllArgsConstructor +@RequestMapping(value = IDENTITY_SOURCE_PATH + "/sync", produces = MediaType.APPLICATION_JSON_VALUE) +public class IdentitySourceSyncController { + + /** + * 执行同步 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "执行身份源同步") + @Audit(type = EventType.IDENTITY_RESOURCE_SYNC) + @PostMapping(value = "/execute/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult executeIdentitySourceSync(@PathVariable String id) { + identitySourceSyncService.executeIdentitySourceSync(id); + return ApiRestResult.ok(); + } + + /** + * 同步历史列表 + * + * @return {@link IdentitySourceSyncHistoryListResult} + */ + @Operation(summary = "同步历史列表") + @GetMapping(value = "/history_list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getIdentitySourceSyncHistoryList(PageModel pageModel, + IdentitySourceSyncHistoryListQuery query) { + Page results = identitySourceSyncService + .getIdentitySourceSyncHistoryList(query, pageModel); + return ApiRestResult.> builder().result(results) + .build(); + } + + /** + * 同步记录列表 + * + * @return {@link IdentitySourceSyncRecordListResult} + */ + @Operation(summary = "同步记录列表") + @GetMapping(value = "/record_list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getIdentitySourceSyncRecordList(PageModel pageModel, + @Validated IdentitySourceSyncRecordListQuery query) { + Page results = identitySourceSyncService + .getIdentitySourceSyncRecordList(query, pageModel); + return ApiRestResult.> builder().result(results) + .build(); + } + + /** + * 身份源同步Service + */ + private final IdentitySourceSyncService identitySourceSyncService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/package-info.java new file mode 100644 index 00000000..2ec8dec7 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/package-info.java @@ -0,0 +1,22 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 22:35 + */ +package cn.topiam.employee.console.controller; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/session/SessionManageEndpoint.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/session/SessionManageEndpoint.java new file mode 100644 index 00000000..d8260b8c --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/session/SessionManageEndpoint.java @@ -0,0 +1,245 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.session; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.mapstruct.Mapper; +import org.springframework.security.core.session.SessionRegistry; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.enums.UserType; +import cn.topiam.employee.common.geo.GeoLocation; +import cn.topiam.employee.core.security.session.SessionDetails; +import cn.topiam.employee.core.security.session.TopIamSessionBackedSessionRegistry; +import cn.topiam.employee.core.security.util.SecurityUtils; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.result.ApiRestResult; +import cn.topiam.employee.support.util.HttpResponseUtils; +import cn.topiam.employee.support.web.useragent.UserAgent; + +import lombok.Data; +import lombok.experimental.Accessors; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames.USERNAME; + +import static cn.topiam.employee.common.constants.SessionConstants.SESSION_PATH; +import static cn.topiam.employee.support.constant.EiamConstants.DEFAULT_DATE_TIME_FORMATTER_PATTERN; + +/** + * 会话管理 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/8 21:39 + */ +@Tag(name = "会话管理") +@RestController +@RequestMapping(value = SESSION_PATH) +public class SessionManageEndpoint { + /** + * list + * + * @param req {@link HttpServletRequest} + * @param resp {@link HttpServletResponse} + * @return {@link ApiRestResult} + */ + @Operation(summary = "在线会话") + @GetMapping("/list") + public ApiRestResult> list(HttpServletRequest req, + HttpServletResponse resp) { + List list = new ArrayList<>(); + List principals = new ArrayList<>(); + SessionRegistry registry = ApplicationContextHelp.getBean(SessionRegistry.class); + if (registry instanceof TopIamSessionBackedSessionRegistry) { + //普通用户只能看自己的会话 + if (SecurityUtils.getCurrentUser().getUserType().equals(UserType.USER)) { + principals = ((TopIamSessionBackedSessionRegistry) (registry)) + .getPrincipals(SecurityUtils.getCurrentUser().getUsername()); + } + //管理员看所有 + if (SecurityUtils.getCurrentUser().getUserType().equals(UserType.ADMIN)) { + //根据用户查询 + if (StringUtils.isNoneBlank(req.getParameter(USERNAME))) { + principals = ((TopIamSessionBackedSessionRegistry) (registry)) + .getPrincipals(req.getParameter(USERNAME)); + } else { + principals = registry.getAllPrincipals(); + } + } + //封装数据 + principals.forEach(principal -> { + if (principal instanceof SessionDetails) { + //过滤掉当前用户的会话 + if (!((SessionDetails) principal).getSessionId() + .equals(req.getSession().getId())) { + //@formatter:off + OnlineUserConverter userConverter = ApplicationContextHelp.getBean(OnlineUserConverter.class); + OnlineSession user = userConverter.sessionDetailsToOnlineSession(((SessionDetails) principal)); + list.add(user); + //@formatter:on + } + } + }); + + } + // 封装返回 + return ApiRestResult.> builder().result(list).build(); + } + + /** + * remove + * + * @param req {@link HttpServletRequest} + * @param resp {@link HttpServletResponse} + * @return {@link ApiRestResult} + */ + @Lock + @Preview + @Operation(summary = "下线会话") + @Audit(type = EventType.DOWN_LINE_SESSION) + @DeleteMapping("/remove") + public ApiRestResult remove(HttpServletRequest req, HttpServletResponse resp) { + String sessionIds = req.getParameter("sessionIds"); + //session id blank + if (!StringUtils.isNoneBlank(sessionIds)) { + HttpResponseUtils.flushResponse(resp, JSON.toJSONString(ApiRestResult.err("会话ID不存在!"))); + } + SessionRegistry registry = ApplicationContextHelp.getBean(SessionRegistry.class); + String[] ids = sessionIds.split(","); + Arrays.stream(ids).forEach((i) -> { + //如果sessionId等于当前操作用户sessionId不操作 + if (!req.getSession().getId().equals(i)) { + AuditContext + .setTarget(Target.builder().id(i.toString()).type(TargetType.SESSION).build()); + registry.removeSessionInformation(i); + } + }); + //返回 + return ApiRestResult.ok(); + } + +} + +/** + * 在线用户 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/9/8 21:42 + */ +@Data +@Accessors(chain = true) +class OnlineSession implements Serializable { + + @Serial + private static final long serialVersionUID = 8227098865368453321L; + /** + * 用户ID + */ + private String id; + /** + * 用户名 + */ + private String username; + + /** + * 活动地点 + */ + @JsonTypeInfo(use = JsonTypeInfo.Id.NONE) + private GeoLocation geoLocation; + + /** + * 用户代理 + */ + @JsonTypeInfo(use = JsonTypeInfo.Id.NONE) + private UserAgent userAgent; + + /** + * 登录时间 + */ + @JSONField(format = DEFAULT_DATE_TIME_FORMATTER_PATTERN) + private LocalDateTime loginTime; + + /** + * 最后请求时间 + */ + @JSONField(format = DEFAULT_DATE_TIME_FORMATTER_PATTERN) + private LocalDateTime lastRequest; + + /** + * session ID + */ + private String sessionId; + +} + +@Mapper(componentModel = "spring") +interface OnlineUserConverter { + /** + * 系统用户转在线会话 + * + * @param sessionDetails {@link SessionDetails} + * @return {@link OnlineSession} + */ + default OnlineSession sessionDetailsToOnlineSession(SessionDetails sessionDetails) { + if (sessionDetails == null) { + return null; + } + + OnlineSession onlineSession = new OnlineSession(); + //ID + onlineSession.setId(sessionDetails.getId()); + //用户名 + onlineSession.setUsername(sessionDetails.getUsername()); + //session id + onlineSession.setSessionId(sessionDetails.getSessionId()); + //地理位置 + onlineSession.setGeoLocation(sessionDetails.getGeoLocation()); + //用户代理 + onlineSession.setUserAgent(sessionDetails.getUserAgent()); + //登录时间 + onlineSession.setLoginTime(sessionDetails.getLoginTime()); + //最后请求时间 + onlineSession.setLastRequest(sessionDetails.getLastRequestTime()); + return onlineSession; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/AdministratorController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/AdministratorController.java new file mode 100644 index 00000000..2aa2f515 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/AdministratorController.java @@ -0,0 +1,221 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.setting; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.enums.CheckValidityType; +import cn.topiam.employee.common.enums.UserStatus; +import cn.topiam.employee.console.pojo.query.setting.AdministratorListQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionRoleListResult; +import cn.topiam.employee.console.pojo.result.setting.AdministratorListResult; +import cn.topiam.employee.console.pojo.result.setting.AdministratorResult; +import cn.topiam.employee.console.pojo.save.setting.AdministratorCreateParam; +import cn.topiam.employee.console.pojo.update.setting.AdministratorUpdateParam; +import cn.topiam.employee.console.service.setting.AdministratorService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.SettingConstants.SETTING_PATH; + +/** + * 管理员 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/13 22:09 + */ +@Validated +@Tag(name = "平台管理员") +@RestController +@AllArgsConstructor +@RequestMapping(value = SETTING_PATH + + "/administrator", produces = MediaType.APPLICATION_JSON_VALUE) +public class AdministratorController { + /** + * 获取管理员列表 + * + * @param model {@link PageModel} + * @return {@link AppPermissionRoleListResult} + */ + @Operation(summary = "获取管理员列表") + @GetMapping(value = "/list") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getAdministratorList(PageModel model, + AdministratorListQuery query) { + Page result = administratorService.getAdministratorList(model, + query); + return ApiRestResult.> builder().result(result).build(); + } + + /** + * 创建管理员 + * + * @param param {@link AdministratorCreateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "创建管理员") + @Audit(type = EventType.ADD_ADMINISTRATOR) + @PostMapping(value = "/create") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult createAdministrator(@RequestBody @Validated AdministratorCreateParam param) { + Boolean result = administratorService.createAdministrator(param); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 修改管理员 + * + * @param param {@link AdministratorUpdateParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "修改管理员") + @Audit(type = EventType.UPDATE_ADMINISTRATOR) + @PutMapping(value = "/update/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult updateAdministrator(@PathVariable(value = "id") String id, + @RequestBody @Validated AdministratorUpdateParam param) { + Boolean result = administratorService.updateAdministrator(param); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 删除管理员 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "删除管理员") + @DeleteMapping(value = "/delete/{id}") + @Audit(type = EventType.DELETE_ADMINISTRATOR) + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult deleteAdministrator(@PathVariable(value = "id") String id) { + Boolean result = administratorService.deleteAdministrator(id); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 启用管理员 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "启用管理员") + @Audit(type = EventType.ENABLE_ADMINISTRATOR) + @PutMapping(value = "/enable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult enableAdministrator(@PathVariable(value = "id") String id) { + Boolean result = administratorService.updateAdministratorStatus(id, UserStatus.ENABLE); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 禁用管理员 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "禁用管理员") + @Audit(type = EventType.DISABLE_ADMINISTRATOR) + @PutMapping(value = "/disable/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disableAdministrator(@PathVariable(value = "id") String id) { + Boolean result = administratorService.updateAdministratorStatus(id, UserStatus.DISABLE); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 重置管理员密码 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Validated + @Operation(summary = "重置管理员密码") + @Audit(type = EventType.RESET_ADMINISTRATOR_PASSWORD) + @PutMapping(value = "/reset_password") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult resetAdministratorPassword(@NotEmpty(message = "ID不能为空") @Parameter(description = "ID") String id, + @NotEmpty(message = "密码不能为空") @Parameter(description = "密码") String password) { + Boolean result = administratorService.resetAdministratorPassword(id, password); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 根据ID获取管理员 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Operation(summary = "获取管理员信息") + @GetMapping(value = "/get/{id}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getAdministrator(@PathVariable(value = "id") String id) { + AdministratorResult result = administratorService.getAdministrator(id); + //返回 + return ApiRestResult. builder().result(result).build(); + } + + /** + * 参数有效性验证 + * + * @return {@link Boolean} + */ + @Operation(summary = "参数有效性验证") + @GetMapping(value = "/param_check") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult administratorParamCheck(@Parameter(description = "验证类型") @NotNull(message = "验证类型不能为空") CheckValidityType type, + @Parameter(description = "值") @NotEmpty(message = "验证值不能为空") String value, + @Parameter(description = "ID") Long id) { + Boolean result = administratorService.administratorParamCheck(type, value, id); + //返回 + return ApiRestResult. builder().result(result).build(); + } + + /** + * AdministratorService + */ + private final AdministratorService administratorService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/GeoIpLibraryController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/GeoIpLibraryController.java new file mode 100644 index 00000000..7a85223c --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/GeoIpLibraryController.java @@ -0,0 +1,121 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.setting; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.geo.GeoLocation; +import cn.topiam.employee.console.pojo.result.setting.GeoIpProviderResult; +import cn.topiam.employee.console.pojo.save.setting.GeoIpProviderSaveParam; +import cn.topiam.employee.console.service.setting.GeoLocationSettingService; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.ConfigBeanNameConstants.GEO_LOCATION; +import static cn.topiam.employee.common.constants.SettingConstants.SETTING_PATH; +import static cn.topiam.employee.core.setting.constant.GeoIpProviderConstants.IPADDRESS_SETTING_NAME; + +/** + * IP地址库 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/13 22:09 + */ +@Validated +@Tag(name = "IP地址库") +@RestController +@AllArgsConstructor +@RequestMapping(value = SETTING_PATH + "/geo_ip", produces = MediaType.APPLICATION_JSON_VALUE) +public class GeoIpLibraryController { + /** + * 获取配置 + * + * @return {@link GeoIpProviderResult} + */ + @Operation(summary = "获取地理位置配置") + @GetMapping("config") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getGeoIpLibrary() { + return ApiRestResult. builder() + .result(geoLocationSettingService.getGeoIpLibrary()).build(); + } + + /** + * 保存配置 + * + * @param param {@link GeoIpProviderSaveParam} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "保存地理位置配置") + @Audit(type = EventType.SAVE_GEO_LOCATION_SERVICE) + @PostMapping("save") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult saveGeoIpLibrary(@RequestBody @Validated GeoIpProviderSaveParam param) { + return ApiRestResult. builder() + .result(geoLocationSettingService.saveGeoIpLibrary(param)).build(); + } + + /** + * 禁用地理位置服务 + * + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "禁用地理位置服务") + @Audit(type = EventType.OFF_GEO_LOCATION_SERVICE) + @PutMapping("/disable") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disableGeoIpLibrary() { + Boolean setting = geoLocationSettingService.removeSetting(IPADDRESS_SETTING_NAME); + // refresh + ApplicationContextHelp.refresh(GEO_LOCATION); + return ApiRestResult. builder().result(setting).build(); + } + + /** + * 查询IP地址位置信息 + * + * @param ip {@link String} + * @return {@link ApiRestResult} + */ + @Operation(summary = "查询IP地址位置信息") + @GetMapping(value = "/get_location") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getGeoLocation(@Parameter(description = "IP") String ip) { + return ApiRestResult. builder() + .result(geoLocationSettingService.getGeoLocation(ip)).build(); + } + + private GeoLocationSettingService geoLocationSettingService; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/MailProviderController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/MailProviderController.java new file mode 100644 index 00000000..c39ba66c --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/MailProviderController.java @@ -0,0 +1,140 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.setting; + +import java.util.HashMap; + +import org.apache.commons.lang3.RandomStringUtils; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.enums.MailType; +import cn.topiam.employee.console.pojo.result.setting.EmailProviderConfigResult; +import cn.topiam.employee.console.pojo.save.authentication.InitializeAdminSaveParam; +import cn.topiam.employee.console.pojo.save.setting.MailProviderSaveParam; +import cn.topiam.employee.console.service.setting.MessageSettingService; +import cn.topiam.employee.core.context.ServerContextHelp; +import cn.topiam.employee.core.message.MsgVariable; +import cn.topiam.employee.core.message.mail.MailMsgEventPublish; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.SettingConstants.SETTING_PATH; + +/** + * 消息设置 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/24 22:36 + */ +@Validated +@Tag(name = "邮件提供商") +@RestController +@AllArgsConstructor +@RequestMapping(value = SETTING_PATH + "/message/mail_provider") +public class MailProviderController { + + /** + * 保存邮件服务商配置 + * + * @param param {@link InitializeAdminSaveParam} + * @return {@link ApiRestResult} + */ + @Lock + @Preview + @Validated + @Operation(summary = "保存邮件服务提供商配置") + @Audit(type = EventType.SAVE_MAIL_SERVICE) + @PostMapping("save") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult saveEmailProviderConfig(@RequestBody MailProviderSaveParam param) { + Boolean result = messageSettingService.saveMailProviderConfig(param); + return ApiRestResult.ok(result); + } + + /** + * 获取邮件服务商配置 + * + * @return {@link ApiRestResult} + */ + @Operation(summary = "获取邮件服务提供商配置") + @GetMapping("config") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getEmailProviderConfig() { + return ApiRestResult.ok(messageSettingService.getMailProviderConfig()); + } + + /** + * 禁用邮件提供商 + * + * @return {@link ApiRestResult} + */ + @Lock + @Preview + @Validated + @Operation(summary = "禁用邮件服务提供商") + @Audit(type = EventType.OFF_MAIL_SERVICE) + @PutMapping(value = "/disable") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disableMailProvider() { + Boolean result = messageSettingService.disableMailProvider(); + return ApiRestResult.ok(result); + } + + /** + * 邮件发送测试 + * + * @param mailType {@link MailType} + * @param receiver {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "发送测试邮件") + @GetMapping(value = "/test") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult sendMail(MailType mailType, String receiver) { + HashMap map = new HashMap<>(16); + if (mailType == MailType.UPDATE_PASSWORD || mailType == MailType.UPDATE_BIND_MAIL + || mailType == MailType.VERIFY_EMAIL || mailType == MailType.RESET_PASSWORD) { + map.put(MsgVariable.VERIFY_CODE, RandomStringUtils.randomAlphanumeric(6)); + } + map.put(MsgVariable.TEST, "(TEST)"); + map.put(MsgVariable.EXPIRE_DAYS, "3"); + map.put("verify_link", ServerContextHelp.getPortalPublicBaseUrl()); + mailMsgEventPublish.publish(mailType, receiver, map); + return ApiRestResult.ok(); + } + + /** + * MailMsgEventPublish + */ + private final MailMsgEventPublish mailMsgEventPublish; + /** + * MessageSettingService + */ + private final MessageSettingService messageSettingService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/MailTemplateController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/MailTemplateController.java new file mode 100644 index 00000000..f41574c5 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/MailTemplateController.java @@ -0,0 +1,127 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.setting; + +import java.util.List; +import java.util.Objects; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.enums.MailType; +import cn.topiam.employee.console.pojo.result.setting.EmailTemplateListResult; +import cn.topiam.employee.console.pojo.result.setting.EmailTemplateResult; +import cn.topiam.employee.console.pojo.save.setting.EmailCustomTemplateSaveParam; +import cn.topiam.employee.console.service.setting.MailTemplateService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.SettingConstants.SETTING_PATH; + +/** + * 邮件配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/24 22:36 + */ +@Validated +@Tag(name = "邮件模板") +@RestController +@AllArgsConstructor +@RequestMapping(value = SETTING_PATH + + "/mail_template", produces = MediaType.APPLICATION_JSON_VALUE) +public class MailTemplateController { + + /** + * 获取邮件模板列表 + * + * @return {@link EmailTemplateResult} + */ + @Validated + @GetMapping(value = "/list") + @Operation(summary = "获取邮件模板列表") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getEmailTemplateList() { + List list = templateService.getEmailTemplateList(); + return ApiRestResult.> builder().result(list).build(); + } + + /** + * 根据模板类型查询邮件模板 + * + * @param type {@link String} + * @return {@link EmailTemplateResult} + */ + @Operation(summary = "获取邮件模板信息") + @GetMapping(value = "/{type}") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getEmailTemplate(@PathVariable(value = "type") String type) { + MailType templateType = MailType.getType(type); + EmailTemplateResult result = templateService.getEmailTemplate(templateType); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 保存邮件模板 + * + * @param type {@link String} + * @return {@link EmailTemplateResult} + */ + @Lock + @Preview + @PutMapping(value = "/save_custom/{type}") + @Audit(type = EventType.SAVE_GEO_LOCATION_SERVICE) + @Operation(summary = "保存邮件模板") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult saveCustomEmailTemplate(@PathVariable(value = "type") String type, + @RequestBody @Validated EmailCustomTemplateSaveParam param) { + MailType templateType = MailType.getType(type); + return ApiRestResult. builder() + .result(!Objects.isNull(templateService.saveCustomEmailTemplate(templateType, param))) + .build(); + } + + /** + * 关闭自定义邮件模板 + * + * @return {@link EmailTemplateResult} + */ + @Lock + @Preview + @PutMapping(value = "/disable_custom/{type}") + @Operation(summary = "禁用自定义邮件模板") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disableCustomEmailTemplate(@PathVariable(value = "type") String type) { + templateService.disableCustomEmailTemplate(MailType.getType(type)); + return ApiRestResult.ok(); + } + + /** + * 邮件模板服务类 + */ + private final MailTemplateService templateService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/SecurityController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/SecurityController.java new file mode 100644 index 00000000..cba1e100 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/SecurityController.java @@ -0,0 +1,214 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.setting; + +import java.util.List; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.console.pojo.result.setting.*; +import cn.topiam.employee.console.pojo.save.setting.PasswordPolicySaveParam; +import cn.topiam.employee.console.pojo.save.setting.SecurityBasicSaveParam; +import cn.topiam.employee.console.pojo.save.setting.SecurityCaptchaSaveParam; +import cn.topiam.employee.console.pojo.save.setting.SecurityMfaSaveParam; +import cn.topiam.employee.console.service.setting.PasswordPolicyService; +import cn.topiam.employee.console.service.setting.SecuritySettingService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.SettingConstants.SETTING_PATH; + +/** + * 安全设置 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/10/4 20:37 + */ +@Validated +@Tag(name = "安全设置") +@RestController +@RequestMapping(value = SETTING_PATH + "/security", produces = MediaType.APPLICATION_JSON_VALUE) +@AllArgsConstructor +public class SecurityController { + + /** + * 获取高级配置 + * + * @return {@link SecurityBasicConfigResult} + */ + @Operation(summary = "获取基础配置") + @GetMapping(value = "/basic/config") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getBasicConfig() { + SecurityBasicConfigResult result = securitySettingService.getBasicConfig(); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 保存高级配置 + * + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "保存基础配置") + @Audit(type = EventType.SAVE_LOGIN_SECURITY_BASIC_SETTINGS) + @PostMapping(value = "/basic/save") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult save(@Validated @RequestBody SecurityBasicSaveParam param) { + return ApiRestResult. builder() + .result(securitySettingService.saveBasicConfig(param)).build(); + } + + /** + * 密码策略配置 + * + * @return {@link List} + */ + @GetMapping(value = "/password_policy/config") + @Operation(summary = "获取密码策略") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult config() { + PasswordPolicyConfigResult result = passwordPolicyService.getPasswordPolicyConfig(); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 保存密码策略 + * + * @return {@link List} + */ + @Lock + @Preview + @PostMapping(value = "/password_policy/save") + @Audit(type = EventType.SAVE_PASSWORD_POLICY_SETTINGS) + @Operation(summary = "保存密码策略") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult save(@Validated @RequestBody PasswordPolicySaveParam param) { + return ApiRestResult. builder() + .result(passwordPolicyService.savePasswordPolicyConfig(param)).build(); + } + + /** + * 系统弱密码库 + * + * @return {@link List} + */ + @GetMapping(value = "/weak_password_lib/list") + @Operation(summary = "获取系统弱密码库") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getWeakPasswordLibList() { + List result = passwordPolicyService.getWeakPasswordLibList(); + return ApiRestResult.> builder().result(result).build(); + } + + /** + * 获取MFA配置 + * + * @return {@link SecurityMfaConfigResult} + */ + @Operation(summary = "获取MFA配置") + @GetMapping(value = "/mfa/config") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getMfaConfig() { + SecurityMfaConfigResult result = securitySettingService.getMfaConfig(); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 保存MFA配置 + * + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "保存MFA配置") + @Audit(type = EventType.SAVE_MFA_SETTINGS) + @PostMapping(value = "/mfa/save") + @Validated + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult saveMfaConfig(@RequestBody SecurityMfaSaveParam param) { + return ApiRestResult. builder().result(securitySettingService.saveMfaConfig(param)) + .build(); + } + + /** + * 获取行为验证码配置 + * + * @return {@link SecurityCaptchaConfigResult} + */ + @Operation(summary = "获取行为验证码配置") + @GetMapping(value = "/captcha/config") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getCaptchaProviderConfig() { + SecurityCaptchaConfigResult result = securitySettingService.getCaptchaProviderConfig(); + return ApiRestResult. builder().result(result).build(); + } + + /** + * 保存行为验证码配置 + * + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "保存行为验证码配置") + @Audit(type = EventType.SAVE_CAPTCHA_PROVIDER) + @PostMapping(value = "/captcha/save") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult saveCaptchaProviderConfig(@Validated @RequestBody SecurityCaptchaSaveParam param) { + return ApiRestResult. builder() + .result(securitySettingService.saveCaptchaProviderConfig(param)).build(); + } + + /** + * 禁用行为验证码 + * + * @return {@link ApiRestResult} + */ + @Lock + @Preview + @Validated + @Operation(summary = "禁用行为验证码") + @Audit(type = EventType.OFF_MAIL_SERVICE) + @PutMapping(value = "/captcha/disable") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disableCaptchaProvider() { + Boolean result = securitySettingService.disableCaptchaProvider(); + return ApiRestResult.ok(result); + } + + /** + * 密码策略实现类 + */ + private final PasswordPolicyService passwordPolicyService; + /** + * SecuritySettingService + */ + private final SecuritySettingService securitySettingService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/SmsProviderController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/SmsProviderController.java new file mode 100644 index 00000000..99447ed0 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/SmsProviderController.java @@ -0,0 +1,139 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.setting; + +import java.util.LinkedHashMap; + +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.enums.MailType; +import cn.topiam.employee.common.enums.SmsType; +import cn.topiam.employee.console.pojo.save.setting.SmsProviderSaveParam; +import cn.topiam.employee.console.pojo.setting.SmsProviderConfigResult; +import cn.topiam.employee.console.service.setting.MessageSettingService; +import cn.topiam.employee.core.message.sms.SmsMsgEventPublish; +import cn.topiam.employee.core.security.password.PasswordGenerator; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.SettingConstants.SETTING_PATH; + +/** + * 消息设置 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/24 22:36 + */ +@Validated +@Tag(name = "短信提供商") +@RestController +@AllArgsConstructor +@RequestMapping(value = SETTING_PATH + "/message/sms_provider") +public class SmsProviderController { + /** + * 禁用短信提供商 + * + * @return {@link ApiRestResult} + */ + @Lock + @Preview + @Validated + @Operation(summary = "禁用短信提供商") + @Audit(type = EventType.OFF_SMS_SERVICE) + @PutMapping(value = "/disable") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disableSmsProvider() { + Boolean result = messageSettingService.disableSmsProvider(); + return ApiRestResult.ok(result); + } + + /** + * 保存短信提供商配置 + * + * @param param {@link SmsProviderSaveParam} + * @return {@link ApiRestResult} + */ + @Lock + @Preview + @Validated + @Operation(summary = "保存短信提供商配置") + @Audit(type = EventType.SAVE_SMS_SERVICE) + @PostMapping("save") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult saveSmsProviderConfig(@RequestBody SmsProviderSaveParam param) { + Boolean result = messageSettingService.saveSmsProviderConfig(param); + return ApiRestResult.ok(result); + } + + /** + * 获取短信提供商配置 + * + * @return {@link ApiRestResult} + */ + @Operation(summary = "获取短信提供商配置") + @GetMapping("/config") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getSmsProviderConfig() { + SmsProviderConfigResult result = messageSettingService.getSmsProviderConfig(); + return ApiRestResult.ok(result); + } + + /** + * 短信发送测试 + * + * @param smsType {@link MailType} + * @param receiver {@link String} + * @return {@link Boolean} + */ + @Lock + @Preview + @Operation(summary = "发送测试短信") + @GetMapping(value = "/test") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult sendSms(SmsType smsType, String receiver) { + if (SmsType.WELCOME_SMS == smsType || SmsType.RESET_PASSWORD == smsType + || SmsType.WARING == smsType) { + LinkedHashMap parameter = new LinkedHashMap<>(16); + parameter.put("username", "test"); + parameter.put("password", passwordGenerator.generatePassword()); + parameter.put("expire_days", "3"); + smsMsgEventPublish.publish(smsType, receiver, parameter); + } else { + smsMsgEventPublish.publishVerifyCode(receiver, smsType, "123456"); + } + return ApiRestResult.ok(); + } + + /** + * MessageSettingService + */ + private final MessageSettingService messageSettingService; + + private final SmsMsgEventPublish smsMsgEventPublish; + + private final PasswordGenerator passwordGenerator; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/SmsTemplateController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/SmsTemplateController.java new file mode 100644 index 00000000..7448d65c --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/SmsTemplateController.java @@ -0,0 +1,74 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.setting; + +import java.util.List; + +import javax.validation.constraints.NotNull; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import cn.topiam.employee.common.enums.Language; +import cn.topiam.employee.console.pojo.result.setting.SmsTemplateListResult; +import cn.topiam.employee.console.service.setting.SmsTemplateService; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.SettingConstants.SETTING_PATH; + +/** + * 短信模版配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/7/24 22:36 + */ +@Validated +@Tag(name = "短信模板") +@RestController +@AllArgsConstructor +@RequestMapping(value = SETTING_PATH + "/sms_template", produces = MediaType.APPLICATION_JSON_VALUE) +public class SmsTemplateController { + + /** + * 获取短信模板列表 + * + * @param language {@link Language} + * @return {@link SmsTemplateListResult} + */ + @GetMapping(value = "/list") + @Operation(summary = "获取短信模板列表") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult> getSmsTemplateList(@NotNull(message = "语言类型不能为空") @Parameter(description = "语言") Language language) { + List list = smsTemplateService.getSmsTemplateList(language); + return ApiRestResult.> builder().result(list).build(); + } + + /** + * 短信模板服务类 + */ + private final SmsTemplateService smsTemplateService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/StorageController.java b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/StorageController.java new file mode 100644 index 00000000..688ca1bc --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/controller/setting/StorageController.java @@ -0,0 +1,105 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.controller.setting; + +import org.springframework.http.MediaType; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import cn.topiam.employee.audit.annotation.Audit; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.console.pojo.result.setting.StorageProviderConfigResult; +import cn.topiam.employee.console.pojo.save.setting.StorageConfigSaveParam; +import cn.topiam.employee.console.service.setting.StorageSettingService; +import cn.topiam.employee.support.lock.Lock; +import cn.topiam.employee.support.preview.Preview; +import cn.topiam.employee.support.result.ApiRestResult; + +import lombok.AllArgsConstructor; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import static cn.topiam.employee.common.constants.SettingConstants.SETTING_PATH; + +/** + * 存储配置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/30 21:16 + */ +@Validated +@Tag(name = "存储配置") +@RestController +@RequestMapping(value = SETTING_PATH + "/storage", produces = MediaType.APPLICATION_JSON_VALUE) +@AllArgsConstructor +public class StorageController { + + /** + * 启用/禁用存储配置服务 + * + * @return {@link ApiRestResult} + */ + @Lock + @Preview + @Validated + @Operation(summary = "禁用存储服务") + @Audit(type = EventType.OFF_STORAGE_SERVICE) + @PutMapping(value = "/disable") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult disableStorage() { + Boolean result = storageSettingsService.disableStorage(); + return ApiRestResult.ok(result); + } + + /** + * 保存存储配置 + * + * @param param {@link StorageConfigSaveParam} + * @return {@link ApiRestResult} + */ + @Lock + @Preview + @Validated + @Operation(summary = "保存存储服务配置") + @Audit(type = EventType.SAVE_STORAGE_SERVICE) + @PostMapping(value = "/save") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult saveStorageConfig(@RequestBody StorageConfigSaveParam param) { + Boolean result = storageSettingsService.saveStorageConfig(param); + return ApiRestResult.ok(result); + } + + /** + * 获取存储配置 + * + * @return {@link ApiRestResult} + */ + @Operation(summary = "获取存储服务配置") + @GetMapping(value = "/config") + @PreAuthorize(value = "authenticated and hasAuthority(T(cn.topiam.employee.core.security.authorization.Roles).ADMIN)") + public ApiRestResult getStorageConfig() { + StorageProviderConfigResult result = storageSettingsService.getStorageConfig(); + return ApiRestResult.ok(result); + } + + /** + * StorageSettingsService + */ + private final StorageSettingService storageSettingsService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/account/OrganizationConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/account/OrganizationConverter.java new file mode 100644 index 00000000..e7386ad3 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/account/OrganizationConverter.java @@ -0,0 +1,166 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.account; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.util.CollectionUtils; + +import cn.topiam.employee.common.entity.account.OrganizationEntity; +import cn.topiam.employee.console.pojo.result.account.OrganizationChildResult; +import cn.topiam.employee.console.pojo.result.account.OrganizationResult; +import cn.topiam.employee.console.pojo.result.account.OrganizationRootResult; +import cn.topiam.employee.console.pojo.result.account.OrganizationTreeResult; +import cn.topiam.employee.console.pojo.save.account.OrganizationCreateParam; +import cn.topiam.employee.console.pojo.update.account.OrganizationUpdateParam; + +/** + * 组织架构数据映射 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/14 21:25 + */ +@Mapper(componentModel = "spring") +public interface OrganizationConverter { + + /** + * 组织实体转换为List结果 + * + * @param data {@link List} + * @return {@link List} + */ + default List entityConvertToChildOrgListResult(List data) { + List list = new ArrayList<>(); + if (!CollectionUtils.isEmpty(data)) { + for (OrganizationEntity entity : data) { + list.add(entityConvertToChildOrgListResult(entity)); + } + } + return list; + } + + /** + * 组织实体转换为TreeList结果 + * + * @param data {@link List} + * @param parentId {@link String} + * @return {@link List} + */ + default List entityConvertToChildOrgTreeListResult(String parentId, + List data) { + List list = new ArrayList<>(); + List entityList = data.stream() + .filter(one -> Objects.equals(parentId, one.getParentId())).toList(); + for (OrganizationEntity organizationEntity : entityList) { + OrganizationTreeResult result = entityConvertToChildOrgTreeListResult( + organizationEntity); + result.setChildren( + entityConvertToChildOrgTreeListResult(organizationEntity.getId(), data)); + list.add(result); + } + return list; + } + + /** + * 组织实体转换为组织分页结果 + * + * @param data {@link OrganizationEntity} + * @return {@link OrganizationResult} + */ + @Mapping(target = "type", source = "type.desc") + @Mapping(target = "dataOrigin", source = "dataOrigin.desc") + OrganizationChildResult entityConvertToChildOrgListResult(OrganizationEntity data); + + /** + * 组织实体转换为组织分页结果 + * + * @param data {@link OrganizationEntity} + * @return {@link OrganizationResult} + */ + @Mapping(target = "children", ignore = true) + @Mapping(target = "type", source = "type.desc") + @Mapping(target = "dataOrigin", source = "dataOrigin.desc") + OrganizationTreeResult entityConvertToChildOrgTreeListResult(OrganizationEntity data); + + /** + * 组织实体转换为组织分页结果 + * + * @param data {@link OrganizationEntity} + * @return {@link OrganizationResult} + */ + @Mapping(target = "type", source = "type.desc") + @Mapping(target = "dataOrigin", source = "dataOrigin.desc") + OrganizationRootResult entityConvertToRootOrgListResult(OrganizationEntity data); + + /** + * 组织创建参数转换为组织实体 + * + * @param param {@link OrganizationCreateParam} + * @return {@link OrganizationEntity} + */ + @Mapping(target = "identitySourceId", ignore = true) + @Mapping(target = "path", ignore = true) + @Mapping(target = "displayPath", ignore = true) + @Mapping(target = "id", ignore = true) + @Mapping(target = "dataOrigin", expression = "java(cn.topiam.employee.common.enums.DataOrigin.INPUT)") + @Mapping(target = "remark", ignore = true) + @Mapping(target = "leaf", expression = "java(Boolean.TRUE)") + @Mapping(target = "enabled", expression = "java(Boolean.TRUE)") + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + @Mapping(target = "order", source = "order", defaultValue = "9999L") + @Mapping(target = "parentId", source = "parentId", defaultExpression = "java(cn.topiam.employee.support.constant.EiamConstants.ROOT_NODE)") + @Mapping(target = "externalId", source = "externalId", defaultExpression = "java(new org.springframework.util.JdkIdGenerator().generateId().toString())") + OrganizationEntity orgCreateParamConvertToEntity(OrganizationCreateParam param); + + /** + * 组织修改参数转换为组织实体 + * + * @param param {@link OrganizationUpdateParam} + * @return {@link OrganizationEntity} + */ + @Mapping(target = "identitySourceId", ignore = true) + @Mapping(target = "path", ignore = true) + @Mapping(target = "displayPath", ignore = true) + @Mapping(target = "dataOrigin", ignore = true) + @Mapping(target = "parentId", ignore = true) + @Mapping(target = "id", ignore = true) + @Mapping(target = "leaf", ignore = true) + @Mapping(target = "code", ignore = true) + @Mapping(target = "remark", ignore = true) + @Mapping(target = "externalId", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + OrganizationEntity orgUpdateParamConvertToEntity(OrganizationUpdateParam param); + + /** + * 实体转组织详情结果 + * + * @param organization {@link OrganizationEntity} + * @return {@link OrganizationResult} + */ + OrganizationResult entityConvertToOrgDetailResult(OrganizationEntity organization); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/account/UserConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/account/UserConverter.java new file mode 100644 index 00000000..d1f5b559 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/account/UserConverter.java @@ -0,0 +1,344 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.account; + +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Set; + +import org.elasticsearch.index.query.BoolQueryBuilder; +import org.elasticsearch.index.query.QueryBuilders; +import org.elasticsearch.search.sort.FieldSortBuilder; +import org.elasticsearch.search.sort.SortBuilder; +import org.elasticsearch.search.sort.SortBuilders; +import org.elasticsearch.search.sort.SortOrder; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.elasticsearch.core.SearchHits; +import org.springframework.data.elasticsearch.core.query.NativeSearchQuery; +import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import com.google.common.collect.Lists; +import com.google.common.collect.Sets; + +import cn.topiam.employee.audit.entity.AuditElasticSearchEntity; +import cn.topiam.employee.audit.entity.Event; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.audit.event.type.AppEventType; +import cn.topiam.employee.audit.event.type.AuthenticationEventType; +import cn.topiam.employee.common.entity.account.UserDetailEntity; +import cn.topiam.employee.common.entity.account.UserEntity; +import cn.topiam.employee.common.entity.account.po.UserPO; +import cn.topiam.employee.common.entity.app.AppEntity; +import cn.topiam.employee.common.repository.app.AppRepository; +import cn.topiam.employee.console.pojo.result.account.UserListResult; +import cn.topiam.employee.console.pojo.result.account.UserLoginAuditListResult; +import cn.topiam.employee.console.pojo.result.account.UserResult; +import cn.topiam.employee.console.pojo.save.account.UserCreateParam; +import cn.topiam.employee.console.pojo.update.account.UserUpdateParam; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import static cn.topiam.employee.audit.entity.Actor.ACTOR_ID; +import static cn.topiam.employee.audit.entity.Event.EVENT_TIME; +import static cn.topiam.employee.audit.entity.Event.EVENT_TYPE; +import static cn.topiam.employee.audit.enums.EventType.LOGIN_PORTAL; +import static cn.topiam.employee.audit.enums.TargetType.PORTAL; +import static cn.topiam.employee.audit.service.converter.AuditDataConverter.SORT_EVENT_TIME; +import static cn.topiam.employee.support.util.PhoneUtils.getPhoneAreaCode; +import static cn.topiam.employee.support.util.PhoneUtils.getPhoneNumber; + +/** + * 用户映射 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/14 20:45 + */ +@Mapper(componentModel = "spring") +public interface UserConverter { + + /** + * 用户实体转换为用户分页结果 + * + * @param page {@link Page} + * @return {@link Page} + */ + default Page userPoConvertToUserListResult(org.springframework.data.domain.Page page) { + Page result = new Page<>(); + if (!CollectionUtils.isEmpty(page.getContent())) { + List list = new ArrayList<>(); + for (UserPO user : page.getContent()) { + UserListResult userListResult = userPoConvertToUserListResult(user); + if (StringUtils.hasText(user.getPhone())) { + userListResult.setPhone((StringUtils.hasText(user.getPhoneAreaCode()) + ? "+" + user.getPhoneAreaCode() + : "") + user.getPhone()); + } + list.add(userListResult); + } + //@formatter:off + result.setPagination(Page.Pagination.builder() + .total(page.getTotalElements()) + .totalPages(page.getTotalPages()) + .current(page.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + result.setList(list); + } + return result; + } + + /** + * 用户创建参数转换为用户实体 + * + * @param param {@link UserCreateParam} + * @return {@link UserEntity} + */ + default UserEntity userCreateParamConvertToUserEntity(UserCreateParam param) { + if (param == null) { + return null; + } + UserEntity userEntity = new UserEntity(); + userEntity.setRemark(param.getRemark()); + userEntity.setUsername(param.getUsername()); + userEntity.setEmail(param.getEmail()); + if (StringUtils.hasText(param.getPhone())) { + userEntity.setPhone(getPhoneNumber(param.getPhone())); + userEntity.setPhoneAreaCode(getPhoneAreaCode(param.getPhone())); + } + userEntity.setFullName(param.getFullName()); + userEntity.setNickName(param.getNickName()); + userEntity.setLastUpdatePasswordTime(LocalDateTime.now()); + userEntity.setStatus(cn.topiam.employee.common.enums.UserStatus.ENABLE); + userEntity.setAvatar("https://joeschmoe.io/api/v1/random"); + userEntity.setDataOrigin(cn.topiam.employee.common.enums.DataOrigin.INPUT); + userEntity.setEmailVerified(Boolean.FALSE); + userEntity.setExpireDate( + java.util.Objects.isNull(param.getExpireDate()) ? java.time.LocalDate.of(2116, 12, 31) + : param.getExpireDate()); + userEntity.setAuthTotal(0L); + userEntity.setPassword(ApplicationContextHelp + .getBean(org.springframework.security.crypto.password.PasswordEncoder.class) + .encode(param.getPassword())); + + return userEntity; + } + + /** + * 用户更新参数转换为用户实体类 + * + * @param param {@link UserUpdateParam} 更新参数 + * @return {@link UserEntity} 用户实体 + */ + default UserEntity userUpdateParamConvertToUserEntity(UserUpdateParam param) { + if (param == null) { + return null; + } + UserEntity userEntity = new UserEntity(); + if (param.getId() != null) { + userEntity.setId(Long.parseLong(param.getId())); + } + userEntity.setRemark(param.getRemark()); + userEntity.setEmail(param.getEmail()); + if (StringUtils.hasText(param.getPhone())) { + userEntity.setPhone(getPhoneNumber(param.getPhone())); + userEntity.setPhoneAreaCode(getPhoneAreaCode(param.getPhone())); + } + userEntity.setFullName(param.getFullName()); + userEntity.setNickName(param.getNickName()); + userEntity.setAvatar(param.getAvatar()); + userEntity.setStatus(param.getStatus()); + userEntity.setExpireDate(param.getExpireDate()); + return userEntity; + } + + /** + * 实体转为用户详情返回 + * + * @param user {@link UserEntity} + * @param detail {@link UserDetailEntity} + * @return {@link UserEntity} 用户详情 + */ + @Mapping(target = "id", source = "user.id") + @Mapping(target = "username", source = "user.username") + @Mapping(target = "dataOrigin", source = "user.dataOrigin.code") + @Mapping(target = "emailVerified", source = "user.emailVerified") + @Mapping(target = "phoneVerified", source = "user.phoneVerified") + @Mapping(target = "expireDate", source = "user.expireDate") + @Mapping(target = "remark", source = "user.remark") + @Mapping(target = "createTime", source = "user.createTime") + @Mapping(target = "externalId", source = "user.externalId") + @Mapping(target = "updateTime", source = "user.updateTime") + @Mapping(target = "status", source = "user.status.code") + @Mapping(target = "phone", ignore = true) + @Mapping(target = "avatar", source = "user.avatar") + @Mapping(target = "email", source = "user.email") + @Mapping(target = "nickName", source = "user.nickName") + @Mapping(target = "lastAuthIp", source = "user.lastAuthIp") + @Mapping(target = "lastAuthTime", source = "user.lastAuthTime") + @Mapping(target = "fullName", source = "user.fullName") + @Mapping(target = "idCard", source = "detail.idCard") + @Mapping(target = "address", source = "detail.address") + @Mapping(target = "authTotal", source = "user.authTotal", defaultValue = "0") + UserResult entityConvertToUserResult(UserEntity user, UserDetailEntity detail); + + /** + * 用户详情修改入参转换用户详情实体 + * + * @param param {@link UserUpdateParam} + * @return {@link UserDetailEntity} + */ + @Mapping(target = "website", ignore = true) + @Mapping(target = "idType", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + @Mapping(target = "userId", source = "id") + UserDetailEntity userUpdateParamConvertToUserDetailsEntity(UserUpdateParam param); + + /** + * 创建用户入参转用户详情 + * + * @param param {@link UserCreateParam} + * @return {@link UserDetailEntity} + */ + @Mapping(target = "website", ignore = true) + @Mapping(target = "idType", ignore = true) + @Mapping(target = "userId", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "idCard", ignore = true) + @Mapping(target = "id", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + @Mapping(target = "address", ignore = true) + UserDetailEntity userCreateParamConvertToUserDetailEntity(UserCreateParam param); + + /** + * 审计列表请求到本机搜索查询 + * + * @param id {@link Long} + * @param page {@link PageModel} + * @return {@link NativeSearchQuery} + */ + default NativeSearchQuery auditListRequestConvertToNativeSearchQuery(Long id, PageModel page) { + //构建查询 builder下有 must、should 以及 mustNot 相当于 sql 中的 and、or 以及 not + BoolQueryBuilder queryBuilder = QueryBuilders.boolQuery(); + Collection> fieldSortBuilders = Lists.newArrayList(); + //事件类型 + Set set = Sets.newHashSet(); + set.add(LOGIN_PORTAL.getCode()); + set.add(EventType.APP_SSO.getCode()); + queryBuilder.must(QueryBuilders.termsQuery(EVENT_TYPE, set)); + //用户id + queryBuilder.must(QueryBuilders.queryStringQuery(id.toString()).field(ACTOR_ID)); + //字段排序 + page.getSorts().forEach(sort -> { + FieldSortBuilder eventTimeSortBuilder = SortBuilders.fieldSort(EVENT_TIME) + .order(SortOrder.DESC); + if (org.apache.commons.lang3.StringUtils.equals(sort.getSorter(), SORT_EVENT_TIME)) { + if (sort.getAsc()) { + eventTimeSortBuilder.order(SortOrder.ASC); + } + } + fieldSortBuilders.add(eventTimeSortBuilder); + }); + return new NativeSearchQueryBuilder().withQuery(queryBuilder) + //分页参数 + .withPageable(PageRequest.of(page.getCurrent(), page.getPageSize())) + //排序 + .withSorts(fieldSortBuilders).build(); + } + + /** + * searchHits 转用户登录日志列表 + * + * @param search {@link SearchHits} + * @param page {@link PageModel} + * @return {@link Page} + */ + default Page searchHitsConvertToAuditListResult(SearchHits search, + PageModel page) { + List list = new ArrayList<>(); + //总记录数 + search.forEach(hit -> { + AuditElasticSearchEntity content = hit.getContent(); + Event event = content.getEvent(); + UserLoginAuditListResult result = new UserLoginAuditListResult(); + //单点登录 + if (event.getType().getCode().equals(AppEventType.APP_SSO.getCode())) { + result.setAppName(getAppName(content.getTargets().get(0).getId())); + } + //登录门户 + if (event.getType().getCode().equals(AuthenticationEventType.LOGIN_PORTAL.getCode())) { + result.setAppName(PORTAL.getDesc()); + } + result.setEventTime(LocalDateTime.ofInstant(event.getTime(), ZoneId.systemDefault())); + result.setClientIp(content.getGeoLocation().getIp()); + result.setBrowser(content.getUserAgent().getBrowser()); + result.setLocation(content.getGeoLocation().getCityName()); + result.setEventStatus(event.getStatus()); + list.add(result); + }); + //@formatter:off + Page result = new Page<>(); + result.setPagination(Page.Pagination.builder() + .total(search.getTotalHits()) + .totalPages(Math.toIntExact(search.getTotalHits() / page.getPageSize())) + .current(page.getCurrent() + 1) + .build()); + result.setList(list); + //@formatter:on + return result; + } + + /** + * 用户实体转换为用户分页结果 + * + * @param po {@link UserEntity} + * @return {@link UserListResult} + */ + @Mapping(target = "status", source = "status.code") + @Mapping(target = "phone", ignore = true) + @Mapping(target = "authTotal", defaultValue = "0L", source = "authTotal") + @Mapping(target = "dataOrigin", source = "dataOrigin.code") + UserListResult userPoConvertToUserListResult(UserPO po); + + /** + * 获取应用名称 + * + * @param targetId {@link String} + * @return {@link String} + */ + private String getAppName(String targetId) { + if (!StringUtils.hasText(targetId)) { + return null; + } + AppRepository repository = ApplicationContextHelp.getBean(AppRepository.class); + AppEntity app = repository.findById(Long.valueOf(targetId)).orElse(new AppEntity()); + return app.getName(); + } + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/account/UserGroupConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/account/UserGroupConverter.java new file mode 100644 index 00000000..9ebfa027 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/account/UserGroupConverter.java @@ -0,0 +1,171 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.account; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.util.CollectionUtils; + +import com.google.common.collect.Lists; +import com.querydsl.core.types.ExpressionUtils; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.common.entity.account.QUserGroupEntity; +import cn.topiam.employee.common.entity.account.UserEntity; +import cn.topiam.employee.common.entity.account.UserGroupEntity; +import cn.topiam.employee.common.entity.account.po.UserPO; +import cn.topiam.employee.console.pojo.query.account.UserGroupListQuery; +import cn.topiam.employee.console.pojo.result.account.UserGroupListResult; +import cn.topiam.employee.console.pojo.result.account.UserGroupMemberListResult; +import cn.topiam.employee.console.pojo.result.account.UserGroupResult; +import cn.topiam.employee.console.pojo.save.account.UserGroupCreateParam; +import cn.topiam.employee.console.pojo.update.account.UserGroupUpdateParam; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import cn.topiam.employee.support.repository.page.domain.Page; + +/** + * 用户映射 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/14 22:45 + */ +@Mapper(componentModel = "spring") +public interface UserGroupConverter { + + /** + * 用户实体转换为用户分页结果 + * + * @param page {@link Page} + * @return {@link Page} + */ + default Page userGroupEntityConvertToUserGroupResult(org.springframework.data.domain.Page page) { + Page result = new Page<>(); + if (!CollectionUtils.isEmpty(page.getContent())) { + List list = new ArrayList<>(); + for (UserGroupEntity user : page.getContent()) { + UserGroupConverter bean = ApplicationContextHelp.getBean(UserGroupConverter.class); + list.add(bean.entityConvertToUserGroupPaginationResult(user)); + } + + //@formatter:off + result.setPagination(Page.Pagination.builder() + .total(page.getTotalElements()) + .totalPages(page.getTotalPages()) + .current(page.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + result.setList(list); + } + return result; + } + + /** + * 实体转换为群组成员列表结果 + * + * @param users {@link List} + * @return {@link List} + */ + default Page userPoConvertToGroupMemberListResult(org.springframework.data.domain.Page users) { + Page page = new Page<>(); + List list = Lists.newArrayList(); + for (UserPO entity : users.getContent()) { + list.add(userPoConvertToGroupMemberListResult(entity)); + } + page.setList(list); + //@formatter:off + page.setPagination(Page.Pagination.builder() + .total(users.getTotalElements()) + .totalPages(users.getTotalPages()) + .current(users.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + return page; + } + + /** + * 用户实体转换为用户分页结果 + * + * @param page {@link UserGroupEntity} + * @return {@link UserGroupListResult} + */ + UserGroupListResult entityConvertToUserGroupPaginationResult(UserGroupEntity page); + + /** + * 用户创建参数转换为用户实体 + * + * @param param {@link UserGroupCreateParam} + * @return {@link UserEntity} + */ + @Mapping(target = "id", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + UserGroupEntity userGroupCreateParamConvertToEntity(UserGroupCreateParam param); + + /** + * 用户更新参数转换为用户实体类 + * + * @param param {@link UserGroupUpdateParam} 更新参数 + * @return {@link UserEntity} 用户实体 + */ + + @Mapping(target = "id", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + UserGroupEntity userGroupUpdateParamConvertToEntity(UserGroupUpdateParam param); + + /** + * 实体转用户群组列表 + * + * @param user {@link UserPO} + * @return {@link UserGroupMemberListResult} + */ + UserGroupMemberListResult userPoConvertToGroupMemberListResult(UserPO user); + + /** + * 查询用户组列表参数转换为 Querydsl Predicate + * + * @param query {@link UserGroupListQuery} query + * @return {@link Predicate} + */ + default Predicate queryUserGroupListParamConvertToPredicate(UserGroupListQuery query) { + QUserGroupEntity userGroup = QUserGroupEntity.userGroupEntity; + Predicate predicate = userGroup.isNotNull(); + //查询条件 + //@formatter:off + predicate = StringUtils.isBlank(query.getName()) ? predicate : ExpressionUtils.and(predicate, userGroup.name.like("%" + query.getName() + "%")); + predicate = StringUtils.isBlank(query.getCode()) ? predicate : ExpressionUtils.and(predicate, userGroup.code.eq(query.getCode())); + //@formatter:on + return predicate; + } + + /** + * 实体转用户详情 + * + * @param details {@link UserGroupEntity} + * @return {@link UserGroupResult} + */ + UserGroupResult entityConvertToUserGroupResult(UserGroupEntity details); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppAccessPolicyConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppAccessPolicyConverter.java new file mode 100644 index 00000000..6efc1672 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppAccessPolicyConverter.java @@ -0,0 +1,94 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.app; + +import java.util.ArrayList; +import java.util.List; + +import org.mapstruct.Mapper; +import org.springframework.util.CollectionUtils; + +import cn.topiam.employee.common.entity.app.AppAccessPolicyEntity; +import cn.topiam.employee.common.entity.app.po.AppAccessPolicyPO; +import cn.topiam.employee.console.pojo.result.app.AppAccessPolicyResult; +import cn.topiam.employee.console.pojo.save.app.AppAccessPolicyCreateParam; +import cn.topiam.employee.support.repository.page.domain.Page; + +/** + * 应用授权策略 Converter + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 19:57 + */ +@Mapper(componentModel = "spring") +public interface AppAccessPolicyConverter { + + /** + * 应用授权策略分页列表转换为应用授权策略分页结果 + * + * @param page {@link AppAccessPolicyEntity} + * @return {@link AppAccessPolicyResult} + */ + default Page appPolicyEntityListConvertToAppPolicyResult(org.springframework.data.domain.Page page) { + Page result = new Page<>(); + if (!CollectionUtils.isEmpty(page.getContent())) { + List list = new ArrayList<>(); + for (AppAccessPolicyPO po : page.getContent()) { + list.add(entityConvertToAppPolicyResult(po)); + } + //@formatter:off + result.setPagination(Page.Pagination.builder() + .total(page.getTotalElements()) + .totalPages(page.getTotalPages()) + .current(page.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + result.setList(list); + } + return result; + } + + /** + * 应用授权策略实体转换为应用授权策略结果 + * + * @param entity {@link AppAccessPolicyEntity} + * @return {@link AppAccessPolicyEntity} + */ + AppAccessPolicyResult entityConvertToAppPolicyResult(AppAccessPolicyPO entity); + + /** + * 应用授权策略添加参数转换为应用授权策略实体 + * + * @param param {@link AppAccessPolicyCreateParam} + * @return {@link AppAccessPolicyEntity} + */ + default List appPolicyCreateParamConvertToEntity(AppAccessPolicyCreateParam param) { + if (param == null) { + return new ArrayList<>(); + } + List list = new ArrayList<>(); + for (String subjectId : param.getSubjectIds()) { + AppAccessPolicyEntity entity = new AppAccessPolicyEntity(); + entity.setAppId(Long.valueOf(param.getAppId())); + entity.setSubjectType(param.getSubjectType()); + entity.setSubjectId(subjectId); + list.add(entity); + } + return list; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppAccountConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppAccountConverter.java new file mode 100644 index 00000000..463551d7 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppAccountConverter.java @@ -0,0 +1,89 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.app; + +import java.util.ArrayList; +import java.util.List; + +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.util.CollectionUtils; + +import cn.topiam.employee.common.entity.app.AppAccountEntity; +import cn.topiam.employee.common.entity.app.po.AppAccountPO; +import cn.topiam.employee.console.pojo.result.app.AppAccountListResult; +import cn.topiam.employee.console.pojo.save.app.AppAccountCreateParam; +import cn.topiam.employee.support.repository.page.domain.Page; + +/** + * 应用账户映射 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 19:08 + */ +@Mapper(componentModel = "spring") +public interface AppAccountConverter { + + /** + * 应用账户分页实体转换应用账户分页结果 + * + * @param page {@link Page} + * @return {@link Page} + */ + default Page appAccountEntityConvertToAppAccountResult(org.springframework.data.domain.Page page) { + Page result = new Page<>(); + if (!CollectionUtils.isEmpty(page.getContent())) { + List list = new ArrayList<>(); + for (AppAccountPO po : page.getContent()) { + list.add(entityConvertToAppAccountResult(po)); + } + //@formatter:off + result.setPagination(Page.Pagination.builder() + .total(page.getTotalElements()) + .totalPages(page.getTotalPages()) + .current(page.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + result.setList(list); + } + return result; + } + + /** + * 应用账户实体转换为应用账户结果 + * + * @param appAccountPo {@link AppAccountPO} + * @return {@link AppAccountListResult} + */ + AppAccountListResult entityConvertToAppAccountResult(AppAccountPO appAccountPo); + + /** + * 应用账户新增参数转换应用账户实体 + * + * @param param {@link AppAccountCreateParam} + * @return {@link AppAccountEntity} + */ + @Mapping(target = "remark", ignore = true) + @Mapping(target = "id", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + AppAccountEntity appAccountCreateParamConvertToEntity(AppAccountCreateParam param); + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppCertConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppCertConverter.java new file mode 100644 index 00000000..3ecb3e6c --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppCertConverter.java @@ -0,0 +1,81 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.app; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import org.apache.commons.lang3.StringUtils; +import org.mapstruct.Mapper; + +import com.querydsl.core.types.ExpressionUtils; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.common.entity.app.AppCertEntity; +import cn.topiam.employee.common.entity.app.QAppCertEntity; +import cn.topiam.employee.console.pojo.query.app.AppCertQuery; +import cn.topiam.employee.console.pojo.result.app.AppCertListResult; + +/** + * 应用证书Converter + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 23:52 + */ +@Mapper(componentModel = "spring") +public interface AppCertConverter { + /** + * 查询应用列表参数转换为 Querydsl Predicate + * + * @param query {@link AppCertQuery} query + * @return {@link Predicate} + */ + default Predicate queryAppCertListParamConvertToPredicate(AppCertQuery query) { + QAppCertEntity cert = QAppCertEntity.appCertEntity; + Predicate predicate = cert.isNotNull(); + //查询条件 + //@formatter:off + predicate = StringUtils.isBlank(query.getAppId()) ? predicate : ExpressionUtils.and(predicate, cert.appId.eq(Long.valueOf(query.getAppId()))); + predicate = Objects.isNull(query.getUsingType()) ? predicate : ExpressionUtils.and(predicate, cert.usingType.eq(query.getUsingType())); + //@formatter:on + return predicate; + } + + /** + * 实体转换为应用程序证书列表结果 + * + * @param list {@link List} + * @return {@link List} + */ + default List entityConvertToAppCertListResult(List list) { + List results = new ArrayList<>(); + for (AppCertEntity cert : list) { + results.add(entityConvertToAppCertListResult(cert)); + } + return results; + } + + /** + * 实体转换为应用程序证书列表结果 + * + * @param list {@link List} + * @return {@link List} + */ + AppCertListResult entityConvertToAppCertListResult(AppCertEntity list); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppConverter.java new file mode 100644 index 00000000..e91b3501 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppConverter.java @@ -0,0 +1,199 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.app; + +import java.util.List; +import java.util.Objects; + +import org.apache.commons.lang3.StringUtils; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.util.AlternativeJdkIdGenerator; +import org.springframework.util.IdGenerator; + +import com.google.common.collect.Lists; +import com.querydsl.core.types.ExpressionUtils; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.application.ApplicationService; +import cn.topiam.employee.application.ApplicationServiceLoader; +import cn.topiam.employee.common.entity.app.AppEntity; +import cn.topiam.employee.common.entity.app.QAppEntity; +import cn.topiam.employee.console.pojo.query.app.AppQuery; +import cn.topiam.employee.console.pojo.result.app.AppGetResult; +import cn.topiam.employee.console.pojo.result.app.AppListResult; +import cn.topiam.employee.console.pojo.update.app.AppUpdateParam; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import cn.topiam.employee.support.repository.page.domain.Page; + +/** + * 应用映射 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/14 22:45 + */ +@Mapper(componentModel = "spring") +public interface AppConverter { + + /** + * 查询应用列表参数转换为 Querydsl Predicate + * + * @param query {@link AppQuery} query + * @return {@link Predicate} + */ + default Predicate queryAppListParamConvertToPredicate(AppQuery query) { + QAppEntity application = QAppEntity.appEntity; + Predicate predicate = application.isNotNull(); + //查询条件 + //@formatter:off + predicate = StringUtils.isBlank(query.getName()) ? predicate : ExpressionUtils.and(predicate, application.name.like("%" + query.getName() + "%")); + predicate = Objects.isNull(query.getProtocol()) ? predicate : ExpressionUtils.and(predicate, application.protocol.eq(query.getProtocol())); + //@formatter:on + return predicate; + } + + /** + * 实体转换为应用列表结果 + * + * @param entityPage {@link List} + * @return {@link List} + */ + default Page entityConvertToAppListResult(org.springframework.data.domain.Page entityPage) { + Page page = new Page<>(); + List list = Lists.newArrayList(); + for (AppEntity entity : entityPage.getContent()) { + AppListResult result = entityConvertToAppListResult(entity); + // 如果备注为空、放置详情,由于 entityConvertToAppListResult 为共用,所以这里单独处理。 + if (StringUtils.isBlank(result.getRemark())) { + ApplicationServiceLoader loader = ApplicationContextHelp + .getBean(ApplicationServiceLoader.class); + ApplicationService applicationService = loader + .getApplicationService(entity.getTemplate()); + if (!Objects.isNull(applicationService)) { + result.setRemark(applicationService.getDescription()); + } + } + list.add(result); + } + page.setList(list); + //@formatter:off + page.setPagination(Page.Pagination.builder() + .total(entityPage.getTotalElements()) + .totalPages(entityPage.getTotalPages()) + .current(entityPage.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + return page; + } + + /** + * 实体转应用管理列表 + * + * @param entity {@link AppEntity} + * @return {@link AppListResult} + */ + default AppListResult entityConvertToAppListResult(AppEntity entity) { + if (entity == null) { + return null; + } + + AppListResult appListResult = new AppListResult(); + if (entity.getId() != null) { + appListResult.setId(String.valueOf(entity.getId())); + } + appListResult.setName(entity.getName()); + appListResult.setType(entity.getType()); + appListResult.setIcon(entity.getIcon()); + //图标未配置,所以先从模版中拿 + if (StringUtils.isBlank(entity.getIcon())) { + ApplicationService applicationService = getApplicationServiceLoader() + .getApplicationService(entity.getTemplate()); + appListResult.setIcon(applicationService.getBase64Icon()); + } + appListResult.setTemplate(entity.getTemplate()); + appListResult.setProtocol(entity.getProtocol()); + appListResult.setEnabled(entity.getEnabled()); + appListResult.setRemark(entity.getRemark()); + return appListResult; + } + + /** + * 实体转应用返回 + * + * @param entity {@link AppEntity} + * @return {@link AppGetResult} + */ + default AppGetResult entityConvertToAppResult(AppEntity entity) { + if (entity == null) { + return null; + } + AppGetResult appGetResult = new AppGetResult(); + + if (entity.getId() != null) { + appGetResult.setId(String.valueOf(entity.getId())); + } + appGetResult.setName(entity.getName()); + appGetResult.setClientId(entity.getClientId()); + appGetResult.setClientSecret(entity.getClientSecret()); + appGetResult.setType(entity.getType()); + appGetResult.setIcon(entity.getIcon()); + appGetResult.setTemplate(entity.getTemplate()); + appGetResult.setProtocol(entity.getProtocol()); + appGetResult.setProtocolName(entity.getProtocol().getDesc()); + appGetResult.setEnabled(entity.getEnabled()); + appGetResult.setCreateTime(entity.getCreateTime()); + appGetResult.setRemark(entity.getRemark()); + return appGetResult; + } + + /** + * 将应用修改对象转换为entity + * + * @param param {@link AppUpdateParam} + * @return {@link AppEntity} + */ + @Mapping(target = "code", ignore = true) + @Mapping(target = "initLoginUrl", ignore = true) + @Mapping(target = "clientSecret", ignore = true) + @Mapping(target = "clientId", ignore = true) + @Mapping(target = "initLoginType", ignore = true) + @Mapping(target = "authorizationType", ignore = true) + @Mapping(target = "template", ignore = true) + @Mapping(target = "type", ignore = true) + @Mapping(target = "protocol", ignore = true) + @Mapping(target = "enabled", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + AppEntity appUpdateParamConverterToEntity(AppUpdateParam param); + + /** + * IdGenerator + */ + IdGenerator ID_GENERATOR = new AlternativeJdkIdGenerator(); + + /** + * 获取 ApplicationServiceLoader + * + * @return {@link ApplicationServiceLoader} + */ + private ApplicationServiceLoader getApplicationServiceLoader() { + return ApplicationContextHelp.getBean(ApplicationServiceLoader.class); + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppPermissionActionConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppPermissionActionConverter.java new file mode 100644 index 00000000..3c33dc3a --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppPermissionActionConverter.java @@ -0,0 +1,125 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.app; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.util.ObjectUtils; + +import com.querydsl.core.types.ExpressionUtils; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.common.entity.app.AppPermissionActionEntity; +import cn.topiam.employee.common.entity.app.AppPermissionResourceEntity; +import cn.topiam.employee.common.entity.app.QAppPermissionResourceEntity; +import cn.topiam.employee.common.enums.PermissionActionType; +import cn.topiam.employee.console.pojo.query.app.AppPermissionActionListQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionActionListResult; + +/** + * 权限映射 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/14 22:45 + */ +@Mapper(componentModel = "spring") +public interface AppPermissionActionConverter { + /** + * 应用权限资源列表转分页 + * + * @param query {@link AppPermissionActionListQuery} + * @return {@link Predicate} + */ + default Predicate appPermissionActionListQueryConvertToPredicate(AppPermissionActionListQuery query) { + QAppPermissionResourceEntity resource = QAppPermissionResourceEntity.appPermissionResourceEntity; + Predicate predicate = resource.isNotNull(); + //查询条件 + //@formatter:off + // 资源名称 + predicate = StringUtils.isBlank(query.getName()) ? predicate : ExpressionUtils.and(predicate, resource.name.like("%" + query.getName() + "%")); + // 资源ID + predicate = ObjectUtils.isEmpty(query.getId()) ? predicate : ExpressionUtils.and(predicate, resource.id.eq(Long.valueOf(query.getId()))); + //应用ID + predicate = ObjectUtils.isEmpty(query.getAppId()) ? predicate : ExpressionUtils.and(predicate, resource.appId.eq(Long.valueOf(query.getAppId()))); + //@formatter:on + return predicate; + } + + /** + * 实体转资源权限结果返回 + * + * @param list {@link AppPermissionResourceEntity} + * @return {@link AppPermissionActionListResult} + */ + default List entityConvertToResourceActionListResult(List list) { + List results = new ArrayList<>(); + List menus = new ArrayList<>(); + List apis = new ArrayList<>(); + List buttons = new ArrayList<>(); + List others = new ArrayList<>(); + List datas = new ArrayList<>(); + for (AppPermissionResourceEntity resource : list) { + for (AppPermissionActionEntity action : resource.getActions()) { + if (PermissionActionType.MENU.equals(action.getType())) { + menus.add(actionConvertToResourceActionResult(action)); + } + if (PermissionActionType.API.equals(action.getType())) { + apis.add(actionConvertToResourceActionResult(action)); + } + if (PermissionActionType.DATA.equals(action.getType())) { + datas.add(actionConvertToResourceActionResult(action)); + } + if (PermissionActionType.BUTTON.equals(action.getType())) { + buttons.add(actionConvertToResourceActionResult(action)); + } + if (PermissionActionType.OTHER.equals(action.getType())) { + others.add(actionConvertToResourceActionResult(action)); + } + } + AppPermissionActionListResult result = new AppPermissionActionListResult(); + //基本信息 + result.setAppId(resource.getAppId().toString()); + result.setId(resource.getId().toString()); + result.setName(resource.getName()); + result.setEnabled(resource.getEnabled()); + result.setDesc(resource.getDesc()); + //权限资源 + result.setButtons(buttons); + result.setApis(apis); + result.setDatas(datas); + result.setMenus(menus); + result.setOthers(others); + results.add(result); + } + return results; + } + + /** + * actionConvertToResourceActionResult + * + * @param action {@link AppPermissionActionEntity} + * @return {@link AppPermissionActionListResult.Action} + */ + @Mapping(target = "access", source = "value") + AppPermissionActionListResult.Action actionConvertToResourceActionResult(AppPermissionActionEntity action); + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppPermissionPolicyConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppPermissionPolicyConverter.java new file mode 100644 index 00000000..6a5933ce --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppPermissionPolicyConverter.java @@ -0,0 +1,103 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.app; + +import java.util.ArrayList; +import java.util.List; + +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.util.CollectionUtils; + +import cn.topiam.employee.common.entity.app.AppPermissionPolicyEntity; +import cn.topiam.employee.common.entity.app.po.AppPermissionPolicyPO; +import cn.topiam.employee.console.pojo.result.app.AppPermissionPolicyListResult; +import cn.topiam.employee.console.pojo.save.app.AppPermissionPolicyCreateParam; +import cn.topiam.employee.console.pojo.update.app.AppPermissionPolicyUpdateParam; +import cn.topiam.employee.support.repository.page.domain.Page; + +/** + * 策略映射 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/14 22:45 + */ +@Mapper(componentModel = "spring", uses = AppPermissionActionConverter.class) +public interface AppPermissionPolicyConverter { + + /** + * 资源创建参数转实体类 + * + * @param param {@link AppPermissionPolicyCreateParam} + * @return {@link AppPermissionPolicyEntity} + */ + @Mapping(target = "id", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "remark", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + AppPermissionPolicyEntity policyCreateParamConvertToEntity(AppPermissionPolicyCreateParam param); + + /** + * 资源修改参数转实体类 + * + * @param param {@link AppPermissionPolicyCreateParam} + * @return {@link AppPermissionPolicyEntity} + */ + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "remark", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + AppPermissionPolicyEntity policyUpdateParamConvertToEntity(AppPermissionPolicyUpdateParam param); + + /** + * 资源转换为资源列表结果 + * + * @param page {@link Page} + * @return {@link Page} + */ + default Page entityConvertToPolicyListResult(org.springframework.data.domain.Page page) { + Page result = new Page<>(); + List pageList = page.getContent(); + if (!CollectionUtils.isEmpty(pageList)) { + //@formatter:off + result.setPagination(Page.Pagination.builder() + .total(page.getTotalElements()) + .totalPages(page.getTotalPages()) + .current(page.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + List list = new ArrayList<>(); + for (AppPermissionPolicyPO po : pageList) { + list.add(entityConvertToPolicyListResult(po)); + } + result.setList(list); + } + return result; + } + + /** + * entityConvertToPolicyListResult + * + * @param entity {@link AppPermissionPolicyListResult} + * @return {@link AppPermissionPolicyPO} + */ + AppPermissionPolicyListResult entityConvertToPolicyListResult(AppPermissionPolicyPO entity); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppPermissionResourceConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppPermissionResourceConverter.java new file mode 100644 index 00000000..07c9988b --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppPermissionResourceConverter.java @@ -0,0 +1,140 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.app; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; + +import com.querydsl.core.types.ExpressionUtils; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.common.entity.app.AppPermissionResourceEntity; +import cn.topiam.employee.common.entity.app.QAppPermissionResourceEntity; +import cn.topiam.employee.console.pojo.query.app.AppResourceListQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionResourceGetResult; +import cn.topiam.employee.console.pojo.result.app.AppPermissionResourceListResult; +import cn.topiam.employee.console.pojo.save.app.AppPermissionResourceCreateParam; +import cn.topiam.employee.console.pojo.update.app.AppPermissionResourceUpdateParam; +import cn.topiam.employee.support.repository.page.domain.Page; + +/** + * 资源映射 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/14 22:45 + */ +@Mapper(componentModel = "spring", uses = AppPermissionActionConverter.class) +public interface AppPermissionResourceConverter { + + /** + * 资源分页查询参数转实体 + * + * @param query {@link AppResourceListQuery} + * @return {@link Predicate} + */ + default Predicate resourcePaginationParamConvertToPredicate(AppResourceListQuery query) { + QAppPermissionResourceEntity resource = QAppPermissionResourceEntity.appPermissionResourceEntity; + Predicate predicate = resource.isNotNull(); + //查询条件 + //@formatter:off + // 资源名称 + predicate = StringUtils.isBlank(query.getName()) ? predicate : ExpressionUtils.and(predicate, resource.name.like("%" + query.getName() + "%")); + // 所属应用 + predicate = ObjectUtils.isEmpty(query.getAppId()) ? predicate : ExpressionUtils.and(predicate, resource.appId.eq(query.getAppId())); + //@formatter:on + return predicate; + } + + /** + * 资源创建参数转实体类 + * + * @param param {@link AppPermissionResourceCreateParam} + * @return {@link AppPermissionResourceEntity} + */ + @Mapping(target = "actions", ignore = true) + @Mapping(target = "id", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "remark", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + AppPermissionResourceEntity resourceCreateParamConvertToEntity(AppPermissionResourceCreateParam param); + + /** + * 资源修改参数转实体类 + * + * @param param {@link AppPermissionResourceCreateParam} + * @return {@link AppPermissionResourceEntity} + */ + @Mapping(target = "actions", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "remark", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + AppPermissionResourceEntity resourceUpdateParamConvertToEntity(AppPermissionResourceUpdateParam param); + + /** + * 资源转换为资源列表结果 + * + * @param page {@link Page} + * @return {@link Page} + */ + default Page entityConvertToResourceListResult(org.springframework.data.domain.Page page) { + Page result = new Page<>(); + List pageList = page.getContent(); + if (!CollectionUtils.isEmpty(pageList)) { + List list = new ArrayList<>(); + for (AppPermissionResourceEntity resource : pageList) { + list.add(entityConvertToResourceListResult(resource)); + } + //@formatter:off + result.setPagination(Page.Pagination.builder() + .total(page.getTotalElements()) + .totalPages(page.getTotalPages()) + .current(page.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + result.setList(list); + } + return result; + } + + /** + * 实体转换为资源列表结果 + * + * @param data {@link AppPermissionResourceEntity} + * @return {@link AppPermissionResourceListResult} + */ + AppPermissionResourceListResult entityConvertToResourceListResult(AppPermissionResourceEntity data); + + /** + * 实体转获取详情返回 + * + * @param resource {@link AppPermissionResourceEntity} + * @return {@link AppPermissionResourceGetResult} + */ + @Mapping(target = "actions", source = "actions") + AppPermissionResourceGetResult entityConvertToResourceGetResult(AppPermissionResourceEntity resource); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppPermissionRoleConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppPermissionRoleConverter.java new file mode 100644 index 00000000..9fc89dda --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/AppPermissionRoleConverter.java @@ -0,0 +1,141 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.app; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; + +import com.querydsl.core.types.ExpressionUtils; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.common.entity.app.AppPermissionRoleEntity; +import cn.topiam.employee.common.entity.app.QAppPermissionRoleEntity; +import cn.topiam.employee.console.pojo.query.app.AppPermissionRoleListQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionRoleListResult; +import cn.topiam.employee.console.pojo.result.app.AppPermissionRoleResult; +import cn.topiam.employee.console.pojo.save.app.AppPermissionRoleCreateParam; +import cn.topiam.employee.console.pojo.update.app.PermissionRoleUpdateParam; +import cn.topiam.employee.support.repository.page.domain.Page; + +/** + * 角色映射 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/14 22:45 + */ +@Mapper(componentModel = "spring") +public interface AppPermissionRoleConverter { + + /** + * 角色实体转换为角色分页结果 + * + * @param page {@link Page} + * @return {@link Page} + */ + default Page entityConvertToRolePaginationResult(org.springframework.data.domain.Page page) { + Page result = new Page<>(); + if (!CollectionUtils.isEmpty(page.getContent())) { + List list = new ArrayList<>(); + for (AppPermissionRoleEntity user : page.getContent()) { + list.add(entityConvertToRolePaginationResult(user)); + } + //@formatter:off + result.setPagination(Page.Pagination.builder() + .total(page.getTotalElements()) + .totalPages(page.getTotalPages()) + .current(page.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + result.setList(list); + } + return result; + } + + /** + * 角色实体转换为角色分页结果 + * + * @param page {@link AppPermissionRoleEntity} + * @return {@link AppPermissionRoleListResult} + */ + AppPermissionRoleListResult entityConvertToRolePaginationResult(AppPermissionRoleEntity page); + + /** + * 角色创建参数转换为角色实体 + * + * @param param {@link AppPermissionRoleCreateParam} + * @return {@link AppPermissionRoleEntity} + */ + @Mapping(target = "id", ignore = true) + @Mapping(target = "enabled", expression = "java(Boolean.TRUE)") + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + AppPermissionRoleEntity roleCreateParamConvertToEntity(AppPermissionRoleCreateParam param); + + /** + * 角色更新参数转换为角色实体类 + * + * @param param {@link PermissionRoleUpdateParam} 更新参数 + * @return {@link AppPermissionRoleEntity} 角色实体 + */ + @Mapping(target = "appId", ignore = true) + @Mapping(target = "enabled", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + AppPermissionRoleEntity roleUpdateParamConvertToEntity(PermissionRoleUpdateParam param); + + /** + * 实体转系统详情结果 + * + * @param role {@link AppPermissionRoleEntity} + * @return {@link AppPermissionRoleResult} + */ + AppPermissionRoleResult entityConvertToRoleDetailResult(AppPermissionRoleEntity role); + + /** + * 角色分页查询参数转实体 + * + * @param query {@link AppPermissionRoleListQuery} + * @return {@link AppPermissionRoleEntity} + */ + default Predicate rolePaginationParamConvertToPredicate(AppPermissionRoleListQuery query) { + QAppPermissionRoleEntity role = QAppPermissionRoleEntity.appPermissionRoleEntity; + Predicate predicate = role.isNotNull(); + //查询条件 + //@formatter:off + // 角色名称 + predicate = StringUtils.isBlank(query.getName()) ? predicate : ExpressionUtils.and(predicate, role.name.like("%" + query.getName() + "%")); + // 是否启用 + predicate = ObjectUtils.isEmpty(query.getEnabled()) ? predicate : ExpressionUtils.and(predicate, role.enabled.eq(query.getEnabled())); + // 角色编码 + predicate = StringUtils.isBlank(query.getCode()) ? predicate : ExpressionUtils.and(predicate, role.code.eq(query.getCode())); + // 所属应用 + predicate = ObjectUtils.isEmpty(query.getAppId()) ? predicate : ExpressionUtils.and(predicate, role.appId.eq(query.getAppId())); + //@formatter:on + return predicate; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/UserIdpBindConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/UserIdpBindConverter.java new file mode 100644 index 00000000..96d91bbc --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/app/UserIdpBindConverter.java @@ -0,0 +1,59 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.app; + +import java.util.ArrayList; +import java.util.List; + +import org.mapstruct.Mapper; + +import cn.topiam.employee.common.entity.account.po.UserIdpBindPo; +import cn.topiam.employee.console.pojo.result.app.UserIdpBindListResult; +import cn.topiam.employee.support.repository.page.domain.Page; + +/** + * 用户身份提供商绑定 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/11/3 19:08 + */ +@Mapper(componentModel = "spring") +public interface UserIdpBindConverter { + + /** + * 用户身份提供商绑定关系分页结果 + * + * @param page {@link Page} + * @return {@link Page} + */ + default List userIdpBindEntityConvertToUserIdpBindListResult(Iterable page) { + List list = new ArrayList<>(); + for (UserIdpBindPo entity : page) { + list.add(entityConvertToAppAccountResult(entity)); + } + return list; + } + + /** + * 用户身份提供商绑定关系转换结果 + * + * @param userIdpBindPo {@link UserIdpBindPo} + * @return {@link UserIdpBindListResult} + */ + UserIdpBindListResult entityConvertToAppAccountResult(UserIdpBindPo userIdpBindPo); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/authentication/IdentityProviderConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/authentication/IdentityProviderConverter.java new file mode 100644 index 00000000..b2ebfd55 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/authentication/IdentityProviderConverter.java @@ -0,0 +1,265 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.authentication; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import javax.validation.ConstraintViolationException; + +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.data.querydsl.QPageRequest; + +import com.alibaba.fastjson2.JSONObject; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.querydsl.core.types.ExpressionUtils; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.authentication.common.config.IdentityProviderConfig; +import cn.topiam.employee.authentication.dingtalk.DingTalkIdpOauthConfig; +import cn.topiam.employee.authentication.dingtalk.DingTalkIdpScanCodeConfig; +import cn.topiam.employee.authentication.qq.QqIdpOauthConfig; +import cn.topiam.employee.authentication.wechat.WeChatIdpScanCodeConfig; +import cn.topiam.employee.authentication.wechatwork.WeChatWorkIdpScanCodeConfig; +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.entity.authentication.QIdentityProviderEntity; +import cn.topiam.employee.common.enums.IdentityProviderType; +import cn.topiam.employee.console.pojo.query.authentication.IdentityProviderListQuery; +import cn.topiam.employee.console.pojo.result.authentication.IdentityProviderListResult; +import cn.topiam.employee.console.pojo.result.authentication.IdentityProviderResult; +import cn.topiam.employee.console.pojo.save.authentication.IdentityProviderCreateParam; +import cn.topiam.employee.console.pojo.update.authentication.IdpUpdateParam; +import cn.topiam.employee.core.context.ServerContextHelp; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.repository.page.domain.QueryDslRequest; +import cn.topiam.employee.support.validation.ValidationHelp; + +/** + * 身份提供商转换器 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/22 23:59 + */ +@Mapper(componentModel = "spring") +public interface IdentityProviderConverter { + + /** + * 认证源平台枚举转换器到认证源平台结果 + * + * @param values {@link List} + * @return {@link List} + */ + default Page entityConverterToIdentityProviderResult(org.springframework.data.domain.Page values) { + Page result = new Page<>(); + ArrayList list = new ArrayList<>(); + for (IdentityProviderEntity entity : values.getContent()) { + list.add(entityConverterToIdentityProviderResult(entity)); + } + //@formatter:off + result.setPagination(Page.Pagination.builder() + .total(values.getTotalElements()) + .totalPages(values.getTotalPages()) + .current(values.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + result.setList(list); + return result; + } + + /** + * 实体转认证源详情 + * + * @param entity {@link IdentityProviderEntity} + * @return {@link IdentityProviderListResult} + */ + @Mapping(target = "desc", source = "type.desc") + IdentityProviderListResult entityConverterToIdentityProviderResult(IdentityProviderEntity entity); + + /** + * 保存入参转换为实体类 + * + * @param param {@link IdentityProviderCreateParam} + * @return {@link IdentityProviderEntity} + */ + default IdentityProviderEntity identityProviderCreateParamConverterToEntity(IdentityProviderCreateParam param) { + if (param == null) { + return null; + } + if (!param.getCategory().getProviders().contains(param.getType())) { + throw new TopIamException("认证源类型与认证源提供商不匹配"); + } + try { + IdentityProviderConfig identityProviderConfig = getIdentityProviderConfig( + param.getType(), param.getConfig()); + ObjectMapper objectMapper = new ObjectMapper(); + // 指定序列化输入的类型 + objectMapper.activateDefaultTyping(objectMapper.getPolymorphicTypeValidator(), + ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY); + //封装数据 + IdentityProviderEntity identityProviderEntity = new IdentityProviderEntity(); + identityProviderEntity.setName(param.getName()); + identityProviderEntity.setCode( + org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric(32).toLowerCase()); + identityProviderEntity.setType(param.getType()); + identityProviderEntity.setCategory(param.getCategory()); + identityProviderEntity.setDisplayed(param.getDisplayed()); + identityProviderEntity.setEnabled(Boolean.TRUE); + identityProviderEntity.setRemark(param.getRemark()); + //配置 + identityProviderEntity + .setConfig(objectMapper.writeValueAsString(identityProviderConfig)); + return identityProviderEntity; + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + /** + * entity转换为详细信息结果 + * + * @param entity {@link IdentityProviderEntity} + * @return {@link IdentityProviderListResult} + */ + default IdentityProviderResult entityConverterToIdentityProviderDetailResult(IdentityProviderEntity entity) { + if (entity == null) { + return null; + } + IdentityProviderResult result = new IdentityProviderResult(); + if (entity.getId() != null) { + result.setId(String.valueOf(entity.getId())); + } + result.setType(entity.getType()); + result.setDisplayed(entity.getDisplayed()); + result.setName(entity.getName()); + result.setRemark(entity.getRemark()); + //回调地址 + result.setRedirectUri(ServerContextHelp.getPortalPublicBaseUrl() + + entity.getType().getLoginPathPrefix() + "/" + entity.getCode()); + try { + ObjectMapper objectMapper = new ObjectMapper(); + // 指定序列化输入的类型 + objectMapper.activateDefaultTyping(objectMapper.getPolymorphicTypeValidator(), + ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY); + IdentityProviderConfig config = objectMapper.readValue(entity.getConfig(), + IdentityProviderConfig.class); + result.setConfig(config); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + return result; + } + + /** + * 查询身份源列表参数转Predicate + * + * @param query {@link IdentityProviderListQuery} + * @param pageModel {@link PageModel} + * @return {@link QueryDslRequest} + */ + default QueryDslRequest queryIdentityProviderListParamConvertToPredicate(IdentityProviderListQuery query, + PageModel pageModel) { + QueryDslRequest request = new QueryDslRequest(); + QIdentityProviderEntity queryEntity = QIdentityProviderEntity.identityProviderEntity; + Predicate predicate = queryEntity.isNotNull(); + //查询条件 + //@formatter:off + predicate = Objects.isNull(query.getCategory()) ? predicate : ExpressionUtils.and(predicate, queryEntity.category.eq(query.getCategory())); + predicate = Objects.isNull(query.getName()) ? predicate : ExpressionUtils.and(predicate, queryEntity.name.eq(query.getName())); + //@formatter:on + request.setPredicate(predicate); + //分页条件 + request.setPageRequest(QPageRequest.of(pageModel.getCurrent(), pageModel.getPageSize())); + return request; + } + + /** + * 修改入参转换为实体类 + * + * @param param {@link IdpUpdateParam} + * @return {@link IdentityProviderEntity} + */ + default IdentityProviderEntity identityProviderUpdateParamConverterToEntity(IdpUpdateParam param) { + if (param == null) { + return null; + } + IdentityProviderConfig identityProviderConfig = getIdentityProviderConfig(param.getType(), + param.getConfig()); + ObjectMapper objectMapper = new ObjectMapper(); + // 指定序列化输入的类型 + objectMapper.activateDefaultTyping(objectMapper.getPolymorphicTypeValidator(), + ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY); + try { + //封装数据 + IdentityProviderEntity identityProviderEntity = new IdentityProviderEntity(); + identityProviderEntity.setName(param.getName()); + identityProviderEntity.setType(param.getType()); + identityProviderEntity.setDisplayed(param.getDisplayed()); + identityProviderEntity.setRemark(param.getRemark()); + //配置 + identityProviderEntity + .setConfig(objectMapper.writeValueAsString(identityProviderConfig)); + return identityProviderEntity; + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + /** + * 获取认证源配置 + * + * @param type {@link IdentityProviderType} + * @param config {@link JSONObject} + * @return {@link IdentityProviderConfig} + */ + default IdentityProviderConfig getIdentityProviderConfig(IdentityProviderType type, + JSONObject config) { + //开始处理不同提供商的配置 + IdentityProviderConfig identityProviderConfig; + switch (type) { + //微信扫码 + case WECHAT_SCAN_CODE -> + identityProviderConfig = config.to(WeChatIdpScanCodeConfig.class); + //钉钉扫码 + case DINGTALK_SCAN_CODE -> + identityProviderConfig = config.to(DingTalkIdpScanCodeConfig.class); + //钉钉Oauth + case DINGTALK_OAUTH -> identityProviderConfig = config.to(DingTalkIdpOauthConfig.class); + //企业微信扫码 + case WECHATWORK_SCAN_CODE -> + identityProviderConfig = config.to(WeChatWorkIdpScanCodeConfig.class); + //QQ认证 + case QQ -> identityProviderConfig = config.to(QqIdpOauthConfig.class); + default -> throw new TopIamException("不支持此身份提供商"); + } + if (!Objects.nonNull(identityProviderConfig)) { + throw new NullPointerException("提供商配置不能为空"); + } + ValidationHelp.ValidationResult validationResult = ValidationHelp + .validateEntity(identityProviderConfig); + if (validationResult.isHasErrors()) { + throw new ConstraintViolationException(validationResult.getConstraintViolations()); + } + return identityProviderConfig; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/identitysource/IdentitySourceConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/identitysource/IdentitySourceConverter.java new file mode 100644 index 00000000..63373488 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/identitysource/IdentitySourceConverter.java @@ -0,0 +1,280 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.identitysource; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import javax.validation.ConstraintViolationException; + +import org.apache.commons.lang3.StringUtils; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.data.domain.Page; +import org.springframework.data.querydsl.QPageRequest; +import org.springframework.util.CollectionUtils; + +import com.alibaba.fastjson2.JSONObject; +import com.alibaba.fastjson2.JSONWriter; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.querydsl.core.types.ExpressionUtils; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.common.constants.CommonConstants; +import cn.topiam.employee.common.entity.identitysource.IdentitySourceEntity; +import cn.topiam.employee.common.entity.identitysource.QIdentitySourceEntity; +import cn.topiam.employee.common.enums.identityprovider.IdentitySourceProvider; +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceListQuery; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceConfigGetResult; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceGetResult; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceListResult; +import cn.topiam.employee.console.pojo.save.identitysource.IdentitySourceConfigSaveParam; +import cn.topiam.employee.console.pojo.save.identitysource.IdentitySourceCreateParam; +import cn.topiam.employee.console.pojo.update.identity.IdentitySourceUpdateParam; +import cn.topiam.employee.core.context.ServerContextHelp; +import cn.topiam.employee.identitysource.core.IdentitySourceConfig; +import cn.topiam.employee.identitysource.dingtalk.DingTalkConfig; +import cn.topiam.employee.identitysource.feishu.FeiShuConfig; +import cn.topiam.employee.identitysource.wechatwork.WeChatWorkConfig; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.repository.page.domain.QueryDslRequest; +import cn.topiam.employee.support.validation.ValidationHelp; + +/** + * 身份源转换器 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 21:37 + */ +@Mapper(componentModel = "spring") +public interface IdentitySourceConverter { + + ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + + /** + * 身份源平台枚举转换器到身份源平台结果 + * + * @param values {@link IdentitySourceEntity} + * @return {@link List} + */ + default cn.topiam.employee.support.repository.page.domain.Page entityConverterToIdentitySourceListResult(Page values) { + + cn.topiam.employee.support.repository.page.domain.Page result = new cn.topiam.employee.support.repository.page.domain.Page<>(); + if (!CollectionUtils.isEmpty(values.getContent())) { + ArrayList list = new ArrayList<>(); + for (IdentitySourceEntity entity : values.getContent()) { + list.add(entityConverterToIdentitySourceListResult(entity)); + } + + //@formatter:off + result.setPagination(cn.topiam.employee.support.repository.page.domain.Page.Pagination.builder() + .total(values.getTotalElements()) + .totalPages(values.getTotalPages()) + .current(values.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + result.setList(list); + } + return result; + } + + /** + * 身份源平台枚举转换器到身份源平台结果 + * + * @param value {@link IdentitySourceEntity} + * @return {@link List} + */ + @Mapping(target = "desc", source = "provider.desc") + @Mapping(target = "provider", source = "provider.code") + @Mapping(target = "icon", ignore = true) + IdentitySourceListResult entityConverterToIdentitySourceListResult(IdentitySourceEntity value); + + /** + * 创建入参转换为实体类 + * + * @param param {@link IdentitySourceCreateParam} + * @return {@link IdentitySourceEntity} + */ + @Mapping(target = "code", expression = "java(org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric(32).toLowerCase())") + @Mapping(target = "configured", expression = "java(Boolean.FALSE)") + @Mapping(target = "enabled", expression = "java(Boolean.TRUE)") + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "basicConfig", expression = "java(\"{}\")") + @Mapping(target = "jobConfig", expression = "java(new cn.topiam.employee.common.entity.identitysource.config.JobConfig())") + @Mapping(target = "strategyConfig", expression = "java(new cn.topiam.employee.common.entity.identitysource.config.StrategyConfig())") + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "remark", ignore = true) + @Mapping(target = "id", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + IdentitySourceEntity createParamConverterToEntity(IdentitySourceCreateParam param); + + /** + * entity转换为详细信息结果 + * + * @param entity {@link IdentitySourceEntity} + * @return {@link IdentitySourceGetResult} + */ + default IdentitySourceGetResult entityConverterToIdentitySourceGetResult(IdentitySourceEntity entity) { + if (entity == null) { + return null; + } + IdentitySourceGetResult identitySourceGetResult = new IdentitySourceGetResult(); + if (entity.getId() != null) { + identitySourceGetResult.setId(String.valueOf(entity.getId())); + } + identitySourceGetResult.setName(entity.getName()); + identitySourceGetResult.setProvider(entity.getProvider()); + identitySourceGetResult.setEnabled(entity.getEnabled()); + identitySourceGetResult.setConfigured(entity.getConfigured()); + identitySourceGetResult.setRemark(entity.getRemark()); + return identitySourceGetResult; + } + + /** + * 保存入参转换为实体类 + * + * @param param {@link IdentitySourceCreateParam} + * @return {@link IdentitySourceEntity} + */ + @Mapping(target = "code", ignore = true) + @Mapping(target = "configured", ignore = true) + @Mapping(target = "strategyConfig", ignore = true) + @Mapping(target = "basicConfig", ignore = true) + @Mapping(target = "jobConfig", ignore = true) + @Mapping(target = "provider", ignore = true) + @Mapping(target = "enabled", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + IdentitySourceEntity updateParamConverterToEntity(IdentitySourceUpdateParam param); + + /** + * 保存配置参数转entity + * + * @param param {@link IdentitySourceConfigSaveParam} + * @return {@link IdentitySourceEntity} + */ + @Mapping(target = "code", ignore = true) + @Mapping(target = "configured", expression = "java(Boolean.TRUE)") + @Mapping(target = "basicConfig", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "remark", ignore = true) + @Mapping(target = "provider", ignore = true) + @Mapping(target = "name", ignore = true) + @Mapping(target = "enabled", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + IdentitySourceEntity saveConfigParamConverterToEntity(IdentitySourceConfigSaveParam param); + + /** + * 保存配置参数转entity + * + * @param param {@link IdentitySourceConfigSaveParam} + * @param provider {@link IdentitySourceProvider} + * @return {@link IdentitySourceEntity} + */ + default IdentitySourceEntity saveConfigParamConverterToEntity(IdentitySourceConfigSaveParam param, + IdentitySourceProvider provider) { + ValidationHelp.ValidationResult validationResult; + IdentitySourceConfig clientConfig = null; + //钉钉 + if (Objects.equals(provider, IdentitySourceProvider.DINGTALK)) { + clientConfig = param.getBasicConfig().to(DingTalkConfig.class); + } + //企业微信 + if (Objects.equals(provider, IdentitySourceProvider.WECHAT_WORK)) { + clientConfig = param.getBasicConfig().to(WeChatWorkConfig.class); + } + //飞书 + if (Objects.equals(provider, IdentitySourceProvider.FEISHU)) { + clientConfig = param.getBasicConfig().to(FeiShuConfig.class); + } + //放置参数,并验证参数 + if (!Objects.nonNull(clientConfig)) { + throw new NullPointerException("提供商配置不能为空!"); + } + validationResult = ValidationHelp.validateEntity(clientConfig); + //处理异常 + if (validationResult.isHasErrors()) { + throw new ConstraintViolationException(validationResult.getConstraintViolations()); + } + //封装数据 + IdentitySourceEntity source = saveConfigParamConverterToEntity(param); + source.setBasicConfig( + JSONObject.toJSONString(clientConfig, JSONWriter.Feature.WriteClassName)); + return source; + } + + /** + * 查询身份源列表参数转 Request + * + * @param query {@link IdentitySourceListQuery} + * @param pageModel {@link PageModel} + * @return {@link QueryDslRequest } + */ + default QueryDslRequest queryIdentitySourceListParamConvertToPredicate(IdentitySourceListQuery query, + PageModel pageModel) { + QueryDslRequest request = new QueryDslRequest(); + QIdentitySourceEntity queryEntity = QIdentitySourceEntity.identitySourceEntity; + Predicate predicate = queryEntity.isNotNull(); + //查询条件 + //@formatter:off + predicate = StringUtils.isBlank(query.getName()) ? predicate : ExpressionUtils.and(predicate, queryEntity.name.like("%" + query.getName() + "%")); + //@formatter:on + request.setPredicate(predicate); + //分页条件 + //@formatter:off + request.setPageRequest(QPageRequest.of(pageModel.getCurrent(), pageModel.getPageSize())); + return request; + } + + /** + * entity转换为配置结果 + * + * @param entity {@link IdentitySourceEntity} + * @return {@link IdentitySourceConfigGetResult} + */ + default IdentitySourceConfigGetResult entityConverterToIdentitySourceConfigGetResult(IdentitySourceEntity entity){ + if (entity == null) { + return null; + } + IdentitySourceConfigGetResult identitySourceResult = new IdentitySourceConfigGetResult(); + if (entity.getId() != null) { + identitySourceResult.setId(String.valueOf(entity.getId())); + } + identitySourceResult.setConfigured(entity.getConfigured()); + identitySourceResult.setJobConfig(entity.getJobConfig()); + identitySourceResult.setStrategyConfig(entity.getStrategyConfig()); + try { + JSONObject value = OBJECT_MAPPER.readValue(entity.getBasicConfig(), JSONObject.class); + value.remove(CommonConstants.TYPE); + //@formatter:off + value.put(CommonConstants.CALLBACK_URL, ServerContextHelp.getSynchronizerPublicBaseUrl() + "/api/synchronizer/event_receive/" + entity.getCode()); + //@formatter:on + identitySourceResult.setBasicConfig(value); + } catch (Exception e) { + throw new TopIamException(e.getMessage()); + } + return identitySourceResult; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/identitysource/IdentitySourceEventRecordConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/identitysource/IdentitySourceEventRecordConverter.java new file mode 100644 index 00000000..dd31defb --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/identitysource/IdentitySourceEventRecordConverter.java @@ -0,0 +1,103 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.identitysource; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import org.apache.commons.lang3.StringUtils; +import org.mapstruct.Mapper; +import org.springframework.util.CollectionUtils; + +import com.querydsl.core.types.ExpressionUtils; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.common.entity.account.UserGroupEntity; +import cn.topiam.employee.common.entity.identitysource.IdentitySourceEventRecordEntity; +import cn.topiam.employee.common.entity.identitysource.QIdentitySourceEventRecordEntity; +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceEventRecordListQuery; +import cn.topiam.employee.console.pojo.result.account.UserGroupListResult; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceEventRecordListResult; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import cn.topiam.employee.support.repository.page.domain.Page; + +/** + * 身份源事件记录转换器 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 21:37 + */ +@Mapper(componentModel = "spring") +public interface IdentitySourceEventRecordConverter { + + /** + * 身份源事件记录列表参数转换为 Querydsl Predicate + * + * @param query {@link IdentitySourceEventRecordListQuery} query + * @return {@link Predicate} + */ + default Predicate queryIdentitySourceEventRecordListQueryConvertToPredicate(IdentitySourceEventRecordListQuery query) { + QIdentitySourceEventRecordEntity queryEntity = QIdentitySourceEventRecordEntity.identitySourceEventRecordEntity; + Predicate predicate = queryEntity.isNotNull(); + //查询条件 + //@formatter:off + predicate = StringUtils.isBlank(query.getIdentitySourceId()) ? predicate : ExpressionUtils.and(predicate, queryEntity.identitySourceId.eq(Long.valueOf(query.getIdentitySourceId()))); + predicate = Objects.isNull(query.getActionType()) ? predicate : ExpressionUtils.and(predicate, queryEntity.actionType.eq(query.getActionType())); + predicate = Objects.isNull(query.getObjectType()) ? predicate : ExpressionUtils.and(predicate, queryEntity.objectType.eq(query.getObjectType())); + predicate = Objects.isNull(query.getStatus()) ? predicate : ExpressionUtils.and(predicate, queryEntity.status.eq(query.getStatus())); + //@formatter:on + return predicate; + } + + /** + * 身份源事件记录实体转换为身份源事件记录分页结果 + * + * @param page {@link Page} + * @return {@link Page} + */ + default Page entityConvertToIdentitySourceSyncRecordListResult(org.springframework.data.domain.Page page) { + Page result = new Page<>(); + if (!CollectionUtils.isEmpty(page.getContent())) { + List list = new ArrayList<>(); + for (IdentitySourceEventRecordEntity entity : page.getContent()) { + IdentitySourceEventRecordConverter bean = ApplicationContextHelp + .getBean(IdentitySourceEventRecordConverter.class); + list.add(bean.entityConvertToIdentitySourceSyncRecordListResult(entity)); + } + + //@formatter:off + result.setPagination(Page.Pagination.builder() + .total(page.getTotalElements()) + .totalPages(page.getTotalPages()) + .current(page.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + result.setList(list); + } + return result; + } + + /** + * 身份源事件记录转换为身份源事件记录分页结果 + * + * @param entity {@link UserGroupEntity} + * @return {@link UserGroupListResult} + */ + IdentitySourceEventRecordListResult entityConvertToIdentitySourceSyncRecordListResult(IdentitySourceEventRecordEntity entity); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/identitysource/IdentitySourceSyncConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/identitysource/IdentitySourceSyncConverter.java new file mode 100644 index 00000000..7649e218 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/identitysource/IdentitySourceSyncConverter.java @@ -0,0 +1,203 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.identitysource; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import org.apache.commons.lang3.StringUtils; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.util.CollectionUtils; + +import com.querydsl.core.types.ExpressionUtils; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.common.entity.account.UserGroupEntity; +import cn.topiam.employee.common.entity.identitysource.IdentitySourceSyncHistoryEntity; +import cn.topiam.employee.common.entity.identitysource.IdentitySourceSyncRecordEntity; +import cn.topiam.employee.common.entity.identitysource.QIdentitySourceSyncHistoryEntity; +import cn.topiam.employee.common.entity.identitysource.QIdentitySourceSyncRecordEntity; +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceSyncHistoryListQuery; +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceSyncRecordListQuery; +import cn.topiam.employee.console.pojo.result.account.UserGroupListResult; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceSyncHistoryListResult; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceSyncRecordListResult; +import cn.topiam.employee.support.repository.page.domain.Page; + +/** + * 身份源转换器 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/13 21:37 + */ +@Mapper(componentModel = "spring") +public interface IdentitySourceSyncConverter { + + /** + * 身份源同步列表参数转换为 Querydsl Predicate + * + * @param query {@link IdentitySourceSyncHistoryListQuery} query + * @return {@link Predicate} + */ + default Predicate queryIdentitySourceSyncHistoryListQueryConvertToPredicate(IdentitySourceSyncHistoryListQuery query) { + QIdentitySourceSyncHistoryEntity queryEntity = QIdentitySourceSyncHistoryEntity.identitySourceSyncHistoryEntity; + Predicate predicate = queryEntity.isNotNull(); + //查询条件 + //@formatter:off + predicate = StringUtils.isBlank(query.getIdentitySourceId()) ? predicate : ExpressionUtils.and(predicate, queryEntity.identitySourceId.eq(Long.valueOf(query.getIdentitySourceId()))); + predicate = Objects.isNull(query.getObjectType()) ? predicate : ExpressionUtils.and(predicate, queryEntity.objectType.eq(query.getObjectType())); + predicate = Objects.isNull(query.getTriggerType()) ? predicate : ExpressionUtils.and(predicate, queryEntity.triggerType.eq(query.getTriggerType())); + predicate = Objects.isNull(query.getStatus()) ? predicate : ExpressionUtils.and(predicate, queryEntity.status.eq(query.getStatus())); + //@formatter:on + return predicate; + } + + /** + * 身份源同步实体转换为身份源同步分页结果 + * + * @param page {@link Page} + * @return {@link Page} + */ + default Page entityConvertToIdentitySourceSyncHistoryListResult(org.springframework.data.domain.Page page) { + Page result = new Page<>(); + if (!CollectionUtils.isEmpty(page.getContent())) { + List list = new ArrayList<>(); + for (IdentitySourceSyncHistoryEntity entity : page.getContent()) { + list.add(entityConvertToIdentitySourceSyncHistoryListResult(entity)); + } + //@formatter:off + result.setPagination(Page.Pagination.builder() + .total(page.getTotalElements()) + .totalPages(page.getTotalPages()) + .current(page.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + result.setList(list); + } + return result; + } + + /** + * 身份源同步转换为身份源同步分页结果 + * + * @param entity {@link UserGroupEntity} + * @return {@link UserGroupListResult} + */ + default IdentitySourceSyncHistoryListResult entityConvertToIdentitySourceSyncHistoryListResult(IdentitySourceSyncHistoryEntity entity) { + if (entity == null) { + return null; + } + + IdentitySourceSyncHistoryListResult identitySourceSyncHistoryListResult = new IdentitySourceSyncHistoryListResult(); + + if (entity.getId() != null) { + identitySourceSyncHistoryListResult.setId(String.valueOf(entity.getId())); + } + identitySourceSyncHistoryListResult.setBatch(entity.getBatch()); + if (entity.getIdentitySourceId() != null) { + identitySourceSyncHistoryListResult + .setIdentitySourceId(String.valueOf(entity.getIdentitySourceId())); + } + if (entity.getCreatedCount() != null) { + identitySourceSyncHistoryListResult + .setCreatedCount(String.valueOf(entity.getCreatedCount())); + } + if (entity.getUpdatedCount() != null) { + identitySourceSyncHistoryListResult + .setUpdatedCount(String.valueOf(entity.getUpdatedCount())); + } + if (entity.getSkippedCount() != null) { + identitySourceSyncHistoryListResult + .setSkippedCount(String.valueOf(entity.getSkippedCount())); + } + if (entity.getDeletedCount() != null) { + identitySourceSyncHistoryListResult + .setDeletedCount(String.valueOf(entity.getDeletedCount())); + } + identitySourceSyncHistoryListResult.setStartTime(entity.getStartTime()); + identitySourceSyncHistoryListResult.setEndTime(entity.getEndTime()); + identitySourceSyncHistoryListResult.setObjectType(entity.getObjectType()); + identitySourceSyncHistoryListResult.setTriggerType(entity.getTriggerType()); + if (entity.getStatus() != null) { + identitySourceSyncHistoryListResult.setStatus(entity.getStatus().getCode()); + } + if (entity.getEndTime() != null) { + identitySourceSyncHistoryListResult.setSpendTime(String + .valueOf( + entity.getEndTime().toInstant(java.time.ZoneOffset.of("+8")).getEpochSecond() + - entity.getStartTime().toInstant(java.time.ZoneOffset.of("+8")) + .getEpochSecond())); + } + return identitySourceSyncHistoryListResult; + } + + /** + * 查询身份源同步详情列表参数转换为 Querydsl Predicate + * + * @param query {@link IdentitySourceSyncRecordListQuery} query + * @return {@link Predicate} + */ + default Predicate queryIdentitySourceSyncRecordListQueryConvertToPredicate(IdentitySourceSyncRecordListQuery query) { + QIdentitySourceSyncRecordEntity entity = QIdentitySourceSyncRecordEntity.identitySourceSyncRecordEntity; + Predicate predicate = entity.isNotNull(); + //查询条件 + //@formatter:off + predicate = StringUtils.isBlank(query.getSyncHistoryId()) ? predicate : ExpressionUtils.and(predicate, entity.syncHistoryId.eq(Long.valueOf(query.getSyncHistoryId()))); + predicate = Objects.isNull(query.getObjectType()) ? predicate : ExpressionUtils.and(predicate, entity.objectType.eq(query.getObjectType())); + predicate = Objects.isNull(query.getActionType()) ? predicate : ExpressionUtils.and(predicate, entity.actionType.eq(query.getActionType())); + predicate = Objects.isNull(query.getStatus()) ? predicate : ExpressionUtils.and(predicate, entity.status.eq(query.getStatus())); + //@formatter:on + return predicate; + } + + /** + * 身份源同步详情转换为身份源详情分页结果 + * + * @param page {@link Page} + * @return {@link Page} + */ + default Page entityConvertToIdentitySourceSyncRecordListResult(org.springframework.data.domain.Page page) { + Page result = new Page<>(); + if (!CollectionUtils.isEmpty(page.getContent())) { + List list = new ArrayList<>(); + for (IdentitySourceSyncRecordEntity entity : page.getContent()) { + list.add(entityConvertToIdentitySourceSyncRecordListResult(entity)); + } + //@formatter:off + result.setPagination(Page.Pagination.builder() + .total(page.getTotalElements()) + .totalPages(page.getTotalPages()) + .current(page.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + result.setList(list); + } + return result; + } + + /** + * 身份源同步详情实体转换为身份源同步详情分页结果 + * + * @param page {@link UserGroupEntity} + * @return {@link UserGroupListResult} + */ + @Mapping(target = "status", source = "status.code") + IdentitySourceSyncRecordListResult entityConvertToIdentitySourceSyncRecordListResult(IdentitySourceSyncRecordEntity page); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/package-info.java new file mode 100644 index 00000000..ad486b61 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/package-info.java @@ -0,0 +1,22 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/8/16 20:12 + */ +package cn.topiam.employee.console.converter; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/AdministratorConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/AdministratorConverter.java new file mode 100644 index 00000000..9a547de8 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/AdministratorConverter.java @@ -0,0 +1,150 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.setting; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.util.CollectionUtils; + +import com.querydsl.core.types.ExpressionUtils; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.common.entity.account.query.UserListQuery; +import cn.topiam.employee.common.entity.setting.AdministratorEntity; +import cn.topiam.employee.common.entity.setting.QAdministratorEntity; +import cn.topiam.employee.console.pojo.query.setting.AdministratorListQuery; +import cn.topiam.employee.console.pojo.result.setting.AdministratorListResult; +import cn.topiam.employee.console.pojo.result.setting.AdministratorResult; +import cn.topiam.employee.console.pojo.save.setting.AdministratorCreateParam; +import cn.topiam.employee.console.pojo.update.setting.AdministratorUpdateParam; +import cn.topiam.employee.support.repository.page.domain.Page; + +/** + * 管理员映射 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/14 22:45 + */ +@Mapper(componentModel = "spring") +public interface AdministratorConverter { + + /** + * 管理员实体转换为管理员分页结果 + * + * @param page {@link Page} + * @return {@link Page} + */ + default Page entityConvertToAdministratorPaginationResult(org.springframework.data.domain.Page page) { + Page result = new Page<>(); + if (!CollectionUtils.isEmpty(page.getContent())) { + List list = new ArrayList<>(); + for (AdministratorEntity user : page.getContent()) { + list.add(entityConvertToAdministratorPaginationResult(user)); + } + //@formatter:off + result.setPagination(Page.Pagination.builder() + .total(page.getTotalElements()) + .totalPages(page.getTotalPages()) + .current(page.getPageable().getPageNumber() + 1) + .build()); + //@formatter:on + result.setList(list); + } + return result; + } + + /** + * 管理员实体转换为管理员分页结果 + * + * @param page {@link AdministratorEntity} + * @return {@link AdministratorListResult} + */ + @Mapping(target = "status", source = "status.code") + @Mapping(target = "emailVerified", source = "emailVerified", defaultValue = "false") + @Mapping(target = "authTotal", source = "authTotal", defaultValue = "0L") + AdministratorListResult entityConvertToAdministratorPaginationResult(AdministratorEntity page); + + /** + * 管理员创建参数转换为管理员实体 + * + * @param param {@link AdministratorCreateParam} + * @return {@link AdministratorEntity} + */ + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "status", expression = "java(cn.topiam.employee.common.enums.UserStatus.ENABLE)") + @Mapping(target = "lastAuthTime", ignore = true) + @Mapping(target = "lastAuthIp", ignore = true) + @Mapping(target = "id", ignore = true) + @Mapping(target = "expand", ignore = true) + @Mapping(target = "emailVerified", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + @Mapping(target = "authTotal", ignore = true) + AdministratorEntity administratorCreateParamConvertToEntity(AdministratorCreateParam param); + + /** + * 管理员更新参数转换为管理员实体类 + * + * @param param {@link AdministratorUpdateParam} 更新参数 + * @return {@link AdministratorEntity} 管理员实体 + */ + @Mapping(target = "username", ignore = true) + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "status", ignore = true) + @Mapping(target = "password", ignore = true) + @Mapping(target = "lastAuthTime", ignore = true) + @Mapping(target = "lastAuthIp", ignore = true) + @Mapping(target = "expand", ignore = true) + @Mapping(target = "emailVerified", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + @Mapping(target = "authTotal", ignore = true) + AdministratorEntity administratorUpdateParamConvertToEntity(AdministratorUpdateParam param); + + /** + * 实体转为管理员详情返回 + * + * @param user {@link AdministratorEntity} + * @return {@link AdministratorResult} 管理员详情 + */ + @Mapping(target = "status", source = "status.code") + AdministratorResult entityConvertToAdministratorDetailsResult(AdministratorEntity user); + + /** + * 查询管理员列表参数转换为 Querydsl Predicate + * + * @param query {@link UserListQuery} query + * @return {@link Predicate} + */ + default Predicate queryAdministratorListParamConvertToPredicate(AdministratorListQuery query) { + QAdministratorEntity user = QAdministratorEntity.administratorEntity; + Predicate predicate = user.isNotNull(); + //查询条件 + //@formatter:off + predicate = StringUtils.isBlank(query.getUsername()) ? predicate : ExpressionUtils.and(predicate, user.username.eq(query.getUsername())); + //@formatter:on + return predicate; + } + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/GeoLocationSettingConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/GeoLocationSettingConverter.java new file mode 100644 index 00000000..cf289f3a --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/GeoLocationSettingConverter.java @@ -0,0 +1,119 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.setting; + +import java.util.Objects; + +import javax.validation.ValidationException; + +import org.mapstruct.Mapper; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import cn.topiam.employee.common.entity.setting.SettingEntity; +import cn.topiam.employee.common.geo.GeoLocationProviderConfig; +import cn.topiam.employee.common.geo.maxmind.MaxmindProviderConfig; +import cn.topiam.employee.common.geo.maxmind.enums.GeoLocationProvider; +import cn.topiam.employee.console.pojo.result.setting.EmailProviderConfigResult; +import cn.topiam.employee.console.pojo.result.setting.GeoIpProviderResult; +import cn.topiam.employee.console.pojo.save.setting.GeoIpProviderSaveParam; +import cn.topiam.employee.console.pojo.save.setting.MailProviderSaveParam; +import cn.topiam.employee.support.validation.ValidationHelp; +import static cn.topiam.employee.core.setting.constant.GeoIpProviderConstants.IPADDRESS_SETTING_NAME; + +/** + * 地理位置设置转换器 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 23:18 + */ +@Mapper(componentModel = "spring") +public interface GeoLocationSettingConverter { + /** + * 地理位置配置转实体类 + * + * @param param {@link MailProviderSaveParam} + * @return {@link SettingEntity} + */ + default SettingEntity geoLocationProviderConfigToEntity(GeoIpProviderSaveParam param) { + ObjectMapper objectMapper = new ObjectMapper(); + // 指定序列化输入的类型 + objectMapper.activateDefaultTyping(objectMapper.getPolymorphicTypeValidator(), + ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY); + try { + SettingEntity entity = new SettingEntity(); + entity.setName(IPADDRESS_SETTING_NAME); + String desc = null; + ValidationHelp.ValidationResult validationResult = null; + //@formatter:off + //根据提供商封装参数 + if (GeoLocationProvider.MAXMIND.equals(param.getProvider())) { + desc = GeoLocationProvider.MAXMIND.getName(); + MaxmindProviderConfig maxmindProviderConfig = param.getConfig().to(MaxmindProviderConfig.class); + validationResult = ValidationHelp.validateEntity(maxmindProviderConfig); + entity.setValue(objectMapper.writeValueAsString(new GeoLocationProviderConfig(param.getProvider(), maxmindProviderConfig))); + } + // 验证 + if (Objects.requireNonNull(validationResult).isHasErrors()) { + throw new ValidationException(validationResult.getMessage()); + } + entity.setDesc(desc); + //@formatter:no + return entity; + }catch (JsonProcessingException e){ + throw new RuntimeException(e); + } + } + + /** + * 实体转地理位置提供商配置 + * + * @param entity {@link SettingEntity} + * @return {@link EmailProviderConfigResult} + */ + default GeoIpProviderResult entityToGeoLocationProviderConfig(SettingEntity entity) { + //没有数据,默认未启用 + if (Objects.isNull(entity)) { + return null; + } + try { + String value = entity.getValue(); + ObjectMapper objectMapper = new ObjectMapper(); + // 指定序列化输入的类型 + objectMapper.activateDefaultTyping(objectMapper.getPolymorphicTypeValidator(), + ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY); + // 根据提供商序列化 + GeoLocationProviderConfig setting = objectMapper.readValue(value, GeoLocationProviderConfig.class); + if (GeoLocationProvider.MAXMIND.equals(setting.getProvider())) { + MaxmindProviderConfig config = (MaxmindProviderConfig) setting.getConfig(); + //@formatter:off + return GeoIpProviderResult.builder() + .provider(setting.getProvider()) + .config(config) + .enabled(true) + .build(); + } + //@formatter:on + return null; + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/MailTemplateConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/MailTemplateConverter.java new file mode 100644 index 00000000..c7c44f2e --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/MailTemplateConverter.java @@ -0,0 +1,118 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.setting; + +import java.util.ArrayList; +import java.util.List; + +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +import cn.topiam.employee.common.entity.setting.MailTemplateEntity; +import cn.topiam.employee.common.enums.MailType; +import cn.topiam.employee.console.pojo.result.setting.EmailTemplateListResult; +import cn.topiam.employee.console.pojo.result.setting.EmailTemplateResult; +import cn.topiam.employee.console.pojo.save.setting.EmailCustomTemplateSaveParam; +import static org.springframework.web.util.HtmlUtils.htmlUnescape; + +import static cn.topiam.employee.core.message.mail.MailUtils.readEmailContent; + +/** + * 消息服务数据映射 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/17 23:12 + */ +@Mapper(componentModel = "spring") +public interface MailTemplateConverter { + /** + * 实体转为电子邮件模板配置返回 + * + * @param template {@link MailTemplateEntity} + * @return {@link EmailTemplateResult} + */ + @Mapping(target = "custom", expression = "java(java.lang.Boolean.TRUE)") + @Mapping(target = "desc", expression = "java(template.getType().getDesc())") + @Mapping(target = "name", expression = "java(template.getType().getName())") + @Mapping(target = "content", expression = "java(org.springframework.web.util.HtmlUtils.htmlUnescape(template.getContent()))") + EmailTemplateResult entityConvertToEmailTemplateDetailResult(MailTemplateEntity template); + + /** + * 电子邮件模板配置更新参数转换为 entity + * + * @param param {@link EmailCustomTemplateSaveParam} + * @return {@link MailTemplateEntity} + */ + @Mapping(target = "updateTime", ignore = true) + @Mapping(target = "updateBy", ignore = true) + @Mapping(target = "type", ignore = true) + @Mapping(target = "remark", ignore = true) + @Mapping(target = "id", ignore = true) + @Mapping(target = "createTime", ignore = true) + @Mapping(target = "createBy", ignore = true) + @Mapping(target = "content", expression = "java(org.springframework.web.util.HtmlUtils.htmlEscape(param.getContent()))") + MailTemplateEntity emailTemplateConfigSaveParamConvertToEntity(EmailCustomTemplateSaveParam param); + + /** + * 枚举列表转邮件模板类型列表 + * + * @param values {@link List>} + * @param entities {@link List>} + * @return {@link List>} + */ + default List mailTemplateTypeConvertToEmailTemplateListResult(List values, + List entities) { + List results = new ArrayList<>(); + //处理枚举 + for (MailType value : values) { + EmailTemplateListResult cipher = new EmailTemplateListResult(); + cipher.setCode(value.getCode()); + cipher.setName(value.getName()); + cipher.setDescription(value.getDesc()); + cipher.setContent(value.getContent()); + cipher.setContent(htmlUnescape(readEmailContent(value.getContent()))); + results.add(cipher); + } + // 数据库有,为自定义 + for (EmailTemplateListResult result : results) { + for (MailTemplateEntity entity : entities) { + if (result.getCode().equals(entity.getType().getCode())) { + result.setCustom(true); + result.setContent(htmlUnescape(entity.getContent())); + } + } + } + return results; + } + + /** + * 邮件类型枚举转为邮件模板详情返回 + * + * @param templateType {@link MailType} + * @return {@link EmailTemplateResult} + */ + default EmailTemplateResult mailTemplateTypeConvertToEmailTemplateDetailResult(MailType templateType) { + EmailTemplateResult result = new EmailTemplateResult(); + result.setContent(htmlUnescape(readEmailContent(templateType.getContent()))); + result.setDesc(templateType.getDesc()); + result.setSender(templateType.getSender()); + result.setSubject(templateType.getSubject()); + result.setCustom(false); + return result; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/MessageSettingConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/MessageSettingConverter.java new file mode 100644 index 00000000..698fd8de --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/MessageSettingConverter.java @@ -0,0 +1,237 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.setting; + +import java.util.Objects; + +import javax.validation.ValidationException; + +import org.mapstruct.Mapper; + +import com.alibaba.fastjson2.JSONObject; +import com.alibaba.fastjson2.JSONWriter; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import cn.topiam.employee.common.entity.setting.SettingEntity; +import cn.topiam.employee.common.entity.setting.config.SmsConfig; +import cn.topiam.employee.common.enums.MessageNoticeChannel; +import cn.topiam.employee.common.message.enums.MailProvider; +import cn.topiam.employee.common.message.enums.MailSafetyType; +import cn.topiam.employee.common.message.enums.SmsProvider; +import cn.topiam.employee.common.message.mail.MailProviderConfig; +import cn.topiam.employee.common.message.sms.SmsProviderConfig; +import cn.topiam.employee.common.message.sms.aliyun.AliyunSmsProviderConfig; +import cn.topiam.employee.common.message.sms.qiniu.QiNiuSmsProviderConfig; +import cn.topiam.employee.common.message.sms.tencent.TencentSmsProviderConfig; +import cn.topiam.employee.console.pojo.result.setting.EmailProviderConfigResult; +import cn.topiam.employee.console.pojo.save.setting.MailProviderSaveParam; +import cn.topiam.employee.console.pojo.save.setting.SmsProviderSaveParam; +import cn.topiam.employee.console.pojo.setting.SmsProviderConfigResult; +import cn.topiam.employee.support.util.AesUtils; +import cn.topiam.employee.support.validation.ValidationHelp; +import static cn.topiam.employee.core.context.SettingContextHelp.getSmsProviderConfig; +import static cn.topiam.employee.core.setting.constant.MessageSettingConstants.MESSAGE_PROVIDER_EMAIL; +import static cn.topiam.employee.core.setting.constant.MessageSettingConstants.MESSAGE_SMS_PROVIDER; + +/** + * 消息设置转换器 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 23:18 + */ +@Mapper(componentModel = "spring") +public interface MessageSettingConverter { + /** + * 邮件提供商配置转实体类 + * + * @param param {@link MailProviderSaveParam} + * @return {@link SettingEntity} + */ + default SettingEntity mailProviderConfigToEntity(MailProviderSaveParam param) { + SettingEntity entity = new SettingEntity(); + entity.setName(MESSAGE_PROVIDER_EMAIL); + String desc = MessageNoticeChannel.MAIL.getDesc(); + ValidationHelp.ValidationResult validationResult = null; + //@formatter:off + MailProviderConfig.MailProviderConfigBuilder builder = + MailProviderConfig.builder() + .username(param.getUsername()) + .secret(AesUtils.encrypt(param.getSecret())); + //根据提供商封装参数 + if (MailProvider.CUSTOMIZE.equals(param.getProvider())) { + desc = desc + MailProvider.CUSTOMIZE.getName(); + builder + .provider(MailProvider.CUSTOMIZE) + .smtpUrl(param.getSmtpUrl()) + .port(param.getPort()) + .safetyType(param.getSafetyType()); + validationResult = ValidationHelp.validateEntity(builder.build()); + } + //阿里云 + if (MailProvider.ALIYUN.equals(param.getProvider())) { + desc = desc + MailProvider.ALIYUN.getName(); + builder + .provider(MailProvider.ALIYUN) + .smtpUrl(MailProvider.ALIYUN.getSmtpUrl()) + .port(MailProvider.ALIYUN.getSslPort()) + .safetyType(MailSafetyType.SSL); + validationResult = ValidationHelp.validateEntity(builder.build()); + } + //腾讯 + if (MailProvider.TENCENT.equals(param.getProvider())) { + desc = desc + MailProvider.TENCENT.getName(); + builder + .provider(MailProvider.TENCENT) + .smtpUrl(MailProvider.TENCENT.getSmtpUrl()) + .port(MailProvider.TENCENT.getSslPort()) + .safetyType(MailSafetyType.SSL); + validationResult = ValidationHelp.validateEntity(builder.build()); + } + //网易 + if (MailProvider.NETEASE.equals(param.getProvider())) { + desc = desc + MailProvider.NETEASE.getName(); + builder + .provider(MailProvider.NETEASE) + .smtpUrl(MailProvider.NETEASE.getSmtpUrl()) + .port(MailProvider.NETEASE.getSslPort()) + .safetyType(MailSafetyType.SSL); + validationResult = ValidationHelp.validateEntity(builder.build()); + } + // 验证 + if (Objects.requireNonNull(validationResult).isHasErrors()) { + throw new ValidationException(validationResult.getMessage()); + } + entity.setValue(JSONObject.toJSONString(builder.build(), JSONWriter.Feature.WriteClassName)); + entity.setDesc(desc); + //@formatter:no + return entity; + } + + /** + * 短信提供商配置转实体类 + * + * @param param {@link SmsProviderSaveParam} + * @return {@link SettingEntity} + */ + default SettingEntity smsProviderConfigToEntity(SmsProviderSaveParam param) { + ValidationHelp.ValidationResult validationResult = null; + String desc = MessageNoticeChannel.SMS.getDesc(); + SmsProviderConfig providerConfig = new SmsProviderConfig(); + ObjectMapper objectMapper = new ObjectMapper(); + try { + // 七牛云 + if (SmsProvider.QINIU.equals(param.getProvider())) { + QiNiuSmsProviderConfig smsConfig = objectMapper.readValue(param.getConfig().toJSONString(), QiNiuSmsProviderConfig.class); + validationResult = ValidationHelp.validateEntity(smsConfig); + smsConfig.setSecretKey(AesUtils.encrypt(smsConfig.getSecretKey())); + providerConfig = smsConfig; + desc = desc + SmsProvider.QINIU.getDesc(); + } + // 阿里云 + else if (SmsProvider.ALIYUN.equals(param.getProvider())) { + AliyunSmsProviderConfig smsConfig = objectMapper.readValue(param.getConfig().toJSONString(), AliyunSmsProviderConfig.class); + validationResult = ValidationHelp.validateEntity(smsConfig); + smsConfig.setAccessKeySecret(AesUtils.encrypt(smsConfig.getAccessKeySecret())); + providerConfig = smsConfig; + desc = desc + SmsProvider.ALIYUN.getDesc(); + } + // 腾讯云 + else if (SmsProvider.TENCENT.equals(param.getProvider())) { + TencentSmsProviderConfig smsConfig = objectMapper.readValue(param.getConfig().toJSONString(), TencentSmsProviderConfig.class); + validationResult = ValidationHelp.validateEntity(smsConfig); + smsConfig.setSecretKey(AesUtils.encrypt(smsConfig.getSecretKey())); + providerConfig = smsConfig; + desc = desc + SmsProvider.TENCENT.getDesc(); + } + //判断并处理参数验证异常 + boolean hasErrors = Objects.requireNonNull(validationResult).isHasErrors(); + if (hasErrors) { + throw new ValidationException(validationResult.getMessage()); + } + //封装 + SmsConfig smsConfig=new SmsConfig(); + smsConfig.setConfig(providerConfig); + smsConfig.setProvider(param.getProvider()); + smsConfig.setLanguage(param.getLanguage()); + smsConfig.setTemplates(param.getTemplates()); + //保存 + SettingEntity entity = new SettingEntity(); + entity.setName(MESSAGE_SMS_PROVIDER); + // 指定序列化输入的类型(这里不要移动到上面,只有序列化时才使用) + String value = objectMapper.activateDefaultTyping(objectMapper.getPolymorphicTypeValidator(), + ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY).writeValueAsString(smsConfig); + entity.setValue(value); + entity.setDesc(desc); + return entity; + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + /** + * 实体转邮件提供商配置 + * + * @param entity {@link SettingEntity} + * @return {@link EmailProviderConfigResult} + */ + default EmailProviderConfigResult entityToMailProviderConfig(SettingEntity entity) { + //没有数据,默认未启用 + if (Objects.isNull(entity)) { + return EmailProviderConfigResult.builder().enabled(false).build(); + } + String config = entity.getValue(); + // 根据提供商序列化 + MailProviderConfig setting = JSONObject.parseObject(config, MailProviderConfig.class); + //@formatter:off + return EmailProviderConfigResult.builder() + .provider(setting.getProvider()) + .port(setting.getPort()) + .safetyType(setting.getSafetyType()) + .username(setting.getUsername()) + .secret(AesUtils.decrypt(setting.getSecret())) + .smtpUrl(setting.getSmtpUrl()) + .enabled(true) + .build(); + //@formatter:on + } + + /** + * 实体转短信提供商配置 + * + * @param entity {@link SettingEntity} + * @return {@link SmsProviderConfigResult} + */ + default SmsProviderConfigResult entityToSmsProviderConfig(SettingEntity entity) { + if (Objects.isNull(entity)) { + return SmsProviderConfigResult.builder().enabled(false).build(); + } + SmsConfig config = getSmsProviderConfig(); + //@formatter:off + SmsProviderConfigResult.SmsProviderConfigResultBuilder builder = SmsProviderConfigResult.builder() + .enabled(true) + .language(config.getLanguage().getLocale()) + .templates(config.getTemplates()) + .provider(config.getProvider()) + .config(config.getConfig()); + //@formatter:on + return builder.build(); + } + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/PasswordPolicyConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/PasswordPolicyConverter.java new file mode 100644 index 00000000..a81a1ade --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/PasswordPolicyConverter.java @@ -0,0 +1,219 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.setting; + +import java.util.*; +import java.util.stream.Collectors; + +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.mapstruct.Mapper; + +import cn.topiam.employee.common.entity.setting.SettingEntity; +import cn.topiam.employee.console.pojo.result.setting.PasswordPolicyConfigResult; +import cn.topiam.employee.console.pojo.save.setting.PasswordPolicySaveParam; +import cn.topiam.employee.core.security.password.enums.PasswordComplexityRule; +import static cn.topiam.employee.core.setting.constant.PasswordPolicySettingConstants.*; + +/** + * 密码规则数据转换 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/20 21:12 + */ +@Mapper(componentModel = "spring") +public interface PasswordPolicyConverter { + + /** + * 密码规则更新参数、转为实体类 + * + * @param param {@link PasswordPolicySaveParam} + * @return {@link List} + */ + default List passwordPolicySaveParamConvertToEntity(PasswordPolicySaveParam param) { + List list = new ArrayList<>(); + //最大长度 + if (ObjectUtils.isNotEmpty(param.getPasswordBiggestLength()) && !StringUtils.equals( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_BIGGEST_LENGTH), + Integer.toString(param.getPasswordBiggestLength()))) { + list.add(new SettingEntity().setName(PASSWORD_POLICY_BIGGEST_LENGTH) + .setValue(Integer.toString(param.getPasswordBiggestLength()))); + } + //最小长度 + if (ObjectUtils.isNotEmpty(param.getPasswordLeastLength()) && !StringUtils.equals( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_LEAST_LENGTH), + Integer.toString(param.getPasswordLeastLength()))) { + list.add(new SettingEntity().setName(PASSWORD_POLICY_LEAST_LENGTH) + .setValue(String.valueOf(param.getPasswordLeastLength()))); + } + //密码复杂度 + if (ObjectUtils.isNotEmpty(param.getPasswordComplexity()) + && !StringUtils.equals(PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_COMPLEXITY), + param.getPasswordComplexity().getCode())) { + list.add(new SettingEntity().setName(PASSWORD_POLICY_COMPLEXITY) + .setValue(param.getPasswordComplexity().getCode())); + } + //弱密码检查 + if (ObjectUtils.isNotEmpty(param.getWeakPasswordCheck()) && !StringUtils.equals( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_WEAK_PASSWORD_CHECK), + param.getWeakPasswordCheck().toString().toLowerCase())) { + list.add(new SettingEntity().setName(PASSWORD_POLICY_WEAK_PASSWORD_CHECK) + .setValue(String.valueOf(param.getWeakPasswordCheck()))); + } + //账户信息检查 + if (ObjectUtils.isNotEmpty(param.getIncludeAccountCheck()) && !StringUtils.equals( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_ACCOUNT_CHECK), + param.getIncludeAccountCheck().toString().toLowerCase())) { + list.add(new SettingEntity().setName(PASSWORD_POLICY_ACCOUNT_CHECK) + .setValue(String.valueOf(param.getIncludeAccountCheck()))); + } + //不能多少个以上相同字符 + if (ObjectUtils.isNotEmpty(param.getNotSameChars()) && !StringUtils.equals( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_NOT_SAME_CHARS), + param.getNotSameChars().toString())) { + list.add(new SettingEntity().setName(PASSWORD_POLICY_NOT_SAME_CHARS) + .setValue(String.valueOf(param.getNotSameChars()))); + } + //历史密码检查 + if (ObjectUtils.isNotEmpty(param.getHistoryPasswordCheck()) && !StringUtils.equals( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_HISTORY_PASSWORD_CHECK), + param.getHistoryPasswordCheck().toString())) { + list.add(new SettingEntity().setName(PASSWORD_POLICY_HISTORY_PASSWORD_CHECK) + .setValue(String.valueOf(param.getHistoryPasswordCheck()))); + } + //密码检查次数 + if (ObjectUtils.isNotEmpty(param.getHistoryPasswordCheckCount()) && !StringUtils.equals( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_HISTORY_PASSWORD_CHECK_COUNT), + param.getHistoryPasswordCheckCount().toString())) { + list.add(new SettingEntity().setName(PASSWORD_POLICY_HISTORY_PASSWORD_CHECK_COUNT) + .setValue(String.valueOf(param.getHistoryPasswordCheckCount()))); + } + //非法序列检查 + if (ObjectUtils.isNotEmpty(param.getIllegalSequenceCheck()) && !StringUtils.equals( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_ILLEGAL_SEQUENCE_CHECK), + param.getIllegalSequenceCheck().toString())) { + list.add(new SettingEntity().setName(PASSWORD_POLICY_ILLEGAL_SEQUENCE_CHECK) + .setValue(String.valueOf(param.getIllegalSequenceCheck()))); + } + //密码过期天数 + if (ObjectUtils.isNotEmpty(param.getPasswordValidDays()) + && !StringUtils.equals(PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_VALID_DAYS), + param.getPasswordValidDays().toString())) { + list.add(new SettingEntity().setName(PASSWORD_POLICY_VALID_DAYS) + .setValue(String.valueOf(param.getPasswordValidDays()))); + } + //密码过期提醒时间 + if (ObjectUtils.isNotEmpty(param.getPasswordValidWarnBeforeDays()) && !StringUtils.equals( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_VALID_WARN_BEFORE_DAYS), + param.getPasswordValidWarnBeforeDays().toString())) { + list.add(new SettingEntity().setName(PASSWORD_POLICY_VALID_WARN_BEFORE_DAYS) + .setValue(String.valueOf(param.getPasswordValidWarnBeforeDays()))); + } + //弱密码库 + if (StringUtils.isNotBlank(param.getCustomWeakPassword())) { + Set customWeakPasswords = new HashSet<>( + Arrays.stream(param.getCustomWeakPassword().split("\n")).toList()); + list.add(new SettingEntity().setName(PASSWORD_POLICY_CUSTOM_WEAK_PASSWORD) + .setValue(StringUtils.join(customWeakPasswords.toArray(), ","))); + } + return list; + } + + /** + * 实体转换为密码策略配置结果 + * + * @param list {@link List} + * @return {@link PasswordPolicyConfigResult} + */ + default PasswordPolicyConfigResult entityConvertToPasswordPolicyConfigResult(List list) { + Map map = list.stream().collect(Collectors.toMap(SettingEntity::getName, + SettingEntity::getValue, (key1, key2) -> key2)); + PasswordPolicyConfigResult result = new PasswordPolicyConfigResult(); + //最大长度 + result.setPasswordBiggestLength(map.containsKey(PASSWORD_POLICY_BIGGEST_LENGTH) + ? Integer.valueOf(map.get(PASSWORD_POLICY_BIGGEST_LENGTH)) + : Integer + .valueOf(PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_BIGGEST_LENGTH))); + + //最小长度 + result.setPasswordLeastLength(map.containsKey(PASSWORD_POLICY_LEAST_LENGTH) + ? Integer.valueOf(map.get(PASSWORD_POLICY_LEAST_LENGTH)) + : Integer.valueOf(PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_LEAST_LENGTH))); + + //密码复杂度 + result.setPasswordComplexity(map.containsKey(PASSWORD_POLICY_COMPLEXITY) + ? PasswordComplexityRule.getType(map.get(PASSWORD_POLICY_COMPLEXITY)) + : PasswordComplexityRule + .getType(PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_COMPLEXITY))); + + //弱密检查 + result.setWeakPasswordCheck(map.containsKey(PASSWORD_POLICY_WEAK_PASSWORD_CHECK) + ? Boolean.valueOf(map.get(PASSWORD_POLICY_WEAK_PASSWORD_CHECK)) + : Boolean.valueOf( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_WEAK_PASSWORD_CHECK))); + + //弱密码库 + result.setCustomWeakPassword(map.containsKey(PASSWORD_POLICY_CUSTOM_WEAK_PASSWORD) + ? StringUtils.join(map.get(PASSWORD_POLICY_CUSTOM_WEAK_PASSWORD).split(","), "\n") + : String.valueOf( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_CUSTOM_WEAK_PASSWORD))); + + //账户信息检查 + result.setIncludeAccountCheck(map.containsKey(PASSWORD_POLICY_ACCOUNT_CHECK) + ? Boolean.valueOf(map.get(PASSWORD_POLICY_ACCOUNT_CHECK)) + : Boolean.valueOf(PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_ACCOUNT_CHECK))); + + //密码不能多少个以上相同字符 + result.setNotSameChars(map.containsKey(PASSWORD_POLICY_NOT_SAME_CHARS) + ? Integer.valueOf(map.get(PASSWORD_POLICY_NOT_SAME_CHARS)) + : Integer + .valueOf(PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_NOT_SAME_CHARS))); + + //历史密码检查 + result.setHistoryPasswordCheck(map.containsKey(PASSWORD_POLICY_HISTORY_PASSWORD_CHECK) + ? Boolean.valueOf(map.get(PASSWORD_POLICY_HISTORY_PASSWORD_CHECK)) + : Boolean.valueOf( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_HISTORY_PASSWORD_CHECK))); + + //历史密码检查次数 + result.setHistoryPasswordCheckCount( + map.containsKey(PASSWORD_POLICY_HISTORY_PASSWORD_CHECK_COUNT) + ? Integer.valueOf(map.get(PASSWORD_POLICY_HISTORY_PASSWORD_CHECK_COUNT)) + : Integer.valueOf(PASSWORD_POLICY_DEFAULT_SETTINGS + .get(PASSWORD_POLICY_HISTORY_PASSWORD_CHECK_COUNT))); + + //非法序列检查 + result.setIllegalSequenceCheck(map.containsKey(PASSWORD_POLICY_ILLEGAL_SEQUENCE_CHECK) + ? Boolean.valueOf(map.get(PASSWORD_POLICY_ILLEGAL_SEQUENCE_CHECK)) + : Boolean.valueOf( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_ILLEGAL_SEQUENCE_CHECK))); + + //密码过期天数 + result.setPasswordValidDays(map.containsKey(PASSWORD_POLICY_VALID_DAYS) + ? Integer.valueOf(map.get(PASSWORD_POLICY_VALID_DAYS)) + : Integer.valueOf(PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_VALID_DAYS))); + + //密码过期提醒时间 + result + .setPasswordValidWarnBeforeDays(map.containsKey(PASSWORD_POLICY_VALID_WARN_BEFORE_DAYS) + ? Integer.valueOf(map.get(PASSWORD_POLICY_VALID_WARN_BEFORE_DAYS)) + : Integer.valueOf( + PASSWORD_POLICY_DEFAULT_SETTINGS.get(PASSWORD_POLICY_VALID_WARN_BEFORE_DAYS))); + return result; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/SecuritySettingConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/SecuritySettingConverter.java new file mode 100644 index 00000000..34ce07a9 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/SecuritySettingConverter.java @@ -0,0 +1,238 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.setting; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + +import javax.validation.ValidationException; + +import org.apache.commons.lang3.ObjectUtils; +import org.mapstruct.Mapper; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import cn.topiam.employee.common.entity.setting.SettingEntity; +import cn.topiam.employee.common.enums.CaptchaProviderType; +import cn.topiam.employee.common.enums.MfaFactor; +import cn.topiam.employee.common.enums.MfaMode; +import cn.topiam.employee.console.pojo.result.setting.SecurityBasicConfigResult; +import cn.topiam.employee.console.pojo.result.setting.SecurityCaptchaConfigResult; +import cn.topiam.employee.console.pojo.result.setting.SecurityMfaConfigResult; +import cn.topiam.employee.console.pojo.save.setting.SecurityBasicSaveParam; +import cn.topiam.employee.console.pojo.save.setting.SecurityCaptchaSaveParam; +import cn.topiam.employee.console.pojo.save.setting.SecurityMfaSaveParam; +import cn.topiam.employee.core.security.captcha.CaptchaProviderConfig; +import cn.topiam.employee.core.security.captcha.geetest.GeeTestCaptchaProviderConfig; +import cn.topiam.employee.support.validation.ValidationHelp; +import static cn.topiam.employee.core.setting.constant.MfaSettingConstants.*; +import static cn.topiam.employee.core.setting.constant.SecuritySettingConstants.*; + +import static liquibase.sqlgenerator.core.MarkChangeSetRanGenerator.COMMA; + +/** + * 安全设置数据转换器 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/10/4 19:00 + */ +@Mapper(componentModel = "spring") +public interface SecuritySettingConverter { + + /** + * 实体转换为安全性高级配置结果 + * + * @param list {@link List} + * @return {@link SecurityBasicConfigResult} + */ + default SecurityBasicConfigResult entityConvertToSecurityBasicConfigResult(List list) { + //@formatter:off + SecurityBasicConfigResult result = new SecurityBasicConfigResult(); + //转MAP + Map map = list.stream().collect(Collectors.toMap(SettingEntity::getName, SettingEntity::getValue, (key1, key2) -> key2)); + //自动解锁时间 + result.setAutoUnlockTime(Integer.valueOf(map.containsKey(SECURITY_BASIC_AUTO_UNLOCK_TIME) ? map.get(SECURITY_BASIC_AUTO_UNLOCK_TIME) : SECURITY_BASIC_DEFAULT_SETTINGS.get(SECURITY_BASIC_AUTO_UNLOCK_TIME))); + //连续登录失败持续时间 + result.setLoginFailureDuration(Integer.valueOf(map.containsKey(SECURITY_BASIC_LOGIN_FAILURE_DURATION) ? map.get(SECURITY_BASIC_LOGIN_FAILURE_DURATION) : SECURITY_BASIC_DEFAULT_SETTINGS.get(SECURITY_BASIC_LOGIN_FAILURE_DURATION))); + //连续登录失败次数 + result.setLoginFailureCount(Integer.valueOf(map.containsKey(SECURITY_BASIC_LOGIN_FAILURE_COUNT) ? map.get(SECURITY_BASIC_LOGIN_FAILURE_COUNT) : SECURITY_BASIC_DEFAULT_SETTINGS.get(SECURITY_BASIC_LOGIN_FAILURE_COUNT))); + //会话有效时间 + result.setSessionValidTime(Integer.valueOf(map.containsKey(SECURITY_BASIC_SESSION_VALID_TIME) ? map.get(SECURITY_BASIC_SESSION_VALID_TIME) : SECURITY_BASIC_DEFAULT_SETTINGS.get(SECURITY_BASIC_SESSION_VALID_TIME))); + //短信验证码有效时间 + result.setVerifyCodeValidTime(Integer.valueOf(map.containsKey(VERIFY_CODE_VALID_TIME) ? map.get(VERIFY_CODE_VALID_TIME) : SECURITY_BASIC_DEFAULT_SETTINGS.get(VERIFY_CODE_VALID_TIME))); + //记住我有效时间(秒) + result.setRememberMeValidTime(Integer.valueOf(map.containsKey(SECURITY_BASIC_REMEMBER_ME_VALID_TIME) ? map.get(SECURITY_BASIC_REMEMBER_ME_VALID_TIME) : SECURITY_BASIC_DEFAULT_SETTINGS.get(SECURITY_BASIC_REMEMBER_ME_VALID_TIME))); + //用户并发数 + result.setSessionMaximum(Integer.valueOf(map.containsKey(SECURITY_SESSION_MAXIMUM) ? map.get(SECURITY_SESSION_MAXIMUM) : SECURITY_BASIC_DEFAULT_SETTINGS.get(SECURITY_SESSION_MAXIMUM))); + //@formatter:on + return result; + } + + /** + * 安全高级保存参数转换为实体 + * + * @param param {@link SecurityBasicSaveParam} + * @return {@link List} + */ + default List securityBasicSaveParamConvertToEntity(SecurityBasicSaveParam param) { + //@formatter:off + List list = new ArrayList<>(); + //会话有效时间 + if (ObjectUtils.isNotEmpty(param.getSessionValidTime())) { + list.add(new SettingEntity().setName(SECURITY_BASIC_SESSION_VALID_TIME).setValue(String.valueOf(param.getSessionValidTime()))); + } + //记住我有效时间(秒) + if (ObjectUtils.isNotEmpty(param.getRememberMeValidTime())) { + list.add(new SettingEntity().setName(SECURITY_BASIC_REMEMBER_ME_VALID_TIME).setValue(String.valueOf(param.getRememberMeValidTime()))); + } + //连续登录失败持续时间 + if (ObjectUtils.isNotEmpty(param.getLoginFailureDuration())) { + list.add(new SettingEntity().setName(SECURITY_BASIC_LOGIN_FAILURE_DURATION).setValue(String.valueOf(param.getLoginFailureDuration()))); + } + //连续登录失败次数 + if (ObjectUtils.isNotEmpty(param.getLoginFailureCount())) { + list.add(new SettingEntity().setName(SECURITY_BASIC_LOGIN_FAILURE_COUNT).setValue(String.valueOf(param.getLoginFailureCount()))); + } + //自动解锁时间(分) + if (ObjectUtils.isNotEmpty(param.getAutoUnlockTime())) { + list.add(new SettingEntity().setName(SECURITY_BASIC_AUTO_UNLOCK_TIME).setValue(String.valueOf(param.getAutoUnlockTime()))); + } + //用户并发数 + if (ObjectUtils.isNotEmpty(param.getSessionMaximum())) { + list.add(new SettingEntity().setName(SECURITY_SESSION_MAXIMUM).setValue(String.valueOf(param.getSessionMaximum()))); + } + //短信验证码有效时间(秒) + if (ObjectUtils.isNotEmpty(param.getSmsCodeValidTime())) { + list.add(new SettingEntity().setName(VERIFY_CODE_VALID_TIME).setValue(String.valueOf(param.getSmsCodeValidTime()))); + } + //@formatter:on + return list; + } + + /** + * Security Mfa Save Param 转换为实体 + * + * @param param {@link SecurityMfaSaveParam} + * @return {@link List} + */ + default List securityMfaSaveParamConvertToEntity(SecurityMfaSaveParam param) { + List list = new ArrayList<>(); + list.add(new SettingEntity().setName(MFA_MODE).setValue(param.getMode().getCode())); + if (!param.getFactors().isEmpty()) { + list.add(new SettingEntity().setName(MFA_FACTOR).setValue(param.getFactors().stream() + .map(MfaFactor::getCode).collect(Collectors.joining(",")))); + } + return list; + } + + /** + * 实体转换为安全 Mfa 配置结果 + * + * @param list {@link List} + * @return {@link SecurityMfaConfigResult} + */ + default SecurityMfaConfigResult entityConvertToSecurityMfaConfigResult(List list) { + SecurityMfaConfigResult result = new SecurityMfaConfigResult(); + //转MAP + Map map = list.stream().collect(Collectors.toMap(SettingEntity::getName, + SettingEntity::getValue, (key1, key2) -> key2)); + String manner = map.containsKey(MFA_FACTOR) ? map.get(MFA_FACTOR) + : MFA_SETTING_DEFAULT_SETTINGS.get(MFA_FACTOR); + List manners = new ArrayList<>(); + for (String s : manner.split(COMMA)) { + MfaFactor type = MfaFactor.getType(s); + if (!Objects.isNull(type)) { + manners.add(type); + } + } + if (!manners.isEmpty()) { + result.setFactors(manners); + } + result.setMode(MfaMode.getType(map.containsKey(MFA_MODE) ? map.get(MFA_MODE) + : MFA_SETTING_DEFAULT_SETTINGS.get(MFA_MODE))); + return result; + } + + /** + * 安全验证码保存参数转换为实体 + * + * @param param {@link SecurityCaptchaSaveParam} + * @return {@link List} + */ + default List securityCaptchaSaveParamConvertToEntity(SecurityCaptchaSaveParam param) { + List list = new ArrayList<>(); + try { + //极速验证 + if (CaptchaProviderType.GEE_TEST.equals(param.getProvider())) { + ObjectMapper objectMapper = new ObjectMapper(); + GeeTestCaptchaProviderConfig config = objectMapper.readValue( + param.getConfig().toJSONString(), GeeTestCaptchaProviderConfig.class); + ValidationHelp.ValidationResult validationResult = ValidationHelp + .validateEntity(config); + if (validationResult.isHasErrors()) { + throw new ValidationException(validationResult.getMessage()); + } + SettingEntity entity = new SettingEntity(); + entity.setName(CAPTCHA_SETTING_NAME); + // 指定序列化输入的类型 + objectMapper.activateDefaultTyping(objectMapper.getPolymorphicTypeValidator(), + ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY); + entity.setValue(objectMapper.writeValueAsString(config)); + entity.setDesc("极速验证码配置"); + list.add(entity); + } + } + //JSON异常 + catch (JsonProcessingException e) { + throw new ValidationException(e); + } + return list; + } + + /** + * 实体转换为安全验证码配置结果 + * + * @param entity {@link SettingEntity} + * @return {@link SecurityCaptchaConfigResult} + */ + default SecurityCaptchaConfigResult entityConvertToSecurityCaptchaConfigResult(SettingEntity entity) { + if (Objects.isNull(entity)) { + return null; + } + SecurityCaptchaConfigResult result = new SecurityCaptchaConfigResult(); + ObjectMapper objectMapper = new ObjectMapper(); + // 指定序列化输入的类型 + objectMapper.activateDefaultTyping(objectMapper.getPolymorphicTypeValidator(), + ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY); + try { + CaptchaProviderConfig config = objectMapper.readValue(entity.getValue(), + CaptchaProviderConfig.class); + result.setConfig(config); + result.setEnabled(true); + result.setProvider(config.getProvider()); + return result; + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/StorageSettingConverter.java b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/StorageSettingConverter.java new file mode 100644 index 00000000..fbbae1e8 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/converter/setting/StorageSettingConverter.java @@ -0,0 +1,142 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.converter.setting; + +import java.util.Objects; + +import javax.validation.ValidationException; + +import org.mapstruct.Mapper; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import cn.topiam.employee.common.entity.setting.SettingEntity; +import cn.topiam.employee.common.storage.StorageConfig; +import cn.topiam.employee.common.storage.enums.StorageProvider; +import cn.topiam.employee.common.storage.impl.AliYunOssStorage; +import cn.topiam.employee.common.storage.impl.LocalStorage; +import cn.topiam.employee.common.storage.impl.MinIoStorage; +import cn.topiam.employee.common.storage.impl.QiNiuKodoStorage; +import cn.topiam.employee.console.pojo.result.setting.StorageProviderConfigResult; +import cn.topiam.employee.console.pojo.save.setting.StorageConfigSaveParam; +import cn.topiam.employee.support.validation.ValidationHelp; +import static cn.topiam.employee.core.setting.constant.StorageProviderSettingConstants.STORAGE_PROVIDER_KEY; + +/** + * 消息设置转换器 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 23:18 + */ +@Mapper(componentModel = "spring") +public interface StorageSettingConverter { + /** + * 存储提供商配置转实体类 + * + * @param param {@link StorageConfigSaveParam} + * @return {@link SettingEntity} + */ + default SettingEntity storageConfigSaveParamToEntity(StorageConfigSaveParam param) { + SettingEntity entity = new SettingEntity(); + StorageProvider provider = param.getProvider(); + ValidationHelp.ValidationResult validationResult = null; + StorageConfig.StorageConfigBuilder builder = StorageConfig.builder(); + builder.provider(provider); + ObjectMapper objectMapper = new ObjectMapper(); + try { + //阿里云 + if (provider.equals(StorageProvider.ALIYUN_OSS)) { + AliYunOssStorage.Config config = objectMapper + .readValue(param.getConfig().toJSONString(), AliYunOssStorage.Config.class); + builder.config(config); + validationResult = ValidationHelp.validateEntity(config); + } + //腾讯 + else if (provider.equals(StorageProvider.TENCENT_COS)) { + AliYunOssStorage.Config config = objectMapper + .readValue(param.getConfig().toJSONString(), AliYunOssStorage.Config.class); + builder.config(config); + validationResult = ValidationHelp.validateEntity(config); + } + //七牛 + else if (provider.equals(StorageProvider.QINIU_KODO)) { + QiNiuKodoStorage.Config config = objectMapper + .readValue(param.getConfig().toJSONString(), QiNiuKodoStorage.Config.class); + builder.config(config); + validationResult = ValidationHelp.validateEntity(config); + } + //MiNio + else if (provider.equals(StorageProvider.MINIO)) { + MinIoStorage.Config config = objectMapper + .readValue(param.getConfig().toJSONString(), MinIoStorage.Config.class); + builder.config(config); + validationResult = ValidationHelp.validateEntity(config); + } + //本机 + else if (provider.equals(StorageProvider.LOCAL)) { + LocalStorage.Config config = objectMapper + .readValue(param.getConfig().toJSONString(), LocalStorage.Config.class); + builder.config(config); + validationResult = ValidationHelp.validateEntity(config); + } + if (Objects.requireNonNull(validationResult).isHasErrors()) { + throw new ValidationException(validationResult.getMessage()); + } + entity.setName(STORAGE_PROVIDER_KEY); + // 指定序列化输入的类型 + objectMapper.activateDefaultTyping(objectMapper.getPolymorphicTypeValidator(), + ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY); + entity.setValue(objectMapper.writeValueAsString(builder.build())); + entity.setDesc(provider.getDesc()); + return entity; + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + /** + * 实体转存储提供商配置 + * + * @param entity {@link SettingEntity} + * @return {@link StorageProviderConfigResult} + */ + default StorageProviderConfigResult entityToStorageProviderConfig(SettingEntity entity) { + if (Objects.isNull(entity)) { + return StorageProviderConfigResult.builder().enabled(false).build(); + } + ObjectMapper objectMapper = new ObjectMapper(); + // 指定序列化输入的类型 + objectMapper.activateDefaultTyping(objectMapper.getPolymorphicTypeValidator(), + ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY); + try { + String value = entity.getValue(); + StorageConfig storageConfig = objectMapper.readValue(value, StorageConfig.class); + // 开启配置、并没有配置 + //@formatter:off + return StorageProviderConfigResult.builder() + .provider(storageConfig.getProvider()) + .enabled(true) + .config(storageConfig).build(); + //@formatter:on + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/listener/ConsoleAdminPasswordInitializeListener.java b/eiam-console/src/main/java/cn/topiam/employee/console/listener/ConsoleAdminPasswordInitializeListener.java new file mode 100644 index 00000000..4024e336 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/listener/ConsoleAdminPasswordInitializeListener.java @@ -0,0 +1,167 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.listener; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.util.Locale; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + +import org.redisson.api.RLock; +import org.redisson.api.RedissonClient; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.SpringApplication; +import org.springframework.context.ApplicationListener; +import org.springframework.context.event.ContextRefreshedEvent; +import org.springframework.lang.NonNull; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.JdkIdGenerator; + +import cn.topiam.employee.common.entity.setting.AdministratorEntity; +import cn.topiam.employee.common.enums.UserStatus; +import cn.topiam.employee.common.repository.setting.AdministratorRepository; +import cn.topiam.employee.support.trace.TraceUtils; +import static cn.topiam.employee.support.constant.EiamConstants.DEFAULT_ADMIN_USERNAME; +import static cn.topiam.employee.support.lock.LockAspect.getTopiamLockKeyPrefix; +import static cn.topiam.employee.support.util.CreateFileUtil.createFile; + +/** + * ConsoleAdminPasswordInitializeListener + * + * @author TopIAM + * Created by support@topiam.cn on 2022/11/26 21:44 + */ +@Component +public class ConsoleAdminPasswordInitializeListener implements + ApplicationListener { + + private final Logger logger = LoggerFactory + .getLogger(ConsoleAdminPasswordInitializeListener.class); + private static final String DIR_NAME = ".topiam"; + private static final String USER_HOME = "user.home"; + + @Override + @Transactional(rollbackFor = Exception.class) + public void onApplicationEvent(@NonNull ContextRefreshedEvent contextRefreshedEvent) { + //@formatter:off + String traceId = jdkIdGenerator.generateId().toString(); + TraceUtils.put(traceId); + RLock lock = redissonClient.getLock(getTopiamLockKeyPrefix()); + boolean tryLock = false; + try { + tryLock = lock.tryLock(1, TimeUnit.SECONDS); + if (tryLock){ + Optional optional = administratorRepository.findByUsername(DEFAULT_ADMIN_USERNAME); + if (optional.isEmpty()) { + String initPassword = jdkIdGenerator.generateId().toString().replace("-", "").toLowerCase(Locale.ENGLISH); + createFile(getInitialAdminPasswordFilePath()); + BufferedWriter stream = new BufferedWriter(new FileWriter(getInitialAdminPasswordFilePath())); + //清空 + stream.write(initPassword); + stream.flush(); + stream.close(); + String ls = System.lineSeparator(); + logger.info(ls + ls + "*************************************************************" + ls + + "*************************************************************" + ls + + "*************************************************************" + ls + + ls + + "TopIAM console initial setup is required. An admin user has been created and " + + "a password generated." + ls + + "Please use the following password to proceed to installation:" + ls + + ls + + initPassword + ls + + ls + + "This may also be found at: " + getInitialAdminPasswordFilePath() + ls + + ls + + "*************************************************************" + ls + + "*************************************************************" + ls + + "*************************************************************" + ls); + //保存管理员 + saveInitAdministrator(DEFAULT_ADMIN_USERNAME, initPassword); + } + } + + } catch (Exception exception) { + int exitCode = SpringApplication.exit(contextRefreshedEvent.getApplicationContext(), + () -> 0); + System.exit(exitCode); + } finally { + if (tryLock && lock.isLocked()) { + lock.unlock(); + } + TraceUtils.remove(); + } + //@formatter:on + } + + /** + * 保存管理员 + * + * @param username {@link String} + * @param password {@link String} + */ + private void saveInitAdministrator(String username, String password) { + AdministratorEntity administrator = new AdministratorEntity(); + administrator.setUsername(username); + administrator.setPassword(passwordEncoder.encode(password)); + administrator.setStatus(UserStatus.ENABLE); + administrator.setRemark( + "This administrator user is automatically created during system initialization."); + administratorRepository.save(administrator); + } + + public static String addSeparator(String dir) { + if (!dir.endsWith(File.separator)) { + dir += File.separator; + } + return dir; + } + + /** + * 获取初始化管理员密码文件路径 + * + * @return {@link String} + */ + public static String getInitialAdminPasswordFilePath() { + String path = addSeparator(System.getProperty(USER_HOME)) + DIR_NAME + File.separator + + "secrets" + File.separator; + return path + "initialAdminPassword"; + } + + private final JdkIdGenerator jdkIdGenerator = new JdkIdGenerator(); + + private final AdministratorRepository administratorRepository; + + private final PasswordEncoder passwordEncoder; + + private final RedissonClient redissonClient; + + public ConsoleAdminPasswordInitializeListener(AdministratorRepository administratorRepository, + PasswordEncoder passwordEncoder, + RedissonClient redissonClient) { + this.administratorRepository = administratorRepository; + this.passwordEncoder = passwordEncoder; + this.redissonClient = redissonClient; + } + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/listener/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/listener/package-info.java new file mode 100644 index 00000000..8d8f04ee --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/listener/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.listener; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/package-info.java new file mode 100644 index 00000000..e93c9eac --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/other/IdentitySourceConfigValidatorParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/other/IdentitySourceConfigValidatorParam.java new file mode 100644 index 00000000..836d5fbc --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/other/IdentitySourceConfigValidatorParam.java @@ -0,0 +1,64 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.other; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import org.springdoc.api.annotations.ParameterObject; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.common.enums.identityprovider.IdentitySourceProvider; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 身份源配置验证器入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/4/13 23:01 + */ +@Data +@Schema(description = "身份源配置验证器入参") +@ParameterObject +public class IdentitySourceConfigValidatorParam implements Serializable { + + @Serial + private static final long serialVersionUID = -360733000329499789L; + + /** + * 身份源提供商 + */ + @NotNull(message = "身份源提供商不能为空") + @Parameter(description = "身份源提供商") + private IdentitySourceProvider provider; + + /** + * 配置 + */ + @NotNull(message = "验证配置不能为空") + @Parameter(description = "配置") + private JSONObject config; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/other/OrganizationExcelData.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/other/OrganizationExcelData.java new file mode 100644 index 00000000..6e67ffa8 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/other/OrganizationExcelData.java @@ -0,0 +1,79 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.other; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import org.hibernate.validator.constraints.Length; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; + +import cn.topiam.employee.common.enums.OrganizationType; + +import lombok.Data; + +/** + * 组织架构Excel + * + * @author TopIAM + */ +@Data +public class OrganizationExcelData implements Serializable { + + @Serial + private static final long serialVersionUID = -1636371891351203058L; + private static final String PROMPT = + // @formatter:off + "填写须知:\n" + + " <1>不能在本excel表中对部门信息类别进行增加、删除、修改;\n" + + " <2>红色字段为必填字段,黑色字段为选填字段;\n" + + " <3>部门:上下级部门间用\"-\"隔开,且从最上级部门开始,例如\"研发部-济南分部\";"; + // @formatter:no + + @ExcelProperty(value = {"上级架构"}, index = 0) + @ColumnWidth(value = 30) + @Length(max = 100) + private String parentId; + + /** + * 名称 + */ + @ExcelProperty(value = {"架构名称"}, index = 1) + @ColumnWidth(value = 15) + @Length(max = 40) + private String name; + + /** + * 类型 + */ + @ColumnWidth(value = 15) + @NotNull + private OrganizationType type; + + /** + * 外部ID + */ + @ExcelProperty(value = {"外部ID"}, index = 3) + @ColumnWidth(value = 15) + @Length(max = 128) + private String externalId; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/other/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/other/package-info.java new file mode 100644 index 00000000..dc8e885c --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/other/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.other; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/package-info.java new file mode 100644 index 00000000..0d959228 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/package-info.java @@ -0,0 +1,24 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +/** + * pojo + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/12 22:33 + */ +package cn.topiam.employee.console.pojo; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/account/UserGroupListQuery.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/account/UserGroupListQuery.java new file mode 100644 index 00000000..d47422df --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/account/UserGroupListQuery.java @@ -0,0 +1,54 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.account; + +import java.io.Serial; +import java.io.Serializable; + +import org.springdoc.api.annotations.ParameterObject; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询用户列表入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Schema(description = "查询用户组列表入参") +@ParameterObject +public class UserGroupListQuery implements Serializable { + @Serial + private static final long serialVersionUID = -7110595216804896858L; + + /** + * 用户组名称 + */ + @Parameter(description = "用户组名称") + private String name; + + /** + * 用户组编码 + */ + @Parameter(description = "用户组编码") + private String code; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/analysis/AnalysisQuery.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/analysis/AnalysisQuery.java new file mode 100644 index 00000000..7181071b --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/analysis/AnalysisQuery.java @@ -0,0 +1,85 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.analysis; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.time.Period; + +import javax.validation.constraints.NotNull; + +import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; +import org.springframework.format.annotation.DateTimeFormat; + +import lombok.Data; +import lombok.Getter; + +import io.swagger.v3.oas.annotations.media.Schema; +import static cn.topiam.employee.support.constant.EiamConstants.DEFAULT_DATE_TIME_FORMATTER_PATTERN; + +/** + * 统计查询入惨 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/11/22 23:16 + */ +@Data +@Schema(description = "统计查询入惨") +public class AnalysisQuery implements Serializable { + + /** + * 开始日期 + */ + @NotNull(message = "开始日期不能为空") + @Schema(description = "开始日期") + @DateTimeFormat(pattern = DEFAULT_DATE_TIME_FORMATTER_PATTERN) + private LocalDateTime startTime; + + /** + * 截止日期 + */ + @NotNull(message = "截止日期不能为空") + @Schema(description = "截止日期") + @DateTimeFormat(pattern = DEFAULT_DATE_TIME_FORMATTER_PATTERN) + private LocalDateTime endTime; + + public Interval getTimeInterval() { + Period interval = Period.between(startTime.toLocalDate(), endTime.toLocalDate()); + boolean today = interval.getDays() < 1; + boolean isDay = interval.getMonths() < 1; + return today ? Interval.HOUR : isDay ? Interval.DAY : Interval.MONTH; + } + + @Getter + public enum Interval { + + HOUR(DateHistogramInterval.HOUR, "HH时"), + + DAY(DateHistogramInterval.DAY, "dd日"), + + MONTH(DateHistogramInterval.MONTH, "MM月"); + + private final DateHistogramInterval type; + private final String format; + + Interval(DateHistogramInterval type, String format) { + this.type = type; + this.format = format; + } + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppCertQuery.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppCertQuery.java new file mode 100644 index 00000000..828777cb --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppCertQuery.java @@ -0,0 +1,56 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.app; + +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; + +import org.springdoc.api.annotations.ParameterObject; + +import cn.topiam.employee.common.enums.app.AppCertUsingType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询应用证书列表入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Schema(description = "查询应用证书列表入参") +@ParameterObject +public class AppCertQuery implements Serializable { + + /** + * 应用ID + */ + @NotBlank(message = "应用ID不能为空") + @Parameter(description = "应用ID") + private String appId; + + /** + * 使用类型 + */ + @Parameter(description = "使用类型") + private AppCertUsingType usingType; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppPermissionActionListQuery.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppPermissionActionListQuery.java new file mode 100644 index 00000000..4be2cc27 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppPermissionActionListQuery.java @@ -0,0 +1,65 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.app; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotEmpty; + +import org.springdoc.api.annotations.ParameterObject; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询权限列表入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Schema(description = "查询权限列表入参") +@ParameterObject +public class AppPermissionActionListQuery implements Serializable { + + @Serial + private static final long serialVersionUID = 4307939244290315206L; + + /** + * 资源ID + */ + @Parameter(description = "资源ID") + private String id; + + /** + * 资源名称 + */ + @Parameter(description = "资源名称") + private String name; + + /** + * 应用ID + */ + @Parameter(description = "应用ID") + @NotEmpty(message = "应用ID不能为空") + private String appId; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppPermissionRoleListQuery.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppPermissionRoleListQuery.java new file mode 100644 index 00000000..1b52edb7 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppPermissionRoleListQuery.java @@ -0,0 +1,67 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.app; + +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import org.springdoc.api.annotations.ParameterObject; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 分页查询角色入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Schema(description = "查询角色列表入参") +@ParameterObject +public class AppPermissionRoleListQuery implements Serializable { + + /** + * 角色名称 + */ + @Parameter(description = "角色名称") + private String name; + + /** + * 角色编码 + */ + @Parameter(description = "角色编码") + private String code; + + /** + * 所属应用 + */ + @NotNull(message = "请选择角色所属应用") + @Parameter(description = "所属应用") + private Long appId; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppQuery.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppQuery.java new file mode 100644 index 00000000..3d5eefa4 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppQuery.java @@ -0,0 +1,53 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.app; + +import java.io.Serializable; + +import org.springdoc.api.annotations.ParameterObject; + +import cn.topiam.employee.common.enums.app.AppProtocol; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询应用列表入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Schema(description = "查询应用列表入参") +@ParameterObject +public class AppQuery implements Serializable { + + /** + * 应用名称 + */ + @Parameter(description = "应用名称") + private String name; + + /** + * 协议类型 + */ + @Parameter(description = "协议类型") + private AppProtocol protocol; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppResourceListQuery.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppResourceListQuery.java new file mode 100644 index 00000000..7a099ff7 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/app/AppResourceListQuery.java @@ -0,0 +1,61 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.app; + +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import org.springdoc.api.annotations.ParameterObject; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 分页查询资源入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Schema(description = "查询权限资源列表入参") +@ParameterObject +public class AppResourceListQuery implements Serializable { + + /** + * 资源名称 + */ + @Parameter(description = "资源名称") + private String name; + + /** + * 所属应用 + */ + @NotNull(message = "请选择资源所属应用") + @Parameter(description = "所属应用") + private Long appId; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/authentication/IdentityProviderListQuery.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/authentication/IdentityProviderListQuery.java new file mode 100644 index 00000000..53c84514 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/authentication/IdentityProviderListQuery.java @@ -0,0 +1,59 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.authentication; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import org.springdoc.api.annotations.ParameterObject; + +import cn.topiam.employee.common.enums.IdentityProviderCategory; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/3/21 20:52 + */ +@Data +@Schema(description = "查询认证源列表入参") +@ParameterObject +public class IdentityProviderListQuery implements Serializable { + + @Serial + private static final long serialVersionUID = 1191998425971892318L; + + /** + * 认证源ID + */ + @Parameter(description = "认证源名称") + private String name; + + /** + * 认证源类型 + */ + @Parameter(description = "认证源分类") + @NotNull(message = "认证源分类不能为空") + private IdentityProviderCategory category; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/authentication/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/authentication/package-info.java new file mode 100644 index 00000000..e11eb2ec --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/authentication/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.authentication; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/identity/IdentitySourceEventRecordListQuery.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/identity/IdentitySourceEventRecordListQuery.java new file mode 100644 index 00000000..8c03b71c --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/identity/IdentitySourceEventRecordListQuery.java @@ -0,0 +1,70 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.identity; + +import java.io.Serial; +import java.io.Serializable; + +import org.springdoc.api.annotations.ParameterObject; + +import cn.topiam.employee.common.enums.SyncStatus; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceActionType; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceObjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询身份源事件记录列表入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/14 01:29 + */ +@Data +@Schema(description = "查询身份源事件记录列表入参") +@ParameterObject +public class IdentitySourceEventRecordListQuery implements Serializable { + @Serial + private static final long serialVersionUID = -7110595216804896858L; + + /** + * 身份源ID + */ + @Parameter(description = "身份源ID") + private String identitySourceId; + + /** + * 动作类型 + */ + @Parameter(description = "动作类型") + private IdentitySourceActionType actionType; + + /** + * 对象类型 + */ + @Parameter(description = "对象类型") + private IdentitySourceObjectType objectType; + + /** + * 事件状态 + */ + @Parameter(description = "事件状态") + private SyncStatus status; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/identity/IdentitySourceListQuery.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/identity/IdentitySourceListQuery.java new file mode 100644 index 00000000..10d58b30 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/identity/IdentitySourceListQuery.java @@ -0,0 +1,48 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.identity; + +import java.io.Serial; +import java.io.Serializable; + +import org.springdoc.api.annotations.ParameterObject; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询身份源列表入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/14 01:29 + */ +@Data +@Schema(description = "查询身份源列表入参") +@ParameterObject +public class IdentitySourceListQuery implements Serializable { + @Serial + private static final long serialVersionUID = -7110595216804896858L; + + /** + * 身份源名称 + */ + @Parameter(description = "身份源名称") + private String name; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/identity/IdentitySourceSyncHistoryListQuery.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/identity/IdentitySourceSyncHistoryListQuery.java new file mode 100644 index 00000000..2fa9e188 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/identity/IdentitySourceSyncHistoryListQuery.java @@ -0,0 +1,73 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.identity; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; + +import org.springdoc.api.annotations.ParameterObject; + +import cn.topiam.employee.common.enums.SyncStatus; +import cn.topiam.employee.common.enums.TriggerType; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceObjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询身份源列表入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/14 01:29 + */ +@Data +@Schema(description = "查询身份源同步历史列表入参") +@ParameterObject +public class IdentitySourceSyncHistoryListQuery implements Serializable { + @Serial + private static final long serialVersionUID = -7110595216804896858L; + + /** + * 身份源ID + */ + @NotBlank(message = "身份源ID不能为空") + @Parameter(description = "身份源ID") + private String identitySourceId; + + /** + * 对象类型 + */ + @Parameter(description = "对象类型") + private IdentitySourceObjectType objectType; + + /** + * 触发类型 + */ + @Parameter(description = "触发类型") + private TriggerType triggerType; + + /** + * 状态 + */ + @Parameter(description = "触发类型") + private SyncStatus status; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/identity/IdentitySourceSyncRecordListQuery.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/identity/IdentitySourceSyncRecordListQuery.java new file mode 100644 index 00000000..e8d7a264 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/identity/IdentitySourceSyncRecordListQuery.java @@ -0,0 +1,74 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.identity; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; + +import org.springdoc.api.annotations.ParameterObject; + +import cn.topiam.employee.common.enums.SyncStatus; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceActionType; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceObjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询身份源同步详情入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/14 01:29 + */ +@Data +@Schema(description = "查询身份源同步详情入参") +@ParameterObject +public class IdentitySourceSyncRecordListQuery implements Serializable { + @Serial + private static final long serialVersionUID = -7110595216804896858L; + + /** + * 历史记录ID + */ + @NotBlank(message = "历史记录ID不能为空") + @Parameter(description = "历史记录ID") + private String syncHistoryId; + + /** + * 对象类型 + */ + @Parameter(description = "对象类型") + private IdentitySourceObjectType objectType; + + /** + * 操作类型 + */ + @Parameter(description = "操作类型") + private IdentitySourceActionType actionType; + + /** + * 触发类型 + */ + @Parameter(description = "状态") + private SyncStatus status; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/package-info.java new file mode 100644 index 00000000..173b615b --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/setting/AdministratorListQuery.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/setting/AdministratorListQuery.java new file mode 100644 index 00000000..74dcba16 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/query/setting/AdministratorListQuery.java @@ -0,0 +1,40 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.query.setting; + +import org.springdoc.api.annotations.ParameterObject; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/14 19:36 + */ +@Data +@Schema(description = "管理员列表查询") +@ParameterObject +public class AdministratorListQuery { + /** + * username + */ + @Parameter(description = "用户名") + private String username; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/OrganizationChildResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/OrganizationChildResult.java new file mode 100644 index 00000000..a45bcdee --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/OrganizationChildResult.java @@ -0,0 +1,106 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.account; + +import java.io.Serial; +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 获取子组织 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 21:27 + */ +@Data +@Schema(description = "获取子组织") +public class OrganizationChildResult implements Serializable { + @Serial + private static final long serialVersionUID = -150631305460653395L; + + /** + * 主键ID + */ + @Parameter(description = "ID") + private String id; + + /** + * 名称 + */ + @Parameter(description = "名称") + private String name; + + /** + * 父级 + */ + @Parameter(description = "父级") + private String parentId; + + /** + * 显示路径 + */ + @Parameter(description = "显示路径") + private String displayPath; + + /** + * 编码 + */ + @Parameter(description = "编码") + private String code; + + /** + * 外部ID + */ + @Parameter(description = "外部ID") + private String externalId; + /** + * 来源 + */ + @Parameter(description = "类型") + private String type; + /** + * 来源 + */ + @Parameter(description = "数据来源") + private String dataOrigin; + + /** + * 排序 + */ + @Parameter(description = "排序") + private Integer order; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + /** + * 是否叶子节点 + */ + @JsonProperty(value = "isLeaf") + @Parameter(description = "是否叶子节点") + private Boolean leaf; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/OrganizationResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/OrganizationResult.java new file mode 100644 index 00000000..6dc0bb0a --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/OrganizationResult.java @@ -0,0 +1,81 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.account; + +import java.io.Serial; +import java.io.Serializable; + +import cn.topiam.employee.common.enums.OrganizationType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 获取组织 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 21:27 + */ +@Data +@Schema(description = "获取组织") +public class OrganizationResult implements Serializable { + @Serial + private static final long serialVersionUID = -150631305460653395L; + /** + * 主键ID + */ + @Parameter(description = "ID") + private String id; + /** + * key + */ + @Parameter(description = "名称") + private String name; + + /** + * 显示路径 + */ + @Parameter(description = "显示路径") + private String displayPath; + /** + * 编码 + */ + @Parameter(description = "编码") + private String code; + + /** + * 排序 + */ + @Parameter(description = "排序") + private String order; + + /** + * 组织机构类型 + */ + @Parameter(description = "机构类型") + private OrganizationType type; + + /** + * 备注 + */ + @Parameter(description = "备注") + private String remark; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/OrganizationRootResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/OrganizationRootResult.java new file mode 100644 index 00000000..4531005d --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/OrganizationRootResult.java @@ -0,0 +1,106 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.account; + +import java.io.Serial; +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 获取根组织 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 21:27 + */ +@Data +@Schema(description = "获取根组织") +public class OrganizationRootResult implements Serializable { + @Serial + private static final long serialVersionUID = -150631305460653395L; + + /** + * 主键ID + */ + @Parameter(description = "ID") + private String id; + + /** + * 名称 + */ + @Parameter(description = "名称") + private String name; + + /** + * 父级 + */ + @Parameter(description = "父级") + private String parentId; + + /** + * 显示路径 + */ + @Parameter(description = "显示路径") + private String displayPath; + + /** + * 编码 + */ + @Parameter(description = "编码") + private String code; + + /** + * 外部ID + */ + @Parameter(description = "外部ID") + private String externalId; + /** + * 来源 + */ + @Parameter(description = "类型") + private String type; + /** + * 来源 + */ + @Parameter(description = "数据来源") + private String dataOrigin; + + /** + * 排序 + */ + @Parameter(description = "排序") + private String order; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + /** + * 是否叶子节点 + */ + @JsonProperty(value = "isLeaf") + @Parameter(description = "是否叶子节点") + private Boolean leaf; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/OrganizationTreeResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/OrganizationTreeResult.java new file mode 100644 index 00000000..f77306ed --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/OrganizationTreeResult.java @@ -0,0 +1,115 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.account; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询组织架构树结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 21:27 + */ +@Data +@Schema(description = "查询组织架构树结果") +public class OrganizationTreeResult implements Serializable { + + @Serial + private static final long serialVersionUID = 5599721546299678344L; + /** + * 主键ID + */ + @Parameter(description = "ID") + private String id; + + /** + * 名称 + */ + @Parameter(description = "名称") + private String name; + + /** + * 父级 + */ + @Parameter(description = "父级") + private String parentId; + + /** + * 显示路径 + */ + @Parameter(description = "显示路径") + private String displayPath; + + /** + * 编码 + */ + @Parameter(description = "编码") + private String code; + + /** + * 外部ID + */ + @Parameter(description = "外部ID") + private String externalId; + + /** + * 类型 + */ + @Parameter(description = "类型") + private String type; + + /** + * 来源 + */ + @Parameter(description = "数据来源") + private String dataOrigin; + + /** + * 排序 + */ + @Parameter(description = "排序") + private Integer order; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + + /** + * 是否叶子节点 + */ + @JsonProperty(value = "isLeaf") + @Parameter(description = "是否叶子节点") + private Boolean leaf; + + /** + * 子级列表 + */ + @Parameter(description = "子级列表") + private List children; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserGroupListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserGroupListResult.java new file mode 100644 index 00000000..5045f979 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserGroupListResult.java @@ -0,0 +1,64 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.account; + +import java.io.Serial; +import java.io.Serializable; + +import lombok.Data; +import lombok.experimental.Accessors; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 用户分页查询结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Accessors(chain = true) +@Schema(description = "查询用户分组列表") +public class UserGroupListResult implements Serializable { + + @Serial + private static final long serialVersionUID = 3320953184046791392L; + /** + * 用户ID + */ + @Parameter(description = "用户组ID") + private String id; + /** + * 用户组名称 + */ + @Parameter(description = "用户组名称") + private String name; + + /** + * 用户组编码 + */ + @Parameter(description = "用户组编码") + private String code; + + /** + * 备注 + */ + @Parameter(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserGroupMemberListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserGroupMemberListResult.java new file mode 100644 index 00000000..3fa8a7e0 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserGroupMemberListResult.java @@ -0,0 +1,80 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.account; + +import java.io.Serial; +import java.io.Serializable; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询用户详情结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:22 + */ +@Data +@Schema(description = "查询用户详情结果") +public class UserGroupMemberListResult implements Serializable { + @Serial + private static final long serialVersionUID = -5144879825451360221L; + /** + * ID + */ + @Parameter(description = "ID") + private String id; + + /** + * 用户名 + */ + @Parameter(description = "用户名") + private String username; + + /** + * 姓名 + */ + @Parameter(description = "姓名") + private String fullName; + + /** + * 邮箱 + */ + @Parameter(description = "邮箱") + private String email; + + /** + * 手机号 + */ + @Parameter(description = "手机号") + private String phone; + + /** + * 头像URL + */ + @Parameter(description = "头像URL") + private String avatar; + + /** + * 组织显示目录 + */ + @Parameter(description = "组织显示目录") + private String orgDisplayPath; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserGroupResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserGroupResult.java new file mode 100644 index 00000000..9d266292 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserGroupResult.java @@ -0,0 +1,61 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.account; + +import java.io.Serial; +import java.io.Serializable; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 查询用户分组详情 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:22 + */ +@Data +@Schema(description = "根据ID查询用户分组结果") +public class UserGroupResult implements Serializable { + @Serial + private static final long serialVersionUID = -5144879825451360221L; + /** + * 用户ID + */ + @Parameter(description = "用户组ID") + private String id; + /** + * 用户组名称 + */ + @Parameter(description = "用户组名称") + private String name; + + /** + * 用户组编码 + */ + @Parameter(description = "用户组编码") + private String code; + + /** + * 备注 + */ + @Parameter(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserListResult.java new file mode 100644 index 00000000..57c9a17d --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserListResult.java @@ -0,0 +1,130 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.account; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import lombok.Data; +import lombok.experimental.Accessors; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; +import static cn.topiam.employee.support.constant.EiamConstants.DEFAULT_DATE_TIME_FORMATTER_PATTERN; + +/** + * 用户分页查询结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Accessors(chain = true) +@Schema(description = "分页查询用户结果") +public class UserListResult implements Serializable { + + @Serial + private static final long serialVersionUID = 3320953184046791392L; + /** + * 用户ID + */ + @Parameter(description = "用户ID") + private String id; + + /** + * 用户名 + */ + @Parameter(description = "用户名") + private String username; + + /** + * 姓名 + */ + @Parameter(description = "姓名") + private String fullName; + + /** + * 邮箱 + */ + @Parameter(description = "邮箱") + private String email; + + /** + * 手机号 + */ + @Parameter(description = "手机号") + private String phone; + + /** + * 头像URL + */ + @Parameter(description = "头像URL") + private String avatar; + + /** + * 状态 + */ + @Parameter(description = "状态") + private String status; + + /** + * 邮箱验证有效 + */ + @Parameter(description = "邮箱验证") + private Boolean emailVerified; + + /** + * 手机验证 + */ + @Parameter(description = "手机验证") + private Boolean phoneVerified; + + /** + * 认证次数 + */ + @Parameter(description = "认证次数") + private Long authTotal; + /** + * 数据来源 + */ + + @Parameter(description = "数据来源") + private String dataOrigin; + + /** + * 上次认证时间 + */ + @JsonFormat(pattern = DEFAULT_DATE_TIME_FORMATTER_PATTERN) + @Parameter(description = "上次认证时间") + private LocalDateTime lastAuthTime; + + /** + * 目录 + */ + @Parameter(description = "组织机构目录") + private String orgDisplayPath; + + /** + * 最后修改密码时间 + */ + @Parameter(description = "最后修改密码时间") + private LocalDateTime lastUpdatePasswordTime; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserLoginAuditListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserLoginAuditListResult.java new file mode 100644 index 00000000..45069ec0 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserLoginAuditListResult.java @@ -0,0 +1,74 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.account; + +import java.time.LocalDateTime; + +import cn.topiam.employee.audit.enums.EventStatus; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 用户登录日志返回结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2022年11月13日14:49:35 + */ +@Data +@Schema(description = "用户登录日志返回结果") +public class UserLoginAuditListResult { + + /** + * 应用名称 + */ + @Parameter(description = "应用名称") + private String appName; + + /** + * 客户端IP + */ + @Parameter(description = "客户端IP") + private String clientIp; + + /** + * 登录结果 + */ + @Parameter(description = "浏览器") + private String browser; + + /** + * 位置 + */ + @Parameter(description = "位置") + private String location; + + /** + * 事件状态 + */ + @Parameter(description = "事件状态") + private EventStatus eventStatus; + + /** + * 事件时间 + */ + @Parameter(description = "事件时间") + private LocalDateTime eventTime; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserResult.java new file mode 100644 index 00000000..78f63830 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/account/UserResult.java @@ -0,0 +1,170 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.account; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; +import static cn.topiam.employee.support.constant.EiamConstants.DEFAULT_DATE_TIME_FORMATTER_PATTERN; + +/** + * 根据ID查询用户结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:22 + */ +@Data +@Schema(description = "根据ID查询用户结果") +public class UserResult implements Serializable { + @Serial + private static final long serialVersionUID = -5144879825451360221L; + /** + * ID + */ + @Parameter(description = "ID") + private String id; + /** + * 用户名 + */ + @Parameter(description = "用户名") + private String username; + + /** + * 邮箱 + */ + @Parameter(description = "邮箱") + private String email; + + /** + * 手机号 + */ + @Parameter(description = "手机号") + private String phone; + + /** + * 头像URL + */ + @Parameter(description = "头像URL") + private String avatar; + + /** + * 状态 + */ + @Parameter(description = "状态") + private String status; + + /** + * 姓名 + */ + @Parameter(description = "姓名") + private String fullName; + + /** + * 昵称 + */ + @Parameter(description = "昵称") + private String nickName; + + /** + * 身份证号 + */ + @Parameter(description = "身份证号") + private String idCard; + + /** + * 地址 + */ + @Parameter(description = "地址") + private String address; + + /** + * 认证次数 + */ + @Parameter(description = "认证次数") + private String authTotal; + + /** + * 最后登录 IP + */ + @Parameter(description = "最后登录 IP") + private String lastAuthIp; + + /** + * 上次认证时间 + */ + @Parameter(description = "上次认证时间") + @JsonFormat(pattern = DEFAULT_DATE_TIME_FORMATTER_PATTERN) + private LocalDateTime lastAuthTime; + + /** + * 数据来源 + */ + @Parameter(description = "数据来源") + private String dataOrigin; + + /** + * 手机有效 + */ + @Parameter(description = "手机验证有效") + private Boolean phoneVerified; + + /** + * 邮箱验证有效 + */ + @Parameter(description = "邮箱验证有效") + private Boolean emailVerified; + + /** + * 外部ID + */ + @Parameter(description = "外部ID") + private String externalId; + + /** + * 过期时间 + */ + @Parameter(description = "过期时间") + private LocalDate expireDate; + + /** + * 创建时间 + */ + @Parameter(description = "创建时间") + private LocalDateTime createTime; + + /** + * 最后修改时间 + */ + @Parameter(description = "修改时间") + private LocalDateTime updateTime; + + /** + * 备注 + */ + @Parameter(description = "备注") + private String remark; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/analysis/AppVisitRankResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/analysis/AppVisitRankResult.java new file mode 100644 index 00000000..bcb50233 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/analysis/AppVisitRankResult.java @@ -0,0 +1,49 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.analysis; + +import java.io.Serializable; + +import lombok.AllArgsConstructor; +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 应用热点访问结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/11/22 23:16 + */ +@Data +@AllArgsConstructor +@Schema(description = "应用访问频次") +public class AppVisitRankResult implements Serializable { + + /** + * 应用名称 + */ + @Schema(description = "应用名称") + private String name; + + /** + * 访问次数 + */ + @Schema(description = "访问次数") + private Long count; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/analysis/AuthnHotProviderResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/analysis/AuthnHotProviderResult.java new file mode 100644 index 00000000..5a8ac552 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/analysis/AuthnHotProviderResult.java @@ -0,0 +1,49 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.analysis; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 热点认证方式结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/11/22 23:16 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Schema(description = "热点认证方式结果") +public class AuthnHotProviderResult { + + /** + * 认证方式 + */ + @Schema(description = "认证方式") + private String name; + + /** + * 使用次数 + */ + @Schema(description = "使用次数") + private Long count; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/analysis/AuthnQuantityResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/analysis/AuthnQuantityResult.java new file mode 100644 index 00000000..0a464366 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/analysis/AuthnQuantityResult.java @@ -0,0 +1,55 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.analysis; + +import java.io.Serializable; + +import lombok.AllArgsConstructor; +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 认证量统计结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/11/22 23:16 + */ +@Data +@AllArgsConstructor +@Schema(description = "认证量统计结果") +public class AuthnQuantityResult implements Serializable { + + /** + * 名称 + */ + @Schema(description = "名称") + private String name; + + /** + * 数量 + */ + @Schema(description = "数量") + private Long count; + + /** + * 状态 + */ + @Schema(description = "状态") + private String status; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/analysis/OverviewResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/analysis/OverviewResult.java new file mode 100644 index 00000000..4b0cf223 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/analysis/OverviewResult.java @@ -0,0 +1,59 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.analysis; + +import java.io.Serializable; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 概述总计结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/11/22 23:16 + */ +@Data +@Schema(description = "概述总计结果") +public class OverviewResult implements Serializable { + + /** + * 今日认证量 + */ + @Schema(description = "今日认证量") + private Long todayAuthnCount; + + /** + * 认证源总数 + */ + @Schema(description = "认证源总数") + private Long idpCount; + + /** + * 用户数量 + */ + @Schema(description = "用户数量") + private Long userCount; + + /** + * 应用数量 + */ + @Schema(description = "应用数量") + private Long appCount; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppAccessPolicyResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppAccessPolicyResult.java new file mode 100644 index 00000000..03e1ce37 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppAccessPolicyResult.java @@ -0,0 +1,98 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.time.LocalDateTime; + +import cn.topiam.employee.common.enums.PolicySubjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 应用访问授权策略结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/27 19:29 + */ +@Data +@Schema(description = "应用访问授权策略结果") +public class AppAccessPolicyResult { + + /** + * id + */ + @Schema(description = "id") + private String id; + + /** + * 应用ID + */ + @Schema(description = "应用ID") + private Long appId; + + /** + * 应用名称 + */ + @Schema(description = "应用名称") + private String appName; + + /** + * 模板 + */ + @Schema(description = "应用模版") + private String appTemplate; + + /** + * 协议 + */ + @Schema(description = "应用协议") + private String appProtocol; + + /** + * 应用类型 + */ + @Schema(description = "应用类型") + private String appType; + + /** + * 主体ID(用户、分组、组织机构) + */ + @Schema(description = "主体ID") + private String subjectId; + + /** + * 授权主体 + */ + @Schema(description = "授权主体") + private String subjectName; + + /** + * 主体类型(用户、分组、组织机构) + */ + @Schema(description = "主体类型") + private PolicySubjectType subjectType; + + /** + * 添加时间 + */ + @Schema(description = "添加时间") + private LocalDateTime createTime; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppAccountListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppAccountListResult.java new file mode 100644 index 00000000..725902f8 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppAccountListResult.java @@ -0,0 +1,95 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.time.LocalDateTime; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * AppAccountCreateParam 应用账户查询结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/24 22:13 + */ +@Data +@Schema(description = "应用账户列表查询结果") +public class AppAccountListResult { + + /** + * id + */ + @Schema(description = "id") + private String id; + + /** + * 应用ID + */ + @Schema(description = "应用ID") + private Long appId; + + /** + * 应用名称 + */ + @Schema(description = "应用名称") + private String appName; + + /** + * 模板 + */ + @Schema(description = "应用模版") + private String appTemplate; + + /** + * 协议 + */ + @Schema(description = "应用协议") + private String appProtocol; + + /** + * 应用类型 + */ + @Schema(description = "应用类型") + private String appType; + + /** + * 用户ID + */ + @Schema(description = "用户ID") + private Long userId; + + /** + * 用户名称 + */ + @Schema(description = "用户名称") + private String username; + + /** + * 账户名称 + */ + @Schema(description = "账户名称") + private String account; + + /** + * 添加时间 + */ + @Schema(description = "添加时间") + private LocalDateTime createTime; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppCertListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppCertListResult.java new file mode 100644 index 00000000..c24986f4 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppCertListResult.java @@ -0,0 +1,73 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import cn.topiam.employee.common.enums.app.AppCertUsingType; + +import lombok.AllArgsConstructor; +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 获取应用证书列表结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 23:29 + */ +@Data +@AllArgsConstructor +@Schema(description = "获取应用证书列表结果") +public class AppCertListResult { + /** + * ID + */ + @Parameter(description = "证书ID") + private String id; + + /** + * 应用ID + */ + @Parameter(description = "应用ID") + private String appId; + + /** + * 签名算法 + */ + @Parameter(description = "签名算法") + private String signAlgo; + + /** + * 私钥长度 + */ + @Parameter(description = "私钥长度") + private Integer keyLong; + + /** + * 证书 + */ + @Parameter(description = "证书") + private String cert; + + /** + * 使用类型 + */ + @Parameter(description = "使用类型") + private AppCertUsingType usingType; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppCreateResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppCreateResult.java new file mode 100644 index 00000000..ff53e935 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppCreateResult.java @@ -0,0 +1,44 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.io.Serializable; + +import lombok.AllArgsConstructor; +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 应用创建返回结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/26 23:25 + */ +@Data +@AllArgsConstructor +@Schema(description = "应用创建返回结果") +public class AppCreateResult implements Serializable { + + /** + * ID + */ + @Parameter(description = "ID") + private String id; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppGetResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppGetResult.java new file mode 100644 index 00000000..044077dc --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppGetResult.java @@ -0,0 +1,107 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import cn.topiam.employee.common.enums.app.AppProtocol; +import cn.topiam.employee.common.enums.app.AppType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 获取应用返回 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/27 19:29 + */ +@Data +@Schema(description = "获取应用返回结果") +public class AppGetResult implements Serializable { + /** + * ID + */ + @Parameter(description = "ID") + private String id; + /** + * 应用名称 + */ + @Parameter(description = "应用名称") + private String name; + /** + * 客户端ID + */ + @Parameter(description = "客户端ID") + private String clientId; + /** + * 客户端秘钥 + */ + @Parameter(description = "客户端秘钥") + private String clientSecret; + /** + * 应用类型 + */ + @Parameter(description = "应用类型") + private AppType type; + + /** + * 应用图标 + */ + @Parameter(description = "应用图标") + private String icon; + + /** + * 模板 + */ + @Parameter(description = "模板") + private String template; + + /** + * 协议 + */ + @Parameter(description = "协议") + private AppProtocol protocol; + + /** + * 协议名称 + */ + @Parameter(description = "协议名称") + private String protocolName; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + + /** + * 创建时间 + */ + @Parameter(description = "创建时间") + private LocalDateTime createTime; + + /** + * 备注 + */ + @Parameter(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppListResult.java new file mode 100644 index 00000000..45ed09ed --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppListResult.java @@ -0,0 +1,85 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.io.Serializable; + +import cn.topiam.employee.common.enums.app.AppProtocol; +import cn.topiam.employee.common.enums.app.AppType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 应用列表返回 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/27 19:29 + */ +@Data +@Schema(description = "应用列表返回") +public class AppListResult implements Serializable { + /** + * ID + */ + @Parameter(description = "ID") + private String id; + /** + * 应用名称 + */ + @Parameter(description = "应用名称") + private String name; + + /** + * 应用类型 + */ + @Parameter(description = "应用类型") + private AppType type; + + /** + * 应用图标 + */ + @Parameter(description = "应用图标") + private String icon; + + /** + * 模板 + */ + @Parameter(description = "模板") + private String template; + + /** + * 协议 + */ + @Parameter(description = "协议") + private AppProtocol protocol; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + + /** + * 备注 + */ + @Parameter(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionActionListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionActionListResult.java new file mode 100644 index 00000000..1555d474 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionActionListResult.java @@ -0,0 +1,131 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; + +import lombok.Data; +import lombok.experimental.Accessors; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 获取应用资源权限列表 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Accessors(chain = true) +@Schema(description = "获取应用资源权限列表") +public class AppPermissionActionListResult implements Serializable { + + @Serial + private static final long serialVersionUID = 3320953184046791392L; + /** + * 资源ID + */ + @Parameter(description = "资源ID") + private String id; + + /** + * 资源编码 + */ + @Parameter(description = "资源编码") + private String code; + + /** + * 资源名称 + */ + @Parameter(description = "资源名称") + private String name; + + /** + * 所属应用 + */ + @Parameter(description = "所属应用") + private String appId; + + /** + * desc + */ + @Parameter(description = "描述") + private String desc; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + + /** + * 路由权限 + */ + @Parameter(description = "菜单权限") + private List menus; + + /** + * 操作权限 + */ + @Parameter(description = "操作权限") + private List buttons; + + /** + * 接口权限 + */ + @Parameter(description = "接口权限") + private List apis; + + /** + * 操作权限 + */ + @Parameter(description = "数据权限") + private List datas; + + /** + * 其他权限 + */ + @Parameter(description = "其他权限") + private List others; + + @Data + @Schema(description = "权限项") + public static class Action implements Serializable { + + /** + * 权限ID + */ + @Parameter(description = "权限ID") + private String id; + + /** + * 权限名称 + */ + @Parameter(description = "权限名称") + private String name; + + /** + * 权限标识 + */ + @Parameter(description = "权限标识") + private String access; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionPolicyGetResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionPolicyGetResult.java new file mode 100644 index 00000000..c583ab3e --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionPolicyGetResult.java @@ -0,0 +1,87 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.io.Serializable; + +import cn.topiam.employee.common.enums.PolicyEffect; +import cn.topiam.employee.common.enums.PolicyObjectType; +import cn.topiam.employee.common.enums.PolicySubjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 获取资源 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 21:45 + */ +@Schema(description = "获取资源结果") +@Data +public class AppPermissionPolicyGetResult implements Serializable { + /** + * ID + */ + @Parameter(description = "id") + private String id; + + /** + * 授权主体id + */ + @Parameter(description = "授权主体id") + private String subjectId; + + /** + * 授权主体名称 + */ + @Parameter(description = "授权主体名称") + private String subjectName; + + /** + * 权限主体类型(用户、角色、分组、组织机构) + */ + @Parameter(description = "授权主体类型") + private PolicySubjectType subjectType; + + /** + * 权限客体ID + */ + @Parameter(description = "授权客体id") + private Long objectId; + + /** + * 权限客体名菜 + */ + @Parameter(description = "授权客体名称") + private String objectName; + + /** + * 权限客体类型(权限、角色) + */ + @Parameter(description = "授权客体类型") + private PolicyObjectType objectType; + + /** + * 授权作用 + */ + @Parameter(description = "授权作用") + private PolicyEffect effect; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionPolicyListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionPolicyListResult.java new file mode 100644 index 00000000..6257458b --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionPolicyListResult.java @@ -0,0 +1,84 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import cn.topiam.employee.common.enums.PolicyEffect; +import cn.topiam.employee.common.enums.PolicyObjectType; +import cn.topiam.employee.common.enums.PolicySubjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * + * @author TopIAM + * Created by support@topiam.cn on 2022/9/9 23:33 + */ +@Schema(description = "获取授权列表") +@Data +public class AppPermissionPolicyListResult { + /** + * ID + */ + @Parameter(description = "id") + private String id; + + /** + * 授权主体id + */ + @Parameter(description = "授权主体id") + private String subjectId; + + /** + * 授权主体名称 + */ + @Parameter(description = "授权主体名称") + private String subjectName; + + /** + * 权限主体类型(用户、角色、分组、组织机构) + */ + @Parameter(description = "授权主体类型") + private PolicySubjectType subjectType; + + /** + * 权限客体ID + */ + @Parameter(description = "授权客体id") + private Long objectId; + + /** + * 权限客体名菜 + */ + @Parameter(description = "授权客体名称") + private String objectName; + + /** + * 权限客体类型(权限、角色) + */ + @Parameter(description = "授权客体类型") + private PolicyObjectType objectType; + + /** + * 授权作用 + */ + @Parameter(description = "授权作用") + private PolicyEffect effect; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionResourceGetResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionResourceGetResult.java new file mode 100644 index 00000000..419cba2e --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionResourceGetResult.java @@ -0,0 +1,107 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; + +import cn.topiam.employee.common.enums.PermissionActionType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Hidden; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 获取资源 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 21:45 + */ +@Schema(description = "获取资源结果") +@Data +public class AppPermissionResourceGetResult implements Serializable { + /** + * 名称 + */ + @Schema(description = "资源名称") + private String name; + + /** + * 编码 + */ + @Schema(description = "资源编码") + private String code; + + /** + * 描述 + */ + @Schema(description = "资源描述") + private String desc; + + /** + * 所属应用 + */ + @Schema(description = "所属应用") + private Long appId; + + /** + * 资源权限 + */ + @Schema(description = "资源权限") + private List actions; + + /** + * AppPermissionsActionParam + * + * @author TopIAM + * Created by support@topiam.cn on 2022/9/1 00:18 + */ + @Data + public static class AppPermissionsAction implements Serializable { + + @Serial + private static final long serialVersionUID = -6391182747252245592L; + + /** + * ID + */ + @Hidden + @Schema(description = "ID") + private String id; + + /** + * 权限类型 + */ + @Schema(description = "权限类型") + private PermissionActionType type; + + /** + * 权限值 + */ + @Schema(description = "权限值") + private String value; + + /** + * 权限描述 + */ + @Schema(description = "权限描述") + private String name; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionResourceListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionResourceListResult.java new file mode 100644 index 00000000..f084d6ea --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionResourceListResult.java @@ -0,0 +1,77 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.io.Serial; +import java.io.Serializable; + +import lombok.Data; +import lombok.experimental.Accessors; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 资源分页查询结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Accessors(chain = true) +@Schema(description = "分页查询资源结果") +public class AppPermissionResourceListResult implements Serializable { + + @Serial + private static final long serialVersionUID = 3320953184046791392L; + /** + * ID + */ + @Parameter(description = "id") + private String id; + + /** + * 资源名称 + */ + @Parameter(description = "资源名称") + private String name; + + /** + * code + */ + @Parameter(description = "资源编码") + private String code; + + /** + * 所属应用 + */ + @Parameter(description = "所属应用") + private String appId; + + /** + * desc + */ + @Parameter(description = "描述") + private String desc; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionRoleListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionRoleListResult.java new file mode 100644 index 00000000..7e371caa --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionRoleListResult.java @@ -0,0 +1,75 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.io.Serial; +import java.io.Serializable; + +import lombok.Data; +import lombok.experimental.Accessors; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 角色分页查询结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Accessors(chain = true) +@Schema(description = "分页查询角色结果") +public class AppPermissionRoleListResult implements Serializable { + + @Serial + private static final long serialVersionUID = 3320953184046791392L; + /** + * ID + */ + @Parameter(description = "id") + private String id; + /** + * 角色名称 + */ + @Parameter(description = "角色名称") + private String name; + + /** + * 角色编码 + */ + @Parameter(description = "角色编码") + private String code; + + /** + * 所属应用 + */ + @Parameter(description = "所属应用") + private String appId; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + /** + * remark + */ + @Parameter(description = "描述") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionRoleResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionRoleResult.java new file mode 100644 index 00000000..8b2ab288 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppPermissionRoleResult.java @@ -0,0 +1,69 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.io.Serializable; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 获取角色 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 21:45 + */ +@Schema(description = "获取角色") +@Data +public class AppPermissionRoleResult implements Serializable { + /** + * id + */ + @Parameter(description = "id") + private String id; + /** + * appId + */ + @Parameter(description = "应用ID") + private String appId; + /** + * 角色名称 + */ + @Parameter(description = "角色名称") + private String name; + + /** + * 角色编码 + */ + @Parameter(description = "角色编码") + private String code; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + + /** + * 备注 + */ + @Parameter(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppTemplateResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppTemplateResult.java new file mode 100644 index 00000000..07b1bbe7 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppTemplateResult.java @@ -0,0 +1,72 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.io.Serializable; + +import cn.topiam.employee.common.enums.app.AppProtocol; +import cn.topiam.employee.common.enums.app.AppType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 应用模板返回 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/27 19:29 + */ +@Data +@Schema(description = "应用模板") +public class AppTemplateResult implements Serializable { + /** + * code + */ + @Parameter(description = "CODE") + private String code; + + /** + * protocol + */ + @Parameter(description = "协议") + private AppProtocol protocol; + + /** + * 应用类型 + */ + @Parameter(description = "应用类型") + private AppType type; + + /** + * 名称 + */ + @Parameter(description = "名称") + private String name; + /** + * 图标 + */ + @Parameter(description = "图标") + private String icon; + /** + * 描述 + */ + @Parameter(description = "描述") + private String desc; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/ParseSaml2MetadataResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/ParseSaml2MetadataResult.java new file mode 100644 index 00000000..094f9e72 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/ParseSaml2MetadataResult.java @@ -0,0 +1,97 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.io.Serializable; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 解析SAML2 元数据 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/27 23:12 + */ +@Data +@Schema(description = "解析 SAML2 元数据返回值") +public class ParseSaml2MetadataResult implements Serializable { + + /** + * EntityId + */ + @Parameter(description = "EntityId") + private String entityId; + + /** + * 签名断言 + */ + @Parameter(description = "是否对断言签名") + private Boolean wantAssertionsSigned; + + /** + * 请求签名 + */ + @Parameter(description = "是否对SAML Request签名进行验证") + private Boolean authnRequestsSigned; + + /** + * ssoAcsUrl + */ + @Parameter(description = "SSO ACS 地址") + private String acsUrl; + + /** + * defaultNameIdFormat + */ + @Parameter(description = "默认 NameId 格式") + private String defaultNameIdFormat; + + /** + * binding + */ + @Parameter(description = "默认 ACS 绑定方式") + private String defaultAcsBinding; + + /** + * 签名证书 + */ + @Parameter(description = "签名证书") + private String signCert; + + /** + * 单点登出启用 + */ + @Parameter(description = "单点登出是否启用") + private Boolean sloEnabled; + + /** + * 单点登出地址 + */ + @Parameter(description = "单点登出地址") + private String slsUrl; + + /** + * 单点登出绑定模式 + */ + @Parameter(description = "单点登出绑定模式") + private String slsBinding; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/UserIdpBindListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/UserIdpBindListResult.java new file mode 100644 index 00000000..76039eef --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/UserIdpBindListResult.java @@ -0,0 +1,67 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.app; + +import java.time.LocalDateTime; + +import cn.topiam.employee.common.enums.IdentityProviderType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 用户身份提供商绑定列表查询结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/11/3 22:13 + */ +@Data +@Schema(description = "用户身份提供商绑定列表查询结果") +public class UserIdpBindListResult { + + /** + * id + */ + @Schema(description = "id") + private String id; + + /** + * open id + */ + @Schema(description = "open id") + private Long openId; + + /** + * 提供商名称 + */ + @Schema(description = "提供商名称") + private String idpName; + + /** + * 提供商类型 + */ + @Schema(description = "提供商类型") + private IdentityProviderType idpType; + + /** + * 绑定时间 + */ + @Schema(description = "绑定时间") + private LocalDateTime bindTime; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/authentication/IdentityProviderCreateResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/authentication/IdentityProviderCreateResult.java new file mode 100644 index 00000000..b48c7e96 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/authentication/IdentityProviderCreateResult.java @@ -0,0 +1,52 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.authentication; + +import java.io.Serializable; + +import cn.topiam.employee.common.enums.IdentityProviderType; + +import lombok.Builder; +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 身份源创建返回 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/3/29 21:43 + */ +@Data +@Builder +@Schema(description = "身份源创建返回") +public class IdentityProviderCreateResult implements Serializable { + + /** + * ID + */ + @Parameter(description = "ID") + private String id; + + /** + * 提供商类型 + */ + @Parameter(description = "提供商类型") + private IdentityProviderType type; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/authentication/IdentityProviderListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/authentication/IdentityProviderListResult.java new file mode 100644 index 00000000..7bfc6f53 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/authentication/IdentityProviderListResult.java @@ -0,0 +1,74 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.authentication; + +import java.io.Serializable; + +import cn.topiam.employee.common.enums.IdentityProviderType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 社交认证源平台列表,带有元素字段,避免前端重复画页面,基本都是input + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 19:57 + */ +@Data +@Schema(description = "社交认证源平台列表") +public class IdentityProviderListResult implements Serializable { + + /** + * ID + */ + @Parameter(description = "ID") + private String id; + + /** + * name + */ + @Parameter(description = "名称") + private String name; + + /** + * 提供商 + */ + @Parameter(description = "提供商") + private IdentityProviderType type; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + + /** + * 描述 + */ + @Parameter(description = "描述") + private String desc; + + /** + * 备注 + */ + @Parameter(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/authentication/IdentityProviderResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/authentication/IdentityProviderResult.java new file mode 100644 index 00000000..f3a8d575 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/authentication/IdentityProviderResult.java @@ -0,0 +1,84 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.authentication; + +import java.io.Serial; +import java.io.Serializable; + +import cn.topiam.employee.authentication.common.config.IdentityProviderConfig; +import cn.topiam.employee.common.enums.IdentityProviderType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 认证源详情 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/21 21:21 + */ +@Data +@Schema(description = "获取社交认证源") +public class IdentityProviderResult implements Serializable { + @Serial + private static final long serialVersionUID = -1440230086940289961L; + + /** + * ID + */ + @Parameter(description = "ID") + private String id; + + /** + * 名称 + */ + @Parameter(description = "名称") + private String name; + + /** + * 提供商类型 + */ + @Parameter(description = "提供商类型") + private IdentityProviderType type; + + /** + * 配置 + */ + @Parameter(description = "配置JSON") + private IdentityProviderConfig config; + + /** + * 是否展示 + */ + @Parameter(description = "是否展示") + private Boolean displayed; + + /** + * 备注 + */ + @Parameter(description = "备注") + private String remark; + + /** + * 回调地址 + */ + @Parameter(description = "回调地址") + private String redirectUri; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceConfigGetResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceConfigGetResult.java new file mode 100644 index 00000000..b8747621 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceConfigGetResult.java @@ -0,0 +1,70 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.identitysource; + +import java.io.Serial; +import java.io.Serializable; + +import cn.topiam.employee.common.entity.identitysource.config.JobConfig; +import cn.topiam.employee.common.entity.identitysource.config.StrategyConfig; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 获取身份源配置 + * + * @author TopIAM + */ +@Data +@Schema(description = "获取身份源配置") +public class IdentitySourceConfigGetResult implements Serializable { + @Serial + private static final long serialVersionUID = -1440230086940289961L; + /** + * ID + */ + @Parameter(description = "ID") + private String id; + + /** + * 是否已配置 + */ + @Parameter(description = "是否已配置") + private Boolean configured; + + /** + * 基础配置 + */ + @Parameter(description = "基础配置") + private Object basicConfig; + + /** + * 策略配置 + */ + @Parameter(description = "策略配置") + private StrategyConfig strategyConfig; + + /** + * 任务配置 + */ + @Parameter(description = "任务配置") + private JobConfig jobConfig; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceEventRecordListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceEventRecordListResult.java new file mode 100644 index 00000000..9bcea0d5 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceEventRecordListResult.java @@ -0,0 +1,86 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.identitysource; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import cn.topiam.employee.common.enums.SyncStatus; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceActionType; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceObjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; +import static cn.topiam.employee.support.constant.EiamConstants.DEFAULT_DATE_TIME_FORMATTER_PATTERN; + +/** + * 身份源事件记录列表 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/25 23:05 + */ +@Data +@Schema(description = "身份源事件记录列表") +public class IdentitySourceEventRecordListResult implements Serializable { + /** + * 唯一标志 + */ + @Parameter(description = "ID") + private String id; + + /** + * 动作类型 + */ + @Parameter(description = "动作类型") + private IdentitySourceActionType actionType; + + /** + * 对象ID + */ + @Parameter(description = "对象ID") + private String objectId; + + /** + * 对象名称 + */ + @Parameter(description = "对象名称") + private String objectName; + + /** + * 对象类型 + */ + @Parameter(description = "对象类型") + private IdentitySourceObjectType objectType; + + /** + * 事件时间 + */ + @Parameter(description = "事件时间") + @JsonFormat(pattern = DEFAULT_DATE_TIME_FORMATTER_PATTERN) + private LocalDateTime eventTime; + + /** + * 事件状态 + */ + @Parameter(description = "事件状态") + private SyncStatus status; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceGetResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceGetResult.java new file mode 100644 index 00000000..94bbb527 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceGetResult.java @@ -0,0 +1,73 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.identitysource; + +import java.io.Serial; +import java.io.Serializable; + +import cn.topiam.employee.common.enums.identityprovider.IdentitySourceProvider; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 身份源源详情 + * + * @author TopIAM + */ +@Data +@Schema(description = "身份源源详情") +public class IdentitySourceGetResult implements Serializable { + @Serial + private static final long serialVersionUID = -1440230086940289961L; + /** + * ID + */ + @Parameter(description = "ID") + private String id; + /** + * 名称 + */ + @Parameter(description = "名称") + private String name; + /** + * 平台 + */ + @Parameter(description = "平台") + private IdentitySourceProvider provider; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + + /** + * 是否已配置 + */ + @Parameter(description = "是否已配置") + private Boolean configured; + + /** + * 备注 + */ + @Parameter(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceListResult.java new file mode 100644 index 00000000..53827644 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceListResult.java @@ -0,0 +1,77 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.identitysource; + +import java.io.Serializable; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 身份源列表 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/25 23:05 + */ +@Data +@Schema(description = "身份源列表") +public class IdentitySourceListResult implements Serializable { + /** + * 唯一标志 + */ + @Parameter(description = "ID") + private String id; + + /** + * 名称 + */ + @Parameter(description = "名称") + private String name; + + /** + * ICON + */ + @Parameter(description = "图标") + private String icon; + + /** + * 描述 + */ + @Parameter(description = "描述") + private String desc; + + /** + * 提供商 + */ + @Parameter(description = "提供商") + private String provider; + + /** + * 备注 + */ + @Parameter(description = "备注") + private String remark; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceSyncHistoryListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceSyncHistoryListResult.java new file mode 100644 index 00000000..e616da4f --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceSyncHistoryListResult.java @@ -0,0 +1,122 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.identitysource; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import cn.topiam.employee.common.enums.TriggerType; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceObjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; +import static cn.topiam.employee.support.constant.EiamConstants.DEFAULT_DATE_TIME_FORMATTER_PATTERN; + +/** + * 身份源同步记录详情列表 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/25 23:05 + */ +@Data +@Schema(description = "身份源同步历史列表") +public class IdentitySourceSyncHistoryListResult implements Serializable { + /** + * 唯一标志 + */ + @Parameter(description = "ID") + private String id; + + /** + * 批号 + */ + @Parameter(description = "批号") + private String batch; + + /** + * 身份源ID + */ + @Parameter(description = "身份源ID") + private String identitySourceId; + + /** + * 创建数量 + */ + @Parameter(description = "创建数量") + private String createdCount; + + /** + * 更新数量 + */ + @Parameter(description = "更新数量") + private String updatedCount; + + /** + * 删除数量 + */ + @Parameter(description = "删除数量") + private String deletedCount; + + /** + * 跳过数量 + */ + @Parameter(description = "跳过数量") + private String skippedCount; + + /** + * 开始时间 + */ + @Parameter(description = "开始时间") + @JsonFormat(pattern = DEFAULT_DATE_TIME_FORMATTER_PATTERN) + private LocalDateTime startTime; + + /** + * 结束时间 + */ + @Parameter(description = "结束时间") + @JsonFormat(pattern = DEFAULT_DATE_TIME_FORMATTER_PATTERN) + private LocalDateTime endTime; + + /** + * 耗时 + */ + @Parameter(description = "耗时") + private String spendTime; + + /** + * 对象类型(用户、组织) + */ + @Parameter(description = "对象类型") + private IdentitySourceObjectType objectType; + + /** + * 触发类型(手动、任务、事件) + */ + @Parameter(description = "触发类型") + private TriggerType triggerType; + + /** + * 同步状态 + */ + @Parameter(description = "同步状态") + private String status; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceSyncRecordListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceSyncRecordListResult.java new file mode 100644 index 00000000..74ae1b67 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/identitysource/IdentitySourceSyncRecordListResult.java @@ -0,0 +1,80 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.identitysource; + +import java.io.Serializable; + +import cn.topiam.employee.common.enums.identitysource.IdentitySourceActionType; +import cn.topiam.employee.common.enums.identitysource.IdentitySourceObjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 身份源同步详情列表 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/25 23:05 + */ +@Data +@Schema(description = "身份源同步记录列表") +public class IdentitySourceSyncRecordListResult implements Serializable { + /** + * ID + */ + @Parameter(description = "ID") + private String id; + + /** + * 动作类型 + */ + @Parameter(description = "动作类型") + private IdentitySourceActionType actionType; + + /** + * 对象ID + */ + @Parameter(description = "对象ID") + private String objectId; + + /** + * 对象名称 + */ + @Parameter(description = "对象名称") + private String objectName; + + /** + * 对象类型 + */ + @Parameter(description = "对象类型") + private IdentitySourceObjectType objectType; + + /** + * 状态 + */ + @Parameter(description = "状态") + private String status; + + /** + * 描述 + */ + @Parameter(description = "描述") + private String desc; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/package-info.java new file mode 100644 index 00000000..88580f78 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/AdministratorListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/AdministratorListResult.java new file mode 100644 index 00000000..a9fdb8cf --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/AdministratorListResult.java @@ -0,0 +1,103 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.setting; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import lombok.Data; +import lombok.experimental.Accessors; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; +import static cn.topiam.employee.support.constant.EiamConstants.DEFAULT_DATE_TIME_FORMATTER_PATTERN; + +/** + * 查询权限列表结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:08 + */ +@Data +@Accessors(chain = true) +@Schema(description = "查询权限列表结果") +public class AdministratorListResult implements Serializable { + + @Serial + private static final long serialVersionUID = 3320953184046791392L; + /** + * ID + */ + @Parameter(description = "ID") + private String id; + /** + * 用户名 + */ + @Parameter(description = "用户名") + private String username; + /** + * 邮箱 + */ + @Parameter(description = "邮箱") + private String email; + + /** + * 手机号 + */ + @Parameter(description = "手机号") + private String phone; + + /** + * 头像URL + */ + @Parameter(description = "头像URL") + private String avatar; + + /** + * 状态 ENABLE:启用 DISABLE:禁用 LOCKING:锁定 + */ + @Parameter(description = "状态") + private String status; + + /** + * 邮箱验证有效 + */ + @Parameter(description = "邮箱验证有效") + private Boolean emailVerified; + + /** + * 认证次数 + */ + @Parameter(description = "认证次数") + private Long authTotal; + + /** + * 上次认证IP + */ + @Parameter(description = "上次认证IP") + private String lastAuthIp; + /** + * 上次认证时间 + */ + @JsonFormat(pattern = DEFAULT_DATE_TIME_FORMATTER_PATTERN) + @Parameter(description = "上次认证时间") + private LocalDateTime lastAuthTime; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/AdministratorResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/AdministratorResult.java new file mode 100644 index 00000000..35461595 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/AdministratorResult.java @@ -0,0 +1,97 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.setting; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDateTime; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 管理员详情 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 21:45 + */ +@Schema(description = "根据ID获取管理员") +@Data +public class AdministratorResult implements Serializable { + + @Serial + private static final long serialVersionUID = 2578080414501381607L; + /** + * ID + */ + @Parameter(description = "ID") + private String id; + /** + * 用户名 + */ + @Parameter(description = "用户名") + private String username; + /** + * 邮箱 + */ + @Parameter(description = "邮箱") + private String email; + + /** + * 手机号 + */ + @Parameter(description = "手机号") + private String phone; + + /** + * 头像URL + */ + @Parameter(description = "头像URL") + private String avatar; + + /** + * 状态 ENABLE:启用 DISABLE:禁用 LOCKING:锁定 + */ + @Parameter(description = "状态") + private String status; + + /** + * 邮箱验证有效 + */ + @Parameter(description = "邮箱验证有效") + private Boolean emailVerified; + + /** + * 认证次数 + */ + @Parameter(description = "认证次数") + private Long authTotal; + + /** + * 上次认证IP + */ + @Parameter(description = "上次认证IP") + private String lastAuthIp; + /** + * 上次认证时间 + */ + @Parameter(description = "上次认证时间") + private LocalDateTime lastAuthTime; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/EmailProviderConfigResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/EmailProviderConfigResult.java new file mode 100644 index 00000000..1ae77ccc --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/EmailProviderConfigResult.java @@ -0,0 +1,96 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.setting; + +import java.io.Serial; +import java.io.Serializable; + +import cn.topiam.employee.common.message.enums.MailProvider; +import cn.topiam.employee.common.message.enums.MailSafetyType; + +import lombok.Builder; +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 邮件服务商配置查询结果 + * + * @author TopIAM + */ +@Data +@Builder +@Schema(description = "邮件服务商配置查询结果") +public class EmailProviderConfigResult implements Serializable { + @Serial + private static final long serialVersionUID = 8584300384703986791L; + + /** + * smtp地址 + */ + @Parameter(description = "smtp地址") + private String smtpUrl; + + /** + * 端口 + */ + @Parameter(description = "端口") + private Integer port; + + /** + * 安全验证 + */ + @Parameter(description = "安全验证") + private MailSafetyType safetyType; + + /** + * 用户名 + */ + @Parameter(description = "用户名") + private String username; + + /** + * 秘钥 + */ + @Parameter(description = "秘钥") + private String secret; + + /** + * 配置JSON串 + */ + @Parameter(description = "配置JSON串") + private String config; + + /** + * 平台 + */ + @Parameter(description = "平台") + private MailProvider provider; + + /** + * 描述 + */ + @Parameter(description = "描述") + private String desc; + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/EmailTemplateListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/EmailTemplateListResult.java new file mode 100644 index 00000000..745fa773 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/EmailTemplateListResult.java @@ -0,0 +1,64 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.setting; + +import java.io.Serial; +import java.io.Serializable; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 邮件模板类型返回值 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/19 22:09 + */ +@Schema(description = "邮件模板类列表返回值") +@Data +public class EmailTemplateListResult implements Serializable { + @Serial + private static final long serialVersionUID = 6499437680155500022L; + /** + * 名称 + */ + @Parameter(description = "名称") + private String name; + /** + * 编码 + */ + @Parameter(description = "编码") + private String code; + /** + * 自定义 + */ + @Parameter(description = "自定义") + private Boolean custom; + /** + * 描述 + */ + @Parameter(description = "详情") + private String description; + /** + * 内容 + */ + @Parameter(description = "内容") + private String content; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/EmailTemplateResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/EmailTemplateResult.java new file mode 100644 index 00000000..00c76460 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/EmailTemplateResult.java @@ -0,0 +1,74 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.setting; + +import java.io.Serial; +import java.io.Serializable; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 邮件模板配置结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/17 23:05 + */ +@Data +@Schema(description = "获取邮件模板") +public class EmailTemplateResult implements Serializable { + @Serial + private static final long serialVersionUID = 6499437680155500022L; + /** + * 名称 + */ + @Parameter(description = "名称") + private String name; + /** + * 发送人 + */ + @Parameter(description = "发送人") + private String sender; + + /** + * 主题 + */ + @Parameter(description = "主题") + private String subject; + + /** + * 内容 + */ + @Parameter(description = "内容") + private String content; + + /** + * 描述 + */ + @Parameter(description = "描述") + private String desc; + + /** + * 自定义 + */ + @Parameter(description = "自定义") + private Boolean custom; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/GeoIpProviderResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/GeoIpProviderResult.java new file mode 100644 index 00000000..54ddef4b --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/GeoIpProviderResult.java @@ -0,0 +1,63 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.setting; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.geo.GeoLocationProviderConfig; +import cn.topiam.employee.common.geo.maxmind.enums.GeoLocationProvider; + +import lombok.Builder; +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 获取地理位置服务商配置信息 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 21:27 + */ +@Data +@Builder +@Schema(description = "获取地理位置服务商配置信息") +public class GeoIpProviderResult implements Serializable { + @Serial + private static final long serialVersionUID = -6723117700517052520L; + /** + * 地理位置服务商 + */ + @Schema(description = "地理位置提供商") + @NotNull(message = "地理位置提供商不能为空") + private GeoLocationProvider provider; + + /** + * 配置信息 + */ + @Schema(description = "配置信息") + private GeoLocationProviderConfig.GeoLocationConfig config; + /** + * 是否启用 + */ + @Schema(description = "是否启用") + private Boolean enabled; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/PasswordPolicyConfigResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/PasswordPolicyConfigResult.java new file mode 100644 index 00000000..92dd74e6 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/PasswordPolicyConfigResult.java @@ -0,0 +1,107 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.setting; + +import java.io.Serializable; + +import cn.topiam.employee.core.security.password.enums.PasswordComplexityRule; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 设置密码策略配置结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/10/4 19:48 + */ +@Data +public class PasswordPolicyConfigResult implements Serializable { + /** + * 密码最大长度 + */ + @Schema(description = "密码最大长度") + private Integer passwordBiggestLength; + + /** + * 密码最小长度 + */ + @Schema(description = "密码最小长度") + private Integer passwordLeastLength; + + /** + * 复杂度 + */ + @Schema(description = "密码复杂度") + private PasswordComplexityRule passwordComplexity; + + /** + * 弱密码库 + */ + @Schema(description = "自定义弱密码") + private String customWeakPassword; + + /** + * 弱密码检查 + */ + @Schema(description = "弱密码检查") + private Boolean weakPasswordCheck; + + /** + * 账户信息检查 + */ + @Schema(description = "账户信息检查") + private Boolean includeAccountCheck; + + /** + * 不能多少个以上相同字符 + */ + @Schema(description = "不能多少个以上相同字符") + private Integer notSameChars; + + /** + * 历史密码检查 + */ + @Schema(description = "历史密码检查") + private Boolean historyPasswordCheck; + + /** + * 历史密码检查次数 + */ + @Schema(description = "历史密码检查次数") + private Integer historyPasswordCheckCount; + + /** + * 非法序列检查 + */ + @Schema(description = "非法序列检查") + private Boolean illegalSequenceCheck; + + /** + * 密码有效天数 + */ + @Schema(description = "密码有效天数") + private Integer passwordValidDays; + + /** + * 密码过期前提醒天数 + */ + @Schema(description = "密码有效提醒天数") + private Integer passwordValidWarnBeforeDays; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/SecurityBasicConfigResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/SecurityBasicConfigResult.java new file mode 100644 index 00000000..979516b9 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/SecurityBasicConfigResult.java @@ -0,0 +1,77 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.setting; + +import java.io.Serializable; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 安全高级配置结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/10/4 21:58 + */ +@Data +@Schema(description = "安全高级配置结果") +public class SecurityBasicConfigResult implements Serializable { + /** + * 会话有效时间 + */ + @Parameter(description = "会话有效时间(秒)") + private Integer sessionValidTime; + + /** + * 验证码有效时间 + */ + @Parameter(description = "验证码有效时间(秒)") + private Integer verifyCodeValidTime; + + /** + * 记住我有效时间 + */ + @Schema(description = "记住我有效时间(秒)") + private Integer rememberMeValidTime; + + /** + * 用户并发数 + */ + @Parameter(description = "用户并发数") + private Integer sessionMaximum; + + /** + * 连续登录失败持续时间 + */ + @Parameter(description = "连续登录失败持续时间") + private Integer loginFailureDuration; + + /** + * 连续登录失败次数 + */ + @Parameter(description = "连续登录失败次数") + private Integer loginFailureCount; + + /** + * 自动解锁时间(分) + */ + @Parameter(description = "自动解锁时间(分)") + private Integer autoUnlockTime; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/SecurityCaptchaConfigResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/SecurityCaptchaConfigResult.java new file mode 100644 index 00000000..d10f24db --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/SecurityCaptchaConfigResult.java @@ -0,0 +1,56 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.setting; + +import java.io.Serializable; + +import cn.topiam.employee.common.enums.CaptchaProviderType; +import cn.topiam.employee.core.security.captcha.CaptchaProviderConfig; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 行为验证码配置结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/10/4 21:58 + */ +@Data +@Schema(description = "行为验证码配置结果") +public class SecurityCaptchaConfigResult implements Serializable { + /** + * 验证码提供商 + */ + @Parameter(description = "验证码提供商") + private CaptchaProviderType provider; + + /** + * 验证码配置 + */ + @Parameter(description = "验证码配置") + private CaptchaProviderConfig config; + + /** + * 已启用 + */ + @Parameter(description = "已启用") + private Boolean enabled; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/SecurityMfaConfigResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/SecurityMfaConfigResult.java new file mode 100644 index 00000000..e996f107 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/SecurityMfaConfigResult.java @@ -0,0 +1,51 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.setting; + +import java.io.Serializable; +import java.util.List; + +import cn.topiam.employee.common.enums.MfaFactor; +import cn.topiam.employee.common.enums.MfaMode; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 安全MFA配置结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/10/4 21:58 + */ +@Data +@Schema(description = "安全MFA配置结果") +public class SecurityMfaConfigResult implements Serializable { + /** + * mode + */ + @Parameter(description = "MFA 模式") + private MfaMode mode; + + /** + * manner + */ + @Parameter(description = "MFA 因素") + private List factors; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/SmsTemplateListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/SmsTemplateListResult.java new file mode 100644 index 00000000..a2eca67e --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/SmsTemplateListResult.java @@ -0,0 +1,73 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.setting; + +import java.io.Serial; +import java.io.Serializable; + +import cn.topiam.employee.common.enums.Language; +import cn.topiam.employee.common.enums.MessageCategory; +import cn.topiam.employee.common.enums.SmsType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 短信配置结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/17 23:05 + */ +@Data +@Schema(description = "获取短信模板列表") +public class SmsTemplateListResult implements Serializable { + + @Serial + private static final long serialVersionUID = 5983857137670090984L; + + /** + * 名称 + */ + @Schema(description = "名称") + private String name; + + /** + * 类型 + */ + @Schema(description = "类型") + private SmsType type; + + /** + * 模板类型 + */ + @Schema(description = "模板类型") + private MessageCategory category; + + /** + * 内容 + */ + @Schema(description = "内容") + private String content; + + /** + * Language + */ + @Schema(description = "Language") + private Language language; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/StorageProviderConfigResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/StorageProviderConfigResult.java new file mode 100644 index 00000000..fb997c0d --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/StorageProviderConfigResult.java @@ -0,0 +1,61 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.setting; + +import java.io.Serial; +import java.io.Serializable; + +import cn.topiam.employee.common.storage.StorageConfig; +import cn.topiam.employee.common.storage.enums.StorageProvider; + +import lombok.Builder; +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 存储配置查询结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/1 23:40 + */ +@Data +@Builder +@Schema(description = "存储配置查询结果") +public class StorageProviderConfigResult implements Serializable { + + @Serial + private static final long serialVersionUID = -2667374916357438335L; + /** + * 服务商 + */ + @Parameter(description = "服务商") + private StorageProvider provider; + /** + * 启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + /** + * 配置信息 + */ + @Parameter(description = "配置信息") + private StorageConfig config; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/WeakPasswordLibListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/WeakPasswordLibListResult.java new file mode 100644 index 00000000..d8bb7324 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/setting/WeakPasswordLibListResult.java @@ -0,0 +1,43 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.result.setting; + +import java.io.Serializable; + +import lombok.Data; +import lombok.RequiredArgsConstructor; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 弱密码列表查询结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/10/11 19:19 + */ +@Data +@RequiredArgsConstructor +@Schema(description = "弱密码列表查询结果") +public class WeakPasswordLibListResult implements Serializable { + /** + * value + */ + @Parameter(description = "value") + private final String value; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/account/OrganizationCreateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/account/OrganizationCreateParam.java new file mode 100644 index 00000000..132b0924 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/account/OrganizationCreateParam.java @@ -0,0 +1,101 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.account; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.enums.OrganizationType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 创建组织架构入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:16 + */ +@Data +@Schema(description = "创建组织架构入参") +public class OrganizationCreateParam implements Serializable { + @Serial + private static final long serialVersionUID = 3118058164024117164L; + + /** + * code + */ + @Schema(description = "编码") + private String code; + + /** + * 上级部门 + */ + @NotEmpty(message = "请选择上级组织") + @Schema(description = "上级组织") + private String parentId; + + /** + * 名称 + */ + @Schema(description = "架构名称") + @NotBlank(message = "名称不能为空") + private String name; + + /** + * 类型 + */ + @Schema(description = "架构类型") + @NotNull(message = "类型不能为空") + private OrganizationType type; + + /** + * 外部ID + */ + @Schema(description = "外部ID") + private String externalId; + + /** + * 区域 + */ + @Schema(description = "所在区域") + private String area; + + /** + * 描述 + */ + @Schema(description = "架构描述") + private String desc; + + /** + * 排序 + */ + @Schema(description = "架构排序") + private String order; + + /** + * 是否启用 + */ + @Schema(description = "是否启用") + private Boolean enabled; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/account/UserCreateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/account/UserCreateParam.java new file mode 100644 index 00000000..5485396a --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/account/UserCreateParam.java @@ -0,0 +1,128 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.account; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; +import java.util.List; + +import javax.validation.constraints.Email; +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +import cn.topiam.employee.common.enums.ListEnumDeserializer; +import cn.topiam.employee.common.enums.MessageNoticeChannel; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 用户创建请求入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:16 + */ +@Data +@Schema(description = "创建用户入参") +public class UserCreateParam implements Serializable { + @Serial + private static final long serialVersionUID = -6044649488381303849L; + /** + * 组织机构 + */ + @Schema(description = "组织机构") + @NotBlank(message = "组织机构不能为空") + private String organizationId; + + /** + * 用户名 + */ + @Schema(description = "用户名") + @NotBlank(message = "用户名不能为空") + private String username; + + /** + * 密码 + */ + @Schema(description = "登录密码") + @NotBlank(message = "登录密码不能为空") + private String password; + + /** + * 邮箱 + */ + @Email + @Schema(description = "邮箱") + private String email; + + /** + * 手机号 + */ + @Schema(description = "手机号") + private String phone; + + /** + * 姓名 + */ + @NotBlank(message = "姓名不能为空") + @Schema(description = "姓名") + private String fullName; + + /** + * 昵称 + */ + @Schema(description = "昵称") + private String nickName; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; + + /** + * 过期日期 + */ + @Schema(description = "过期日期") + private LocalDate expireDate; + + /** + * 密码初始化配置 + */ + @Schema(description = "密码初始化配置") + private PasswordInitializeConfig passwordInitializeConfig; + + @Data + public static class PasswordInitializeConfig implements Serializable { + /** + * 启用通知 + */ + @Schema(description = "启用通知") + private Boolean enableNotice; + + /** + * 消息类型 + */ + @Schema(description = "消息类型") + @JsonDeserialize(using = ListEnumDeserializer.class) + private List noticeChannels; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/account/UserGroupCreateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/account/UserGroupCreateParam.java new file mode 100644 index 00000000..b11e9a42 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/account/UserGroupCreateParam.java @@ -0,0 +1,59 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.account; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 用户创建请求入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:16 + */ +@Data +@Schema(description = "创建用户分组入参") +public class UserGroupCreateParam implements Serializable { + @Serial + private static final long serialVersionUID = -6044649488381303849L; + /** + * 用户组名称 + */ + @Schema(description = "用户组名称") + @NotBlank(message = "用户组名称不能为空") + private String name; + + /** + * 用户组编码 + */ + @Schema(description = "用户组编码") + @NotBlank(message = "用户组编码不能为空") + private String code; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppAccessPolicyCreateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppAccessPolicyCreateParam.java new file mode 100644 index 00000000..15818d09 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppAccessPolicyCreateParam.java @@ -0,0 +1,60 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.app; + +import java.util.List; + +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.enums.PolicySubjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 应用访问授权策略添加参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/27 19:29 + */ +@Data +@Schema(description = "应用访问授权策略添加参数") +public class AppAccessPolicyCreateParam { + + /** + * 应用ID + */ + @Schema(description = "应用ID") + @NotNull(message = "应用ID不能为空") + private String appId; + + /** + * 主体ID(用户、分组、组织机构) + */ + @Schema(description = "主体") + @NotNull(message = "主体不能为空") + private List subjectIds; + + /** + * 主体类型(用户、分组、组织机构) + */ + @Schema(description = "主体类型") + @NotNull(message = "主体类型不能为空") + private PolicySubjectType subjectType; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppAccountCreateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppAccountCreateParam.java new file mode 100644 index 00000000..ede8d543 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppAccountCreateParam.java @@ -0,0 +1,57 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.app; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * AppAccountCreateParam 应用账户新增入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/24 22:13 + */ +@Data +@Schema(description = "应用账户新增入参") +public class AppAccountCreateParam { + + /** + * 应用ID + */ + @Schema(description = "应用ID") + @NotNull(message = "应用ID不能为空") + private Long appId; + + /** + * 用户ID + */ + @Schema(description = "用户ID") + @NotNull(message = "用户ID不能为空") + private Long userId; + + /** + * 账户名称 + */ + @Schema(description = "账户名称") + @NotBlank(message = "账户名称不能为空") + private String account; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppCreateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppCreateParam.java new file mode 100644 index 00000000..efe6a88a --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppCreateParam.java @@ -0,0 +1,58 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.app; + +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 应用保存入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/7/18 23:26 + */ +@Data +@Schema(description = "应用保存入参") +public class AppCreateParam implements Serializable { + + /** + * 应用名称 + */ + @NotBlank(message = "应用名称不能为空") + @Schema(description = "应用名称") + private String name; + + /** + * 应用模版 + */ + @NotNull(message = "应用模版不能为空") + @Schema(description = "应用模版") + private String template; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppPermissionPolicyCreateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppPermissionPolicyCreateParam.java new file mode 100644 index 00000000..79db9a06 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppPermissionPolicyCreateParam.java @@ -0,0 +1,84 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.app; + +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.enums.PolicyEffect; +import cn.topiam.employee.common.enums.PolicyObjectType; +import cn.topiam.employee.common.enums.PolicySubjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 创建策略入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 21:46 + */ +@Data +@Schema(description = "创建策略入参") +public class AppPermissionPolicyCreateParam implements Serializable { + + /** + * 所属应用 + */ + @NotNull(message = "资源所属应用不能为空") + @Parameter(description = "所属应用") + private Long appId; + + /** + * 授权主体id + */ + @NotNull(message = "授权主体id不能为空") + @Parameter(description = "授权主体id") + private String subjectId; + + /** + * 权限主体类型(用户、角色、分组、组织机构) + */ + @NotNull(message = "授权主体类型不能为空") + @Parameter(description = "授权主体类型") + private PolicySubjectType subjectType; + + /** + * 权限客体ID + */ + @NotNull(message = "权限客体ID不能为空") + @Parameter(description = "授权客体id") + private Long objectId; + + /** + * 权限客体类型(权限、角色) + */ + @NotNull(message = "权限客体类型不能为空") + @Parameter(description = "授权客体类型") + private PolicyObjectType objectType; + + /** + * 授权作用 + */ + @NotNull(message = "授权作用不能为空") + @Parameter(description = "授权作用") + private PolicyEffect effect; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppPermissionResourceCreateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppPermissionResourceCreateParam.java new file mode 100644 index 00000000..7b2cc6bc --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppPermissionResourceCreateParam.java @@ -0,0 +1,76 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.app; + +import java.io.Serializable; +import java.util.List; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 资源创建参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 21:46 + */ +@Data +@Schema(description = "创建资源入参") +public class AppPermissionResourceCreateParam implements Serializable { + /** + * 编码 + */ + @Schema(description = "资源编码") + @NotBlank(message = "资源编码不能为空") + private String code; + /** + * 名称 + */ + @Schema(description = "资源名称") + @NotBlank(message = "资源名称不能为空") + private String name; + /** + * 描述 + */ + @Schema(description = "资源描述") + @NotBlank(message = "资源描述不能为空") + private String desc; + + /** + * 是否启用 + */ + private Boolean enabled = true; + + /** + * 所属应用 + */ + @Schema(description = "所属应用") + @NotNull(message = "所属应用不能为空") + private Long appId; + + /** + * 资源权限 + */ + @Schema(description = "资源权限") + @NotNull(message = "资源权限不能为空") + private List actions; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppPermissionRoleCreateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppPermissionRoleCreateParam.java new file mode 100644 index 00000000..f1b75aec --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppPermissionRoleCreateParam.java @@ -0,0 +1,62 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.app; + +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 角色创建参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 21:46 + */ +@Data +@Schema(description = "创建角色入参") +public class AppPermissionRoleCreateParam implements Serializable { + /** + * 角色名称 + */ + @NotBlank(message = "角色名称不能为空") + private String name; + /** + * 角色编码 + */ + @NotBlank(message = "角色编码不能为空") + private String code; + /** + * 启用 + */ + private Boolean enabled = true; + /** + * 所属应用 + */ + @NotNull(message = "所属应用不能为空") + private Long appId; + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppPermissionsActionParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppPermissionsActionParam.java new file mode 100644 index 00000000..b60bd32f --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppPermissionsActionParam.java @@ -0,0 +1,59 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.app; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.Valid; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.enums.PermissionActionType; + +import lombok.Data; + +/** + * AppPermissionsActionParam + * + * @author TopIAM + * Created by support@topiam.cn on 2022/9/1 00:18 + */ +@Data +@Valid +public class AppPermissionsActionParam implements Serializable { + + @Serial + private static final long serialVersionUID = -6391182747252245592L; + + /** + * 权限类型 + */ + @NotNull(message = "权限类型") + private PermissionActionType type; + /** + * 权限值 + */ + @NotEmpty(message = "权限值") + private String value; + /** + * 权限描述 + */ + @NotEmpty(message = "权限描述") + private String name; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppSaveConfigParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppSaveConfigParam.java new file mode 100644 index 00000000..c9ef45d5 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/app/AppSaveConfigParam.java @@ -0,0 +1,52 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.app; + +import java.io.Serializable; +import java.util.Map; + +import javax.validation.constraints.NotNull; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 更新应用配置入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/7/18 23:26 + */ +@Data +@Schema(description = "更新应用配置入参") +public class AppSaveConfigParam implements Serializable { + + /** + * id + */ + @Schema(description = "应用id") + @NotNull(message = "ID不能为空") + private Long id; + + /** + * 配置 + */ + @Schema(description = "配置") + @NotNull(message = "配置不能为空") + private Map config; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/authentication/IdentityProviderCreateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/authentication/IdentityProviderCreateParam.java new file mode 100644 index 00000000..f3ff9631 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/authentication/IdentityProviderCreateParam.java @@ -0,0 +1,87 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.authentication; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.common.enums.IdentityProviderCategory; +import cn.topiam.employee.common.enums.IdentityProviderType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 源创建参数入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/21 21:21 + */ +@Data +@Schema(description = "认证源保存入参") +public class IdentityProviderCreateParam implements Serializable { + @Serial + private static final long serialVersionUID = -1440230086940289961L; + + /** + * 认证源名称 + */ + @NotBlank(message = "认证源名称不能为空") + @Schema(description = "认证源名称") + private String name; + + /** + * 提供商 + */ + @NotNull(message = "提供商不能为空") + @Schema(description = "提供商") + private IdentityProviderType type; + + /** + * 身份源类型 + */ + @NotNull(message = "身份源类型不能为空") + @Schema(description = "身份源类型") + private IdentityProviderCategory category; + + /** + * 配置 + */ + @NotNull(message = "配置不能为空") + @Schema(description = "配置JSON") + private JSONObject config; + + /** + * 是否展示 + */ + @Schema(description = "是否展示") + private Boolean displayed; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/authentication/InitializeAdminSaveParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/authentication/InitializeAdminSaveParam.java new file mode 100644 index 00000000..9ffe2550 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/authentication/InitializeAdminSaveParam.java @@ -0,0 +1,68 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.authentication; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.Email; +import javax.validation.constraints.NotBlank; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 初始化管理员入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/7/18 23:26 + */ +@Data +@Schema(description = "初始化管理员入参") +public class InitializeAdminSaveParam implements Serializable { + + @Serial + private static final long serialVersionUID = -6383799540993308458L; + /** + * 用户名 + */ + @Schema(description = "用户名") + @NotBlank(message = "用户名不能为空") + private String username; + /** + * 密码 + */ + @Schema(description = "密码") + @NotBlank(message = "密码不能为空") + private String password; + /** + * 确认密码 + */ + @Schema(description = "确认密码") + @NotBlank(message = "确认密码不能为空") + private String confirmPassword; + /** + * 邮箱 + */ + @Schema(description = "邮箱") + @Email(message = "邮箱格式不正确") + @NotBlank(message = "邮箱不能为空") + private String email; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/identitysource/IdentitySourceConfigSaveParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/identitysource/IdentitySourceConfigSaveParam.java new file mode 100644 index 00000000..312e31c6 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/identitysource/IdentitySourceConfigSaveParam.java @@ -0,0 +1,76 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.identitysource; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.Valid; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.common.entity.identitysource.config.JobConfig; +import cn.topiam.employee.common.entity.identitysource.config.StrategyConfig; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 身份源保存配置入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/25 23:01 + */ +@Data +@Schema(description = "保存身份源配置入参") +public class IdentitySourceConfigSaveParam implements Serializable { + @Serial + private static final long serialVersionUID = -1440230086940289961L; + /** + * ID + */ + @Parameter(description = "ID") + @NotEmpty(message = "ID不能为空") + private String id; + + /** + * 提供商配置 + */ + @NotNull(message = "提供商配置不能为空") + @Parameter(description = "提供商配置") + private JSONObject basicConfig; + + /** + * 策略配置 + */ + @NotNull(message = "策略配置不能为空") + @Parameter(description = "策略配置") + private StrategyConfig strategyConfig; + + /** + * 任务配置 + */ + @Valid + @NotNull(message = "任务配置不能为空") + @Parameter(description = "任务配置") + private JobConfig jobConfig; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/identitysource/IdentitySourceCreateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/identitysource/IdentitySourceCreateParam.java new file mode 100644 index 00000000..6a8acbe1 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/identitysource/IdentitySourceCreateParam.java @@ -0,0 +1,65 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.identitysource; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.enums.identityprovider.IdentitySourceProvider; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 身份源保存入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/1 01:37 + */ +@Data +@Schema(description = "身份源保存入参") +public class IdentitySourceCreateParam implements Serializable { + + @Serial + private static final long serialVersionUID = 4217715726184249167L; + /** + * 名称 + */ + @Parameter(description = "名称") + @NotEmpty(message = "名称不能为空") + private String name; + + /** + * 身份源提供商 + */ + @Parameter(description = "身份源提供商") + @NotNull(message = "身份源提供商不能为空") + private IdentitySourceProvider provider; + + /** + * 备注 + */ + @Parameter(description = "备注") + private String remark; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/identitysource/IdentitySourceCreateResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/identitysource/IdentitySourceCreateResult.java new file mode 100644 index 00000000..d950b92e --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/identitysource/IdentitySourceCreateResult.java @@ -0,0 +1,43 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.identitysource; + +import java.io.Serializable; + +import lombok.AllArgsConstructor; +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 身份源创建返回结果 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/21 19:34 + */ +@Data +@AllArgsConstructor +@Schema(description = "身份源创建返回结果") +public class IdentitySourceCreateResult implements Serializable { + /** + * ID + */ + @Parameter(description = "ID") + private String id; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/AdministratorCreateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/AdministratorCreateParam.java new file mode 100644 index 00000000..c975f6eb --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/AdministratorCreateParam.java @@ -0,0 +1,69 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.setting; + +import java.io.Serializable; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 权限创建参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 21:46 + */ +@Data +@Schema(description = "创建权限入参") +public class AdministratorCreateParam implements Serializable { + /** + * 用户名 + */ + @Schema(description = "用户名") + private String username; + /** + * 邮箱 + */ + @Schema(description = "邮箱") + private String email; + + /** + * 手机号 + */ + @Schema(description = "手机号") + private String phone; + /** + * 密码 + */ + @Schema(description = "密码") + private String password; + + /** + * 头像URL + */ + @Schema(description = "头像URL") + private String avatar; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/EmailCustomTemplateSaveParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/EmailCustomTemplateSaveParam.java new file mode 100644 index 00000000..3f222c39 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/EmailCustomTemplateSaveParam.java @@ -0,0 +1,61 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.setting; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 邮件模板配置更新参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/17 23:20 + */ +@Data +@Schema(description = "邮件模板配置保存入参") +public class EmailCustomTemplateSaveParam implements Serializable { + @Serial + private static final long serialVersionUID = -4437284094645205715L; + + /** + * 发送人 + */ + @Schema(description = "发件人") + @NotBlank(message = "发件人不能为空") + private String sender; + + /** + * 主题 + */ + @Schema(description = "主题") + @NotBlank(message = "邮件主题不能为空") + private String subject; + + /** + * 内容 + */ + @Schema(description = "内容") + @NotBlank(message = "邮件内容不能为空") + private String content; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/GeoIpProviderSaveParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/GeoIpProviderSaveParam.java new file mode 100644 index 00000000..096ce8c3 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/GeoIpProviderSaveParam.java @@ -0,0 +1,56 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.setting; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.common.geo.maxmind.enums.GeoLocationProvider; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 保存地理位置服务商配置入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 21:27 + */ +@Data +@Schema(description = "保存地理位置服务商配置入参") +public class GeoIpProviderSaveParam implements Serializable { + @Serial + private static final long serialVersionUID = -6723117700517052520L; + /** + * 地理位置服务商 + */ + @Schema(description = "地理位置提供商") + @NotNull(message = "地理位置提供商不能为空") + private GeoLocationProvider provider; + + /** + * 配置信息 + */ + @Schema(description = "配置信息") + private JSONObject config; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/MailProviderSaveParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/MailProviderSaveParam.java new file mode 100644 index 00000000..f5b10bc8 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/MailProviderSaveParam.java @@ -0,0 +1,79 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.setting; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.message.enums.MailProvider; +import cn.topiam.employee.common.message.enums.MailSafetyType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 保存邮件服务商配置入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 21:27 + */ +@Data +@Schema(description = "保存邮件服务商配置入参") +public class MailProviderSaveParam implements Serializable { + @Serial + private static final long serialVersionUID = -6723117700517052520L; + /** + * 平台 + */ + @Schema(description = "提供商") + @NotNull(message = "邮件提供商不能为空") + private MailProvider provider; + /** + * smtp地址 + */ + @Schema(description = "smtp地址") + private String smtpUrl; + + /** + * 端口 + */ + @Schema(description = "端口") + private Integer port; + + /** + * 安全验证 + */ + @Schema(description = "安全验证") + private MailSafetyType safetyType; + + /** + * 用户名 + */ + @Schema(description = "用户名") + private String username; + + /** + * 密码 + */ + @Schema(description = "密码") + private String secret; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/PasswordPolicySaveParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/PasswordPolicySaveParam.java new file mode 100644 index 00000000..100d3954 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/PasswordPolicySaveParam.java @@ -0,0 +1,108 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.setting; + +import java.io.Serializable; + +import cn.topiam.employee.core.security.password.enums.PasswordComplexityRule; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 设置密码策略保存参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/25 21:16 + */ +@Data +@Schema(description = "密码策略保存参数") +public class PasswordPolicySaveParam implements Serializable { + /** + * 密码最大长度 + */ + @Schema(description = "密码最大长度") + private Integer passwordBiggestLength; + + /** + * 密码最小长度 + */ + @Schema(description = "密码最小长度") + private Integer passwordLeastLength; + + /** + * 复杂度 + */ + @Schema(description = "密码复杂度") + private PasswordComplexityRule passwordComplexity; + + /** + * 弱密码检查 + */ + @Schema(description = "弱密码检查") + private Boolean weakPasswordCheck; + + /** + * 账户信息检查 + */ + @Schema(description = "账户信息检查") + private Boolean includeAccountCheck; + + /** + * 不能多少个以上相同字符 + */ + @Schema(description = "不能多少个以上相同字符") + private Integer notSameChars; + + /** + * 历史密码检查 + */ + @Schema(description = "历史密码检查") + private Boolean historyPasswordCheck; + + /** + * 历史密码检查次数 + */ + @Schema(description = "历史密码检查次数") + private Integer historyPasswordCheckCount; + + /** + * 非法序列检查 + */ + @Schema(description = "非法序列检查") + private Boolean illegalSequenceCheck; + + /** + * 密码有效天数 + */ + @Schema(description = "密码有效天数") + private Integer passwordValidDays; + + /** + * 密码过期前提醒天数 + */ + @Schema(description = "密码有效提醒天数") + private Integer passwordValidWarnBeforeDays; + + /** + * 自定义弱密码 + */ + @Schema(description = "自定义弱密码") + private String customWeakPassword; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/SecurityBasicSaveParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/SecurityBasicSaveParam.java new file mode 100644 index 00000000..77c270c2 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/SecurityBasicSaveParam.java @@ -0,0 +1,77 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.setting; + +import java.io.Serializable; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 安全高级保存参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/10/4 19:05 + */ +@Data +@Schema(description = "安全高级保存入参") +public class SecurityBasicSaveParam implements Serializable { + /** + * 会话有效时间 + */ + @Parameter(description = "会话有效时间(秒)") + private Integer sessionValidTime; + + /** + * 短信验证码有效时间 + */ + @Parameter(description = "短信验证码有效时间(秒)") + private Integer smsCodeValidTime; + + /** + * 记住我有效时间 + */ + @Schema(description = "记住我有效时间(秒)") + private Integer rememberMeValidTime; + + /** + * 用户并发数 + */ + @Parameter(description = "用户并发数") + private Integer sessionMaximum; + + /** + * 连续登录失败持续时间 + */ + @Parameter(description = "连续登录失败持续时间") + private Integer loginFailureDuration; + + /** + * 连续登录失败次数 + */ + @Parameter(description = "连续登录失败次数") + private Integer loginFailureCount; + + /** + * 自动解锁时间(分) + */ + @Parameter(description = "自动解锁时间(分)") + private Integer autoUnlockTime; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/SecurityCaptchaSaveParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/SecurityCaptchaSaveParam.java new file mode 100644 index 00000000..63e457cb --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/SecurityCaptchaSaveParam.java @@ -0,0 +1,55 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.setting; + +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.common.enums.CaptchaProviderType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 行为验证码保存入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/10/4 19:05 + */ +@Data +@Schema(description = "行为验证码保存入参") +public class SecurityCaptchaSaveParam implements Serializable { + /** + * 验证码提供商 + */ + @Parameter(description = "验证码提供商") + @NotNull(message = "验证码提供商不能为空") + private CaptchaProviderType provider; + + /** + * 验证码配置 + */ + @Parameter(description = "验证码配置") + @NotNull(message = "验证码配置不能为空") + private JSONObject config; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/SecurityMfaSaveParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/SecurityMfaSaveParam.java new file mode 100644 index 00000000..1684768e --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/SecurityMfaSaveParam.java @@ -0,0 +1,55 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.setting; + +import java.io.Serializable; +import java.util.List; + +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.enums.MfaFactor; +import cn.topiam.employee.common.enums.MfaMode; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 安全MFA配置保存入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/10/4 19:05 + */ +@Data +@Schema(description = "安全MFA配置保存入参") +public class SecurityMfaSaveParam implements Serializable { + /** + * mode + */ + @NotNull(message = "MFA 模式不能为空") + @Parameter(description = "MFA 模式") + private MfaMode mode; + + /** + * factors + */ + @Parameter(description = "MFA 因素") + @NotNull(message = "MFA 因素不能为空") + private List factors; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/SmsProviderSaveParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/SmsProviderSaveParam.java new file mode 100644 index 00000000..e89f1c17 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/SmsProviderSaveParam.java @@ -0,0 +1,75 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.setting; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; + +import javax.validation.constraints.NotNull; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.common.entity.setting.config.SmsConfig; +import cn.topiam.employee.common.enums.Language; +import cn.topiam.employee.common.message.enums.SmsProvider; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 保存短信服务商创建请求入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/7/31 19:34 + */ +@Data +@Schema(description = "保存短信验证服务入参") +public class SmsProviderSaveParam implements Serializable { + @Serial + private static final long serialVersionUID = 4125843198392920166L; + + /** + * 平台 + */ + @Schema(description = "提供商") + @NotNull(message = "短信提供商不能为空") + private SmsProvider provider; + + /** + * 配置JSON串 + */ + @Schema(description = "配置JSON串") + @NotNull(message = "配置不能为空") + private JSONObject config; + + /** + * 场景语言 + */ + @Schema(description = "场景语言") + @NotNull(message = "场景语言不能为空") + private Language language; + + /** + * 短信模板配置 + */ + @Schema(description = "短信模板配置") + @NotNull(message = "短信模板配置不能为空") + private List templates; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/StorageConfigSaveParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/StorageConfigSaveParam.java new file mode 100644 index 00000000..d56aa982 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/save/setting/StorageConfigSaveParam.java @@ -0,0 +1,56 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.save.setting; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.common.storage.enums.StorageProvider; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 保存存储配置入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 21:27 + */ +@Data +@Schema(description = "保存存储配置入参") +public class StorageConfigSaveParam implements Serializable { + @Serial + private static final long serialVersionUID = -6723117700517052520L; + /** + * provider + */ + @NotNull(message = "存储提供商不能为空") + @Schema(description = "存储提供商") + private StorageProvider provider; + /** + * config + */ + @NotNull(message = "存储提供商配置不能为空") + @Schema(description = "配置JSON串") + private JSONObject config; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/setting/SmsProviderConfigResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/setting/SmsProviderConfigResult.java new file mode 100644 index 00000000..c795412c --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/setting/SmsProviderConfigResult.java @@ -0,0 +1,79 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.setting; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; + +import cn.topiam.employee.common.entity.setting.config.SmsConfig; +import cn.topiam.employee.common.message.enums.SmsProvider; +import cn.topiam.employee.common.message.sms.SmsProviderConfig; + +import lombok.Builder; +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 短信服务商配置查询结果 + * + * @author TopIAM + */ +@Data +@Builder +@Schema(description = "短信服务商配置查询结果") +public class SmsProviderConfigResult implements Serializable { + + @Serial + private static final long serialVersionUID = -2667374916357438335L; + /** + * 平台 + */ + @Parameter(description = "提供商") + private SmsProvider provider; + /** + * 配置 + */ + @Parameter(description = "参数配置") + private SmsProviderConfig config; + + /** + * 配置 + */ + @Parameter(description = "模板配置") + private List templates; + /** + * 描述 + */ + @Parameter(description = "描述") + private String desc; + + /** + * 是否启用 + */ + @Parameter(description = "是否启用") + private Boolean enabled; + + /** + * 语言 + */ + @Parameter(description = "语言") + private String language; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/account/OrganizationUpdateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/account/OrganizationUpdateParam.java new file mode 100644 index 00000000..a8da4cb8 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/account/OrganizationUpdateParam.java @@ -0,0 +1,82 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.update.account; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.enums.OrganizationType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 编辑组织架构入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:16 + */ +@Data +@Schema(description = "修改组织机构入参") +public class OrganizationUpdateParam implements Serializable { + @Serial + private static final long serialVersionUID = 4570955457331971748L; + + /** + * id + */ + @Schema(description = "组织ID") + @NotBlank(message = "ID不能为空") + private String id; + + /** + * 名称 + */ + @Schema(description = "组织名称") + @NotBlank(message = "组织名称不能为空") + private String name; + + /** + * 类型 + */ + @Schema(description = "组织类型") + @NotNull(message = "组织类型不能为空") + private OrganizationType type; + + /** + * 描述 + */ + @Schema(description = "组织描述") + private String desc; + + /** + * 排序 + */ + @Schema(description = "组织排序") + private String order; + + /** + * 是否启用 + */ + @Schema(description = "是否启用") + private Boolean enabled; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/account/ResetPasswordParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/account/ResetPasswordParam.java new file mode 100644 index 00000000..08a594e7 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/account/ResetPasswordParam.java @@ -0,0 +1,81 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.update.account; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; + +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +import cn.topiam.employee.common.enums.ListEnumDeserializer; +import cn.topiam.employee.common.enums.MessageNoticeChannel; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 重置密码入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:16 + */ +@Data +@Schema(description = "重置密码入参") +public class ResetPasswordParam implements Serializable { + @Serial + private static final long serialVersionUID = -6616249172773611157L; + /** + * ID + */ + @Schema(description = "用户ID") + @NotBlank(message = "用户ID不能为空") + private String id; + + /** + * 密码 + */ + @Schema(description = "密码") + @NotBlank(message = "密码不能为空") + private String password; + + /** + * 重置密码配置 + */ + @Schema(description = "重置密码配置") + private PasswordResetConfig passwordResetConfig; + + @Data + public static class PasswordResetConfig implements Serializable { + /** + * 启用通知 + */ + @Schema(description = "启用通知") + private Boolean enableNotice; + + /** + * 消息类型 + */ + @Schema(description = "消息类型") + @JsonDeserialize(using = ListEnumDeserializer.class) + private List noticeChannels; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/account/UserGroupUpdateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/account/UserGroupUpdateParam.java new file mode 100644 index 00000000..b8c3f75e --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/account/UserGroupUpdateParam.java @@ -0,0 +1,65 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.update.account; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 编辑用户入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:16 + */ +@Data +@Schema(description = "修改用户分组入参") +public class UserGroupUpdateParam implements Serializable { + @Serial + private static final long serialVersionUID = -6616249172773611157L; + /** + * ID + */ + @Schema(description = "用户组ID") + @NotBlank(message = "用户组ID不能为空") + private String id; + /** + * 用户名 + */ + @Schema(description = "用户组名称") + @NotBlank(message = "用户组名称不能为空") + private String name; + + /** + * 用户组编码 + */ + @Schema(description = "用户组编码") + @NotBlank(message = "用户组编码不能为空") + private String code; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/account/UserUpdateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/account/UserUpdateParam.java new file mode 100644 index 00000000..6520f970 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/account/UserUpdateParam.java @@ -0,0 +1,111 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.update.account; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; + +import javax.validation.constraints.NotBlank; + +import cn.topiam.employee.common.enums.UserStatus; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 编辑用户入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/11 23:16 + */ +@Data +@Schema(description = "修改用户入参") +public class UserUpdateParam implements Serializable { + @Serial + private static final long serialVersionUID = -6616249172773611157L; + /** + * ID + */ + @Schema(description = "用户ID") + @NotBlank(message = "用户ID不能为空") + private String id; + + /** + * 邮箱 + */ + @Schema(description = "邮箱") + private String email; + + /** + * 手机号 + */ + @Schema(description = "手机号") + private String phone; + + /** + * 头像URL + */ + @Schema(description = "头像URL") + private String avatar; + + /** + * 姓名 + */ + @Schema(description = "姓名") + @NotBlank(message = "姓名不能为空") + private String fullName; + + /** + * 昵称 + */ + @Schema(description = "昵称") + @NotBlank(message = "昵称不能为空") + private String nickName; + + /** + * 身份证号 + */ + @Schema(description = "身份证号") + private String idCard; + + /** + * 地址 + */ + @Schema(description = "地址") + private String address; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; + + /** + * 过期日期 + */ + @Schema(description = "过期日期") + private LocalDate expireDate; + + /** + * status + */ + @Schema(description = "状态") + private UserStatus status; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/AppPermissionPolicyUpdateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/AppPermissionPolicyUpdateParam.java new file mode 100644 index 00000000..a8559d31 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/AppPermissionPolicyUpdateParam.java @@ -0,0 +1,89 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.update.app; + +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.common.enums.PolicyEffect; +import cn.topiam.employee.common.enums.PolicyObjectType; +import cn.topiam.employee.common.enums.PolicySubjectType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 修改策略入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 21:46 + */ +@Data +@Schema(description = "修改策略入参") +public class AppPermissionPolicyUpdateParam implements Serializable { + /** + * 所属应用 + */ + @NotNull(message = "资源所属应用不能为空") + @Parameter(description = "所属应用") + private Long appId; + + /** + * 授权主体id + */ + @NotNull(message = "主键id不能为空") + @Parameter(description = "主键id") + private Long id; + /** + * 授权主体id + */ + @NotNull(message = "授权主体id不能为空") + @Parameter(description = "授权主体id") + private String subjectId; + + /** + * 权限主体类型(用户、角色、分组、组织机构) + */ + @NotNull(message = "授权主体类型不能为空") + @Parameter(description = "授权主体类型") + private PolicySubjectType subjectType; + + /** + * 权限客体ID + */ + @NotNull(message = "权限客体ID不能为空") + @Parameter(description = "授权客体id") + private Long objectId; + + /** + * 权限客体类型(权限、角色) + */ + @NotNull(message = "权限客体类型不能为空") + @Parameter(description = "授权客体类型") + private PolicyObjectType objectType; + + /** + * 授权作用 + */ + @NotNull(message = "授权作用不能为空") + @Parameter(description = "授权作用") + private PolicyEffect effect; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/AppPermissionResourceUpdateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/AppPermissionResourceUpdateParam.java new file mode 100644 index 00000000..b8392ca7 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/AppPermissionResourceUpdateParam.java @@ -0,0 +1,92 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.update.app; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +import cn.topiam.employee.console.pojo.save.app.AppPermissionsActionParam; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; +import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY; + +/** + * 资源修改参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 21:46 + */ +@Data +@Schema(description = "修改资源入参") +public class AppPermissionResourceUpdateParam implements Serializable { + @Serial + private static final long serialVersionUID = 6021548372386059064L; + /** + * ID + */ + @Schema(accessMode = READ_ONLY) + @NotBlank(message = "ID不能为空") + private String id; + + /** + * 名称 + */ + @Schema(description = "资源名称") + @NotBlank(message = "资源名称不能为空") + private String name; + + /** + * 编码 + */ + @Schema(description = "资源编码") + @NotBlank(message = "资源编码不能为空") + private String code; + + /** + * 描述 + */ + @Schema(description = "资源描述") + @NotBlank(message = "资源描述不能为空") + private String desc; + + /** + * 所属应用 + */ + @Schema(description = "所属应用") + @NotNull(message = "所属应用不能为空") + private Long appId; + + /** + * 是否启用 + */ + @Schema(description = "是否启用") + private Boolean enabled; + + /** + * 资源权限 + */ + @Schema(description = "资源权限") + @NotNull(message = "资源权限不能为空") + private List actions; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/AppSaveConfigParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/AppSaveConfigParam.java new file mode 100644 index 00000000..283c07d4 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/AppSaveConfigParam.java @@ -0,0 +1,59 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.update.app; + +import java.io.Serializable; +import java.util.Map; + +import javax.validation.constraints.NotNull; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 更新应用配置入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/7/18 23:26 + */ +@Data +@Schema(description = "更新应用配置入参") +public class AppSaveConfigParam implements Serializable { + + /** + * id + */ + @Schema(description = "应用id") + @NotNull(message = "ID不能为空") + private String id; + + /** + * 模版 + */ + @Schema(description = "模版") + @NotNull(message = "模版不能为空") + private String template; + + /** + * 配置 + */ + @Schema(description = "配置") + @NotNull(message = "配置不能为空") + private Map config; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/AppUpdateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/AppUpdateParam.java new file mode 100644 index 00000000..cc4f6140 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/AppUpdateParam.java @@ -0,0 +1,62 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.update.app; + +import java.io.Serializable; + +import javax.validation.constraints.NotNull; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 应用修改入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/7/18 23:26 + */ +@Data +@Schema(description = "应用修改入参") +public class AppUpdateParam implements Serializable { + + /** + * id + */ + @Schema(description = "应用id") + @NotNull(message = "ID不能为空") + private Long id; + + /** + * 应用名称 + */ + @Schema(description = "应用名称") + private String name; + + /** + * 应用图标 + */ + @Schema(description = "应用图标") + private String icon; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/PermissionRoleUpdateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/PermissionRoleUpdateParam.java new file mode 100644 index 00000000..4ab2ad0d --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/app/PermissionRoleUpdateParam.java @@ -0,0 +1,62 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.update.app; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; +import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY; + +/** + * 角色修改参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 21:46 + */ +@Data +@Schema(description = "修改角色入参") +public class PermissionRoleUpdateParam implements Serializable { + @Serial + private static final long serialVersionUID = 6021548372386059064L; + /** + * ID + */ + @Schema(accessMode = READ_ONLY) + @NotBlank(message = "ID不能为空") + private String id; + /** + * 名称 + */ + @Schema(description = "角色名称") + private String name; + /** + * 编码 + */ + @Schema(description = "角色编码") + private String code; + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/authentication/IdpUpdateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/authentication/IdpUpdateParam.java new file mode 100644 index 00000000..2a563d56 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/authentication/IdpUpdateParam.java @@ -0,0 +1,84 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.update.authentication; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.common.enums.IdentityProviderType; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 认证源修改参数入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/21 21:21 + */ +@Data +@Schema(description = "认证源修改参数") +public class IdpUpdateParam implements Serializable { + @Serial + private static final long serialVersionUID = -1440230086940289961L; + /** + * ID + */ + @NotBlank(message = "ID不能为空") + @Schema(description = "ID") + private String id; + + /** + * 名称 + */ + @NotBlank(message = "名称不能为空") + @Schema(description = "名称") + private String name; + + /** + * 平台 + */ + @NotNull(message = "平台不能为空") + @Schema(description = "平台") + private IdentityProviderType type; + + /** + * 配置 + */ + @NotNull(message = "配置JSON不能为空") + @Schema(description = "配置JSON") + private JSONObject config; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; + + /** + * 是否显示 + */ + @Schema(description = "是否显示") + private Boolean displayed; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/identity/IdentitySourceUpdateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/identity/IdentitySourceUpdateParam.java new file mode 100644 index 00000000..b9c3feb0 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/identity/IdentitySourceUpdateParam.java @@ -0,0 +1,60 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.update.identity; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotEmpty; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * 身份源修改参数入参 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/2/25 23:04 + */ +@Data +@Schema(description = "身份源修改参数") +public class IdentitySourceUpdateParam implements Serializable { + @Serial + private static final long serialVersionUID = -1440230086940289961L; + /** + * ID + */ + @Parameter(description = "ID") + @NotEmpty(message = "ID不能为空") + private String id; + + /** + * 名称 + */ + @Parameter(description = "名称") + @NotEmpty(message = "名称不能为空") + private String name; + + /** + * 备注 + */ + @Parameter(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/setting/AdministratorUpdateParam.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/setting/AdministratorUpdateParam.java new file mode 100644 index 00000000..b6792e87 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/update/setting/AdministratorUpdateParam.java @@ -0,0 +1,71 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.pojo.update.setting; + +import java.io.Serial; +import java.io.Serializable; + +import javax.validation.constraints.NotBlank; + +import lombok.Data; + +import io.swagger.v3.oas.annotations.media.Schema; +import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY; + +/** + * 管理员修改参数 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/8/26 21:46 + */ +@Data +@Schema(description = "修改管理员入参") +public class AdministratorUpdateParam implements Serializable { + @Serial + private static final long serialVersionUID = 6021548372386059064L; + /** + * ID + */ + @Schema(accessMode = READ_ONLY) + @NotBlank(message = "ID不能为空") + private String id; + + /** + * 邮箱 + */ + @Schema(description = "邮箱") + private String email; + + /** + * 手机号 + */ + @Schema(description = "手机号") + private String phone; + + /** + * 头像URL + */ + @Schema(description = "头像URL") + private String avatar; + + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleAccessDeniedHandler.java b/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleAccessDeniedHandler.java new file mode 100644 index 00000000..8704c19a --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleAccessDeniedHandler.java @@ -0,0 +1,65 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.security.handler; + +import java.io.IOException; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.security.web.access.AccessDeniedHandler; + +import cn.topiam.employee.core.security.util.SecurityUtils; + +import lombok.AllArgsConstructor; + +/** + * 访问拒绝处理程序 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/2 22:11 + */ +@AllArgsConstructor +public class ConsoleAccessDeniedHandler implements AccessDeniedHandler { + /** + * 日志 + */ + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + /** + * Handles an access denied failure. + * + * @param request that resulted in an AccessDeniedException + * @param response so that the user agent can be advised of the failure + * @param accessDeniedException that caused the invocation + */ + @Override + public void handle(HttpServletRequest request, HttpServletResponse response, + AccessDeniedException accessDeniedException) throws IOException { + logger.info("----------------------------------------------------------"); + logger.info("用户【{}】权限不足", SecurityUtils.getCurrentUser()); + response.sendError(HttpStatus.FORBIDDEN.value(), + accessDeniedException.getLocalizedMessage()); + logger.info("----------------------------------------------------------"); + } + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleAuthenticationEntryPoint.java b/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleAuthenticationEntryPoint.java new file mode 100644 index 00000000..fc0f0628 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleAuthenticationEntryPoint.java @@ -0,0 +1,72 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.security.handler; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.AuthenticationEntryPoint; + +import cn.topiam.employee.support.result.ApiRestResult; +import cn.topiam.employee.support.util.HttpResponseUtils; +import static org.springframework.http.HttpStatus.UNAUTHORIZED; + +/** + * 认证入口点 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/2 22:11 + */ +public class ConsoleAuthenticationEntryPoint implements AuthenticationEntryPoint { + /** + * 日志 + */ + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + /** + * Commences an authentication scheme. + *

+ * ExceptionTranslationFilter will populate the HttpSession + * attribute named + * AbstractAuthenticationProcessingFilter.SPRING_SECURITY_SAVED_REQUEST_KEY + * with the requested target URL before calling this method. + *

+ * Implementations should modify the headers on the ServletResponse as + * necessary to commence the authentication process. + * + * @param request that resulted in an AuthenticationException + * @param response so that the user agent can begin authentication + * @param authException that caused the invocation + */ + @Override + public void commence(HttpServletRequest request, HttpServletResponse response, + AuthenticationException authException) { + logger.info("----------------------------------------------------------"); + logger.info("未登录,或登录过期"); + ApiRestResult result = ApiRestResult.builder() + .status(String.valueOf(UNAUTHORIZED.value())).message(StringUtils + .defaultString(authException.getMessage(), UNAUTHORIZED.getReasonPhrase())) + .build(); + HttpResponseUtils.flushResponseJson(response, UNAUTHORIZED.value(), result); + logger.info("----------------------------------------------------------"); + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleAuthenticationFailureHandler.java b/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleAuthenticationFailureHandler.java new file mode 100644 index 00000000..311beee4 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleAuthenticationFailureHandler.java @@ -0,0 +1,60 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.security.handler; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.http.HttpStatus; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.authentication.AuthenticationFailureHandler; + +import cn.topiam.employee.common.enums.SecretType; +import cn.topiam.employee.support.exception.enums.ExceptionStatus; +import cn.topiam.employee.support.result.ApiRestResult; +import cn.topiam.employee.support.util.HttpResponseUtils; +import static cn.topiam.employee.support.constant.EiamConstants.CAPTCHA_CODE_SESSION; + +/** + * 认证失败 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/2 22:11 + */ +public class ConsoleAuthenticationFailureHandler implements AuthenticationFailureHandler { + + /** + * Called when an authentication attempt fails. + * + * @param request the request during which the authentication attempt occurred. + * @param response the response. + * @param exception the exception which was thrown to reject the authentication + */ + @Override + public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, + AuthenticationException exception) { + ApiRestResult result = ApiRestResult.builder() + .status(ExceptionStatus.EX000101.getCode()).message(StringUtils + .defaultString(exception.getMessage(), ExceptionStatus.EX000101.getMessage())) + .build(); + request.getSession().removeAttribute(SecretType.LOGIN.getKey()); + request.getSession().removeAttribute(CAPTCHA_CODE_SESSION); + HttpResponseUtils.flushResponseJson(response, HttpStatus.BAD_REQUEST.value(), result); + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleAuthenticationSuccessHandler.java b/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleAuthenticationSuccessHandler.java new file mode 100644 index 00000000..e478b1ee --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleAuthenticationSuccessHandler.java @@ -0,0 +1,60 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.security.handler; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; +import org.springframework.security.core.Authentication; +import org.springframework.security.web.authentication.AuthenticationSuccessHandler; + +import cn.topiam.employee.common.enums.SecretType; +import cn.topiam.employee.support.result.ApiRestResult; +import cn.topiam.employee.support.util.HttpResponseUtils; +import static cn.topiam.employee.support.constant.EiamConstants.CAPTCHA_CODE_SESSION; + +/** + * 认证成功处理程序 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/2 22:11 + */ +public class ConsoleAuthenticationSuccessHandler implements AuthenticationSuccessHandler { + + private final Logger logger = LoggerFactory + .getLogger(ConsoleAuthenticationSuccessHandler.class); + + /** + * Called when a user has been successfully authenticated. + * + * @param request the request which caused the successful authentication + * @param response the response + * @param authentication the Authentication object which was created during + */ + @Override + public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, + Authentication authentication) { + ApiRestResult result = ApiRestResult. builder().result("success").build(); + request.getSession().removeAttribute(SecretType.LOGIN.getKey()); + request.getSession().removeAttribute(CAPTCHA_CODE_SESSION); + HttpResponseUtils.flushResponseJson(response, HttpStatus.OK.value(), result); + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleLogoutSuccessHandler.java b/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleLogoutSuccessHandler.java new file mode 100644 index 00000000..85c88a50 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/ConsoleLogoutSuccessHandler.java @@ -0,0 +1,67 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.security.handler; + +import java.io.IOException; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; +import org.springframework.security.core.Authentication; +import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; + +import cn.topiam.employee.core.context.ServerContextHelp; +import cn.topiam.employee.support.result.ApiRestResult; +import cn.topiam.employee.support.util.HttpResponseUtils; +import cn.topiam.employee.support.util.HttpUrlUtils; +import static cn.topiam.employee.common.constants.AuthorizeConstants.FE_LOGIN; +import static cn.topiam.employee.support.context.ServletContextHelp.acceptIncludeTextHtml; +import static cn.topiam.employee.support.result.ApiRestResult.SUCCESS; + +/** + * 注销成功 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/2 22:11 + */ +public class ConsoleLogoutSuccessHandler implements LogoutSuccessHandler { + /** + * 日志 + */ + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Override + public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, + Authentication authentication) throws IOException { + //@formatter:off + boolean isTextHtml = acceptIncludeTextHtml(request); + if (response.isCommitted()) { + return; + } + if (!isTextHtml) { + HttpResponseUtils.flushResponseJson(response, HttpStatus.OK.value(), + ApiRestResult.builder().status(SUCCESS).build()); + return; + } + response.sendRedirect(HttpUrlUtils.format(ServerContextHelp.getConsolePublicBaseUrl() + FE_LOGIN)); + //@formatter:on + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/package-info.java new file mode 100644 index 00000000..dfd341b0 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/security/handler/package-info.java @@ -0,0 +1,24 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +/** + * 处理器 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/10/29 23:12 + */ +package cn.topiam.employee.console.security.handler; diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/security/listener/ConsoleAuthenticationFailureEventListener.java b/eiam-console/src/main/java/cn/topiam/employee/console/security/listener/ConsoleAuthenticationFailureEventListener.java new file mode 100644 index 00000000..10ec7056 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/security/listener/ConsoleAuthenticationFailureEventListener.java @@ -0,0 +1,95 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.security.listener; + +import java.util.Optional; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.ApplicationListener; +import org.springframework.lang.NonNull; +import org.springframework.security.authentication.event.AbstractAuthenticationFailureEvent; + +import cn.topiam.employee.audit.entity.Actor; +import cn.topiam.employee.audit.enums.EventStatus; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.audit.event.AuditEventPublish; +import cn.topiam.employee.common.entity.setting.AdministratorEntity; +import cn.topiam.employee.common.enums.UserType; +import cn.topiam.employee.common.repository.setting.AdministratorRepository; +import cn.topiam.employee.core.security.userdetails.UserDetails; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import static cn.topiam.employee.core.security.util.SecurityUtils.getFailureMessage; + +/** + * 认证失败 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/3 22:42 + */ +public class ConsoleAuthenticationFailureEventListener implements + ApplicationListener { + private final Logger logger = LoggerFactory + .getLogger(ConsoleAuthenticationFailureEventListener.class); + + /** + * Handle an application event. + * + * @param event the event to respond to + */ + @Override + public void onApplicationEvent(@NonNull AbstractAuthenticationFailureEvent event) { + //@formatter:off + AuditEventPublish publish = ApplicationContextHelp.getBean(AuditEventPublish.class); + String content = getFailureMessage(event); + logger.error("认证失败 [{}]",content); + String principal = (String) event.getAuthentication().getPrincipal(); + if (event.getAuthentication().getPrincipal() instanceof String){ + principal = (String) event.getAuthentication().getPrincipal(); + } + if (event.getAuthentication().getPrincipal() instanceof UserDetails || event.getAuthentication().getPrincipal() instanceof org.springframework.security.core.userdetails.UserDetails){ + principal = ((UserDetails) event.getAuthentication().getPrincipal()).getUsername(); + } + if (StringUtils.isNotBlank(principal)){ + Optional optional = getAdministratorRepository().findByUsername(principal); + if (optional.isEmpty()) { + // 手机号 + optional = getAdministratorRepository().findByPhone(principal); + if (optional.isEmpty()) { + // 邮箱 + optional = getAdministratorRepository().findByEmail(principal); + } + } + if (optional.isEmpty()) { + Actor actor = Actor.builder().type(UserType.ADMIN).build(); + publish.publish(EventType.LOGIN_CONSOLE,"账户不存在:"+principal, actor, EventStatus.FAIL); + return; + } + AdministratorEntity administrator = optional.get(); + Actor actor = Actor.builder().id(administrator.getId().toString()).type(UserType.ADMIN).build(); + publish.publish(EventType.LOGIN_CONSOLE,content+":"+administrator.getUsername(), actor,EventStatus.FAIL); + } + //@formatter:on + } + + private AdministratorRepository getAdministratorRepository() { + return ApplicationContextHelp.getBean(AdministratorRepository.class); + } + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/security/listener/ConsoleAuthenticationSuccessEventListener.java b/eiam-console/src/main/java/cn/topiam/employee/console/security/listener/ConsoleAuthenticationSuccessEventListener.java new file mode 100644 index 00000000..00fb5505 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/security/listener/ConsoleAuthenticationSuccessEventListener.java @@ -0,0 +1,91 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.security.listener; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.Objects; + +import org.springframework.context.ApplicationListener; +import org.springframework.lang.NonNull; +import org.springframework.security.authentication.event.AuthenticationSuccessEvent; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import com.google.common.collect.Lists; + +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.EventStatus; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.audit.event.AuditEventPublish; +import cn.topiam.employee.common.geo.GeoLocationService; +import cn.topiam.employee.core.security.userdetails.UserDetails; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import cn.topiam.employee.support.context.ServletContextHelp; +import cn.topiam.employee.support.util.IpUtils; +import cn.topiam.employee.support.web.useragent.UserAgent; +import cn.topiam.employee.support.web.useragent.UserAgentUtils; + +import lombok.AllArgsConstructor; +import static cn.topiam.employee.audit.enums.EventType.LOGIN_CONSOLE; + +/** + * 监听登录成功事件 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/3 + */ +@AllArgsConstructor +public class ConsoleAuthenticationSuccessEventListener implements + ApplicationListener { + + /** + * Handle an application event. + * + * @param event the event to respond to + */ + @Override + public void onApplicationEvent(@NonNull AuthenticationSuccessEvent event) { + ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder + .getRequestAttributes(); + AuditEventPublish auditEventPublish = ApplicationContextHelp + .getBean(AuditEventPublish.class); + Object principal = event.getAuthentication().getPrincipal(); + //@formatter:off + //@formatter:on + if (principal instanceof UserDetails) { + //登录事件 + ((UserDetails) principal).setLoginTime(LocalDateTime.now()); + //区域 + ((UserDetails) principal).setGeoLocation(geoLocationService + .getGeoLocation(IpUtils.getIpAddr(ServletContextHelp.getRequest()))); + //浏览器 + UserAgent agent = UserAgentUtils + .getUserAgent(Objects.requireNonNull(attributes).getRequest()); + ((UserDetails) principal).setUserAgent(agent); + + // 审计事件 + //@formatter:off + List targets= Lists.newArrayList(Target.builder().type(TargetType.CONSOLE).build()); + auditEventPublish.publish(LOGIN_CONSOLE, event.getAuthentication(), EventStatus.SUCCESS,targets); + //@formatter:on + } + } + + private final GeoLocationService geoLocationService; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/security/listener/ConsoleLogoutSuccessEventListener.java b/eiam-console/src/main/java/cn/topiam/employee/console/security/listener/ConsoleLogoutSuccessEventListener.java new file mode 100644 index 00000000..6afc632c --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/security/listener/ConsoleLogoutSuccessEventListener.java @@ -0,0 +1,58 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.security.listener; + +import java.util.List; + +import org.springframework.context.ApplicationListener; +import org.springframework.lang.NonNull; +import org.springframework.security.authentication.event.LogoutSuccessEvent; + +import com.google.common.collect.Lists; + +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.EventStatus; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.audit.event.AuditEventPublish; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import static cn.topiam.employee.audit.enums.EventType.*; + +/** + * 退出成功 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/9/3 22:42 + */ +public class ConsoleLogoutSuccessEventListener implements ApplicationListener { + + /** + * Handle an application event. + * + * @param event the event to respond to + */ + @Override + public void onApplicationEvent(@NonNull LogoutSuccessEvent event) { + AuditEventPublish auditEventPublish = ApplicationContextHelp + .getBean(AuditEventPublish.class); + // 审计事件 + //@formatter:off + List targets= Lists.newArrayList(Target.builder().type(TargetType.CONSOLE).build()); + auditEventPublish.publish(LOGOUT_CONSOLE, event.getAuthentication(), EventStatus.SUCCESS,targets); + //@formatter:on + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/security/listener/ConsoleSessionInformationExpiredStrategy.java b/eiam-console/src/main/java/cn/topiam/employee/console/security/listener/ConsoleSessionInformationExpiredStrategy.java new file mode 100644 index 00000000..8fe53213 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/security/listener/ConsoleSessionInformationExpiredStrategy.java @@ -0,0 +1,48 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.security.listener; + +import javax.servlet.http.HttpServletResponse; + +import org.springframework.http.HttpStatus; +import org.springframework.security.web.session.SessionInformationExpiredEvent; +import org.springframework.security.web.session.SessionInformationExpiredStrategy; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.support.result.ApiRestResult; +import cn.topiam.employee.support.util.HttpResponseUtils; +import static cn.topiam.employee.support.exception.enums.ExceptionStatus.EX000203; + +/** + * session 过期 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/7/25 21:08 + */ +public class ConsoleSessionInformationExpiredStrategy implements SessionInformationExpiredStrategy { + + @Override + public void onExpiredSessionDetected(SessionInformationExpiredEvent event) { + HttpServletResponse response = event.getResponse(); + ApiRestResult result = ApiRestResult. builder().status(EX000203.getCode()) + .message(EX000203.getMessage()).build(); + response.setStatus(HttpStatus.UNAUTHORIZED.value()); + HttpResponseUtils.flushResponse(response, JSONObject.toJSONString(result)); + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/security/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/security/package-info.java new file mode 100644 index 00000000..3d77c798 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/security/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.security; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/account/OrganizationService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/OrganizationService.java new file mode 100644 index 00000000..9b6290ff --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/OrganizationService.java @@ -0,0 +1,149 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.account; + +import java.util.List; + +import cn.topiam.employee.common.entity.account.OrganizationEntity; +import cn.topiam.employee.common.enums.DataOrigin; +import cn.topiam.employee.console.pojo.result.account.OrganizationChildResult; +import cn.topiam.employee.console.pojo.result.account.OrganizationResult; +import cn.topiam.employee.console.pojo.result.account.OrganizationRootResult; +import cn.topiam.employee.console.pojo.result.account.OrganizationTreeResult; +import cn.topiam.employee.console.pojo.save.account.OrganizationCreateParam; +import cn.topiam.employee.console.pojo.update.account.OrganizationUpdateParam; + +/** + *

+ * 组织架构 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-09 + */ +public interface OrganizationService { + + /** + * 创建组织架构 + * + * @param param {@link OrganizationCreateParam} + * @return {@link Boolean} + */ + Boolean createOrg(OrganizationCreateParam param); + + /** + * 修改组织架构 + * + * @param param {@link OrganizationUpdateParam} + * @return {@link Boolean} + */ + Boolean updateOrg(OrganizationUpdateParam param); + + /** + * 启用/禁用 + * + * @param id {@link String} + * @param enabled {@link Boolean} + * @return {@link Boolean} + */ + Boolean updateStatus(String id, boolean enabled); + + /** + * 删除组织架构 + * + * @param id {@link List} + * @return {@link Boolean} + */ + Boolean deleteOrg(String id); + + /** + * 根据ID查询组织架构 + * + * @param id {@link String} + * @return {@link OrganizationResult} + */ + OrganizationResult getOrganization(String id); + + /** + * 移动组织机构 + * + * @param id {@link String} + * @param parentId {@link String} + * @return {@link Boolean} + */ + Boolean moveOrganization(String id, String parentId); + + /** + * 查询根组织 + * + * @return {@link OrganizationRootResult} + */ + OrganizationRootResult getRootOrganization(); + + /** + * 查询子组织 + * + * @param parentId {@link String} + * @return {@link OrganizationChildResult} + */ + List getChildOrganization(String parentId); + + /** + * 查询子组织 + * + * @param parentId {@link String} + * @param dataOrigin {@link DataOrigin} + * @param identitySourceId {@link Long} + * @return {@link OrganizationEntity} + */ + List getChildOrgList(String parentId, DataOrigin dataOrigin, + Long identitySourceId); + + /** + * 过滤组织树 + * + * @param keyWord {@link String} 关键字 + * @return {@link List} + */ + List filterOrganizationTree(String keyWord); + + /** + * 根据ID查询组织架构 + * + * @param id {@link String} + * @return {@link OrganizationEntity} + */ + OrganizationEntity getById(String id); + + /** + * 根据外部ID查询组织架构 + * + * @param id {@link String} + * @param identitySourceId {@link Long} + * @return {@link OrganizationEntity} + */ + OrganizationEntity getOrganizationByExternalId(String id, Long identitySourceId); + + /*** + * 批量删除 + * + * @param ids {@link String} + * @return {@link Boolean} + */ + Boolean batchDeleteOrg(String[] ids); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/account/UserAccountAssociateService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/UserAccountAssociateService.java new file mode 100644 index 00000000..bcc6bc49 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/UserAccountAssociateService.java @@ -0,0 +1,26 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.account; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 22:46 + */ +public interface UserAccountAssociateService { + +} \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/account/UserGroupService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/UserGroupService.java new file mode 100644 index 00000000..615eeda7 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/UserGroupService.java @@ -0,0 +1,116 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.account; + +import java.util.List; + +import cn.topiam.employee.common.entity.account.UserGroupEntity; +import cn.topiam.employee.common.entity.account.query.UserGroupMemberListQuery; +import cn.topiam.employee.console.pojo.query.account.UserGroupListQuery; +import cn.topiam.employee.console.pojo.result.account.UserGroupListResult; +import cn.topiam.employee.console.pojo.result.account.UserGroupMemberListResult; +import cn.topiam.employee.console.pojo.save.account.UserGroupCreateParam; +import cn.topiam.employee.console.pojo.update.account.UserGroupUpdateParam; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + * 用户组service + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/11 21:29 + */ +public interface UserGroupService { + /** + * 查询用户分组列表 + * + * @param page {@link PageModel} + * @param query {@link UserGroupListQuery} + * @return {@link UserGroupListResult} + */ + Page getUserGroupList(PageModel page, UserGroupListQuery query); + + /** + * 创建用户组 + * + * @param param {@link UserGroupCreateParam} + * @return {@link Boolean} + */ + Boolean createUserGroup(UserGroupCreateParam param); + + /** + * 更新用户组 + * + * @param param {@link UserGroupUpdateParam} + * @return {@link Boolean} + */ + Boolean updateUserGroup(UserGroupUpdateParam param); + + /** + * 删除用户组 + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean deleteUserGroup(String id); + + /** + * 根据ID查询用户分组 + * + * @param id {@link Long} + * @return {@link UserGroupEntity} + */ + UserGroupEntity getUserGroup(Long id); + + /** + * 获取用户组成员 + * + * @param query {@link UserGroupMemberListQuery} + * @param page {@link PageModel} + * @return {@link UserGroupMemberListResult} + */ + Page getUserGroupMemberList(PageModel page, + UserGroupMemberListQuery query); + + /** + * 从用户组移除用户 + * + * @param id {@link String} + * @param userId {@link String} + * @return {@link Boolean} + */ + Boolean removeMember(String id, String userId); + + /** + * 添加用户 + * + * @param userIds {@link String} + * @param groupId {@link String} + * @return {@link Boolean} + */ + Boolean addMember(String groupId, String[] userIds); + + /** + * 批量移除用户 + * + * @param id {@link String} + * @param userIds {@link String} + * @return {@link Boolean} + */ + Boolean batchRemoveMember(String id, List userIds); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/account/UserService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/UserService.java new file mode 100644 index 00000000..1aca9d46 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/UserService.java @@ -0,0 +1,172 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.account; + +import java.io.Serializable; +import java.util.List; + +import cn.topiam.employee.common.entity.account.UserEntity; +import cn.topiam.employee.common.entity.account.query.UserListNotInGroupQuery; +import cn.topiam.employee.common.entity.account.query.UserListQuery; +import cn.topiam.employee.common.enums.CheckValidityType; +import cn.topiam.employee.common.enums.UserStatus; +import cn.topiam.employee.console.pojo.result.account.UserListResult; +import cn.topiam.employee.console.pojo.result.account.UserLoginAuditListResult; +import cn.topiam.employee.console.pojo.result.account.UserResult; +import cn.topiam.employee.console.pojo.save.account.UserCreateParam; +import cn.topiam.employee.console.pojo.update.account.ResetPasswordParam; +import cn.topiam.employee.console.pojo.update.account.UserUpdateParam; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + *

+ * 用户表 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-07-31 + */ +public interface UserService { + + /** + * 获取用户(分页) + * + * @param page {@link PageModel} + * @param query {@link UserListQuery} + * @return {@link UserListQuery} + */ + Page getUserList(PageModel page, UserListQuery query); + + /** + * 获取用户列表不在当前组 + * + * @param page {@link PageModel} + * @param query {@link UserListNotInGroupQuery } + * @return {@link } + */ + Page getUserListNotInGroup(PageModel page, UserListNotInGroupQuery query); + + /** + * 重置密码 + * + * @param param {@link ResetPasswordParam} 用户入参 + * @return {@link Boolean} 是否成功 + */ + Boolean resetUserPassword(ResetPasswordParam param); + + /** + * 更改用户状态 + * + * @param id {@link Long} + * @param status {@link UserStatus} + * @return {@link Boolean} + */ + boolean changeUserStatus(Long id, UserStatus status); + + /** + * 创建用户 + * + * @param param {@link UserCreateParam} + * @return {@link Boolean} + */ + Boolean createUser(UserCreateParam param); + + /** + * 通过外部ID获取用户 + * + * @param id {@link String} + * @return {@link UserEntity} + */ + UserEntity getByExternalId(String id); + + /** + * 根据ID查询用户 + * + * @param id {@link String} + * @return {@link Boolean} + */ + UserResult getUser(String id); + + /** + * 更新用户 + * + * @param param {@link UserUpdateParam} + * @return {@link Boolean} + */ + boolean updateUser(UserUpdateParam param); + + /** + * 删除用户 + * + * @param id {@link Serializable} + * @return {@link Boolean} + */ + boolean deleteUser(String id); + + /** + * 用户转岗 + * + * @param userId {@link String} + * @param orgId {@link String} + * @return {@link Boolean} + */ + Boolean userTransfer(String userId, String orgId); + + /** + * 批量删除用户 + * + * @param ids {@link String} + * @return {@link Boolean} + */ + Boolean batchDeleteUser(String[] ids); + + /** + * 参数有效性验证 + * + * @param type {@link CheckValidityType} + * @param value {@link String} + * @param id {@link Long} + * @return {@link Boolean} + */ + Boolean userParamCheck(CheckValidityType type, String value, Long id); + + /** + * 查询组织成员数量 + * + * @param orgId {@link String} + * @return {@link Long} + */ + Long getOrgMemberCount(String orgId); + + /** + * 批量删除 + * + * @param removeIds {@link Long} + */ + void deleteBatchUser(List removeIds); + + /** + * 查看用户登录日志 + * + * @param id {@link Long} + * @param pageModel {@link PageModel} + * @return {@link List} + */ + Page findUserLoginAuditList(Long id, PageModel pageModel); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/account/UserSocialBindService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/UserSocialBindService.java new file mode 100644 index 00000000..1264cc4a --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/UserSocialBindService.java @@ -0,0 +1,28 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.account; + +/** + * 应用用户关联表 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 20:25 + */ +public interface UserSocialBindService { + +} \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/OrganizationServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/OrganizationServiceImpl.java new file mode 100644 index 00000000..5b303234 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/OrganizationServiceImpl.java @@ -0,0 +1,408 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.account.impl; + +import java.util.*; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import com.google.common.collect.Lists; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.entity.account.OrganizationEntity; +import cn.topiam.employee.common.enums.DataOrigin; +import cn.topiam.employee.common.repository.account.OrganizationRepository; +import cn.topiam.employee.console.converter.account.OrganizationConverter; +import cn.topiam.employee.console.pojo.result.account.OrganizationChildResult; +import cn.topiam.employee.console.pojo.result.account.OrganizationResult; +import cn.topiam.employee.console.pojo.result.account.OrganizationRootResult; +import cn.topiam.employee.console.pojo.result.account.OrganizationTreeResult; +import cn.topiam.employee.console.pojo.save.account.OrganizationCreateParam; +import cn.topiam.employee.console.pojo.update.account.OrganizationUpdateParam; +import cn.topiam.employee.console.service.account.OrganizationService; +import cn.topiam.employee.console.service.account.UserService; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import cn.topiam.employee.support.util.BeanUtils; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import static cn.topiam.employee.support.constant.EiamConstants.ROOT_NODE; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; + +/** + *

+ * 组织架构 服务实现类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-09 + */ +@Slf4j +@Service +@RequiredArgsConstructor +public class OrganizationServiceImpl implements OrganizationService { + public static final String SEPARATE = "/"; + + /** + * 创建组织架构 + * + * @param param {@link OrganizationCreateParam} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean createOrg(OrganizationCreateParam param) { + //保存 + OrganizationEntity entity = orgDataConverter.orgCreateParamConvertToEntity(param); + //查询父节点 + Optional parent = organizationRepository.findById(param.getParentId()); + //新建 + organizationRepository.save(entity); + //展示路径枚举 + parent.ifPresent(org -> entity + .setDisplayPath(StringUtils.isEmpty(org.getPath()) ? SEPARATE + entity.getName() + : org.getDisplayPath() + SEPARATE + entity.getName())); + //设置路径枚举 + parent.ifPresent( + org -> entity.setPath(StringUtils.isEmpty(org.getPath()) ? SEPARATE + entity.getId() + : org.getPath() + SEPARATE + entity.getId())); + //存在父节点,更改为非叶子节点 + if (parent.isPresent() && parent.get().getLeaf()) { + organizationRepository.updateIsLeaf(parent.get().getId(), false); + } + AuditContext + .setTarget(Target.builder().id(entity.getId()).type(TargetType.ORGANIZATION).build()); + return true; + } + + /** + * 修改组织架构 + * + * @param param {@link OrganizationCreateParam} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean updateOrg(OrganizationUpdateParam param) { + OrganizationEntity organization = orgDataConverter.orgUpdateParamConvertToEntity(param); + Optional optional = this.organizationRepository.findById(param.getId()); + if (optional.isPresent()) { + OrganizationEntity entity = optional.get(); + //如果修改了名字,递归修改和该组织有关所有节点信息的展示路径 + if (!optional.get().getName().equals(param.getName())) { + //修改名称 + organization.setDisplayPath(getNewDisplayPath(param.getId(), param.getName(), + entity.getPath(), entity.getDisplayPath())); + //递归更改下级名称 + if (!entity.getLeaf()) { + recursiveUpdateDisplayPath(entity.getId(), entity.getId(), param.getName()); + } + } + //修改 + BeanUtils.merge(organization, entity, LAST_MODIFIED_BY, LAST_MODIFIED_TIME); + organizationRepository.save(entity); + AuditContext.setTarget( + Target.builder().id(entity.getId()).type(TargetType.ORGANIZATION).build()); + return true; + } + return false; + } + + /** + * 递归修改显示名称 + * + * @param parentId {@link String} 上级ID + * @param id {@link String} ID 要更改名称的节点ID + * @param name {@link String} 名称 + */ + protected void recursiveUpdateDisplayPath(String parentId, String id, String name) { + List childNodes = organizationRepository.findByParentId(parentId); + for (OrganizationEntity org : childNodes) { + org.setDisplayPath(getNewDisplayPath(id, name, org.getPath(), org.getDisplayPath())); + organizationRepository.save(org); + //存在下级节点 + if (!org.getLeaf()) { + //递归处理 + recursiveUpdateDisplayPath(org.getId(), id, name); + } + } + } + + /** + * 获取新的显示路径 + * + * @param id {@link String} 要更改的ID + * @param name {@link String} 要更改的新名称 + * @param path {@link String} 路径 + * @param displayPath {@link String} 显示路径 + * @return {@link String} 新显示名称 + */ + private String getNewDisplayPath(String id, String name, String path, String displayPath) { + // 修改名称有个问题,如果名称一致,使用替换就会出问题,所以使用KEY=VALUE更改 + String[] pathIds = path.split(SEPARATE); + String[] pathNames = displayPath.split(SEPARATE); + //路径数据 + Map pathData = new LinkedHashMap<>(); + if (pathIds.length == pathNames.length) { + //i=1起步,以为切割数组,第0位为"" + for (int i = 1; i < pathNames.length; i++) { + pathData.put(pathIds[i], pathNames[i]); + } + } + pathData.put(id, name); + //封装 displayPath + StringBuilder newDisplayPath = new StringBuilder(); + + for (Map.Entry next : pathData.entrySet()) { + newDisplayPath.append(SEPARATE).append(next.getValue()); + } + return newDisplayPath.toString(); + } + + /** + * 启用/禁用 + * + * @param id {@link String} + * @param enabled {@link Boolean} + * @return {@link Boolean} + */ + @Override + public Boolean updateStatus(String id, boolean enabled) { + return organizationRepository.updateStatus(id, enabled) > 0; + } + + /** + * 删除组织架构 + * + * @param id {@link List} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteOrg(String id) { + Optional optional = organizationRepository.findById(id); + if (optional.isPresent()) { + //是否存在子节点 + List list = organizationRepository.findByParentId(id); + if (CollectionUtils.isEmpty(list)) { + //查询当前机构和当前机构下子机构下是否存在用户,不存在删除,存在抛出异常 + Long count = ApplicationContextHelp.getBean(UserService.class) + .getOrgMemberCount(id); + if (count > 0) { + throw new RuntimeException("删除机构失败,当前机构下存在用户"); + } + //删除 + organizationRepository.deleteById(id); + AuditContext + .setTarget(Target.builder().id(id).type(TargetType.ORGANIZATION).build()); + //查询该子节点上级组织机构是否存在子节点,如果不存在,更改 leaf=true + list = organizationRepository.findByParentId(optional.get().getParentId()); + //不存在子部门,且父节点非根节点,执行更改 leaf=true 操作 + if (CollectionUtils.isEmpty(list) + && !StringUtils.equals(ROOT_NODE, optional.get().getParentId())) { + organizationRepository.updateIsLeaf(optional.get().getParentId(), true); + } + return true; + } + throw new RuntimeException("删除机构失败,当前机构下存在子机构"); + } + return false; + } + + /** + * 组织机构详情 + * + * @param id {@link String} + * @return {@link OrganizationResult} + */ + @Override + public OrganizationResult getOrganization(String id) { + Optional entity = organizationRepository.findById(id); + return entity.map(orgDataConverter::entityConvertToOrgDetailResult).orElse(null); + } + + /** + * 移动组织机构 + * + * @param id {@link String} + * @param parentId {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean moveOrganization(String id, String parentId) { + AuditContext.setTarget(Target.builder().type(TargetType.ORGANIZATION).id(id).build(), + Target.builder().type(TargetType.ORGANIZATION).id(parentId).build()); + Optional organization = organizationRepository.findById(id); + if (organization.isPresent()) { + OrganizationEntity entity = organization.get(); + Optional parent = organizationRepository.findById(parentId); + if (parent.isPresent()) { + if (parent.get().getLeaf()) { + parent.get().setLeaf(false); + organizationRepository.save(parent.get()); + } + entity.setParentId(parentId); + //父级路径 + entity.setPath( + StringUtils.defaultString(parent.get().getPath()) + SEPARATE + entity.getId()); + //父级展示路径 + entity.setDisplayPath(StringUtils.defaultString(parent.get().getDisplayPath()) + + SEPARATE + entity.getName()); + } + // 判断当前节点下是否还存在子节点,不存在更改此节点为叶子节点 + List childList = organizationRepository.findByParentId(id); + if (CollectionUtils.isEmpty(childList)) { + entity.setLeaf(true); + } + organizationRepository.save(entity); + //存在子组织,递归更改子组织 path 和 displayPath + recursiveUpdateChildNodePathAndDisplayPath(entity.getId()); + return true; + } + return false; + } + + /** + * 递归修改子节点 path 和 displayPath + * + * @param id {@link String } 当前节点ID + */ + private void recursiveUpdateChildNodePathAndDisplayPath(String id) { + Optional organization = organizationRepository.findById(id); + if (organization.isPresent()) { + OrganizationEntity entity = organization.get(); + List childList = organizationRepository.findByParentId(id); + for (OrganizationEntity e : childList) { + e.setPath(entity.getPath() + SEPARATE + entity.getId()); + e.setDisplayPath(entity.getDisplayPath() + SEPARATE + entity.getName()); + organizationRepository.save(e); + //存在下级节点 + if (!e.getLeaf()) { + //递归处理 + recursiveUpdateChildNodePathAndDisplayPath(e.getId()); + } + } + } + } + + /** + * 查询根组织 + * + * @return {@link OrganizationResult} + */ + @Override + public OrganizationRootResult getRootOrganization() { + OrganizationEntity entity = organizationRepository.findById(ROOT_NODE).orElse(null); + return orgDataConverter.entityConvertToRootOrgListResult(entity); + } + + /** + * 查询子组织 + * + * @param parentId {@link String} + * @return {@link OrganizationResult} + */ + @Override + public List getChildOrganization(String parentId) { + List entityList = organizationRepository + .findByParentIdOrderByOrderAsc(parentId); + return orgDataConverter.entityConvertToChildOrgListResult(entityList); + } + + /** + * 查询子组织 + * + * @param parentId {@link String} + * @param dataOrigin {@link DataOrigin} + * @param identitySourceId {@link Long} + * @return {@link OrganizationEntity} + */ + @Override + public List getChildOrgList(String parentId, DataOrigin dataOrigin, + Long identitySourceId) { + return organizationRepository.findByParentIdAndDataOriginAndIdentitySourceId(parentId, + dataOrigin, identitySourceId); + } + + /** + * 过滤组织树 + * + * @param keyWord {@link String} 关键字 name | code + * @return {@link List} + */ + @Override + public List filterOrganizationTree(String keyWord) { + List list = organizationRepository.findByNameLikeOrCodeLike(keyWord); + if (!CollectionUtils.isEmpty(list)) { + List parentIds = Lists.newArrayList(); + for (OrganizationEntity entity : list) { + parentIds.addAll(Lists.newArrayList(entity.getPath().split(SEPARATE))); + } + if (!CollectionUtils.isEmpty(parentIds)) { + List entityList = organizationRepository + .findByIdInOrderByOrderAsc(parentIds); + return orgDataConverter.entityConvertToChildOrgTreeListResult(null, entityList); + } + } + return Lists.newArrayList(); + } + + @Override + public OrganizationEntity getById(String id) { + return organizationRepository.findById(id).orElse(null); + } + + /** + * 根据外部ID查询组织架构 + * + * @param id {@link String} + * @param identitySourceId {@link Long} + * @return {@link OrganizationEntity} + */ + @Override + public OrganizationEntity getOrganizationByExternalId(String id, Long identitySourceId) { + return organizationRepository.findByExternalIdAndIdentitySourceId(id, identitySourceId); + } + + /** + * 批量删除组织 + * + * @param ids {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean batchDeleteOrg(String[] ids) { + organizationRepository.deleteAllById(Arrays.asList(ids)); + return true; + } + + /** + * 组织架构数据映射器 + */ + private final OrganizationConverter orgDataConverter; + /** + * OrganizationRepository + */ + private final OrganizationRepository organizationRepository; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/UserAccountAssociateServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/UserAccountAssociateServiceImpl.java new file mode 100644 index 00000000..b7f4c19a --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/UserAccountAssociateServiceImpl.java @@ -0,0 +1,33 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.account.impl; + +import org.springframework.stereotype.Service; + +import cn.topiam.employee.console.service.account.UserAccountAssociateService; + +import lombok.AllArgsConstructor; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 22:48 + */ +@Service +@AllArgsConstructor +public class UserAccountAssociateServiceImpl implements UserAccountAssociateService { +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/UserGroupServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/UserGroupServiceImpl.java new file mode 100644 index 00000000..5f1b07fa --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/UserGroupServiceImpl.java @@ -0,0 +1,235 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.account.impl; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.querydsl.QPageRequest; +import org.springframework.stereotype.Service; + +import com.google.common.collect.Lists; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.entity.account.UserGroupEntity; +import cn.topiam.employee.common.entity.account.UserGroupMemberEntity; +import cn.topiam.employee.common.entity.account.po.UserPO; +import cn.topiam.employee.common.entity.account.query.UserGroupMemberListQuery; +import cn.topiam.employee.common.repository.account.UserGroupMemberRepository; +import cn.topiam.employee.common.repository.account.UserGroupRepository; +import cn.topiam.employee.console.converter.account.UserGroupConverter; +import cn.topiam.employee.console.pojo.query.account.UserGroupListQuery; +import cn.topiam.employee.console.pojo.result.account.UserGroupListResult; +import cn.topiam.employee.console.pojo.result.account.UserGroupMemberListResult; +import cn.topiam.employee.console.pojo.save.account.UserGroupCreateParam; +import cn.topiam.employee.console.pojo.update.account.UserGroupUpdateParam; +import cn.topiam.employee.console.service.account.UserGroupService; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.util.BeanUtils; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; + +/** + * 用户组实现service + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/11 21:30 + */ +@Slf4j +@Service +@AllArgsConstructor +public class UserGroupServiceImpl implements UserGroupService { + /** + * 查询用户分组列表 + * + * @param page {@link PageModel} + * @param query {@link UserGroupListQuery} + * @return {@link UserGroupListResult} + */ + @Override + public Page getUserGroupList(PageModel page, UserGroupListQuery query) { + //查询条件 + Predicate predicate = userGroupConverter.queryUserGroupListParamConvertToPredicate(query); + //分页条件 + QPageRequest request = QPageRequest.of(page.getCurrent(), page.getPageSize()); + //查询映射 + org.springframework.data.domain.Page list = userGroupRepository + .findAll(predicate, request); + return userGroupConverter.userGroupEntityConvertToUserGroupResult(list); + } + + /** + * 创建用户组 + * + * @param param {@link UserGroupCreateParam} + * @return {@link Boolean} + */ + @Override + public Boolean createUserGroup(UserGroupCreateParam param) { + UserGroupEntity entity = userGroupConverter.userGroupCreateParamConvertToEntity(param); + userGroupRepository.save(entity); + AuditContext.setTarget( + Target.builder().id(entity.getId().toString()).type(TargetType.USER_GROUP).build()); + return true; + } + + /** + * 更新用户组 + * + * @param param {@link UserGroupUpdateParam} + * @return {@link Boolean} + */ + @Override + public Boolean updateUserGroup(UserGroupUpdateParam param) { + UserGroupEntity entity = userGroupConverter.userGroupUpdateParamConvertToEntity(param); + UserGroupEntity details = getUserGroup(Long.valueOf(param.getId())); + BeanUtils.merge(entity, details, LAST_MODIFIED_TIME, LAST_MODIFIED_BY); + userGroupRepository.save(details); + AuditContext.setTarget( + Target.builder().id(details.getId().toString()).type(TargetType.USER_GROUP).build()); + return true; + } + + /** + * 删除用户组 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean deleteUserGroup(String id) { + Optional optional = userGroupRepository.findById(Long.valueOf(id)); + //用户不存在 + if (optional.isEmpty()) { + AuditContext.setContent("操作失败,用户组不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException(AuditContext.getContent()); + } + userGroupRepository.deleteById(Long.valueOf(id)); + AuditContext.setTarget(Target.builder().id(id).type(TargetType.USER_GROUP).build()); + return true; + } + + /** + * 获取用户组内分组列表 + * + * @param query {@link UserGroupMemberListQuery} + * @return {@link UserGroupMemberListResult} + */ + @Override + public Page getUserGroupMemberList(PageModel model, + UserGroupMemberListQuery query) { + org.springframework.data.domain.Page page = userGroupMemberRepository + .getUserGroupMemberList(query, PageRequest.of(model.getCurrent(), model.getPageSize())); + return userGroupConverter.userPoConvertToGroupMemberListResult(page); + } + + /** + * 从用户组移除用户 + * + * @param id {@link String} + * @param userId {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean removeMember(String id, String userId) { + //查询关联关系 + userGroupMemberRepository.deleteByGroupIdAndUserId(Long.valueOf(id), Long.valueOf(userId)); + AuditContext.setTarget(Target.builder().id(userId).type(TargetType.USER).build(), + Target.builder().id(id).type(TargetType.USER_GROUP).build()); + return true; + } + + /** + * 添加用户 + * + * @param userIds {@link String} + * @param groupId {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean addMember(String groupId, String[] userIds) { + List list = new ArrayList<>(); + Lists.newArrayList(userIds).forEach(id -> { + UserGroupMemberEntity member = new UserGroupMemberEntity(); + member.setGroupId(Long.valueOf(groupId)); + member.setUserId(Long.valueOf(id)); + list.add(member); + }); + List targets = new ArrayList<>(Arrays.stream(userIds) + .map(i -> Target.builder().id(i).type(TargetType.USER).build()).toList()); + targets.add(Target.builder().id(groupId).type(TargetType.USER_GROUP).build()); + AuditContext.setTarget(targets); + //添加 + userGroupMemberRepository.saveAll(list); + return true; + } + + /** + * 根据ID查询用户分组 + * + * @param id {@link Long} + * @return {@link UserGroupEntity} + */ + @Override + public UserGroupEntity getUserGroup(Long id) { + return userGroupRepository.findById(id).orElse(null); + } + + /** + * 批量移除用户 + * + * @param userIds {@link String} + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean batchRemoveMember(String id, List userIds) { + userIds.forEach(userId -> userGroupMemberRepository + .deleteByGroupIdAndUserId(Long.valueOf(id), Long.valueOf(userId))); + AuditContext.setTarget( + Target.builder().id(StringUtils.join(userIds)).type(TargetType.USER).build(), + Target.builder().id(id).type(TargetType.USER_GROUP).build()); + return true; + } + + /** + * 用户组数据映射 + */ + private final UserGroupConverter userGroupConverter; + /** + * UserGroupRepository + */ + private final UserGroupRepository userGroupRepository; + /** + * UserGroupMemberRepository + */ + private final UserGroupMemberRepository userGroupMemberRepository; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/UserServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/UserServiceImpl.java new file mode 100644 index 00000000..83820e3f --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/UserServiceImpl.java @@ -0,0 +1,604 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.account.impl; + +import java.io.Serializable; +import java.nio.charset.StandardCharsets; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate; +import org.springframework.data.elasticsearch.core.SearchHits; +import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; +import org.springframework.data.elasticsearch.core.query.NativeSearchQuery; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; + +import com.google.i18n.phonenumbers.NumberParseException; +import com.google.i18n.phonenumbers.PhoneNumberUtil; +import com.google.i18n.phonenumbers.Phonenumber; +import com.querydsl.core.types.ExpressionUtils; +import com.querydsl.core.types.Predicate; +import com.querydsl.core.types.dsl.BooleanExpression; +import com.querydsl.core.types.dsl.Expressions; +import com.querydsl.jpa.impl.JPAQuery; +import com.querydsl.jpa.impl.JPAQueryFactory; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.AuditElasticSearchEntity; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.entity.account.*; +import cn.topiam.employee.common.entity.account.po.UserPO; +import cn.topiam.employee.common.entity.account.query.UserListNotInGroupQuery; +import cn.topiam.employee.common.entity.account.query.UserListQuery; +import cn.topiam.employee.common.enums.*; +import cn.topiam.employee.common.repository.account.*; +import cn.topiam.employee.console.converter.account.UserConverter; +import cn.topiam.employee.console.pojo.result.account.UserListResult; +import cn.topiam.employee.console.pojo.result.account.UserLoginAuditListResult; +import cn.topiam.employee.console.pojo.result.account.UserResult; +import cn.topiam.employee.console.pojo.save.account.UserCreateParam; +import cn.topiam.employee.console.pojo.update.account.ResetPasswordParam; +import cn.topiam.employee.console.pojo.update.account.UserUpdateParam; +import cn.topiam.employee.console.service.account.UserService; +import cn.topiam.employee.core.configuration.EiamSupportProperties; +import cn.topiam.employee.core.message.MsgVariable; +import cn.topiam.employee.core.message.mail.MailMsgEventPublish; +import cn.topiam.employee.core.message.sms.SmsMsgEventPublish; +import cn.topiam.employee.support.exception.BadParamsException; +import cn.topiam.employee.support.exception.InfoValidityFailException; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.util.BeanUtils; +import cn.topiam.employee.support.validation.annotation.ValidationPhone; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import static cn.topiam.employee.audit.enums.TargetType.*; +import static cn.topiam.employee.common.constants.AuditConstants.getAuditIndexPrefix; +import static cn.topiam.employee.core.message.sms.SmsMsgEventPublish.PASSWORD; +import static cn.topiam.employee.core.message.sms.SmsMsgEventPublish.USERNAME; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; +import static cn.topiam.employee.support.util.PhoneUtils.getPhoneNumber; + +/** + *

+ * 用户表 服务实现类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-07-31 + */ +@Slf4j +@Service +@RequiredArgsConstructor +public class UserServiceImpl implements UserService { + + /** + * 获取用户(分页) + * + * @param pageModel {@link PageModel} + * @return {@link UserListQuery} + */ + @Override + public Page getUserList(PageModel pageModel, UserListQuery query) { + org.springframework.data.domain.Page list = userRepository.getUserList(query, + PageRequest.of(pageModel.getCurrent(), pageModel.getPageSize())); + return userConverter.userPoConvertToUserListResult(list); + } + + /** + * 获取用户列表不在当前组 + * + * @param model {@link PageModel} + * @param query {@link UserListNotInGroupQuery } + * @return {@link } + */ + @Override + public Page getUserListNotInGroup(PageModel model, + UserListNotInGroupQuery query) { + org.springframework.data.domain.Page list = userRepository.getUserListNotInGroupId( + query, PageRequest.of(model.getCurrent(), model.getPageSize())); + return userConverter.userPoConvertToUserListResult(list); + } + + /** + * 重置密码 + * + * @param param {@link ResetPasswordParam} 用户修改入参 + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean resetUserPassword(ResetPasswordParam param) { + //additionalContent + Optional optional = userRepository.findById(Long.valueOf(param.getId())); + //用户不存在 + if (optional.isEmpty()) { + AuditContext.setContent("操作失败,用户不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException(AuditContext.getContent()); + } + UserEntity userEntity = optional.get(); + // 重置用户密码 + String password = new String( + Base64.getUrlDecoder().decode(param.getPassword().getBytes(StandardCharsets.UTF_8)), + StandardCharsets.UTF_8); + password = passwordEncoder.encode(password); + userRepository.updateUserPassword(Long.valueOf(param.getId()), password, + LocalDateTime.now()); + //保存历史密码 + UserHistoryPasswordEntity userHistoryPassword = new UserHistoryPasswordEntity(); + userHistoryPassword.setUserId(String.valueOf(param.getId())); + userHistoryPassword.setPassword(password); + userHistoryPassword.setChangeTime(LocalDateTime.now()); + userHistoryPasswordRepository.save(userHistoryPassword); + AuditContext.setTarget(Target.builder().id(param.getId()).type(TargetType.USER).build()); + + ResetPasswordParam.PasswordResetConfig passwordResetConfig = param.getPasswordResetConfig(); + if (Objects.nonNull(passwordResetConfig) && passwordResetConfig.getEnableNotice() + && org.apache.commons.collections4.CollectionUtils + .isNotEmpty(passwordResetConfig.getNoticeChannels())) { + // 重置密码成功通知 + if (passwordResetConfig.getNoticeChannels().contains(MessageNoticeChannel.MAIL)) { + if (StringUtils.isNotEmpty(userEntity.getEmail())) { + log.warn("不存在用户邮箱信息,未发送用户重置密码邮件。"); + } else { + Map parameter = new HashMap<>(16); + parameter.put(PASSWORD, password); + mailMsgEventPublish.publish(MailType.RESET_PASSWORD_CONFIRM, + userEntity.getEmail(), parameter); + } + } + if (passwordResetConfig.getNoticeChannels().contains(MessageNoticeChannel.SMS)) { + LinkedHashMap parameter = new LinkedHashMap<>(); + parameter.put(USERNAME, userEntity.getUsername()); + parameter.put(PASSWORD, password); + smsMsgEventPublish.publish(SmsType.RESET_PASSWORD_SUCCESS, userEntity.getPhone(), + parameter); + } + } + + return true; + } + + /** + * 更改用户状态 + * + * @param id {@link Long} + * @param status {@link UserStatus} + * @return {@link Boolean} + */ + @Override + public boolean changeUserStatus(Long id, UserStatus status) { + Optional optional = userRepository.findById(id); + //用户不存在 + if (optional.isEmpty()) { + AuditContext.setContent("操作失败,用户不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException(AuditContext.getContent()); + } + AuditContext.setTarget(Target.builder().id(id.toString()).type(TargetType.USER).build()); + return userRepository.updateUserStatus(id, status) > 0; + } + + /** + * 创建用户 + * + * @param param {@link UserCreateParam} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean createUser(UserCreateParam param) { + if (!ObjectUtils.isEmpty(param.getPhone()) && StringUtils.isNotEmpty(param.getPhone())) { + if (!getPhoneNumber(param.getPhone()).matches(ValidationPhone.PHONE_REGEXP)) { + throw new InfoValidityFailException("手机号格式错误"); + } + Boolean validityPhone = userParamCheck(CheckValidityType.PHONE, param.getPhone(), null); + if (!validityPhone) { + throw new InfoValidityFailException("手机号已存在"); + } + } + Boolean validityEmail = userParamCheck(CheckValidityType.EMAIL, param.getEmail(), null); + if (!validityEmail) { + throw new InfoValidityFailException("邮箱已存在"); + } + Boolean validityUsername = userParamCheck(CheckValidityType.USERNAME, param.getUsername(), + null); + if (!validityUsername) { + throw new InfoValidityFailException("用户名已存在"); + } + //用户信息 + UserEntity user = userConverter.userCreateParamConvertToUserEntity(param); + userRepository.save(user); + //用户详情 + UserDetailEntity detail = userConverter.userCreateParamConvertToUserDetailEntity(param); + detail.setUserId(user.getId()); + userDetailsRepository.save(detail); + //用户组织关联关系 + OrganizationMemberEntity member = new OrganizationMemberEntity(param.getOrganizationId(), + user.getId()); + organizationMemberRepository.save(member); + AuditContext.setTarget(Target.builder().type(USER).id(user.getId().toString()).build(), + Target.builder().type(USER_DETAIL).id(detail.getId().toString()).build()); + + // 发送短信和邮件的欢迎信息(密码通知) + UserCreateParam.PasswordInitializeConfig passwordInitializeConfig = param + .getPasswordInitializeConfig(); + if (Objects.nonNull(passwordInitializeConfig) && passwordInitializeConfig.getEnableNotice() + && org.apache.commons.collections4.CollectionUtils + .isNotEmpty(passwordInitializeConfig.getNoticeChannels())) { + List channels = passwordInitializeConfig.getNoticeChannels(); + if (channels.contains(MessageNoticeChannel.MAIL)) { + Map parameter = new HashMap<>(16); + parameter.put(MsgVariable.CLIENT_DESCRIPTION, + "您的 TopIAM 账户的初始密码是【" + param.getPassword() + "】。"); + mailMsgEventPublish.publish(MailType.WELCOME_MAIL, user.getEmail(), parameter); + } + if (channels.contains(MessageNoticeChannel.SMS)) { + LinkedHashMap parameter = new LinkedHashMap<>(); + parameter.put(USERNAME, user.getUsername()); + parameter.put(PASSWORD, user.getPassword()); + smsMsgEventPublish.publish(SmsType.WELCOME_SMS, user.getPhone(), parameter); + } + } + return true; + } + + /** + * 通过外部ID获取用户 + * + * @param id {@link String} + * @return {@link UserEntity} + */ + @Override + public UserEntity getByExternalId(String id) { + return userRepository.findByExternalId(id).orElse(null); + } + + /** + * 根据ID查询用户 + * + * @param id {@link String} + * @return {@link UserResult} + */ + @Override + public UserResult getUser(String id) { + //查询 + Optional user = userRepository.findById(Long.valueOf(id)); + Optional detail = userDetailsRepository.findByUserId(Long.valueOf(id)); + //映射 + UserEntity userEntity = user.orElse(null); + UserResult userResult = userConverter.entityConvertToUserResult(userEntity, + detail.orElse(null)); + if (Objects.nonNull(userEntity) && StringUtils.isNotEmpty(userEntity.getPhone())) { + userResult.setPhone(userEntity.getPhoneAreaCode() + userEntity.getPhone()); + } + return userResult; + } + + /** + * 更新用户 + * + * @param param {@link UserUpdateParam} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public boolean updateUser(UserUpdateParam param) { + if (StringUtils.isNotBlank(param.getPhone())) { + String phoneNumber = getPhoneNumber(param.getPhone()); + if (!phoneNumber.matches(ValidationPhone.PHONE_REGEXP)) { + throw new InfoValidityFailException("手机号格式错误"); + } + } + //用户信息 + UserEntity toUserEntity = userConverter.userUpdateParamConvertToUserEntity(param); + UserEntity user = getUser(Long.valueOf(param.getId())); + BeanUtils.merge(toUserEntity, user, LAST_MODIFIED_BY, LAST_MODIFIED_TIME); + //如果更改密码到期时间,修改为启用 + if (user.getStatus().equals(UserStatus.EXPIRED_LOCKED)) { + if (toUserEntity.getExpireDate().isAfter(LocalDate.now())) { + user.setStatus(UserStatus.ENABLE); + } + } + userRepository.save(user); + //用户详情 + UserDetailEntity detail = userDetailsRepository.findByUserId(Long.valueOf(param.getId())) + .orElse(new UserDetailEntity()); + UserDetailEntity toUserDetailsEntity = userConverter + .userUpdateParamConvertToUserDetailsEntity(param); + toUserDetailsEntity.setId(detail.getId()); + BeanUtils.merge(toUserDetailsEntity, detail, LAST_MODIFIED_BY, LAST_MODIFIED_TIME); + userDetailsRepository.save(detail); + AuditContext.setTarget(Target.builder().type(USER).id(user.getId().toString()).build(), + Target.builder().type(USER_DETAIL).id(detail.getId().toString()).build()); + return true; + } + + /** + * 删除用户 + * + * @param id {@link Serializable} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public boolean deleteUser(String id) { + Optional optional = userRepository.findById(Long.valueOf(id)); + //管理员不存在 + if (optional.isEmpty()) { + AuditContext.setContent("删除失败,用户不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException(AuditContext.getContent()); + } + //删除 + userRepository.deleteById(Long.valueOf(id)); + //删除用户详情 + userDetailsRepository.deleteByUserId(Long.valueOf(id)); + //删除组织用户关联关系 + organizationMemberRepository.deleteByUserId(Long.valueOf(id)); + //删除用户组用户详情 + userGroupMemberRepository.deleteByUserId(Long.valueOf(id)); + AuditContext.setTarget(Target.builder().id(id).type(TargetType.USER).build()); + return true; + } + + /** + * 用户转岗 + * + * @param userId {@link String} + * @param orgId {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean userTransfer(String userId, String orgId) { + Optional entity = organizationRepository.findById(orgId); + //additionalContent + if (entity.isEmpty()) { + AuditContext.setContent("操作失败,组织不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException(AuditContext.getContent()); + } + organizationMemberRepository.deleteByOrgIdAndUserId(orgId, Long.valueOf(userId)); + userRepository.save(null); + AuditContext.setTarget(Target.builder().id(userId).type(TargetType.USER).build()); + return true; + } + + /** + * 批量删除用户 + * + * @param ids {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean batchDeleteUser(String[] ids) { + //删除用户 + userRepository + .deleteAllById(Arrays.stream(ids).map(s -> Long.parseLong(s.trim())).toList()); + //删除用户详情 + userDetailsRepository + .deleteAllByUserId(Arrays.stream(ids).map(s -> Long.parseLong(s.trim())).toList()); + //删除组织用户关系 + organizationMemberRepository + .deleteAllByUserId(Arrays.stream(ids).map(s -> Long.parseLong(s.trim())).toList()); + //删除用户组关系 + userGroupMemberRepository + .deleteAllByUserId(Arrays.stream(ids).map(s -> Long.parseLong(s.trim())).toList()); + return true; + } + + /** + * 参数有效性验证 + * + * @param type {@link CheckValidityType} + * @param value {@link String} + * @param id {@link Long} + * @return {@link Boolean} + */ + @Override + public Boolean userParamCheck(CheckValidityType type, String value, Long id) { + if (StringUtils.isEmpty(value)) { + return true; + } + QUserEntity user = QUserEntity.userEntity; + UserEntity entity = new UserEntity(); + boolean result = false; + // ID存在说明是修改操作,查询一下当前数据 + if (Objects.nonNull(id)) { + entity = userRepository.findById(id).orElse(new UserEntity()); + } + //手机号 + if (CheckValidityType.PHONE.equals(type)) { + try { + //手机号未修改 + if (StringUtils.equals(value, entity.getPhoneAreaCode() + entity.getPhone())) { + return true; + } + Phonenumber.PhoneNumber phoneNumber = PhoneNumberUtil.getInstance().parse(value, + "CN"); + BooleanExpression eq = user.phone + .eq(String.valueOf(phoneNumber.getNationalNumber())) + .and(user.phoneAreaCode.eq(String.valueOf(phoneNumber.getCountryCode()))); + result = !userRepository.exists(eq); + } catch (NumberParseException e) { + log.error("校验手机号发生异常", e); + throw new TopIamException("校验手机号发生异常"); + } + } + //邮箱 + if (CheckValidityType.EMAIL.equals(type)) { + if (StringUtils.equals(entity.getEmail(), value)) { + return true; + } + BooleanExpression eq = user.email.eq(value); + result = !userRepository.exists(eq); + } + //用户名 + if (CheckValidityType.USERNAME.equals(type)) { + if (StringUtils.equals(entity.getUsername(), value)) { + return true; + } + BooleanExpression eq = user.username.eq(value); + result = !userRepository.exists(eq); + } + return result; + } + + /** + * 查询组织成员数量 + * + * @param orgId {@link String} + * @return {@link Long} + */ + @Override + public Long getOrgMemberCount(String orgId) { + //条件 + QUserEntity user = QUserEntity.userEntity; + QOrganizationEntity qOrganization = QOrganizationEntity.organizationEntity; + Predicate predicate = user.isNotNull(); + //FIND_IN_SET函数 + BooleanExpression template = Expressions.booleanTemplate( + "FIND_IN_SET({0}, replace({1}, '/', ','))> 0", orgId, qOrganization.path); + predicate = StringUtils.isBlank(orgId) ? predicate + : ExpressionUtils.and(predicate, qOrganization.id.eq(orgId).or(template)); + //构造查询 + JPAQuery jpaQuery = jpaQueryFactory.selectFrom(user).select(user.count()) + .innerJoin(QOrganizationMemberEntity.organizationMemberEntity) + .on(user.id.eq(QOrganizationMemberEntity.organizationMemberEntity.userId)) + .innerJoin(qOrganization) + .on(qOrganization.id.eq(QOrganizationMemberEntity.organizationMemberEntity.orgId)) + .where(predicate); + return jpaQuery.fetch().get(0); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteBatchUser(List removeIds) { + // 删除 + if (!CollectionUtils.isEmpty(removeIds)) { + userRepository.deleteAllById(removeIds); + } + } + + /** + * 查看用户登录日志 + * + * @param id {@link Long} + * @param pageModel {@link PageModel} + * @return {@link List} + */ + @Override + public Page findUserLoginAuditList(Long id, PageModel pageModel) { + //查询入参转查询条件 + NativeSearchQuery nsq = userConverter.auditListRequestConvertToNativeSearchQuery(id, + pageModel); + //查询列表 + SearchHits search = elasticsearchRestTemplate.search(nsq, + AuditElasticSearchEntity.class, IndexCoordinates + .of(getAuditIndexPrefix(eiamSupportProperties.getDemo().isOpen()) + "*")); + //结果转返回结果 + return userConverter.searchHitsConvertToAuditListResult(search, pageModel); + } + + /** + * 获取用户信息 + * + * @param id {@link String} + * @return {@link UserEntity} + */ + private UserEntity getUser(Long id) { + return userRepository.findById(id).orElseThrow(() -> new BadParamsException("用户不存在")); + } + + /** + * 用户数据映射器 + */ + private final UserConverter userConverter; + + /** + * UserRepository + */ + private final UserRepository userRepository; + + /** + * password encoder + */ + private final PasswordEncoder passwordEncoder; + + /** + * 组织 + */ + private final OrganizationRepository organizationRepository; + + /** + * 组织成员 + */ + private final OrganizationMemberRepository organizationMemberRepository; + + /** + * 部门成员 + */ + private final UserGroupMemberRepository userGroupMemberRepository; + + /** + * 用户详情Repository + */ + private final UserDetailRepository userDetailsRepository; + + /** + * JPAQueryFactory + */ + private final JPAQueryFactory jpaQueryFactory; + + /** + * 修改密码历史Repository + */ + private final UserHistoryPasswordRepository userHistoryPasswordRepository; + + /** + * ElasticsearchRestTemplate + */ + private final ElasticsearchRestTemplate elasticsearchRestTemplate; + + /** + * 邮件消息发布 + */ + private final MailMsgEventPublish mailMsgEventPublish; + + /** + * 短信消息发送 + */ + private final SmsMsgEventPublish smsMsgEventPublish; + + /** + * EiamSupportProperties + */ + private final EiamSupportProperties eiamSupportProperties; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/UserSocialBindServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/UserSocialBindServiceImpl.java new file mode 100644 index 00000000..7a5fa7f4 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/impl/UserSocialBindServiceImpl.java @@ -0,0 +1,34 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.account.impl; + +import org.springframework.stereotype.Service; + +import cn.topiam.employee.console.service.account.UserSocialBindService; + +import lombok.AllArgsConstructor; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/12/29 20:25 + */ +@Service +@AllArgsConstructor +public class UserSocialBindServiceImpl implements UserSocialBindService { + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/account/userdetail/UserDetailsServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/userdetail/UserDetailsServiceImpl.java new file mode 100644 index 00000000..b4210fc1 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/account/userdetail/UserDetailsServiceImpl.java @@ -0,0 +1,117 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.account.userdetail; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Optional; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.authentication.AccountExpiredException; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.stereotype.Component; +import org.springframework.util.ObjectUtils; + +import cn.topiam.employee.common.entity.setting.AdministratorEntity; +import cn.topiam.employee.common.enums.UserStatus; +import cn.topiam.employee.common.enums.UserType; +import cn.topiam.employee.common.repository.setting.AdministratorRepository; +import cn.topiam.employee.core.security.authorization.Roles; +import cn.topiam.employee.core.security.userdetails.UserDetails; +import cn.topiam.employee.core.security.userdetails.UserDetailsService; + +/** + * FortressUserDetailsService + * + * @author TopIAM + * Created by support@topiam.cn on 2020/10/25 20:41 + */ +@Component(value = "userDetailsService") +public class UserDetailsServiceImpl implements UserDetailsService { + + private final Logger logger = LoggerFactory.getLogger(UserDetailsServiceImpl.class); + + /** + * Locates the user based on the username. In the actual implementation, the search + * may possibly be case sensitive, or case insensitive depending on how the + * implementation instance is configured. In this case, the UserDetails + * object that comes back may have a username that is of a different case than what + * was actually requested.. + * + * @param username the username identifying the user whose data is required. + * @return a fully populated user record (never null) + * @throws UsernameNotFoundException if the user could not be found or the user has no + * GrantedAuthority + */ + @Override + public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { + // 状态相关 + boolean enabled = true, accountNonLocked = true; + // 权限 + Collection authorities = new ArrayList<>(); + // 用户名 + Optional optional = administratorRepository.findByUsername(username); + if (optional.isEmpty()) { + // 手机号 + optional = administratorRepository.findByPhone(username); + if (optional.isEmpty()) { + // 邮箱 + optional = administratorRepository.findByEmail(username); + } + } + //不存在该用户 + if (optional.isEmpty()) { + logger.info("根据用户名、手机号、邮箱未查询该管理员【{}】", username); + throw new UsernameNotFoundException("用户名或密码错误"); + } + AdministratorEntity administrator = optional.get(); + if (!ObjectUtils.isEmpty(administrator.getStatus())) { + //锁定 + if (administrator.getStatus().equals(UserStatus.LOCKED) + || administrator.getStatus().equals(UserStatus.PASS_WORD_EXPIRED_LOCKED) + || administrator.getStatus().equals(UserStatus.EXPIRED_LOCKED)) { + logger.info("管理员【{}】被锁定", administrator.getUsername()); + accountNonLocked = false; + } + //禁用 + if (administrator.getStatus().equals(UserStatus.DISABLE)) { + logger.info("管理员【{}】被禁用", administrator.getUsername()); + enabled = false; + } + //根据用户类型封装权限 + SimpleGrantedAuthority authority = new SimpleGrantedAuthority(Roles.ADMIN); + authorities.add(authority); + return new UserDetails(String.valueOf(administrator.getId()), + administrator.getUsername(), administrator.getPassword(), UserType.ADMIN, enabled, + true, true, accountNonLocked, authorities); + } + logger.info("管理员【{}】状态异常", administrator.getUsername()); + throw new AccountExpiredException("管理员状态异常"); + } + + /** + * AdministratorRepository + */ + private final AdministratorRepository administratorRepository; + + public UserDetailsServiceImpl(AdministratorRepository administratorRepository) { + this.administratorRepository = administratorRepository; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/analysis/AnalysisService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/analysis/AnalysisService.java new file mode 100644 index 00000000..560ce92e --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/analysis/AnalysisService.java @@ -0,0 +1,57 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.analysis; + +import java.util.List; + +import cn.topiam.employee.console.pojo.query.analysis.AnalysisQuery; +import cn.topiam.employee.console.pojo.result.analysis.AppVisitRankResult; +import cn.topiam.employee.console.pojo.result.analysis.AuthnQuantityResult; +import cn.topiam.employee.console.pojo.result.analysis.OverviewResult; + +/** + * 统计 service + * + * @author TopIAM + * Created by support@topiam.cn on 2022/11/22 22:25 + */ +public interface AnalysisService { + + /** + * 概述 + * + * @return {@link OverviewResult} + */ + OverviewResult overview(); + + /** + * 认证统计 + * + * @param params {@link AnalysisQuery} + * @return {@link List} + */ + List authnQuantity(AnalysisQuery params); + + /** + * 认证统计 + * + * @param params {@link AnalysisQuery} + * @return {@link List< AppVisitRankResult >} + */ + List appVisitRank(AnalysisQuery params); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/analysis/impl/AnalysisServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/analysis/impl/AnalysisServiceImpl.java new file mode 100644 index 00000000..7bd0cd20 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/analysis/impl/AnalysisServiceImpl.java @@ -0,0 +1,250 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.analysis.impl; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import org.elasticsearch.index.query.BoolQueryBuilder; +import org.elasticsearch.index.query.QueryBuilders; +import org.elasticsearch.index.query.RangeQueryBuilder; +import org.elasticsearch.search.aggregations.Aggregation; +import org.elasticsearch.search.aggregations.AggregationBuilders; +import org.elasticsearch.search.aggregations.Aggregations; +import org.elasticsearch.search.aggregations.BucketOrder; +import org.elasticsearch.search.aggregations.bucket.histogram.*; +import org.elasticsearch.search.aggregations.bucket.terms.ParsedStringTerms; +import org.elasticsearch.search.aggregations.bucket.terms.Terms; +import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder; +import org.jetbrains.annotations.NotNull; +import org.springframework.data.elasticsearch.core.ElasticsearchAggregations; +import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate; +import org.springframework.data.elasticsearch.core.SearchHits; +import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; +import org.springframework.data.elasticsearch.core.query.NativeSearchQuery; +import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder; +import org.springframework.stereotype.Service; +import org.springframework.util.Assert; +import org.springframework.util.StringUtils; + +import cn.topiam.employee.audit.entity.AuditElasticSearchEntity; +import cn.topiam.employee.audit.enums.EventStatus; +import cn.topiam.employee.audit.enums.EventType; +import cn.topiam.employee.common.entity.app.AppEntity; +import cn.topiam.employee.common.repository.account.UserRepository; +import cn.topiam.employee.common.repository.app.AppRepository; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; +import cn.topiam.employee.console.pojo.query.analysis.AnalysisQuery; +import cn.topiam.employee.console.pojo.result.analysis.AppVisitRankResult; +import cn.topiam.employee.console.pojo.result.analysis.AuthnQuantityResult; +import cn.topiam.employee.console.pojo.result.analysis.OverviewResult; +import cn.topiam.employee.console.service.analysis.AnalysisService; +import cn.topiam.employee.core.configuration.EiamSupportProperties; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import static cn.topiam.employee.audit.entity.Event.*; +import static cn.topiam.employee.audit.entity.Target.TARGET_ID_KEYWORD; +import static cn.topiam.employee.common.constants.AuditConstants.getAuditIndexPrefix; +import static cn.topiam.employee.support.constant.EiamConstants.DEFAULT_DATE_TIME_FORMATTER_PATTERN; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2022/11/22 22:25 + */ +@Service +@Slf4j +@RequiredArgsConstructor +public class AnalysisServiceImpl implements AnalysisService { + + // void testLog(Query query) { + // try { + // Method searchRequest = ReflectionUtils.findMethod(Class.forName("org.springframework.data.elasticsearch.core.RequestFactory"), "searchRequest", Query.class, Class.class, IndexCoordinates.class); + // searchRequest.setAccessible(true); + // Object o = ReflectionUtils.invokeMethod(searchRequest, elasticsearchRestTemplate.getRequestFactory(), query, AuditElasticSearchEntity.class, IndexCoordinates.of(AUDIT_INDEX_PREFIX + "*")); + // + // Field source = ReflectionUtils.findField(Class.forName("org.elasticsearch.action.search.SearchRequest"), "source"); + // source.setAccessible(true); + // Object s = ReflectionUtils.getField(source, o); + // log.error("dsl:{}", s); + // } + // catch (Exception e) { + // e.printStackTrace(); + // } + // } + /** + * 概述 + * + * @return {@link OverviewResult} + */ + @Override + public OverviewResult overview() { + OverviewResult result = new OverviewResult(); + result.setAppCount(appRepository.count()); + result.setUserCount(userRepository.count()); + result.setIdpCount(identityProviderRepository.count()); + // 查询今日认证量条件 + RangeQueryBuilder builder = QueryBuilders.rangeQuery(EVENT_TIME) + .gte(LocalDateTime.of(LocalDate.now(), LocalTime.MIN)) + .lte(LocalDateTime.of(LocalDate.now(), LocalTime.MAX)); + BoolQueryBuilder queryBuilder = getBoolQueryBuilder(builder, EventType.LOGIN_PORTAL); + result.setTodayAuthnCount(elasticsearchRestTemplate.count( + new NativeSearchQueryBuilder().withQuery(queryBuilder).build(), + AuditElasticSearchEntity.class, IndexCoordinates + .of(getAuditIndexPrefix(eiamSupportProperties.getDemo().isOpen()) + "*"))); + return result; + } + + /** + * 认证统计 + * + * @param params {@link AnalysisQuery} + * @return {@link List} + */ + @Override + public List authnQuantity(AnalysisQuery params) { + LocalDateTime min = params.getStartTime(); + LocalDateTime max = params.getEndTime(); + AnalysisQuery.Interval timeInterval = params.getTimeInterval(); + // 根据事件月份分组统计认证数量 + DateHistogramAggregationBuilder authCount = AggregationBuilders.dateHistogram("count") + .calendarInterval(timeInterval.getType()) + .extendedBounds( + new LongBounds(min.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli(), + max.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli())) + .minDocCount(0).field(EVENT_TIME).timeZone(ZoneId.of(ZONE_ID)) + .format(timeInterval.getFormat()); + // 事件状态group + TermsAggregationBuilder groupBuilder = AggregationBuilders.terms("statusGroup") + .field(EVENT_STATUS).subAggregation(authCount).minDocCount(0); + // 查询条件 + RangeQueryBuilder builder = QueryBuilders.rangeQuery(EVENT_TIME).timeZone(ZONE_ID) + .format(DEFAULT_DATE_TIME_FORMATTER_PATTERN) + .gt(min.format(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMATTER_PATTERN))) + .lt(max.format(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMATTER_PATTERN))); + BoolQueryBuilder queryBuilder = getBoolQueryBuilder(builder, EventType.LOGIN_PORTAL); + NativeSearchQuery authCountBuild = new NativeSearchQueryBuilder().withQuery(queryBuilder) + .withAggregations(groupBuilder).build(); + // testLog(authCountBuild); + SearchHits authCountResult = elasticsearchRestTemplate + .search(authCountBuild, AuditElasticSearchEntity.class, IndexCoordinates + .of(getAuditIndexPrefix(eiamSupportProperties.getDemo().isOpen()) + "*")); + ParsedStringTerms histogram = (ParsedStringTerms) getAggregation(authCountResult, + "statusGroup"); + List authCountList = new ArrayList<>(); + for (Terms.Bucket bucket : histogram.getBuckets()) { + String statusKey = String.valueOf(bucket.getKey()); + Aggregations aggregations = bucket.getAggregations(); + ParsedDateHistogram count = (ParsedDateHistogram) aggregations.asMap().get("count"); + for (Histogram.Bucket countBucket : count.getBuckets()) { + String countKey = countBucket.getKeyAsString(); + authCountList.add(new AuthnQuantityResult(countKey, countBucket.getDocCount(), + Objects.requireNonNull(EventStatus.getType(statusKey)).getDesc())); + } + } + return authCountList; + } + + /** + * 应用热点统计 + * + * @param params {@link AnalysisQuery} + * @return {@link AppVisitRankResult} + */ + @Override + public List appVisitRank(AnalysisQuery params) { + String min = params.getStartTime() + .format(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMATTER_PATTERN)); + String max = params.getEndTime() + .format(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMATTER_PATTERN)); + // 查询条件 + RangeQueryBuilder builder = QueryBuilders.rangeQuery(EVENT_TIME).timeZone(ZONE_ID) + .format(DEFAULT_DATE_TIME_FORMATTER_PATTERN).gt(min).lt(max); + BoolQueryBuilder queryBuilder = getBoolQueryBuilder(builder, EventType.APP_SSO); + // 应用访问频次前10条 + TermsAggregationBuilder groupAppVisit = AggregationBuilders.terms("count") + .field(TARGET_ID_KEYWORD).order(BucketOrder.count(false)).size(10); + NativeSearchQuery appVisitBuild = new NativeSearchQueryBuilder().withQuery(queryBuilder) + .withAggregations(groupAppVisit).build(); + // testLog(appVisitBuild); + SearchHits appVisitResult = elasticsearchRestTemplate + .search(appVisitBuild, AuditElasticSearchEntity.class, IndexCoordinates + .of(getAuditIndexPrefix(eiamSupportProperties.getDemo().isOpen()) + "*")); + ParsedStringTerms appVisitStringTerms = (ParsedStringTerms) getAggregation(appVisitResult, + "count"); + List applicationVisitList = new ArrayList<>(); + for (Terms.Bucket bucket : appVisitStringTerms.getBuckets()) { + String key = String.valueOf(bucket.getKey()); + //单点登录 + String name = getAppName(key); + applicationVisitList.add(new AppVisitRankResult(name, bucket.getDocCount())); + } + return applicationVisitList; + } + + /** + * 获取应用名称 + * + * @param targetId {@link String} + * @return {@link String} + */ + private String getAppName(String targetId) { + if (!StringUtils.hasText(targetId)) { + return null; + } + AppEntity app = appRepository.findById(Long.valueOf(targetId)).orElse(new AppEntity()); + return app.getName(); + } + + private Aggregation getAggregation(SearchHits searchHits, + String groupName) { + ElasticsearchAggregations elasticsearchAggregations = (ElasticsearchAggregations) searchHits + .getAggregations(); + Assert.notNull(elasticsearchAggregations, "聚合查询失败, aggregations为空"); + Aggregations aggregations = elasticsearchAggregations.aggregations(); + return aggregations.asMap().get(groupName); + } + + @NotNull + private BoolQueryBuilder getBoolQueryBuilder(RangeQueryBuilder builder, EventType eventType) { + // 查询今日认证量条件 + BoolQueryBuilder queryBuilder = QueryBuilders.boolQuery(); + // 事件类型 + queryBuilder.must(QueryBuilders.termsQuery(EVENT_TYPE, eventType.getCode())); + // 日期条件 + queryBuilder.filter(builder); + return queryBuilder; + } + + private final String ZONE_ID = ZoneId.systemDefault().getId(); + private final EiamSupportProperties eiamSupportProperties; + + private final ElasticsearchRestTemplate elasticsearchRestTemplate; + + private final AppRepository appRepository; + + private final IdentityProviderRepository identityProviderRepository; + + private final UserRepository userRepository; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/analysis/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/analysis/package-info.java new file mode 100644 index 00000000..dab5f676 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/analysis/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.analysis; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppAccessPolicyService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppAccessPolicyService.java new file mode 100644 index 00000000..4aeb805e --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppAccessPolicyService.java @@ -0,0 +1,59 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app; + +import cn.topiam.employee.common.entity.app.query.AppAccessPolicyQuery; +import cn.topiam.employee.console.pojo.result.app.AppAccessPolicyResult; +import cn.topiam.employee.console.pojo.save.app.AppAccessPolicyCreateParam; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + * 应用访问权限策略 Service + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 19:55 + */ +public interface AppAccessPolicyService { + + /** + * 查询应用授权策略列表 + * + * @param pageModel {@link PageModel} + * @param query {@link AppAccessPolicyQuery} + * @return {@link Page} + */ + Page getAppAccessPolicyList(PageModel pageModel, + AppAccessPolicyQuery query); + + /** + * 创建应用授权策略 + * + * @param param {@link AppAccessPolicyCreateParam} + * @return @{link Boolean} + */ + Boolean createAppAccessPolicy(AppAccessPolicyCreateParam param); + + /** + * 删除应用授权策略 + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean deleteAppAccessPolicy(String id); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppAccountService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppAccountService.java new file mode 100644 index 00000000..08173052 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppAccountService.java @@ -0,0 +1,58 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app; + +import cn.topiam.employee.common.entity.app.query.AppAccountQuery; +import cn.topiam.employee.console.pojo.result.app.AppAccountListResult; +import cn.topiam.employee.console.pojo.save.app.AppAccountCreateParam; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + * 应用账户 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 19:07 + */ +public interface AppAccountService { + + /** + * 查询应用账户 + * + * @param pageModel {@link PageModel} + * @param query {@link AppAccountQuery} + * @return {@link Page} + */ + Page getAppAccountList(PageModel pageModel, AppAccountQuery query); + + /** + * 新增应用账户 + * + * @param param {@link AppAccountCreateParam} + * @return {@link Boolean} + */ + Boolean createAppAccount(AppAccountCreateParam param); + + /** + * 删除应用账户 + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean deleteAppAccount(String id); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppCertService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppCertService.java new file mode 100644 index 00000000..55674ba9 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppCertService.java @@ -0,0 +1,39 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app; + +import java.util.List; + +import cn.topiam.employee.console.pojo.query.app.AppCertQuery; +import cn.topiam.employee.console.pojo.result.app.AppCertListResult; + +/** + * APP 证书 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 20:45 + */ +public interface AppCertService { + /** + * 获取应用证书列表 + * + * @param query {@link AppCertQuery} + * @return {@link List} + */ + List getAppCertListResult(AppCertQuery query); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppPermissionActionService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppPermissionActionService.java new file mode 100644 index 00000000..93de5ce9 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppPermissionActionService.java @@ -0,0 +1,43 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app; + +import java.util.List; + +import cn.topiam.employee.console.pojo.query.app.AppPermissionActionListQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionActionListResult; + +/** + *

+ * 权限 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-10 + */ +public interface AppPermissionActionService { + + /** + * 获取资源权限列表 + * + * @param query {@link AppPermissionActionListQuery} + * @return {@link AppPermissionActionListResult} + */ + List getPermissionActionList(AppPermissionActionListQuery query); + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppPermissionPolicyService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppPermissionPolicyService.java new file mode 100644 index 00000000..5fdbc213 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppPermissionPolicyService.java @@ -0,0 +1,78 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app; + +import cn.topiam.employee.common.entity.app.query.AppPolicyQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionPolicyGetResult; +import cn.topiam.employee.console.pojo.result.app.AppPermissionPolicyListResult; +import cn.topiam.employee.console.pojo.save.app.AppPermissionPolicyCreateParam; +import cn.topiam.employee.console.pojo.update.app.AppPermissionPolicyUpdateParam; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + *

+ * 权限策略 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-10 + */ +public interface AppPermissionPolicyService { + /** + * 获取资源列表 + * + * @param page {@link PageModel} + * @param query {@link AppPolicyQuery} + * @return {@link AppPermissionPolicyListResult} + */ + Page getPermissionPolicyList(PageModel page, + AppPolicyQuery query); + + /** + * 获取资源 + * + * @param id {@link String} + * @return {@link AppPermissionPolicyGetResult} + */ + AppPermissionPolicyGetResult getPermissionPolicy(String id); + + /** + * 删除资源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean deletePermissionPolicy(String id); + + /** + * 创建资源 + * + * @param param {@link AppPermissionPolicyCreateParam} + * @return {@link Boolean} + */ + Boolean createPermissionPolicy(AppPermissionPolicyCreateParam param); + + /** + * 更新资源 + * + * @param param {@link AppPermissionPolicyUpdateParam} + * @return {@link Boolean} + */ + Boolean updatePermissionPolicy(AppPermissionPolicyUpdateParam param); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppPermissionResourceService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppPermissionResourceService.java new file mode 100644 index 00000000..36c5e089 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppPermissionResourceService.java @@ -0,0 +1,99 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app; + +import cn.topiam.employee.common.enums.CheckValidityType; +import cn.topiam.employee.console.pojo.query.app.AppResourceListQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionResourceGetResult; +import cn.topiam.employee.console.pojo.result.app.AppPermissionResourceListResult; +import cn.topiam.employee.console.pojo.save.app.AppPermissionResourceCreateParam; +import cn.topiam.employee.console.pojo.update.app.AppPermissionResourceUpdateParam; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + *

+ * 资源权限 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-10 + */ +public interface AppPermissionResourceService { + /** + * 获取资源列表 + * + * @param page {@link PageModel} + * @param query {@link AppResourceListQuery} + * @return {@link AppPermissionResourceListResult} + */ + Page getPermissionResourceList(PageModel page, + AppResourceListQuery query); + + /** + * 获取资源 + * + * @param id {@link String} + * @return {@link AppPermissionResourceGetResult} + */ + AppPermissionResourceGetResult getPermissionResource(String id); + + /** + * 删除资源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean deletePermissionResource(String id); + + /** + * 启用/禁用 + * + * @param id {@link Long} + * @param enabled {@link Boolean} + * @return {@link Boolean} + */ + Boolean updateStatus(Long id, boolean enabled); + + /** + * 创建资源 + * + * @param param {@link AppPermissionResourceCreateParam} + * @return {@link Boolean} + */ + Boolean createPermissionResource(AppPermissionResourceCreateParam param); + + /** + * 更新资源 + * + * @param param {@link AppPermissionResourceUpdateParam} + * @return {@link Boolean} + */ + Boolean updatePermissionResource(AppPermissionResourceUpdateParam param); + + /** + * 参数有效性验证 + * + * @param type {@link CheckValidityType} + * @param value {@link String} + * @param appId {@link Long} + * @param id {@link Long} + * @return {@link Boolean} + */ + Boolean permissionResourceParamCheck(CheckValidityType type, String value, Long appId, Long id); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppPermissionRoleService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppPermissionRoleService.java new file mode 100644 index 00000000..31881753 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppPermissionRoleService.java @@ -0,0 +1,100 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app; + +import cn.topiam.employee.common.enums.CheckValidityType; +import cn.topiam.employee.console.pojo.query.app.AppPermissionRoleListQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionRoleListResult; +import cn.topiam.employee.console.pojo.result.app.AppPermissionRoleResult; +import cn.topiam.employee.console.pojo.save.app.AppPermissionRoleCreateParam; +import cn.topiam.employee.console.pojo.update.app.PermissionRoleUpdateParam; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + *

+ * 角色表 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-10 + */ +public interface AppPermissionRoleService { + + /** + * 获取所有角色(分页) + * + * @param page {@link PageModel} + * @param query {@link AppPermissionRoleListQuery} + * @return {@link AppPermissionRoleListResult} + */ + Page getPermissionRoleList(PageModel page, + AppPermissionRoleListQuery query); + + /** + * 创建角色 + * + * @param param {@link AppPermissionRoleCreateParam} + * @return {@link Boolean} + */ + boolean createPermissionRole(AppPermissionRoleCreateParam param); + + /** + * 更新角色 + * + * @param param {@link PermissionRoleUpdateParam} + * @return {@link Boolean} + */ + boolean updatePermissionRole(PermissionRoleUpdateParam param); + + /** + * 删除角色 + * + * @param ids {@link String} + * @return {@link Boolean} + */ + boolean deletePermissionRole(String ids); + + /** + * 角色详情 + * + * @param id {@link Long} + * @return {@link AppPermissionRoleResult} + */ + AppPermissionRoleResult getPermissionRole(Long id); + + /** + * 参数有效性验证 + * + * @param type {@link CheckValidityType} + * @param value {@link String} + * @param appId {@link Long} + * @param id {@link Long} + * @return {@link Boolean} + */ + Boolean permissionRoleParamCheck(CheckValidityType type, String value, Long appId, Long id); + + /** + * 更新角色状态 + * + * @param id {@link String} + * @param status {@link Boolean} + * @return {@link Boolean} + */ + Boolean updatePermissionRoleStatus(String id, Boolean status); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppSaml2Service.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppSaml2Service.java new file mode 100644 index 00000000..8cb683da --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppSaml2Service.java @@ -0,0 +1,55 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app; + +import java.io.IOException; +import java.io.InputStream; + +import cn.topiam.employee.console.pojo.result.app.ParseSaml2MetadataResult; + +/** + * 应用 Saml2 详情 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 20:55 + */ +public interface AppSaml2Service { + /** + * 解析saml2 元数据 + * + * @param inputStream {@link InputStream} + * @return {@link ParseSaml2MetadataResult} + */ + ParseSaml2MetadataResult parseSaml2Metadata(InputStream inputStream); + + /** + * 解析saml2 元数据 + * + * @param metadataUrl {@link String} + * @return {@link ParseSaml2MetadataResult} + */ + ParseSaml2MetadataResult parseSaml2MetadataUrl(String metadataUrl); + + /** + * 下载元数据 + * + * @param appId {@link String} + * @throws IOException; + */ + void downloadSaml2IdpMetadataFile(String appId) throws IOException; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppService.java new file mode 100644 index 00000000..9f8a97f3 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppService.java @@ -0,0 +1,114 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app; + +import java.util.Map; + +import cn.topiam.employee.console.pojo.query.app.AppQuery; +import cn.topiam.employee.console.pojo.result.app.AppCreateResult; +import cn.topiam.employee.console.pojo.result.app.AppGetResult; +import cn.topiam.employee.console.pojo.result.app.AppListResult; +import cn.topiam.employee.console.pojo.save.app.AppCreateParam; +import cn.topiam.employee.console.pojo.update.app.AppSaveConfigParam; +import cn.topiam.employee.console.pojo.update.app.AppUpdateParam; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + *

+ * 应用管理 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-07-31 + */ +public interface AppService { + + /** + * 获取应用(分页) + * + * @param pageModel {@link PageModel} + * @param query {@link AppQuery} + * @return {@link AppListResult} + */ + Page getAppList(PageModel pageModel, AppQuery query); + + /** + * 创建应用 + * + * @param param {@link AppCreateParam} + * @return {@link AppCreateResult} + */ + AppCreateResult createApp(AppCreateParam param); + + /** + * 修改应用 + * + * @param param {@link AppUpdateParam} + * @return {@link Boolean} + */ + boolean updateApp(AppUpdateParam param); + + /** + * 删除应用 + * + * @param id {@link Long} + * @return {@link Boolean} + */ + boolean deleteApp(Long id); + + /** + * 获取单个应用详情 + * + * @param id {@link Long} + * @return {@link AppGetResult} + */ + AppGetResult getApp(Long id); + + /** + * 启用应用 + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean enableApp(String id); + + /** + * 禁用应用 + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean disableApp(String id); + + /** + * 更新应用配置 + * + * @param param {@link AppSaveConfigParam} + * @return {@link Boolean} + */ + Boolean saveAppConfig(AppSaveConfigParam param); + + /** + * 获取应用配置 + * + * @param appId {@link String} + * @return {@link Map} + */ + Object getAppConfig(String appId); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppTemplateService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppTemplateService.java new file mode 100644 index 00000000..5a03a11b --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/AppTemplateService.java @@ -0,0 +1,49 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app; + +import java.util.List; +import java.util.Map; + +import cn.topiam.employee.common.enums.app.AppType; +import cn.topiam.employee.console.pojo.result.app.AppTemplateResult; + +/** + * 应用模板服务 + * + * @author TopIAM + * Created by support@topiam.cn on 2020/11/29 22:22 + */ +public interface AppTemplateService { + /** + * List + * + * @param name {@link String} + * @param type {@link AppType} + * @return {@link List} + */ + List getAppTemplateList(AppType type, String name); + + /** + * List + * + * @param code {@link AppTemplateResult} + * @return {@link List} + */ + List getAppTemplateFormSchema(String code); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/UserIdpBindService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/UserIdpBindService.java new file mode 100644 index 00000000..2359af28 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/UserIdpBindService.java @@ -0,0 +1,46 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app; + +import java.util.List; + +import cn.topiam.employee.console.pojo.result.app.UserIdpBindListResult; + +/** + * 用户身份提供商绑定 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/11 21:10 + */ +public interface UserIdpBindService { + /** + * 解绑用户IDP + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean unbindUserIdpBind(String id); + + /** + * 查询用户身份提供商绑定 + * + * @param userId {@link String} + * @return {@link List} + */ + List getUserIdpBindList(String userId); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppAccessPolicyServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppAccessPolicyServiceImpl.java new file mode 100644 index 00000000..81ef49a3 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppAccessPolicyServiceImpl.java @@ -0,0 +1,152 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app.impl; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.querydsl.QPageRequest; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.entity.app.AppAccessPolicyEntity; +import cn.topiam.employee.common.entity.app.po.AppAccessPolicyPO; +import cn.topiam.employee.common.entity.app.query.AppAccessPolicyQuery; +import cn.topiam.employee.common.repository.app.AppAccessPolicyRepository; +import cn.topiam.employee.console.converter.app.AppAccessPolicyConverter; +import cn.topiam.employee.console.pojo.result.app.AppAccessPolicyResult; +import cn.topiam.employee.console.pojo.save.app.AppAccessPolicyCreateParam; +import cn.topiam.employee.console.service.app.AppAccessPolicyService; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.util.BeanUtils; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; + +/** + * 应用访问权限策略 Service + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 19:56 + */ +@Service +@Slf4j +@AllArgsConstructor +public class AppAccessPolicyServiceImpl implements AppAccessPolicyService { + + /** + * 查询应用授权策略列表 + * + * @param pageModel {@link PageModel} + * @param query {@link AppAccessPolicyQuery} + * @return {@link Page} + */ + @Override + public Page getAppAccessPolicyList(PageModel pageModel, + AppAccessPolicyQuery query) { + //分页条件 + QPageRequest request = QPageRequest.of(pageModel.getCurrent(), pageModel.getPageSize()); + //查询映射 + org.springframework.data.domain.Page list = appAccessPolicyRepository + .getAppPolicyList(query, request); + return appAccessPolicyConverter.appPolicyEntityListConvertToAppPolicyResult(list); + } + + /** + * 创建应用授权策略 + * + * @param param {@link AppAccessPolicyCreateParam} + * @return @{link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean createAppAccessPolicy(AppAccessPolicyCreateParam param) { + List list = appAccessPolicyConverter + .appPolicyCreateParamConvertToEntity(param); + //判断是否已经存在 + for (AppAccessPolicyEntity policy : list) { + Optional policyEntity = appAccessPolicyRepository + .findByAppIdAndSubjectIdAndSubjectType(policy.getAppId(), policy.getSubjectId(), + policy.getSubjectType()); + if (policyEntity.isEmpty()) { + appAccessPolicyRepository.save(policy); + AuditContext + .setTarget( + Target.builder().id(policy.getSubjectId()) + .type( + TargetType.getType(policy.getSubjectType().getCode().toLowerCase())) + .build(), + Target.builder().id(policy.getAppId().toString()) + .type(TargetType.APPLICATION).build()); + continue; + } + AppAccessPolicyEntity entity = policyEntity.get(); + BeanUtils.merge(policy, entity, LAST_MODIFIED_TIME, LAST_MODIFIED_BY); + appAccessPolicyRepository.save(entity); + AuditContext.setTarget(Target.builder().id(entity.getSubjectId()) + .type(TargetType.getType(entity.getSubjectType().getCode().toLowerCase())).build(), + Target.builder().id(entity.getAppId().toString()).type(TargetType.APPLICATION) + .build()); + } + return true; + } + + /** + * 删除应用授权策略 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteAppAccessPolicy(String id) { + Optional optional = appAccessPolicyRepository + .findById(Long.valueOf(id)); + //管理员不存在 + if (optional.isEmpty()) { + AuditContext.setContent("删除失败,应用授权策略不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException(AuditContext.getContent()); + } + appAccessPolicyRepository.deleteById(Long.valueOf(id)); + AppAccessPolicyEntity entity = optional.get(); + AuditContext.setTarget( + Target.builder().id(entity.getSubjectId()) + .type(TargetType.getType(entity.getSubjectType().getCode().toLowerCase())).build(), + Target.builder().id(entity.getAppId().toString()).type(TargetType.APPLICATION).build()); + return true; + } + + /** + * AppPolicyConverter + */ + private final AppAccessPolicyConverter appAccessPolicyConverter; + + /** + * AppPolicyRepository + */ + private final AppAccessPolicyRepository appAccessPolicyRepository; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppAccountServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppAccountServiceImpl.java new file mode 100644 index 00000000..c737416c --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppAccountServiceImpl.java @@ -0,0 +1,129 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app.impl; + +import java.util.Optional; + +import org.springframework.data.querydsl.QPageRequest; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.entity.app.AppAccountEntity; +import cn.topiam.employee.common.entity.app.po.AppAccountPO; +import cn.topiam.employee.common.entity.app.query.AppAccountQuery; +import cn.topiam.employee.common.exception.app.AppAccountExistException; +import cn.topiam.employee.common.repository.app.AppAccountRepository; +import cn.topiam.employee.console.converter.app.AppAccountConverter; +import cn.topiam.employee.console.pojo.result.app.AppAccountListResult; +import cn.topiam.employee.console.pojo.save.app.AppAccountCreateParam; +import cn.topiam.employee.console.service.app.AppAccountService; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +/** + * 应用账户 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/6/4 19:07 + */ +@Service +@Slf4j +@AllArgsConstructor +public class AppAccountServiceImpl implements AppAccountService { + + /** + * 查询应用账户 + * + * @param pageModel {@link PageModel} + * @param query {@link AppAccountQuery} + * @return {@link Page} + */ + @Override + public Page getAppAccountList(PageModel pageModel, + AppAccountQuery query) { + //分页条件 + QPageRequest request = QPageRequest.of(pageModel.getCurrent(), pageModel.getPageSize()); + //查询映射 + org.springframework.data.domain.Page list = appAccountRepository + .getAppAccountList(query, request); + return appAccountConverter.appAccountEntityConvertToAppAccountResult(list); + } + + /** + * 新增应用账户 + * + * @param param {@link AppAccountCreateParam} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean createAppAccount(AppAccountCreateParam param) { + Optional optional = appAccountRepository + .findByAppIdAndUserId(param.getAppId(), param.getUserId()); + if (optional.isPresent()) { + throw new AppAccountExistException(); + } + AppAccountEntity entity = appAccountConverter.appAccountCreateParamConvertToEntity(param); + appAccountRepository.save(entity); + AuditContext.setTarget( + Target.builder().id(entity.getAccount()).type(TargetType.USER).build(), + Target.builder().id(entity.getAppId().toString()).type(TargetType.APPLICATION).build()); + return true; + } + + /** + * 删除应用账户 + * + * @param id {@link Long} + * @return {@link String} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteAppAccount(String id) { + Optional optional = appAccountRepository.findById(Long.valueOf(id)); + //管理员不存在 + if (optional.isEmpty()) { + AuditContext.setContent("删除失败,应用账户不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException(AuditContext.getContent()); + } + appAccountRepository.deleteById(Long.valueOf(id)); + AuditContext.setTarget( + Target.builder().id(optional.get().getId().toString()).type(TargetType.USER).build(), + Target.builder().id(optional.get().getAppId().toString()).type(TargetType.APPLICATION) + .build()); + return true; + } + + /** + * AppAccountConverter + */ + private final AppAccountConverter appAccountConverter; + + /** + * AppAccountRepository + */ + private final AppAccountRepository appAccountRepository; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppCertServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppCertServiceImpl.java new file mode 100644 index 00000000..677604e4 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppCertServiceImpl.java @@ -0,0 +1,59 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app.impl; + +import java.util.List; + +import org.springframework.stereotype.Service; + +import cn.topiam.employee.common.entity.app.AppCertEntity; +import cn.topiam.employee.common.repository.app.AppCertRepository; +import cn.topiam.employee.console.converter.app.AppCertConverter; +import cn.topiam.employee.console.pojo.query.app.AppCertQuery; +import cn.topiam.employee.console.pojo.result.app.AppCertListResult; +import cn.topiam.employee.console.service.app.AppCertService; + +import lombok.AllArgsConstructor; + +/** + * 应用证书 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 20:46 + */ +@Service +@AllArgsConstructor +public class AppCertServiceImpl implements AppCertService { + + /** + * 获取应用证书列表 + * + * @param query {@link AppCertQuery} + * @return {@link List} + */ + @Override + public List getAppCertListResult(AppCertQuery query) { + List list = (List) appCertRepository + .findAll(appCertConverter.queryAppCertListParamConvertToPredicate(query)); + return appCertConverter.entityConvertToAppCertListResult(list); + } + + private final AppCertRepository appCertRepository; + + private final AppCertConverter appCertConverter; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppPermissionActionServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppPermissionActionServiceImpl.java new file mode 100644 index 00000000..42f6df35 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppPermissionActionServiceImpl.java @@ -0,0 +1,65 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app.impl; + +import java.util.List; + +import org.springframework.stereotype.Service; + +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.common.entity.app.AppPermissionResourceEntity; +import cn.topiam.employee.common.repository.app.AppPermissionResourceRepository; +import cn.topiam.employee.console.converter.app.AppPermissionActionConverter; +import cn.topiam.employee.console.pojo.query.app.AppPermissionActionListQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionActionListResult; +import cn.topiam.employee.console.service.app.AppPermissionActionService; + +import lombok.RequiredArgsConstructor; + +/** + *

+ * 资源权限 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-10 + */ +@Service +@RequiredArgsConstructor +public class AppPermissionActionServiceImpl implements AppPermissionActionService { + + /** + * 获取资源列表 + * + * @param query {@link AppPermissionActionListQuery} + * @return {@link AppPermissionActionListResult} + */ + @Override + public List getPermissionActionList(AppPermissionActionListQuery query) { + Predicate predicate = appPermissionActionConverter + .appPermissionActionListQueryConvertToPredicate(query); + List list = (List) appPermissionResourceRepository + .findAll(predicate); + return appPermissionActionConverter.entityConvertToResourceActionListResult(list); + } + + private final AppPermissionResourceRepository appPermissionResourceRepository; + + private final AppPermissionActionConverter appPermissionActionConverter; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppPermissionPolicyServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppPermissionPolicyServiceImpl.java new file mode 100644 index 00000000..65ac54f1 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppPermissionPolicyServiceImpl.java @@ -0,0 +1,128 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app.impl; + +import org.springframework.data.querydsl.QPageRequest; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.app.AppPermissionPolicyEntity; +import cn.topiam.employee.common.entity.app.po.AppPermissionPolicyPO; +import cn.topiam.employee.common.entity.app.query.AppPolicyQuery; +import cn.topiam.employee.common.exception.app.AppPolicyNotExistException; +import cn.topiam.employee.common.repository.app.AppPermissionPolicyRepository; +import cn.topiam.employee.console.converter.app.AppPermissionPolicyConverter; +import cn.topiam.employee.console.pojo.result.app.AppPermissionPolicyGetResult; +import cn.topiam.employee.console.pojo.result.app.AppPermissionPolicyListResult; +import cn.topiam.employee.console.pojo.save.app.AppPermissionPolicyCreateParam; +import cn.topiam.employee.console.pojo.update.app.AppPermissionPolicyUpdateParam; +import cn.topiam.employee.console.service.app.AppPermissionPolicyService; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +import lombok.RequiredArgsConstructor; + +/** + *

+ * 权限策略 服务实现类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-10 + */ +@Service +@RequiredArgsConstructor +public class AppPermissionPolicyServiceImpl implements AppPermissionPolicyService { + + /** + * 获取策略列表 + * + * @param page {@link PageModel} + * @param query {@link AppPolicyQuery} + * @return {@link AppPermissionPolicyListResult} + */ + @Override + public Page getPermissionPolicyList(PageModel page, + AppPolicyQuery query) { + org.springframework.data.domain.Page data; + QPageRequest request = QPageRequest.of(page.getCurrent(), page.getPageSize()); + data = appPermissionPolicyRepository.findPage(query, request); + return appPermissionPolicyConverter.entityConvertToPolicyListResult(data); + } + + /** + * 获取策略 + * + * @param id {@link String} + * @return {@link AppPermissionPolicyGetResult} + */ + @Override + public AppPermissionPolicyGetResult getPermissionPolicy(String id) { + return null; + } + + /** + * 删除策略 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean deletePermissionPolicy(String id) { + Long policyId = Long.valueOf(id); + appPermissionPolicyRepository.findById(policyId) + .orElseThrow(AppPolicyNotExistException::new); + appPermissionPolicyRepository.deleteById(policyId); + return true; + } + + /** + * 创建策略 + * + * @param param {@link AppPermissionPolicyCreateParam} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean createPermissionPolicy(AppPermissionPolicyCreateParam param) { + AppPermissionPolicyEntity resource = appPermissionPolicyConverter + .policyCreateParamConvertToEntity(param); + // 新增策略 + appPermissionPolicyRepository.save(resource); + return true; + } + + /** + * 更新策略 + * + * @param param {@link AppPermissionPolicyUpdateParam} + * @return {@link Boolean} + */ + @Override + public Boolean updatePermissionPolicy(AppPermissionPolicyUpdateParam param) { + AppPermissionPolicyEntity resource = appPermissionPolicyConverter + .policyUpdateParamConvertToEntity(param); + // 更新策略 + appPermissionPolicyRepository.save(resource); + return null; + } + + private final AppPermissionPolicyConverter appPermissionPolicyConverter; + + private final AppPermissionPolicyRepository appPermissionPolicyRepository; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppPermissionResourceServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppPermissionResourceServiceImpl.java new file mode 100644 index 00000000..1820e531 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppPermissionResourceServiceImpl.java @@ -0,0 +1,283 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app.impl; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import java.util.stream.Collectors; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.querydsl.QPageRequest; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.querydsl.core.types.Predicate; +import com.querydsl.core.types.dsl.BooleanExpression; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.entity.app.AppPermissionActionEntity; +import cn.topiam.employee.common.entity.app.AppPermissionResourceEntity; +import cn.topiam.employee.common.entity.app.QAppPermissionResourceEntity; +import cn.topiam.employee.common.enums.CheckValidityType; +import cn.topiam.employee.common.exception.app.AppResourceNotExistException; +import cn.topiam.employee.common.repository.app.AppPermissionActionRepository; +import cn.topiam.employee.common.repository.app.AppPermissionPolicyRepository; +import cn.topiam.employee.common.repository.app.AppPermissionResourceRepository; +import cn.topiam.employee.console.converter.app.AppPermissionResourceConverter; +import cn.topiam.employee.console.pojo.query.app.AppResourceListQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionResourceGetResult; +import cn.topiam.employee.console.pojo.result.app.AppPermissionResourceListResult; +import cn.topiam.employee.console.pojo.save.app.AppPermissionResourceCreateParam; +import cn.topiam.employee.console.pojo.save.app.AppPermissionsActionParam; +import cn.topiam.employee.console.pojo.update.app.AppPermissionResourceUpdateParam; +import cn.topiam.employee.console.service.app.AppPermissionResourceService; +import cn.topiam.employee.support.exception.BadParamsException; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.util.BeanUtils; + +import lombok.RequiredArgsConstructor; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; + +/** + *

+ * 资源权限 服务实现类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-10 + */ +@Service +@RequiredArgsConstructor +public class AppPermissionResourceServiceImpl implements AppPermissionResourceService { + + /** + * 获取资源列表 + * + * @param page {@link PageModel} + * @param query {@link AppResourceListQuery} + * @return {@link AppPermissionResourceListResult} + */ + @Override + public Page getPermissionResourceList(PageModel page, + AppResourceListQuery query) { + org.springframework.data.domain.Page data; + Predicate predicate = appPermissionResourceConverter + .resourcePaginationParamConvertToPredicate(query); + QPageRequest request = QPageRequest.of(page.getCurrent(), page.getPageSize()); + data = appResourceRepository.findAll(predicate, request); + return appPermissionResourceConverter.entityConvertToResourceListResult(data); + } + + /** + * 获取资源 + * + * @param id {@link String} + * @return {@link AppPermissionResourceGetResult} + */ + @Override + public AppPermissionResourceGetResult getPermissionResource(String id) { + AppPermissionResourceEntity resource = appResourceRepository.findById(Long.valueOf(id)) + .orElseThrow(AppResourceNotExistException::new); + return appPermissionResourceConverter.entityConvertToResourceGetResult(resource); + } + + /** + * 删除资源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deletePermissionResource(String id) { + Long resourceId = Long.valueOf(id); + AppPermissionResourceEntity resource = appResourceRepository.findById(resourceId) + .orElseThrow(AppResourceNotExistException::new); + List actionList = appPermissionActionRepository + .findAllByResource(resource); + List objectIdList = new ArrayList<>( + actionList.stream().map(AppPermissionActionEntity::getId).toList()); + objectIdList.add(resourceId); + appPermissionPolicyRepository.deleteAllByObjectIdIn(objectIdList); + appResourceRepository.deleteById(resourceId); + AuditContext + .setTarget(Target.builder().id(id).type(TargetType.APP_PERMISSION_RESOURCE).build()); + return true; + } + + /** + * 启用/禁用 + * + * @param id {@link String} + * @param enabled {@link Boolean} + * @return {@link Boolean} + */ + @Override + public Boolean updateStatus(Long id, boolean enabled) { + AppPermissionResourceEntity resource = appResourceRepository.findById(Long.valueOf(id)) + .orElseThrow(AppResourceNotExistException::new); + AuditContext.setTarget( + Target.builder().id(id.toString()).type(TargetType.APP_PERMISSION_RESOURCE).build()); + return appPermissionPolicyRepository.updateStatus(id, enabled) > 0; + } + + /** + * 创建资源 + * + * @param param {@link AppPermissionResourceCreateParam} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean createPermissionResource(AppPermissionResourceCreateParam param) { + AppPermissionResourceEntity resource = appPermissionResourceConverter + .resourceCreateParamConvertToEntity(param); + buildActions(param.getActions(), resource); + // 新增资源 + appResourceRepository.save(resource); + AuditContext.setTarget(Target.builder().id(resource.getId().toString()) + .type(TargetType.APP_PERMISSION_RESOURCE).build()); + return true; + } + + /** + * 更新资源 + * + * @param param {@link AppPermissionResourceUpdateParam} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean updatePermissionResource(AppPermissionResourceUpdateParam param) { + AppPermissionResourceEntity resource = appPermissionResourceConverter + .resourceUpdateParamConvertToEntity(param); + AppPermissionResourceEntity entity = getAppPermissionResourceEntity( + Long.valueOf(param.getId())); + buildActions(param.getActions(), resource); + BeanUtils.merge(resource, entity, LAST_MODIFIED_BY, LAST_MODIFIED_TIME); + // 查询资源下所有权限 + List actionList = appPermissionActionRepository + .findAllByResource(resource); + // 取出未删除的权限id + Set reservedSet = resource.getActions().stream().map(AppPermissionActionEntity::getId) + .collect(Collectors.toSet()); + // 过滤要删除的权限id + List removeActions = actionList.stream() + .filter(item -> !reservedSet.contains(item.getId())) + .map(AppPermissionActionEntity::getId).toList(); + appPermissionActionRepository.deleteAllById(removeActions); + // 更新资源 + appResourceRepository.save(entity); + AuditContext.setTarget( + Target.builder().id(param.getId()).type(TargetType.APP_PERMISSION_RESOURCE).build()); + return true; + } + + /** + * 获取应用权限资源 + * + * @param id {@link Long} + * @return {@link AppPermissionResourceEntity} + */ + private AppPermissionResourceEntity getAppPermissionResourceEntity(Long id) { + return appResourceRepository.findById(id) + .orElseThrow(() -> new BadParamsException("应用权限资源不存在")); + } + + /** + * 参数有效性验证 + * + * @param type {@link CheckValidityType} + * @param value {@link String} + * @param appId {@link Long} + * @param id {@link Long} + * @return {@link Boolean} + */ + @SuppressWarnings("DuplicatedCode") + @Override + public Boolean permissionResourceParamCheck(CheckValidityType type, String value, Long appId, + Long id) { + QAppPermissionResourceEntity role = QAppPermissionResourceEntity.appPermissionResourceEntity; + AppPermissionResourceEntity entity = new AppPermissionResourceEntity(); + boolean result = false; + // ID存在说明是修改操作,查询一下当前数据 + if (Objects.nonNull(id)) { + entity = appResourceRepository.findById(id) + .orElseThrow(AppResourceNotExistException::new); + } + //资源名称 + if (CheckValidityType.NAME.equals(type)) { + if (StringUtils.equals(entity.getName(), value)) { + return true; + } + BooleanExpression eq = role.name.eq(value); + eq.and(role.appId.eq(appId)); + result = !appResourceRepository.exists(eq); + } + //资源编码 + if (CheckValidityType.CODE.equals(type)) { + if (StringUtils.equals(entity.getCode(), value)) { + return true; + } + BooleanExpression eq = role.code.eq(value); + eq.and(role.appId.eq(appId)); + result = !appResourceRepository.exists(eq); + } + return result; + } + + /** + * 批量处理actions + * + * @param permissions {@link List} + * @param resource {@link AppPermissionResourceEntity>} + */ + private void buildActions(List permissions, + AppPermissionResourceEntity resource) { + // 权限 + List list = new ArrayList<>(); + for (AppPermissionsActionParam p : permissions) { + AppPermissionActionEntity entity = new AppPermissionActionEntity(); + entity.setResource(resource); + entity.setType(p.getType()); + entity.setName(p.getName()); + //API需要单独处理 + entity.setValue(p.getValue()); + list.add(entity); + } + resource.setActions(list); + } + + private final AppPermissionResourceConverter appPermissionResourceConverter; + + private final AppPermissionResourceRepository appResourceRepository; + /** + * PolicyRepository + */ + private final AppPermissionPolicyRepository appPermissionPolicyRepository; + /** + * ActionRepository + */ + private final AppPermissionActionRepository appPermissionActionRepository; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppPermissionRoleServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppPermissionRoleServiceImpl.java new file mode 100644 index 00000000..5a441b2e --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppPermissionRoleServiceImpl.java @@ -0,0 +1,220 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app.impl; + +import java.util.Arrays; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.querydsl.QPageRequest; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.querydsl.core.types.Predicate; +import com.querydsl.core.types.dsl.BooleanExpression; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.entity.app.AppPermissionRoleEntity; +import cn.topiam.employee.common.entity.app.QAppPermissionRoleEntity; +import cn.topiam.employee.common.enums.CheckValidityType; +import cn.topiam.employee.common.exception.app.AppRoleNotExistException; +import cn.topiam.employee.common.repository.app.AppPermissionPolicyRepository; +import cn.topiam.employee.common.repository.app.AppPermissionRoleRepository; +import cn.topiam.employee.console.converter.app.AppPermissionRoleConverter; +import cn.topiam.employee.console.pojo.query.app.AppPermissionRoleListQuery; +import cn.topiam.employee.console.pojo.result.app.AppPermissionRoleListResult; +import cn.topiam.employee.console.pojo.result.app.AppPermissionRoleResult; +import cn.topiam.employee.console.pojo.save.app.AppPermissionRoleCreateParam; +import cn.topiam.employee.console.pojo.update.app.PermissionRoleUpdateParam; +import cn.topiam.employee.console.service.app.AppPermissionRoleService; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.util.BeanUtils; + +import lombok.RequiredArgsConstructor; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; + +/** + *

+ * 角色表 服务实现类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-10 + */ +@Service +@RequiredArgsConstructor +public class AppPermissionRoleServiceImpl implements AppPermissionRoleService { + + /** + * 获取所有角色(分页) + * + * @param page {@link PageModel} + * @return {@link AppPermissionRoleListResult} + */ + @Override + public Page getPermissionRoleList(PageModel page, + AppPermissionRoleListQuery query) { + org.springframework.data.domain.Page data; + Predicate predicate = appPermissionRoleConverter + .rolePaginationParamConvertToPredicate(query); + QPageRequest request = QPageRequest.of(page.getCurrent(), page.getPageSize()); + data = appPermissionRoleRepository.findAll(predicate, request); + return appPermissionRoleConverter.entityConvertToRolePaginationResult(data); + } + + /** + * 创建系统 + * + * @param param {@link AppPermissionRoleCreateParam} + * @return {@link Boolean} + */ + @Override + public boolean createPermissionRole(AppPermissionRoleCreateParam param) { + AppPermissionRoleEntity entity = appPermissionRoleConverter + .roleCreateParamConvertToEntity(param); + appPermissionRoleRepository.save(entity); + AuditContext.setTarget(Target.builder().id(entity.getId().toString()) + .type(TargetType.APP_PERMISSION_ROLE).build()); + return true; + } + + /** + * @param param {@link PermissionRoleUpdateParam} + * @return {@link Boolean} + */ + @Override + public boolean updatePermissionRole(PermissionRoleUpdateParam param) { + AppPermissionRoleEntity source = appPermissionRoleConverter + .roleUpdateParamConvertToEntity(param); + AppPermissionRoleEntity target = appPermissionRoleRepository + .findById(Long.valueOf(param.getId())).orElseThrow(AppRoleNotExistException::new); + BeanUtils.merge(source, target, LAST_MODIFIED_TIME, LAST_MODIFIED_BY); + appPermissionRoleRepository.save(target); + AuditContext.setTarget(Target.builder().id(target.getId().toString()) + .type(TargetType.APP_PERMISSION_ROLE).build()); + return true; + } + + /** + * 删除角色 + * + * @param ids {@link String} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public boolean deletePermissionRole(String ids) { + List idList = Arrays.stream(ids.split(",")).toList(); + List longIds = idList.stream().map(Long::parseLong).toList(); + appPermissionRoleRepository.deleteAllById(longIds); + // 删除对应策略 + appPermissionPolicyRepository.deleteAllBySubjectIdIn(idList); + appPermissionPolicyRepository.deleteAllByObjectIdIn(longIds); + AuditContext + .setTarget(Target.builder().id(ids).type(TargetType.APP_PERMISSION_ROLE).build()); + return true; + } + + /** + * 角色详情 + * + * @param id {@link Long} + * @return {@link AppPermissionRoleResult} + */ + @Override + public AppPermissionRoleResult getPermissionRole(Long id) { + //查询 + Optional entity = appPermissionRoleRepository.findById(id); + //映射 + return appPermissionRoleConverter.entityConvertToRoleDetailResult(entity.orElse(null)); + } + + /** + * 参数有效性验证 + * + * @param type {@link CheckValidityType} + * @param value {@link String} + * @param id {@link Long} + * @param appId {@link Long} + * @return {@link Boolean} + */ + @SuppressWarnings("DuplicatedCode") + @Override + public Boolean permissionRoleParamCheck(CheckValidityType type, String value, Long appId, + Long id) { + QAppPermissionRoleEntity role = QAppPermissionRoleEntity.appPermissionRoleEntity; + AppPermissionRoleEntity entity = new AppPermissionRoleEntity(); + boolean result = false; + // ID存在说明是修改操作,查询一下当前数据 + if (Objects.nonNull(id)) { + entity = appPermissionRoleRepository.findById(id) + .orElseThrow(AppRoleNotExistException::new); + } + //角色编码 + if (CheckValidityType.CODE.equals(type)) { + if (StringUtils.equals(entity.getCode(), value)) { + return true; + } + BooleanExpression eq = role.code.eq(value); + eq.and(role.appId.eq(appId)); + result = !appPermissionRoleRepository.exists(eq); + } + //角色名称 + if (CheckValidityType.NAME.equals(type)) { + if (StringUtils.equals(entity.getName(), value)) { + return true; + } + BooleanExpression eq = role.name.eq(value); + eq.and(role.appId.eq(appId)); + result = !appPermissionRoleRepository.exists(eq); + } + return result; + } + + /** + * 更新角色状态 + * + * @param id {@link String} + * @param status {@link Boolean} + * @return {@link Boolean} + */ + @Override + public Boolean updatePermissionRoleStatus(String id, Boolean status) { + appPermissionRoleRepository.updateStatus(id, status); + return true; + } + + /** + * 用户数据映射器 + */ + private final AppPermissionRoleConverter appPermissionRoleConverter; + /** + * RoleRepository + */ + private final AppPermissionRoleRepository appPermissionRoleRepository; + /** + * PolicyRepository + */ + private final AppPermissionPolicyRepository appPermissionPolicyRepository; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppSaml2ServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppSaml2ServiceImpl.java new file mode 100644 index 00000000..e05ef34c --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppSaml2ServiceImpl.java @@ -0,0 +1,220 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app.impl; + +import java.io.IOException; +import java.io.InputStream; +import java.security.cert.X509Certificate; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.opensaml.saml.saml2.metadata.*; +import org.opensaml.xmlsec.signature.KeyInfo; +import org.opensaml.xmlsec.signature.X509Data; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import cn.topiam.employee.application.ApplicationService; +import cn.topiam.employee.application.ApplicationServiceLoader; +import cn.topiam.employee.application.Saml2ApplicationService; +import cn.topiam.employee.application.exception.AppNotExistException; +import cn.topiam.employee.application.exception.ParseSaml2MetadataException; +import cn.topiam.employee.common.entity.app.AppEntity; +import cn.topiam.employee.common.repository.app.AppRepository; +import cn.topiam.employee.common.repository.app.AppSaml2ConfigRepository; +import cn.topiam.employee.console.pojo.result.app.ParseSaml2MetadataResult; +import cn.topiam.employee.console.service.app.AppSaml2Service; +import cn.topiam.employee.core.protocol.Saml2ProtocolConfig; +import cn.topiam.employee.protocol.saml2.idp.util.Saml2Utils; +import cn.topiam.employee.support.context.ServletContextHelp; +import cn.topiam.employee.support.util.CertUtils; + +import lombok.AllArgsConstructor; +import static org.opensaml.saml.common.xml.SAMLConstants.SAML20P_NS; +import static org.opensaml.security.credential.UsageType.SIGNING; +import static org.springframework.http.HttpHeaders.CONTENT_DISPOSITION; + +import static cn.topiam.employee.common.util.SamlKeyStoreProvider.getEntityDescriptors; +import static cn.topiam.employee.common.util.SamlUtils.transformSamlObject2String; + +/** + * 应用SAML详情 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/5/31 20:55 + */ +@SuppressWarnings("DuplicatedCode") +@Service +@AllArgsConstructor +public class AppSaml2ServiceImpl implements AppSaml2Service { + private final Logger logger = LoggerFactory.getLogger(AppSaml2ServiceImpl.class); + + /** + * 解析saml2 元数据 + * + * @param inputStream {@link InputStream} + * @return {@link ParseSaml2MetadataResult} + */ + @Override + public ParseSaml2MetadataResult parseSaml2Metadata(InputStream inputStream) { + List entityDescriptors = getEntityDescriptors(inputStream); + for (EntityDescriptor entityDescriptor : entityDescriptors) { + return getParseSaml2MetadataResult(entityDescriptor); + } + return null; + } + + /** + * 解析saml2 元数据 + * + * @param metadataUrl {@link String} + * @return {@link ParseSaml2MetadataResult} + */ + @Override + public ParseSaml2MetadataResult parseSaml2MetadataUrl(String metadataUrl) { + try { + CloseableHttpClient httpClient = HttpClients.createDefault(); + HttpGet post = new HttpGet(metadataUrl); + CloseableHttpResponse response = httpClient.execute(post); + return parseSaml2Metadata(response.getEntity().getContent()); + } catch (Exception e) { + throw new ParseSaml2MetadataException(); + } + } + + @Override + public void downloadSaml2IdpMetadataFile(String appId) throws IOException { + Optional optional = appRepository.findById(Long.valueOf(appId)); + if (optional.isEmpty()) { + logger.error("下载应用 Metadata 发生异常, 应用 [{}] 不存在!", appId); + throw new AppNotExistException(); + } + ApplicationService applicationService = applicationServiceLoader + .getApplicationService(optional.get().getTemplate()); + Saml2ProtocolConfig config = ((Saml2ApplicationService) applicationService) + .getProtocolConfig(appId); + // Generate MetadataXml + EntityDescriptor entityDescriptor = Saml2Utils.getEntityDescriptor(config); + String metadataXml = transformSamlObject2String(entityDescriptor); + // Response + HttpServletResponse response = ServletContextHelp.getResponse(); + response.setContentType("application/samlmetadata+xml"); + response.setCharacterEncoding("UTF-8"); + response.addHeader(CONTENT_DISPOSITION, + "attachment; filename=" + optional.get().getCode() + "_saml2_metadata_.xml"); + response.getWriter().print(metadataXml); + } + + /** + * getParseSaml2MetadataResult + * + * @param entityDescriptor {@link EntityDescriptor} + * @return {@link ParseSaml2MetadataResult} + */ + public static ParseSaml2MetadataResult getParseSaml2MetadataResult(EntityDescriptor entityDescriptor) { + ParseSaml2MetadataResult metadataResult = new ParseSaml2MetadataResult(); + SPSSODescriptor spssoDescriptor = entityDescriptor.getSPSSODescriptor(SAML20P_NS); + if (Objects.isNull(spssoDescriptor)) { + return metadataResult; + } + //SP EntityId + metadataResult.setEntityId(entityDescriptor.getEntityID()); + //对 Request 签名进行验证 + Boolean requestsSigned = spssoDescriptor.isAuthnRequestsSigned(); + metadataResult.setAuthnRequestsSigned(requestsSigned); + //是否对断言使用IdP的证书签名 + Boolean wantAssertionsSigned = spssoDescriptor.getWantAssertionsSigned(); + metadataResult.setWantAssertionsSigned(wantAssertionsSigned); + List services = spssoDescriptor.getAssertionConsumerServices(); + for (AssertionConsumerService service : services) { + //默认断言服务 + if (service.isDefault()) { + //默认SSO ACS 地址 + metadataResult.setAcsUrl(service.getLocation()); + //默认 ACS 绑定方式 + metadataResult.setDefaultAcsBinding(service.getBinding()); + } + } + //SSO ACS 为空,说明默认断言服务不存在,取第一个 AssertionConsumerService + if (StringUtils.isBlank(metadataResult.getAcsUrl()) && services.size() >= 1) { + metadataResult.setAcsUrl(services.get(0).getLocation()); + metadataResult.setDefaultAcsBinding(services.get(0).getBinding()); + } + //单点登出 + List singleLogoutServices = spssoDescriptor.getSingleLogoutServices(); + for (SingleLogoutService singleLogoutService : singleLogoutServices) { + metadataResult.setSlsUrl(singleLogoutService.getLocation()); + metadataResult.setSlsBinding(singleLogoutService.getBinding()); + metadataResult.setSloEnabled(Boolean.TRUE); + } + List nameIdFormats = spssoDescriptor.getNameIDFormats(); + // NameIdFormat + for (NameIDFormat idFormat : nameIdFormats) { + metadataResult.setDefaultNameIdFormat(idFormat.getURI()); + } + //签名证书 + List keyDescriptors = spssoDescriptor.getKeyDescriptors(); + for (KeyDescriptor keyDescriptor : keyDescriptors) { + if (keyDescriptor.getUse().equals(SIGNING)) { + KeyInfo keyInfo = keyDescriptor.getKeyInfo(); + //X509 List + for (X509Data x509 : keyInfo.getX509Datas()) { + // x509Certificate + for (org.opensaml.xmlsec.signature.X509Certificate x509Certificate : x509 + .getX509Certificates()) { + String value = x509Certificate.getValue(); + if (!StringUtils.isBlank(value)) { + X509Certificate certificate = CertUtils.loadCertFromString(value); + metadataResult.setSignCert(CertUtils.encodePem(certificate)); + break; + } + } + break; + } + break; + } + } + + return metadataResult; + } + + /** + * SAML2应用配置 + */ + private final ApplicationServiceLoader applicationServiceLoader; + + /** + * 应用 + */ + private final AppRepository appRepository; + + /** + * SAML 配置 Repository + */ + private final AppSaml2ConfigRepository appSaml2ConfigRepository; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppServiceImpl.java new file mode 100644 index 00000000..735ca30b --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppServiceImpl.java @@ -0,0 +1,257 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app.impl; + +import java.time.LocalDateTime; +import java.util.Map; +import java.util.Optional; + +import org.springframework.data.querydsl.QPageRequest; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.querydsl.core.types.OrderSpecifier; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.application.ApplicationService; +import cn.topiam.employee.application.ApplicationServiceLoader; +import cn.topiam.employee.application.exception.AppNotExistException; +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.entity.app.AppEntity; +import cn.topiam.employee.common.entity.app.QAppEntity; +import cn.topiam.employee.common.repository.app.AppAccessPolicyRepository; +import cn.topiam.employee.common.repository.app.AppAccountRepository; +import cn.topiam.employee.common.repository.app.AppCertRepository; +import cn.topiam.employee.common.repository.app.AppRepository; +import cn.topiam.employee.console.converter.app.AppConverter; +import cn.topiam.employee.console.pojo.query.app.AppQuery; +import cn.topiam.employee.console.pojo.result.app.AppCreateResult; +import cn.topiam.employee.console.pojo.result.app.AppGetResult; +import cn.topiam.employee.console.pojo.result.app.AppListResult; +import cn.topiam.employee.console.pojo.save.app.AppCreateParam; +import cn.topiam.employee.console.pojo.update.app.AppSaveConfigParam; +import cn.topiam.employee.console.pojo.update.app.AppUpdateParam; +import cn.topiam.employee.console.service.app.AppService; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.util.BeanUtils; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; + +/** + * ApplicationServiceImpl + * + * @author TopIAM + * Created by support@topiam.cn on 2020/11/29 22:23 + */ +@Service +@Slf4j +@AllArgsConstructor +public class AppServiceImpl implements AppService { + + /** + * 获取应用(分页) + * + * @param pageModel {@link PageModel} + * @param query {@link AppQuery} + * @return {@link AppListResult} + */ + @Override + public Page getAppList(PageModel pageModel, AppQuery query) { + //查询条件 + Predicate predicate = appConverter.queryAppListParamConvertToPredicate(query); + OrderSpecifier desc = QAppEntity.appEntity.createTime.desc(); + //分页条件 + QPageRequest request = QPageRequest.of(pageModel.getCurrent(), pageModel.getPageSize(), + desc); + //查询映射 + org.springframework.data.domain.Page list = appRepository.findAll(predicate, + request); + return appConverter.entityConvertToAppListResult(list); + } + + /** + * 创建应用 + * + * @param param {@link AppCreateParam} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public AppCreateResult createApp(AppCreateParam param) { + ApplicationService applicationService = applicationServiceLoader + .getApplicationService(param.getTemplate()); + String appId = applicationService.create(param.getName(), param.getRemark()); + AuditContext.setTarget(Target.builder().id(appId).type(TargetType.APPLICATION).build()); + return new AppCreateResult(appId); + } + + /** + * 修改应用 + * + * @param param {@link AppUpdateParam} + * @return {@link Boolean} + */ + @Override + public boolean updateApp(AppUpdateParam param) { + AppEntity entity = appConverter.appUpdateParamConverterToEntity(param); + Optional optional = appRepository.findById(param.getId()); + if (optional.isEmpty()) { + throw new AppNotExistException(); + } + AppEntity app = optional.get(); + BeanUtils.merge(entity, app, LAST_MODIFIED_TIME, LAST_MODIFIED_BY); + appRepository.save(app); + AuditContext.setTarget( + Target.builder().id(param.getId().toString()).type(TargetType.APPLICATION).build()); + return true; + } + + /** + * 删除应用 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public boolean deleteApp(Long id) { + Optional optional = appRepository.findById(id); + if (optional.isEmpty()) { + AuditContext.setContent("操作失败,应用不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException(AuditContext.getContent()); + } + applicationServiceLoader.getApplicationService(optional.get().getTemplate()) + .delete(id.toString()); + AuditContext + .setTarget(Target.builder().id(id.toString()).type(TargetType.APPLICATION).build()); + return true; + } + + /** + * 获取单个应用详情 + * + * @param id {@link Long} + * @return {@link AppEntity} + */ + @Override + public AppGetResult getApp(Long id) { + Optional optional = appRepository.findById(id); + if (optional.isPresent()) { + AppEntity entity = optional.get(); + return appConverter.entityConvertToAppResult(entity); + } + return null; + + } + + /** + * 启用应用 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean enableApp(String id) { + Integer count = appRepository.updateAppStatus(Long.valueOf(id), Boolean.TRUE); + AuditContext.setTarget(Target.builder().id(id).type(TargetType.APPLICATION).build()); + return count > 0; + } + + /** + * 禁用应用 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean disableApp(String id) { + Integer count = appRepository.updateAppStatus(Long.valueOf(id), Boolean.FALSE); + AuditContext.setTarget(Target.builder().id(id).type(TargetType.APPLICATION).build()); + return count > 0; + } + + /** + * 更新应用配置 + * + * @param param {@link AppSaveConfigParam} + * @return {@link Boolean} + */ + @Override + public Boolean saveAppConfig(AppSaveConfigParam param) { + ApplicationService applicationService = applicationServiceLoader + .getApplicationService(param.getTemplate()); + applicationService.saveConfig(param.getId(), param.getConfig()); + AuditContext + .setTarget(Target.builder().id(param.getId()).type(TargetType.APPLICATION).build()); + return true; + } + + /** + * 获取应用配置 + * + * @param appId {@link String} + * @return {@link Map} + */ + @Override + public Object getAppConfig(String appId) { + Optional optional = appRepository.findById(Long.valueOf(appId)); + if (optional.isPresent()) { + ApplicationService applicationService = applicationServiceLoader + .getApplicationService(optional.get().getTemplate()); + return applicationService.getConfig(appId); + } + throw new AppNotExistException(); + } + + /** + * ApplicationTemplateLoader + */ + private final ApplicationServiceLoader applicationServiceLoader; + + /** + * ApplicationRepository + */ + private final AppRepository appRepository; + + /** + * 应用证书 + */ + private final AppCertRepository appCertRepository; + + /** + * 应用账户 + */ + private final AppAccountRepository appAccountRepository; + /** + * 应用策略 + */ + private final AppAccessPolicyRepository appAccessPolicyRepository; + + /** + * ApplicationConverter + */ + private final AppConverter appConverter; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppTemplateServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppTemplateServiceImpl.java new file mode 100644 index 00000000..be8fd66f --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/AppTemplateServiceImpl.java @@ -0,0 +1,92 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app.impl; + +import java.util.*; +import java.util.stream.Collectors; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import cn.topiam.employee.application.ApplicationService; +import cn.topiam.employee.application.ApplicationServiceLoader; +import cn.topiam.employee.common.enums.app.AppType; +import cn.topiam.employee.console.pojo.result.app.AppTemplateResult; +import cn.topiam.employee.console.service.app.AppTemplateService; + +import lombok.AllArgsConstructor; + +/** + * ApplicationTemplateServiceImpl + * + * @author TopIAM + * Created by support@topiam.cn on 2020/11/29 22:23 + */ +@Service +@AllArgsConstructor +public class AppTemplateServiceImpl implements AppTemplateService { + + /** + * List + * + * @param type {@link AppType} + * @return {@link List} + */ + @Override + public List getAppTemplateList(AppType type, String name) { + List results = new ArrayList<>(); + Set list = applicationServiceLoader.getApplicationServiceList(); + if (StringUtils.isNotBlank(name)) { + list = list.stream() + .filter(applicationService -> applicationService.getName().contains(name)) + .collect(Collectors.toSet()); + } + for (ApplicationService protocol : list) { + if (protocol.getType().equals(type)) { + AppTemplateResult result = new AppTemplateResult(); + result.setProtocol(protocol.getProtocol()); + result.setCode(protocol.getCode()); + result.setDesc(protocol.getDescription()); + result.setIcon(protocol.getBase64Icon()); + result.setName(protocol.getName()); + result.setType(protocol.getType()); + results.add(result); + } + } + return results; + } + + /** + * List + * + * @param code {@link Map} + * @return {@link List} + */ + @Override + public List getAppTemplateFormSchema(String code) { + ApplicationService applicationService = applicationServiceLoader + .getApplicationService(code); + if (!Objects.isNull(applicationService)) { + return applicationService.getFormSchema(); + } + return new ArrayList<>(); + } + + private final ApplicationServiceLoader applicationServiceLoader; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/UserIdpBindServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/UserIdpBindServiceImpl.java new file mode 100644 index 00000000..4aedbe96 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/impl/UserIdpBindServiceImpl.java @@ -0,0 +1,90 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app.impl; + +import java.util.List; +import java.util.Optional; + +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.entity.account.UserIdpBindEntity; +import cn.topiam.employee.common.repository.account.UserIdpRepository; +import cn.topiam.employee.console.converter.app.UserIdpBindConverter; +import cn.topiam.employee.console.pojo.result.app.UserIdpBindListResult; +import cn.topiam.employee.console.service.app.UserIdpBindService; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.repository.page.domain.Page; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +/** + * 用户身份提供商绑定 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/12/11 21:10 + */ +@Component +@Slf4j +@AllArgsConstructor +public class UserIdpBindServiceImpl implements UserIdpBindService { + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean unbindUserIdpBind(String id) { + Optional optional = userIdpRepository.findById(Long.valueOf(id)); + //用户不存在 + if (optional.isEmpty()) { + AuditContext.setContent("解绑失败,用户身份提供商绑定关系不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException(AuditContext.getContent()); + } + UserIdpBindEntity bind = optional.get(); + userIdpRepository.deleteById(Long.valueOf(id)); + AuditContext.setTarget( + Target.builder().id(bind.getUserId().toString()).type(TargetType.USER).build(), + Target.builder().id(bind.getIdpId()).type(TargetType.IDENTITY_PROVIDER).build()); + return true; + } + + /** + * 查询用户身份提供商绑定 + * + * @param userId {@link String} + * @return {@link Page} + */ + @Override + public List getUserIdpBindList(String userId) { + //查询映射 + return userIdpBindConverter.userIdpBindEntityConvertToUserIdpBindListResult( + userIdpRepository.getUserIdpBindList(Long.valueOf(userId))); + } + + /** + * UserIdpBindConverter + */ + private final UserIdpBindConverter userIdpBindConverter; + + /** + * UserIdpRepositoryCustomizedImpl + */ + private final UserIdpRepository userIdpRepository; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/app/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/package-info.java new file mode 100644 index 00000000..985721af --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/app/package-info.java @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.app; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/authentication/IdentityProviderService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/authentication/IdentityProviderService.java new file mode 100644 index 00000000..8f4190ea --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/authentication/IdentityProviderService.java @@ -0,0 +1,108 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.authentication; + +import java.util.List; + +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.enums.IdentityProviderType; +import cn.topiam.employee.console.pojo.query.authentication.IdentityProviderListQuery; +import cn.topiam.employee.console.pojo.result.authentication.IdentityProviderCreateResult; +import cn.topiam.employee.console.pojo.result.authentication.IdentityProviderListResult; +import cn.topiam.employee.console.pojo.result.authentication.IdentityProviderResult; +import cn.topiam.employee.console.pojo.save.authentication.IdentityProviderCreateParam; +import cn.topiam.employee.console.pojo.update.authentication.IdpUpdateParam; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + *

+ * 身份认证源配置 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-16 + */ +public interface IdentityProviderService { + /** + * 平台是否启用 + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean identityProviderIsEnable(String id); + + /** + * 通过平台类型获取 + * + * @param provider {@link IdentityProviderType} + * @return {@link IdentityProviderEntity} + */ + List getByIdentityProvider(IdentityProviderType provider); + + /** + * 认证源列表 + * + * @param pageModel {@link PageModel } + * @param query {@link IdentityProviderListQuery } + * @return {@link List} + */ + Page getIdentityProviderList(PageModel pageModel, + IdentityProviderListQuery query); + + /** + * 认证源详情 + * + * @param id {@link String} + * @return {@link IdentityProviderResult} + */ + IdentityProviderResult getIdentityProvider(String id); + + /** + * 保存认证源 + * + * @param param {@link IdentityProviderCreateParam} + * @return {@link IdentityProviderCreateResult} + */ + IdentityProviderCreateResult createIdp(IdentityProviderCreateParam param); + + /** + * 更改认证源状态 + * + * @param id {@link String} + * @param enabled {@link Boolean} + * @return {@link Boolean} + */ + Boolean updateIdentityProviderStatus(String id, Boolean enabled); + + /** + * 更新身份源 + * + * @param param {@link IdpUpdateParam} + * @return {@link Boolean} + */ + Boolean updateIdentityProvider(IdpUpdateParam param); + + /** + * 删除认证源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean deleteIdentityProvider(String id); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/authentication/impl/IdentityProviderServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/authentication/impl/IdentityProviderServiceImpl.java new file mode 100644 index 00000000..a6842749 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/authentication/impl/IdentityProviderServiceImpl.java @@ -0,0 +1,213 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.authentication.impl; + +import java.util.List; +import java.util.Optional; + +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.entity.authentication.IdentityProviderEntity; +import cn.topiam.employee.common.enums.IdentityProviderType; +import cn.topiam.employee.common.repository.authentication.IdentityProviderRepository; +import cn.topiam.employee.console.converter.authentication.IdentityProviderConverter; +import cn.topiam.employee.console.pojo.query.authentication.IdentityProviderListQuery; +import cn.topiam.employee.console.pojo.result.authentication.IdentityProviderCreateResult; +import cn.topiam.employee.console.pojo.result.authentication.IdentityProviderListResult; +import cn.topiam.employee.console.pojo.result.authentication.IdentityProviderResult; +import cn.topiam.employee.console.pojo.save.authentication.IdentityProviderCreateParam; +import cn.topiam.employee.console.pojo.update.authentication.IdpUpdateParam; +import cn.topiam.employee.console.service.authentication.IdentityProviderService; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.repository.page.domain.QueryDslRequest; +import cn.topiam.employee.support.util.BeanUtils; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import static cn.topiam.employee.common.constants.ConfigBeanNameConstants.DEFAULT_SECURITY_FILTER_CHAIN; + +/** + *

+ * 认证源配置 服务实现类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-16 + */ +@Slf4j +@Service +@AllArgsConstructor +public class IdentityProviderServiceImpl implements IdentityProviderService { + + /** + * 平台是否启用 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean identityProviderIsEnable(String id) { + Optional optional = identityProviderRepository + .findById(Long.valueOf(id)); + return optional.isPresent() && optional.get().getEnabled(); + } + + /** + * 通过平台类型获取 + * + * @param provider {@link IdentityProviderType} + * @return {@link IdentityProviderEntity} + */ + @Override + public List getByIdentityProvider(IdentityProviderType provider) { + return identityProviderRepository.findByType(provider); + } + + /** + * 认证源列表 + * + * @param pageModel {@link PageModel } + * @param query {@link IdentityProviderListQuery} + * @return {@link List} + */ + @Override + public Page getIdentityProviderList(PageModel pageModel, + IdentityProviderListQuery query) { + QueryDslRequest request = identityProviderConverter + .queryIdentityProviderListParamConvertToPredicate(query, pageModel); + org.springframework.data.domain.Page list = identityProviderRepository + .findAll(request.getPredicate(), request.getPageRequest()); + return identityProviderConverter.entityConverterToIdentityProviderResult(list); + } + + /** + * 认证源详情 + * + * @param id {@link String} + * @return {@link IdentityProviderResult} + */ + @Override + public IdentityProviderResult getIdentityProvider(String id) { + Optional optional = identityProviderRepository + .findById(Long.valueOf(id)); + if (optional.isPresent()) { + return identityProviderConverter + .entityConverterToIdentityProviderDetailResult(optional.get()); + } + return new IdentityProviderResult(); + } + + /** + * 创建认证源 + * + * @param param {@link IdentityProviderCreateParam} + * @return {@link IdentityProviderCreateResult} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public IdentityProviderCreateResult createIdp(IdentityProviderCreateParam param) { + //转换对象 + IdentityProviderEntity data = identityProviderConverter + .identityProviderCreateParamConverterToEntity(param); + identityProviderRepository.save(data); + ApplicationContextHelp.refresh(DEFAULT_SECURITY_FILTER_CHAIN); + AuditContext.setTarget(Target.builder().id(data.getId().toString()) + .type(TargetType.IDENTITY_PROVIDER).build()); + return IdentityProviderCreateResult.builder().id(String.valueOf(data.getId())) + .type(data.getType()).build(); + } + + /** + * 更新身份验证源 + * + * @param param {@link IdpUpdateParam} + * @return {@link Boolean} + */ + @Override + public Boolean updateIdentityProvider(IdpUpdateParam param) { + Optional optional = identityProviderRepository + .findById(Long.valueOf(param.getId())); + if (optional.isPresent()) { + IdentityProviderEntity entity = optional.get(); + //转换对象 + IdentityProviderEntity data = identityProviderConverter + .identityProviderUpdateParamConverterToEntity(param); + BeanUtils.merge(data, entity); + identityProviderRepository.save(entity); + ApplicationContextHelp.refresh(DEFAULT_SECURITY_FILTER_CHAIN); + AuditContext.setTarget(Target.builder().id(entity.getId().toString()) + .type(TargetType.IDENTITY_PROVIDER).build()); + return true; + } + throw new NullPointerException("系统不存在该身份源"); + } + + /** + * 删除认证源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean deleteIdentityProvider(String id) { + Optional optional = identityProviderRepository + .findById(Long.valueOf(id)); + //管理员不存在 + if (optional.isEmpty()) { + AuditContext.setContent("删除失败,认证源不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException(AuditContext.getContent()); + } + identityProviderRepository.deleteById(Long.valueOf(id)); + ApplicationContextHelp.refresh(DEFAULT_SECURITY_FILTER_CHAIN); + AuditContext.setTarget(Target.builder().id(id).type(TargetType.IDENTITY_PROVIDER).build()); + return Boolean.TRUE; + } + + /** + * 更改认证源状态 + * + * @param id {@link String} + * @param enabled {@link Boolean} + * @return {@link Boolean} + */ + @Override + public Boolean updateIdentityProviderStatus(String id, Boolean enabled) { + boolean result = identityProviderRepository.updateIdentityProviderStatus(Long.valueOf(id), + enabled) > 0; + ApplicationContextHelp.refresh(DEFAULT_SECURITY_FILTER_CHAIN); + AuditContext.setTarget(Target.builder().id(id).type(TargetType.IDENTITY_PROVIDER).build()); + return result; + } + + /** + * 身份源身份转换器 + */ + private final IdentityProviderConverter identityProviderConverter; + /** + * 身份源repository + */ + private final IdentityProviderRepository identityProviderRepository; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/IdentitySourceEventRecordService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/IdentitySourceEventRecordService.java new file mode 100644 index 00000000..fef68646 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/IdentitySourceEventRecordService.java @@ -0,0 +1,44 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.identitysource; + +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceEventRecordListQuery; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceEventRecordListResult; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + *

+ * 身份源事件记录 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-16 + */ +public interface IdentitySourceEventRecordService { + + /** + * 身份源事件记录 列表 + * + * @param query {@link IdentitySourceEventRecordListQuery} + * @param pageModel {@link PageModel} + * @return {@link IdentitySourceEventRecordListResult} + */ + Page getIdentitySourceEventRecordList(IdentitySourceEventRecordListQuery query, + PageModel pageModel); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/IdentitySourceService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/IdentitySourceService.java new file mode 100644 index 00000000..9c8d6ea3 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/IdentitySourceService.java @@ -0,0 +1,124 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.identitysource; + +import java.util.List; + +import cn.topiam.employee.common.entity.identitysource.IdentitySourceEntity; +import cn.topiam.employee.console.pojo.other.IdentitySourceConfigValidatorParam; +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceListQuery; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceListResult; +import cn.topiam.employee.console.pojo.save.identitysource.IdentitySourceConfigSaveParam; +import cn.topiam.employee.console.pojo.save.identitysource.IdentitySourceCreateParam; +import cn.topiam.employee.console.pojo.save.identitysource.IdentitySourceCreateResult; +import cn.topiam.employee.console.pojo.update.identity.IdentitySourceUpdateParam; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + *

+ * 身份源配置 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-16 + */ +public interface IdentitySourceService { + + /** + * 身份源列表 + * + * @param query {@link IdentitySourceListQuery} + * @param pageModel {@link PageModel} + * @return {@link List} + */ + Page getIdentitySourceList(IdentitySourceListQuery query, + PageModel pageModel); + + /** + * 身份源详情 + * + * @param id {@link String} + * @return {@link IdentitySourceEntity} + */ + IdentitySourceEntity getIdentitySource(String id); + + /** + * 创建身份源 + * + * @param param {@link IdentitySourceCreateParam} + * @return {@link IdentitySourceCreateResult} + */ + IdentitySourceCreateResult createIdentitySource(IdentitySourceCreateParam param); + + /** + * 修改身份源 + * + * @param param {@link IdentitySourceUpdateParam} + * @return {@link Boolean} + */ + Boolean updateIdentitySource(IdentitySourceUpdateParam param); + + /** + * 禁用身份源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean disableIdentitySource(String id); + + /** + * 启用身份源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean enableIdentitySource(String id); + + /** + * 删除身份源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean deleteIdentitySource(String id); + + /** + * 保存身份源配置 + * + * @param param {@link IdentitySourceConfigSaveParam} + * @return {@link Boolean} + */ + Boolean saveIdentitySourceConfig(IdentitySourceConfigSaveParam param); + + /** + * 更新身份源策略 + * + * @param id {@link Long} 主键 + * @param strategyConfig {@link String} 策略 + */ + void updateStrategyConfig(Long id, String strategyConfig); + + /** + * 身份源配置验证 + * + * @param param {@link IdentitySourceConfigValidatorParam} + * @return {@link Boolean} + */ + Boolean identitySourceConfigValidator(IdentitySourceConfigValidatorParam param); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/IdentitySourceSyncService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/IdentitySourceSyncService.java new file mode 100644 index 00000000..96186ca2 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/IdentitySourceSyncService.java @@ -0,0 +1,60 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.identitysource; + +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceSyncHistoryListQuery; +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceSyncRecordListQuery; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceSyncHistoryListResult; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceSyncRecordListResult; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + * 身份源同步service接口 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/3/16 22:56 + */ +public interface IdentitySourceSyncService { + /** + * 执行身份源同步 + * + * @param id {@link String} 身份源ID + */ + void executeIdentitySourceSync(String id); + + /** + * 查询身份源同步列表 + * + * @param query {@link IdentitySourceSyncHistoryListQuery} + * @param pageModel {@link PageModel} + * @return {@link IdentitySourceSyncHistoryListResult} + */ + Page getIdentitySourceSyncHistoryList(IdentitySourceSyncHistoryListQuery query, + PageModel pageModel); + + /** + * 查询身份源同步详情 + * + * @param query {@link IdentitySourceSyncRecordListQuery} + * @param pageModel {@link PageModel} + * @return {@link IdentitySourceSyncRecordListResult} + */ + Page getIdentitySourceSyncRecordList(IdentitySourceSyncRecordListQuery query, + PageModel pageModel); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/impl/IdentitySourceEventRecordServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/impl/IdentitySourceEventRecordServiceImpl.java new file mode 100644 index 00000000..368b5313 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/impl/IdentitySourceEventRecordServiceImpl.java @@ -0,0 +1,82 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.identitysource.impl; + +import java.time.LocalDateTime; + +import org.springframework.data.querydsl.QPageRequest; +import org.springframework.stereotype.Service; + +import com.querydsl.core.types.OrderSpecifier; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.common.entity.identitysource.IdentitySourceEventRecordEntity; +import cn.topiam.employee.common.entity.identitysource.QIdentitySourceEventRecordEntity; +import cn.topiam.employee.common.repository.identitysource.IdentitySourceEventRecordRepository; +import cn.topiam.employee.console.converter.identitysource.IdentitySourceEventRecordConverter; +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceEventRecordListQuery; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceEventRecordListResult; +import cn.topiam.employee.console.service.identitysource.IdentitySourceEventRecordService; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +import lombok.AllArgsConstructor; + +/** + * 身份源事件记录 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/3/16 19:04 + */ +@Service +@AllArgsConstructor +public class IdentitySourceEventRecordServiceImpl implements IdentitySourceEventRecordService { + + /** + * 身份源事件记录 列表 + * + * @param query {@link IdentitySourceEventRecordListQuery} + * @param pageModel {@link PageModel} + * @return {@link IdentitySourceEventRecordListResult} + */ + @Override + public Page getIdentitySourceEventRecordList(IdentitySourceEventRecordListQuery query, + PageModel pageModel) { + //查询条件 + Predicate predicate = identitySourceEventRecordConverter + .queryIdentitySourceEventRecordListQueryConvertToPredicate(query); + //分页条件 + OrderSpecifier desc = QIdentitySourceEventRecordEntity.identitySourceEventRecordEntity.eventTime + .desc(); + //分页条件 + QPageRequest request = QPageRequest.of(pageModel.getCurrent(), pageModel.getPageSize(), + desc); + //查询映射 + org.springframework.data.domain.Page list = identitySourceEventRecordRepository + .findAll(predicate, request); + return identitySourceEventRecordConverter + .entityConvertToIdentitySourceSyncRecordListResult(list); + } + + /** + * 身份源时间记录 + */ + private final IdentitySourceEventRecordRepository identitySourceEventRecordRepository; + + private final IdentitySourceEventRecordConverter identitySourceEventRecordConverter; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/impl/IdentitySourceServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/impl/IdentitySourceServiceImpl.java new file mode 100644 index 00000000..966aec65 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/impl/IdentitySourceServiceImpl.java @@ -0,0 +1,278 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.identitysource.impl; + +import java.util.List; +import java.util.Optional; + +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.alibaba.fastjson2.JSONObject; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.constants.AccountConstants; +import cn.topiam.employee.common.entity.identitysource.IdentitySourceEntity; +import cn.topiam.employee.common.repository.identitysource.IdentitySourceRepository; +import cn.topiam.employee.console.converter.identitysource.IdentitySourceConverter; +import cn.topiam.employee.console.pojo.other.IdentitySourceConfigValidatorParam; +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceListQuery; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceListResult; +import cn.topiam.employee.console.pojo.save.authentication.IdentityProviderCreateParam; +import cn.topiam.employee.console.pojo.save.identitysource.IdentitySourceConfigSaveParam; +import cn.topiam.employee.console.pojo.save.identitysource.IdentitySourceCreateParam; +import cn.topiam.employee.console.pojo.save.identitysource.IdentitySourceCreateResult; +import cn.topiam.employee.console.pojo.update.identity.IdentitySourceUpdateParam; +import cn.topiam.employee.console.service.identitysource.IdentitySourceService; +import cn.topiam.employee.identitysource.dingtalk.DingTalkConfig; +import cn.topiam.employee.identitysource.dingtalk.DingTalkConfigValidator; +import cn.topiam.employee.identitysource.feishu.FeiShuConfig; +import cn.topiam.employee.identitysource.feishu.FeiShuConfigValidator; +import cn.topiam.employee.identitysource.wechatwork.WeChatWorkConfig; +import cn.topiam.employee.identitysource.wechatwork.WeChatWorkConfigValidator; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.repository.page.domain.QueryDslRequest; +import cn.topiam.employee.support.util.BeanUtils; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; + +/** + *

+ * 身份源配置 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-16 + */ +@Slf4j +@Service +@AllArgsConstructor +@CacheConfig(cacheNames = { AccountConstants.IDS_CACHE_NAME }) +public class IdentitySourceServiceImpl implements IdentitySourceService { + + /** + * 身份源列表 + * + * @param pageModel {@link PageModel} + * @return {@link List} + */ + @Override + public cn.topiam.employee.support.repository.page.domain.Page getIdentitySourceList(IdentitySourceListQuery query, + PageModel pageModel) { + QueryDslRequest request = identitySourceConverter + .queryIdentitySourceListParamConvertToPredicate(query, pageModel); + org.springframework.data.domain.Page list = identitySourceRepository + .findAll(request.getPredicate(), request.getPageRequest()); + return identitySourceConverter.entityConverterToIdentitySourceListResult(list); + } + + /** + * 身份源详情 + * + * @param id {@link String} + * @return {@link IdentitySourceEntity} + */ + @Override + public IdentitySourceEntity getIdentitySource(String id) { + Optional provider = identitySourceRepository + .findById(Long.valueOf(id)); + return provider.orElse(null); + } + + /** + * 保存身份源 + * + * @param param {@link IdentityProviderCreateParam} + * @return {@link IdentitySourceCreateResult} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public IdentitySourceCreateResult createIdentitySource(IdentitySourceCreateParam param) { + IdentitySourceEntity entity = identitySourceConverter.createParamConverterToEntity(param); + identitySourceRepository.save(entity); + AuditContext.setTarget(Target.builder().id(entity.getId().toString()) + .type(TargetType.IDENTITY_SOURCE).build()); + return new IdentitySourceCreateResult(entity.getId().toString()); + } + + /** + * 修改身份源 + * + * @param param {@link IdentitySourceUpdateParam} + * @return {@link Boolean} + */ + @Override + public Boolean updateIdentitySource(IdentitySourceUpdateParam param) { + IdentitySourceEntity source = identitySourceConverter.updateParamConverterToEntity(param); + IdentitySourceEntity entity = getIdentitySource(param.getId()); + BeanUtils.merge(source, entity, LAST_MODIFIED_TIME, LAST_MODIFIED_BY); + identitySourceRepository.save(entity); + AuditContext.setTarget(Target.builder().id(entity.getId().toString()) + .type(TargetType.IDENTITY_SOURCE).build()); + return true; + } + + /** + * 禁用身份源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean disableIdentitySource(String id) { + Optional optional = identitySourceRepository + .findById(Long.valueOf(id)); + //身份源不存在 + if (optional.isEmpty()) { + AuditContext.setContent("操作失败,身份源不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException(AuditContext.getContent()); + } + Integer count = identitySourceRepository.updateIdentitySourceStatus(Long.valueOf(id), + Boolean.FALSE); + AuditContext.setTarget(Target.builder().id(id).type(TargetType.IDENTITY_SOURCE).build()); + return count > 0; + } + + /** + * 启用身份源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean enableIdentitySource(String id) { + Optional optional = identitySourceRepository + .findById(Long.valueOf(id)); + //用户不存在 + if (optional.isEmpty()) { + AuditContext.setContent("操作失败,身份源不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException(AuditContext.getContent()); + } + Integer count = identitySourceRepository.updateIdentitySourceStatus(Long.valueOf(id), + Boolean.TRUE); + AuditContext.setTarget(Target.builder().id(id).type(TargetType.IDENTITY_SOURCE).build()); + return count > 0; + } + + /** + * 删除身份源 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean deleteIdentitySource(String id) { + Optional optional = identitySourceRepository + .findById(Long.valueOf(id)); + //用户不存在 + if (optional.isEmpty()) { + AuditContext.setContent("操作失败,身份源不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException(AuditContext.getContent()); + } + identitySourceRepository.deleteById(Long.valueOf(id)); + AuditContext.setTarget(Target.builder().id(id).type(TargetType.IDENTITY_SOURCE).build()); + return true; + } + + /** + * 保存身份源配置 + * + * @param param {@link IdentitySourceConfigSaveParam} + * @return {@link Boolean} + */ + @Override + public Boolean saveIdentitySourceConfig(IdentitySourceConfigSaveParam param) { + IdentitySourceEntity entity = getIdentitySource(param.getId()); + param.getBasicConfig().putAll(JSONObject.parseObject(entity.getBasicConfig())); + //转换 + IdentitySourceEntity source = identitySourceConverter + .saveConfigParamConverterToEntity(param, entity.getProvider()); + //合并对象 + BeanUtils.merge(source, entity, LAST_MODIFIED_BY, LAST_MODIFIED_TIME); + identitySourceRepository.save(entity); + AuditContext.setTarget(Target.builder().id(entity.getId().toString()) + .type(TargetType.IDENTITY_SOURCE).build()); + return true; + } + + /** + * 更新身份源策略 + * + * @param id {@link Long} 主键 + * @param strategyConfig {@link String} 策略 + */ + @Override + public void updateStrategyConfig(Long id, String strategyConfig) { + identitySourceRepository.updateStrategyConfig(id, strategyConfig); + AuditContext + .setTarget(Target.builder().id(id.toString()).type(TargetType.IDENTITY_SOURCE).build()); + + } + + /** + * 身份源配置验证 + * + * @param param {@link IdentitySourceConfigValidatorParam} + * @return {@link Boolean} + */ + @Override + public Boolean identitySourceConfigValidator(IdentitySourceConfigValidatorParam param) { + switch (param.getProvider()) { + //钉钉 + case DINGTALK: { + DingTalkConfig config = JSONObject.parseObject(param.getConfig().toJSONString(), + DingTalkConfig.class); + return new DingTalkConfigValidator().validate(config); + } + case FEISHU: { + FeiShuConfig config = JSONObject.parseObject(param.getConfig().toJSONString(), + FeiShuConfig.class); + return new FeiShuConfigValidator().validate(config); + } + case WECHAT_WORK: { + WeChatWorkConfig config = JSONObject.parseObject(param.getConfig().toJSONString(), + WeChatWorkConfig.class); + return new WeChatWorkConfigValidator().validate(config); + } + default: { + throw new TopIamException("暂未支持此提供商连接验证"); + } + } + } + + /** + * 身份验证源转换器 + */ + private final IdentitySourceConverter identitySourceConverter; + + /** + * 身份源 + */ + private final IdentitySourceRepository identitySourceRepository; + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/impl/IdentitySourceSyncServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/impl/IdentitySourceSyncServiceImpl.java new file mode 100644 index 00000000..50ade21c --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/identitysource/impl/IdentitySourceSyncServiceImpl.java @@ -0,0 +1,148 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.identitysource.impl; + +import java.time.LocalDateTime; +import java.util.Objects; + +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.data.querydsl.QPageRequest; +import org.springframework.stereotype.Service; + +import com.querydsl.core.types.OrderSpecifier; +import com.querydsl.core.types.Predicate; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.common.entity.identitysource.IdentitySourceEntity; +import cn.topiam.employee.common.entity.identitysource.IdentitySourceSyncHistoryEntity; +import cn.topiam.employee.common.entity.identitysource.IdentitySourceSyncRecordEntity; +import cn.topiam.employee.common.entity.identitysource.QIdentitySourceSyncHistoryEntity; +import cn.topiam.employee.common.repository.identitysource.IdentitySourceSyncHistoryRepository; +import cn.topiam.employee.common.repository.identitysource.IdentitySourceSyncRecordRepository; +import cn.topiam.employee.console.converter.identitysource.IdentitySourceSyncConverter; +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceSyncHistoryListQuery; +import cn.topiam.employee.console.pojo.query.identity.IdentitySourceSyncRecordListQuery; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceSyncHistoryListResult; +import cn.topiam.employee.console.pojo.result.identitysource.IdentitySourceSyncRecordListResult; +import cn.topiam.employee.console.service.identitysource.IdentitySourceService; +import cn.topiam.employee.console.service.identitysource.IdentitySourceSyncService; +import cn.topiam.employee.identitysource.core.event.IdentitySourceEventUtils; +import cn.topiam.employee.identitysource.core.exception.IdentitySourceNotExistException; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import static cn.topiam.employee.audit.enums.TargetType.IDENTITY_SOURCE; + +/** + * 同步身份源同步 + * + * @author TopIAM + * Created by support@topiam.cn on 2022/3/16 19:04 + */ +@Slf4j +@Service +@AllArgsConstructor +public class IdentitySourceSyncServiceImpl implements IdentitySourceSyncService { + /** + * 查询身份源同步列表 + * + * @param query {@link IdentitySourceSyncHistoryListQuery} + * @param pageModel {@link PageModel} + * @return {@link IdentitySourceSyncRecordListResult} + */ + @Override + public Page getIdentitySourceSyncHistoryList(IdentitySourceSyncHistoryListQuery query, + PageModel pageModel) { + //查询条件 + Predicate predicate = identitySourceSyncConverter + .queryIdentitySourceSyncHistoryListQueryConvertToPredicate(query); + //分页条件 + OrderSpecifier desc = QIdentitySourceSyncHistoryEntity.identitySourceSyncHistoryEntity.createTime + .desc(); + QPageRequest request = QPageRequest.of(pageModel.getCurrent(), pageModel.getPageSize(), + desc); + //查询映射 + org.springframework.data.domain.Page list = identitySourceSyncHistoryRepository + .findAll(predicate, request); + return identitySourceSyncConverter.entityConvertToIdentitySourceSyncHistoryListResult(list); + } + + /** + * 查询身份源同步详情 + * + * @param query {@link IdentitySourceSyncRecordListQuery} + * @param pageModel {@link PageModel} + * @return {@link IdentitySourceSyncRecordListResult} + */ + @Override + public Page getIdentitySourceSyncRecordList(IdentitySourceSyncRecordListQuery query, + PageModel pageModel) { + //查询条件 + Predicate predicate = identitySourceSyncConverter + .queryIdentitySourceSyncRecordListQueryConvertToPredicate(query); + //分页条件 + QPageRequest request = QPageRequest.of(pageModel.getCurrent(), pageModel.getPageSize()); + //查询映射 + org.springframework.data.domain.Page list = identitySourceSyncRecordRepository + .findAll(predicate, request); + return identitySourceSyncConverter.entityConvertToIdentitySourceSyncRecordListResult(list); + } + + /** + * 执行身份源同步 + * + * @param id {@link String} 身份源ID + */ + @Override + public void executeIdentitySourceSync(String id) { + AuditContext.setTarget(Target.builder().id(id).type(IDENTITY_SOURCE).build()); + IdentitySourceEntity entity = identitySourceService.getIdentitySource(id); + if (!ObjectUtils.isEmpty(entity)) { + if (Objects.isNull(entity.getBasicConfig())) { + throw new NullPointerException("请完善参数配置"); + } + if (!entity.getEnabled()) { + throw new NullPointerException("身份源已禁用"); + } + //发送分布式事件 + IdentitySourceEventUtils.sync(id); + return; + } + throw new IdentitySourceNotExistException(); + } + + /** + * 身份源service + */ + private final IdentitySourceService identitySourceService; + /** + * 身份源同步记录 + */ + private final IdentitySourceSyncHistoryRepository identitySourceSyncHistoryRepository; + /** + * 身份源同步详情 + */ + private final IdentitySourceSyncRecordRepository identitySourceSyncRecordRepository; + /** + * 身份源同步转换 + */ + private final IdentitySourceSyncConverter identitySourceSyncConverter; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/package-info.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/package-info.java new file mode 100644 index 00000000..aafdee5e --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/package-info.java @@ -0,0 +1,22 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +/** + * @author TopIAM + * Created by support@topiam.cn on 2020/7/9 23:04 + */ +package cn.topiam.employee.console.service; \ No newline at end of file diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/AdministratorService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/AdministratorService.java new file mode 100644 index 00000000..8b606396 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/AdministratorService.java @@ -0,0 +1,106 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting; + +import cn.topiam.employee.common.enums.CheckValidityType; +import cn.topiam.employee.common.enums.UserStatus; +import cn.topiam.employee.console.pojo.query.setting.AdministratorListQuery; +import cn.topiam.employee.console.pojo.result.setting.AdministratorListResult; +import cn.topiam.employee.console.pojo.result.setting.AdministratorResult; +import cn.topiam.employee.console.pojo.save.setting.AdministratorCreateParam; +import cn.topiam.employee.console.pojo.update.setting.AdministratorUpdateParam; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; + +/** + * 管理员 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/13 23:12 + */ +public interface AdministratorService { + /** + * 查询平台管理员列表 + * + * @param model {@link PageModel} + * @param query {@link AdministratorListQuery} + * @return {@link Page} + */ + Page getAdministratorList(PageModel model, + AdministratorListQuery query); + + /** + * 创建管理员 + * + * @param param {@link AdministratorCreateParam} + * @return {@link Boolean} + */ + Boolean createAdministrator(AdministratorCreateParam param); + + /** + * 修改管理员 + * + * @param param {@link AdministratorUpdateParam} + * @return {@link Boolean} + */ + Boolean updateAdministrator(AdministratorUpdateParam param); + + /** + * 删除管理员 + * + * @param id {@link String} + * @return {@link Boolean} + */ + Boolean deleteAdministrator(String id); + + /** + * 根据ID获取管理员 + * + * @param id {@link String} + * @return {@link AdministratorResult} + */ + AdministratorResult getAdministrator(String id); + + /** + * 更改管理员状态 + * + * @param id {@link String} + * @param status {@link UserStatus} + * @return {@link Boolean} + */ + Boolean updateAdministratorStatus(String id, UserStatus status); + + /** + * 重置管理员密码 + * + * @param id {@link String} + * @param password {@link String} + * @return {@link Boolean} + */ + Boolean resetAdministratorPassword(String id, String password); + + /** + * 参数有效性验证 + * + * @param type {@link CheckValidityType} + * @param value {@link String} + * @param id {@link Long} + * @return {@link Boolean} + */ + Boolean administratorParamCheck(CheckValidityType type, String value, Long id); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/GeoLocationSettingService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/GeoLocationSettingService.java new file mode 100644 index 00000000..dbb35884 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/GeoLocationSettingService.java @@ -0,0 +1,59 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting; + +import cn.topiam.employee.common.geo.GeoLocation; +import cn.topiam.employee.console.pojo.result.setting.GeoIpProviderResult; +import cn.topiam.employee.console.pojo.save.setting.GeoIpProviderSaveParam; + +/** + * ip设置接口 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 21:19 + */ +public interface GeoLocationSettingService extends SettingService { + + /** + * 保存配置 + * + * @param param {@link GeoIpProviderSaveParam} + * @return {@link Boolean} + */ + Boolean saveGeoIpLibrary(GeoIpProviderSaveParam param); + + /** + * 获取配置 + * + * @return {@link GeoIpProviderResult} + */ + GeoIpProviderResult getGeoIpLibrary(); + + /** + * 查询ip详细信息 + * + * @param ip {@link String} + * @return {@link GeoLocation} + */ + GeoLocation getGeoLocation(String ip); + + /** + * 更新库文件 + */ + void downloadDbFile(); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/MailTemplateService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/MailTemplateService.java new file mode 100644 index 00000000..ec6398da --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/MailTemplateService.java @@ -0,0 +1,75 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting; + +import java.util.List; + +import cn.topiam.employee.common.entity.setting.MailTemplateEntity; +import cn.topiam.employee.common.enums.MailType; +import cn.topiam.employee.console.pojo.result.setting.EmailTemplateListResult; +import cn.topiam.employee.console.pojo.result.setting.EmailTemplateResult; +import cn.topiam.employee.console.pojo.save.setting.EmailCustomTemplateSaveParam; + +/** + *

+ * 邮件模板 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-13 + */ +public interface MailTemplateService extends SettingService { + /** + * 根据邮件模板类型获取配置 + * + * @param type {@link MailType} + * @return SettingMailTemplateEntity + */ + MailTemplateEntity getEmailTemplateByType(MailType type); + + /** + * 添加邮件模板 + * + * @param type {@link MailType} + * @param param {@link EmailCustomTemplateSaveParam} + * @return SettingMailTemplateEntity + */ + MailTemplateEntity saveCustomEmailTemplate(MailType type, EmailCustomTemplateSaveParam param); + + /** + * 邮件模板详情 + * + * @param templateType {@link MailType} + * @return {@link EmailTemplateResult} + */ + EmailTemplateResult getEmailTemplate(MailType templateType); + + /** + * 获取邮件模板列表 + * + * @return {@link List} + */ + List getEmailTemplateList(); + + /** + * 禁用自定义模块 + * + * @param type {@link MailType} + */ + void disableCustomEmailTemplate(MailType type); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/MessageSettingService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/MessageSettingService.java new file mode 100644 index 00000000..06503a68 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/MessageSettingService.java @@ -0,0 +1,75 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting; + +import cn.topiam.employee.console.pojo.result.setting.EmailProviderConfigResult; +import cn.topiam.employee.console.pojo.save.setting.MailProviderSaveParam; +import cn.topiam.employee.console.pojo.save.setting.SmsProviderSaveParam; +import cn.topiam.employee.console.pojo.setting.SmsProviderConfigResult; + +/** + * 消息设置接口 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 21:19 + */ +public interface MessageSettingService extends SettingService { + /** + * 保存配置 + * + * @param param {@link MailProviderSaveParam} + * @return {@link Boolean} + */ + Boolean saveMailProviderConfig(MailProviderSaveParam param); + + /** + * 保存邮件验证配置 + * + * @param param {@link SmsProviderSaveParam} + * @return {@link Boolean} + */ + Boolean saveSmsProviderConfig(SmsProviderSaveParam param); + + /** + * 禁用短信验证服务 + * + * @return {@link Boolean} + */ + Boolean disableSmsProvider(); + + /** + * 禁用邮件提供商 + * + * @return {@link Boolean} + */ + Boolean disableMailProvider(); + + /** + * 获取邮件提供商配置 + * + * @return {@link EmailProviderConfigResult} + */ + EmailProviderConfigResult getMailProviderConfig(); + + /** + * 获取短信验证服务配置 + * + * @return {@link SmsProviderConfigResult} + */ + SmsProviderConfigResult getSmsProviderConfig(); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/PasswordPolicyService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/PasswordPolicyService.java new file mode 100644 index 00000000..3e3af112 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/PasswordPolicyService.java @@ -0,0 +1,58 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting; + +import java.util.List; + +import cn.topiam.employee.console.pojo.result.setting.PasswordPolicyConfigResult; +import cn.topiam.employee.console.pojo.result.setting.WeakPasswordLibListResult; +import cn.topiam.employee.console.pojo.save.setting.PasswordPolicySaveParam; + +/** + *

+ * 密码策略 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-17 + */ +public interface PasswordPolicyService extends SettingService { + + /** + * 获取配置 + * + * @return {@link PasswordPolicyConfigResult} + */ + PasswordPolicyConfigResult getPasswordPolicyConfig(); + + /** + * 保存配置 + * + * @param param {@link PasswordPolicySaveParam} + * @return {@link Boolean} + */ + Boolean savePasswordPolicyConfig(PasswordPolicySaveParam param); + + /** + * 获取弱密码库 + * + * @return {@link List} + */ + List getWeakPasswordLibList(); + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/SecuritySettingService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/SecuritySettingService.java new file mode 100644 index 00000000..194f6d32 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/SecuritySettingService.java @@ -0,0 +1,89 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting; + +import cn.topiam.employee.console.pojo.result.setting.SecurityBasicConfigResult; +import cn.topiam.employee.console.pojo.result.setting.SecurityCaptchaConfigResult; +import cn.topiam.employee.console.pojo.result.setting.SecurityMfaConfigResult; +import cn.topiam.employee.console.pojo.save.setting.SecurityBasicSaveParam; +import cn.topiam.employee.console.pojo.save.setting.SecurityCaptchaSaveParam; +import cn.topiam.employee.console.pojo.save.setting.SecurityMfaSaveParam; + +/** + *

+ * 安全设置表 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-10-01 + */ +public interface SecuritySettingService extends SettingService { + + /** + * 获取配置 + * + * @return {@link SecurityBasicConfigResult} + */ + SecurityBasicConfigResult getBasicConfig(); + + /** + * 保存配置 + * + * @param param {@link SecurityBasicSaveParam} + * @return {@link Boolean} + */ + Boolean saveBasicConfig(SecurityBasicSaveParam param); + + /** + * 获取验证码配置 + * + * @return {@link SecurityCaptchaConfigResult} + */ + SecurityCaptchaConfigResult getCaptchaProviderConfig(); + + /** + * 保存行为验证码 + * + * @param param {@link SecurityCaptchaSaveParam} + * @return {@link Boolean} + */ + Boolean saveCaptchaProviderConfig(SecurityCaptchaSaveParam param); + + /** + * 禁用行为验证码 + * + * @return {@link Boolean} + */ + Boolean disableCaptchaProvider(); + + /** + * 获取MFA配置 + * + * @return {@link SecurityMfaConfigResult} + */ + SecurityMfaConfigResult getMfaConfig(); + + /** + * 保存行为验证码 + * + * @param param {@link SecurityMfaSaveParam} + * @return {@link Boolean} + */ + Boolean saveMfaConfig(SecurityMfaSaveParam param); + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/SettingService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/SettingService.java new file mode 100644 index 00000000..757634ae --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/SettingService.java @@ -0,0 +1,60 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting; + +import java.util.List; + +import cn.topiam.employee.common.entity.setting.SettingEntity; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/9 22:30 + */ +public interface SettingService { + /** + * 保存设置 + * + * @param entity {@link SettingEntity} + * @return {@link Boolean} + */ + Boolean saveSetting(SettingEntity entity); + + /** + * 根据KEY获取配置 + * + * @param name {@link String} + * @return {@link SettingEntity} + */ + SettingEntity getSetting(String name); + + /** + * 根据KEY模糊获取配置 + * + * @param name {@link String} + * @return {@link List} + */ + List findByNameLike(String name); + + /** + * 移除配置 + * + * @param name {@link String} + * @return {@link Boolean} + */ + Boolean removeSetting(String name); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/SmsTemplateService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/SmsTemplateService.java new file mode 100644 index 00000000..48d4b809 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/SmsTemplateService.java @@ -0,0 +1,42 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting; + +import java.util.List; + +import cn.topiam.employee.common.enums.Language; +import cn.topiam.employee.console.pojo.result.setting.SmsTemplateListResult; + +/** + *

+ * 短信模版 服务类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-13 + */ +public interface SmsTemplateService extends SettingService { + + /** + * 获取短信模版列表 + * + * @param language {@link Language} + * @return {@link SmsTemplateListResult} + */ + List getSmsTemplateList(Language language); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/StorageSettingService.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/StorageSettingService.java new file mode 100644 index 00000000..72079c25 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/StorageSettingService.java @@ -0,0 +1,51 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting; + +import cn.topiam.employee.console.pojo.result.setting.StorageProviderConfigResult; +import cn.topiam.employee.console.pojo.save.setting.StorageConfigSaveParam; + +/** + * 存储设置接口 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 21:19 + */ +public interface StorageSettingService extends SettingService { + /** + * 更改存储启用禁用 + * + * @return {@link Boolean} + */ + Boolean disableStorage(); + + /** + * 保存存储配置 + * + * @param param {@link StorageConfigSaveParam} + * @return {@link Boolean} + */ + Boolean saveStorageConfig(StorageConfigSaveParam param); + + /** + * 获取存储配置 + * + * @return {@link StorageProviderConfigResult} + */ + StorageProviderConfigResult getStorageConfig(); +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/AdministratorServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/AdministratorServiceImpl.java new file mode 100644 index 00000000..018d1844 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/AdministratorServiceImpl.java @@ -0,0 +1,318 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting.impl; + +import java.nio.charset.StandardCharsets; +import java.util.Base64; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.concurrent.Executor; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.querydsl.QPageRequest; +import org.springframework.scheduling.annotation.AsyncConfigurer; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.session.Session; +import org.springframework.session.security.SpringSessionBackedSessionRegistry; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.querydsl.core.types.Predicate; +import com.querydsl.core.types.dsl.BooleanExpression; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.entity.setting.AdministratorEntity; +import cn.topiam.employee.common.entity.setting.QAdministratorEntity; +import cn.topiam.employee.common.enums.CheckValidityType; +import cn.topiam.employee.common.enums.UserStatus; +import cn.topiam.employee.common.repository.setting.AdministratorRepository; +import cn.topiam.employee.console.converter.setting.AdministratorConverter; +import cn.topiam.employee.console.pojo.query.setting.AdministratorListQuery; +import cn.topiam.employee.console.pojo.result.setting.AdministratorListResult; +import cn.topiam.employee.console.pojo.result.setting.AdministratorResult; +import cn.topiam.employee.console.pojo.save.setting.AdministratorCreateParam; +import cn.topiam.employee.console.pojo.update.setting.AdministratorUpdateParam; +import cn.topiam.employee.console.service.setting.AdministratorService; +import cn.topiam.employee.core.security.session.SessionDetails; +import cn.topiam.employee.core.security.session.TopIamSessionBackedSessionRegistry; +import cn.topiam.employee.core.security.util.SecurityUtils; +import cn.topiam.employee.support.exception.InfoValidityFailException; +import cn.topiam.employee.support.exception.TopIamException; +import cn.topiam.employee.support.repository.page.domain.Page; +import cn.topiam.employee.support.repository.page.domain.PageModel; +import cn.topiam.employee.support.util.BeanUtils; + +import lombok.extern.slf4j.Slf4j; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; + +/** + * @author TopIAM + * Created by support@topiam.cn on 2021/11/13 23:13 + */ +@Slf4j +@Service +public class AdministratorServiceImpl implements AdministratorService { + + /** + * 查询平台管理员列表 + * + * @param model {@link PageModel} + * @param query {@link AdministratorListQuery} + * @return {@link List} + */ + @Override + public Page getAdministratorList(PageModel model, + AdministratorListQuery query) { + Predicate predicate = administratorConverter + .queryAdministratorListParamConvertToPredicate(query); + //分页条件 + QPageRequest request = QPageRequest.of(model.getCurrent(), model.getPageSize()); + org.springframework.data.domain.Page page = administratorRepository + .findAll(predicate, request); + return administratorConverter.entityConvertToAdministratorPaginationResult(page); + } + + /** + * 创建管理员 + * + * @param param {@link AdministratorCreateParam} + * @return {@link Boolean} + */ + @Override + public Boolean createAdministrator(AdministratorCreateParam param) { + // 判断用户名、手机号、邮箱是否存在 + Boolean validityPhone = administratorParamCheck(CheckValidityType.PHONE, param.getPhone(), + null); + if (!validityPhone) { + throw new InfoValidityFailException("手机号已存在"); + } + Boolean validityEmail = administratorParamCheck(CheckValidityType.EMAIL, param.getEmail(), + null); + if (!validityEmail) { + throw new InfoValidityFailException("邮箱已存在"); + } + Boolean validityUsername = administratorParamCheck(CheckValidityType.USERNAME, + param.getUsername(), null); + if (!validityUsername) { + throw new InfoValidityFailException("用户名已存在"); + } + AdministratorEntity entity = administratorConverter + .administratorCreateParamConvertToEntity(param); + administratorRepository.save(entity); + AuditContext.setTarget( + Target.builder().id(entity.getId().toString()).type(TargetType.ADMINISTRATOR).build()); + return true; + } + + /** + * 修改管理员 + * + * @param param {@link AdministratorUpdateParam} + * @return {@link Boolean} + */ + @Override + public Boolean updateAdministrator(AdministratorUpdateParam param) { + AdministratorEntity source = administratorConverter + .administratorUpdateParamConvertToEntity(param); + AdministratorEntity target = administratorRepository.findById(Long.valueOf(param.getId())) + .orElse(new AdministratorEntity()); + AuditContext.setContent(source.getUsername()); + BeanUtils.merge(source, target, LAST_MODIFIED_TIME, LAST_MODIFIED_BY); + administratorRepository.save(target); + AuditContext.setTarget( + Target.builder().id(target.getId().toString()).type(TargetType.ADMINISTRATOR).build()); + return true; + } + + /** + * 删除管理员 + * + * @param id {@link String} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteAdministrator(String id) { + Optional optional = administratorRepository.findById(Long.valueOf(id)); + //管理员不存在 + if (optional.isEmpty()) { + AuditContext.setContent("删除失败,管理员不存在"); + log.warn(AuditContext.getContent()); + throw new TopIamException("操作失败"); + } + long count = administratorRepository.count(); + if (count == 1) { + AuditContext.setContent("禁止删除,系统必须存在一个管理员"); + log.warn(AuditContext.getContent()); + throw new TopIamException("操作失败"); + } + //执行删除 + administratorRepository.deleteById(Long.valueOf(id)); + AuditContext + .setTarget(Target.builder().id(id.toString()).type(TargetType.ADMINISTRATOR).build()); + return true; + } + + /** + * 更改管理员状态 + * + * @param id {@link String} + * @param status {@link UserStatus} + * @return {@link Boolean} + */ + @Override + public Boolean updateAdministratorStatus(String id, UserStatus status) { + Optional optional = administratorRepository.findById(Long.valueOf(id)); + optional.ifPresent( + administratorEntity -> AuditContext.setContent(administratorEntity.getUsername())); + long count = administratorRepository.count(); + if (count == 1 && !status.equals(UserStatus.ENABLE)) { + log.warn("禁止删除,当前系统只存在一个管理员"); + throw new RuntimeException("操作失败"); + } + administratorRepository.updateStatus(id, status.getCode()); + AuditContext.setTarget(Target.builder().id(id).type(TargetType.ADMINISTRATOR).build()); + return true; + } + + /** + * 重置管理员密码 + * + * @param id {@link String} + * @param password {@link String} + * @return {@link Boolean} + */ + @Override + public Boolean resetAdministratorPassword(String id, String password) { + password = new String( + Base64.getUrlDecoder().decode(password.getBytes(StandardCharsets.UTF_8)), + StandardCharsets.UTF_8); + password = passwordEncoder.encode(password); + administratorRepository.updatePassword(id, password); + AuditContext.setTarget(Target.builder().id(id).type(TargetType.ADMINISTRATOR).build()); + //异步下线所有用户 + String username = SecurityUtils.getCurrentUserName(); + executor.execute(() -> { + //@formatter:off + if (sessionRegistry instanceof TopIamSessionBackedSessionRegistry) { + List principals = ((TopIamSessionBackedSessionRegistry) sessionRegistry).getPrincipals(username); + principals.forEach(i -> { + if (i instanceof SessionDetails) { + sessionRegistry.removeSessionInformation(((SessionDetails) i).getSessionId()); + } + }); + } + }); + return true; + } + + /** + * 参数有效性验证 + * + * @param type {@link CheckValidityType} + * @param value {@link String} + * @param id {@link Long} + * @return {@link Boolean} false 不可用 true 可用 + */ + @Override + public Boolean administratorParamCheck(CheckValidityType type, String value, Long id) { + QAdministratorEntity administrator = QAdministratorEntity.administratorEntity; + AdministratorEntity entity = new AdministratorEntity(); + boolean result = false; + // ID存在说明是修改操作,查询一下当前数据 + if (Objects.nonNull(id)) { + entity = administratorRepository.findById(id).orElse(new AdministratorEntity()); + } + //邮箱 + if (CheckValidityType.EMAIL.equals(type)) { + if (StringUtils.equals(entity.getEmail(), value)) { + return true; + } + BooleanExpression eq = administrator.email.eq(value); + result = !administratorRepository.exists(eq); + } + //手机号 + if (CheckValidityType.PHONE.equals(type)) { + if (StringUtils.equals(entity.getPhone(), value)) { + return true; + } + BooleanExpression eq = administrator.phone.eq(value); + result = !administratorRepository.exists(eq); + } + //用户名 + if (CheckValidityType.USERNAME.equals(type)) { + if (StringUtils.equals(entity.getUsername(), value)) { + return true; + } + BooleanExpression eq = administrator.username.eq(value); + result = !administratorRepository.exists(eq); + } + return result; + } + + /** + * 查询管理员详情 + * + * @param id {@link String} + * @return {@link AdministratorResult} + */ + @Override + public AdministratorResult getAdministrator(String id) { + AdministratorEntity entity = administratorRepository.findById(Long.valueOf(id)) + .orElse(null); + return administratorConverter.entityConvertToAdministratorDetailsResult(entity); + } + + + /** + * Executor + */ + private final Executor executor; + + /** + * AdministratorConverter + */ + private final AdministratorConverter administratorConverter; + + /** + * AdministratorRepository + */ + private final AdministratorRepository administratorRepository; + + /** + * PasswordEncoder + */ + private final PasswordEncoder passwordEncoder; + + /** + * SessionRegistry + */ + private final SpringSessionBackedSessionRegistry sessionRegistry; + + public AdministratorServiceImpl(AdministratorConverter administratorConverter, AdministratorRepository administratorRepository, PasswordEncoder passwordEncoder, AsyncConfigurer asyncConfigurer, SpringSessionBackedSessionRegistry sessionRegistry) { + this.administratorConverter = administratorConverter; + this.administratorRepository = administratorRepository; + this.passwordEncoder = passwordEncoder; + this.executor = asyncConfigurer.getAsyncExecutor(); + this.sessionRegistry = sessionRegistry; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/GeoLocationSettingServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/GeoLocationSettingServiceImpl.java new file mode 100644 index 00000000..f97f0fab --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/GeoLocationSettingServiceImpl.java @@ -0,0 +1,105 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting.impl; + +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.setting.SettingEntity; +import cn.topiam.employee.common.geo.GeoLocation; +import cn.topiam.employee.common.geo.GeoLocationService; +import cn.topiam.employee.common.repository.setting.SettingRepository; +import cn.topiam.employee.console.converter.setting.GeoLocationSettingConverter; +import cn.topiam.employee.console.pojo.result.setting.GeoIpProviderResult; +import cn.topiam.employee.console.pojo.save.setting.GeoIpProviderSaveParam; +import cn.topiam.employee.console.service.setting.GeoLocationSettingService; +import cn.topiam.employee.support.context.ApplicationContextHelp; + +import lombok.extern.slf4j.Slf4j; +import static cn.topiam.employee.common.constants.ConfigBeanNameConstants.GEO_LOCATION; +import static cn.topiam.employee.core.setting.constant.GeoIpProviderConstants.IPADDRESS_SETTING_NAME; + +/** + * ip设置接口 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/1 21:43 + */ +@Slf4j +@Service +public class GeoLocationSettingServiceImpl extends SettingServiceImpl + implements GeoLocationSettingService { + + /** + * 保存配置 + * + * @param param {@link GeoIpProviderSaveParam} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean saveGeoIpLibrary(GeoIpProviderSaveParam param) { + SettingEntity settingEntity = geoLocationSettingsConverter + .geoLocationProviderConfigToEntity(param); + Boolean success = saveSetting(settingEntity); + downloadDbFile(); + ApplicationContextHelp.refresh(GEO_LOCATION); + return success; + } + + /** + * 获取配置 + * + * @return {@link SettingEntity} + */ + @Override + public GeoIpProviderResult getGeoIpLibrary() { + return geoLocationSettingsConverter + .entityToGeoLocationProviderConfig(getSetting(IPADDRESS_SETTING_NAME)); + } + + /** + * 查询ip详细信息 + * + * @param ip {@link String} + * @return {@link GeoLocation} + */ + @Override + public GeoLocation getGeoLocation(String ip) { + return geoLocationService.getGeoLocation(ip); + } + + /** + * 下载IP库 + */ + @Override + public void downloadDbFile() { + geoLocationService.download(); + } + + private final GeoLocationService geoLocationService; + private final GeoLocationSettingConverter geoLocationSettingsConverter; + + public GeoLocationSettingServiceImpl(SettingRepository settingsRepository, + GeoLocationService geoLocationService, + GeoLocationSettingConverter geoLocationSettingsConverter) { + super(settingsRepository); + this.geoLocationService = geoLocationService; + this.geoLocationSettingsConverter = geoLocationSettingsConverter; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/MailTemplateServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/MailTemplateServiceImpl.java new file mode 100644 index 00000000..6b00820f --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/MailTemplateServiceImpl.java @@ -0,0 +1,173 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting.impl; + +import java.util.Arrays; +import java.util.List; +import java.util.Objects; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.audit.context.AuditContext; +import cn.topiam.employee.audit.entity.Target; +import cn.topiam.employee.audit.enums.TargetType; +import cn.topiam.employee.common.entity.setting.MailTemplateEntity; +import cn.topiam.employee.common.enums.MailType; +import cn.topiam.employee.common.repository.setting.MailTemplateRepository; +import cn.topiam.employee.common.repository.setting.SettingRepository; +import cn.topiam.employee.console.converter.setting.MailTemplateConverter; +import cn.topiam.employee.console.pojo.result.setting.EmailTemplateListResult; +import cn.topiam.employee.console.pojo.result.setting.EmailTemplateResult; +import cn.topiam.employee.console.pojo.save.setting.EmailCustomTemplateSaveParam; +import cn.topiam.employee.console.service.setting.MailTemplateService; +import cn.topiam.employee.support.util.BeanUtils; +import static cn.topiam.employee.core.setting.constant.MessageSettingConstants.SETTING_EMAIL_TEMPLATE_CACHE_NAME; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; + +/** + *

+ * 邮件模板 服务实现类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-13 + */ +@Service +@CacheConfig(cacheNames = SETTING_EMAIL_TEMPLATE_CACHE_NAME) +public class MailTemplateServiceImpl extends SettingServiceImpl implements MailTemplateService { + + /** + * Logger + */ + private final Logger logger = LoggerFactory.getLogger(MailTemplateServiceImpl.class); + + /** + * 根据邮件模板类型获取配置 + * + * @param type {@link MailType} + * @return SettingMailTemplateEntity + */ + @Override + @Cacheable(key = "#result.type.code", unless = "#result == null") + public MailTemplateEntity getEmailTemplateByType(MailType type) { + return mailTemplateRepository.findByType(type); + } + + /** + * 添加邮件模板 + * + * @param type {@link MailType} + * @return SettingMailTemplateEntity + */ + @Override + @Transactional(rollbackFor = Exception.class) + @CachePut(key = "#result.type.code", unless = "#result == null") + public MailTemplateEntity saveCustomEmailTemplate(MailType type, + EmailCustomTemplateSaveParam param) { + //入参映射为实体 + MailTemplateEntity entity = messageDataConverter + .emailTemplateConfigSaveParamConvertToEntity(param); + entity.setType(type); + //查询数据库 + MailTemplateEntity template = getEmailTemplateByType(type); + if (!Objects.isNull(template)) { + BeanUtils.merge(entity, template, LAST_MODIFIED_BY, LAST_MODIFIED_TIME); + return mailTemplateRepository.save(template); + } + AuditContext + .setTarget(Target.builder().id(type.getCode()).type(TargetType.MAIL_TEMPLATE).build()); + return mailTemplateRepository.save(entity); + } + + /** + * 邮件模板详情 + * + * @param templateType {@link MailType} + * @return {@link EmailTemplateResult} + */ + @Override + public EmailTemplateResult getEmailTemplate(MailType templateType) { + //构建查询条件 + //查询 + MailTemplateEntity template = getEmailTemplateByType(templateType); + //如果数据库为空,查找默认模板 + EmailTemplateResult result; + if (Objects.isNull(template)) { + result = messageDataConverter + .mailTemplateTypeConvertToEmailTemplateDetailResult(templateType); + } + //查询数据库 + else { + result = messageDataConverter.entityConvertToEmailTemplateDetailResult(template); + } + return result; + } + + /** + * 获取邮件模板列表 + * 系统自带邮件模板及内容存入枚举, + * 如果用户进行了自定义模板内容,将会把自定义的存入数据库,使用用户自定义的 + * + * @return {@link List} + */ + @Override + public List getEmailTemplateList() { + //从枚举类获取信息 + List values = Arrays.asList(MailType.values()); + //从数据库获取 + List lists = (List) mailTemplateRepository + .findAll(); + return messageDataConverter.mailTemplateTypeConvertToEmailTemplateListResult(values, lists); + } + + /** + * 禁用自定义模块 + * + * @param type {@link MailType} + */ + @Override + @CacheEvict(key = "#type.code") + public void disableCustomEmailTemplate(MailType type) { + mailTemplateRepository.deleteByType(type); + } + + /** + * 消息服务数据映射 + */ + private final MailTemplateConverter messageDataConverter; + /** + * SettingMailTemplateRepository + */ + private final MailTemplateRepository mailTemplateRepository; + + public MailTemplateServiceImpl(SettingRepository settingsRepository, + MailTemplateConverter messageDataConverter, + MailTemplateRepository mailTemplateRepository) { + super(settingsRepository); + this.messageDataConverter = messageDataConverter; + this.mailTemplateRepository = mailTemplateRepository; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/MessageSettingServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/MessageSettingServiceImpl.java new file mode 100644 index 00000000..35e6bade --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/MessageSettingServiceImpl.java @@ -0,0 +1,128 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting.impl; + +import org.springframework.stereotype.Service; + +import cn.topiam.employee.common.entity.setting.SettingEntity; +import cn.topiam.employee.common.repository.setting.SettingRepository; +import cn.topiam.employee.console.converter.setting.MessageSettingConverter; +import cn.topiam.employee.console.pojo.result.setting.EmailProviderConfigResult; +import cn.topiam.employee.console.pojo.save.setting.MailProviderSaveParam; +import cn.topiam.employee.console.pojo.save.setting.SmsProviderSaveParam; +import cn.topiam.employee.console.pojo.setting.SmsProviderConfigResult; +import cn.topiam.employee.console.service.setting.MessageSettingService; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import static cn.topiam.employee.common.constants.ConfigBeanNameConstants.MAIL_PROVIDER_SEND; +import static cn.topiam.employee.common.constants.ConfigBeanNameConstants.SMS_PROVIDER_SEND; +import static cn.topiam.employee.core.setting.constant.MessageSettingConstants.MESSAGE_PROVIDER_EMAIL; +import static cn.topiam.employee.core.setting.constant.MessageSettingConstants.MESSAGE_SMS_PROVIDER; + +/** + * 消息设置 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/10/1 21:19 + */ +@Service +public class MessageSettingServiceImpl extends SettingServiceImpl implements MessageSettingService { + + /** + * 保存配置 + * + * @param param {@link SettingEntity} + * @return {@link Boolean} + */ + @Override + public Boolean saveMailProviderConfig(MailProviderSaveParam param) { + SettingEntity entity = messageSettingConverter.mailProviderConfigToEntity(param); + Boolean setting = saveSetting(entity); + ApplicationContextHelp.refresh(MAIL_PROVIDER_SEND); + return setting; + } + + /** + * 保存邮件验证配置 + * + * @param param {@link SmsProviderSaveParam} + * @return {@link Boolean} + */ + @Override + public Boolean saveSmsProviderConfig(SmsProviderSaveParam param) { + SettingEntity entity = messageSettingConverter.smsProviderConfigToEntity(param); + Boolean setting = saveSetting(entity); + ApplicationContextHelp.refresh(SMS_PROVIDER_SEND); + return setting; + } + + /** + * 禁用短信验证服务 + * + * @return {@link Boolean} + */ + @Override + public Boolean disableSmsProvider() { + Boolean setting = removeSetting(MESSAGE_SMS_PROVIDER); + // refresh + ApplicationContextHelp.refresh(SMS_PROVIDER_SEND); + return setting; + } + + /** + * 禁用邮件提供商 + * + * @return {@link Boolean} + */ + @Override + public Boolean disableMailProvider() { + Boolean setting = removeSetting(MESSAGE_PROVIDER_EMAIL); + // refresh + ApplicationContextHelp.refresh(MAIL_PROVIDER_SEND); + return setting; + } + + /** + * 获取邮件提供商配置 + * + * @return {@link EmailProviderConfigResult} + */ + @Override + public EmailProviderConfigResult getMailProviderConfig() { + SettingEntity entity = getSetting(MESSAGE_PROVIDER_EMAIL); + return messageSettingConverter.entityToMailProviderConfig(entity); + } + + /** + * 获取短信验证服务配置 + * + * @return {@link SmsProviderConfigResult} + */ + @Override + public SmsProviderConfigResult getSmsProviderConfig() { + SettingEntity entity = getSetting(MESSAGE_SMS_PROVIDER); + return messageSettingConverter.entityToSmsProviderConfig(entity); + } + + private final MessageSettingConverter messageSettingConverter; + + public MessageSettingServiceImpl(SettingRepository settingsRepository, + MessageSettingConverter messageSettingConverter) { + super(settingsRepository); + this.messageSettingConverter = messageSettingConverter; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/PasswordPolicyServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/PasswordPolicyServiceImpl.java new file mode 100644 index 00000000..7c046261 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/PasswordPolicyServiceImpl.java @@ -0,0 +1,120 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting.impl; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.constants.ConfigBeanNameConstants; +import cn.topiam.employee.common.entity.setting.SettingEntity; +import cn.topiam.employee.common.repository.setting.SettingRepository; +import cn.topiam.employee.console.converter.setting.PasswordPolicyConverter; +import cn.topiam.employee.console.pojo.result.setting.PasswordPolicyConfigResult; +import cn.topiam.employee.console.pojo.result.setting.WeakPasswordLibListResult; +import cn.topiam.employee.console.pojo.save.setting.PasswordPolicySaveParam; +import cn.topiam.employee.console.service.setting.PasswordPolicyService; +import cn.topiam.employee.core.security.password.weak.PasswordWeakLib; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import static cn.topiam.employee.core.setting.constant.PasswordPolicySettingConstants.PASSWORD_POLICY_KEYS; + +/** + *

+ * 密码策略 服务实现类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-17 + */ +@Service +public class PasswordPolicyServiceImpl extends SettingServiceImpl implements PasswordPolicyService { + + /** + * 获取配置 + * + * @return {@link PasswordPolicyConfigResult} + */ + @Override + public PasswordPolicyConfigResult getPasswordPolicyConfig() { + List list = settingRepository.findByNameIn(PASSWORD_POLICY_KEYS); + return passwordPolicyConverter.entityConvertToPasswordPolicyConfigResult(list); + } + + /** + * 保存配置 + * + * @param param {@link PasswordPolicySaveParam} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean savePasswordPolicyConfig(PasswordPolicySaveParam param) { + + //删除密码配置 + PASSWORD_POLICY_KEYS.forEach(settingRepository::deleteByName); + //保存 + List list = passwordPolicyConverter + .passwordPolicySaveParamConvertToEntity(param); + Boolean save = settingRepository.saveConfig(list); + //refresh + ApplicationContextHelp.refresh(ConfigBeanNameConstants.DEFAULT_PASSWORD_POLICY_MANAGER); + return save; + } + + /** + * 获取系统弱密码库 + * + * @return {@link WeakPasswordLibListResult} + */ + @Override + public List getWeakPasswordLibList() { + List results = new ArrayList<>(); + List list = passwordWeakLib.getWordList(); + for (String value : list) { + results.add(new WeakPasswordLibListResult(value)); + } + return results; + } + + /** + * 密码规则转换器 + */ + private final PasswordPolicyConverter passwordPolicyConverter; + + /** + * SettingCipherTacticsRepository + */ + private final SettingRepository settingRepository; + + /** + * PasswordWeakLib + */ + private final PasswordWeakLib passwordWeakLib; + + public PasswordPolicyServiceImpl(SettingRepository settingsRepository, + PasswordPolicyConverter passwordPolicyConverter, + SettingRepository settingRepository, + PasswordWeakLib passwordWeakLib) { + super(settingsRepository); + this.passwordPolicyConverter = passwordPolicyConverter; + this.settingRepository = settingRepository; + this.passwordWeakLib = passwordWeakLib; + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/SecuritySettingServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/SecuritySettingServiceImpl.java new file mode 100644 index 00000000..f87e8874 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/SecuritySettingServiceImpl.java @@ -0,0 +1,203 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting.impl; + +import java.util.List; +import java.util.concurrent.Executor; + +import org.springframework.scheduling.annotation.AsyncConfigurer; +import org.springframework.session.Session; +import org.springframework.session.security.SpringSessionBackedSessionRegistry; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.setting.SettingEntity; +import cn.topiam.employee.common.enums.MfaMode; +import cn.topiam.employee.common.repository.setting.SettingRepository; +import cn.topiam.employee.console.converter.setting.SecuritySettingConverter; +import cn.topiam.employee.console.pojo.result.setting.SecurityBasicConfigResult; +import cn.topiam.employee.console.pojo.result.setting.SecurityCaptchaConfigResult; +import cn.topiam.employee.console.pojo.result.setting.SecurityMfaConfigResult; +import cn.topiam.employee.console.pojo.save.setting.SecurityBasicSaveParam; +import cn.topiam.employee.console.pojo.save.setting.SecurityCaptchaSaveParam; +import cn.topiam.employee.console.pojo.save.setting.SecurityMfaSaveParam; +import cn.topiam.employee.console.service.setting.SecuritySettingService; +import cn.topiam.employee.core.security.session.SessionDetails; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import cn.topiam.employee.support.context.ServletContextHelp; +import static cn.topiam.employee.common.constants.ConfigBeanNameConstants.CAPTCHA_VALIDATOR; +import static cn.topiam.employee.common.constants.ConfigBeanNameConstants.DEFAULT_SECURITY_FILTER_CHAIN; +import static cn.topiam.employee.core.setting.constant.MfaSettingConstants.MFA_SETTING_KEYS; +import static cn.topiam.employee.core.setting.constant.SecuritySettingConstants.CAPTCHA_SETTING_NAME; +import static cn.topiam.employee.core.setting.constant.SecuritySettingConstants.SECURITY_BASIC_KEY; + +/** + *

+ * 安全设置表 服务实现类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-10-01 + */ +@Service +public class SecuritySettingServiceImpl extends SettingServiceImpl + implements SecuritySettingService { + + /** + * 获取基础配置 + * + * @return {@link SecurityBasicConfigResult} + */ + @Override + public SecurityBasicConfigResult getBasicConfig() { + //查询数据库配置 + List list = settingRepository.findByNameIn(SECURITY_BASIC_KEY); + return securitySettingConverter.entityConvertToSecurityBasicConfigResult(list); + } + + /** + * 保存基础配置 + * + * @param param {@link SecurityBasicSaveParam} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean saveBasicConfig(SecurityBasicSaveParam param) { + + //删除密码配置 + SECURITY_BASIC_KEY.forEach(settingRepository::deleteByName); + //保存 + List list = securitySettingConverter + .securityBasicSaveParamConvertToEntity(param); + Boolean save = settingRepository.saveConfig(list); + String currentSessionId = ServletContextHelp.getSession().getId(); + //异步下线所有用户(排除当前操作用户) + executor.execute(() -> { + List principals = sessionRegistry.getAllPrincipals(); + principals.forEach(i -> { + if (i instanceof SessionDetails) { + if (!((SessionDetails) i).getSessionId().equals(currentSessionId)) { + sessionRegistry + .removeSessionInformation(((SessionDetails) i).getSessionId()); + } + } + }); + }); + // refresh + ApplicationContextHelp.refresh(DEFAULT_SECURITY_FILTER_CHAIN); + return save; + } + + /** + * 获取验证码配置 + * + * @return {@link SecurityCaptchaConfigResult} + */ + @Override + public SecurityCaptchaConfigResult getCaptchaProviderConfig() { + //查询数据库配置 + SettingEntity entity = settingRepository.findByName(CAPTCHA_SETTING_NAME); + return securitySettingConverter.entityConvertToSecurityCaptchaConfigResult(entity); + } + + /** + * 保存行为验证码 + * + * @param param {@link SecurityCaptchaSaveParam} + * @return {@link Boolean} + */ + @Override + public Boolean saveCaptchaProviderConfig(SecurityCaptchaSaveParam param) { + //保存 + List list = securitySettingConverter + .securityCaptchaSaveParamConvertToEntity(param); + settingRepository.saveConfig(list); + //refresh + ApplicationContextHelp.refresh(CAPTCHA_VALIDATOR); + return true; + } + + /** + * 禁用行为验证码 + * + * @return {@link Boolean} + */ + @Override + public Boolean disableCaptchaProvider() { + Boolean setting = removeSetting(CAPTCHA_SETTING_NAME); + // refresh + ApplicationContextHelp.refresh(CAPTCHA_VALIDATOR); + return setting; + } + + /** + * 获取MFA配置 + * + * @return {@link SecurityMfaConfigResult} + */ + @Override + public SecurityMfaConfigResult getMfaConfig() { + //查询数据库配置 + List list = settingRepository.findByNameIn(MFA_SETTING_KEYS); + return securitySettingConverter.entityConvertToSecurityMfaConfigResult(list); + } + + /** + * 保存MFA + * + * @param param {@link SecurityMfaSaveParam} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean saveMfaConfig(SecurityMfaSaveParam param) { + + if (param.getMode().equals(MfaMode.NONE)) { + settingRepository.deleteByNameIn(MFA_SETTING_KEYS); + return true; + } + //保存 + List list = securitySettingConverter + .securityMfaSaveParamConvertToEntity(param); + return settingRepository.saveConfig(list); + } + + /** + * SecurityBasicDataConverter + */ + private final SecuritySettingConverter securitySettingConverter; + + private final SettingRepository settingRepository; + + private final SpringSessionBackedSessionRegistry sessionRegistry; + + private final Executor executor; + + public SecuritySettingServiceImpl(SettingRepository settingsRepository, + SecuritySettingConverter securitySettingConverter, + SettingRepository settingRepository, + SpringSessionBackedSessionRegistry sessionRegistry, + AsyncConfigurer asyncConfigurer) { + super(settingsRepository); + this.securitySettingConverter = securitySettingConverter; + this.settingRepository = settingRepository; + this.sessionRegistry = sessionRegistry; + this.executor = asyncConfigurer.getAsyncExecutor(); + } +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/SettingServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/SettingServiceImpl.java new file mode 100644 index 00000000..71b0f336 --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/SettingServiceImpl.java @@ -0,0 +1,100 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting.impl; + +import java.util.List; +import java.util.Objects; + +import org.springframework.transaction.annotation.Transactional; + +import cn.topiam.employee.common.entity.setting.SettingEntity; +import cn.topiam.employee.common.repository.setting.SettingRepository; +import cn.topiam.employee.console.service.setting.SettingService; +import cn.topiam.employee.support.util.BeanUtils; + +import lombok.AllArgsConstructor; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY; +import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME; + +/** + * 设置impl + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/9 22:29 + */ +@AllArgsConstructor +public class SettingServiceImpl implements SettingService { + /** + * 保存设置 + * + * @param entity {@link SettingEntity} + * @return {@link Boolean} + */ + @Override + public Boolean saveSetting(SettingEntity entity) { + SettingEntity setting = getSetting(entity.getName()); + SettingEntity saveEntity = entity; + // 当前配置存在,更改操作 + if (!Objects.isNull(setting)) { + BeanUtils.merge(entity, setting, LAST_MODIFIED_BY, LAST_MODIFIED_TIME); + saveEntity = setting; + } + settingsRepository.save(saveEntity); + return Boolean.TRUE; + } + + /** + * 根据KEY获取配置 + * + * @param name {@link String} + * @return {@link SettingEntity} + */ + @Override + public SettingEntity getSetting(String name) { + return settingsRepository.findByName(name); + } + + /** + * 根据KEY获取配置 + * + * @param name {@link String} + * @return {@link SettingEntity} + */ + @Override + public List findByNameLike(String name) { + return settingsRepository.findByNameLike(name); + } + + /** + * 移除配置 + * + * @param name {@link String} + * @return {@link Boolean} + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean removeSetting(String name) { + settingsRepository.deleteByName(name); + return Boolean.TRUE; + } + + /** + * SettingRepository + */ + private final SettingRepository settingsRepository; +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/SmsTemplateServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/SmsTemplateServiceImpl.java new file mode 100644 index 00000000..baa3938e --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/SmsTemplateServiceImpl.java @@ -0,0 +1,74 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting.impl; + +import java.util.List; +import java.util.Locale; +import java.util.ResourceBundle; + +import org.springframework.stereotype.Service; + +import com.google.common.collect.Lists; + +import cn.topiam.employee.common.enums.Language; +import cn.topiam.employee.common.enums.SmsType; +import cn.topiam.employee.common.repository.setting.SettingRepository; +import cn.topiam.employee.console.pojo.result.setting.SmsTemplateListResult; +import cn.topiam.employee.console.service.setting.SmsTemplateService; + +/** + *

+ * 短信模版模板 服务实现类 + *

+ * + * @author TopIAM + * Created by support@topiam.cn on 2020-08-13 + */ +@Service +public class SmsTemplateServiceImpl extends SettingServiceImpl implements SmsTemplateService { + + /** + * 获取短信模版列表 + * + * @param language {@link Language} + * @return {@link SmsTemplateListResult} + */ + @Override + public List getSmsTemplateList(Language language) { + ResourceBundle resourceBundle = ResourceBundle.getBundle("sms/template/sms-template", + new Locale(language.getLocale())); + List results = Lists.newArrayList(); + SmsType[] values = SmsType.values(); + + for (SmsType type : values) { + SmsTemplateListResult result = new SmsTemplateListResult(); + String content = resourceBundle.getString(type.getCode()); + result.setContent(content); + result.setType(type); + result.setName(type.getDesc()); + result.setLanguage(Language.getType(resourceBundle.getLocale().getLanguage())); + results.add(result); + } + return results; + } + + public SmsTemplateServiceImpl(SettingRepository settingsRepository) { + super(settingsRepository); + } + +} diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/StorageSettingServiceImpl.java b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/StorageSettingServiceImpl.java new file mode 100644 index 00000000..fc9174bf --- /dev/null +++ b/eiam-console/src/main/java/cn/topiam/employee/console/service/setting/impl/StorageSettingServiceImpl.java @@ -0,0 +1,86 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package cn.topiam.employee.console.service.setting.impl; + +import org.springframework.stereotype.Service; + +import cn.topiam.employee.common.entity.setting.SettingEntity; +import cn.topiam.employee.common.repository.setting.SettingRepository; +import cn.topiam.employee.console.converter.setting.StorageSettingConverter; +import cn.topiam.employee.console.pojo.result.setting.StorageProviderConfigResult; +import cn.topiam.employee.console.pojo.save.setting.StorageConfigSaveParam; +import cn.topiam.employee.console.service.setting.StorageSettingService; +import cn.topiam.employee.support.context.ApplicationContextHelp; +import static cn.topiam.employee.core.setting.constant.StorageProviderSettingConstants.STORAGE_BEAN_NAME; +import static cn.topiam.employee.core.setting.constant.StorageProviderSettingConstants.STORAGE_PROVIDER_KEY; + +/** + * 存储设置接口 + * + * @author TopIAM + * Created by support@topiam.cn on 2021/11/1 21:43 + */ +@Service +public class StorageSettingServiceImpl extends SettingServiceImpl implements StorageSettingService { + + /** + * 更改存储启用禁用 + * + * @return {@link Boolean} + */ + @Override + public Boolean disableStorage() { + removeSetting(STORAGE_PROVIDER_KEY); + // refresh + ApplicationContextHelp.refresh(STORAGE_BEAN_NAME); + return Boolean.TRUE; + } + + /** + * 保存存储配置 + * + * @param param {@link StorageConfigSaveParam} + * @return {@link Boolean} + */ + @Override + public Boolean saveStorageConfig(StorageConfigSaveParam param) { + SettingEntity entity = storageSettingsConverter.storageConfigSaveParamToEntity(param); + Boolean setting = saveSetting(entity); + ApplicationContextHelp.refresh(STORAGE_BEAN_NAME); + return setting; + } + + /** + * 获取存储配置 + * + * @return {@link StorageProviderConfigResult} + */ + @Override + public StorageProviderConfigResult getStorageConfig() { + SettingEntity entity = getSetting(STORAGE_PROVIDER_KEY); + return storageSettingsConverter.entityToStorageProviderConfig(entity); + } + + private final StorageSettingConverter storageSettingsConverter; + + public StorageSettingServiceImpl(SettingRepository settingsRepository, + StorageSettingConverter storageSettingsConverter) { + super(settingsRepository); + this.storageSettingsConverter = storageSettingsConverter; + } +} diff --git a/eiam-console/src/main/resources/application.yml b/eiam-console/src/main/resources/application.yml new file mode 100644 index 00000000..6287ceda --- /dev/null +++ b/eiam-console/src/main/resources/application.yml @@ -0,0 +1,162 @@ +# +# eiam-console - Employee Identity and Access Management Program +# Copyright © 2020-2022 TopIAM (support@topiam.cn) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +# spring +spring: + application: + name: TopIAM 企业数字身份管控平台管理端 + jackson: + #日期格式化 + date-format: "yyyy-MM-dd HH:mm:ss" + #设置空如何序列化 + default-property-inclusion: NON_NULL + deserialization: + #允许对象忽略json中不存在的属性 + fail_on_unknown_properties: false + parser: + #允许出现单引号 + allow_single_quotes: true + #允许出现特殊字符和转义符 + allow_unquoted_control_chars: true + serialization: + #忽略无法转换的对象 + fail_on_empty_beans: false + #格式化输出 + indent_output: true + cache: + type: redis + redis: + key-prefix: 'topiam' + servlet: + multipart: + max-file-size: 50MB + max-request-size: 50MB + session: + redis: + namespace: ${spring.cache.redis.key-prefix}:session + flush-mode: immediate + store-type: redis + datasource: + type: com.zaxxer.hikari.HikariDataSource + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:3306/eiam_develop?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true + username: 'eiam' + password: '' + hikari: + auto-commit: true + connection-test-query: SELECT 1 + connection-timeout: 30000 + idle-timeout: 30000 + max-lifetime: 1800000 + maximum-pool-size: 15 + minimum-idle: 5 + pool-name: eiam + #reids + redis: + host: localhost + port: 6379 + password: '' + database: 9 + lettuce: + pool: + max-idle: 7 + min-idle: 2 + max-active: 7 + max-wait: -1ms + shutdown-timeout: 200ms + timeout: 5000ms + #elasticsearch + elasticsearch: + uris: "http://localhost:9200" + username: "elastic" + password: "" + socket-timeout: 30000s + connection-timeout: 10000s + data: + jpa: + repositories: + bootstrap-mode: deferred + jpa: + hibernate: + ddl-auto: none + show-sql: true + properties: + hibernate: + show_sql: true + format_sql: true + use_sql_comments: true + jdbc: + batch_size: 500 + batch_versioned_data: true + order_inserts: true + types: + print: + banner: false + main: + banner-mode: off +#日志配置 +logging: + config: classpath:config/logback-spring.xml +server: + port: 1898 + shutdown: graceful + #开启压缩 提高响应速度 减少带宽压力 + compression: + enabled: true + mime-types: text/html,text/xml,text/plain,text/css,application/javascript,application/json,image/svg+xml + min-response-size: 1024 + servlet: + session: + cookie: + #dev环境secure=false + secure: false + #dev环境same-site=lax + same-site: lax + name: topiam-employee-console-cookie + http-only: true + encoding: + charset: UTF-8 + #错误处理 + error: + include-stacktrace: always + include-exception: true + include-message: always + include-binding-errors: always + # undertow + undertow: + threads: + io: 32 + worker: 256 + buffer-size: 1024 +# springdoc +springdoc: + swagger-ui: + csrf: + enabled: true + cookie-name: 'topiam-csrf-cookie' + header-name: 'topiam-csrf' + cache: + disabled: true + writer-with-default-pretty-printer: true +#TopIAM +topiam: + server: + console-public-base-url: + portal-public-base-url: + openapi-public-base-url: + synchronizer-public-base-url: \ No newline at end of file diff --git a/eiam-console/src/main/resources/fe/1098.d7361839.async.js b/eiam-console/src/main/resources/fe/1098.d7361839.async.js new file mode 100644 index 00000000..d8e3baf8 --- /dev/null +++ b/eiam-console/src/main/resources/fe/1098.d7361839.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[1098],{28058:function(V,T,r){r.d(T,{Z:function(){return o}});var d=r(1413),M=r(67294),f={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"},O=f,h=r(84089),n=function(C,R){return M.createElement(h.Z,(0,d.Z)((0,d.Z)({},C),{},{ref:R,icon:O}))};n.displayName="WarningOutlined";var o=M.forwardRef(n)},31199:function(V,T,r){var d=r(1413),M=r(91),f=r(85893),O=r(67294),h=r(7772),n=["fieldProps","min","proFieldProps","max"],o=function(C,R){var Z=C.fieldProps,D=C.min,p=C.proFieldProps,s=C.max,t=(0,M.Z)(C,n);return(0,f.jsx)(h.Z,(0,d.Z)({valueType:"digit",fieldProps:(0,d.Z)({min:D,max:s},Z),ref:R,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:p},t))};T.Z=O.forwardRef(o)},86615:function(V,T,r){var d=r(1413),M=r(91),f=r(85893),O=r(22270),h=r(78045),n=r(67294),o=r(90789),g=r(7772),C=["fieldProps","options","radioType","layout","proFieldProps","valueEnum"],R=n.forwardRef(function(s,t){var W=s.fieldProps,F=s.options,I=s.radioType,A=s.layout,x=s.proFieldProps,m=s.valueEnum,L=(0,M.Z)(s,C);return(0,f.jsx)(g.Z,(0,d.Z)((0,d.Z)({valueType:I==="button"?"radioButton":"radio",ref:t,valueEnum:(0,O.h)(m,void 0)},L),{},{fieldProps:(0,d.Z)({options:F,layout:A},W),proFieldProps:x,filedConfig:{customLightMode:!0}}))}),Z=n.forwardRef(function(s,t){var W=s.fieldProps,F=s.children;return(0,f.jsx)(h.ZP,(0,d.Z)((0,d.Z)({},W),{},{ref:t,children:F}))}),D=(0,o.G)(Z,{valuePropName:"checked",ignoreWidth:!0}),p=D;p.Group=R,p.Button=h.ZP.Button,p.displayName="ProFormComponent",T.Z=p},64317:function(V,T,r){var d=r(1413),M=r(91),f=r(85893),O=r(22270),h=r(67294),n=r(66758),o=r(7772),g=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],C=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],R=h.forwardRef(function(t,W){var F=t.fieldProps,I=t.children,A=t.params,x=t.proFieldProps,m=t.mode,L=t.valueEnum,z=t.request,G=t.showSearch,$=t.options,w=(0,M.Z)(t,g),N=(0,h.useContext)(n.Z);return(0,f.jsx)(o.Z,(0,d.Z)((0,d.Z)({valueEnum:(0,O.h)(L),request:z,params:A,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,d.Z)({options:$,mode:m,showSearch:G,getPopupContainer:N.getPopupContainer},F),ref:W,proFieldProps:x},w),{},{children:I}))}),Z=h.forwardRef(function(t,W){var F=t.fieldProps,I=t.children,A=t.params,x=t.proFieldProps,m=t.mode,L=t.valueEnum,z=t.request,G=t.options,$=(0,M.Z)(t,C),w=(0,d.Z)({options:G,mode:m||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},F),N=(0,h.useContext)(n.Z);return(0,f.jsx)(o.Z,(0,d.Z)((0,d.Z)({valueEnum:(0,O.h)(L),request:z,params:A,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,d.Z)({getPopupContainer:N.getPopupContainer},w),ref:W,proFieldProps:x},$),{},{children:I}))}),D=R,p=Z,s=D;s.SearchSelect=p,s.displayName="ProFormComponent",T.Z=s},52688:function(V,T,r){var d=r(1413),M=r(91),f=r(85893),O=r(67294),h=r(7772),n=["fieldProps","unCheckedChildren","checkedChildren","proFieldProps"],o=O.forwardRef(function(g,C){var R=g.fieldProps,Z=g.unCheckedChildren,D=g.checkedChildren,p=g.proFieldProps,s=(0,M.Z)(g,n);return(0,f.jsx)(h.Z,(0,d.Z)({valueType:"switch",fieldProps:(0,d.Z)({unCheckedChildren:Z,checkedChildren:D},R),ref:C,valuePropName:"checked",proFieldProps:p,filedConfig:{valuePropName:"checked",ignoreWidth:!0}},s))});T.Z=o},5966:function(V,T,r){var d=r(1413),M=r(91),f=r(85893),O=r(7772),h=["fieldProps","proFieldProps"],n=["fieldProps","proFieldProps"],o="text",g=function(D){var p=D.fieldProps,s=D.proFieldProps,t=(0,M.Z)(D,h);return(0,f.jsx)(O.Z,(0,d.Z)({valueType:o,fieldProps:p,filedConfig:{valueType:o},proFieldProps:s},t))},C=function(D){var p=D.fieldProps,s=D.proFieldProps,t=(0,M.Z)(D,n);return(0,f.jsx)(O.Z,(0,d.Z)({valueType:"password",fieldProps:p,proFieldProps:s,filedConfig:{valueType:o}},t))},R=g;R.Password=C,R.displayName="ProFormComponent",T.Z=R},50727:function(V,T,r){var d=r(4942),M=r(97685),f=r(91),O=r(74165),h=r(15861),n=r(1413),o=r(85893),g=r(24969),C=r(97462),R=r(952),Z=r(73964),D=r(26369),p=r(22270),s=r(48171),t=r(60249),W=r(71577),F=r(43825),I=r(60869),A=r(94787),x=r(20059),m=r(67294),L=r(1914),z=["onTableChange","maxLength","formItemProps","recordCreatorProps","rowKey","controlled","defaultValue","onChange","editableFormRef"],G=["record","position","creatorButtonText","newRecordType","parentKey","style"],$=m.createContext(void 0);function w(e){var B=e.children,H=e.record,re=e.position,ne=e.newRecordType,J=e.parentKey,X=(0,m.useContext)($);return m.cloneElement(B,(0,n.Z)((0,n.Z)({},B.props),{},{onClick:function(){var Y=(0,h.Z)((0,O.Z)().mark(function oe(te){var k,q,y,U;return(0,O.Z)().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,(k=(q=B.props).onClick)===null||k===void 0?void 0:k.call(q,te);case 2:if(U=E.sent,U!==!1){E.next=5;break}return E.abrupt("return");case 5:X==null||(y=X.current)===null||y===void 0||y.addEditRecord(H,{position:re,newRecordType:ne,parentKey:J});case 6:case"end":return E.stop()}},oe)}));function b(oe){return Y.apply(this,arguments)}return b}()}))}function N(e){var B,H,re=(0,Z.YB)(),ne=e.onTableChange,J=e.maxLength,X=e.formItemProps,Y=e.recordCreatorProps,b=e.rowKey,oe=e.controlled,te=e.defaultValue,k=e.onChange,q=e.editableFormRef,y=(0,f.Z)(e,z),U=(0,D.D)(e.value),ee=(0,m.useRef)(),E=(0,m.useRef)();(0,m.useImperativeHandle)(y.actionRef,function(){return ee.current});var ce=(0,I.Z)(function(){return e.value||te||[]},{value:e.value,onChange:e.onChange}),se=(0,M.Z)(ce,2),_=se[0],Pe=se[1],j=m.useMemo(function(){return typeof b=="function"?b:function(c,a){return c[b]||a}},[b]),_e=function(a){if(typeof a=="number"&&!e.name){if(a>=_.length)return a;var l=_&&_[a];return j==null?void 0:j(l,a)}if((typeof a=="string"||a>=_.length)&&e.name){var i=_.findIndex(function(u,v){var P;return(j==null||(P=j(u,v))===null||P===void 0?void 0:P.toString())===(a==null?void 0:a.toString())});return i}return a};(0,m.useImperativeHandle)(q,function(){var c=function(i){var u,v;if(i==null)throw new Error("rowIndex is required");var P=_e(i),K=[e.name,(u=P==null?void 0:P.toString())!==null&&u!==void 0?u:""].flat(1).filter(Boolean);return(v=E.current)===null||v===void 0?void 0:v.getFieldValue(K)},a=function(){var i,u=[e.name].flat(1).filter(Boolean);if(Array.isArray(u)&&u.length===0){var v,P=(v=E.current)===null||v===void 0?void 0:v.getFieldsValue();return Array.isArray(P)?P:Object.keys(P).map(function(K){return P[K]})}return(i=E.current)===null||i===void 0?void 0:i.getFieldValue(u)};return(0,n.Z)((0,n.Z)({},E.current),{},{getRowData:c,getRowsData:a,setRowData:function(i,u){var v,P,K,ie;if(i==null)throw new Error("rowIndex is required");var de=_e(i),Oe=[e.name,(v=de==null?void 0:de.toString())!==null&&v!==void 0?v:""].flat(1).filter(Boolean),ge=((P=E.current)===null||P===void 0||(K=P.getFieldsValue)===null||K===void 0?void 0:K.call(P))||{},Re=(0,x.Z)(ge,Oe,(0,n.Z)((0,n.Z)({},c(i)),u||{}));return(ie=E.current)===null||ie===void 0||ie.setFieldsValue(Re),!0}})}),(0,m.useEffect)(function(){!e.controlled||_.forEach(function(c,a){var l;(l=E.current)===null||l===void 0||l.setFieldsValue((0,d.Z)({},j(c,a),c))},{})},[_,e.controlled]),(0,m.useEffect)(function(){if(e.name){var c;E.current=e==null||(c=e.editable)===null||c===void 0?void 0:c.form}},[(B=e.editable)===null||B===void 0?void 0:B.form,e.name]);var S=Y||{},me=S.record,ae=S.position,Ee=S.creatorButtonText,fe=S.newRecordType,he=S.parentKey,Ce=S.style,De=(0,f.Z)(S,G),ve=ae==="top",Q=(0,m.useMemo)(function(){return J&&J<=(_==null?void 0:_.length)?!1:Y!==!1&&(0,o.jsx)(w,{record:(0,p.h)(me,_==null?void 0:_.length,_)||{},position:ae,parentKey:(0,p.h)(he,_==null?void 0:_.length,_),newRecordType:fe,children:(0,o.jsx)(W.Z,(0,n.Z)((0,n.Z)({type:"dashed",style:(0,n.Z)({display:"block",margin:"10px 0",width:"100%"},Ce),icon:(0,o.jsx)(g.Z,{})},De),{},{children:Ee||re.getMessage("editableTable.action.add","\u6DFB\u52A0\u4E00\u884C\u6570\u636E")}))})},[Y,J,_==null?void 0:_.length]),pe=(0,m.useMemo)(function(){return Q?ve?{components:{header:{wrapper:function(a){var l,i=a.className,u=a.children;return(0,o.jsxs)("thead",{className:i,children:[u,(0,o.jsxs)("tr",{style:{position:"relative"},children:[(0,o.jsx)("td",{colSpan:0,style:{visibility:"hidden"},children:Q}),(0,o.jsx)("td",{style:{position:"absolute",left:0,width:"100%"},colSpan:(l=y.columns)===null||l===void 0?void 0:l.length,children:Q})]})]})}}}}:{tableViewRender:function(a,l){var i,u;return(0,o.jsxs)(o.Fragment,{children:[(i=(u=e.tableViewRender)===null||u===void 0?void 0:u.call(e,a,l))!==null&&i!==void 0?i:l,Q]})}}:{}},[ve,Q]),le=(0,n.Z)({},e.editable),Me=(0,s.J)(function(c,a){var l,i,u;if((l=e.editable)===null||l===void 0||(i=l.onValuesChange)===null||i===void 0||i.call(l,c,a),(u=e.onValuesChange)===null||u===void 0||u.call(e,a,c),e.controlled){var v;e==null||(v=e.onChange)===null||v===void 0||v.call(e,a)}});return((e==null?void 0:e.onValuesChange)||((H=e.editable)===null||H===void 0?void 0:H.onValuesChange)||e.controlled&&(e==null?void 0:e.onChange))&&(le.onValuesChange=Me),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)($.Provider,{value:ee,children:(0,o.jsx)(L.Z,(0,n.Z)((0,n.Z)((0,n.Z)({search:!1,options:!1,pagination:!1,rowKey:b,revalidateOnFocus:!1},y),pe),{},{tableLayout:"fixed",actionRef:ee,onChange:ne,editable:(0,n.Z)((0,n.Z)({},le),{},{formProps:(0,n.Z)({formRef:E},le.formProps)}),dataSource:_,onDataSourceChange:function(a){if(Pe(a),e.name&&ae==="top"){var l,i=(0,x.Z)({},[e.name].flat(1).filter(Boolean),a);(l=E.current)===null||l===void 0||l.setFieldsValue(i)}}}))}),e.name?(0,o.jsx)(C.Z,{name:[e.name],children:function(a){var l,i,u=(0,A.default)(a,[e.name].flat(1)),v=u==null?void 0:u.find(function(P,K){return!(0,t.A)(P,U==null?void 0:U[K])});return v&&U&&(e==null||(l=e.editable)===null||l===void 0||(i=l.onValuesChange)===null||i===void 0||i.call(l,v,u)),null}}):null]})}function ue(e){var B=R.ZP.useFormInstance();return e.name?(0,o.jsx)(F.Z.Item,(0,n.Z)((0,n.Z)({style:{maxWidth:"100%"}},e==null?void 0:e.formItemProps),{},{name:e.name,children:(0,o.jsx)(N,(0,n.Z)((0,n.Z)({},e),{},{editable:(0,n.Z)((0,n.Z)({},e.editable),{},{form:B})}))})):(0,o.jsx)(N,(0,n.Z)({},e))}ue.RecordCreator=w,T.Z=ue}}]); diff --git a/eiam-console/src/main/resources/fe/1158.74b40769.async.js b/eiam-console/src/main/resources/fe/1158.74b40769.async.js new file mode 100644 index 00000000..7d46d3e4 --- /dev/null +++ b/eiam-console/src/main/resources/fe/1158.74b40769.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[1158],{51158:function(qe,oe,c){c.d(oe,{ZM:function(){return T},ZP:function(){return Le}});var J=c(74902),I=c(87462),t=c(4942),A=c(97685),se=c(71002),de=c(94184),$=c.n(de),a=c(67294),w=c(53124),me=c(88258),ce=c(92820),ge=c(25378),pe=c(18749),fe=c(57953),Y=c(24308),ue=c(21584),ve=c(96159),Q=function(r,e){var d={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(d[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(r);o1},G=function(){return P==="vertical"?!!s:!z()},Z=C("list",n),L=l&&l.length>0&&a.createElement("ul",{className:Z+"-item-action",key:"actions"},l.map(function(S,y){return a.createElement("li",{key:Z+"-item-action-"+y},S,y!==l.length-1&&a.createElement("em",{className:Z+"-item-action-split"}))})),M=u?"div":"li",B=a.createElement(M,(0,I.Z)({},x,u?{}:{ref:d},{className:$()(Z+"-item",(0,t.Z)({},Z+"-item-no-flex",!G()),m)}),P==="vertical"&&s?[a.createElement("div",{className:Z+"-item-main",key:"content"},o,L),a.createElement("div",{className:Z+"-item-extra",key:"extra"},s)]:[o,L,(0,ve.Tm)(s,{key:"extra"})]);return u?a.createElement(ue.Z,{ref:d,flex:1,style:i},B):B},U=(0,a.forwardRef)(Se);U.Meta=xe;var he=U,Ze=c(67968),ye=c(45503),Ce=c(14747),Ee=function(e){var d,n,o=e.listBorderedCls,l=e.componentCls,s=e.paddingLG,m=e.margin,i=e.padding,x=e.listItemPaddingSM,f=e.marginLG,u=e.borderRadiusLG;return n={},(0,t.Z)(n,""+o,(d={border:e.lineWidth+"px "+e.lineType+" "+e.colorBorder,borderRadius:u},(0,t.Z)(d,l+"-header,"+l+"-footer,"+l+"-item",{paddingInline:s}),(0,t.Z)(d,l+"-pagination",{margin:m+"px "+f+"px"}),d)),(0,t.Z)(n,""+o+l+"-sm",(0,t.Z)({},l+"-item,"+l+"-header,"+l+"-footer",{padding:x})),(0,t.Z)(n,""+o+l+"-lg",(0,t.Z)({},l+"-item,"+l+"-header,"+l+"-footer",{padding:i+"px "+s+"px"})),n},Ie=function(e){var d,n,o,l,s=e.componentCls,m=e.screenSM,i=e.screenMD,x=e.marginLG,f=e.marginSM,u=e.margin;return l={},(0,t.Z)(l,"@media screen and (max-width:"+i+")",(d={},(0,t.Z)(d,""+s,(0,t.Z)({},s+"-item",(0,t.Z)({},s+"-item-action",{marginInlineStart:x}))),(0,t.Z)(d,s+"-vertical",(0,t.Z)({},s+"-item",(0,t.Z)({},s+"-item-extra",{marginInlineStart:x}))),d)),(0,t.Z)(l,"@media screen and (max-width: "+m+")",(o={},(0,t.Z)(o,""+s,(0,t.Z)({},s+"-item",(0,t.Z)({flexWrap:"wrap"},s+"-action",{marginInlineStart:f}))),(0,t.Z)(o,s+"-vertical",(0,t.Z)({},s+"-item",(n={flexWrap:"wrap-reverse"},(0,t.Z)(n,s+"-item-main",{minWidth:e.contentWidth}),(0,t.Z)(n,s+"-item-extra",{margin:"auto auto "+u+"px"}),n))),o)),l},Pe=function(e){var d,n,o,l,s,m,i=e.componentCls,x=e.antCls,f=e.controlHeight,u=e.minHeight,P=e.paddingSM,p=e.marginLG,C=e.padding,z=e.listItemPadding,G=e.colorPrimary,Z=e.listItemPaddingSM,L=e.listItemPaddingLG,M=e.paddingXS,B=e.margin,S=e.colorText,y=e.colorTextDescription,H=e.motionDurationSlow,D=e.lineWidth;return m={},(0,t.Z)(m,""+i,(0,I.Z)((0,I.Z)({},(0,Ce.Wf)(e)),(l={position:"relative","*":{outline:"none"}},(0,t.Z)(l,i+"-header, "+i+"-footer",{background:"transparent",paddingBlock:P}),(0,t.Z)(l,i+"-pagination",(0,t.Z)({marginBlockStart:p,textAlign:"end"},x+"-pagination-options",{textAlign:"start"})),(0,t.Z)(l,i+"-spin",{minHeight:u,textAlign:"center"}),(0,t.Z)(l,i+"-items",{margin:0,padding:0,listStyle:"none"}),(0,t.Z)(l,i+"-item",(o={display:"flex",alignItems:"center",justifyContent:"space-between",padding:z,color:S},(0,t.Z)(o,i+"-item-meta",(d={display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%"},(0,t.Z)(d,i+"-item-meta-avatar",{marginInlineEnd:C}),(0,t.Z)(d,i+"-item-meta-content",{flex:"1 0",width:0,color:S}),(0,t.Z)(d,i+"-item-meta-title",{marginBottom:e.marginXXS,color:S,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":(0,t.Z)({color:S,transition:"all "+H},"&:hover",{color:G})}),(0,t.Z)(d,i+"-item-meta-description",{color:y,fontSize:e.fontSize,lineHeight:e.lineHeight}),d)),(0,t.Z)(o,i+"-item-action",(n={flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none"},(0,t.Z)(n,"& > li",(0,t.Z)({position:"relative",display:"inline-block",padding:"0 "+M+"px",color:y,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center"},"&:first-child",{paddingInlineStart:0})),(0,t.Z)(n,i+"-item-action-split",{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:D,height:Math.ceil(e.fontSize*e.lineHeight)-e.marginXXS*2,transform:"translateY(-50%)",backgroundColor:e.colorSplit}),n)),o)),(0,t.Z)(l,i+"-empty",{padding:C+"px 0",color:y,fontSize:e.fontSizeSM,textAlign:"center"}),(0,t.Z)(l,i+"-empty-text",{padding:C,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"}),(0,t.Z)(l,i+"-item-no-flex",{display:"block"}),l))),(0,t.Z)(m,i+"-grid "+x+"-col > "+i+"-item",{display:"block",maxWidth:"100%",marginBlockEnd:B,paddingBlock:0,borderBlockEnd:"none"}),(0,t.Z)(m,i+"-vertical "+i+"-item",(s={alignItems:"initial"},(0,t.Z)(s,i+"-item-main",{display:"block",flex:1}),(0,t.Z)(s,i+"-item-extra",{marginInlineStart:p}),(0,t.Z)(s,i+"-item-meta",(0,t.Z)({marginBlockEnd:C},i+"-item-meta-title",{marginBlockEnd:P,color:S,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG})),(0,t.Z)(s,i+"-item-action",{marginBlockStart:C,marginInlineStart:"auto","> li":(0,t.Z)({padding:"0 "+C+"px"},"&:first-child",{paddingInlineStart:0})}),s)),(0,t.Z)(m,i+"-split "+i+"-item",(0,t.Z)({borderBlockEnd:e.lineWidth+"px "+e.lineType+" "+e.colorSplit},"&:last-child",{borderBlockEnd:"none"})),(0,t.Z)(m,i+"-split "+i+"-header",{borderBlockEnd:e.lineWidth+"px "+e.lineType+" "+e.colorSplit}),(0,t.Z)(m,i+"-split"+i+"-empty "+i+"-footer",{borderTop:e.lineWidth+"px "+e.lineType+" "+e.colorSplit}),(0,t.Z)(m,i+"-loading "+i+"-spin-nested-loading",{minHeight:f}),(0,t.Z)(m,i+"-split"+i+"-something-after-last-item "+x+"-spin-container > "+i+"-items > "+i+"-item:last-child",{borderBlockEnd:e.lineWidth+"px "+e.lineType+" "+e.colorSplit}),(0,t.Z)(m,i+"-lg "+i+"-item",{padding:L}),(0,t.Z)(m,i+"-sm "+i+"-item",{padding:Z}),(0,t.Z)(m,i+":not("+i+"-vertical)",(0,t.Z)({},i+"-item-no-flex",(0,t.Z)({},i+"-item-action",{float:"right"}))),m},be=(0,Ze.Z)("List",function(r){var e=(0,ye.TS)(r,{listBorderedCls:r.componentCls+"-bordered",minHeight:r.controlHeightLG,listItemPadding:r.paddingContentVertical+"px "+r.paddingContentHorizontalLG+"px",listItemPaddingSM:r.paddingContentVerticalSM+"px "+r.paddingContentHorizontal+"px",listItemPaddingLG:r.paddingContentVerticalLG+"px "+r.paddingContentHorizontalLG+"px"});return[Pe(e),Ee(e),Ie(e)]},{contentWidth:220}),ze=function(r,e){var d={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(d[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(r);one&&(E.current=ne);var re=n?a.createElement("div",{className:v+"-pagination"},a.createElement(pe.Z,(0,I.Z)({},E,{onChange:Ae,onShowSizeChange:$e}))):null,V=(0,J.Z)(z);n&&z.length>(E.current-1)*E.pageSize&&(V=(0,J.Z)(z).splice((E.current-1)*E.pageSize,E.pageSize));var Ye=Object.keys(p||{}).some(function(g){return["xs","sm","md","lg","xl","xxl"].includes(g)}),ae=(0,ge.Z)(Ye),R=a.useMemo(function(){for(var g=0;g0){var le=V.map(function(g,h){return we(g,h)});K=p?a.createElement(ce.Z,{gutter:p.gutter},a.Children.map(le,function(g){return a.createElement("div",{key:g==null?void 0:g.key,style:Qe},g)})):a.createElement("ul",{className:v+"-items"},le)}else!f&&!F&&(K=Xe(v,We||me.Z));var j=E.position||"bottom",Ue=a.useMemo(function(){return{grid:p,itemLayout:u}},[JSON.stringify(p),u]);return Ve(a.createElement(T.Provider,{value:Ue},a.createElement("div",(0,I.Z)({className:Je},D),(j==="top"||j==="both")&&re,Z&&a.createElement("div",{className:v+"-header"},Z),a.createElement(fe.Z,(0,I.Z)({},O),K,f),L&&a.createElement("div",{className:v+"-footer"},L),P||(j==="bottom"||j==="both")&&re)))}q.Item=he;var Le=q}}]); diff --git a/eiam-console/src/main/resources/fe/137.d372bd41.async.js b/eiam-console/src/main/resources/fe/137.d372bd41.async.js new file mode 100644 index 00000000..9c507cf3 --- /dev/null +++ b/eiam-console/src/main/resources/fe/137.d372bd41.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[137],{137:function(or,de,v){v.d(de,{$C:function(){return Xe},AG:function(){return Ke},B9:function(){return De},Cj:function(){return er},Dx:function(){return ze},EJ:function(){return sr},FV:function(){return $e},GX:function(){return Be},Iw:function(){return Je},K8:function(){return He},NK:function(){return xe},Nq:function(){return Le},PR:function(){return Oe},QA:function(){return ur},QV:function(){return Se},S4:function(){return Me},SN:function(){return Ve},Xu:function(){return we},Yi:function(){return be},Zy:function(){return qe},_p:function(){return nr},bh:function(){return Fe},eE:function(){return Re},eU:function(){return ar},gD:function(){return Ze},jA:function(){return tr},kX:function(){return Ge},lE:function(){return Te},lu:function(){return Ie},lz:function(){return rr},mB:function(){return ve},mo:function(){return ir},mz:function(){return je},nv:function(){return Qe},qD:function(){return We},qb:function(){return Ue},r4:function(){return Pe},re:function(){return ke},rl:function(){return ye},rn:function(){return Ye},w0:function(){return Ee},wZ:function(){return Ce},wk:function(){return Ne},xc:function(){return Ae},z3:function(){return ge}});var _e=v(11281),m=v.n(_e),me=v(97983),u=v.n(me),fe=v(40794),s=v.n(fe),f=v(25191),he=v(80129),pe=v.n(he),o=v(98971);function ve(){return g.apply(this,arguments)}function g(){return g=s()(u()().mark(function n(){return u()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,o.request)("/api/organization/get_root"));case 1:case"end":return a.stop()}},n)})),g.apply(this,arguments)}function ge(n){return y.apply(this,arguments)}function y(){return y=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/organization/get_child",{params:{parentId:t}}));case 1:case"end":return e.stop()}},n)})),y.apply(this,arguments)}function ye(n){return w.apply(this,arguments)}function w(){return w=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/organization/filter_tree",{params:{keyWord:t}}));case 1:case"end":return e.stop()}},n)})),w.apply(this,arguments)}function we(n){return b.apply(this,arguments)}function b(){return b=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/organization/get/".concat(t)));case 1:case"end":return e.stop()}},n)})),b.apply(this,arguments)}function be(n){return $.apply(this,arguments)}function $(){return $=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/organization/create",{method:"POST",requestType:"json",data:t}));case 1:case"end":return e.stop()}},n)})),$.apply(this,arguments)}function $e(n){return E.apply(this,arguments)}function E(){return E=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/organization/update",{method:"PUT",requestType:"json",data:t}));case 1:case"end":return e.stop()}},n)})),E.apply(this,arguments)}function Ee(n){return U.apply(this,arguments)}function U(){return U=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/organization/delete/".concat(t),{method:"DELETE"}));case 1:case"end":return e.stop()}},n)})),U.apply(this,arguments)}function Ue(n,t){return T.apply(this,arguments)}function T(){return T=s()(u()().mark(function n(t,a){return u()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,o.request)("/api/organization/move",{params:{id:t,parentId:a},method:"PUT"}));case 1:case"end":return l.stop()}},n)})),T.apply(this,arguments)}function Te(n,t,a){return P.apply(this,arguments)}function P(){return P=s()(u()().mark(function n(t,a,e){return u()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,o.request)("/api/user/list",{params:m()(m()(m()({},t),(0,f.YE)(a)),(0,f.oH)(e))}).then(function(r){var c,p,d,_,h={data:r!=null&&(c=r.result)!==null&&c!==void 0&&c.list?r==null||(p=r.result)===null||p===void 0?void 0:p.list:[],success:r==null?void 0:r.success,total:r!=null&&(d=r.result)!==null&&d!==void 0&&d.pagination?r==null||(_=r.result)===null||_===void 0?void 0:_.pagination.total:0};return Promise.resolve(h)}));case 1:case"end":return i.stop()}},n)})),P.apply(this,arguments)}function Pe(n){return I.apply(this,arguments)}function I(){return I=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/user/create",{method:"POST",requestType:"json",data:t}));case 1:case"end":return e.stop()}},n)})),I.apply(this,arguments)}function Ie(n,t,a){return q.apply(this,arguments)}function q(){return q=s()(u()().mark(function n(t,a,e){return u()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,o.request)("/api/user/login_audit/list",{method:"GET",params:m()(m()(m()({},t),(0,f.YE)(a)),(0,f.oH)(e))}).then(function(r){var c,p,d,_,h={data:r!=null&&(c=r.result)!==null&&c!==void 0&&c.list?r==null||(p=r.result)===null||p===void 0?void 0:p.list:[],success:r==null?void 0:r.success,total:r!=null&&(d=r.result)!==null&&d!==void 0&&d.pagination?r==null||(_=r.result)===null||_===void 0?void 0:_.pagination.total:0};return Promise.resolve(h)}));case 1:case"end":return i.stop()}},n)})),q.apply(this,arguments)}function qe(n){return k.apply(this,arguments)}function k(){return k=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/user/idp_bind",{method:"GET",params:m()({},t)}).then(function(l){var i={data:l!=null&&l.result?l==null?void 0:l.result:[],success:l==null?void 0:l.success};return Promise.resolve(i)}));case 1:case"end":return e.stop()}},n)})),k.apply(this,arguments)}function ke(n){return S.apply(this,arguments)}function S(){return S=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/user/unbind_idp",{method:"DELETE",params:{id:t}}));case 1:case"end":return e.stop()}},n)})),S.apply(this,arguments)}function lr(n,t){return O.apply(this,arguments)}function O(){return O=_asyncToGenerator(_regeneratorRuntime().mark(function n(t,a){return _regeneratorRuntime().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",request("/api/user/transfer",{method:"PUT",params:{userId:t,orgId:a}}));case 1:case"end":return l.stop()}},n)})),O.apply(this,arguments)}function Se(n){return L.apply(this,arguments)}function L(){return L=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/user/reset_password",{method:"PUT",data:t}));case 1:case"end":return e.stop()}},n)})),L.apply(this,arguments)}function Oe(n){return G.apply(this,arguments)}function G(){return G=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/user/get/".concat(t),{method:"GET"}));case 1:case"end":return e.stop()}},n)})),G.apply(this,arguments)}function Le(n){return j.apply(this,arguments)}function j(){return j=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/user/update",{method:"PUT",requestType:"json",data:t}));case 1:case"end":return e.stop()}},n)})),j.apply(this,arguments)}function Ge(n){return z.apply(this,arguments)}function z(){return z=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/user/delete/".concat(t),{method:"DELETE"}));case 1:case"end":return e.stop()}},n)})),z.apply(this,arguments)}function cr(n){return D.apply(this,arguments)}function D(){return D=_asyncToGenerator(_regeneratorRuntime().mark(function n(t){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/api/user/resign/".concat(t),{method:"DELETE"}));case 1:case"end":return e.stop()}},n)})),D.apply(this,arguments)}function je(n,t,a){return R.apply(this,arguments)}function R(){return R=s()(u()().mark(function n(t,a,e){return u()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,o.request)("/api/user/param_check",{params:{id:e,type:t,value:a},method:"GET"}));case 1:case"end":return i.stop()}},n)})),R.apply(this,arguments)}function ze(n){return M.apply(this,arguments)}function M(){return M=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/user/enable/".concat(t),{method:"PUT"}));case 1:case"end":return e.stop()}},n)})),M.apply(this,arguments)}function De(n){return C.apply(this,arguments)}function C(){return C=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/user/disable/".concat(t),{method:"PUT"}));case 1:case"end":return e.stop()}},n)})),C.apply(this,arguments)}function Re(n,t,a){return A.apply(this,arguments)}function A(){return A=s()(u()().mark(function n(t,a,e){return u()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,o.request)("/api/user/notin_group_list",{params:m()(m()(m()({},t),(0,f.YE)(a)),(0,f.oH)(e))}).then(function(r){var c,p,d,_,h={data:r!=null&&(c=r.result)!==null&&c!==void 0&&c.list?r==null||(p=r.result)===null||p===void 0?void 0:p.list:[],success:r==null?void 0:r.success,total:r!=null&&(d=r.result)!==null&&d!==void 0&&d.pagination?r==null||(_=r.result)===null||_===void 0?void 0:_.pagination.total:0};return Promise.resolve(h)}));case 1:case"end":return i.stop()}},n)})),A.apply(this,arguments)}function Me(n,t,a){return B.apply(this,arguments)}function B(){return B=s()(u()().mark(function n(t,a,e){return u()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,o.request)("/api/user_group/list",{params:m()(m()(m()({},t),(0,f.YE)(a)),(0,f.oH)(e))}).then(function(r){var c,p,d,_,h={data:r!=null&&(c=r.result)!==null&&c!==void 0&&c.list?r==null||(p=r.result)===null||p===void 0?void 0:p.list:[],success:r==null?void 0:r.success,total:r!=null&&(d=r.result)!==null&&d!==void 0&&d.pagination?r==null||(_=r.result)===null||_===void 0?void 0:_.pagination.total:0};return Promise.resolve(h)}));case 1:case"end":return i.stop()}},n)})),B.apply(this,arguments)}function Ce(n){return K.apply(this,arguments)}function K(){return K=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/user_group/create",{method:"POST",requestType:"json",data:t}));case 1:case"end":return e.stop()}},n)})),K.apply(this,arguments)}function Ae(n){return H.apply(this,arguments)}function H(){return H=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/user_group/get/".concat(t),{method:"GET"}));case 1:case"end":return e.stop()}},n)})),H.apply(this,arguments)}function Be(n){return W.apply(this,arguments)}function W(){return W=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/user_group/update",{method:"PUT",requestType:"json",data:t}));case 1:case"end":return e.stop()}},n)})),W.apply(this,arguments)}function Ke(n){return Y.apply(this,arguments)}function Y(){return Y=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/user_group/delete/".concat(t),{method:"DELETE"}));case 1:case"end":return e.stop()}},n)})),Y.apply(this,arguments)}function He(n,t){return N.apply(this,arguments)}function N(){return N=s()(u()().mark(function n(t,a){return u()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,o.request)("/api/user_group/remove_member/".concat(t),{params:{userId:a},method:"DELETE"}));case 1:case"end":return l.stop()}},n)})),N.apply(this,arguments)}function We(n,t){return V.apply(this,arguments)}function V(){return V=s()(u()().mark(function n(t,a){return u()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,o.request)("/api/user_group/batch/remove_member/".concat(t),{method:"DELETE",params:{userIds:a},paramsSerializer:function(r){return pe().stringify(r,{indices:!1})}}));case 1:case"end":return l.stop()}},n)})),V.apply(this,arguments)}function Ye(n,t,a){return F.apply(this,arguments)}function F(){return F=s()(u()().mark(function n(t,a,e){return u()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,o.request)("/api/user_group/".concat(t.id,"/member_list"),{params:m()(m()(m()({},t),(0,f.YE)(a)),(0,f.oH)(e))}).then(function(r){var c,p,d,_,h={data:r!=null&&(c=r.result)!==null&&c!==void 0&&c.list?r==null||(p=r.result)===null||p===void 0?void 0:p.list:[],success:r==null?void 0:r.success,total:r!=null&&(d=r.result)!==null&&d!==void 0&&d.pagination?r==null||(_=r.result)===null||_===void 0?void 0:_.pagination.total:0};return Promise.resolve(h)}));case 1:case"end":return i.stop()}},n)})),F.apply(this,arguments)}function Ne(n,t){return X.apply(this,arguments)}function X(){return X=s()(u()().mark(function n(t,a){return u()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,o.request)("/api/user_group/add_member/".concat(t),{method:"POST",requestType:"form",params:{userIds:a},paramsSerializer:function(r){return pe().stringify(r,{indices:!1})}}));case 1:case"end":return l.stop()}},n)})),X.apply(this,arguments)}function Ve(n,t,a){return Q.apply(this,arguments)}function Q(){return Q=s()(u()().mark(function n(t,a,e){return u()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,o.request)("/api/identity_source/list",{params:m()(m()(m()({},t),(0,f.YE)(a)),(0,f.oH)(e))}).then(function(r){var c,p,d,_,h={data:r!=null&&(c=r.result)!==null&&c!==void 0&&c.list?r==null||(p=r.result)===null||p===void 0?void 0:p.list:[],success:r==null?void 0:r.success,total:r!=null&&(d=r.result)!==null&&d!==void 0&&d.pagination?r==null||(_=r.result)===null||_===void 0?void 0:_.pagination.total:0};return Promise.resolve(h)}));case 1:case"end":return i.stop()}},n)})),Q.apply(this,arguments)}function Fe(n){return Z.apply(this,arguments)}function Z(){return Z=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/identity_source/get/".concat(t)));case 1:case"end":return e.stop()}},n)})),Z.apply(this,arguments)}function Xe(n){return J.apply(this,arguments)}function J(){return J=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/identity_source/get/config/".concat(t)));case 1:case"end":return e.stop()}},n)})),J.apply(this,arguments)}function Qe(n){return x.apply(this,arguments)}function x(){return x=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/identity_source/sync/execute/".concat(t),{method:"POST"}));case 1:case"end":return e.stop()}},n)})),x.apply(this,arguments)}function Ze(n){return ee.apply(this,arguments)}function ee(){return ee=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/identity_source/create",{data:t,method:"POST",requestType:"json"}));case 1:case"end":return e.stop()}},n)})),ee.apply(this,arguments)}function Je(n){return re.apply(this,arguments)}function re(){return re=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/identity_source/update",{data:t,method:"PUT",requestType:"json"}));case 1:case"end":return e.stop()}},n)})),re.apply(this,arguments)}function xe(n){return ne.apply(this,arguments)}function ne(){return ne=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/identity_source/save/config",{method:"PUT",data:t,requestType:"json"}));case 1:case"end":return e.stop()}},n)})),ne.apply(this,arguments)}function er(n){return te.apply(this,arguments)}function te(){return te=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/identity_source/enable/".concat(t),{method:"PUT"}));case 1:case"end":return e.stop()}},n)})),te.apply(this,arguments)}function rr(n){return ue.apply(this,arguments)}function ue(){return ue=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/identity_source/disable/".concat(t),{method:"PUT"}));case 1:case"end":return e.stop()}},n)})),ue.apply(this,arguments)}function nr(n){return ae.apply(this,arguments)}function ae(){return ae=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/identity_source/delete/".concat(t),{method:"DELETE"}));case 1:case"end":return e.stop()}},n)})),ae.apply(this,arguments)}function tr(n){return ie.apply(this,arguments)}function ie(){return ie=s()(u()().mark(function n(t){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.request)("/api/identity_source/config_validator",{method:"POST",data:t,requestType:"json"}));case 1:case"end":return e.stop()}},n)})),ie.apply(this,arguments)}function ur(n,t,a){return se.apply(this,arguments)}function se(){return se=s()(u()().mark(function n(t,a,e){return u()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,o.request)("/api/identity_source/sync/history_list",{params:m()(m()(m()({},t),(0,f.YE)(a)),(0,f.oH)(e))}).then(function(r){var c,p,d,_,h={data:r!=null&&(c=r.result)!==null&&c!==void 0&&c.list?r==null||(p=r.result)===null||p===void 0?void 0:p.list:[],success:r==null?void 0:r.success,total:r!=null&&(d=r.result)!==null&&d!==void 0&&d.pagination?r==null||(_=r.result)===null||_===void 0?void 0:_.pagination.total:0};return Promise.resolve(h)}));case 1:case"end":return i.stop()}},n)})),se.apply(this,arguments)}function ar(n,t,a){return oe.apply(this,arguments)}function oe(){return oe=s()(u()().mark(function n(t,a,e){return u()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,o.request)("/api/identity_source/sync/record_list",{params:m()(m()(m()({},t),(0,f.YE)(a)),(0,f.oH)(e))}).then(function(r){var c,p,d,_,h={data:r!=null&&(c=r.result)!==null&&c!==void 0&&c.list?r==null||(p=r.result)===null||p===void 0?void 0:p.list:[],success:r==null?void 0:r.success,total:r!=null&&(d=r.result)!==null&&d!==void 0&&d.pagination?r==null||(_=r.result)===null||_===void 0?void 0:_.pagination.total:0};return Promise.resolve(h)}));case 1:case"end":return i.stop()}},n)})),oe.apply(this,arguments)}function ir(n,t,a){return le.apply(this,arguments)}function le(){return le=s()(u()().mark(function n(t,a,e){return u()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,o.request)("/api/identity_source/event/record_list",{params:m()(m()(m()({},t),(0,f.YE)(a)),(0,f.oH)(e))}).then(function(r){var c,p,d,_,h={data:r!=null&&(c=r.result)!==null&&c!==void 0&&c.list?r==null||(p=r.result)===null||p===void 0?void 0:p.list:[],success:r==null?void 0:r.success,total:r!=null&&(d=r.result)!==null&&d!==void 0&&d.pagination?r==null||(_=r.result)===null||_===void 0?void 0:_.pagination.total:0};return Promise.resolve(h)}));case 1:case"end":return i.stop()}},n)})),le.apply(this,arguments)}function sr(){return ce.apply(this,arguments)}function ce(){return ce=s()(u()().mark(function n(){return u()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,o.request)("/api/password/generate",{method:"GET"}));case 1:case"end":return a.stop()}},n)})),ce.apply(this,arguments)}}}]); diff --git a/eiam-console/src/main/resources/fe/1576.0ddabdb9.async.js b/eiam-console/src/main/resources/fe/1576.0ddabdb9.async.js new file mode 100644 index 00000000..6e023597 --- /dev/null +++ b/eiam-console/src/main/resources/fe/1576.0ddabdb9.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[1576],{41576:function(e,n,t){t.r(n),t.d(n,{default:function(){return s}});var c=t(67294),u=t(98971),o=t(85893);function s(){var E=(0,u.useOutletContext)();return(0,o.jsx)(u.Outlet,{context:E})}}}]); diff --git a/eiam-console/src/main/resources/fe/1687.d91fbb33.async.js b/eiam-console/src/main/resources/fe/1687.d91fbb33.async.js new file mode 100644 index 00000000..2d85a423 --- /dev/null +++ b/eiam-console/src/main/resources/fe/1687.d91fbb33.async.js @@ -0,0 +1,25 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[1687],{21687:function(De,Y,f){f.d(Y,{Z:function(){return Ae}});var l=f(4942),i=f(87462),b=f(97685),q=f(71002),_=f(94184),S=f.n(_),d=f(67294),H=f(53124),$=f(98423),ee=function(e){var t,a,n=e.prefixCls,s=e.className,c=e.style,o=e.size,u=e.shape,g=S()((t={},(0,l.Z)(t,n+"-lg",o==="large"),(0,l.Z)(t,n+"-sm",o==="small"),t)),m=S()((a={},(0,l.Z)(a,n+"-circle",u==="circle"),(0,l.Z)(a,n+"-square",u==="square"),(0,l.Z)(a,n+"-round",u==="round"),a)),v=d.useMemo(function(){return typeof o=="number"?{width:o,height:o,lineHeight:o+"px"}:{}},[o]);return d.createElement("span",{className:S()(n,g,m,s),style:(0,i.Z)((0,i.Z)({},v),c)})},N=ee,te=f(66981),le=f(67968),ae=f(45503),ne=new te.E4("ant-skeleton-loading",{"0%":{transform:"translateX(-37.5%)"},"100%":{transform:"translateX(37.5%)"}}),P=function(e){return{height:e,lineHeight:e+"px"}},I=function(e){return(0,i.Z)({width:e},P(e))},re=function(e){return{position:"relative",zIndex:0,overflow:"hidden",background:"transparent","&::after":{position:"absolute",top:0,insetInlineEnd:"-150%",bottom:0,insetInlineStart:"-150%",background:e.skeletonLoadingBackground,animationName:ne,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite",content:'""'}}},T=function(e){return(0,i.Z)({width:e*5,minWidth:e*5},P(e))},ie=function(e){var t,a=e.skeletonAvatarCls,n=e.color,s=e.controlHeight,c=e.controlHeightLG,o=e.controlHeightSM;return t={},(0,l.Z)(t,""+a,(0,i.Z)({display:"inline-block",verticalAlign:"top",background:n},I(s))),(0,l.Z)(t,""+a+a+"-circle",{borderRadius:"50%"}),(0,l.Z)(t,""+a+a+"-lg",(0,i.Z)({},I(c))),(0,l.Z)(t,""+a+a+"-sm",(0,i.Z)({},I(o))),t},oe=function(e){var t,a=e.controlHeight,n=e.borderRadiusSM,s=e.skeletonInputCls,c=e.controlHeightLG,o=e.controlHeightSM,u=e.color;return t={},(0,l.Z)(t,""+s,(0,i.Z)({display:"inline-block",verticalAlign:"top",background:u,borderRadius:n},T(a))),(0,l.Z)(t,s+"-lg",(0,i.Z)({},T(c))),(0,l.Z)(t,s+"-sm",(0,i.Z)({},T(o))),t},F=function(e){return(0,i.Z)({width:e},P(e))},se=function(e){var t,a,n=e.skeletonImageCls,s=e.imageSizeBase,c=e.color,o=e.borderRadiusSM;return a={},(0,l.Z)(a,""+n,(0,i.Z)((0,i.Z)({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:c,borderRadius:o},F(s*2)),(t={},(0,l.Z)(t,n+"-path",{fill:"#bfbfbf"}),(0,l.Z)(t,n+"-svg",(0,i.Z)((0,i.Z)({},F(s)),{maxWidth:s*4,maxHeight:s*4})),(0,l.Z)(t,n+"-svg"+n+"-svg-circle",{borderRadius:"50%"}),t))),(0,l.Z)(a,""+n+n+"-circle",{borderRadius:"50%"}),a},G=function(e,t,a){var n,s=e.skeletonButtonCls;return n={},(0,l.Z)(n,""+a+s+"-circle",{width:t,minWidth:t,borderRadius:"50%"}),(0,l.Z)(n,""+a+s+"-round",{borderRadius:t}),n},D=function(e){return(0,i.Z)({width:e*2,minWidth:e*2},P(e))},ce=function(e){var t=e.borderRadiusSM,a=e.skeletonButtonCls,n=e.controlHeight,s=e.controlHeightLG,c=e.controlHeightSM,o=e.color;return(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,l.Z)({},""+a,(0,i.Z)({display:"inline-block",verticalAlign:"top",background:o,borderRadius:t,width:n*2,minWidth:n*2},D(n))),G(e,n,a)),(0,l.Z)({},a+"-lg",(0,i.Z)({},D(s)))),G(e,s,a+"-lg")),(0,l.Z)({},a+"-sm",(0,i.Z)({},D(c)))),G(e,c,a+"-sm"))},ue=function(e){var t,a,n,s,c,o=e.componentCls,u=e.skeletonAvatarCls,g=e.skeletonTitleCls,m=e.skeletonParagraphCls,v=e.skeletonButtonCls,h=e.skeletonInputCls,Z=e.skeletonImageCls,x=e.controlHeight,k=e.controlHeightLG,E=e.controlHeightSM,y=e.color,C=e.padding,W=e.marginSM,M=e.borderRadius,X=e.skeletonTitleHeight,A=e.skeletonBlockRadius,p=e.skeletonParagraphLineHeight,R=e.controlHeightXS,B=e.skeletonParagraphMarginTop;return c={},(0,l.Z)(c,""+o,(n={display:"table",width:"100%"},(0,l.Z)(n,o+"-header",(t={display:"table-cell",paddingInlineEnd:C,verticalAlign:"top"},(0,l.Z)(t,""+u,(0,i.Z)({display:"inline-block",verticalAlign:"top",background:y},I(x))),(0,l.Z)(t,u+"-circle",{borderRadius:"50%"}),(0,l.Z)(t,u+"-lg",(0,i.Z)({},I(k))),(0,l.Z)(t,u+"-sm",(0,i.Z)({},I(E))),t)),(0,l.Z)(n,o+"-content",(a={display:"table-cell",width:"100%",verticalAlign:"top"},(0,l.Z)(a,""+g,(0,l.Z)({width:"100%",height:X,background:y,borderRadius:A},"+ "+m,{marginBlockStart:E})),(0,l.Z)(a,""+m,{padding:0,"> li":{width:"100%",height:p,listStyle:"none",background:y,borderRadius:A,"+ li":{marginBlockStart:R}}}),(0,l.Z)(a,m+"> li:last-child:not(:first-child):not(:nth-child(2))",{width:"61%"}),a)),(0,l.Z)(n,"&-round "+o+"-content",(0,l.Z)({},g+", "+m+" > li",{borderRadius:M})),n)),(0,l.Z)(c,o+"-with-avatar "+o+"-content",(0,l.Z)({},""+g,(0,l.Z)({marginBlockStart:W},"+ "+m,{marginBlockStart:B}))),(0,l.Z)(c,""+o+o+"-element",(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({display:"inline-block",width:"auto"},ce(e)),ie(e)),oe(e)),se(e))),(0,l.Z)(c,""+o+o+"-block",(s={width:"100%"},(0,l.Z)(s,""+v,{width:"100%"}),(0,l.Z)(s,""+h,{width:"100%"}),s)),(0,l.Z)(c,""+o+o+"-active",(0,l.Z)({},` + `+g+`, + `+m+` > li, + `+u+`, + `+v+`, + `+h+`, + `+Z+` + `,(0,i.Z)({},re(e)))),c},w=(0,le.Z)("Skeleton",function(r){var e=r.componentCls,t=(0,ae.TS)(r,{skeletonAvatarCls:e+"-avatar",skeletonTitleCls:e+"-title",skeletonParagraphCls:e+"-paragraph",skeletonButtonCls:e+"-button",skeletonInputCls:e+"-input",skeletonImageCls:e+"-image",imageSizeBase:r.controlHeight*1.5,skeletonTitleHeight:r.controlHeight/2,skeletonBlockRadius:r.borderRadiusSM,skeletonParagraphLineHeight:r.controlHeight/2,skeletonParagraphMarginTop:r.marginLG+r.marginXXS,borderRadius:100,skeletonLoadingBackground:"linear-gradient(90deg, "+r.color+" 25%, "+r.colorGradientEnd+" 37%, "+r.color+" 63%)",skeletonLoadingMotionDuration:"1.4s"});return[ue(t)]},function(r){var e=r.colorFillContent,t=r.colorFill;return{color:e,colorGradientEnd:t}}),de=function(e){var t=e.prefixCls,a=e.className,n=e.active,s=e.shape,c=s===void 0?"circle":s,o=e.size,u=o===void 0?"default":o,g=d.useContext(H.E_),m=g.getPrefixCls,v=m("skeleton",t),h=w(v),Z=(0,b.Z)(h,2),x=Z[0],k=Z[1],E=(0,$.Z)(e,["prefixCls","className"]),y=S()(v,v+"-element",(0,l.Z)({},v+"-active",n),a,k);return x(d.createElement("div",{className:y},d.createElement(N,(0,i.Z)({prefixCls:v+"-avatar",shape:c,size:u},E))))},ve=de,ge=function(e){var t,a=e.prefixCls,n=e.className,s=e.active,c=e.block,o=c===void 0?!1:c,u=e.size,g=u===void 0?"default":u,m=d.useContext(H.E_),v=m.getPrefixCls,h=v("skeleton",a),Z=w(h),x=(0,b.Z)(Z,2),k=x[0],E=x[1],y=(0,$.Z)(e,["prefixCls"]),C=S()(h,h+"-element",(t={},(0,l.Z)(t,h+"-active",s),(0,l.Z)(t,h+"-block",o),t),n,E);return k(d.createElement("div",{className:C},d.createElement(N,(0,i.Z)({prefixCls:h+"-button",size:g},y))))},me=ge,j=f(1413),he={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},fe=he,Ze=f(84089),V=function(e,t){return d.createElement(Ze.Z,(0,j.Z)((0,j.Z)({},e),{},{ref:t,icon:fe}))};V.displayName="DotChartOutlined";var Ce=d.forwardRef(V),Se=function(e){var t=e.prefixCls,a=e.className,n=e.style,s=e.active,c=e.children,o=d.useContext(H.E_),u=o.getPrefixCls,g=u("skeleton",t),m=w(g),v=(0,b.Z)(m,2),h=v[0],Z=v[1],x=S()(g,g+"-element",(0,l.Z)({},g+"-active",s),Z,a),k=c!=null?c:d.createElement(Ce,null);return h(d.createElement("div",{className:x},d.createElement("div",{className:S()(g+"-image",a),style:n},k)))},xe=Se,ke="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",ye=function(e){var t=e.prefixCls,a=e.className,n=e.style,s=e.active,c=d.useContext(H.E_),o=c.getPrefixCls,u=o("skeleton",t),g=w(u),m=(0,b.Z)(g,2),v=m[0],h=m[1],Z=S()(u,u+"-element",(0,l.Z)({},u+"-active",s),a,h);return v(d.createElement("div",{className:Z},d.createElement("div",{className:S()(u+"-image",a),style:n},d.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:u+"-image-svg"},d.createElement("path",{d:ke,className:u+"-image-path"})))))},Ee=ye,pe=function(e){var t,a=e.prefixCls,n=e.className,s=e.active,c=e.block,o=e.size,u=o===void 0?"default":o,g=d.useContext(H.E_),m=g.getPrefixCls,v=m("skeleton",a),h=w(v),Z=(0,b.Z)(h,2),x=Z[0],k=Z[1],E=(0,$.Z)(e,["prefixCls"]),y=S()(v,v+"-element",(t={},(0,l.Z)(t,v+"-active",s),(0,l.Z)(t,v+"-block",c),t),n,k);return x(d.createElement("div",{className:y},d.createElement(N,(0,i.Z)({prefixCls:v+"-input",size:u},E))))},be=pe,He=f(74902),Ie=function(e){var t=function(g){var m=e.width,v=e.rows,h=v===void 0?2:v;if(Array.isArray(m))return m[g];if(h-1===g)return m},a=e.prefixCls,n=e.className,s=e.style,c=e.rows,o=(0,He.Z)(Array(c)).map(function(u,g){return d.createElement("li",{key:g,style:{width:t(g)}})});return d.createElement("ul",{className:S()(a,n),style:s},o)},we=Ie,ze=function(e){var t=e.prefixCls,a=e.className,n=e.width,s=e.style;return d.createElement("h3",{className:S()(t,a),style:(0,i.Z)({width:n},s)})},Re=ze;function O(r){return r&&(0,q.Z)(r)==="object"?r:{}}function Be(r,e){return r&&!e?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Ne(r,e){return!r&&e?{width:"38%"}:r&&e?{width:"50%"}:{}}function Pe(r,e){var t={};return(!r||!e)&&(t.width="61%"),!r&&e?t.rows=3:t.rows=2,t}var z=function(e){var t=e.prefixCls,a=e.loading,n=e.className,s=e.style,c=e.children,o=e.avatar,u=o===void 0?!1:o,g=e.title,m=g===void 0?!0:g,v=e.paragraph,h=v===void 0?!0:v,Z=e.active,x=e.round,k=d.useContext(H.E_),E=k.getPrefixCls,y=k.direction,C=E("skeleton",t),W=w(C),M=(0,b.Z)(W,2),X=M[0],A=M[1];if(a||!("loading"in e)){var p,R=!!u,B=!!m,L=!!h,J;if(R){var Le=(0,i.Z)((0,i.Z)({prefixCls:C+"-avatar"},Be(B,L)),O(u));J=d.createElement("div",{className:C+"-header"},d.createElement(N,(0,i.Z)({},Le)))}var K;if(B||L){var Q;if(B){var $e=(0,i.Z)((0,i.Z)({prefixCls:C+"-title"},Ne(R,L)),O(m));Q=d.createElement(Re,(0,i.Z)({},$e))}var U;if(L){var Te=(0,i.Z)((0,i.Z)({prefixCls:C+"-paragraph"},Pe(R,B)),O(h));U=d.createElement(we,(0,i.Z)({},Te))}K=d.createElement("div",{className:C+"-content"},Q,U)}var Ge=S()(C,(p={},(0,l.Z)(p,C+"-with-avatar",R),(0,l.Z)(p,C+"-active",Z),(0,l.Z)(p,C+"-rtl",y==="rtl"),(0,l.Z)(p,C+"-round",x),p),n,A);return X(d.createElement("div",{className:Ge,style:s},J,K))}return typeof c!="undefined"?c:null};z.Button=me,z.Avatar=ve,z.Input=be,z.Image=Ee,z.Node=xe;var Me=z,Ae=Me}}]); diff --git a/eiam-console/src/main/resources/fe/1914.479e05f1.async.js b/eiam-console/src/main/resources/fe/1914.479e05f1.async.js new file mode 100644 index 00000000..fa28c019 --- /dev/null +++ b/eiam-console/src/main/resources/fe/1914.479e05f1.async.js @@ -0,0 +1,126 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[1914],{39398:function(Cn,ve,e){"use strict";e.d(ve,{Z:function(){return t}});var r=e(1413),a=e(67294),F={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},C=F,N=e(84089),$=function(T,h){return a.createElement(N.Z,(0,r.Z)((0,r.Z)({},T),{},{ref:h,icon:C}))};$.displayName="CaretDownOutlined";var t=a.forwardRef($)},86548:function(Cn,ve,e){"use strict";e.d(ve,{Z:function(){return t}});var r=e(1413),a=e(67294),F={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},C=F,N=e(84089),$=function(T,h){return a.createElement(N.Z,(0,r.Z)((0,r.Z)({},T),{},{ref:h,icon:C}))};$.displayName="EditOutlined";var t=a.forwardRef($)},66017:function(Cn,ve,e){"use strict";e.d(ve,{Z:function(){return t}});var r=e(1413),a=e(67294),F={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 780H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM505.7 669a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V176c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8z"}}]},name:"vertical-align-bottom",theme:"outlined"},C=F,N=e(84089),$=function(T,h){return a.createElement(N.Z,(0,r.Z)((0,r.Z)({},T),{},{ref:h,icon:C}))};$.displayName="VerticalAlignBottomOutlined";var t=a.forwardRef($)},84517:function(Cn,ve,e){"use strict";var r=e(38345);ve.ZP=r.Z},59022:function(Cn,ve,e){"use strict";e.d(ve,{Z:function(){return X}});var r=e(1413),a=e(97685),F=e(91),C=e(85893),N=e(51280),$=e(22270),t=e(81736),j=e(51812),T=e(43825),h=e(97435),Z=e(67294),pe=e(71975),L=e(4942),ye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"},Ce=ye,je=e(84089),B=function(l,G){return Z.createElement(je.Z,(0,r.Z)((0,r.Z)({},l),{},{ref:G,icon:Ce}))};B.displayName="FilterOutlined";var H=Z.forwardRef(B),Se=e(73964),we=e(2122),ee=e(1336),M=e(46986),Ie=e(94184),ue=e.n(Ie),Ee=e(89671),_e=e(14855),xt=function(l){return(0,L.Z)({},l.componentCls,{lineHeight:"30px","&::before":{display:"block",height:0,visibility:"hidden",content:"'.'"},"&-small":{lineHeight:l.lineHeight},"&-container":{display:"flex",flexWrap:"wrap",gap:8},"&-item":(0,L.Z)({whiteSpace:"nowrap"},"".concat(l.antCls,"-form-item"),{marginBlock:0}),"&-line":{minWidth:"198px"},"&-line:not(:first-child)":{marginBlockStart:"16px",marginBlockEnd:8},"&-collapse-icon":{width:l.controlHeight,height:l.controlHeight,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},"&-effective":(0,L.Z)({},"".concat(l.componentCls,"-collapse-icon"),{backgroundColor:l.colorBgTextHover})})};function be(w){return(0,_e.Xj)("LightFilter",function(l){var G=(0,r.Z)((0,r.Z)({},l),{},{componentCls:".".concat(w)});return[xt(G)]})}var Nn=["size","collapse","collapseLabel","initialValues","onValuesChange","form","placement","formRef","bordered","ignoreRules","footerRender"],ge=function(l){var G=l.items,ne=l.prefixCls,q=l.size,Y=q===void 0?"middle":q,ot=l.collapse,at=l.collapseLabel,ct=l.onValuesChange,Qe=l.bordered,Le=l.values,Ue=l.footerRender,ut=l.placement,ht=(0,Se.YB)(),Pt="".concat(ne,"-light-filter"),yt=be(Pt),en=yt.wrapSSR,Bt=yt.hashId,an=(0,Z.useState)(!1),Nt=(0,a.Z)(an,2),Xt=Nt[0],on=Nt[1],it=(0,Z.useState)(function(){return(0,r.Z)({},Le)}),Ne=(0,a.Z)(it,2),et=Ne[0],un=Ne[1];(0,Z.useEffect)(function(){un((0,r.Z)({},Le))},[Le]);var Tn=(0,Z.useMemo)(function(){var Mn=[],Me=[];return G.forEach(function(bt){var Zn=bt.props||{},tn=Zn.secondary;tn||ot?Mn.push(bt):Me.push(bt)}),{collapseItems:Mn,outsideItems:Me}},[l.items]),An=Tn.collapseItems,ir=Tn.outsideItems,Yn=function(){return at||(ot?(0,C.jsx)(H,{className:"".concat(Pt,"-collapse-icon ").concat(Bt)}):(0,C.jsx)(we.Q,{size:Y,label:ht.getMessage("form.lightFilter.more","\u66F4\u591A\u7B5B\u9009"),expanded:Xt}))};return en((0,C.jsx)("div",{className:ue()(Pt,Bt,"".concat(Pt,"-").concat(Y),(0,L.Z)({},"".concat(Pt,"-effective"),Object.keys(Le).some(function(Mn){return Le[Mn]}))),children:(0,C.jsxs)("div",{className:"".concat(Pt,"-container ").concat(Bt),children:[ir.map(function(Mn,Me){var bt=Mn.key,Zn=Mn.props.fieldProps,tn=Zn!=null&&Zn.placement?Zn==null?void 0:Zn.placement:ut;return(0,C.jsx)("div",{className:"".concat(Pt,"-item ").concat(Bt),children:Z.cloneElement(Mn,{fieldProps:(0,r.Z)((0,r.Z)({},Mn.props.fieldProps),{},{placement:tn}),proFieldProps:{light:!0,label:Mn.props.label,bordered:Qe},bordered:Qe})},bt||Me)}),An.length?(0,C.jsx)("div",{className:"".concat(Pt,"-item ").concat(Bt),children:(0,C.jsx)(ee.M,{padding:24,open:Xt,onOpenChange:on,placement:ut,label:Yn(),footerRender:Ue,footer:{onConfirm:function(){ct((0,r.Z)({},et)),on(!1)},onClear:function(){var Me={};An.forEach(function(bt){var Zn=bt.props.name;Me[Zn]=void 0}),ct(Me)}},children:An.map(function(Mn){var Me=Mn.key,bt=Mn.props,Zn=bt.name,tn=bt.fieldProps,Xn=(0,r.Z)((0,r.Z)({},tn),{},{onChange:function(Qn){return un((0,r.Z)((0,r.Z)({},et),{},(0,L.Z)({},Zn,Qn!=null&&Qn.target?Qn.target.value:Qn))),!1}});et.hasOwnProperty(Zn)&&(Xn[Mn.props.valuePropName||"value"]=et[Zn]);var In=tn!=null&&tn.placement?tn==null?void 0:tn.placement:ut;return(0,C.jsx)("div",{className:"".concat(Pt,"-line ").concat(Bt),children:Z.cloneElement(Mn,{fieldProps:(0,r.Z)((0,r.Z)({},Xn),{},{placement:In})})},Me)})})},"more"):null]})}))};function me(w){var l=w.size,G=w.collapse,ne=w.collapseLabel,q=w.initialValues,Y=w.onValuesChange,ot=w.form,at=w.placement,ct=w.formRef,Qe=w.bordered,Le=w.ignoreRules,Ue=w.footerRender,ut=(0,F.Z)(w,Nn),ht=(0,Z.useContext)(M.ZP.ConfigContext),Pt=ht.getPrefixCls,yt=Pt("pro-form"),en=(0,Z.useState)(function(){return(0,r.Z)({},q)}),Bt=(0,a.Z)(en,2),an=Bt[0],Nt=Bt[1],Xt=(0,Z.useRef)();return(0,Z.useImperativeHandle)(ct,function(){return Xt.current}),(0,C.jsx)(Ee.I,(0,r.Z)((0,r.Z)({size:l,initialValues:q,form:ot,contentRender:function(it){return(0,C.jsx)(ge,{prefixCls:yt,items:it.flatMap(function(Ne){return(Ne==null?void 0:Ne.type.displayName)==="ProForm-Group"?Ne.props.children:Ne}),size:l,bordered:Qe,collapse:G,collapseLabel:ne,placement:at,values:an||{},footerRender:Ue,onValuesChange:function(et){var un,Tn,An=(0,r.Z)((0,r.Z)({},an),et);Nt(An),(un=Xt.current)===null||un===void 0||un.setFieldsValue(An),(Tn=Xt.current)===null||Tn===void 0||Tn.submit(),Y&&Y(et,An)}})},formRef:Xt,formItemProps:{colon:!1,labelAlign:"left"},fieldProps:{style:{width:void 0}}},(0,h.Z)(ut,["labelWidth"])),{},{onValuesChange:function(it,Ne){var et;Nt(Ne),Y==null||Y(it,Ne),(et=Xt.current)===null||et===void 0||et.submit()}}))}var Oe=e(37476),dt=e(97269),Te=e(12044),ke=e(60869),Kt=e(15746),Pn=e(71230),qe=e(48555),A=e(80882),pt=e(28700),Zt=e(26713),Lt=function(l,G,ne,q){return l?(0,C.jsxs)(C.Fragment,{children:[ne.getMessage("tableForm.collapsed","\u5C55\u5F00"),q&&"(".concat(q,")"),(0,C.jsx)(A.Z,{style:{marginInlineStart:"0.5em",transition:"0.3s all",transform:"rotate(".concat(l?0:.5,"turn)")}})]}):(0,C.jsxs)(C.Fragment,{children:[ne.getMessage("tableForm.expand","\u6536\u8D77"),(0,C.jsx)(A.Z,{style:{marginInlineStart:"0.5em",transition:"0.3s all",transform:"rotate(".concat(l?0:.5,"turn)")}})]})},Wt=function(l){var G=l.setCollapsed,ne=l.collapsed,q=ne===void 0?!1:ne,Y=l.submitter,ot=l.style,at=l.hiddenNum,ct=(0,Z.useContext)(M.ZP.ConfigContext),Qe=ct.getPrefixCls,Le=(0,Se.YB)(),Ue=(0,Z.useContext)(Se.L_),ut=Ue.hashId,ht=(0,pt.v)(l.collapseRender)||Lt;return(0,C.jsxs)(Zt.Z,{style:ot,size:16,children:[Y,l.collapseRender!==!1&&(0,C.jsx)("a",{className:"".concat(Qe("pro-query-filter-collapse-button")," ").concat(ut),onClick:function(){return G(!q)},children:ht==null?void 0:ht(q,l,Le,at)})]})},$t=Wt,Qt=function(l){var G;return(0,L.Z)({},l.proComponentsCls,(0,L.Z)({},l.componentCls,(G={padding:24},(0,L.Z)(G,"".concat(l.antCls,"-form-item"),{marginBlock:0}),(0,L.Z)(G,"".concat(l.proComponentsCls,"-form-group-title"),{marginBlock:0}),(0,L.Z)(G,"&-row",{rowGap:24,"&-split-line":{"&:after":{position:"absolute",width:"100%",content:'""',height:1,insetBlockEnd:-12,borderBlockEnd:"1px dashed "+l.colorSplit}}}),(0,L.Z)(G,"&-collapse-button",{display:"flex",alignItems:"center"}),G)))};function mn(w){return(0,_e.Xj)("QueryFilter",function(l){var G=(0,r.Z)((0,r.Z)({},l),{},{componentCls:".".concat(w)});return[Qt(G)]})}var le=["collapsed","layout","defaultCollapsed","defaultColsNumber","span","searchGutter","searchText","resetText","optionRender","collapseRender","onReset","onCollapse","labelWidth","style","split","preserve","ignoreRules","showHiddenNum"],We,He,Rt={xs:513,sm:513,md:785,lg:992,xl:1057,xxl:1/0},zt={vertical:[[513,1,"vertical"],[785,2,"vertical"],[1057,3,"vertical"],[1/0,4,"vertical"]],default:[[513,1,"vertical"],[701,2,"vertical"],[1062,3,"horizontal"],[1352,3,"horizontal"],[1/0,4,"horizontal"]]},wt=function(l,G,ne){if(ne&&typeof ne=="number")return{span:ne,layout:l};var q=ne?["xs","sm","md","lg","xl","xxl"].map(function(ot){return[Rt[ot],24/ne[ot],"horizontal"]}):zt[l||"default"],Y=(q||zt.default).find(function(ot){return Gen-1)&&!!Zn&&Xt>=24;on+=1;var R=Z.isValidElement(bt)&&(bt.key||"".concat((zn=bt.props)===null||zn===void 0?void 0:zn.name))||Zn;return Z.isValidElement(bt)&&s?l.preserve?{itemDom:Z.cloneElement(bt,{hidden:!0,key:R||Zn}),hidden:!0,colSpan:qn}:{itemDom:null,colSpan:0,hidden:!0}:{itemDom:bt,colSpan:qn,hidden:!1}}),Tn=un.map(function(bt,Zn){var tn,Xn,In=bt.itemDom,zn=bt.colSpan,Qn=In==null||(tn=In.props)===null||tn===void 0?void 0:tn.hidden;if(Qn)return In;var qn=Z.isValidElement(In)&&(In.key||"".concat((Xn=In.props)===null||Xn===void 0?void 0:Xn.name))||Zn;return 24-et%2417&&Zn(Qn.width)},children:(0,C.jsx)(Ee.I,(0,r.Z)((0,r.Z)({isKeyPressSubmit:!0,preserve:Xt},et),{},{className:ue()(Tn,Yn,et.className),onReset:ht,style:Bt,layout:tn.layout,fieldProps:{style:{width:"100%"}},formItemProps:In,groupProps:{titleStyle:{display:"inline-block",marginInlineEnd:16}},contentRender:function(Qn,qn,m){return(0,C.jsx)(ft,{spanSize:tn,collapsed:l,form:m,collapseRender:ut,defaultCollapsed:q,onCollapse:Pt,optionRender:Ue,submitter:qn,items:Qn,split:an,baseClassName:Tn,resetText:w.resetText,searchText:w.searchText,searchGutter:ct,preserve:Xt,ignoreRules:on,showLength:Xn,showHiddenNum:Ne})}}))},"resize-observer"))}var Be=e(62113),ce=["steps","columns","forceUpdate","grid"],Ge=function(l){var G=l.steps,ne=l.columns,q=l.forceUpdate,Y=l.grid,ot=(0,F.Z)(l,ce),at=(0,N.d)(ot),ct=(0,Z.useCallback)(function(Le){var Ue,ut;(Ue=(ut=at.current).onCurrentChange)===null||Ue===void 0||Ue.call(ut,Le),q([])},[q,at]),Qe=(0,Z.useMemo)(function(){return G==null?void 0:G.map(function(Le,Ue){return(0,Z.createElement)(X,(0,r.Z)((0,r.Z)({grid:Y},Le),{},{key:Ue,layoutType:"StepForm",columns:ne[Ue]}))})},[ne,Y,G]);return(0,C.jsx)(Be.L,(0,r.Z)((0,r.Z)({},ot),{},{onCurrentChange:ct,children:Qe}))},Ye=Ge,Ot=function(l){var G=l.children;return(0,C.jsx)(C.Fragment,{children:G})},z=Ot,V=e(45520),k=e(97462),Ke=function(l,G){var ne=G.genItems;if(l.valueType==="dependency"){var q,Y,ot,at=(q=l.getFieldProps)===null||q===void 0?void 0:q.call(l);return(0,V.noteOnce)(Array.isArray((Y=l.name)!==null&&Y!==void 0?Y:at==null?void 0:at.name),'SchemaForm: fieldProps.name should be NamePath[] when valueType is "dependency"'),(0,V.noteOnce)(typeof l.columns=="function",'SchemaForm: columns should be a function when valueType is "dependency"'),Array.isArray((ot=l.name)!==null&&ot!==void 0?ot:at==null?void 0:at.name)?(0,Z.createElement)(k.Z,(0,r.Z)((0,r.Z)({name:l.name},at),{},{key:l.key}),function(ct){return!l.columns||typeof l.columns!="function"?null:ne(l.columns(ct))}):null}return!0},vt=e(96074),qt=function(l){if(l.valueType==="divider"){var G;return(0,Z.createElement)(vt.Z,(0,r.Z)((0,r.Z)({},(G=l.getFieldProps)===null||G===void 0?void 0:G.call(l)),{},{key:l.key}))}return!0},Sn=e(7772),bn=function(l,G){var ne=G.action,q=G.formRef,Y=G.type,ot=G.originItem,at=(0,r.Z)((0,r.Z)({},(0,h.Z)(l,["dataIndex","width","render","renderFormItem","renderText","title"])),{},{name:l.dataIndex,width:l.width,render:l!=null&&l.render?function(Ue,ut,ht){var Pt,yt,en;return l==null||(Pt=l.render)===null||Pt===void 0?void 0:Pt.call(l,Ue,ut,ht,ne==null?void 0:ne.current,(0,r.Z)((0,r.Z)({type:Y},l),{},{formItemProps:(yt=l.getFormItemProps)===null||yt===void 0?void 0:yt.call(l),fieldProps:(en=l.getFieldProps)===null||en===void 0?void 0:en.call(l)}))}:void 0}),ct=function(){return(0,C.jsx)(Sn.Z,(0,r.Z)((0,r.Z)({},at),{},{ignoreFormItem:!0}))},Qe=l!=null&&l.renderFormItem?function(Ue,ut){var ht,Pt,yt,en=(0,j.Y)((0,r.Z)((0,r.Z)({},ut),{},{onChange:void 0}));return l==null||(ht=l.renderFormItem)===null||ht===void 0?void 0:ht.call(l,(0,r.Z)((0,r.Z)({type:Y},l),{},{formItemProps:(Pt=l.getFormItemProps)===null||Pt===void 0?void 0:Pt.call(l),fieldProps:(yt=l.getFieldProps)===null||yt===void 0?void 0:yt.call(l),originProps:ot}),(0,r.Z)((0,r.Z)({},en),{},{defaultRender:ct,type:Y}),q.current)}:void 0;if(l!=null&&l.renderFormItem){var Le=Qe==null?void 0:Qe(null,{});if(!Le||l.ignoreFormItem)return Le}return(0,Z.createElement)(Sn.Z,(0,r.Z)((0,r.Z)({},at),{},{key:[l.key,l.index||0].join("-"),renderFormItem:Qe}))},Un=e(17186),Dn=function(l,G){var ne=G.genItems;if(l.valueType==="formList"&&l.dataIndex){var q,Y;return!l.columns||!Array.isArray(l.columns)?null:(0,Z.createElement)(Un.u,(0,r.Z)((0,r.Z)({},(q=l.getFormItemProps)===null||q===void 0?void 0:q.call(l)),{},{key:l.key,name:l.dataIndex,label:l.label,initialValue:l.initialValue,colProps:l.colProps,rowProps:l.rowProps},(Y=l.getFieldProps)===null||Y===void 0?void 0:Y.call(l)),ne(l.columns))}return!0},$e=e(74902),Re=e(48171),De=e(69677),Je=e(45598),mt=e(90789),Ut=e(2514),Vt=["children","value","valuePropName","onChange","fieldProps","space","type","transform","convertValue"],Ze=["children","space","valuePropName"],xe={space:Zt.Z,group:De.Z.Group};function he(w){var l=arguments.length<=1?void 0:arguments[1];return l&&l.target&&w in l.target?l.target[w]:l}var oe=function(l){var G=l.children,ne=l.value,q=ne===void 0?[]:ne,Y=l.valuePropName,ot=l.onChange,at=l.fieldProps,ct=l.space,Qe=l.type,Le=Qe===void 0?"space":Qe,Ue=l.transform,ut=l.convertValue,ht=(0,F.Z)(l,Vt),Pt=(0,Re.J)(function(it,Ne){var et,un=(0,$e.Z)(q);un[Ne]=he(Y||"value",it),ot==null||ot(un),at==null||(et=at.onChange)===null||et===void 0||et.call(at,un)}),yt=-1,en=(0,Je.Z)(G).map(function(it){if(Z.isValidElement(it)){var Ne,et,un;yt+=1;var Tn=yt,An=(it==null||(Ne=it.type)===null||Ne===void 0?void 0:Ne.displayName)==="ProFormComponent"||(it==null||(et=it.props)===null||et===void 0?void 0:et.readonly),ir=An?(0,r.Z)((0,r.Z)({key:Tn,ignoreFormItem:!0},it.props||{}),{},{fieldProps:(0,r.Z)((0,r.Z)({},it==null||(un=it.props)===null||un===void 0?void 0:un.fieldProps),{},{onChange:function(){Pt(arguments.length<=0?void 0:arguments[0],Tn)}}),value:q==null?void 0:q[Tn],onChange:void 0}):(0,r.Z)((0,r.Z)({key:Tn},it.props||{}),{},{value:q==null?void 0:q[Tn],onChange:function(Mn){var Me,bt;Pt(Mn,Tn),(Me=(bt=it.props).onChange)===null||Me===void 0||Me.call(bt,Mn)}});return Z.cloneElement(it,ir)}return it}),Bt=xe[Le],an=(0,Ut.zx)(ht),Nt=an.RowWrapper,Xt=(0,Z.useMemo)(function(){return(0,r.Z)({},Le==="group"?{compact:!0}:{})},[Le]),on=(0,Z.useCallback)(function(it){var Ne=it.children;return(0,C.jsx)(Bt,(0,r.Z)((0,r.Z)((0,r.Z)({},Xt),ct),{},{align:"start",children:Ne}))},[Bt,ct,Xt]);return(0,C.jsx)(Nt,{Wrapper:on,children:en})},Dt=Z.forwardRef(function(w,l){var G=w.children,ne=w.space,q=w.valuePropName,Y=(0,F.Z)(w,Ze);return(0,Z.useImperativeHandle)(l,function(){return{}}),(0,C.jsx)(oe,(0,r.Z)((0,r.Z)((0,r.Z)({space:ne,valuePropName:q},Y.fieldProps),{},{onChange:void 0},Y),{},{children:G}))}),Kn=(0,mt.G)(Dt),b=Kn,d=function(l,G){var ne=G.genItems;if(l.valueType==="formSet"&&l.dataIndex){var q,Y;return!l.columns||!Array.isArray(l.columns)?null:(0,Z.createElement)(b,(0,r.Z)((0,r.Z)({},(q=l.getFormItemProps)===null||q===void 0?void 0:q.call(l)),{},{key:l.key,initialValue:l.initialValue,name:l.dataIndex,label:l.label,colProps:l.colProps,rowProps:l.rowProps},(Y=l.getFieldProps)===null||Y===void 0?void 0:Y.call(l)),ne(l.columns))}return!0},o=dt.A.Group,f=function(l,G){var ne=G.genItems;if(l.valueType==="group"){var q;return!l.columns||!Array.isArray(l.columns)?null:(0,C.jsx)(o,(0,r.Z)((0,r.Z)({label:l.label,colProps:l.colProps,rowProps:l.rowProps},(q=l.getFieldProps)===null||q===void 0?void 0:q.call(l)),{},{children:ne(l.columns)}),l.key)}return!0},v=function(l){return l.valueType&&typeof l.valueType=="string"&&["index","indexBorder","option"].includes(l==null?void 0:l.valueType)?null:!0},g=[v,f,Dn,d,qt,Ke],D=function(l,G){for(var ne=0;ne "+v+"-item-container > "+v+"-item-icon",(0,r.Z)({height:"auto",background:"none",border:0},"> "+v+"-icon",{top:g,width:D,height:D,fontSize:P,lineHeight:D+"px"}))),(0,r.Z)(f,"&:not("+v+"-vertical)",(0,r.Z)({},v+"-item-custom",(0,r.Z)({},v+"-item-icon",{width:"auto",background:"none"}))),f},Zt=pt,Lt=function(o){var f,v=o.componentCls,g=o.stepsIconSize,D=o.lineHeight,P=o.stepsSmallIconSize;return(0,r.Z)({},"&"+v+"-label-vertical",(f={},(0,r.Z)(f,v+"-item",{overflow:"visible","&-tail":{marginInlineStart:g/2+o.controlHeightLG,padding:o.paddingXXS+"px "+o.paddingLG+"px"},"&-content":{display:"block",width:(g/2+o.controlHeightLG)*2,marginTop:o.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:o.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:o.marginXXS,marginInlineStart:0,lineHeight:D}}),(0,r.Z)(f,"&"+v+"-small:not("+v+"-dot)",(0,r.Z)({},v+"-item",{"&-icon":{marginInlineStart:o.controlHeightLG+(g-P)/2}})),f))},Wt=Lt,$t=e(14747),Qt=function(o){var f,v,g,D,P,U=o.componentCls,fe=o.stepsNavContentMaxWidth,X=o.stepsNavArrowColor,w=o.stepsNavActiveColor,l=o.motionDurationSlow;return P={},(0,r.Z)(P,"&"+U+"-navigation",(g={paddingTop:o.paddingSM},(0,r.Z)(g,"&"+U+"-small",(0,r.Z)({},U+"-item",{"&-container":{marginInlineStart:-o.marginSM}})),(0,r.Z)(g,U+"-item",(v={overflow:"visible",textAlign:"center","&-container":(f={display:"inline-block",height:"100%",marginInlineStart:-o.margin,paddingBottom:o.paddingSM,textAlign:"start",transition:"opacity "+l},(0,r.Z)(f,U+"-item-content",{maxWidth:fe}),(0,r.Z)(f,U+"-item-title",(0,B.Z)((0,B.Z)({maxWidth:"100%",paddingInlineEnd:0},$t.vS),{"&::after":{display:"none"}})),f)},(0,r.Z)(v,"&:not("+U+"-item-active)",(0,r.Z)({},U+"-item-container[role='button']",{cursor:"pointer","&:hover":{opacity:.85}})),(0,r.Z)(v,"&:last-child",{flex:1,"&::after":{display:"none"}}),(0,r.Z)(v,"&::after",{position:"absolute",top:"calc(50% - "+o.paddingSM/2+"px)",insetInlineStart:"100%",display:"inline-block",width:o.fontSizeIcon,height:o.fontSizeIcon,borderTop:o.lineWidth+"px "+o.lineType+" "+X,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:o.lineWidth+"px "+o.lineType+" "+X,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'}),(0,r.Z)(v,"&::before",{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:o.lineWidthBold,backgroundColor:w,transition:"width "+l+", inset-inline-start "+l,transitionTimingFunction:"ease-out",content:'""'}),v)),(0,r.Z)(g,U+"-item"+U+"-item-active::before",{insetInlineStart:0,width:"100%"}),g)),(0,r.Z)(P,"&"+U+"-navigation"+U+"-vertical",(0,r.Z)({},"> "+U+"-item",(D={marginInlineEnd:0,"&::before":{display:"none"}},(0,r.Z)(D,"&"+U+"-item-active::before",{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:o.lineWidth*3,height:"calc(100% - "+o.marginLG+"px)"}),(0,r.Z)(D,"&::after",{position:"relative",insetInlineStart:"50%",display:"block",width:o.controlHeight*.25,height:o.controlHeight*.25,marginBottom:o.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"}),(0,r.Z)(D,"> "+U+"-item-container > "+U+"-item-tail",{visibility:"hidden"}),D))),(0,r.Z)(P,"&"+U+"-navigation"+U+"-horizontal",(0,r.Z)({},"> "+U+"-item > "+U+"-item-container > "+U+"-item-tail",{visibility:"hidden"})),P},mn=Qt,le=function(o){var f,v=o.antCls,g=o.componentCls;return(0,r.Z)({},"&"+g+"-with-progress",(f={},(0,r.Z)(f,g+"-item",(0,r.Z)({paddingTop:o.paddingXXS},"&-process "+g+"-item-container "+g+"-item-icon "+g+"-icon",{color:o.processIconColor})),(0,r.Z)(f,"&"+g+"-vertical > "+g+"-item ",(0,r.Z)({paddingInlineStart:o.paddingXXS},"> "+g+"-item-container > "+g+"-item-tail",{top:o.marginXXS,insetInlineStart:o.stepsIconSize/2-o.lineWidth+o.paddingXXS})),(0,r.Z)(f,"&, &"+g+"-small",(0,r.Z)({},"&"+g+"-horizontal "+g+"-item:first-child",{paddingBottom:o.paddingXXS,paddingInlineStart:o.paddingXXS})),(0,r.Z)(f,"&"+g+"-small"+g+"-vertical > "+g+"-item > "+g+"-item-container > "+g+"-item-tail",{insetInlineStart:o.stepsSmallIconSize/2-o.lineWidth+o.paddingXXS}),(0,r.Z)(f,"&"+g+"-label-vertical",(0,r.Z)({},g+"-item "+g+"-item-tail",{top:o.margin-2*o.lineWidth})),(0,r.Z)(f,g+"-item-icon",(0,r.Z)({position:"relative"},v+"-progress",{position:"absolute",insetBlockStart:(o.stepsIconSize-o.stepsProgressSize-o.lineWidth*2)/2,insetInlineStart:(o.stepsIconSize-o.stepsProgressSize-o.lineWidth*2)/2})),f))},We=le,He=function(o){var f,v,g,D,P=o.componentCls,U=o.descriptionWidth,fe=o.lineHeight,X=o.stepsCurrentDotSize,w=o.stepsDotSize,l=o.motionDurationSlow;return D={},(0,r.Z)(D,"&"+P+"-dot, &"+P+"-dot"+P+"-small",(0,r.Z)({},P+"-item",(f={"&-title":{lineHeight:fe},"&-tail":{top:Math.floor((o.stepsDotSize-o.lineWidth*3)/2),width:"100%",marginTop:0,marginBottom:0,marginInline:U/2+"px 0",padding:0,"&::after":{width:"calc(100% - "+o.marginSM*2+"px)",height:o.lineWidth*3,marginInlineStart:o.marginSM}},"&-icon":(0,r.Z)({width:w,height:w,marginInlineStart:(o.descriptionWidth-w)/2,paddingInlineEnd:0,lineHeight:w+"px",background:"transparent",border:0},P+"-icon-dot",{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:"all "+l,"&::after":{position:"absolute",top:-o.marginSM,insetInlineStart:(w-o.controlHeightLG*1.5)/2,width:o.controlHeightLG*1.5,height:o.controlHeight,background:"transparent",content:'""'}}),"&-content":{width:U}},(0,r.Z)(f,"&-process "+P+"-item-icon",{position:"relative",top:(w-X)/2,width:X,height:X,lineHeight:X+"px",background:"none",marginInlineStart:(o.descriptionWidth-X)/2}),(0,r.Z)(f,"&-process "+P+"-icon",(0,r.Z)({},"&:first-child "+P+"-icon-dot",{insetInlineStart:0})),f))),(0,r.Z)(D,"&"+P+"-vertical"+P+"-dot",(g={},(0,r.Z)(g,P+"-item-icon",{marginTop:(o.controlHeight-w)/2,marginInlineStart:0,background:"none"}),(0,r.Z)(g,P+"-item-process "+P+"-item-icon",{marginTop:(o.controlHeight-X)/2,top:0,insetInlineStart:(w-X)/2,marginInlineStart:0}),(0,r.Z)(g,P+"-item > "+P+"-item-container > "+P+"-item-tail",{top:(o.controlHeight-w)/2,insetInlineStart:0,margin:0,padding:w+o.paddingXS+"px 0 "+o.paddingXS+"px","&::after":{marginInlineStart:(w-o.lineWidth)/2}}),(0,r.Z)(g,"&"+P+"-small",(v={},(0,r.Z)(v,P+"-item-icon",{marginTop:(o.controlHeightSM-w)/2}),(0,r.Z)(v,P+"-item-process "+P+"-item-icon",{marginTop:(o.controlHeightSM-X)/2}),(0,r.Z)(v,P+"-item > "+P+"-item-container > "+P+"-item-tail",{top:(o.controlHeightSM-w)/2}),v)),(0,r.Z)(g,P+"-item:first-child "+P+"-icon-dot",{insetInlineStart:0}),(0,r.Z)(g,P+"-item-content",{width:"inherit"}),g)),D},Rt=He,zt=function(o){var f,v=o.componentCls;return(0,r.Z)({},"&"+v+"-rtl",(f={direction:"rtl"},(0,r.Z)(f,v+"-item",{"&-subtitle":{float:"left"}}),(0,r.Z)(f,"&"+v+"-navigation",(0,r.Z)({},v+"-item::after",{transform:"rotate(-45deg)"})),(0,r.Z)(f,"&"+v+"-vertical",(0,r.Z)({},"> "+v+"-item",(0,r.Z)({"&::after":{transform:"rotate(225deg)"}},v+"-item-icon",{float:"right"}))),(0,r.Z)(f,"&"+v+"-dot",(0,r.Z)({},v+"-item-icon "+v+"-icon-dot, &"+v+"-small "+v+"-item-icon "+v+"-icon-dot",{float:"right"})),f))},wt=zt,Xe=function(o){var f,v=o.componentCls,g=o.stepsSmallIconSize,D=o.fontSizeSM,P=o.fontSize,U=o.colorTextDescription;return(0,r.Z)({},"&"+v+"-small",(f={},(0,r.Z)(f,"&"+v+"-horizontal:not("+v+"-label-vertical) "+v+"-item",{paddingInlineStart:o.paddingSM,"&:first-child":{paddingInlineStart:0}}),(0,r.Z)(f,v+"-item-icon",{width:g,height:g,marginTop:0,marginBottom:0,marginInline:"0 "+o.marginXS+"px",fontSize:D,lineHeight:g+"px",textAlign:"center",borderRadius:g}),(0,r.Z)(f,v+"-item-title",{paddingInlineEnd:o.paddingSM,fontSize:P,lineHeight:g+"px","&::after":{top:g/2}}),(0,r.Z)(f,v+"-item-description",{color:U,fontSize:P}),(0,r.Z)(f,v+"-item-tail",{top:g/2-o.paddingXXS}),(0,r.Z)(f,v+"-item-custom "+v+"-item-icon",(0,r.Z)({width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0},"> "+v+"-icon",{fontSize:g,lineHeight:g+"px",transform:"none"})),f))},ft=Xe,gt=function(o){var f,v,g,D=o.componentCls,P=o.stepsSmallIconSize,U=o.stepsIconSize;return(0,r.Z)({},"&"+D+"-vertical",(g={display:"flex",flexDirection:"column"},(0,r.Z)(g,"> "+D+"-item",(f={display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible"},(0,r.Z)(f,D+"-item-icon",{float:"left",marginInlineEnd:o.margin}),(0,r.Z)(f,D+"-item-content",{display:"block",minHeight:o.controlHeight*1.5,overflow:"hidden"}),(0,r.Z)(f,D+"-item-title",{lineHeight:U+"px"}),(0,r.Z)(f,D+"-item-description",{paddingBottom:o.paddingSM}),f)),(0,r.Z)(g,"> "+D+"-item > "+D+"-item-container > "+D+"-item-tail",{position:"absolute",top:0,insetInlineStart:o.stepsIconSize/2-o.lineWidth,width:o.lineWidth,height:"100%",padding:U+o.marginXXS*1.5+"px 0 "+o.marginXXS*1.5+"px","&::after":{width:o.lineWidth,height:"100%"}}),(0,r.Z)(g,"> "+D+"-item:not(:last-child) > "+D+"-item-container > "+D+"-item-tail",{display:"block"}),(0,r.Z)(g," > "+D+"-item > "+D+"-item-container > "+D+"-item-content > "+D+"-item-title",{"&::after":{display:"none"}}),(0,r.Z)(g,"&"+D+"-small "+D+"-item-container",(v={},(0,r.Z)(v,D+"-item-tail",{position:"absolute",top:0,insetInlineStart:o.stepsSmallIconSize/2-o.lineWidth,padding:P+o.marginXXS*1.5+"px 0 "+o.marginXXS*1.5+"px"}),(0,r.Z)(v,D+"-item-title",{lineHeight:P+"px"}),v)),g))},_t=gt,Be=function(o){var f,v,g,D=o.componentCls,P=o.inlineDotSize,U=o.inlineTitleColor,fe=o.inlineTailColor,X=o.paddingXS+o.lineWidth,w=(0,r.Z)({},D+"-item-container "+D+"-item-content "+D+"-item-title",{color:U});return(0,r.Z)({},"&"+D+"-inline",(0,r.Z)({width:"auto",display:"inline-flex"},D+"-item",(g={flex:"none","&-container":(0,r.Z)({padding:X+"px "+o.paddingXXS+"px 0",margin:"0 "+o.marginXXS/2+"px",borderRadius:o.borderRadiusSM,cursor:"pointer",transition:"background-color "+o.motionDurationMid,"&:hover":{background:o.controlItemBgHover}},"&[role='button']:hover",{opacity:1}),"&-icon":(f={width:P,height:P,marginInlineStart:"calc(50% - "+P/2+"px)"},(0,r.Z)(f,"> "+D+"-icon",{top:0}),(0,r.Z)(f,D+"-icon-dot",{borderRadius:o.fontSizeSM/4}),f),"&-content":{width:"auto",marginTop:o.marginXS-o.lineWidth},"&-title":{color:U,fontSize:o.fontSizeSM,lineHeight:o.lineHeightSM,fontWeight:"normal",marginBottom:o.marginXXS/2},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:X+P/2,transform:"translateY(-50%)","&:after":{width:"100%",height:o.lineWidth,borderRadius:0,marginInlineStart:0,background:fe}}},(0,r.Z)(g,"&:first-child "+D+"-item-tail",{width:"50%",marginInlineStart:"50%"}),(0,r.Z)(g,"&:last-child "+D+"-item-tail",{display:"block",width:"50%"}),(0,r.Z)(g,"&-wait",(0,B.Z)((0,r.Z)({},D+"-item-icon "+D+"-icon "+D+"-icon-dot",{backgroundColor:o.colorBorderBg,border:o.lineWidth+"px "+o.lineType+" "+fe}),w)),(0,r.Z)(g,"&-finish",(0,B.Z)((v={},(0,r.Z)(v,D+"-item-tail::after",{backgroundColor:fe}),(0,r.Z)(v,D+"-item-icon "+D+"-icon "+D+"-icon-dot",{backgroundColor:fe,border:o.lineWidth+"px "+o.lineType+" "+fe}),v),w)),(0,r.Z)(g,"&-error",w),(0,r.Z)(g,"&-active, &-process",(0,B.Z)((0,r.Z)({},D+"-item-icon",{width:P,height:P,marginInlineStart:"calc(50% - "+P/2+"px)",top:0}),w)),(0,r.Z)(g,"&:not("+D+"-item-active) > "+D+"-item-container[role='button']:hover",(0,r.Z)({},D+"-item-title",{color:U})),g)))},ce=Be,Ge;(function(d){d.wait="wait",d.process="process",d.finish="finish",d.error="error"})(Ge||(Ge={}));var Ye=function(o,f){var v,g=f.componentCls+"-item",D=o+"IconColor",P=o+"TitleColor",U=o+"DescriptionColor",fe=o+"TailColor",X=o+"IconBgColor",w=o+"IconBorderColor",l=o+"DotColor";return v={},(0,r.Z)(v,g+"-"+o+" "+g+"-icon",(0,r.Z)({backgroundColor:f[X],borderColor:f[w]},"> "+f.componentCls+"-icon",(0,r.Z)({color:f[D]},f.componentCls+"-icon-dot",{background:f[l]}))),(0,r.Z)(v,g+"-"+o+g+"-custom "+g+"-icon",(0,r.Z)({},"> "+f.componentCls+"-icon",{color:f[l]})),(0,r.Z)(v,g+"-"+o+" > "+g+"-container > "+g+"-content > "+g+"-title",{color:f[P],"&::after":{backgroundColor:f[fe]}}),(0,r.Z)(v,g+"-"+o+" > "+g+"-container > "+g+"-content > "+g+"-description",{color:f[U]}),(0,r.Z)(v,g+"-"+o+" > "+g+"-container > "+g+"-tail::after",{backgroundColor:f[fe]}),v},Ot=function(o){var f,v,g=o.componentCls,D=o.motionDurationSlow,P=g+"-item";return(0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)((f={},(0,r.Z)(f,P,{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":(0,r.Z)({flex:"none"},"> "+P+"-container > "+P+"-tail, > "+P+"-container > "+P+"-content > "+P+"-title::after",{display:"none"})}),(0,r.Z)(f,P+"-container",{outline:"none"}),(0,r.Z)(f,P+"-icon, "+P+"-content",{display:"inline-block",verticalAlign:"top"}),(0,r.Z)(f,P+"-icon",(0,r.Z)({width:o.stepsIconSize,height:o.stepsIconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:o.marginXS,fontSize:o.stepsIconFontSize,fontFamily:o.fontFamily,lineHeight:o.stepsIconSize+"px",textAlign:"center",borderRadius:o.stepsIconSize,border:o.lineWidth+"px "+o.lineType+" transparent",transition:"background-color "+D+", border-color "+D},g+"-icon",{position:"relative",top:o.stepsIconTop,color:o.colorPrimary,lineHeight:1})),(0,r.Z)(f,P+"-tail",{position:"absolute",top:o.stepsIconSize/2-o.paddingXXS,insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:o.lineWidth,background:o.colorSplit,borderRadius:o.lineWidth,transition:"background "+D,content:'""'}}),(0,r.Z)(f,P+"-title",{position:"relative",display:"inline-block",paddingInlineEnd:o.padding,color:o.colorText,fontSize:o.fontSizeLG,lineHeight:o.stepsTitleLineHeight+"px","&::after":{position:"absolute",top:o.stepsTitleLineHeight/2,insetInlineStart:"100%",display:"block",width:9999,height:o.lineWidth,background:o.processTailColor,content:'""'}}),(0,r.Z)(f,P+"-subtitle",{display:"inline",marginInlineStart:o.marginXS,color:o.colorTextDescription,fontWeight:"normal",fontSize:o.fontSize}),(0,r.Z)(f,P+"-description",{color:o.colorTextDescription,fontSize:o.fontSize}),f),Ye(Ge.wait,o)),Ye(Ge.process,o)),(0,r.Z)({},P+"-process > "+P+"-container > "+P+"-title",{fontWeight:o.fontWeightStrong})),Ye(Ge.finish,o)),Ye(Ge.error,o)),(v={},(0,r.Z)(v,""+P+g+"-next-error > "+g+"-item-title::after",{background:o.colorError}),(0,r.Z)(v,P+"-disabled",{cursor:"not-allowed"}),v))},z=function(o){var f,v,g,D,P=o.componentCls,U=o.motionDurationSlow;return D={},(0,r.Z)(D,"& "+P+"-item",(0,r.Z)({},"&:not("+P+"-item-active)",(v={},(0,r.Z)(v,"& > "+P+"-item-container[role='button']",(f={cursor:"pointer"},(0,r.Z)(f,P+"-item",(0,r.Z)({},"&-title, &-subtitle, &-description, &-icon "+P+"-icon",{transition:"color "+U})),(0,r.Z)(f,"&:hover",(0,r.Z)({},P+"-item",(0,r.Z)({},"&-title, &-subtitle, &-description",{color:o.colorPrimary}))),f)),(0,r.Z)(v,"&:not("+P+"-item-process)",(0,r.Z)({},"& > "+P+"-item-container[role='button']:hover",(0,r.Z)({},P+"-item",{"&-icon":(0,r.Z)({borderColor:o.colorPrimary},P+"-icon",{color:o.colorPrimary})}))),v))),(0,r.Z)(D,"&"+P+"-horizontal:not("+P+"-label-vertical)",(0,r.Z)({},P+"-item",(g={paddingInlineStart:o.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0}},(0,r.Z)(g,"&:last-child "+P+"-item-title",{paddingInlineEnd:0}),(0,r.Z)(g,"&-tail",{display:"none"}),(0,r.Z)(g,"&-description",{maxWidth:o.descriptionWidth,whiteSpace:"normal"}),g))),D},V=function(o){var f=o.componentCls;return(0,r.Z)({},f,(0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)({},(0,$t.Wf)(o)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),Ot(o)),z(o)),Zt(o)),ft(o)),_t(o)),Wt(o)),Rt(o)),mn(o)),wt(o)),We(o)),ce(o)))},k=(0,qe.Z)("Steps",function(d){var o=d.wireframe,f=d.colorTextDisabled,v=d.fontSizeHeading3,g=d.fontSize,D=d.controlHeight,P=d.controlHeightLG,U=d.colorTextLightSolid,fe=d.colorText,X=d.colorPrimary,w=d.colorTextLabel,l=d.colorTextDescription,G=d.colorTextQuaternary,ne=d.colorFillContent,q=d.controlItemBgActive,Y=d.colorError,ot=d.colorBgContainer,at=d.colorBorderSecondary,ct=d.controlHeight,Qe=d.colorSplit,Le=(0,A.TS)(d,{processTailColor:Qe,stepsNavArrowColor:f,stepsIconSize:ct,stepsIconCustomSize:ct,stepsIconCustomTop:0,stepsIconCustomFontSize:P/2,stepsIconTop:-.5,stepsIconFontSize:g,stepsTitleLineHeight:D,stepsSmallIconSize:v,stepsDotSize:D/4,stepsCurrentDotSize:P/4,stepsNavContentMaxWidth:"auto",processIconColor:U,processTitleColor:fe,processDescriptionColor:fe,processIconBgColor:X,processIconBorderColor:X,processDotColor:X,waitIconColor:o?f:w,waitTitleColor:l,waitDescriptionColor:l,waitTailColor:Qe,waitIconBgColor:o?ot:ne,waitIconBorderColor:o?f:"transparent",waitDotColor:f,finishIconColor:X,finishTitleColor:fe,finishDescriptionColor:l,finishTailColor:X,finishIconBgColor:o?ot:q,finishIconBorderColor:o?X:q,finishDotColor:X,errorIconColor:U,errorTitleColor:Y,errorDescriptionColor:Y,errorTailColor:Qe,errorIconBgColor:Y,errorIconBorderColor:Y,errorDotColor:Y,stepsNavActiveColor:X,stepsProgressSize:P,inlineDotSize:6,inlineTitleColor:G,inlineTailColor:at});return[V(Le)]},{descriptionWidth:140}),Ke=function(d,o){var f={};for(var v in d)Object.prototype.hasOwnProperty.call(d,v)&&o.indexOf(v)<0&&(f[v]=d[v]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var g=0,v=Object.getOwnPropertySymbols(d);g form":{maxWidth:"100%"}}})};function xe(d){return(0,Vt.Xj)("StepsForm",function(o){var f=(0,a.Z)((0,a.Z)({},o),{},{componentCls:".".concat(d)});return[Ze(f)]})}var he=["current","onCurrentChange","submitter","stepsFormRender","stepsRender","stepFormRender","stepsProps","onFinish","formProps","containerStyle","formRef","formMapRef"],oe=M.createContext(void 0),Dt={horizontal:function(o){var f=o.stepsDom,v=o.formDom;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ye.Z,{gutter:{xs:8,sm:16,md:24},children:(0,j.jsx)(Ce.Z,{span:24,children:f})}),(0,j.jsx)(ye.Z,{gutter:{xs:8,sm:16,md:24},children:(0,j.jsx)(Ce.Z,{span:24,children:v})})]})},vertical:function(o){var f=o.stepsDom,v=o.formDom;return(0,j.jsxs)(ye.Z,{align:"stretch",wrap:!0,gutter:{xs:8,sm:16,md:24},children:[(0,j.jsx)(Ce.Z,{xxl:4,xl:6,lg:7,md:8,sm:10,xs:12,children:M.cloneElement(f,{style:{height:"100%"}})}),(0,j.jsx)(Ce.Z,{children:(0,j.jsx)("div",{style:{display:"flex",alignItems:"center",width:"100%",height:"100%"},children:v})})]})}};function Kn(d){var o=(0,M.useContext)(je.ZP.ConfigContext),f=o.getPrefixCls,v=f("pro-steps-form"),g=xe(v),D=g.wrapSSR,P=g.hashId,U=d.current,fe=d.onCurrentChange,X=d.submitter,w=d.stepsFormRender,l=d.stepsRender,G=d.stepFormRender,ne=d.stepsProps,q=d.onFinish,Y=d.formProps,ot=d.containerStyle,at=d.formRef,ct=d.formMapRef,Qe=(0,t.Z)(d,he),Le=(0,M.useRef)(new Map),Ue=(0,M.useRef)(new Map),ut=(0,M.useRef)([]),ht=(0,M.useState)([]),Pt=(0,$.Z)(ht,2),yt=Pt[0],en=Pt[1],Bt=(0,M.useState)(!1),an=(0,$.Z)(Bt,2),Nt=an[0],Xt=an[1],on=(0,T.YB)(),it=(0,$e.Z)(0,{value:d.current,onChange:d.onCurrentChange}),Ne=(0,$.Z)(it,2),et=Ne[0],un=Ne[1],Tn=(0,M.useMemo)(function(){return Dt[(ne==null?void 0:ne.direction)||"horizontal"]},[ne==null?void 0:ne.direction]),An=(0,M.useMemo)(function(){return et===yt.length-1},[yt.length,et]),ir=(0,M.useCallback)(function(y,I){Ue.current.has(y)||en(function(E){return[].concat((0,N.Z)(E),[y])}),Ue.current.set(y,I)},[]),Yn=(0,M.useCallback)(function(y){en(function(I){return I.filter(function(E){return E!==y})}),Ue.current.delete(y),Le.current.delete(y)},[]);(0,M.useImperativeHandle)(ct,function(){return ut.current}),(0,M.useImperativeHandle)(at,function(){var y;return(y=ut.current[et||0])===null||y===void 0?void 0:y.current},[et]);var Mn=(0,M.useCallback)(function(){var y=(0,C.Z)((0,F.Z)().mark(function I(E,se){var J,_;return(0,F.Z)().wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(Le.current.set(E,se),!(!An||!q)){jt.next=3;break}return jt.abrupt("return");case 3:return Xt(!0),J=h.T.apply(void 0,[{}].concat((0,N.Z)(Array.from(Le.current.values())))),jt.prev=5,jt.next=8,q(J);case 8:_=jt.sent,_&&(un(0),ut.current.forEach(function(rt){var Yt;return(Yt=rt.current)===null||Yt===void 0?void 0:Yt.resetFields()})),jt.next=15;break;case 12:jt.prev=12,jt.t0=jt.catch(5),console.log(jt.t0);case 15:return jt.prev=15,Xt(!1),jt.finish(15);case 18:case"end":return jt.stop()}},I,null,[[5,12,15,18]])}));return function(I,E){return y.apply(this,arguments)}}(),[An,q,Xt,un]),Me=(0,M.useMemo)(function(){var y=(0,Z.n)(L.Z,"4.24.0")>-1,I=y?{items:yt.map(function(E){var se=Ue.current.get(E);return(0,a.Z)({key:E,title:se==null?void 0:se.title},se==null?void 0:se.stepProps)})}:{};return(0,j.jsx)("div",{className:"".concat(v,"-steps-container ").concat(P),style:{maxWidth:Math.min(yt.length*320,1160)},children:(0,j.jsx)(qt,(0,a.Z)((0,a.Z)((0,a.Z)({},ne),I),{},{current:et,onChange:void 0,children:!y&&yt.map(function(E){var se=Ue.current.get(E);return(0,j.jsx)(qt.Step,(0,a.Z)({title:se==null?void 0:se.title},se==null?void 0:se.stepProps),E)})}))})},[yt,P,v,et,ne]),bt=(0,pe.J)(function(){var y,I=ut.current[et];(y=I.current)===null||y===void 0||y.submit()}),Zn=(0,pe.J)(function(){et<1||un(et-1)}),tn=(0,M.useMemo)(function(){return X!==!1&&(0,j.jsx)(Sn.Z,(0,a.Z)((0,a.Z)({type:"primary",loading:Nt},X==null?void 0:X.submitButtonProps),{},{onClick:function(){var I;X==null||(I=X.onSubmit)===null||I===void 0||I.call(X),bt()},children:on.getMessage("stepsForm.next","\u4E0B\u4E00\u6B65")}),"next")},[on,Nt,bt,X]),Xn=(0,M.useMemo)(function(){return X!==!1&&(0,j.jsx)(Sn.Z,(0,a.Z)((0,a.Z)({},X==null?void 0:X.resetButtonProps),{},{onClick:function(){var I;Zn(),X==null||(I=X.onReset)===null||I===void 0||I.call(X)},children:on.getMessage("stepsForm.prev","\u4E0A\u4E00\u6B65")}),"pre")},[on,Zn,X]),In=(0,M.useMemo)(function(){return X!==!1&&(0,j.jsx)(Sn.Z,(0,a.Z)((0,a.Z)({type:"primary",loading:Nt},X==null?void 0:X.submitButtonProps),{},{onClick:function(){var I;X==null||(I=X.onSubmit)===null||I===void 0||I.call(X),bt()},children:on.getMessage("stepsForm.submit","\u63D0\u4EA4")}),"submit")},[on,Nt,bt,X]),zn=(0,pe.J)(function(){et>yt.length-2||un(et+1)}),Qn=(0,M.useMemo)(function(){var y=[],I=et||0;if(I<1?y.push(tn):I+1===yt.length?y.push(Xn,In):y.push(Xn,tn),y=y.filter(M.isValidElement),X&&X.render){var E,se={form:(E=ut.current[et])===null||E===void 0?void 0:E.current,onSubmit:bt,step:et,onPre:Zn};return X.render(se,y)}return X&&(X==null?void 0:X.render)===!1?null:y},[yt.length,tn,bt,Xn,Zn,et,In,X]),qn=(0,M.useMemo)(function(){return(0,Dn.Z)(d.children).map(function(y,I){var E=y.props,se=E.name||"".concat(I),J=et===I,_=J?{contentRender:G,submitter:!1}:{};return(0,j.jsx)("div",{className:ee()("".concat(v,"-step"),P,(0,r.Z)({},"".concat(v,"-step-active"),J)),children:M.cloneElement(y,(0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},_),Y),E),{},{name:se,step:I,key:se}))},se)})},[Y,P,v,d.children,et,G]),m=(0,M.useMemo)(function(){return l?l(yt.map(function(y){var I;return{key:y,title:(I=Ue.current.get(y))===null||I===void 0?void 0:I.title}}),Me):Me},[yt,Me,l]),s=(0,M.useMemo)(function(){return(0,j.jsxs)("div",{className:"".concat(v,"-container ").concat(P),style:ot,children:[qn,w?null:(0,j.jsx)(bn.Z,{children:Qn})]})},[ot,qn,P,v,w,Qn]),R=(0,M.useMemo)(function(){var y={stepsDom:m,formDom:s};return w?w(Tn(y),Qn):Tn(y)},[m,s,Tn,w,Qn]);return D((0,j.jsx)("div",{className:ee()(v,P),children:(0,j.jsx)(Un.Z.Provider,(0,a.Z)((0,a.Z)({},Qe),{},{children:(0,j.jsx)(oe.Provider,{value:{loading:Nt,setLoading:Xt,regForm:ir,keyArray:yt,next:zn,formArrayRef:ut,formMapRef:Ue,lastStep:An,unRegForm:Yn,onFormFinish:Mn},children:R})}))}))}function b(d){return(0,j.jsx)(T._Y,{needDeps:!0,children:(0,j.jsx)(Kn,(0,a.Z)({},d))})}b.StepForm=Ut,b.useForm=Un.Z.useForm},1914:function(Cn,ve,e){"use strict";e.d(ve,{Z:function(){return Ae}});var r=e(74165),a=e(15861),F=e(71002),C=e(97685),N=e(4942),$=e(74902),t=e(1413),j=e(91),T=e(67294),h=e(85893),Z=e(84517),pe=e(952),L=e(73964),ye=e(86671),Ce=e(51812),je=e(60869),B=e(27068),H=e(78164),Se=e(27414),we=e(46986),ee=e(94184),M=e.n(ee),Ie=e(30939),ue=e(26713),Ee=e(14855),_e=function(n){return(0,N.Z)({},n.componentCls,{marginBlockEnd:16,backgroundColor:(0,Ee.uK)(n.colorTextBase,.02),borderRadius:n.borderRadius,border:"none","&-container":{paddingBlock:n.paddingSM,paddingInline:n.paddingLG},"&-info":{display:"flex",alignItems:"center",transition:"all 0.3s",color:n.colorTextTertiary,"&-content":{flex:1},"&-option":{minWidth:48,paddingInlineStart:16}}})};function xt(u){return(0,Ee.Xj)("ProTableAlert",function(n){var p=(0,t.Z)((0,t.Z)({},n),{},{componentCls:".".concat(u)});return[_e(p)]})}var be=function(n){var p=n.intl,c=n.onCleanSelected;return[(0,h.jsx)("a",{onClick:c,children:p.getMessage("alert.clear","\u6E05\u7A7A")},"0")]};function Nn(u){var n=u.selectedRowKeys,p=n===void 0?[]:n,c=u.onCleanSelected,S=u.alwaysShowAlert,K=u.selectedRows,ze=u.alertInfoRender,W=ze===void 0?function(Gt){var At=Gt.intl;return(0,h.jsxs)(ue.Z,{children:[At.getMessage("alert.selected","\u5DF2\u9009\u62E9"),p.length,At.getMessage("alert.item","\u9879"),"\xA0\xA0"]})}:ze,Q=u.alertOptionRender,ae=Q===void 0?be:Q,nt=(0,L.YB)(),st=ae&&ae({onCleanSelected:c,selectedRowKeys:p,selectedRows:K,intl:nt}),ie=(0,T.useContext)(we.ZP.ConfigContext),de=ie.getPrefixCls,Fe=de("pro-table-alert"),Ft=xt(Fe),re=Ft.wrapSSR,Tt=Ft.hashId;if(W===!1)return null;var ln=W({intl:nt,selectedRowKeys:p,selectedRows:K,onCleanSelected:c});return ln===!1||p.length<1&&!S?null:re((0,h.jsx)("div",{className:"".concat(Fe," ").concat(Tt),children:(0,h.jsx)("div",{className:"".concat(Fe,"-container ").concat(Tt),children:(0,h.jsxs)("div",{className:"".concat(Fe,"-info ").concat(Tt),children:[(0,h.jsx)("div",{className:"".concat(Fe,"-info-content ").concat(Tt),children:ln}),st?(0,h.jsx)("div",{className:"".concat(Fe,"-info-option ").concat(Tt),children:st}):null]})})}))}var ge=Nn,me=e(43144),Oe=e(15671),dt=e(60136),Te=e(29388),ke=e(60249),Kt=e(97435),Pn=function(n){return n!=null};function qe(u,n,p){var c,S;if(u===!1)return!1;var K=n.total,ze=n.current,W=n.pageSize,Q=n.setPageInfo,ae=(0,F.Z)(u)==="object"?u:{};return(0,t.Z)((0,t.Z)({showTotal:function(st,ie){return"".concat(p.getMessage("pagination.total.range","\u7B2C")," ").concat(ie[0],"-").concat(ie[1]," ").concat(p.getMessage("pagination.total.total","\u6761/\u603B\u5171")," ").concat(st," ").concat(p.getMessage("pagination.total.item","\u6761"))},total:K},ae),{},{current:u!==!0&&u&&(c=u.current)!==null&&c!==void 0?c:ze,pageSize:u!==!0&&u&&(S=u.pageSize)!==null&&S!==void 0?S:W,onChange:function(st,ie){var de=u.onChange;de==null||de(st,ie||20),(ie!==W||ze!==st)&&Q({pageSize:ie,current:st})}})}function A(u,n,p){var c=(0,t.Z)((0,t.Z)({},p.editableUtils),{},{pageInfo:n.pageInfo,reload:function(){var S=(0,a.Z)((0,r.Z)().mark(function ze(W){return(0,r.Z)().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(!W){ae.next=3;break}return ae.next=3,n.setPageInfo({current:1});case 3:return ae.next=5,n==null?void 0:n.reload();case 5:case"end":return ae.stop()}},ze)}));function K(ze){return S.apply(this,arguments)}return K}(),reloadAndRest:function(){var S=(0,a.Z)((0,r.Z)().mark(function ze(){return(0,r.Z)().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return p.onCleanSelected(),Q.next=3,n.setPageInfo({current:1});case 3:return Q.next=5,n==null?void 0:n.reload();case 5:case"end":return Q.stop()}},ze)}));function K(){return S.apply(this,arguments)}return K}(),reset:function(){var S=(0,a.Z)((0,r.Z)().mark(function ze(){var W;return(0,r.Z)().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return ae.next=2,p.resetAll();case 2:return ae.next=4,n==null||(W=n.reset)===null||W===void 0?void 0:W.call(n);case 4:return ae.next=6,n==null?void 0:n.reload();case 6:case"end":return ae.stop()}},ze)}));function K(){return S.apply(this,arguments)}return K}(),fullScreen:function(){return p.fullScreen()},clearSelected:function(){return p.onCleanSelected()},setPageInfo:function(K){return n.setPageInfo(K)}});u.current=c}function pt(u,n){return n.filter(function(p){return p}).length<1?u:n.reduce(function(p,c){return c(p)},u)}var Zt=function(n,p){return p===void 0?!1:typeof p=="boolean"?p:p[n]},Lt=function(n){var p;return n&&(0,F.Z)(n)==="object"&&(n==null||(p=n.props)===null||p===void 0?void 0:p.colSpan)},Wt=function(n,p){return n?Array.isArray(n)?n.join("-"):n.toString():"".concat(p)};function $t(u){return Array.isArray(u)?u.join(","):u==null?void 0:u.toString()}function Qt(u){var n={},p={};return u.forEach(function(c){var S=$t(c.dataIndex);if(!!S){if(c.filters){var K=c.defaultFilteredValue;K===void 0?n[S]=null:n[S]=c.defaultFilteredValue}c.sorter&&c.defaultSortOrder&&(p[S]=c.defaultSortOrder)}}),{sort:p,filter:n}}function mn(u,n){var p=u.oldIndex,c=u.newIndex;if(p!==c){var S=arrayMoveImmutable({array:_toConsumableArray(n||[]),fromIndex:p,toIndex:c}).filter(function(K){return!!K});return _toConsumableArray(S)}return null}var le=e(59022);function We(u){var n=u.replace(/[A-Z]/g,function(p){return"-".concat(p.toLowerCase())});return n.startsWith("-")&&(n=n.slice(1)),n}var He=function(n,p){return!n&&p!==!1?(p==null?void 0:p.filterType)==="light"?"LightFilter":"QueryFilter":"Form"},Rt=function(n,p,c){return!n&&c==="LightFilter"?(0,Kt.Z)((0,t.Z)({},p),["labelWidth","defaultCollapsed","filterType"]):n?{}:(0,Kt.Z)((0,t.Z)({labelWidth:p?p==null?void 0:p.labelWidth:void 0,defaultCollapsed:!0},p),["filterType"])},zt=function(n,p){return n?(0,Kt.Z)(p,["ignoreRules"]):(0,t.Z)({ignoreRules:!0},p)},wt=function(n){var p,c=n.onSubmit,S=n.formRef,K=n.dateFormatter,ze=K===void 0?"string":K,W=n.type,Q=n.columns,ae=n.action,nt=n.ghost,st=n.manualRequest,ie=n.onReset,de=n.submitButtonLoading,Fe=n.search,Ft=n.form,re=n.bordered,Tt=(0,T.useContext)(L.L_),ln=Tt.hashId,Gt=W==="form",At=function(){var St=(0,a.Z)((0,r.Z)().mark(function Mt(lt,vn){return(0,r.Z)().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:c&&c(lt,vn);case 1:case"end":return Pe.stop()}},Mt)}));return function(lt,vn){return St.apply(this,arguments)}}(),Bn=(0,T.useContext)(we.ZP.ConfigContext),It=Bn.getPrefixCls,xn=(0,T.useMemo)(function(){return Q.filter(function(St){return!(St===Se.Z.EXPAND_COLUMN||St===Se.Z.SELECTION_COLUMN||(St.hideInSearch||St.search===!1)&&W!=="form"||W==="form"&&St.hideInForm)}).map(function(St){var Mt,lt=!St.valueType||["textarea","jsonCode","code"].includes(St==null?void 0:St.valueType)&&W==="table"?"text":St==null?void 0:St.valueType,vn=(St==null?void 0:St.key)||(St==null||(Mt=St.dataIndex)===null||Mt===void 0?void 0:Mt.toString());return(0,t.Z)((0,t.Z)((0,t.Z)({},St),{},{width:void 0},St.search?St.search:{}),{},{valueType:lt,proFieldProps:(0,t.Z)((0,t.Z)({},St.proFieldProps),{},{proFieldKey:vn?"table-field-".concat(vn):void 0})})})},[Q,W]),nn=It("pro-table-search"),te=It("pro-table-form"),Et=(0,T.useMemo)(function(){return He(Gt,Fe)},[Fe,Gt]),fn=(0,T.useMemo)(function(){return{submitter:{submitButtonProps:{loading:de}}}},[de]);return(0,h.jsx)("div",{className:M()(ln,(p={},(0,N.Z)(p,It("pro-card"),!0),(0,N.Z)(p,"".concat(It("pro-card"),"-border"),!!re),(0,N.Z)(p,"".concat(It("pro-card"),"-bordered"),!!re),(0,N.Z)(p,"".concat(It("pro-card"),"-ghost"),!!nt),(0,N.Z)(p,nn,!0),(0,N.Z)(p,te,Gt),(0,N.Z)(p,It("pro-table-search-".concat(We(Et))),!0),(0,N.Z)(p,"".concat(nn,"-ghost"),nt),(0,N.Z)(p,Fe==null?void 0:Fe.className,Fe!==!1&&(Fe==null?void 0:Fe.className)),p)),children:(0,h.jsx)(le.Z,(0,t.Z)((0,t.Z)((0,t.Z)((0,t.Z)({layoutType:Et,columns:xn,type:W},fn),Rt(Gt,Fe,Et)),zt(Gt,Ft||{})),{},{formRef:S,action:ae,dateFormatter:ze,onInit:function(Mt){if(W!=="form"){var lt,vn,Ht,Pe=(lt=ae.current)===null||lt===void 0?void 0:lt.pageInfo,rn=Mt.current,jn=rn===void 0?Pe==null?void 0:Pe.current:rn,sr=Mt.pageSize,ur=sr===void 0?Pe==null?void 0:Pe.pageSize:sr;if((vn=ae.current)===null||vn===void 0||(Ht=vn.setPageInfo)===null||Ht===void 0||Ht.call(vn,(0,t.Z)((0,t.Z)({},Pe),{},{current:parseInt(jn,10),pageSize:parseInt(ur,10)})),st)return;At(Mt,!0)}},onReset:function(Mt){ie==null||ie(Mt)},onFinish:function(Mt){At(Mt,!1)},initialValues:Ft==null?void 0:Ft.initialValues}))})},Xe=wt,ft=function(u){(0,dt.Z)(p,u);var n=(0,Te.Z)(p);function p(){var c;(0,Oe.Z)(this,p);for(var S=arguments.length,K=new Array(S),ze=0;ze");return S}return{Provider:p,useContainer:c}}function Ke(u){return u.useContainer()}function vt(){var u,n,p,c,S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},K=(0,T.useRef)(),ze=(0,T.useRef)(null),W=(0,T.useRef)(),Q=(0,T.useRef)(),ae=(0,T.useState)(""),nt=(0,C.Z)(ae,2),st=nt[0],ie=nt[1],de=(0,T.useRef)([]),Fe=(0,je.Z)(function(){return S.size||S.defaultSize||"middle"},{value:S.size,onChange:S.onSizeChange}),Ft=(0,C.Z)(Fe,2),re=Ft[0],Tt=Ft[1],ln=(0,T.useMemo)(function(){var te,Et={};return(te=S.columns)===null||te===void 0||te.forEach(function(fn,St){var Mt=fn.key,lt=fn.dataIndex,vn=fn.fixed,Ht=fn.disable,Pe=Wt(Mt!=null?Mt:lt,St);Pe&&(Et[Pe]={show:!0,fixed:vn,disable:Ht})}),Et},[S.columns]),Gt=(0,je.Z)(function(){var te,Et,fn=S.columnsState||{},St=fn.persistenceType,Mt=fn.persistenceKey;if(Mt&&St&&typeof window!="undefined"){var lt=window[St];try{var vn=lt==null?void 0:lt.getItem(Mt);if(vn)return JSON.parse(vn)}catch(Ht){console.warn(Ht)}}return S.columnsStateMap||((te=S.columnsState)===null||te===void 0?void 0:te.value)||((Et=S.columnsState)===null||Et===void 0?void 0:Et.defaultValue)||ln},{value:((u=S.columnsState)===null||u===void 0?void 0:u.value)||S.columnsStateMap,onChange:((n=S.columnsState)===null||n===void 0?void 0:n.onChange)||S.onColumnsStateChange}),At=(0,C.Z)(Gt,2),Bn=At[0],It=At[1];(0,T.useLayoutEffect)(function(){var te=S.columnsState||{},Et=te.persistenceType,fn=te.persistenceKey;if(fn&&Et&&typeof window!="undefined"){var St=window[Et];try{var Mt=St==null?void 0:St.getItem(fn);It(Mt?JSON.parse(Mt):ln)}catch(lt){console.warn(lt)}}},[S.columnsState,ln,It]),(0,V.noteOnce)(!S.columnsStateMap,"columnsStateMap\u5DF2\u7ECF\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 columnsState.value \u66FF\u6362"),(0,V.noteOnce)(!S.columnsStateMap,"columnsStateMap has been discarded, please use columnSstate.value replacement");var xn=(0,T.useCallback)(function(){var te=S.columnsState||{},Et=te.persistenceType,fn=te.persistenceKey;if(!(!fn||!Et||typeof window=="undefined")){var St=window[Et];try{St==null||St.removeItem(fn)}catch(Mt){console.warn(Mt)}}},[S.columnsState]);(0,T.useEffect)(function(){var te,Et;if(!(!(!((te=S.columnsState)===null||te===void 0)&&te.persistenceKey)||!(!((Et=S.columnsState)===null||Et===void 0)&&Et.persistenceType))&&typeof window!="undefined"){var fn=S.columnsState,St=fn.persistenceType,Mt=fn.persistenceKey,lt=window[St];try{lt==null||lt.setItem(Mt,JSON.stringify(Bn))}catch(vn){console.warn(vn),xn()}}},[(p=S.columnsState)===null||p===void 0?void 0:p.persistenceKey,Bn,(c=S.columnsState)===null||c===void 0?void 0:c.persistenceType]);var nn={action:K.current,setAction:function(Et){K.current=Et},sortKeyColumns:de.current,setSortKeyColumns:function(Et){de.current=Et},propsRef:Q,columnsMap:Bn,keyWords:st,setKeyWords:function(Et){return ie(Et)},setTableSize:Tt,tableSize:re,prefixName:W.current,setPrefixName:function(Et){W.current=Et},setColumnsMap:It,columns:S.columns,rootDomRef:ze,clearPersistenceStorage:xn,defaultColumnKeyMap:ln};return Object.defineProperty(nn,"prefixName",{get:function(){return W.current}}),Object.defineProperty(nn,"sortKeyColumns",{get:function(){return de.current}}),Object.defineProperty(nn,"action",{get:function(){return K.current}}),nn}var qt=k(vt),Sn=qt,bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z"}}]},name:"vertical-align-top",theme:"outlined"},Un=bn,Dn=function(n,p){return T.createElement(ce.Z,(0,t.Z)((0,t.Z)({},n),{},{ref:p,icon:Un}))};Dn.displayName="VerticalAlignTopOutlined";var $e=T.forwardRef(Dn),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 474H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zm-353.6-74.7c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H550V104c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v156h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.6zm11.4 225.4a7.14 7.14 0 00-11.3 0L405.6 752.3a7.23 7.23 0 005.7 11.7H474v156c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V764h62.8c6 0 9.4-7 5.7-11.7L517.7 624.7z"}}]},name:"vertical-align-middle",theme:"outlined"},De=Re,Je=function(n,p){return T.createElement(ce.Z,(0,t.Z)((0,t.Z)({},n),{},{ref:p,icon:De}))};Je.displayName="VerticalAlignMiddleOutlined";var mt=T.forwardRef(Je),Ut=e(66017),Vt=e(48171),Ze=e(22270),xe=e(31673),he=e(55241),oe=e(32808),Dt=function(n){var p,c,S,K;return K={},(0,N.Z)(K,n.componentCls,{width:"auto","&-title":{display:"flex",alignItems:"center",justifyContent:"space-between",height:"32px"},"&-overlay":(c={"*":{fontFamily:n.fontFamily,boxSizing:"border-box"}},(0,N.Z)(c,"".concat(n.antCls,"-popover-inner-content"),{width:"200px",paddingBlock:0,paddingInline:0,paddingBlockEnd:8}),(0,N.Z)(c,"".concat(n.antCls,"-tree-node-content-wrapper:hover"),{backgroundColor:"transparent"}),(0,N.Z)(c,"".concat(n.antCls,"-tree-draggable-icon"),{cursor:"grab"}),(0,N.Z)(c,"".concat(n.antCls,"-tree-treenode"),(p={alignItems:"center","&:hover":(0,N.Z)({},"".concat(n.componentCls,"-list-item-option"),{display:"block"})},(0,N.Z)(p,"".concat(n.antCls,"-tree-checkbox"),{marginInlineEnd:"4px"}),(0,N.Z)(p,"".concat(n.antCls,"-tree-title"),{width:"100%"}),p)),c)}),(0,N.Z)(K,"".concat(n.componentCls,"-list"),(S={display:"flex",flexDirection:"column",width:"100%",paddingBlockStart:8},(0,N.Z)(S,"&".concat(n.componentCls,"-list-group"),{paddingBlockStart:0}),(0,N.Z)(S,"&-title",{marginBlockStart:"6px",marginBlockEnd:"6px",paddingInlineStart:"24px",color:n.colorTextSecondary,fontSize:"12px"}),(0,N.Z)(S,"&-item",{display:"flex",alignItems:"center","&-title":{flex:1},"&-option":{display:"none",float:"right",cursor:"pointer","> span":{"> span.anticon":{color:n.colorPrimary}},"> span + span":{marginInlineStart:8}}}),S)),K};function Kn(u){return(0,Ee.Xj)("ColumnSetting",function(n){var p=(0,t.Z)((0,t.Z)({},n),{},{componentCls:".".concat(u)});return[Dt(p)]})}var b=["key","dataIndex","children"],d=function(n){var p=n.title,c=n.show,S=n.children,K=n.columnKey,ze=n.fixed,W=Sn.useContainer(),Q=W.columnsMap,ae=W.setColumnsMap;return c?(0,h.jsx)(z.Z,{title:p,children:(0,h.jsx)("span",{onClick:function(st){st.stopPropagation(),st.preventDefault();var ie=Q[K]||{},de=typeof ie.disable=="boolean"&&ie.disable;if(!de){var Fe=(0,t.Z)((0,t.Z)({},Q),{},(0,N.Z)({},K,(0,t.Z)((0,t.Z)({},ie),{},{fixed:ze})));ae(Fe)}},children:S})}):null},o=function(n){var p=n.columnKey,c=n.isLeaf,S=n.title,K=n.className,ze=n.fixed,W=(0,L.YB)(),Q=(0,T.useContext)(L.L_),ae=Q.hashId,nt=(0,h.jsxs)("span",{className:"".concat(K,"-list-item-option ").concat(ae),children:[(0,h.jsx)(d,{columnKey:p,fixed:"left",title:W.getMessage("tableToolBar.leftPin","\u56FA\u5B9A\u5728\u5217\u9996"),show:ze!=="left",children:(0,h.jsx)($e,{})}),(0,h.jsx)(d,{columnKey:p,fixed:void 0,title:W.getMessage("tableToolBar.noPin","\u4E0D\u56FA\u5B9A"),show:!!ze,children:(0,h.jsx)(mt,{})}),(0,h.jsx)(d,{columnKey:p,fixed:"right",title:W.getMessage("tableToolBar.rightPin","\u56FA\u5B9A\u5728\u5217\u5C3E"),show:ze!=="right",children:(0,h.jsx)(Ut.Z,{})})]});return(0,h.jsxs)("span",{className:"".concat(K,"-list-item ").concat(ae),children:[(0,h.jsx)("div",{className:"".concat(K,"-list-item-title ").concat(ae),children:S}),c?null:nt]},p)},f=function(n){var p,c,S=n.list,K=n.draggable,ze=n.checkable,W=n.className,Q=n.showTitle,ae=Q===void 0?!0:Q,nt=n.title,st=n.listHeight,ie=st===void 0?280:st,de=(0,T.useContext)(L.L_),Fe=de.hashId,Ft=Sn.useContainer(),re=Ft.columnsMap,Tt=Ft.setColumnsMap,ln=Ft.sortKeyColumns,Gt=Ft.setSortKeyColumns,At=S&&S.length>0,Bn=(0,T.useMemo)(function(){if(!At)return{};var te=[],Et=new Map,fn=function St(Mt,lt){return Mt.map(function(vn){var Ht,Pe=vn.key,rn=vn.dataIndex,jn=vn.children,sr=(0,j.Z)(vn,b),ur=Wt(Pe,[lt==null?void 0:lt.columnKey,sr.index].filter(Boolean).join("-")),_n=re[ur||"null"]||{show:!0};_n.show!==!1&&!jn&&te.push(ur);var Gn=(0,t.Z)((0,t.Z)({key:ur},(0,Kt.Z)(sr,["className"])),{},{selectable:!1,disabled:_n.disable===!0,disableCheckbox:typeof _n.disable=="boolean"?_n.disable:(Ht=_n.disable)===null||Ht===void 0?void 0:Ht.checkbox,isLeaf:lt?!0:void 0});if(jn){var Hn;Gn.children=St(jn,(0,t.Z)((0,t.Z)({},_n),{},{columnKey:ur})),!((Hn=Gn.children)===null||Hn===void 0)&&Hn.every(function(gn){return te==null?void 0:te.includes(gn.key)})&&te.push(ur)}return Et.set(Pe,Gn),Gn})};return{list:fn(S),keys:te,map:Et}},[re,S,At]),It=(0,Vt.J)(function(te,Et,fn){var St=(0,t.Z)({},re),Mt=(0,$.Z)(ln),lt=Mt.findIndex(function(rn){return rn===te}),vn=Mt.findIndex(function(rn){return rn===Et}),Ht=fn>lt;if(!(lt<0)){var Pe=Mt[lt];Mt.splice(lt,1),fn===0?Mt.unshift(Pe):Mt.splice(Ht?vn:vn+1,0,Pe),Mt.forEach(function(rn,jn){St[rn]=(0,t.Z)((0,t.Z)({},St[rn]||{}),{},{order:jn})}),Tt(St),Gt(Mt)}}),xn=(0,Vt.J)(function(te){var Et=(0,t.Z)({},re),fn=function St(Mt){var lt,vn,Ht=(0,t.Z)({},Et[Mt]);if(Ht.show=te.checked,!((lt=Bn.map)===null||lt===void 0||(vn=lt.get(Mt))===null||vn===void 0)&&vn.children){var Pe,rn;(Pe=Bn.map.get(Mt))===null||Pe===void 0||(rn=Pe.children)===null||rn===void 0||rn.forEach(function(jn){return St(jn.key)})}Et[Mt]=Ht};fn(te.node.key),Tt((0,t.Z)({},Et))});if(!At)return null;var nn=(0,h.jsx)(xe.Z,{itemHeight:24,draggable:K&&!!(!((p=Bn.list)===null||p===void 0)&&p.length)&&((c=Bn.list)===null||c===void 0?void 0:c.length)>1,checkable:ze,onDrop:function(Et){var fn=Et.node.key,St=Et.dragNode.key,Mt=Et.dropPosition,lt=Et.dropToGap,vn=Mt===-1||!lt?Mt+1:Mt;It(St,fn,vn)},blockNode:!0,onCheck:function(Et,fn){return xn(fn)},checkedKeys:Bn.keys,showLine:!1,titleRender:function(Et){var fn=(0,t.Z)((0,t.Z)({},Et),{},{children:void 0});return fn.title?(0,h.jsx)(o,(0,t.Z)((0,t.Z)({className:W},fn),{},{title:(0,Ze.h)(fn.title,fn),columnKey:fn.key})):null},height:ie,treeData:Bn.list});return(0,h.jsxs)(h.Fragment,{children:[ae&&(0,h.jsx)("span",{className:"".concat(W,"-list-title ").concat(Fe),children:nt}),nn]})},v=function(n){var p=n.localColumns,c=n.className,S=n.draggable,K=n.checkable,ze=n.listsHeight,W=(0,T.useContext)(L.L_),Q=W.hashId,ae=[],nt=[],st=[],ie=(0,L.YB)();p.forEach(function(Ft){if(!Ft.hideInSetting){var re=Ft.fixed;if(re==="left"){nt.push(Ft);return}if(re==="right"){ae.push(Ft);return}st.push(Ft)}});var de=ae&&ae.length>0,Fe=nt&&nt.length>0;return(0,h.jsxs)("div",{className:M()("".concat(c,"-list"),Q,(0,N.Z)({},"".concat(c,"-list-group"),de||Fe)),children:[(0,h.jsx)(f,{title:ie.getMessage("tableToolBar.leftFixedTitle","\u56FA\u5B9A\u5728\u5DE6\u4FA7"),list:nt,draggable:S,checkable:K,className:c,listHeight:ze}),(0,h.jsx)(f,{list:st,draggable:S,checkable:K,title:ie.getMessage("tableToolBar.noFixedTitle","\u4E0D\u56FA\u5B9A"),showTitle:Fe||de,className:c,listHeight:ze}),(0,h.jsx)(f,{title:ie.getMessage("tableToolBar.rightFixedTitle","\u56FA\u5B9A\u5728\u53F3\u4FA7"),list:ae,draggable:S,checkable:K,className:c,listHeight:ze})]})};function g(u){var n,p,c=(0,T.useRef)(null),S=Sn.useContainer(),K=u.columns,ze=u.checkedReset,W=ze===void 0?!0:ze,Q=S.columnsMap,ae=S.setColumnsMap,nt=S.clearPersistenceStorage;(0,T.useEffect)(function(){var xn,nn;if(!((xn=S.propsRef.current)===null||xn===void 0||(nn=xn.columnsState)===null||nn===void 0)&&nn.value){var te,Et;c.current=JSON.parse(JSON.stringify(((te=S.propsRef.current)===null||te===void 0||(Et=te.columnsState)===null||Et===void 0?void 0:Et.value)||{}))}},[]);var st=(0,Vt.J)(function(){var xn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,nn={},te=function Et(fn){fn.forEach(function(St){var Mt=St.key,lt=St.fixed,vn=St.index,Ht=St.children,Pe=Wt(Mt,vn);Pe&&(nn[Pe]={show:xn,fixed:lt}),Ht&&Et(Ht)})};te(K),ae(nn)}),ie=(0,Vt.J)(function(xn){xn.target.checked?st():st(!1)}),de=(0,Vt.J)(function(){var xn,nn;nt==null||nt(),ae(c.current||((xn=S.propsRef.current)===null||xn===void 0||(nn=xn.columnsState)===null||nn===void 0?void 0:nn.defaultValue)||S.defaultColumnKeyMap)}),Fe=Object.values(Q).filter(function(xn){return!xn||xn.show===!1}),Ft=Fe.length>0&&Fe.length!==K.length,re=(0,L.YB)(),Tt=(0,T.useContext)(we.ZP.ConfigContext),ln=Tt.getPrefixCls,Gt=ln("pro-table-column-setting"),At=Kn(Gt),Bn=At.wrapSSR,It=At.hashId;return Bn((0,h.jsx)(he.Z,{arrowPointAtCenter:!0,title:(0,h.jsxs)("div",{className:"".concat(Gt,"-title ").concat(It),children:[(0,h.jsx)(oe.Z,{indeterminate:Ft,checked:Fe.length===0&&Fe.length!==K.length,onChange:function(nn){ie(nn)},children:re.getMessage("tableToolBar.columnDisplay","\u5217\u5C55\u793A")}),W?(0,h.jsx)("a",{onClick:de,className:"".concat(Gt,"-action-rest-button"),children:re.getMessage("tableToolBar.reset","\u91CD\u7F6E")}):null,u!=null&&u.extra?(0,h.jsx)(ue.Z,{size:12,align:"center",children:u.extra}):null]}),overlayClassName:"".concat(Gt,"-overlay ").concat(It),trigger:"click",placement:"bottomRight",content:(0,h.jsx)(v,{checkable:(n=u.checkable)!==null&&n!==void 0?n:!0,draggable:(p=u.draggable)!==null&&p!==void 0?p:!0,className:Gt,localColumns:K,listsHeight:u.listsHeight}),children:u.children||(0,h.jsx)(z.Z,{title:re.getMessage("tableToolBar.columnSetting","\u5217\u8BBE\u7F6E"),children:(0,h.jsx)(Ot.Z,{})})}))}var D=g,P=e(81736),U=e(67875),fe=e(69677),X=e(59209),w=e(80882),l=e(86413),G=e(13013),ne=function(n){var p=(0,T.useContext)(L.L_),c=p.hashId,S=n.items,K=S===void 0?[]:S,ze=n.type,W=ze===void 0?"inline":ze,Q=n.prefixCls,ae=n.activeKey,nt=(0,je.Z)(ae,{value:ae,onChange:n.onChange}),st=(0,C.Z)(nt,2),ie=st[0],de=st[1];if(K.length<1)return null;var Fe=K.find(function(re){return re.key===ie})||K[0];if(W==="inline")return(0,h.jsx)("div",{className:M()("".concat(Q,"-menu"),"".concat(Q,"-inline-menu"),c),children:K.map(function(re,Tt){return(0,h.jsx)("div",{onClick:function(){de(re.key)},className:M()("".concat(Q,"-inline-menu-item"),Fe.key===re.key?"".concat(Q,"-inline-menu-item-active"):void 0,c),children:re.label},re.key||Tt)})});if(W==="tab")return(0,h.jsx)(U.Z,{items:K.map(function(re){var Tt;return(0,t.Z)((0,t.Z)({},re),{},{key:(Tt=re.key)===null||Tt===void 0?void 0:Tt.toString()})}),activeKey:Fe.key,onTabClick:function(Tt){return de(Tt)},children:K==null?void 0:K.map(function(re,Tt){return(0,T.createElement)(U.Z.TabPane,(0,t.Z)((0,t.Z)({},re),{},{key:re.key||Tt,tab:re.label}))})});var Ft=(0,l.Q)({selectedKeys:[Fe.key],onClick:function(Tt){de(Tt.key)},items:K.map(function(re,Tt){return{key:re.key||Tt,disabled:re.disabled,label:re.label}})});return(0,h.jsx)("div",{className:M()("".concat(Q,"-menu"),"".concat(Q,"-dropdownmenu")),children:(0,h.jsx)(G.Z,(0,t.Z)((0,t.Z)({trigger:["click"]},Ft),{},{children:(0,h.jsxs)(ue.Z,{className:"".concat(Q,"-dropdownmenu-label"),children:[Fe.label,(0,h.jsx)(w.Z,{})]})}))})},q=ne,Y=function(n){var p;return(0,N.Z)({},n.componentCls,(p={lineHeight:"1","&-container":{display:"flex",justifyContent:"space-between",paddingBlock:n.padding,paddingInline:0,"&-mobile":{flexDirection:"column"}},"&-title":{display:"flex",alignItems:"center",justifyContent:"flex-start",color:n.colorTextHeading,fontWeight:"500",fontSize:n.fontSizeLG},"&-search:not(:last-child)":{display:"flex",alignItems:"center",justifyContent:"flex-start"},"&-setting-item":{marginBlock:0,marginInline:4,color:n.colorIconHover,fontSize:n.fontSizeLG,cursor:"pointer","> span":{display:"block",width:"100%",height:"100%"},"&:hover":{color:n.colorPrimary}},"&-left":{display:"flex",alignItems:"center",justifyContent:"flex-start"},"&-right":{display:"flex",justifyContent:"flex-end"},"&-extra-line":{marginBlockEnd:n.margin},"&-filter":(0,N.Z)({"&:not(:last-child)":{marginInlineEnd:n.margin},display:"flex",alignItems:"center"},"div.$".concat(n.antCls,"-pro-table-search"),{marginBlock:0,marginInline:0,paddingBlock:0,paddingInline:0}),"&-inline-menu-item":{display:"inline-block",marginInlineEnd:n.marginLG,cursor:"pointer",opacity:"0.75","&-active":{fontWeight:"bold",opacity:"1"}}},(0,N.Z)(p,"".concat(n.antCls,"-tabs-top > ").concat(n.antCls,"-tabs-nav"),(0,N.Z)({marginBlockEnd:0,"&::before":{borderBlockEnd:0}},"".concat(n.antCls,"-tabs-nav-list"),{marginBlockStart:0,"${token.antCls}-tabs-tab":{paddingBlockStart:0}})),(0,N.Z)(p,"&-dropdownmenu-label",{fontWeight:"bold",fontSize:n.fontSizeIcon,textAlign:"center",cursor:"pointer"}),(0,N.Z)(p,"@media (max-width: 575px)",(0,N.Z)({},n.componentCls,{"&-container":{display:"flex",flexWrap:"wrap"},"&-left":{marginBlockEnd:"16px"}})),p))};function ot(u){return(0,Ee.Xj)("ProTableListToolBar",function(n){var p=(0,t.Z)((0,t.Z)({},n),{},{componentCls:".".concat(u)});return[Y(p)]})}function at(u){if(T.isValidElement(u))return u;if(u){var n=u,p=n.icon,c=n.tooltip,S=n.onClick,K=n.key;return p&&c?(0,h.jsx)(z.Z,{title:c,children:(0,h.jsx)("span",{onClick:function(){S&&S(K)},children:p},K)}):p}return null}var ct=function(n){var p,c=n.prefixCls,S=n.tabs,K=S===void 0?{}:S,ze=n.multipleLine,W=n.filtersNode;return ze?(0,h.jsx)("div",{className:"".concat(c,"-extra-line"),children:K.items&&K.items.length?(0,h.jsx)(U.Z,{activeKey:K.activeKey,items:K.items.map(function(Q,ae){var nt;return(0,t.Z)((0,t.Z)({label:Q.tab},Q),{},{key:((nt=Q.key)===null||nt===void 0?void 0:nt.toString())||(ae==null?void 0:ae.toString())})}),onChange:K.onChange,tabBarExtraContent:W,children:(p=K.items)===null||p===void 0?void 0:p.map(function(Q,ae){return(0,T.createElement)(U.Z.TabPane,(0,t.Z)((0,t.Z)({},Q),{},{key:Q.key||ae,tab:Q.tab}))})}):W}):null},Qe=function(n){var p=n.prefixCls,c=n.title,S=n.subTitle,K=n.tooltip,ze=n.className,W=n.style,Q=n.search,ae=n.onSearch,nt=n.multipleLine,st=nt===void 0?!1:nt,ie=n.filter,de=n.actions,Fe=de===void 0?[]:de,Ft=n.settings,re=Ft===void 0?[]:Ft,Tt=n.tabs,ln=Tt===void 0?{}:Tt,Gt=n.menu,At=(0,T.useContext)(we.ZP.ConfigContext),Bn=At.getPrefixCls,It=Bn("pro-table-list-toolbar",p),xn=ot(It),nn=xn.wrapSSR,te=xn.hashId,Et=(0,L.YB)(),fn=(0,X.ZP)(),St=fn==="sm"||fn==="xs",Mt=Et.getMessage("tableForm.inputPlaceholder","\u8BF7\u8F93\u5165"),lt=(0,T.useMemo)(function(){return Q?T.isValidElement(Q)?Q:(0,h.jsx)(fe.Z.Search,(0,t.Z)((0,t.Z)({style:{width:200},placeholder:Mt},Q),{},{onSearch:function(){for(var Hn,gn=arguments.length,Vn=new Array(gn),kn=0;kna":{fontSize:n.fontSize}}),(0,N.Z)(S,"".concat(n.antCls,"-table").concat(n.antCls,"-table-tbody").concat(n.antCls,"-table-wrapper:only-child").concat(n.antCls,"-table"),{marginBlock:0,marginInline:0}),(0,N.Z)(S,"".concat(n.antCls,"-table").concat(n.antCls,"-table-middle ").concat(n.componentCls),{marginBlock:0,marginInline:-8}),(0,N.Z)(S,"& &-search",(c={marginBlockEnd:"16px",background:n.colorBgContainer,"&-ghost":{background:"transparent"}},(0,N.Z)(c,"&".concat(n.componentCls,"-form"),{marginBlock:0,marginInline:0,paddingBlock:0,paddingInline:16,overflow:"unset"}),(0,N.Z)(c,"&-light-filter",{marginBlockEnd:0,paddingBlock:0,paddingInline:0}),(0,N.Z)(c,"&-form-option",(p={},(0,N.Z)(p,"".concat(n.antCls,"-form-item"),{}),(0,N.Z)(p,"".concat(n.antCls,"-form-item-label"),{}),(0,N.Z)(p,"".concat(n.antCls,"-form-item-control-input"),{}),p)),(0,N.Z)(c,"@media (max-width: 575px)",(0,N.Z)({},n.componentCls,(0,N.Z)({height:"auto !important",paddingBlockEnd:"24px"},"".concat(n.antCls,"-form-item-label"),{minWidth:"80px",textAlign:"start"}))),c)),(0,N.Z)(S,"&-toolbar",{display:"flex",alignItems:"center",justifyContent:"space-between",height:"64px",paddingInline:24,paddingBlock:0,"&-option":{display:"flex",alignItems:"center",justifyContent:"flex-end"},"&-title":{flex:"1",color:n.colorTextLabel,fontWeight:"500",fontSize:"16px",lineHeight:"24px",opacity:"0.85"}}),S)),(0,N.Z)(K,"@keyframes turn",{"0%":{transform:"rotate(0deg)"},"25%":{transform:"rotate(90deg)"},"50%":{transform:"rotate(180deg)"},"75%":{transform:"rotate(270deg)"},"100%":{transform:"rotate(360deg)"}}),(0,N.Z)(K,"@media (max-width: ".concat(n.screenXS,")"),(0,N.Z)({},n.componentCls,(0,N.Z)({},"".concat(n.antCls,"-table"),{width:"100%",overflowX:"auto","&-thead > tr,&-tbody > tr":{"> th,> td":{whiteSpace:"pre",">span":{display:"block"}}}}))),(0,N.Z)(K,"@media (max-width: 575px)",(0,N.Z)({},"".concat(n.componentCls,"-toolbar"),{flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start",height:"auto",marginBlockEnd:"16px",marginInlineStart:"16px",paddingBlock:8,paddingInline:8,paddingBlockStart:"16px",lineHeight:"normal","&-title":{marginBlockEnd:16},"&-option":{display:"flex",justifyContent:"space-between",width:"100%"},"&-default-option":{display:"flex",flex:"1",alignItems:"center",justifyContent:"flex-end"}})),K};function Xn(u){return(0,Ee.Xj)("ProTable",function(n){var p=(0,t.Z)((0,t.Z)({},n),{},{componentCls:".".concat(u)});return[tn(p)]})}var In=e(26369),zn=e(10178),Qn=["data","success","total"],qn=function(n){var p=n.pageInfo;if(p){var c=p.current,S=p.defaultCurrent,K=p.pageSize,ze=p.defaultPageSize;return{current:c||S||1,total:0,pageSize:K||ze||20}}return{current:1,total:0,pageSize:20}},m=function(n,p,c){var S=(0,T.useRef)(!1),K=c||{},ze=K.onLoad,W=K.manual,Q=K.polling,ae=K.onRequestError,nt=K.debounceTime,st=nt===void 0?20:nt,ie=(0,T.useRef)(W),de=(0,T.useRef)(),Fe=(0,je.Z)(p,{value:c==null?void 0:c.dataSource,onChange:c==null?void 0:c.onDataSourceChange}),Ft=(0,C.Z)(Fe,2),re=Ft[0],Tt=Ft[1],ln=(0,je.Z)(!1,{value:c==null?void 0:c.loading,onChange:c==null?void 0:c.onLoadingChange}),Gt=(0,C.Z)(ln,2),At=Gt[0],Bn=Gt[1],It=(0,T.useRef)(!1),xn=(0,je.Z)(function(){return qn(c)},{onChange:c==null?void 0:c.onPageInfoChange}),nn=(0,C.Z)(xn,2),te=nn[0],Et=nn[1],fn=(0,Vt.J)(function(Vn){(Vn.current!==te.current||Vn.pageSize!==te.pageSize||Vn.total!==te.total)&&Et(Vn)}),St=(0,je.Z)(!1),Mt=(0,C.Z)(St,2),lt=Mt[0],vn=Mt[1],Ht=function(kn,ar){Tt(kn),(te==null?void 0:te.total)!==ar&&fn((0,t.Z)((0,t.Z)({},te),{},{total:ar||kn.length}))},Pe=(0,In.D)(te==null?void 0:te.current),rn=(0,In.D)(te==null?void 0:te.pageSize),jn=(0,In.D)(Q),sr=c||{},ur=sr.effects,_n=ur===void 0?[]:ur,Gn=(0,Vt.J)(function(){(0,F.Z)(At)==="object"?Bn((0,t.Z)((0,t.Z)({},At),{},{spinning:!1})):Bn(!1),vn(!1)}),Hn=function(){var Vn=(0,a.Z)((0,r.Z)().mark(function kn(ar){var mr,cr,pr,cn,kt,nr,fr,xr,gr,Sr,Zr,yr;return(0,r.Z)().wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:if(!(At&&typeof At=="boolean"||It.current||!n)){rr.next=2;break}return rr.abrupt("return",[]);case 2:if(!ie.current){rr.next=5;break}return ie.current=!1,rr.abrupt("return",[]);case 5:return ar?vn(!0):(0,F.Z)(At)==="object"?Bn((0,t.Z)((0,t.Z)({},At),{},{spinning:!0})):Bn(!0),It.current=!0,mr=te||{},cr=mr.pageSize,pr=mr.current,rr.prev=8,cn=(c==null?void 0:c.pageInfo)!==!1?{current:pr,pageSize:cr}:void 0,rr.next=12,n(cn);case 12:if(rr.t0=rr.sent,rr.t0){rr.next=15;break}rr.t0={};case 15:if(kt=rr.t0,nr=kt.data,fr=nr===void 0?[]:nr,xr=kt.success,gr=kt.total,Sr=gr===void 0?0:gr,Zr=(0,j.Z)(kt,Qn),xr!==!1){rr.next=24;break}return rr.abrupt("return",[]);case 24:return yr=pt(fr,[c.postData].filter(function(Rr){return Rr})),Ht(yr,Sr),ze==null||ze(yr,Zr),rr.abrupt("return",yr);case 30:if(rr.prev=30,rr.t1=rr.catch(8),ae!==void 0){rr.next=34;break}throw new Error(rr.t1);case 34:re===void 0&&Tt([]),ae(rr.t1);case 36:return rr.prev=36,It.current=!1,Gn(),rr.finish(36);case 40:return rr.abrupt("return",[]);case 41:case"end":return rr.stop()}},kn,null,[[8,30,36,40]])}));return function(ar){return Vn.apply(this,arguments)}}(),gn=(0,zn.D)(function(){var Vn=(0,a.Z)((0,r.Z)().mark(function kn(ar){var mr,cr;return(0,r.Z)().wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return de.current&&clearTimeout(de.current),cn.next=3,Hn(ar);case 3:return mr=cn.sent,cr=(0,Ze.h)(Q,mr),cr&&!S.current&&(de.current=setTimeout(function(){gn.run(cr)},Math.max(cr,2e3))),cn.abrupt("return",mr);case 7:case"end":return cn.stop()}},kn)}));return function(kn){return Vn.apply(this,arguments)}}(),st||10);return(0,T.useEffect)(function(){return Q||clearTimeout(de.current),!jn&&Q&&gn.run(!0),function(){clearTimeout(de.current)}},[Q]),(0,T.useLayoutEffect)(function(){return S.current=!1,function(){S.current=!0}},[]),(0,T.useEffect)(function(){var Vn=te||{},kn=Vn.current,ar=Vn.pageSize;(!Pe||Pe===kn)&&(!rn||rn===ar)||c.pageInfo&&re&&(re==null?void 0:re.length)>ar||kn!==void 0&&re&&re.length<=ar&&gn.run(!1)},[te==null?void 0:te.current]),(0,T.useEffect)(function(){!rn||gn.run(!1)},[te==null?void 0:te.pageSize]),(0,B.KW)(function(){return gn.run(!1),W||(ie.current=!1),function(){gn.cancel()}},[].concat((0,$.Z)(_n),[W])),{dataSource:re,setDataSource:Tt,loading:At,reload:function(){var Vn=(0,a.Z)((0,r.Z)().mark(function ar(){return(0,r.Z)().wrap(function(cr){for(;;)switch(cr.prev=cr.next){case 0:return cr.next=2,gn.run(!1);case 2:case"end":return cr.stop()}},ar)}));function kn(){return Vn.apply(this,arguments)}return kn}(),pageInfo:te,pollingLoading:lt,reset:function(){var Vn=(0,a.Z)((0,r.Z)().mark(function ar(){var mr,cr,pr,cn,kt,nr,fr,xr;return(0,r.Z)().wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:mr=c||{},cr=mr.pageInfo,pr=cr||{},cn=pr.defaultCurrent,kt=cn===void 0?1:cn,nr=pr.defaultPageSize,fr=nr===void 0?20:nr,xr={current:kt,total:0,pageSize:fr},fn(xr);case 4:case"end":return Sr.stop()}},ar)}));function kn(){return Vn.apply(this,arguments)}return kn}(),setPageInfo:function(){var Vn=(0,a.Z)((0,r.Z)().mark(function ar(mr){return(0,r.Z)().wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:fn((0,t.Z)((0,t.Z)({},te),mr));case 1:case"end":return pr.stop()}},ar)}));function kn(ar){return Vn.apply(this,arguments)}return kn}()}},s=m,R=function(n){return function(p,c){var S,K,ze=p.fixed,W=p.index,Q=c.fixed,ae=c.index;if(ze==="left"&&Q!=="left"||Q==="right"&&ze!=="right")return-2;if(Q==="left"&&ze!=="left"||ze==="right"&&Q!=="right")return 2;var nt=p.key||"".concat(W),st=c.key||"".concat(ae);if(((S=n[nt])===null||S===void 0?void 0:S.order)||((K=n[st])===null||K===void 0?void 0:K.order)){var ie,de;return(((ie=n[nt])===null||ie===void 0?void 0:ie.order)||0)-(((de=n[st])===null||de===void 0?void 0:de.order)||0)}return(p.index||0)-(c.index||0)}},y=e(99108),I=e(28700),E=function(n){var p={};return Object.keys(n||{}).forEach(function(c){var S;Array.isArray(n[c])&&((S=n[c])===null||S===void 0?void 0:S.length)===0||n[c]!==void 0&&(p[c]=n[c])}),p},se=e(77398),J=e(74763),_=e(94787),Ct=e(66758),jt=e(97269),rt=e(7772),Yt=e(97462),sn=e(90081),wn=e(2026),En=["children"],dn=["",null,void 0],On=function(){for(var n=arguments.length,p=new Array(n),c=0;ccr.length?(cr.push(Vn),cr):(cr.splice((W==null?void 0:W.current)*(W==null?void 0:W.pageSize)-1,0,Vn),cr)}return[].concat((0,$.Z)(S.dataSource),[Vn])},vn=function(){return(0,t.Z)((0,t.Z)({},Et),{},{size:ae,rowSelection:Q===!1?void 0:Q,className:p,style:st,columns:St.map(function(Gn){return Gn.isExtraColumns?Gn.extraColumn:Gn}),loading:S.loading,dataSource:nn.newLineRecord?lt(S.dataSource):S.dataSource,pagination:W,onChange:function(Hn,gn,Vn,kn){var ar;if((ar=Et.onChange)===null||ar===void 0||ar.call(Et,Hn,gn,Vn,kn),Mt||Gt((0,Ce.Y)(gn)),Array.isArray(Vn)){var mr=Vn.reduce(function(kt,nr){return(0,t.Z)((0,t.Z)({},kt),{},(0,N.Z)({},"".concat(nr.field),nr.order))},{});ln((0,Ce.Y)(mr))}else{var cr,pr=(cr=Vn.column)===null||cr===void 0?void 0:cr.sorter,cn=(pr==null?void 0:pr.toString())===pr;ln((0,Ce.Y)((0,N.Z)({},"".concat(cn?pr:Vn.field),Vn.order))||{})}}})},Ht=(0,h.jsx)(Se.Z,(0,t.Z)((0,t.Z)({},vn()),{},{rowKey:n})),Pe=u.tableViewRender?u.tableViewRender((0,t.Z)((0,t.Z)({},vn()),{},{rowSelection:Q!==!1?Q:void 0}),Ht):Ht,rn=(0,T.useMemo)(function(){if(u.editable&&!u.name){var _n,Gn,Hn,gn;return(0,h.jsxs)(h.Fragment,{children:[ie,re,(0,T.createElement)(pe.ZP,(0,t.Z)((0,t.Z)({},(_n=u.editable)===null||_n===void 0?void 0:_n.formProps),{},{formRef:(Gn=u.editable)===null||Gn===void 0||(Hn=Gn.formProps)===null||Hn===void 0?void 0:Hn.formRef,component:!1,form:(gn=u.editable)===null||gn===void 0?void 0:gn.form,onValuesChange:nn.onValuesChange,key:"table",submitter:!1,omitNil:!1,dateFormatter:u.dateFormatter}),Pe)]})}return(0,h.jsxs)(h.Fragment,{children:[ie,re,Pe]})},[re,u.loading,!!u.editable,Pe,ie]),jn=Ft===!1||!!u.name?rn:(0,h.jsx)(Z.ZP,(0,t.Z)((0,t.Z)({ghost:u.ghost,bordered:Zt("table",xn),bodyStyle:ie?{paddingBlockStart:0}:{padding:0}},Ft),{},{children:rn})),sr=function(){return u.tableRender?u.tableRender(u,jn,{toolbar:ie||void 0,alert:re||void 0,table:Pe||void 0}):jn},ur=(0,h.jsxs)("div",{className:M()(It,(0,N.Z)({},"".concat(c,"-polling"),S.pollingLoading)),style:Fe,ref:fn.rootDomRef,children:[Bn?null:de,ze!=="form"&&u.tableExtraRender&&(0,h.jsx)("div",{className:M()(It,"".concat(c,"-extra")),children:u.tableExtraRender(u,S.dataSource||[])}),ze!=="form"&&sr()]});return!At||!(At!=null&&At.fullScreen)?ur:(0,h.jsx)(we.ZP,{getPopupContainer:function(){return fn.rootDomRef.current||document.body},children:ur})}var Wn={},hn=function(n){var p,c=n.cardBordered,S=n.request,K=n.className,ze=n.params,W=ze===void 0?Wn:ze,Q=n.defaultData,ae=n.headerTitle,nt=n.postData,st=n.ghost,ie=n.pagination,de=n.actionRef,Fe=n.columns,Ft=Fe===void 0?[]:Fe,re=n.toolBarRender,Tt=n.onLoad,ln=n.onRequestError,Gt=n.style,At=n.cardProps,Bn=n.tableStyle,It=n.tableClassName,xn=n.columnsStateMap,nn=n.onColumnsStateChange,te=n.options,Et=n.search,fn=n.name,St=n.onLoadingChange,Mt=n.rowSelection,lt=Mt===void 0?!1:Mt,vn=n.beforeSearchSubmit,Ht=n.tableAlertRender,Pe=n.defaultClassName,rn=n.formRef,jn=n.type,sr=jn===void 0?"table":jn,ur=n.columnEmptyText,_n=ur===void 0?"-":ur,Gn=n.toolbar,Hn=n.rowKey,gn=n.manualRequest,Vn=n.polling,kn=n.tooltip,ar=n.revalidateOnFocus,mr=ar===void 0?!1:ar,cr=(0,j.Z)(n,Rn),pr=Xn(n.defaultClassName),cn=pr.wrapSSR,kt=pr.hashId,nr=M()(Pe,K,kt),fr=(0,T.useRef)(),xr=(0,T.useRef)(),gr=rn||xr;(0,T.useImperativeHandle)(de,function(){return fr.current});var Sr=(0,je.Z)(lt?(lt==null?void 0:lt.defaultSelectedRowKeys)||[]:void 0,{value:lt?lt.selectedRowKeys:void 0}),Zr=(0,C.Z)(Sr,2),yr=Zr[0],Ir=Zr[1],rr=(0,T.useRef)([]),Rr=(0,T.useCallback)(function(Jt,yn){Ir(Jt),(!lt||!(lt!=null&<.selectedRowKeys))&&(rr.current=yn)},[Ir]),Fr=(0,je.Z)(function(){if(!(gn||Et!==!1))return{}}),wr=(0,C.Z)(Fr,2),Mr=wr[0],Pr=wr[1],Lr=(0,je.Z)({}),Dr=(0,C.Z)(Lr,2),Br=Dr[0],Or=Dr[1],$r=(0,je.Z)({}),Kr=(0,C.Z)($r,2),Ar=Kr[0],zr=Kr[1];(0,T.useEffect)(function(){var Jt=Qt(Ft),yn=Jt.sort,er=Jt.filter;Or(er),zr(yn)},[]);var Hr=(0,L.YB)(),or=(0,F.Z)(ie)==="object"?ie:{defaultCurrent:1,defaultPageSize:20,pageSize:20,current:1},$n=Sn.useContainer(),Cr=(0,T.useMemo)(function(){if(!!S)return function(){var Jt=(0,a.Z)((0,r.Z)().mark(function yn(er){var vr,br;return(0,r.Z)().wrap(function(Er){for(;;)switch(Er.prev=Er.next){case 0:return vr=(0,t.Z)((0,t.Z)((0,t.Z)({},er||{}),Mr),W),delete vr._timestamp,Er.next=4,S(vr,Ar,Br);case 4:return br=Er.sent,Er.abrupt("return",br);case 6:case"end":return Er.stop()}},yn)}));return function(yn){return Jt.apply(this,arguments)}}()},[Mr,W,Br,Ar,S]),lr=s(Cr,Q,{pageInfo:ie===!1?!1:or,loading:n.loading,dataSource:n.dataSource,onDataSourceChange:n.onDataSourceChange,onLoad:Tt,onLoadingChange:St,onRequestError:ln,postData:nt,revalidateOnFocus:mr,manual:Mr===void 0,polling:Vn,effects:[(0,Ie.P)(W),(0,Ie.P)(Mr),(0,Ie.P)(Br),(0,Ie.P)(Ar)],debounceTime:n.debounceTime,onPageInfoChange:function(yn){var er,vr;sr==="list"||!ie||!Cr||(ie==null||(er=ie.onChange)===null||er===void 0||er.call(ie,yn.current,yn.pageSize),ie==null||(vr=ie.onShowSizeChange)===null||vr===void 0||vr.call(ie,yn.current,yn.pageSize))}});(0,T.useEffect)(function(){var Jt;if(!(n.manualRequest||!n.request||!mr||((Jt=n.form)===null||Jt===void 0?void 0:Jt.ignoreRules))){var yn=function(){document.visibilityState==="visible"&&lr.reload()};return document.addEventListener("visibilitychange",yn),function(){return document.removeEventListener("visibilitychange",yn)}}},[]);var hr=T.useRef(new Map),jr=T.useMemo(function(){return typeof Hn=="function"?Hn:function(Jt,yn){var er;return yn===-1?Jt==null?void 0:Jt[Hn]:n.name?yn==null?void 0:yn.toString():(er=Jt==null?void 0:Jt[Hn])!==null&&er!==void 0?er:yn==null?void 0:yn.toString()}},[n.name,Hn]);(0,T.useMemo)(function(){var Jt;if(!((Jt=lr.dataSource)===null||Jt===void 0)&&Jt.length){var yn=lr.dataSource.map(function(er){var vr=jr(er,-1);return hr.current.set(vr,er),vr});return yn}return[]},[lr.dataSource,jr]),(0,T.useEffect)(function(){rr.current=yr==null?void 0:yr.map(function(Jt){var yn;return(yn=hr.current)===null||yn===void 0?void 0:yn.get(Jt)})},[yr]);var Xr=(0,T.useMemo)(function(){var Jt=ie===!1?!1:(0,t.Z)({},ie),yn=(0,t.Z)((0,t.Z)({},lr.pageInfo),{},{setPageInfo:function(vr){var br=vr.pageSize,Tr=vr.current,Er=lr.pageInfo;if(br===Er.pageSize||Er.current===1){lr.setPageInfo({pageSize:br,current:Tr});return}S&&lr.setDataSource([]),lr.setPageInfo({pageSize:br,current:sr==="list"?Tr:1})}});return S&&Jt&&(delete Jt.onChange,delete Jt.onShowSizeChange),qe(Jt,yn,Hr)},[ie,lr,Hr]);(0,B.KW)(function(){var Jt;n.request&&W&&lr.dataSource&&(lr==null||(Jt=lr.pageInfo)===null||Jt===void 0?void 0:Jt.current)!==1&&lr.setPageInfo({current:1})},[W]),$n.setPrefixName(n.name);var Ur=(0,T.useCallback)(function(){lt&<.onChange&<.onChange([],[],{type:"none"}),Rr([],[])},[lt,Rr]);$n.setAction(fr.current),$n.propsRef.current=n;var Wr=(0,ye.CB)((0,t.Z)((0,t.Z)({},n.editable),{},{tableName:n.name,getRowKey:jr,childrenColumnName:((p=n.expandable)===null||p===void 0?void 0:p.childrenColumnName)||"children",dataSource:lr.dataSource||[],setDataSource:function(yn){var er,vr;(er=n.editable)===null||er===void 0||(vr=er.onValuesChange)===null||vr===void 0||vr.call(er,void 0,yn),lr.setDataSource(yn)}}));A(fr,lr,{fullScreen:function(){var yn;if(!(!(!((yn=$n.rootDomRef)===null||yn===void 0)&&yn.current)||!document.fullscreenEnabled))if(document.fullscreenElement)document.exitFullscreen();else{var er;(er=$n.rootDomRef)===null||er===void 0||er.current.requestFullscreen()}},onCleanSelected:function(){Ur()},resetAll:function(){var yn;Ur(),Or({}),zr({}),$n.setKeyWords(void 0),lr.setPageInfo({current:1}),gr==null||(yn=gr.current)===null||yn===void 0||yn.resetFields(),Pr({})},editableUtils:Wr}),de&&(de.current=fr.current);var Nr=(0,T.useMemo)(function(){var Jt;return O({columns:Ft,counter:$n,columnEmptyText:_n,type:sr,editableUtils:Wr,rowKey:Hn,childrenColumnName:(Jt=n.expandable)===null||Jt===void 0?void 0:Jt.childrenColumnName}).sort(R($n.columnsMap))},[Ft,$n==null?void 0:$n.sortKeyColumns,$n==null?void 0:$n.columnsMap,_n,sr,Wr.editableKeys&&Wr.editableKeys.join(",")]);(0,B.Au)(function(){if(Nr&&Nr.length>0){var Jt=Nr.map(function(yn){return Wt(yn.key,yn.index)});$n.setSortKeyColumns(Jt)}},[Nr],["render","renderFormItem"],100),(0,B.KW)(function(){var Jt=lr.pageInfo,yn=ie||{},er=yn.current,vr=er===void 0?Jt==null?void 0:Jt.current:er,br=yn.pageSize,Tr=br===void 0?Jt==null?void 0:Jt.pageSize:br;ie&&(vr||Tr)&&(Tr!==(Jt==null?void 0:Jt.pageSize)||vr!==(Jt==null?void 0:Jt.current))&&lr.setPageInfo({pageSize:Tr||Jt.pageSize,current:vr||Jt.current})},[ie&&ie.pageSize,ie&&ie.current]);var Yr=(0,t.Z)((0,t.Z)({selectedRowKeys:yr},lt),{},{onChange:function(yn,er,vr){lt&<.onChange&<.onChange(yn,er,vr),Rr(yn,er)}}),Vr=Et!==!1&&(Et==null?void 0:Et.filterType)==="light",Jr=function(yn){if(te&&te.search){var er,vr,br=te.search===!0?{}:te.search,Tr=br.name,Er=Tr===void 0?"keyword":Tr,qr=(er=te.search)===null||er===void 0||(vr=er.onSearch)===null||vr===void 0?void 0:vr.call(er,$n.keyWords);if(qr!==!1){Pr((0,t.Z)((0,t.Z)({},yn),{},(0,N.Z)({},Er,$n.keyWords)));return}}Pr(yn)},Qr=(0,T.useMemo)(function(){if((0,F.Z)(lr.loading)==="object"){var Jt;return((Jt=lr.loading)===null||Jt===void 0?void 0:Jt.spinning)||!1}return lr.loading},[lr.loading]),Gr=Et===!1&&sr!=="form"?null:(0,h.jsx)(gt,{pagination:Xr,beforeSearchSubmit:vn,action:fr,columns:Ft,onFormSearchSubmit:function(yn){Jr(yn)},ghost:st,onReset:n.onReset,onSubmit:n.onSubmit,loading:!!Qr,manualRequest:gn,search:Et,form:n.form,formRef:gr,type:n.type||"table",cardBordered:n.cardBordered,dateFormatter:n.dateFormatter}),_r=re===!1?null:(0,h.jsx)(Zn,{headerTitle:ae,hideToolbar:te===!1&&!ae&&!re&&!Gn&&!Vr,selectedRows:rr.current,selectedRowKeys:yr,tableColumn:Nr,tooltip:kn,toolbar:Gn,onFormSearchSubmit:function(yn){Pr((0,t.Z)((0,t.Z)({},Mr),yn))},searchNode:Vr?Gr:null,options:te,actionRef:fr,toolBarRender:re}),kr=lt!==!1?(0,h.jsx)(ge,{selectedRowKeys:yr,selectedRows:rr.current,onCleanSelected:Ur,alertOptionRender:cr.tableAlertOptionRender,alertInfoRender:Ht,alwaysShowAlert:lt==null?void 0:lt.alwaysShowAlert}):null;return cn((0,h.jsx)(pn,(0,t.Z)((0,t.Z)({},n),{},{name:fn,defaultClassName:Pe,size:$n.tableSize,onSizeChange:$n.setTableSize,pagination:Xr,searchNode:Gr,rowSelection:lt!==!1?Yr:void 0,className:nr,tableColumn:Nr,isLightFilter:Vr,action:lr,alertDom:kr,toolbarDom:_r,onSortChange:zr,onFilterChange:Or,editableUtils:Wr,getRowKey:jr})))},Ve=function(n){var p=(0,T.useContext)(we.ZP.ConfigContext),c=p.getPrefixCls,S=n.ErrorBoundary===!1?T.Fragment:n.ErrorBoundary||H.S;return(0,h.jsx)(Sn.Provider,{initialState:n,children:(0,h.jsx)(L._Y,{needDeps:!0,children:(0,h.jsx)(S,{children:(0,h.jsx)(hn,(0,t.Z)({defaultClassName:"".concat(c("pro-table"))},n))})})})};Ve.Summary=Se.Z.Summary;var Ae=Ve},86413:function(Cn,ve,e){"use strict";e.d(ve,{Q:function(){return t}});var r=e(1413),a=e(85893),F=e(68508),C=e(51812),N=e(1977),$=e(73177),t=function(T){var h=(0,N.n)((0,$.b)(),"4.24.0")>-1?{menu:T}:{overlay:(0,a.jsx)(F.Z,(0,r.Z)({},T))};return(0,C.Y)(h)}},90081:function(Cn,ve,e){"use strict";e.d(ve,{U:function(){return we}});var r=e(91),a=e(1413),F=e(97685),C=e(85893),N=e(50888),$=e(73177),t=e(46986),j=e(55241),T=e(43825),h=e(67294),Z=e(4942),pe=e(14855),L=function(M){var Ie="".concat(M.antCls,"-progress-bg");return(0,Z.Z)({},M.componentCls,{"&-multiple":{paddingBlockStart:6,paddingBlockEnd:12,paddingInline:8},"&-progress":{"&-success":(0,Z.Z)({},Ie,{backgroundColor:M.colorSuccess}),"&-error":(0,Z.Z)({},Ie,{backgroundColor:M.colorError}),"&-warning":(0,Z.Z)({},Ie,{backgroundColor:M.colorWarning})},"&-rule":{display:"flex",alignItems:"center","&-icon":{"&-default":{display:"flex",alignItems:"center",justifyContent:"center",width:"14px",height:"22px","&-circle":{width:"6px",height:"6px",backgroundColor:M.colorTextSecondary,borderRadius:"4px"}},"&-loading":{color:M.colorPrimary},"&-error":{color:M.colorError},"&-success":{color:M.colorSuccess}},"&-text":{color:M.colorText}}})};function ye(ee){return(0,pe.Xj)("InlineErrorFormItem",function(M){var Ie=(0,a.Z)((0,a.Z)({},M),{},{componentCls:".".concat(ee)});return[L(Ie)]})}var Ce=["label","rules","name","children","popoverProps"],je=["errorType","rules","name","popoverProps","children"],B={marginBlockStart:-5,marginBlockEnd:-5,marginInlineStart:0,marginInlineEnd:0},H=function(M){var Ie=M.inputProps,ue=M.input,Ee=M.extra,_e=M.errorList,xt=M.popoverProps,be=(0,h.useState)(!1),Nn=(0,F.Z)(be,2),ge=Nn[0],me=Nn[1],Oe=(0,h.useState)([]),dt=(0,F.Z)(Oe,2),Te=dt[0],ke=dt[1],Kt=(0,h.useContext)(t.ZP.ConfigContext),Pn=Kt.getPrefixCls,qe=Pn(),A=ye("".concat(qe,"-form-item-with-help")),pt=A.wrapSSR,Zt=A.hashId;(0,h.useEffect)(function(){Ie.validateStatus!=="validating"&&ke(Ie.errors)},[Ie.errors,Ie.validateStatus]);var Lt=(0,$.X)(Te.length<1?!1:ge,function(Wt){Wt!==ge&&me(Wt)});return(0,C.jsx)(j.Z,(0,a.Z)((0,a.Z)((0,a.Z)({trigger:(xt==null?void 0:xt.trigger)||"focus",placement:(xt==null?void 0:xt.placement)||"topRight"},Lt),{},{getPopupContainer:xt==null?void 0:xt.getPopupContainer,getTooltipContainer:xt==null?void 0:xt.getTooltipContainer,content:pt((0,C.jsxs)("div",{className:"".concat(qe,"-form-item-with-help ").concat(Zt),children:[Ie.validateStatus==="validating"?(0,C.jsx)(N.Z,{}):null,_e]}))},xt),{},{children:(0,C.jsxs)("div",{children:[ue,Ee]})}),"popover")},Se=function(M){var Ie=M.label,ue=M.rules,Ee=M.name,_e=M.children,xt=M.popoverProps,be=(0,r.Z)(M,Ce);return(0,C.jsx)(T.Z.Item,(0,a.Z)((0,a.Z)({preserve:!1,name:Ee,rules:ue,hasFeedback:!0,_internalItemRender:{mark:"pro_table_render",render:function(ge,me){return(0,C.jsx)(H,(0,a.Z)({inputProps:ge,popoverProps:xt},me))}}},be),{},{style:(0,a.Z)((0,a.Z)({},B),be==null?void 0:be.style),children:_e}))},we=function(M){var Ie=M.errorType,ue=M.rules,Ee=M.name,_e=M.popoverProps,xt=M.children,be=(0,r.Z)(M,je);return Ee&&(ue==null?void 0:ue.length)&&Ie==="popover"?(0,C.jsx)(Se,(0,a.Z)((0,a.Z)({name:Ee,rules:ue,popoverProps:_e},be),{},{children:xt})):(0,C.jsx)(T.Z.Item,(0,a.Z)((0,a.Z)({rules:ue},be),{},{style:(0,a.Z)((0,a.Z)({},B),be.style),name:Ee,children:xt}))}},77398:function(Cn,ve,e){"use strict";e.d(ve,{X:function(){return N}});var r=e(85893),a=e(17057),F=function(t){var j;return!!(!(t==null||(j=t.valueType)===null||j===void 0)&&j.toString().startsWith("date")||(t==null?void 0:t.valueType)==="select"||(t==null?void 0:t.valueEnum))},C=function(t){var j;return((j=t.ellipsis)===null||j===void 0?void 0:j.showTitle)===!1?!1:t.ellipsis},N=function(t,j,T){if(j.copyable||j.ellipsis){var h=j.copyable&&T?{text:T,tooltips:["",""]}:void 0,Z=F(j),pe=C(j)&&T?{tooltip:(j==null?void 0:j.tooltip)!==!1&&Z?(0,r.jsx)("div",{className:"pro-table-tooltip-text",children:t}):T}:!1;return(0,r.jsx)(a.Z.Text,{style:{width:"100%",margin:0,padding:0},title:"",copyable:h,ellipsis:pe,children:t})}return t}},2026:function(Cn,ve,e){"use strict";e.d(ve,{w:function(){return a}});var r=e(22270),a=function(C,N,$){return N===void 0?C:(0,r.h)(C,N,$)}},28700:function(Cn,ve,e){"use strict";e.d(ve,{v:function(){return r}});var r=function(F){if(F&&F!==!0)return F}},86671:function(Cn,ve,e){"use strict";e.d(ve,{CB:function(){return qe},aX:function(){return Pn},cx:function(){return dt},sN:function(){return Oe}});var r=e(74902),a=e(74165),F=e(84506),C=e(15861),N=e(97685),$=e(4942),t=e(91),j=e(1413),T=e(71002),h=e(85893),Z=e(50888),pe=e(73964),L=e(2453),ye=e(43825),Ce=e(86738),je=e(84164),B=e(60869),H=e(94787),Se=e(20059),we=e(45520),ee=e(67294),M=e(48171),Ie=e(10178),ue=e(41036),Ee=e(27068),_e=e(26369),xt=e(92210),be=["map_row_parentKey"],Nn=["map_row_parentKey","map_row_key"],ge=["map_row_key"],me=function(pt){return(L.ZP.warn||L.ZP.warning)(pt)},Oe=function(pt){return Array.isArray(pt)?pt.join(","):pt};function dt(A,pt){var Zt,Lt=A.getRowKey,Wt=A.row,$t=A.data,Qt=A.childrenColumnName,mn=(Zt=Oe(A.key))===null||Zt===void 0?void 0:Zt.toString(),le=new Map;function We(Rt,zt,wt){Rt.forEach(function(Xe,ft){var gt=(wt||0)*10+ft,_t=Lt(Xe,gt).toString();Xe&&(0,T.Z)(Xe)==="object"&&Qt in Xe&&We(Xe[Qt]||[],_t,gt);var Be=(0,j.Z)((0,j.Z)({},Xe),{},{map_row_key:_t,children:void 0,map_row_parentKey:zt});delete Be.children,zt||delete Be.map_row_parentKey,le.set(_t,Be)})}pt==="top"&&le.set(mn,(0,j.Z)((0,j.Z)({},le.get(mn)),Wt)),We($t),pt==="update"&&le.set(mn,(0,j.Z)((0,j.Z)({},le.get(mn)),Wt)),pt==="delete"&&le.delete(mn);var He=function(zt){var wt=new Map,Xe=[],ft=function(){var _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;zt.forEach(function(Be){if(Be.map_row_parentKey&&!Be.map_row_key){var ce=Be.map_row_parentKey,Ge=(0,t.Z)(Be,be);if(wt.has(ce)||wt.set(ce,[]),_t){var Ye;(Ye=wt.get(ce))===null||Ye===void 0||Ye.push(Ge)}}})};return ft(pt==="top"),zt.forEach(function(gt){if(gt.map_row_parentKey&>.map_row_key){var _t,Be=gt.map_row_parentKey,ce=gt.map_row_key,Ge=(0,t.Z)(gt,Nn);wt.has(ce)&&(Ge[Qt]=wt.get(ce)),wt.has(Be)||wt.set(Be,[]),(_t=wt.get(Be))===null||_t===void 0||_t.push(Ge)}}),ft(pt==="update"),zt.forEach(function(gt){if(!gt.map_row_parentKey){var _t=gt.map_row_key,Be=(0,t.Z)(gt,ge);if(_t&&wt.has(_t)){var ce=(0,j.Z)((0,j.Z)({},Be),{},(0,$.Z)({},Qt,wt.get(_t)));Xe.push(ce);return}Xe.push(Be)}}),Xe};return He(le)}function Te(A,pt){var Zt=A.recordKey,Lt=A.onSave,Wt=A.row,$t=A.children,Qt=A.newLineConfig,mn=A.editorType,le=A.tableName,We=(0,ee.useContext)(ue.J),He=ye.Z.useFormInstance(),Rt=(0,B.Z)(!1),zt=(0,N.Z)(Rt,2),wt=zt[0],Xe=zt[1],ft=(0,M.J)((0,C.Z)((0,a.Z)().mark(function gt(){var _t,Be,ce,Ge,Ye,Ot,z,V,k;return(0,a.Z)().wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:return vt.prev=0,Be=mn==="Map",ce=[le,Array.isArray(Zt)?Zt[0]:Zt].map(function(qt){return qt==null?void 0:qt.toString()}).flat(1).filter(Boolean),Xe(!0),vt.next=6,He.validateFields(ce,{recursive:!0});case 6:return Ge=((_t=We.getFieldFormatValue)===null||_t===void 0?void 0:_t.call(We,ce))||He.getFieldValue(ce),Array.isArray(Zt)&&Zt.length>1&&(Ye=(0,F.Z)(Zt),Ot=Ye.slice(1),z=(0,H.default)(Ge,Ot),(0,Se.Z)(Ge,Ot,z)),V=Be?(0,Se.Z)({},ce,Ge,!0):Ge,vt.next=11,Lt==null?void 0:Lt(Zt,(0,xt.T)({},Wt,V),Wt,Qt);case 11:return k=vt.sent,Xe(!1),vt.abrupt("return",k);case 16:throw vt.prev=16,vt.t0=vt.catch(0),console.log(vt.t0),Xe(!1),vt.t0;case 21:case"end":return vt.stop()}},gt,null,[[0,16]])})));return(0,ee.useImperativeHandle)(pt,function(){return{save:ft}}),(0,h.jsxs)("a",{onClick:function(){var gt=(0,C.Z)((0,a.Z)().mark(function Be(ce){return(0,a.Z)().wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return ce.stopPropagation(),ce.preventDefault(),Ye.prev=2,Ye.next=5,ft();case 5:Ye.next=9;break;case 7:Ye.prev=7,Ye.t0=Ye.catch(2);case 9:case"end":return Ye.stop()}},Be,null,[[2,7]])}));function _t(Be){return gt.apply(this,arguments)}return _t}(),children:[wt?(0,h.jsx)(Z.Z,{style:{marginInlineEnd:8}}):null,$t||"\u4FDD\u5B58"]},"save")}var ke=function(pt){var Zt=pt.recordKey,Lt=pt.onDelete,Wt=pt.row,$t=pt.children,Qt=pt.deletePopconfirmMessage,mn=(0,B.Z)(function(){return!1}),le=(0,N.Z)(mn,2),We=le[0],He=le[1],Rt=(0,M.J)((0,C.Z)((0,a.Z)().mark(function zt(){var wt;return(0,a.Z)().wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return ft.prev=0,He(!0),ft.next=4,Lt==null?void 0:Lt(Zt,Wt);case 4:return wt=ft.sent,He(!1),ft.abrupt("return",wt);case 9:return ft.prev=9,ft.t0=ft.catch(0),console.log(ft.t0),He(!1),ft.abrupt("return",null);case 14:case"end":return ft.stop()}},zt,null,[[0,9]])})));return $t!==!1?(0,h.jsx)(Ce.Z,{title:Qt,onConfirm:function(){return Rt()},children:(0,h.jsxs)("a",{children:[We?(0,h.jsx)(Z.Z,{style:{marginInlineEnd:8}}):null,$t||"\u5220\u9664"]})},"delete"):null},Kt=function(pt){var Zt=pt.recordKey,Lt=pt.tableName,Wt=pt.newLineConfig,$t=pt.editorType,Qt=pt.onCancel,mn=pt.cancelEditable,le=pt.row,We=pt.cancelText,He=(0,ee.useContext)(ue.J),Rt=ye.Z.useFormInstance();return(0,h.jsx)("a",{onClick:function(){var zt=(0,C.Z)((0,a.Z)().mark(function Xe(ft){var gt,_t,Be,ce,Ge,Ye;return(0,a.Z)().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return ft.stopPropagation(),ft.preventDefault(),_t=$t==="Map",Be=[Lt,Zt].flat(1).filter(Boolean),ce=((gt=He.getFieldFormatValue)===null||gt===void 0?void 0:gt.call(He,Be))||Rt.getFieldValue(Be),Ge=_t?(0,Se.Z)({},Be,ce):ce,z.next=8,Qt==null?void 0:Qt(Zt,Ge,le,Wt);case 8:return Ye=z.sent,mn(Zt),Rt.setFieldsValue((0,$.Z)({},Zt,_t?(0,H.default)(le,Be):le)),z.abrupt("return",Ye);case 12:case"end":return z.stop()}},Xe)}));function wt(Xe){return zt.apply(this,arguments)}return wt}(),children:We||"\u53D6\u6D88"},"cancel")};function Pn(A,pt){var Zt=pt.recordKey,Lt=pt.newLineConfig,Wt=pt.saveText,$t=pt.deleteText,Qt=(0,ee.forwardRef)(Te),mn=(0,ee.createRef)();return{save:(0,h.jsx)(Qt,(0,j.Z)((0,j.Z)({},pt),{},{row:A,ref:mn,children:Wt}),"save"+Zt),saveRef:mn,delete:(Lt==null?void 0:Lt.options.recordKey)!==Zt?(0,h.jsx)(ke,(0,j.Z)((0,j.Z)({},pt),{},{row:A,children:$t}),"delete"+Zt):void 0,cancel:(0,h.jsx)(Kt,(0,j.Z)((0,j.Z)({},pt),{},{row:A}),"cancel"+Zt)}}function qe(A){var pt=(0,ee.useState)(void 0),Zt=(0,N.Z)(pt,2),Lt=Zt[0],Wt=Zt[1],$t=(0,ee.useRef)(new Map),Qt=(0,ee.useRef)(void 0);(0,Ee.Au)(function(){var $e=new Map,Re=function De(Je,mt){Je==null||Je.forEach(function(Ut,Vt){var Ze,xe=mt==null?Vt.toString():mt+"_"+Vt.toString();$e.set(xe,Oe(A.getRowKey(Ut,-1))),$e.set((Ze=Oe(A.getRowKey(Ut,-1)))===null||Ze===void 0?void 0:Ze.toString(),xe),A.childrenColumnName&&Ut[A.childrenColumnName]&&De(Ut[A.childrenColumnName],xe)})};Re(A.dataSource),$t.current=$e},[A.dataSource]),Qt.current=Lt;var mn=A.type||"single",le=(0,je.Z)(A.dataSource,"children",A.getRowKey),We=(0,N.Z)(le,1),He=We[0],Rt=(0,B.Z)([],{value:A.editableKeys,onChange:A.onChange?function($e){var Re;A==null||(Re=A.onChange)===null||Re===void 0||Re.call(A,$e.filter(function(De){return De!==void 0}),$e.map(function(De){return He(De)}).filter(function(De){return De!==void 0}))}:void 0}),zt=(0,N.Z)(Rt,2),wt=zt[0],Xe=zt[1],ft=(0,ee.useMemo)(function(){var $e=mn==="single"?wt==null?void 0:wt.slice(0,1):wt;return new Set($e)},[(wt||[]).join(","),mn]),gt=(0,_e.D)(wt),_t=(0,M.J)(function($e){var Re,De,Je,mt,Ut=(Re=A.getRowKey($e,$e.index))===null||Re===void 0||(De=Re.toString)===null||De===void 0?void 0:De.call(Re),Vt=(Je=A.getRowKey($e,-1))===null||Je===void 0||(mt=Je.toString)===null||mt===void 0?void 0:mt.call(Je),Ze=wt.map(function(oe){return oe==null?void 0:oe.toString()}),xe=(gt==null?void 0:gt.map(function(oe){return oe==null?void 0:oe.toString()}))||[],he=A.tableName&&!!(xe!=null&&xe.includes(Vt))||!!(xe!=null&&xe.includes(Ut));return{recordKey:Vt,isEditable:A.tableName&&(Ze==null?void 0:Ze.includes(Vt))||(Ze==null?void 0:Ze.includes(Ut)),preIsEditable:he}}),Be=(0,M.J)(function($e){return ft.size>0&&mn==="single"&&A.onlyOneLineEditorAlertMessage!==!1?(me(A.onlyOneLineEditorAlertMessage||"\u53EA\u80FD\u540C\u65F6\u7F16\u8F91\u4E00\u884C"),!1):(ft.add($e),Xe(Array.from(ft)),!0)}),ce=(0,M.J)(function(){var $e=(0,C.Z)((0,a.Z)().mark(function Re(De,Je){var mt,Ut;return(0,a.Z)().wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:if(mt=Oe(De).toString(),Ut=$t.current.get(mt),!(!ft.has(mt)&&Ut&&(Je!=null?Je:!0)&&A.tableName)){Ze.next=5;break}return ce(Ut,!1),Ze.abrupt("return");case 5:return Lt&&Lt.options.recordKey===De&&Wt(void 0),ft.delete(mt),ft.delete(Oe(De)),Xe(Array.from(ft)),Ze.abrupt("return",!0);case 10:case"end":return Ze.stop()}},Re)}));return function(Re,De){return $e.apply(this,arguments)}}()),Ge=(0,Ie.D)((0,C.Z)((0,a.Z)().mark(function $e(){var Re,De,Je,mt,Ut=arguments;return(0,a.Z)().wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:for(De=Ut.length,Je=new Array(De),mt=0;mt0&&mn==="single"&&A.onlyOneLineEditorAlertMessage!==!1)return me(A.onlyOneLineEditorAlertMessage||"\u53EA\u80FD\u540C\u65F6\u7F16\u8F91\u4E00\u884C"),!1;var De=A.getRowKey($e,-1);if(!De)throw(0,we.noteOnce)(!!De,`\u8BF7\u8BBE\u7F6E recordCreatorProps.record \u5E76\u8FD4\u56DE\u4E00\u4E2A\u552F\u4E00\u7684key + https://procomponents.ant.design/components/editable-table#editable-%E6%96%B0%E5%BB%BA%E8%A1%8C`),new Error("\u8BF7\u8BBE\u7F6E recordCreatorProps.record \u5E76\u8FD4\u56DE\u4E00\u4E2A\u552F\u4E00\u7684key");if(ft.add(De),Xe(Array.from(ft)),(Re==null?void 0:Re.newRecordType)==="dataSource"||A.tableName){var Je,mt={data:A.dataSource,getRowKey:A.getRowKey,row:(0,j.Z)((0,j.Z)({},$e),{},{map_row_parentKey:Re!=null&&Re.parentKey?(Je=Oe(Re==null?void 0:Re.parentKey))===null||Je===void 0?void 0:Je.toString():void 0}),key:De,childrenColumnName:A.childrenColumnName||"children"};A.setDataSource(dt(mt,(Re==null?void 0:Re.position)==="top"?"top":"update"))}else Wt({defaultValue:$e,options:(0,j.Z)((0,j.Z)({},Re),{},{recordKey:De})});return!0}),k=(0,pe.YB)(),Ke=(A==null?void 0:A.saveText)||k.getMessage("editableTable.action.save","\u4FDD\u5B58"),vt=(A==null?void 0:A.deleteText)||k.getMessage("editableTable.action.delete","\u5220\u9664"),qt=(A==null?void 0:A.cancelText)||k.getMessage("editableTable.action.cancel","\u53D6\u6D88"),Sn=(0,M.J)(function(){var $e=(0,C.Z)((0,a.Z)().mark(function Re(De,Je,mt,Ut){var Vt,Ze,xe,he,oe,Dt,Kn;return(0,a.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return he=Ut||Qt.current||{},oe=he.options,d.next=3,A==null||(Vt=A.onSave)===null||Vt===void 0?void 0:Vt.call(A,De,Je,mt,Ut);case 3:if(Dt=d.sent,ce(De),!(!(oe!=null&&oe.parentKey)&&(oe==null?void 0:oe.recordKey)===De)){d.next=8;break}return(oe==null?void 0:oe.position)==="top"?A.setDataSource([Je].concat((0,r.Z)(A.dataSource))):A.setDataSource([].concat((0,r.Z)(A.dataSource),[Je])),d.abrupt("return",Dt);case 8:return Kn={data:A.dataSource,getRowKey:A.getRowKey,row:oe?(0,j.Z)((0,j.Z)({},Je),{},{map_row_parentKey:(Ze=Oe((xe=oe==null?void 0:oe.parentKey)!==null&&xe!==void 0?xe:""))===null||Ze===void 0?void 0:Ze.toString()}):Je,key:De,childrenColumnName:A.childrenColumnName||"children"},A.setDataSource(dt(Kn,(oe==null?void 0:oe.position)==="top"?"top":"update")),d.abrupt("return",Dt);case 11:case"end":return d.stop()}},Re)}));return function(Re,De,Je,mt){return $e.apply(this,arguments)}}()),bn=(0,M.J)(function(){var $e=(0,C.Z)((0,a.Z)().mark(function Re(De,Je){var mt,Ut,Vt;return(0,a.Z)().wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return Ut={data:A.dataSource,getRowKey:A.getRowKey,row:Je,key:De,childrenColumnName:A.childrenColumnName||"children"},xe.next=3,A==null||(mt=A.onDelete)===null||mt===void 0?void 0:mt.call(A,De,Je);case 3:return Vt=xe.sent,xe.next=6,ce(De);case 6:return A.setDataSource(dt(Ut,"delete")),xe.abrupt("return",Vt);case 8:case"end":return xe.stop()}},Re)}));return function(Re,De){return $e.apply(this,arguments)}}()),Un=(0,M.J)(function(){var $e=(0,C.Z)((0,a.Z)().mark(function Re(De,Je,mt,Ut){var Vt,Ze;return(0,a.Z)().wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return he.next=2,A==null||(Vt=A.onCancel)===null||Vt===void 0?void 0:Vt.call(A,De,Je,mt,Ut);case 2:return Ze=he.sent,he.abrupt("return",Ze);case 4:case"end":return he.stop()}},Re)}));return function(Re,De,Je,mt){return $e.apply(this,arguments)}}()),Dn=function(Re){var De=A.getRowKey(Re,Re.index),Je={saveText:Ke,cancelText:qt,deleteText:vt,addEditRecord:V,recordKey:De,cancelEditable:ce,index:Re.index,tableName:A.tableName,newLineConfig:Lt,onCancel:Un,onDelete:bn,onSave:Sn,editableKeys:wt,setEditableRowKeys:Xe,deletePopconfirmMessage:A.deletePopconfirmMessage||"".concat(k.getMessage("deleteThisLine","\u5220\u9664\u6B64\u884C"),"?")},mt=Pn(Re,Je);return A.tableName?Ot.current.set($t.current.get(Oe(De))||Oe(De),mt.saveRef):Ot.current.set(Oe(De),mt.saveRef),A.actionRender?A.actionRender(Re,Je,{save:mt.save,delete:mt.delete,cancel:mt.cancel}):[mt.save,mt.delete,mt.cancel]};return{editableKeys:wt,setEditableRowKeys:Xe,isEditable:_t,actionRender:Dn,startEditable:Be,cancelEditable:ce,addEditRecord:V,saveEditable:z,newLineRecord:Lt,preEditableKeys:gt,onValuesChange:Ye}}},86738:function(Cn,ve,e){"use strict";e.d(ve,{Z:function(){return ge}});var r=e(87462),a=e(97685),F=e(21640),C=e(94184),N=e.n(C),$=e(21770),t=e(15105),j=e(67294),T=e(98423),h=e(53124),Z=e(55241),pe=e(96159),L=e(71577),ye=e(5214),Ce=e(86743),je=e(77667),B=e(24457),H=e(81643),Se=e(60590),we=e(4942),ee=e(67968),M=function(Oe){var dt,Te,ke=Oe.componentCls,Kt=Oe.iconCls,Pn=Oe.zIndexPopup,qe=Oe.colorText,A=Oe.colorWarning,pt=Oe.marginXS,Zt=Oe.fontSize,Lt=Oe.lineHeight;return(0,we.Z)({},ke,(Te={zIndex:Pn},(0,we.Z)(Te,ke+"-inner-content",{color:qe}),(0,we.Z)(Te,ke+"-message",(dt={position:"relative",marginBottom:pt,color:qe,fontSize:Zt,display:"flex",flexWrap:"nowrap",alignItems:"start"},(0,we.Z)(dt,"> "+ke+"-message-icon "+Kt,{color:A,fontSize:Zt,flex:"none",lineHeight:1,paddingTop:(Math.round(Zt*Lt)-Zt)/2}),(0,we.Z)(dt,"&-title",{flex:"auto",marginInlineStart:pt}),dt)),(0,we.Z)(Te,ke+"-buttons",{textAlign:"end",button:{marginInlineStart:pt}}),Te))},Ie=(0,ee.Z)("Popconfirm",function(me){return M(me)},function(me){var Oe=me.zIndexPopupBase;return{zIndexPopup:Oe+60}}),ue=function(me,Oe){var dt={};for(var Te in me)Object.prototype.hasOwnProperty.call(me,Te)&&Oe.indexOf(Te)<0&&(dt[Te]=me[Te]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ke=0,Te=Object.getOwnPropertySymbols(me);ke0?Ce:h}),M=Math.ceil((Ce||h)/ee.pageSize);ee.current>M&&(ee.current=M||1);var Ie=function(_e,xt){we({current:_e!=null?_e:1,pageSize:xt||ee.pageSize})},ue=function(_e,xt){var be;Z&&((be=Z.onChange)===null||be===void 0||be.call(Z,_e,xt)),Ie(_e,xt),pe(_e,xt||(ee==null?void 0:ee.pageSize))};return Z===!1?[{},function(){}]:[(0,r.Z)((0,r.Z)({},ee),{onChange:ue}),Ie]}},93125:function(Cn,ve,e){"use strict";e.d(ve,{HK:function(){return B},TA:function(){return Se},W$:function(){return H},ZP:function(){return Ie},rM:function(){return we}});var r=e(4942),a=e(84506),F=e(87462),C=e(97685),N=e(74902),$=e(71002),t=e(80882),j=e(82327),T=e(10225),h=e(17341),Z=e(1089),pe=e(21770),L=e(67294),ye=e(32808),Ce=e(13013),je=e(78045),B={},H="SELECT_ALL",Se="SELECT_INVERT",we="SELECT_NONE",ee=[];function M(ue,Ee){var _e=[];return(ue||[]).forEach(function(xt){_e.push(xt),xt&&(0,$.Z)(xt)==="object"&&Ee in xt&&(_e=[].concat((0,N.Z)(_e),(0,N.Z)(M(xt[Ee],Ee))))}),_e}function Ie(ue,Ee){var _e=ue||{},xt=_e.preserveSelectedRowKeys,be=_e.selectedRowKeys,Nn=_e.defaultSelectedRowKeys,ge=_e.getCheckboxProps,me=_e.onChange,Oe=_e.onSelect,dt=_e.onSelectAll,Te=_e.onSelectInvert,ke=_e.onSelectNone,Kt=_e.onSelectMultiple,Pn=_e.columnWidth,qe=_e.type,A=_e.selections,pt=_e.fixed,Zt=_e.renderCell,Lt=_e.hideSelectAll,Wt=_e.checkStrictly,$t=Wt===void 0?!0:Wt,Qt=Ee.prefixCls,mn=Ee.data,le=Ee.pageData,We=Ee.getRecordByKey,He=Ee.getRowKey,Rt=Ee.expandType,zt=Ee.childrenColumnName,wt=Ee.locale,Xe=Ee.getPopupContainer,ft=(0,pe.Z)(be||Nn||ee,{value:be}),gt=(0,C.Z)(ft,2),_t=gt[0],Be=gt[1],ce=L.useRef(new Map),Ge=(0,L.useCallback)(function(Ze){if(xt){var xe=new Map;Ze.forEach(function(he){var oe=We(he);!oe&&ce.current.has(he)&&(oe=ce.current.get(he)),xe.set(he,oe)}),ce.current=xe}},[We,xt]);L.useEffect(function(){Ge(_t)},[_t]);var Ye=(0,L.useMemo)(function(){return $t?{keyEntities:null}:(0,Z.I8)(mn,{externalGetKey:He,childrenPropName:zt})},[mn,He,$t,zt]),Ot=Ye.keyEntities,z=(0,L.useMemo)(function(){return M(le,zt)},[le,zt]),V=(0,L.useMemo)(function(){var Ze=new Map;return z.forEach(function(xe,he){var oe=He(xe,he),Dt=(ge?ge(xe):null)||{};Ze.set(oe,Dt)}),Ze},[z,He,ge]),k=(0,L.useCallback)(function(Ze){var xe;return!!(!((xe=V.get(He(Ze)))===null||xe===void 0)&&xe.disabled)},[V,He]),Ke=(0,L.useMemo)(function(){if($t)return[_t||[],[]];var Ze=(0,h.S)(_t,!0,Ot,k),xe=Ze.checkedKeys,he=Ze.halfCheckedKeys;return[xe||[],he]},[_t,$t,Ot,k]),vt=(0,C.Z)(Ke,2),qt=vt[0],Sn=vt[1],bn=(0,L.useMemo)(function(){var Ze=qe==="radio"?qt.slice(0,1):qt;return new Set(Ze)},[qt,qe]),Un=(0,L.useMemo)(function(){return qe==="radio"?new Set:new Set(Sn)},[Sn,qe]),Dn=(0,L.useState)(null),$e=(0,C.Z)(Dn,2),Re=$e[0],De=$e[1];L.useEffect(function(){ue||Be(ee)},[!!ue]);var Je=(0,L.useCallback)(function(Ze,xe){var he,oe;Ge(Ze),xt?(he=Ze,oe=Ze.map(function(Dt){return ce.current.get(Dt)})):(he=[],oe=[],Ze.forEach(function(Dt){var Kn=We(Dt);Kn!==void 0&&(he.push(Dt),oe.push(Kn))})),Be(he),me==null||me(he,oe,{type:xe})},[Be,We,me,xt]),mt=(0,L.useCallback)(function(Ze,xe,he,oe){if(Oe){var Dt=he.map(function(Kn){return We(Kn)});Oe(We(Ze),xe,Dt,oe)}Je(he,"single")},[Oe,We,Je]),Ut=(0,L.useMemo)(function(){if(!A||Lt)return null;var Ze=A===!0?[H,Se,we]:A;return Ze.map(function(xe){return xe===H?{key:"all",text:wt.selectionAll,onSelect:function(){Je(mn.map(function(oe,Dt){return He(oe,Dt)}).filter(function(oe){var Dt=V.get(oe);return!(Dt!=null&&Dt.disabled)||bn.has(oe)}),"all")}}:xe===Se?{key:"invert",text:wt.selectInvert,onSelect:function(){var oe=new Set(bn);le.forEach(function(Kn,b){var d=He(Kn,b),o=V.get(d);o!=null&&o.disabled||(oe.has(d)?oe.delete(d):oe.add(d))});var Dt=Array.from(oe);Te&&Te(Dt),Je(Dt,"invert")}}:xe===we?{key:"none",text:wt.selectNone,onSelect:function(){ke==null||ke(),Je(Array.from(bn).filter(function(oe){var Dt=V.get(oe);return Dt==null?void 0:Dt.disabled}),"none")}}:xe}).map(function(xe){return(0,F.Z)((0,F.Z)({},xe),{onSelect:function(){for(var oe,Dt,Kn=arguments.length,b=new Array(Kn),d=0;d1&&arguments[1]!==void 0?arguments[1]:{},R=s.getContainer,y=R===void 0?function(){return window}:R,I=s.callback,E=s.duration,se=E===void 0?450:E,J=y(),_=M(J,!0),Ct=Date.now(),jt=function rt(){var Yt=Date.now(),sn=Yt-Ct,wn=we(sn>se?se:sn,_,m,se);ee(J)?J.scrollTo(window.pageXOffset,wn):J instanceof Document||J.constructor.name==="HTMLDocument"?J.documentElement.scrollTop=wn:J.scrollTop=wn,sn0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1},rn=Pe.confirm,jn=Pe.closeDropdown;rn&&Ft([]),jn&&Wn(!1),de(""),p(Jn?(tr||[]).map(function(sr){return String(sr)}):[])},ln=function(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0},rn=Pe.closeDropdown;rn&&Wn(!1),Ft(n())},Gt=function(Pe){Pe&&Ve!==void 0&&p(Ve||[]),Wn(Pe),!Pe&&!E.filterDropdown&&re()},At=$()((0,a.Z)({},se+"-menu-without-submenu",!Ot(E.filters||[]))),Bn=function(Pe){if(Pe.target.checked){var rn=Sn(E==null?void 0:E.filters).map(function(jn){return String(jn)});p(rn)}else p([])},It=function Ht(Pe){var rn=Pe.filters;return(rn||[]).map(function(jn,sr){var ur=String(jn.value),_n={title:jn.text,key:jn.value!==void 0?ur:sr};return jn.children&&(_n.children=Ht({filters:jn.children})),_n})},xn=function Ht(Pe){var rn;return(0,C.Z)((0,C.Z)({},Pe),{text:Pe.title,value:Pe.key,children:((rn=Pe.children)===null||rn===void 0?void 0:rn.map(function(jn){return Ht(jn)}))||[]})},nn;if(typeof E.filterDropdown=="function")nn=E.filterDropdown({prefixCls:se+"-custom",setSelectedKeys:function(Pe){return c({selectedKeys:Pe})},selectedKeys:n(),confirm:ln,clearFilters:Tt,filters:E.filters,visible:hn,close:function(){Wn(!1)}});else if(E.filterDropdown)nn=E.filterDropdown;else{var te=n()||[],Et=function(){return(E.filters||[]).length===0?Z.createElement(mn.Z,{image:mn.Z.PRESENTED_IMAGE_SIMPLE,description:En.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):jt==="tree"?Z.createElement(Z.Fragment,null,Z.createElement(_t,{filterSearch:Yt,value:ie,onChange:Fe,tablePrefixCls:y,locale:En}),Z.createElement("div",{className:y+"-filter-dropdown-tree"},_?Z.createElement($t.Z,{checked:te.length===Sn(E.filters).length,indeterminate:te.length>0&&te.length "+J+"-container",(0,a.Z)({},"> "+J+"-content, > "+J+"-body",{"> table > tbody > tr > td":(0,a.Z)({},"> "+J+"-expanded-row-fixed",{margin:"-"+Yt+"px -"+(sn+s.lineWidth)+"px"})})))};return(0,a.Z)({},J+"-wrapper",(se={},(0,a.Z)(se,""+J+J+"-bordered",(0,C.Z)((0,C.Z)((0,C.Z)((I={},(0,a.Z)(I,"> "+J+"-title",{border:_,borderBottom:0}),(0,a.Z)(I,"> "+J+"-container",(y={borderInlineStart:_},(0,a.Z)(y,` + > `+J+`-content, + > `+J+`-header, + > `+J+`-body, + > `+J+`-summary + `,{"> table":(R={},(0,a.Z)(R,` + > thead > tr > th, + > tbody > tr > td, + > tfoot > tr > th, + > tfoot > tr > td + `,{borderInlineEnd:_}),(0,a.Z)(R,"> thead",{"> tr:not(:last-child) > th":{borderBottom:_},"> tr > th::before":{backgroundColor:"transparent !important"}}),(0,a.Z)(R,` + > thead > tr, + > tbody > tr, + > tfoot > tr + `,(0,a.Z)({},"> "+J+"-cell-fix-right-first::after",{borderInlineEnd:_})),(0,a.Z)(R,"> table > tbody > tr > td",(0,a.Z)({},"> "+J+"-expanded-row-fixed",{margin:"-"+s.tablePaddingVertical+"px -"+(s.tablePaddingHorizontal+s.lineWidth)+"px","&::after":{position:"absolute",top:0,insetInlineEnd:s.lineWidth,bottom:0,borderInlineEnd:_,content:'""'}})),R)}),(0,a.Z)(y,` + > `+J+`-content, + > `+J+`-header + `,{"> table":{borderTop:_}}),y)),(0,a.Z)(I,"&"+J+"-scroll-horizontal",(0,a.Z)({},"> "+J+"-container > "+J+"-body",{"> table > tbody":(0,a.Z)({},` + > tr`+J+`-expanded-row, + > tr`+J+`-placeholder + `,{"> td":{borderInlineEnd:0}})})),I),Ct("middle",s.tablePaddingVerticalMiddle,s.tablePaddingHorizontalMiddle)),Ct("small",s.tablePaddingVerticalSmall,s.tablePaddingHorizontalSmall)),(0,a.Z)({},"> "+J+"-footer",{border:_,borderTop:0}))),(0,a.Z)(se,J+"-cell",(E={},(0,a.Z)(E,J+"-container:first-child",{borderTop:0}),(0,a.Z)(E,"&-scrollbar:not([rowspan])",{boxShadow:"0 "+s.lineWidth+"px 0 "+s.lineWidth+"px "+s.tableHeaderBg}),E)),se))},ne=G,q=e(14747),Y=function(s){var R,y=s.componentCls;return(0,a.Z)({},y+"-wrapper",(0,a.Z)({},y+"-cell-ellipsis",(0,C.Z)((0,C.Z)({},q.vS),(R={wordBreak:"keep-all"},(0,a.Z)(R,` + &`+y+`-cell-fix-left-last, + &`+y+`-cell-fix-right-first + `,(0,a.Z)({overflow:"visible"},y+"-cell-content",{display:"block",overflow:"hidden",textOverflow:"ellipsis"})),(0,a.Z)(R,y+"-column-title",{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}),R))))},ot=Y,at=function(s){var R=s.componentCls;return(0,a.Z)({},R+"-wrapper",(0,a.Z)({},R+"-tbody > tr"+R+"-placeholder",{textAlign:"center",color:s.colorTextDisabled,"&:hover > td":{background:s.colorBgContainer}}))},ct=at,Qe=e(49867),Le=function(s){var R,y,I=s.componentCls,E=s.antCls,se=s.controlInteractiveSize,J=s.motionDurationSlow,_=s.lineWidth,Ct=s.paddingXS,jt=s.lineType,rt=s.tableBorderColor,Yt=s.tableExpandIconBg,sn=s.tableExpandColumnWidth,wn=s.borderRadius,En=s.fontSize,dn=s.fontSizeSM,On=s.lineHeight,Fn=s.tablePaddingVertical,Ln=s.tablePaddingHorizontal,Jn=s.tableExpandedRowBg,tr=s.paddingXXS,dr=se/2-_,i=dr*2+_*3,x=_+"px "+jt+" "+rt,O=tr-_;return(0,a.Z)({},I+"-wrapper",(y={},(0,a.Z)(y,I+"-expand-icon-col",{width:sn}),(0,a.Z)(y,I+"-row-expand-icon-cell",(0,a.Z)({textAlign:"center"},I+"-row-expand-icon",{display:"inline-flex",float:"none",verticalAlign:"sub"})),(0,a.Z)(y,I+"-row-indent",{height:1,float:"left"}),(0,a.Z)(y,I+"-row-expand-icon",(0,C.Z)((0,C.Z)({},(0,Qe.N)(s)),(R={position:"relative",float:"left",boxSizing:"border-box",width:i,height:i,padding:0,color:"inherit",lineHeight:i+"px",background:Yt,border:x,borderRadius:wn,transform:"scale("+se/i+")",transition:"all "+J,userSelect:"none"},(0,a.Z)(R,"&:focus, &:hover, &:active",{borderColor:"currentcolor"}),(0,a.Z)(R,"&::before, &::after",{position:"absolute",background:"currentcolor",transition:"transform "+J+" ease-out",content:'""'}),(0,a.Z)(R,"&::before",{top:dr,insetInlineEnd:O,insetInlineStart:O,height:_}),(0,a.Z)(R,"&::after",{top:O,bottom:O,insetInlineStart:dr,width:_,transform:"rotate(90deg)"}),(0,a.Z)(R,"&-collapsed::before",{transform:"rotate(-180deg)"}),(0,a.Z)(R,"&-collapsed::after",{transform:"rotate(0deg)"}),(0,a.Z)(R,"&-spaced",{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}),R))),(0,a.Z)(y,I+"-row-indent + "+I+"-row-expand-icon",{marginTop:(En*On-_*3)/2-Math.ceil((dn*1.4-_*3)/2),marginInlineEnd:Ct}),(0,a.Z)(y,"tr"+I+"-expanded-row",(0,a.Z)({"&, &:hover":{"> td":{background:Jn}}},E+"-descriptions-view",{display:"flex",table:{flex:"auto",width:"auto"}})),(0,a.Z)(y,I+"-expanded-row-fixed",{position:"relative",margin:"-"+Fn+"px -"+Ln+"px",padding:Fn+"px "+Ln+"px"}),y))},Ue=Le,ut=function(s){var R,y,I,E,se=s.componentCls,J=s.antCls,_=s.iconCls,Ct=s.tableFilterDropdownWidth,jt=s.tableFilterDropdownSearchWidth,rt=s.paddingXXS,Yt=s.paddingXS,sn=s.colorText,wn=s.lineWidth,En=s.lineType,dn=s.tableBorderColor,On=s.tableHeaderIconColor,Fn=s.fontSizeSM,Ln=s.tablePaddingHorizontal,Jn=s.borderRadius,tr=s.motionDurationSlow,dr=s.colorTextDescription,i=s.colorPrimary,x=s.colorPrimaryActive,O=s.tableHeaderFilterActiveBg,tt=s.colorTextDisabled,Rn=s.tableFilterDropdownBg,pn=s.tableFilterDropdownHeight,Wn=s.controlItemBgHover,hn=s.boxShadow,Ve=J+"-dropdown",Ae=se+"-filter-dropdown",u=J+"-tree",n=wn+"px "+En+" "+dn;return[(0,a.Z)({},se+"-wrapper",(R={},(0,a.Z)(R,se+"-filter-column",{display:"flex",justifyContent:"space-between"}),(0,a.Z)(R,se+"-filter-trigger",{position:"relative",display:"flex",alignItems:"center",marginBlock:-rt,marginInline:rt+"px "+-Ln/2+"px",padding:"0 "+rt+"px",color:On,fontSize:Fn,borderRadius:Jn,cursor:"pointer",transition:"all "+tr,"&:hover":{color:dr,background:O},"&.active":{color:i}}),R)),(0,a.Z)({},J+"-dropdown",(0,a.Z)({},Ae,(0,C.Z)((0,C.Z)({},(0,q.Wf)(s)),(I={minWidth:Ct,backgroundColor:Rn,borderRadius:Jn,boxShadow:hn},(0,a.Z)(I,Ve+"-menu",{maxHeight:pn,overflowX:"hidden",border:0,boxShadow:"none","&:empty::after":{display:"block",padding:Yt+"px 0",color:tt,fontSize:Fn,textAlign:"center",content:'"Not Found"'}}),(0,a.Z)(I,Ae+"-tree",(y={paddingBlock:Yt+"px 0",paddingInline:Yt},(0,a.Z)(y,u,{padding:0}),(0,a.Z)(y,u+"-treenode "+u+"-node-content-wrapper:hover",{backgroundColor:Wn}),(0,a.Z)(y,u+"-treenode-checkbox-checked "+u+"-node-content-wrapper",{"&, &:hover":{backgroundColor:x}}),y)),(0,a.Z)(I,Ae+"-search",{padding:Yt,borderBottom:n,"&-input":(0,a.Z)({input:{minWidth:jt}},_,{color:tt})}),(0,a.Z)(I,Ae+"-checkall",{width:"100%",marginBottom:rt,marginInlineStart:rt}),(0,a.Z)(I,Ae+"-btns",{display:"flex",justifyContent:"space-between",padding:Yt-wn+"px "+Yt+"px",overflow:"hidden",backgroundColor:"inherit",borderTop:n}),I)))),(0,a.Z)({},J+"-dropdown "+Ae+", "+Ae+"-submenu",(E={},(0,a.Z)(E,J+"-checkbox-wrapper + span",{paddingInlineStart:Yt,color:sn}),(0,a.Z)(E,"> ul",{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}),E))]},ht=ut,Pt=function(s){var R,y,I,E=s.componentCls,se=s.lineWidth,J=s.colorSplit,_=s.motionDurationSlow,Ct=s.zIndexTableFixed,jt=s.tableBg,rt=J;return(0,a.Z)({},E+"-wrapper",(I={},(0,a.Z)(I,` + `+E+`-cell-fix-left, + `+E+`-cell-fix-right + `,{position:"sticky !important",zIndex:Ct,background:jt}),(0,a.Z)(I,` + `+E+`-cell-fix-left-first::after, + `+E+`-cell-fix-left-last::after + `,{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-se,width:30,transform:"translateX(100%)",transition:"box-shadow "+_,content:'""',pointerEvents:"none"}),(0,a.Z)(I,E+"-cell-fix-left-all::after",{display:"none"}),(0,a.Z)(I,` + `+E+`-cell-fix-right-first::after, + `+E+`-cell-fix-right-last::after + `,{position:"absolute",top:0,bottom:-se,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:"box-shadow "+_,content:'""',pointerEvents:"none"}),(0,a.Z)(I,E+"-container",{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:Ct,width:30,transition:"box-shadow "+_,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}}),(0,a.Z)(I,E+"-ping-left",(R={},(0,a.Z)(R,"&:not("+E+"-has-fix-left) "+E+"-container",{position:"relative","&::before":{boxShadow:"inset 10px 0 8px -8px "+rt}}),(0,a.Z)(R,` + `+E+`-cell-fix-left-first::after, + `+E+`-cell-fix-left-last::after + `,{boxShadow:"inset 10px 0 8px -8px "+rt}),(0,a.Z)(R,E+"-cell-fix-left-last::before",{backgroundColor:"transparent !important"}),R)),(0,a.Z)(I,E+"-ping-right",(y={},(0,a.Z)(y,"&:not("+E+"-has-fix-right) "+E+"-container",{position:"relative","&::after":{boxShadow:"inset -10px 0 8px -8px "+rt}}),(0,a.Z)(y,` + `+E+`-cell-fix-right-first::after, + `+E+`-cell-fix-right-last::after + `,{boxShadow:"inset -10px 0 8px -8px "+rt}),y)),I))},yt=Pt,en=function(s){var R,y=s.componentCls,I=s.antCls;return(0,a.Z)({},y+"-wrapper",(R={},(0,a.Z)(R,y+"-pagination"+I+"-pagination",{margin:s.margin+"px 0"}),(0,a.Z)(R,y+"-pagination",{display:"flex",flexWrap:"wrap",rowGap:s.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}),R))},Bt=en,an=function(s){var R,y=s.componentCls,I=s.tableRadius;return(0,a.Z)({},y+"-wrapper",(0,a.Z)({},y,(R={},(0,a.Z)(R,y+"-title",{borderRadius:I+"px "+I+"px 0 0"}),(0,a.Z)(R,y+"-title + "+y+"-container",{borderStartStartRadius:0,borderStartEndRadius:0,table:{borderRadius:0,"> thead > tr:first-child":{"th:first-child":{borderRadius:0},"th:last-child":{borderRadius:0}}}}),(0,a.Z)(R,"&-container",{borderStartStartRadius:I,borderStartEndRadius:I,"table > thead > tr:first-child":{"th:first-child":{borderStartStartRadius:I},"th:last-child":{borderStartEndRadius:I}}}),(0,a.Z)(R,"&-footer",{borderRadius:"0 0 "+I+"px "+I+"px"}),R)))},Nt=an,Xt=function(s){var R,y=s.componentCls;return(0,a.Z)({},y+"-wrapper-rtl",(R={direction:"rtl",table:{direction:"rtl"}},(0,a.Z)(R,y+"-pagination-left",{justifyContent:"flex-end"}),(0,a.Z)(R,y+"-pagination-right",{justifyContent:"flex-start"}),(0,a.Z)(R,y+"-row-expand-icon",{"&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}}),R))},on=Xt,it=function(s){var R,y=s.componentCls,I=s.antCls,E=s.iconCls,se=s.fontSizeIcon,J=s.paddingXS,_=s.tableHeaderIconColor,Ct=s.tableHeaderIconColorHover;return(0,a.Z)({},y+"-wrapper",(R={},(0,a.Z)(R,y+"-selection-col",{width:s.tableSelectionColumnWidth}),(0,a.Z)(R,y+"-bordered "+y+"-selection-col",{width:s.tableSelectionColumnWidth+J*2}),(0,a.Z)(R,` + table tr th`+y+`-selection-column, + table tr td`+y+`-selection-column + `,(0,a.Z)({paddingInlineEnd:s.paddingXS,paddingInlineStart:s.paddingXS,textAlign:"center"},I+"-radio-wrapper",{marginInlineEnd:0})),(0,a.Z)(R,"table tr th"+y+"-selection-column"+y+"-cell-fix-left",{zIndex:s.zIndexTableFixed}),(0,a.Z)(R,"table tr th"+y+"-selection-column::after",{backgroundColor:"transparent !important"}),(0,a.Z)(R,y+"-selection",{position:"relative",display:"inline-flex",flexDirection:"column"}),(0,a.Z)(R,y+"-selection-extra",(0,a.Z)({position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:"all "+s.motionDurationSlow,marginInlineStart:"100%",paddingInlineStart:s.tablePaddingHorizontal/4+"px"},E,{color:_,fontSize:se,verticalAlign:"baseline","&:hover":{color:Ct}})),R))},Ne=it,et=function(s){var R=s.componentCls,y=function(E,se,J,_){var Ct;return(0,a.Z)({},""+R+R+"-"+E,(Ct={fontSize:_},(0,a.Z)(Ct,` + `+R+`-title, + `+R+`-footer, + `+R+`-thead > tr > th, + `+R+`-tbody > tr > td, + tfoot > tr > th, + tfoot > tr > td + `,{padding:se+"px "+J+"px"}),(0,a.Z)(Ct,R+"-filter-trigger",{marginInlineEnd:"-"+J/2+"px"}),(0,a.Z)(Ct,R+"-expanded-row-fixed",{margin:"-"+se+"px -"+J+"px"}),(0,a.Z)(Ct,R+"-tbody",(0,a.Z)({},R+"-wrapper:only-child "+R,{marginBlock:"-"+se+"px",marginInline:s.tableExpandColumnWidth-J+"px -"+J+"px"})),(0,a.Z)(Ct,R+"-selection-column",{paddingInlineStart:J/4+"px"}),Ct))};return(0,a.Z)({},R+"-wrapper",(0,C.Z)((0,C.Z)({},y("middle",s.tablePaddingVerticalMiddle,s.tablePaddingHorizontalMiddle,s.tableFontSizeMiddle)),y("small",s.tablePaddingVerticalSmall,s.tablePaddingHorizontalSmall,s.tableFontSizeSmall)))},un=et,Tn=function(s){var R,y=s.componentCls,I=s.marginXXS,E=s.fontSizeIcon,se=s.tableHeaderIconColor,J=s.tableHeaderIconColorHover;return(0,a.Z)({},y+"-wrapper",(R={},(0,a.Z)(R,y+"-thead th"+y+"-column-has-sorters",(0,a.Z)({outline:"none",cursor:"pointer",transition:"all "+s.motionDurationSlow,"&:hover":{background:s.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:s.colorPrimary}},` + &`+y+`-cell-fix-left:hover, + &`+y+`-cell-fix-right:hover + `,{background:s.tableFixedHeaderSortActiveBg})),(0,a.Z)(R,y+"-thead th"+y+"-column-sort",{background:s.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}}),(0,a.Z)(R,"td"+y+"-column-sort",{background:s.tableBodySortBg}),(0,a.Z)(R,y+"-column-title",{position:"relative",zIndex:1,flex:1}),(0,a.Z)(R,y+"-column-sorters",{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}}),(0,a.Z)(R,y+"-column-sorter",(0,a.Z)({marginInlineStart:I,color:se,fontSize:0,transition:"color "+s.motionDurationSlow,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:E,"&.active":{color:s.colorPrimary}}},y+"-column-sorter-up + "+y+"-column-sorter-down",{marginTop:"-0.3em"})),(0,a.Z)(R,y+"-column-sorters:hover "+y+"-column-sorter",{color:J}),R))},An=Tn,ir=function(s){var R=s.componentCls,y=s.opacityLoading,I=s.tableScrollThumbBg,E=s.tableScrollThumbBgHover,se=s.tableScrollThumbSize,J=s.tableScrollBg,_=s.zIndexTableSticky,Ct=s.lineWidth+"px "+s.lineType+" "+s.tableBorderColor;return(0,a.Z)({},R+"-wrapper",(0,a.Z)({},R+"-sticky",{"&-holder":{position:"sticky",zIndex:_,background:s.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:se+"px !important",zIndex:_,display:"flex",alignItems:"center",background:J,borderTop:Ct,opacity:y,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:se,backgroundColor:I,borderRadius:100,transition:"all "+s.motionDurationSlow+", transform none",position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:E}}}}))},Yn=ir,Mn=function(s){var R,y=s.componentCls,I=s.lineWidth,E=s.tableBorderColor,se=I+"px "+s.lineType+" "+E;return(0,a.Z)({},y+"-wrapper",(R={},(0,a.Z)(R,y+"-summary",{position:"relative",zIndex:s.zIndexTableFixed,background:s.tableBg,"> tr":{"> th, > td":{borderBottom:se}}}),(0,a.Z)(R,"div"+y+"-summary",{boxShadow:"0 -"+I+"px 0 "+E}),R))},Me=Mn,bt=function(s){var R,y,I,E=s.componentCls,se=s.fontWeightStrong,J=s.tablePaddingVertical,_=s.tablePaddingHorizontal,Ct=s.lineWidth,jt=s.lineType,rt=s.tableBorderColor,Yt=s.tableFontSize,sn=s.tableBg,wn=s.tableRadius,En=s.tableHeaderTextColor,dn=s.motionDurationSlow,On=s.tableHeaderBg,Fn=s.tableHeaderCellSplitColor,Ln=s.tableRowHoverBg,Jn=s.tableSelectedRowBg,tr=s.tableSelectedRowHoverBg,dr=s.tableFooterTextColor,i=s.tableFooterBg,x=s.paddingContentVerticalLG,O=s.wireframe,tt=Ct+"px "+jt+" "+rt;return(0,a.Z)({},E+"-wrapper",(0,C.Z)((0,C.Z)({clear:"both",maxWidth:"100%"},(0,q.dF)()),(I={},(0,a.Z)(I,E,(0,C.Z)((0,C.Z)({},(0,q.Wf)(s)),{fontSize:Yt,background:sn,borderRadius:wn})),(0,a.Z)(I,"table",{width:"100%",textAlign:"start",borderRadius:wn+"px "+wn+"px 0 0",borderCollapse:"separate",borderSpacing:0}),(0,a.Z)(I,` + `+E+`-thead > tr > th, + `+E+`-tbody > tr > td, + tfoot > tr > th, + tfoot > tr > td + `,{position:"relative",padding:x+"px "+_+"px",overflowWrap:"break-word"}),(0,a.Z)(I,E+"-title",{padding:J+"px "+_+"px"}),(0,a.Z)(I,E+"-thead",{"> tr > th":(0,a.Z)({position:"relative",color:En,fontWeight:se,textAlign:"start",background:On,borderBottom:tt,transition:"background "+dn+" ease","&[colspan]:not([colspan='1'])":{textAlign:"center"}},"&:not(:last-child):not("+E+"-selection-column):not("+E+"-row-expand-icon-cell):not([colspan])::before",{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:Fn,transform:"translateY(-50%)",transition:"background-color "+dn,content:'""'}),"> tr:not(:last-child) > th[colspan]":{borderBottom:0}}),(0,a.Z)(I,E+"-tbody",{"> tr":(R={"> td":(0,a.Z)({borderTop:tt,transition:"background "+dn},` + > `+E+`-wrapper:only-child, + > `+E+"-expanded-row-fixed > "+E+`-wrapper:only-child + `,(0,a.Z)({},E,(0,a.Z)({marginBlock:"-"+J+"px",marginInline:s.tableExpandColumnWidth-_+"px -"+_+"px"},E+"-tbody > tr:last-child > td",{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}))),"&:last-child > td":{borderBottom:tt}},(0,a.Z)(R,`&:first-child > td, + &`+E+"-measure-row + tr > td",{borderTop:"none"}),(0,a.Z)(R,` + &`+E+`-row:hover > td, + > td`+E+`-cell-row-hover + `,{background:Ln}),(0,a.Z)(R,"&"+E+"-row-selected",{"> td":{background:Jn},"&:hover > td":{background:tr}}),R)}),(0,a.Z)(I,E+":not("+E+"-bordered) "+E+"-tbody > tr",O?void 0:(y={},(0,a.Z)(y,"&"+E+"-row:hover, &"+E+"-row"+E+"-row-selected",(0,a.Z)({},"+ tr"+E+"-row > td",{borderTopColor:"transparent"})),(0,a.Z)(y,"&"+E+`-row:last-child:hover > td, + &`+E+"-row"+E+"-row-selected:last-child > td",{borderBottomColor:"transparent"}),(0,a.Z)(y,` + &`+E+`-row:hover > td, + > td`+E+`-cell-row-hover, + &`+E+"-row"+E+`-row-selected > td + `,{borderTopColor:"transparent","&:first-child":{borderStartStartRadius:wn,borderEndStartRadius:wn},"&:last-child":{borderStartEndRadius:wn,borderEndEndRadius:wn}}),y)),(0,a.Z)(I,E+"-footer",{padding:J+"px "+_+"px",color:dr,background:i}),I)))},Zn=(0,w.Z)("Table",function(m){var s=m.controlItemBgActive,R=m.controlItemBgActiveHover,y=m.colorTextPlaceholder,I=m.colorTextHeading,E=m.colorSplit,se=m.fontSize,J=m.padding,_=m.paddingXS,Ct=m.paddingSM,jt=m.controlHeight,rt=m.colorFillAlter,Yt=m.colorIcon,sn=m.colorIconHover,wn=m.opacityLoading,En=m.colorBgContainer,dn=m.colorFillSecondary,On=m.borderRadiusLG,Fn=m.colorFillContent,Ln=m.controlInteractiveSize,Jn=new X.C(Yt),tr=new X.C(sn),dr=s,i=2,x=new X.C(rt).onBackground(En).toHexString(),O=(0,l.TS)(m,{tableFontSize:se,tableBg:En,tableRadius:On,tablePaddingVertical:J,tablePaddingHorizontal:J,tablePaddingVerticalMiddle:Ct,tablePaddingHorizontalMiddle:_,tablePaddingVerticalSmall:_,tablePaddingHorizontalSmall:_,tableBorderColor:E,tableHeaderTextColor:I,tableHeaderBg:x,tableFooterTextColor:I,tableFooterBg:x,tableHeaderCellSplitColor:E,tableHeaderSortBg:dn,tableHeaderSortHoverBg:Fn,tableHeaderIconColor:Jn.clone().setAlpha(Jn.getAlpha()*wn).toRgbString(),tableHeaderIconColorHover:tr.clone().setAlpha(tr.getAlpha()*wn).toRgbString(),tableBodySortBg:rt,tableFixedHeaderSortActiveBg:dn,tableHeaderFilterActiveBg:Fn,tableFilterDropdownBg:En,tableRowHoverBg:x,tableSelectedRowBg:dr,tableSelectedRowHoverBg:R,zIndexTableFixed:i,zIndexTableSticky:i+1,tableFontSizeMiddle:se,tableFontSizeSmall:se,tableSelectionColumnWidth:jt,tableExpandIconBg:En,tableExpandColumnWidth:Ln+2*m.padding,tableExpandedRowBg:rt,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:y,tableScrollThumbBgHover:I,tableScrollBg:E});return[bt(O),Bt(O),Me(O),An(O),ht(O),ne(O),Nt(O),Ue(O),Me(O),ct(O),Ne(O),yt(O),Yn(O),ot(O),un(O),on(O)]}),tn=[];function Xn(m,s){var R,y=m.prefixCls,I=m.className,E=m.style,se=m.size,J=m.bordered,_=m.dropdownPrefixCls,Ct=m.dataSource,jt=m.pagination,rt=m.rowSelection,Yt=m.rowKey,sn=Yt===void 0?"key":Yt,wn=m.rowClassName,En=m.columns,dn=m.children,On=m.childrenColumnName,Fn=m.onChange,Ln=m.getPopupContainer,Jn=m.loading,tr=m.expandIcon,dr=m.expandable,i=m.expandedRowRender,x=m.expandIconColumnIndex,O=m.indentSize,tt=m.scroll,Rn=m.sortDirections,pn=m.locale,Wn=m.showSorterTooltip,hn=Wn===void 0?!0:Wn,Ve=Z.useMemo(function(){return En||(0,j.L)(dn)},[En,dn]),Ae=Z.useMemo(function(){return Ve.some(function(or){return or.responsive})},[Ve]),u=(0,Ce.Z)(Ae),n=Z.useMemo(function(){var or=new Set(Object.keys(u).filter(function($n){return u[$n]}));return Ve.filter(function($n){return!$n.responsive||$n.responsive.some(function(Cr){return or.has(Cr)})})},[Ve,u]),p=(0,h.Z)(m,["className","style","columns"]),c=Z.useContext(ye.Z),S=Z.useContext(pe.E_),K=S.locale,ze=K===void 0?je.Z:K,W=S.renderEmpty,Q=S.direction,ae=se||c,nt=(0,C.Z)((0,C.Z)({},ze.Table),pn),st=Ct||tn,ie=Z.useContext(pe.E_),de=ie.getPrefixCls,Fe=de("table",y),Ft=de("dropdown",_),re=(0,C.Z)({childrenColumnName:On,expandIconColumnIndex:x},dr),Tt=re.childrenColumnName,ln=Tt===void 0?"children":Tt,Gt=Z.useMemo(function(){return st.some(function(or){return or==null?void 0:or[ln]})?"nest":i||dr&&dr.expandedRowRender?"row":null},[st]),At={body:Z.useRef()},Bn=Z.useMemo(function(){return typeof sn=="function"?sn:function(or){return or==null?void 0:or[sn]}},[sn]),It=(0,Re.Z)(st,ln,Bn),xn=(0,F.Z)(It,1),nn=xn[0],te={},Et=function($n,Cr){var lr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,hr=(0,C.Z)((0,C.Z)({},te),$n);lr&&(te.resetPagination(),hr.pagination.current&&(hr.pagination.current=1),jt&&jt.onChange&&jt.onChange(1,hr.pagination.pageSize)),tt&&tt.scrollToFirstRowOnChange!==!1&&At.body.current&&Ie(0,{getContainer:function(){return At.body.current}}),Fn==null||Fn(hr.pagination,hr.filters,hr.sorter,{currentDataSource:Un(D(st,hr.sorterStates,ln),hr.filterStates),action:Cr})},fn=function($n,Cr){Et({sorter:$n,sorterStates:Cr},"sort",!1)},St=P({prefixCls:Fe,mergedColumns:n,onSorterChange:fn,sortDirections:Rn||["ascend","descend"],tableLocale:nt,showSorterTooltip:hn}),Mt=(0,F.Z)(St,4),lt=Mt[0],vn=Mt[1],Ht=Mt[2],Pe=Mt[3],rn=Z.useMemo(function(){return D(st,vn,ln)},[st,vn]);te.sorter=Pe(),te.sorterStates=vn;var jn=function($n,Cr){Et({filters:$n,filterStates:Cr},"filter",!0)},sr=$e({prefixCls:Fe,locale:nt,dropdownPrefixCls:Ft,mergedColumns:n,onFilterChange:jn,getPopupContainer:Ln}),ur=(0,F.Z)(sr,3),_n=ur[0],Gn=ur[1],Hn=ur[2],gn=Un(rn,Gn);te.filters=Hn,te.filterStates=Gn;var Vn=Z.useMemo(function(){var or={};return Object.keys(Hn).forEach(function($n){Hn[$n]!==null&&(or[$n]=Hn[$n])}),(0,C.Z)((0,C.Z)({},Ht),{filters:or})},[Ht,Hn]),kn=fe(Vn),ar=(0,F.Z)(kn,1),mr=ar[0],cr=function($n,Cr){Et({pagination:(0,C.Z)((0,C.Z)({},te.pagination),{current:$n,pageSize:Cr})},"paginate")},pr=(0,De.ZP)(gn.length,jt,cr),cn=(0,F.Z)(pr,2),kt=cn[0],nr=cn[1];te.pagination=jt===!1?{}:(0,De.G6)(jt,kt),te.resetPagination=nr;var fr=Z.useMemo(function(){if(jt===!1||!kt.pageSize)return gn;var or=kt.current,$n=or===void 0?1:or,Cr=kt.total,lr=kt.pageSize,hr=lr===void 0?De.L8:lr;return gn.lengthhr?gn.slice(($n-1)*hr,$n*hr):gn:gn.slice(($n-1)*hr,$n*hr)},[!!jt,gn,kt&&kt.current,kt&&kt.pageSize,kt&&kt.total]),xr=(0,Je.ZP)(rt,{prefixCls:Fe,data:gn,pageData:fr,getRowKey:Bn,getRecordByKey:nn,expandType:Gt,childrenColumnName:ln,locale:nt,getPopupContainer:Ln}),gr=(0,F.Z)(xr,2),Sr=gr[0],Zr=gr[1],yr=function($n,Cr,lr){var hr;return typeof wn=="function"?hr=$()(wn($n,Cr,lr)):hr=$()(wn),$()((0,a.Z)({},Fe+"-row-selected",Zr.has(Bn($n,Cr))),hr)};re.__PARENT_RENDER_ICON__=re.expandIcon,re.expandIcon=re.expandIcon||tr||Nn(nt),Gt==="nest"&&re.expandIconColumnIndex===void 0?re.expandIconColumnIndex=rt?1:0:re.expandIconColumnIndex>0&&rt&&(re.expandIconColumnIndex-=1),typeof re.indentSize!="number"&&(re.indentSize=typeof O=="number"?O:15);var Ir=Z.useCallback(function(or){return mr(Sr(_n(lt(or))))},[lt,_n,Sr]),rr,Rr;if(jt!==!1&&(kt==null?void 0:kt.total)){var Fr;kt.size?Fr=kt.size:Fr=ae==="small"||ae==="middle"?"small":void 0;var wr=function($n){return Z.createElement(B.Z,(0,C.Z)({},kt,{className:$()(Fe+"-pagination "+Fe+"-pagination-"+$n,kt.className),size:Fr}))},Mr=Q==="rtl"?"left":"right",Pr=kt.position;if(Pr!==null&&Array.isArray(Pr)){var Lr=Pr.find(function(or){return or.includes("top")}),Dr=Pr.find(function(or){return or.includes("bottom")}),Br=Pr.every(function(or){return""+or=="none"});!Lr&&!Dr&&!Br&&(Rr=wr(Mr)),Lr&&(rr=wr(Lr.toLowerCase().replace("top",""))),Dr&&(Rr=wr(Dr.toLowerCase().replace("bottom","")))}else Rr=wr(Mr)}var Or;typeof Jn=="boolean"?Or={spinning:Jn}:(0,r.Z)(Jn)==="object"&&(Or=(0,C.Z)({spinning:!0},Jn));var $r=Zn(Fe),Kr=(0,F.Z)($r,2),Ar=Kr[0],zr=Kr[1],Hr=$()(Fe+"-wrapper",(0,a.Z)({},Fe+"-wrapper-rtl",Q==="rtl"),I,zr);return Ar(Z.createElement("div",{ref:s,className:Hr,style:E},Z.createElement(H.Z,(0,C.Z)({spinning:!1},Or),rr,Z.createElement(t.ZP,(0,C.Z)({},p,{columns:n,direction:Q,expandable:re,prefixCls:Fe,className:$()((R={},(0,a.Z)(R,Fe+"-middle",ae==="middle"),(0,a.Z)(R,Fe+"-small",ae==="small"),(0,a.Z)(R,Fe+"-bordered",J),(0,a.Z)(R,Fe+"-empty",st.length===0),R)),data:fr,rowKey:Bn,rowClassName:yr,emptyText:pn&&pn.emptyText||(W||L.Z)("Table"),internalHooks:T.R,internalRefs:At,transformColumns:Ir})),Rr)))}var In=Z.forwardRef(Xn),zn=In;zn.SELECTION_COLUMN=Je.HK,zn.EXPAND_COLUMN=t.ZP.EXPAND_COLUMN,zn.SELECTION_ALL=Je.W$,zn.SELECTION_INVERT=Je.TA,zn.SELECTION_NONE=Je.rM,zn.Column=Ee,zn.ColumnGroup=xt,zn.Summary=t.ER;var Qn=zn,qn=Qn},31673:function(Cn,ve,e){"use strict";e.d(ve,{Z:function(){return mn}});var r=e(31343),a=e(4942),F=e(71002),C=e(97685),N=e(87462),$=e(1413),t=e(67294),j={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},T=j,h=e(84089),Z=function(We,He){return t.createElement(h.Z,(0,$.Z)((0,$.Z)({},We),{},{ref:He,icon:T}))};Z.displayName="HolderOutlined";var pe=t.forwardRef(Z),L=e(94184),ye=e.n(L),Ce=e(53124),je=e(33603),B=4;function H(le){var We,He=le.dropPosition,Rt=le.dropLevelOffset,zt=le.prefixCls,wt=le.indent,Xe=le.direction,ft=Xe===void 0?"ltr":Xe,gt=ft==="ltr"?"left":"right",_t=ft==="ltr"?"right":"left",Be=(We={},(0,a.Z)(We,gt,-Rt*wt+B),(0,a.Z)(We,_t,0),We);switch(He){case-1:Be.top=-3;break;case 1:Be.bottom=-3;break;default:Be.bottom=-3,Be[gt]=wt+B;break}return t.createElement("div",{style:Be,className:zt+"-drop-indicator"})}var Se=e(23797),we=e(32157),ee=t.forwardRef(function(le,We){var He,Rt=t.useContext(Ce.E_),zt=Rt.getPrefixCls,wt=Rt.direction,Xe=Rt.virtual,ft=le.prefixCls,gt=le.className,_t=le.showIcon,Be=_t===void 0?!1:_t,ce=le.showLine,Ge=le.switcherIcon,Ye=le.blockNode,Ot=Ye===void 0?!1:Ye,z=le.children,V=le.checkable,k=V===void 0?!1:V,Ke=le.selectable,vt=Ke===void 0?!0:Ke,qt=le.draggable,Sn=le.motion,bn=zt("tree",ft),Un=zt(),Dn=Sn!=null?Sn:(0,N.Z)((0,N.Z)({},(0,je.ZP)(Un)),{motionAppear:!1}),$e=(0,N.Z)((0,N.Z)({},le),{checkable:k,selectable:vt,showIcon:Be,motion:Dn,blockNode:Ot,showLine:Boolean(ce),dropIndicatorRender:H}),Re=(0,we.ZP)(bn),De=(0,C.Z)(Re,2),Je=De[0],mt=De[1],Ut=t.useMemo(function(){if(!qt)return!1;var Vt={};switch((0,F.Z)(qt)){case"function":Vt.nodeDraggable=qt;break;case"object":Vt=(0,N.Z)({},qt);break;default:break}return Vt.icon!==!1&&(Vt.icon=Vt.icon||t.createElement(pe,null)),Vt},[qt]);return Je(t.createElement(r.Z,(0,N.Z)({itemHeight:20,ref:We,virtual:Xe},$e,{prefixCls:bn,className:ye()((He={},(0,a.Z)(He,bn+"-icon-hide",!Be),(0,a.Z)(He,bn+"-block-node",Ot),(0,a.Z)(He,bn+"-unselectable",!vt),(0,a.Z)(He,bn+"-rtl",wt==="rtl"),He),gt,mt),direction:wt,checkable:k&&t.createElement("span",{className:bn+"-checkbox-inner"}),selectable:vt,switcherIcon:function(Ze){return(0,Se.Z)(bn,Ge,ce,Ze)},draggable:Ut}),z))}),M=ee,Ie=e(74902),ue=e(26911),Ee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},_e=Ee,xt=function(We,He){return t.createElement(h.Z,(0,$.Z)((0,$.Z)({},We),{},{ref:He,icon:_e}))};xt.displayName="FolderOpenOutlined";var be=t.forwardRef(xt),Nn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},ge=Nn,me=function(We,He){return t.createElement(h.Z,(0,$.Z)((0,$.Z)({},We),{},{ref:He,icon:ge}))};me.displayName="FolderOutlined";var Oe=t.forwardRef(me),dt=e(10225),Te=e(1089),ke;(function(le){le[le.None=0]="None",le[le.Start=1]="Start",le[le.End=2]="End"})(ke||(ke={}));function Kt(le,We){function He(Rt){var zt=Rt.key,wt=Rt.children;We(zt,Rt)!==!1&&Kt(wt||[],We)}le.forEach(He)}function Pn(le){var We=le.treeData,He=le.expandedKeys,Rt=le.startKey,zt=le.endKey,wt=[],Xe=ke.None;if(Rt&&Rt===zt)return[Rt];if(!Rt||!zt)return[];function ft(gt){return gt===Rt||gt===zt}return Kt(We,function(gt){if(Xe===ke.End)return!1;if(ft(gt)){if(wt.push(gt),Xe===ke.None)Xe=ke.Start;else if(Xe===ke.Start)return Xe=ke.End,!1}else Xe===ke.Start&&wt.push(gt);return He.includes(gt)}),wt}function qe(le,We){var He=(0,Ie.Z)(We),Rt=[];return Kt(le,function(zt,wt){var Xe=He.indexOf(zt);return Xe!==-1&&(Rt.push(wt),He.splice(Xe,1)),!!He.length}),Rt}var A=function(le,We){var He={};for(var Rt in le)Object.prototype.hasOwnProperty.call(le,Rt)&&We.indexOf(Rt)<0&&(He[Rt]=le[Rt]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,Rt=Object.getOwnPropertySymbols(le);ztV){var Dn=V-k;return Ke.push(String(qt).slice(0,Dn)),Ke}Ke.push(qt),k=Un}return z}var mn=0,le=1,We=2,He=3,Rt=4,zt=function(V){var k=V.enabledMeasure,Ke=V.children,vt=V.text,qt=V.width,Sn=V.fontSize,bn=V.rows,Un=V.onEllipsis,Dn=H.useState([0,0,0]),$e=(0,C.Z)(Dn,2),Re=(0,C.Z)($e[0],3),De=Re[0],Je=Re[1],mt=Re[2],Ut=$e[1],Vt=H.useState(mn),Ze=(0,C.Z)(Vt,2),xe=Ze[0],he=Ze[1],oe=H.useState(0),Dt=(0,C.Z)(oe,2),Kn=Dt[0],b=Dt[1],d=H.useRef(null),o=H.useRef(null),f=H.useMemo(function(){return(0,L.Z)(vt)},[vt]),v=H.useMemo(function(){return $t(f)},[f]),g=H.useMemo(function(){return!k||xe!==He?Ke(f,!1):Ke(Qt(f,Je),Je1&&Ct,sn=function(Ae){var u;ir(!0),(u=I.onExpand)===null||u===void 0||u.call(I,Ae)},wn=H.useState(0),En=(0,C.Z)(wn,2),dn=En[0],On=En[1],Fn=H.useState(0),Ln=(0,C.Z)(Fn,2),Jn=Ln[0],tr=Ln[1],dr=function(Ae,u){var n=Ae.offsetWidth,p;On(n),tr(parseInt((p=window.getComputedStyle)===null||p===void 0?void 0:p.call(window,u).fontSize,10)||0)},i=function(Ae){var u;bt(Ae),Me!==Ae&&((u=I.onEllipsis)===null||u===void 0||u.call(I,Ae))};H.useEffect(function(){var Ve=Dt.current;if(y&&Ct&&Ve){var Ae=Yt?Ve.offsetHeight textarea, + h`+we+` + `]=t(B["fontSizeHeading"+we],B["lineHeightHeading"+we],B.colorTextHeading,B)}),Se},T=function(B){var H=B.componentCls;return{"a&, a":(0,a.Z)((0,a.Z)({},(0,$.N)(B)),(0,r.Z)({textDecoration:B.linkDecoration,"&:active, &:hover":{textDecoration:B.linkHoverDecoration}},"&[disabled], &"+H+"-disabled",{color:B.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:B.colorTextDisabled},"&:active":{pointerEvents:"none"}}))}},h=function(){return{code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:C.gold[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:600},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}},Z=function(B){var H,Se=B.componentCls,we=(0,N.e5)(B),ee=we.inputPaddingVertical+1;return{"&-edit-content":(H={position:"relative","div&":{insetInlineStart:-B.paddingSM,marginTop:-ee,marginBottom:"calc(1em - "+ee+"px)"}},(0,r.Z)(H,Se+"-edit-content-confirm",{position:"absolute",insetInlineEnd:B.marginXS+2,insetBlockEnd:B.marginXS,color:B.colorTextDescription,fontWeight:"normal",fontSize:B.fontSize,fontStyle:"normal",pointerEvents:"none"}),(0,r.Z)(H,"textarea",{margin:"0!important",MozTransition:"none",height:"1em"}),H)}},pe=function(B){return{"&-copy-success":(0,r.Z)({},` + &, + &:hover, + &:focus`,{color:B.colorSuccess})}},L=function(){var B;return B={},(0,r.Z)(B,` + a&-ellipsis, + span&-ellipsis + `,{display:"inline-block",maxWidth:"100%"}),(0,r.Z)(B,"&-single-line",{whiteSpace:"nowrap"}),(0,r.Z)(B,"&-ellipsis-single-line",{overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"}}),(0,r.Z)(B,"&-ellipsis-multiple-line",{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}),B},ye=function(B){var H,Se=B.componentCls,we=B.sizeMarginHeadingVerticalStart;return(0,r.Z)({},Se,(0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,r.Z)({color:B.colorText,wordBreak:"break-word",lineHeight:B.lineHeight,"&&-secondary":{color:B.colorTextDescription},"&&-success":{color:B.colorSuccess},"&&-warning":{color:B.colorWarning},"&&-danger":{color:B.colorError,"a&:active, a&:focus":{color:B.colorErrorActive},"a&:hover":{color:B.colorErrorHover}},"&&-disabled":{color:B.colorTextDisabled,cursor:"not-allowed",userSelect:"none"}},` + div&, + p + `,{marginBottom:"1em"}),j(B)),(H={},(0,r.Z)(H,` + & + h1&, + & + h2&, + & + h3&, + & + h4&, + & + h5& + `,{marginTop:we}),(0,r.Z)(H,` + div, + ul, + li, + p, + h1, + h2, + h3, + h4, + h5`,(0,r.Z)({},` + + h1, + + h2, + + h3, + + h4, + + h5 + `,{marginTop:we})),H)),h()),T(B)),(0,r.Z)({},` + `+Se+`-expand, + `+Se+`-edit, + `+Se+`-copy + `,(0,a.Z)((0,a.Z)({},(0,$.N)(B)),{marginInlineStart:B.marginXXS}))),Z(B)),pe(B)),L()),{"&-rtl":{direction:"rtl"}}))},Ce=(0,F.Z)("Typography",function(je){return[ye(je)]},{sizeMarginHeadingVerticalStart:"1.2em",sizeMarginHeadingVerticalEnd:"0.5em"})},20640:function(Cn,ve,e){"use strict";var r=e(11742),a={"text/plain":"Text","text/html":"Url",default:"Text"},F="Copy to clipboard: #{key}, Enter";function C($){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return $.replace(/#{\s*key\s*}/g,t)}function N($,t){var j,T,h,Z,pe,L,ye=!1;t||(t={}),j=t.debug||!1;try{h=r(),Z=document.createRange(),pe=document.getSelection(),L=document.createElement("span"),L.textContent=$,L.ariaHidden="true",L.style.all="unset",L.style.position="fixed",L.style.top=0,L.style.clip="rect(0, 0, 0, 0)",L.style.whiteSpace="pre",L.style.webkitUserSelect="text",L.style.MozUserSelect="text",L.style.msUserSelect="text",L.style.userSelect="text",L.addEventListener("copy",function(je){if(je.stopPropagation(),t.format)if(je.preventDefault(),typeof je.clipboardData=="undefined"){j&&console.warn("unable to use e.clipboardData"),j&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var B=a[t.format]||a.default;window.clipboardData.setData(B,$)}else je.clipboardData.clearData(),je.clipboardData.setData(t.format,$);t.onCopy&&(je.preventDefault(),t.onCopy(je.clipboardData))}),document.body.appendChild(L),Z.selectNodeContents(L),pe.addRange(Z);var Ce=document.execCommand("copy");if(!Ce)throw new Error("copy command was unsuccessful");ye=!0}catch(je){j&&console.error("unable to copy using execCommand: ",je),j&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",$),t.onCopy&&t.onCopy(window.clipboardData),ye=!0}catch(B){j&&console.error("unable to copy using clipboardData: ",B),j&&console.error("falling back to prompt"),T=C("message"in t?t.message:F),window.prompt(T,$)}}finally{pe&&(typeof pe.removeRange=="function"?pe.removeRange(Z):pe.removeAllRanges()),L&&document.body.removeChild(L),h()}return ye}Cn.exports=N},72378:function(Cn,ve,e){Cn=e.nmd(Cn);var r=200,a="__lodash_hash_undefined__",F=800,C=16,N=9007199254740991,$="[object Arguments]",t="[object Array]",j="[object AsyncFunction]",T="[object Boolean]",h="[object Date]",Z="[object Error]",pe="[object Function]",L="[object GeneratorFunction]",ye="[object Map]",Ce="[object Number]",je="[object Null]",B="[object Object]",H="[object Proxy]",Se="[object RegExp]",we="[object Set]",ee="[object String]",M="[object Undefined]",Ie="[object WeakMap]",ue="[object ArrayBuffer]",Ee="[object DataView]",_e="[object Float32Array]",xt="[object Float64Array]",be="[object Int8Array]",Nn="[object Int16Array]",ge="[object Int32Array]",me="[object Uint8Array]",Oe="[object Uint8ClampedArray]",dt="[object Uint16Array]",Te="[object Uint32Array]",ke=/[\\^$.*+?()[\]{}|]/g,Kt=/^\[object .+?Constructor\]$/,Pn=/^(?:0|[1-9]\d*)$/,qe={};qe[_e]=qe[xt]=qe[be]=qe[Nn]=qe[ge]=qe[me]=qe[Oe]=qe[dt]=qe[Te]=!0,qe[$]=qe[t]=qe[ue]=qe[T]=qe[Ee]=qe[h]=qe[Z]=qe[pe]=qe[ye]=qe[Ce]=qe[B]=qe[Se]=qe[we]=qe[ee]=qe[Ie]=!1;var A=typeof e.g=="object"&&e.g&&e.g.Object===Object&&e.g,pt=typeof self=="object"&&self&&self.Object===Object&&self,Zt=A||pt||Function("return this")(),Lt=ve&&!ve.nodeType&&ve,Wt=Lt&&!0&&Cn&&!Cn.nodeType&&Cn,$t=Wt&&Wt.exports===Lt,Qt=$t&&A.process,mn=function(){try{var i=Wt&&Wt.require&&Wt.require("util").types;return i||Qt&&Qt.binding&&Qt.binding("util")}catch(x){}}(),le=mn&&mn.isTypedArray;function We(i,x,O){switch(O.length){case 0:return i.call(x);case 1:return i.call(x,O[0]);case 2:return i.call(x,O[0],O[1]);case 3:return i.call(x,O[0],O[1],O[2])}return i.apply(x,O)}function He(i,x){for(var O=-1,tt=Array(i);++O-1}function g(i,x){var O=this.__data__,tt=Le(O,i);return tt<0?(++this.size,O.push([i,x])):O[tt][1]=x,this}b.prototype.clear=d,b.prototype.delete=o,b.prototype.get=f,b.prototype.has=v,b.prototype.set=g;function D(i){var x=-1,O=i==null?0:i.length;for(this.clear();++x1?O[Rn-1]:void 0,Wn=Rn>2?O[2]:void 0;for(pn=i.length>3&&typeof pn=="function"?(Rn--,pn):void 0,Wn&&tn(O[0],O[1],Wn)&&(pn=Rn<3?void 0:pn,Rn=1),x=Object(x);++tt-1&&i%1==0&&i0){if(++x>=F)return arguments[0]}else x=0;return i.apply(void 0,arguments)}}function I(i){if(i!=null){try{return Be.call(i)}catch(x){}try{return i+""}catch(x){}}return""}function E(i,x){return i===x||i!==i&&x!==x}var se=Pt(function(){return arguments}())?Pt:function(i){return wn(i)&&ce.call(i,"callee")&&!bn.call(i,"callee")},J=Array.isArray;function _(i){return i!=null&&Yt(i.length)&&!rt(i)}function Ct(i){return wn(i)&&_(i)}var jt=Re||dr;function rt(i){if(!sn(i))return!1;var x=ht(i);return x==pe||x==L||x==j||x==H}function Yt(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=N}function sn(i){var x=typeof i;return i!=null&&(x=="object"||x=="function")}function wn(i){return i!=null&&typeof i=="object"}function En(i){if(!wn(i)||ht(i)!=B)return!1;var x=qt(i);if(x===null)return!0;var O=ce.call(x,"constructor")&&x.constructor;return typeof O=="function"&&O instanceof O&&Be.call(O)==Ot}var dn=le?Rt(le):en;function On(i){return Tn(i,Fn(i))}function Fn(i){return _(i)?at(i,!0):Bt(i)}var Ln=An(function(i,x,O){an(i,x,O)});function Jn(i){return function(){return i}}function tr(i){return i}function dr(){return!1}Cn.exports=Ln},13283:function(Cn,ve,e){"use strict";var r=e(87462),a=e(4942),F=e(1413),C=e(91),N=e(97685),$=e(71002),t=e(67294),j=e(94184),T=e.n(j),h=e(96774),Z=e.n(h),pe=e(42550),L=e(38299),ye=e(72659),Ce=e(22342),je=e(8806),B=e(80334),H=e(43083),Se=e(75961),we=["colSpan","rowSpan","style","className"];function ee(ge,me,Oe,dt){var Te=ge+me-1;return ge<=dt&&Te>=Oe}function M(ge){return ge&&(0,$.Z)(ge)==="object"&&!Array.isArray(ge)&&!t.isValidElement(ge)}function Ie(ge){return typeof ge=="string"?!0:(0,pe.Yr)(ge)}var ue=function(me){var Oe=me.ellipsis,dt=me.rowType,Te=me.children,ke,Kt=Oe===!0?{showTitle:!0}:Oe;return Kt&&(Kt.showTitle||dt==="header")&&(typeof Te=="string"||typeof Te=="number"?ke=Te.toString():t.isValidElement(Te)&&typeof Te.props.children=="string"&&(ke=Te.props.children)),ke};function Ee(ge,me){var Oe,dt,Te,ke=ge.prefixCls,Kt=ge.className,Pn=ge.record,qe=ge.index,A=ge.renderIndex,pt=ge.dataIndex,Zt=ge.render,Lt=ge.children,Wt=ge.component,$t=Wt===void 0?"td":Wt,Qt=ge.colSpan,mn=ge.rowSpan,le=ge.fixLeft,We=ge.fixRight,He=ge.firstFixLeft,Rt=ge.lastFixLeft,zt=ge.firstFixRight,wt=ge.lastFixRight,Xe=ge.appendNode,ft=ge.additionalProps,gt=ft===void 0?{}:ft,_t=ge.ellipsis,Be=ge.align,ce=ge.rowType,Ge=ge.isSticky,Ye=ge.hovering,Ot=ge.onHover,z="".concat(ke,"-cell"),V=t.useContext(H.Z),k=t.useContext(ye.Z),Ke=t.useContext(je.Z),vt=Ke.allColumnsFixedLeft,qt=t.useMemo(function(){if((0,L.ik)(Lt))return[Lt];var f=(0,L.aM)(Pn,pt),v=f,g=void 0;if(Zt){var D=Zt(f,Pn,A);M(D)?(v=D.children,g=D.props,V.renderWithProps=!0):v=D}return[v,g]},[V.renderWithProps?Math.random():0,Lt,pt,V,Pn,Zt,A]),Sn=(0,N.Z)(qt,2),bn=Sn[0],Un=Sn[1],Dn=bn;(0,$.Z)(Dn)==="object"&&!Array.isArray(Dn)&&!t.isValidElement(Dn)&&(Dn=null),_t&&(Rt||zt)&&(Dn=t.createElement("span",{className:"".concat(z,"-content")},Dn));var $e=Un||{},Re=$e.colSpan,De=$e.rowSpan,Je=$e.style,mt=$e.className,Ut=(0,C.Z)($e,we),Vt=(Oe=Re!==void 0?Re:Qt)!==null&&Oe!==void 0?Oe:1,Ze=(dt=De!==void 0?De:mn)!==null&&dt!==void 0?dt:1;if(Vt===0||Ze===0)return null;var xe={},he=typeof le=="number"&&k,oe=typeof We=="number"&&k;he&&(xe.position="sticky",xe.left=le),oe&&(xe.position="sticky",xe.right=We);var Dt={};Be&&(Dt.textAlign=Be);var Kn=function(v){var g;Pn&&Ot(qe,qe+Ze-1),gt==null||(g=gt.onMouseEnter)===null||g===void 0||g.call(gt,v)},b=function(v){var g;Pn&&Ot(-1,-1),gt==null||(g=gt.onMouseLeave)===null||g===void 0||g.call(gt,v)},d=ue({rowType:ce,ellipsis:_t,children:bn}),o=(0,F.Z)((0,F.Z)((0,F.Z)({title:d},Ut),gt),{},{colSpan:Vt!==1?Vt:null,rowSpan:Ze!==1?Ze:null,className:T()(z,Kt,(Te={},(0,a.Z)(Te,"".concat(z,"-fix-left"),he&&k),(0,a.Z)(Te,"".concat(z,"-fix-left-first"),He&&k),(0,a.Z)(Te,"".concat(z,"-fix-left-last"),Rt&&k),(0,a.Z)(Te,"".concat(z,"-fix-left-all"),Rt&&vt&&k),(0,a.Z)(Te,"".concat(z,"-fix-right"),oe&&k),(0,a.Z)(Te,"".concat(z,"-fix-right-first"),zt&&k),(0,a.Z)(Te,"".concat(z,"-fix-right-last"),wt&&k),(0,a.Z)(Te,"".concat(z,"-ellipsis"),_t),(0,a.Z)(Te,"".concat(z,"-with-append"),Xe),(0,a.Z)(Te,"".concat(z,"-fix-sticky"),(he||oe)&&Ge&&k),(0,a.Z)(Te,"".concat(z,"-row-hover"),!Un&&Ye),Te),gt.className,mt),style:(0,F.Z)((0,F.Z)((0,F.Z)((0,F.Z)({},gt.style),Dt),xe),Je),onMouseEnter:Kn,onMouseLeave:b,ref:Ie($t)?me:null});return t.createElement($t,o,Xe,Dn)}var _e=t.forwardRef(Ee);_e.displayName="Cell";var xt=["expanded","className","hovering"],be=t.memo(_e,function(ge,me){return me.shouldCellUpdate?xt.every(function(Oe){return ge[Oe]===me[Oe]})&&!me.shouldCellUpdate(me.record,ge.record):Z()(ge,me)}),Nn=t.forwardRef(function(ge,me){var Oe=ge.index,dt=ge.additionalProps,Te=dt===void 0?{}:dt,ke=ge.colSpan,Kt=ge.rowSpan,Pn=Te.colSpan,qe=Te.rowSpan,A=ke!=null?ke:Pn,pt=Kt!=null?Kt:qe,Zt=(0,Se.S)(Ce.Z,function($t){var Qt=ee(Oe,pt||1,$t==null?void 0:$t.startRow,$t==null?void 0:$t.endRow);return{onHover:$t==null?void 0:$t.onHover,hovering:Qt}}),Lt=Zt.onHover,Wt=Zt.hovering;return t.createElement(be,(0,r.Z)({},ge,{colSpan:A,rowSpan:pt,hovering:Wt,ref:me,onHover:Lt}))});Nn.displayName="WrappedCell",ve.Z=Nn},75961:function(Cn,ve,e){"use strict";e.d(ve,{S:function(){return j},k:function(){return t}});var r=e(97685),a=e(67294),F=e(8410),C=e(66680),N=e(96774),$=e.n(N);function t(){var T=a.createContext(null),h=function(pe){var L=pe.value,ye=pe.children,Ce=a.useRef(L);Ce.current=L;var je=a.useState(function(){return{getValue:function(){return Ce.current},listeners:new Set}}),B=(0,r.Z)(je,1),H=B[0];return(0,F.Z)(function(){H.listeners.forEach(function(Se){Se(L)})},[L]),a.createElement(T.Provider,{value:H},ye)};return{Context:T,Provider:h}}function j(T,h){var Z=(0,C.Z)(h),pe=a.useContext(T==null?void 0:T.Context),L=pe||{},ye=L.listeners,Ce=L.getValue,je=a.useState(function(){return Z(pe?Ce():null)}),B=(0,r.Z)(je,2),H=B[0],Se=B[1];return(0,F.Z)(function(){if(!pe)return;function we(ee){Se(function(M){var Ie=Z(ee);return $()(M,Ie)?M:Ie})}return ye.add(we),function(){ye.delete(we)}},[pe]),H}},18339:function(Cn,ve,e){"use strict";e.d(ve,{Z:function(){return pe}});var r=e(87462),a=e(67294),F=e(98876),C=e(13283),N=e(88946),$=e(3991);function t(L){var ye=L.className,Ce=L.index,je=L.children,B=L.colSpan,H=B===void 0?1:B,Se=L.rowSpan,we=L.align,ee=a.useContext(N.Z),M=ee.prefixCls,Ie=ee.direction,ue=a.useContext(F.Z),Ee=ue.scrollColumnIndex,_e=ue.stickyOffsets,xt=ue.flattenColumns,be=Ce+H-1,Nn=be+1===Ee?H+1:H,ge=(0,$.v)(Ce,Ce+Nn-1,xt,_e,Ie);return a.createElement(C.Z,(0,r.Z)({className:ye,index:Ce,component:"td",prefixCls:M,record:null,dataIndex:null,align:we,colSpan:Nn,rowSpan:Se,render:function(){return je}},ge))}var j=e(91),T=["children"];function h(L){var ye=L.children,Ce=(0,j.Z)(L,T);return a.createElement("tr",Ce,ye)}function Z(L){var ye=L.children;return ye}Z.Row=h,Z.Cell=t;var pe=Z},98876:function(Cn,ve,e){"use strict";var r=e(67294),a=r.createContext({});ve.Z=a},80540:function(Cn,ve,e){"use strict";e.d(ve,{c:function(){return $}});var r=e(67294),a=e(88946),F=e(18339),C=e(98876);function N(t){var j=t.children,T=t.stickyOffsets,h=t.flattenColumns,Z=r.useContext(a.Z),pe=Z.prefixCls,L=h.length-1,ye=h[L],Ce=r.useMemo(function(){return{stickyOffsets:T,flattenColumns:h,scrollColumnIndex:ye!=null&&ye.scrollbar?L:null}},[ye,h,L,T]);return r.createElement(C.Z.Provider,{value:Ce},r.createElement("tfoot",{className:"".concat(pe,"-summary")},j))}ve.Z=N;var $=F.Z},3705:function(Cn,ve,e){"use strict";e.d(ve,{R:function(){return he},Z:function(){return Kn}});var r=e(4942),a=e(87462),F=e(1413),C=e(74902),N=e(97685),$=e(71002),t=e(67294),j=e(5110),T=e(64217),h=e(79370),Z=e(94184),pe=e.n(Z),L=e(96774),ye=e.n(L),Ce=e(80334),je=e(48555),B=e(74204);function H(b){return null}var Se=H;function we(b){return null}var ee=we,M=e(13283),Ie=e(88946),ue=e(3991),Ee=e(38299);function _e(b){var d=b.cells,o=b.stickyOffsets,f=b.flattenColumns,v=b.rowComponent,g=b.cellComponent,D=b.onHeaderRow,P=b.index,U=t.useContext(Ie.Z),fe=U.prefixCls,X=U.direction,w;D&&(w=D(d.map(function(G){return G.column}),P));var l=(0,Ee.cz)(d.map(function(G){return G.column}));return t.createElement(v,w,d.map(function(G,ne){var q=G.column,Y=(0,ue.v)(G.colStart,G.colEnd,f,o,X),ot;return q&&q.onHeaderCell&&(ot=G.column.onHeaderCell(q)),t.createElement(M.Z,(0,a.Z)({},G,{ellipsis:q.ellipsis,align:q.align,component:g,prefixCls:fe,key:l[ne]},Y,{additionalProps:ot,rowType:"header"}))}))}_e.displayName="HeaderRow";var xt=_e;function be(b){var d=[];function o(D,P){var U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;d[U]=d[U]||[];var fe=P,X=D.filter(Boolean).map(function(w){var l={key:w.key,className:w.className||"",children:w.title,column:w,colStart:fe},G=1,ne=w.children;return ne&&ne.length>0&&(G=o(ne,fe,U+1).reduce(function(q,Y){return q+Y},0),l.hasSubColumns=!0),"colSpan"in w&&(G=w.colSpan),"rowSpan"in w&&(l.rowSpan=w.rowSpan),l.colSpan=G,l.colEnd=l.colStart+G-1,d[U].push(l),fe+=G,G});return X}o(b,0);for(var f=d.length,v=function(P){d[P].forEach(function(U){!("rowSpan"in U)&&!U.hasSubColumns&&(U.rowSpan=f-P)})},g=0;g1?m-1:0),R=1;R=0;P-=1){var U=d[P],fe=o&&o[P],X=fe&&fe[gt.v];if(U||X||D){var w=X||{},l=w.columnType,G=(0,ft.Z)(w,_t);v.unshift(t.createElement("col",(0,a.Z)({key:P,style:{width:U}},G))),D=!0}}return t.createElement("colgroup",null,v)}var ce=Be;function Ge(b){var d=b.className,o=b.children;return t.createElement("div",{className:d},o)}var Ye=Ge,Ot=e(80540);function z(b){var d,o=b.prefixCls,f=b.record,v=b.onExpand,g=b.expanded,D=b.expandable,P="".concat(o,"-row-expand-icon");if(!D)return t.createElement("span",{className:pe()(P,"".concat(o,"-row-spaced"))});var U=function(X){v(f,X),X.stopPropagation()};return t.createElement("span",{className:pe()(P,(d={},(0,r.Z)(d,"".concat(o,"-row-expanded"),g),(0,r.Z)(d,"".concat(o,"-row-collapsed"),!g),d)),onClick:U})}function V(b,d,o){var f=[];function v(g){(g||[]).forEach(function(D,P){f.push(d(D,P)),v(D[o])})}return v(b),f}var k=e(64019),Ke=e(27678),vt=function(d,o){var f,v,g=d.scrollBodyRef,D=d.onScroll,P=d.offsetScroll,U=d.container,fe=t.useContext(Ie.Z),X=fe.prefixCls,w=((f=g.current)===null||f===void 0?void 0:f.scrollWidth)||0,l=((v=g.current)===null||v===void 0?void 0:v.clientWidth)||0,G=w&&l*(l/w),ne=t.useRef(),q=Rt({scrollLeft:0,isHiddenScrollBar:!1}),Y=(0,N.Z)(q,2),ot=Y[0],at=Y[1],ct=t.useRef({delta:0,x:0}),Qe=t.useState(!1),Le=(0,N.Z)(Qe,2),Ue=Le[0],ut=Le[1],ht=function(){ut(!1)},Pt=function(Nt){Nt.persist(),ct.current.delta=Nt.pageX-ot.scrollLeft,ct.current.x=0,ut(!0),Nt.preventDefault()},yt=function(Nt){var Xt,on=Nt||((Xt=window)===null||Xt===void 0?void 0:Xt.event),it=on.buttons;if(!Ue||it===0){Ue&&ut(!1);return}var Ne=ct.current.x+Nt.pageX-ct.current.x-ct.current.delta;Ne<=0&&(Ne=0),Ne+G>=l&&(Ne=l-G),D({scrollLeft:Ne/l*(w+2)}),ct.current.x=Nt.pageX},en=function(){if(!!g.current){var Nt=(0,Ke.os)(g.current).top,Xt=Nt+g.current.offsetHeight,on=U===window?document.documentElement.scrollTop+window.innerHeight:(0,Ke.os)(U).top+U.clientHeight;Xt-(0,B.Z)()<=on||Nt>=on-P?at(function(it){return(0,F.Z)((0,F.Z)({},it),{},{isHiddenScrollBar:!0})}):at(function(it){return(0,F.Z)((0,F.Z)({},it),{},{isHiddenScrollBar:!1})})}},Bt=function(Nt){at(function(Xt){return(0,F.Z)((0,F.Z)({},Xt),{},{scrollLeft:Nt/w*l||0})})};return t.useImperativeHandle(o,function(){return{setScrollLeft:Bt}}),t.useEffect(function(){var an=(0,k.Z)(document.body,"mouseup",ht,!1),Nt=(0,k.Z)(document.body,"mousemove",yt,!1);return en(),function(){an.remove(),Nt.remove()}},[G,Ue]),t.useEffect(function(){var an=(0,k.Z)(U,"scroll",en,!1),Nt=(0,k.Z)(window,"resize",en,!1);return function(){an.remove(),Nt.remove()}},[U]),t.useEffect(function(){ot.isHiddenScrollBar||at(function(an){var Nt=g.current;return Nt?(0,F.Z)((0,F.Z)({},an),{},{scrollLeft:Nt.scrollLeft/Nt.scrollWidth*Nt.clientWidth}):an})},[ot.isHiddenScrollBar]),w<=l||!G||ot.isHiddenScrollBar?null:t.createElement("div",{style:{height:(0,B.Z)(),width:l,bottom:P},className:"".concat(X,"-sticky-scroll")},t.createElement("div",{onMouseDown:Pt,ref:ne,className:pe()("".concat(X,"-sticky-scroll-bar"),(0,r.Z)({},"".concat(X,"-sticky-scroll-bar-active"),Ue)),style:{width:"".concat(G,"px"),transform:"translate3d(".concat(ot.scrollLeft,"px, 0, 0)")}}))},qt=t.forwardRef(vt),Sn=e(98924),bn=(0,Sn.Z)()?window:null;function Un(b,d){var o=(0,$.Z)(b)==="object"?b:{},f=o.offsetHeader,v=f===void 0?0:f,g=o.offsetSummary,D=g===void 0?0:g,P=o.offsetScroll,U=P===void 0?0:P,fe=o.getContainer,X=fe===void 0?function(){return bn}:fe,w=X()||bn;return t.useMemo(function(){var l=!!b;return{isSticky:l,stickyClassName:l?"".concat(d,"-sticky-holder"):"",offsetHeader:v,offsetSummary:D,offsetScroll:U,container:w}},[U,v,D,d,w])}var Dn=e(42550),$e=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Re(b,d){return(0,t.useMemo)(function(){for(var o=[],f=0;f=0})},[g]),yt=g[g.length-1],en={fixed:yt?yt.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(ct,"-cell-scrollbar")}}},Bt=(0,t.useMemo)(function(){return Ue?[].concat((0,C.Z)(v),[en]):v},[Ue,v]),an=(0,t.useMemo)(function(){return Ue?[].concat((0,C.Z)(g),[en]):g},[Ue,g]),Nt=(0,t.useMemo)(function(){var on=U.right,it=U.left;return(0,F.Z)((0,F.Z)({},U),{},{left:fe==="rtl"?[].concat((0,C.Z)(it.map(function(Ne){return Ne+Ue})),[0]):it,right:fe==="rtl"?on:[].concat((0,C.Z)(on.map(function(Ne){return Ne+Ue})),[0]),isSticky:Le})},[Ue,U,Le]),Xt=Re(D,P);return t.createElement("div",{style:(0,F.Z)({overflow:"hidden"},Le?{top:w,bottom:l}:{}),ref:ht,className:pe()(o,(0,r.Z)({},G,!!G))},t.createElement("table",{style:{tableLayout:"fixed",visibility:f||Xt?null:"hidden"}},(!f||!q||Pt)&&t.createElement(ce,{colWidths:Xt?[].concat((0,C.Z)(Xt),[Ue]):[],columCount:P+1,columns:an}),Y((0,F.Z)((0,F.Z)({},ot),{},{stickyOffsets:Nt,columns:Bt,flattenColumns:an}))))});De.displayName="FixedHolder";var Je=De,mt=e(18339),Ut=e(72659),Vt=e(45233),Ze=[],xe={},he="rc-table-internal-hook",oe=t.memo(function(b){var d=b.children;return d},function(b,d){return ye()(b.props,d.props)?b.pingLeft!==d.pingLeft||b.pingRight!==d.pingRight:!1});function Dt(b){var d,o=b.prefixCls,f=b.className,v=b.rowClassName,g=b.style,D=b.data,P=b.rowKey,U=b.scroll,fe=b.tableLayout,X=b.direction,w=b.title,l=b.footer,G=b.summary,ne=b.id,q=b.showHeader,Y=b.components,ot=b.emptyText,at=b.onRow,ct=b.onHeaderRow,Qe=b.internalHooks,Le=b.transformColumns,Ue=b.internalRefs,ut=b.sticky,ht=D||Ze,Pt=!!ht.length,yt=t.useCallback(function(cn,kt){return(0,Ee.aM)(Y||{},cn)||kt},[Y]),en=t.useMemo(function(){return typeof P=="function"?P:function(cn){var kt=cn&&cn[P];return kt}},[P]),Bt=(0,gt.g)(b),an=Bt.expandIcon,Nt=Bt.expandedRowKeys,Xt=Bt.defaultExpandedRowKeys,on=Bt.defaultExpandAllRows,it=Bt.expandedRowRender,Ne=Bt.columnTitle,et=Bt.onExpand,un=Bt.onExpandedRowsChange,Tn=Bt.expandRowByClick,An=Bt.rowExpandable,ir=Bt.expandIconColumnIndex,Yn=Bt.expandedRowClassName,Mn=Bt.childrenColumnName,Me=Bt.indentSize,bt=an||z,Zn=Mn||"children",tn=t.useMemo(function(){return it?"row":b.expandable&&Qe===he&&b.expandable.__PARENT_RENDER_ICON__||ht.some(function(cn){return cn&&(0,$.Z)(cn)==="object"&&cn[Zn]})?"nest":!1},[!!it,ht]),Xn=t.useState(function(){return Xt||(on?V(ht,en,Zn):[])}),In=(0,N.Z)(Xn,2),zn=In[0],Qn=In[1],qn=t.useMemo(function(){return new Set(Nt||zn||[])},[Nt,zn]),m=t.useCallback(function(cn){var kt=en(cn,ht.indexOf(cn)),nr,fr=qn.has(kt);fr?(qn.delete(kt),nr=(0,C.Z)(qn)):nr=[].concat((0,C.Z)(qn),[kt]),Qn(nr),et&&et(!fr,cn),un&&un(nr)},[en,qn,ht,et,un]),s=t.useState(0),R=(0,N.Z)(s,2),y=R[0],I=R[1],E=(0,He.Z)((0,F.Z)((0,F.Z)((0,F.Z)({},b),Bt),{},{expandable:!!it,columnTitle:Ne,expandedKeys:qn,getRowKey:en,onTriggerExpand:m,expandIcon:bt,expandIconColumnIndex:ir,direction:X}),Qe===he?Le:null),se=(0,N.Z)(E,2),J=se[0],_=se[1],Ct=t.useMemo(function(){return{columns:J,flattenColumns:_}},[J,_]),jt=t.useRef(),rt=t.useRef(),Yt=t.useRef(),sn=t.useRef(),wn=t.useRef(),En=t.useState(!1),dn=(0,N.Z)(En,2),On=dn[0],Fn=dn[1],Ln=t.useState(!1),Jn=(0,N.Z)(Ln,2),tr=Jn[0],dr=Jn[1],i=Rt(new Map),x=(0,N.Z)(i,2),O=x[0],tt=x[1],Rn=(0,Ee.cz)(_),pn=Rn.map(function(cn){return O.get(cn)}),Wn=t.useMemo(function(){return pn},[pn.join("_")]),hn=Xe(Wn,_.length,X),Ve=U&&(0,Ee.ik)(U.y),Ae=U&&(0,Ee.ik)(U.x)||Boolean(Bt.fixed),u=Ae&&_.some(function(cn){var kt=cn.fixed;return kt}),n=t.useRef(),p=Un(ut,o),c=p.isSticky,S=p.offsetHeader,K=p.offsetSummary,ze=p.offsetScroll,W=p.stickyClassName,Q=p.container,ae=G==null?void 0:G(ht),nt=(Ve||c)&&t.isValidElement(ae)&&ae.type===mt.Z&&ae.props.fixed,st,ie,de;Ve&&(ie={overflowY:"scroll",maxHeight:U.y}),Ae&&(st={overflowX:"auto"},Ve||(ie={overflowY:"hidden"}),de={width:(U==null?void 0:U.x)===!0?"auto":U==null?void 0:U.x,minWidth:"100%"});var Fe=t.useCallback(function(cn,kt){(0,j.Z)(jt.current)&&tt(function(nr){if(nr.get(cn)!==kt){var fr=new Map(nr);return fr.set(cn,kt),fr}return nr})},[]),Ft=zt(null),re=(0,N.Z)(Ft,2),Tt=re[0],ln=re[1];function Gt(cn,kt){!kt||(typeof kt=="function"?kt(cn):kt.scrollLeft!==cn&&(kt.scrollLeft=cn))}var At=function(kt){var nr=kt.currentTarget,fr=kt.scrollLeft,xr=X==="rtl",gr=typeof fr=="number"?fr:nr.scrollLeft,Sr=nr||xe;if(!ln()||ln()===Sr){var Zr;Tt(Sr),Gt(gr,rt.current),Gt(gr,Yt.current),Gt(gr,wn.current),Gt(gr,(Zr=n.current)===null||Zr===void 0?void 0:Zr.setScrollLeft)}if(nr){var yr=nr.scrollWidth,Ir=nr.clientWidth;if(yr===Ir){Fn(!1),dr(!1);return}xr?(Fn(-gr0)):(Fn(gr>0),dr(gr0?[].concat((0,a.Z)(H),(0,a.Z)(L(M).map(function(Ie){return(0,F.Z)({fixed:ee},Ie)}))):[].concat((0,a.Z)(H),[(0,F.Z)((0,F.Z)({},Se),{},{fixed:ee})])},[])}function ye(B){for(var H=!0,Se=0;Se=0;M-=1){var Ie=B[M];if(ee&&Ie.fixed!=="right")ee=!1;else if(!ee&&Ie.fixed==="right"){warning(!1,"Index ".concat(M+1," of `columns` missing `fixed='right'` prop."));break}}}function Ce(B){return B.map(function(H){var Se=H.fixed,we=(0,C.Z)(H,Z),ee=Se;return Se==="left"?ee="right":Se==="right"&&(ee="left"),(0,F.Z)({fixed:ee},we)})}function je(B,H){var Se=B.prefixCls,we=B.columns,ee=B.children,M=B.expandable,Ie=B.expandedKeys,ue=B.columnTitle,Ee=B.getRowKey,_e=B.onTriggerExpand,xt=B.expandIcon,be=B.rowExpandable,Nn=B.expandIconColumnIndex,ge=B.direction,me=B.expandRowByClick,Oe=B.columnWidth,dt=B.fixed,Te=N.useMemo(function(){return we||pe(ee)},[we,ee]),ke=N.useMemo(function(){if(M){var qe,A=Te.slice();if(!A.includes(T.w)){var pt=Nn||0;pt>=0&&A.splice(pt,0,T.w)}var Zt=A.indexOf(T.w);A=A.filter(function(Qt,mn){return Qt!==T.w||mn===Zt});var Lt=Te[Zt],Wt;(dt==="left"||dt)&&!Nn?Wt="left":(dt==="right"||dt)&&Nn===Te.length?Wt="right":Wt=Lt?Lt.fixed:null;var $t=(qe={},(0,r.Z)(qe,j.v,{className:"".concat(Se,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,r.Z)(qe,"title",ue),(0,r.Z)(qe,"fixed",Wt),(0,r.Z)(qe,"className","".concat(Se,"-row-expand-icon-cell")),(0,r.Z)(qe,"width",Oe),(0,r.Z)(qe,"render",function(mn,le,We){var He=Ee(le,We),Rt=Ie.has(He),zt=be?be(le):!0,wt=xt({prefixCls:Se,expanded:Rt,expandable:zt,record:le,onExpand:_e});return me?N.createElement("span",{onClick:function(ft){return ft.stopPropagation()}},wt):wt}),qe);return A.map(function(Qt){return Qt===T.w?$t:Qt})}return Te.filter(function(Qt){return Qt!==T.w})},[M,Te,Ee,Ie,xt,ge]),Kt=N.useMemo(function(){var qe=ke;return H&&(qe=H(qe)),qe.length||(qe=[{render:function(){return null}}]),qe},[H,ke,ge]),Pn=N.useMemo(function(){return ge==="rtl"?Ce(L(Kt)):L(Kt)},[Kt,ge]);return[Kt,Pn]}ve.Z=je},82327:function(Cn,ve,e){"use strict";e.d(ve,{ER:function(){return a.c},vP:function(){return F.v}});var r=e(3705),a=e(80540),F=e(62978);ve.ZP=r.Z},3991:function(Cn,ve,e){"use strict";e.d(ve,{v:function(){return r}});function r(a,F,C,N,$){var t=C[a]||{},j=C[F]||{},T,h;t.fixed==="left"?T=N.left[a]:j.fixed==="right"&&(h=N.right[F]);var Z=!1,pe=!1,L=!1,ye=!1,Ce=C[F+1],je=C[a-1];if($==="rtl"){if(T!==void 0){var B=je&&je.fixed==="left";ye=!B}else if(h!==void 0){var H=Ce&&Ce.fixed==="right";L=!H}}else if(T!==void 0){var Se=Ce&&Ce.fixed==="left";Z=!Se}else if(h!==void 0){var we=je&&je.fixed==="right";pe=!we}return{fixLeft:T,fixRight:h,lastFixLeft:Z,firstFixRight:pe,lastFixRight:L,firstFixLeft:ye,isSticky:N.isSticky}}},62978:function(Cn,ve,e){"use strict";e.d(ve,{g:function(){return $},v:function(){return N}});var r=e(1413),a=e(91),F=e(80334),C=["expandable"],N="RC_TABLE_INTERNAL_COL_DEFINE";function $(t){var j=t.expandable,T=(0,a.Z)(t,C),h;return"expandable"in t?h=(0,r.Z)((0,r.Z)({},T),j):h=T,h.showExpandColumn===!1&&(h.expandIconColumnIndex=-1),h}},38299:function(Cn,ve,e){"use strict";e.d(ve,{aM:function(){return F},cz:function(){return C},ik:function(){return N}});var r="RC_TABLE_KEY";function a($){return $==null?[]:Array.isArray($)?$:[$]}function F($,t){if(!t&&typeof t!="number")return $;for(var j=a(t),T=$,h=0;h. + */ +(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[211],{81618:function(dn){"use strict";(function(Ft,ot){dn.exports=ot()})(this,function(){function Ft(ct){var et=[];return ct.AMapUI&&et.push(ot(ct.AMapUI)),ct.Loca&&et.push(Lt(ct.Loca)),Promise.all(et)}function ot(ct){return new Promise(function(et,Ee){var it=[];if(ct.plugins)for(var st=0;st"),IRendererService:Symbol.for("IRendererService"),IShaderModuleService:Symbol.for("IShaderModuleService"),IIconService:Symbol.for("IIconService"),IFontService:Symbol.for("IFontService"),IInteractionService:Symbol.for("IInteractionService"),IPickingService:Symbol.for("IPickingService"),IControlService:Symbol.for("IControlService"),IStyleAttributeService:Symbol.for("IStyleAttributeService"),ILayer:Symbol.for("ILayer"),ILayerPlugin:Symbol.for("ILayerPlugin"),INormalPass:Symbol.for("INormalPass"),IPostProcessor:Symbol.for("IPostProcessor"),IPostProcessingPass:Symbol.for("IPostProcessingPass"),IFactoryPostProcessingPass:Symbol.for("Factory"),IFactoryNormalPass:Symbol.for("Factory"),IMultiPassRenderer:Symbol.for("IMultiPassRenderer"),SceneID:Symbol.for("SceneID"),MapConfig:Symbol.for("MapConfig")};function Ae(n){var l=131,a=137,s=0;n+="x";for(var o=Math.floor(9007199254740991/a),h=0;ho&&(s=Math.floor(s/a)),s=s*l+n.charCodeAt(h);return s}function be(n){n=n.toString();for(var l=5381,a=n.length;a;)l=l*33^n.charCodeAt(--a);return l>>>0}var me=ot(74902),ee=ot(96486),we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function _e(n){this.message=n}_e.prototype=new Error,_e.prototype.name="InvalidCharacterError";function gt(n){var l=String(n).replace(/=+$/,"");if(l.length%4===1)throw new _e("'atob' failed: The string to be decoded is not correctly encoded.");for(var a="",s=0,o,h,v=0;h=l.charAt(v++);~h&&(o=s%4?o*64+h:h,s++%4)?a+=String.fromCharCode(255&o>>(-2*s&6)):0)h=we.indexOf(h);return a}function Pt(n){n=String(n);for(var l,a,s,o,h="",v=0,m=n.length%3;v255||(s=n.charCodeAt(v++))>255||(o=n.charCodeAt(v++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");l=a<<16|s<<8|o,h+=we.charAt(l>>18&63)+we.charAt(l>>12&63)+we.charAt(l>>6&63)+we.charAt(l&63)}return m?h.slice(0,m-3)+"===".substring(m):h}var J=function(){function n(l,a){(0,ct.Z)(this,n),this.buffers=l,this.type=a}return(0,et.Z)(n,[{key:"arraybuffer",value:function(){return Promise.resolve(this.buffers[0])}},{key:"stream",value:function(){throw new Error("not implemented")}},{key:"text",value:function(){throw new Error("not implemented")}},{key:"slice",value:function(a,s,o){throw new Error("not implemented")}}]),n}(),vt,W=function(){return vt||(vt=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ot.g!="undefined"?ot.g:{})};vt=W();var dt;typeof window=="undefined"?dt={devicePixelRatio:1,navigator:{userAgent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",browserLanguage:"zh-CN",language:"zh-CN",platform:""},location:"",document:{documentElement:{style:{}},createEvent:function(){return!0},getElementById:function(l){return!0},createElement:function(){return{className:"",classList:{add:function(){return""}}}},createElementNS:function(){return!0},addEventListener:function(){return!0},removeEventListener:function(){return!0},querySelector:function(){return!1}},performance:{mark:function(l){return null},clearMeasures:function(l){return null},clearMarks:function(l){return null},measure:function(l,a,s){return{duration:0}},now:function(){return new Date().getTime()}},Blob:"",dispatchEvent:function(l){return!0},Event:function(l,a){return!0},createElement:function(){return!0},createElementNS:function(){return!0},XMLHttpRequest:function(){return!0},addEventListener:function(){return!0},removeEventListener:function(){return!0},requestAnimationFrame:function(){return!0},cancelAnimationFrame:function(){return!0},clearTimeout:function(){return!0}}:dt=window;var Vt=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,ne=Vt?my.getSystemInfoSync().pixelRatio:dt.devicePixelRatio,ge=(0,et.Z)(function n(l,a){(0,ct.Z)(this,n),this.cancelBubble=!1,this.cancelable=!1,this.target=null,this.currentTarget=null,this.preventDefault=function(){},this.stopPropagation=function(){},this.type=l,this.timeStamp=Date.now()});function $e(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=jt(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,o=function(){};return{s:o,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function jt(n,l){if(!!n){if(typeof n=="string")return Qt(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Qt(n,l)}}function Qt(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a2&&arguments[2]!==void 0?arguments[2]:{},h=Te.get(this);h||(h={}),h[a]||(h[a]=[]),h[a].push(s),Te.set(this,h),o.capture,o.once,o.passive}},{key:"removeEventListener",value:function(a,s){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=Te.get(this);if(h){var v=h[a];if(v&&v.length>0){for(var m=v.length;m--;m>0)if(v[m]===s){v.splice(m,1);break}}}}},{key:"dispatchEvent",value:function(a){var s=Te.get(this)[a.type];if(s){var o=$e(s),h;try{for(o.s();!(h=o.n()).done;){var v=h.value;v(a)}}catch(m){o.e(m)}finally{o.f()}}}}]),n}();function Ke(n){var l=sr();return function(){var s=(0,b.Z)(n),o;if(l){var h=(0,b.Z)(this).constructor;o=Reflect.construct(s,arguments,h)}else o=s.apply(this,arguments);return(0,P.Z)(this,o)}}function sr(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var ie=function(n){(0,Zt.Z)(a,n);var l=Ke(a);function a(){var s;return(0,ct.Z)(this,a),s=l.call(this),s.childNodes=[],s}return(0,et.Z)(a,[{key:"appendChild",value:function(o){this.childNodes.push(o)}},{key:"cloneNode",value:function(){var o=Object.create(this);return Object.assign(o,this),o}},{key:"removeChild",value:function(o){var h=this.childNodes.findIndex(function(v){return v===o});return h>-1?this.childNodes.splice(h,1):null}}]),a}(ae);function te(n){var l=St();return function(){var s=(0,b.Z)(n),o;if(l){var h=(0,b.Z)(this).constructor;o=Reflect.construct(s,arguments,h)}else o=s.apply(this,arguments);return(0,P.Z)(this,o)}}function St(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var qt=function(n){(0,Zt.Z)(a,n);var l=te(a);function a(){var s;return(0,ct.Z)(this,a),s=l.call(this),s.className="",s.children=[],s}return(0,et.Z)(a,[{key:"setAttribute",value:function(o,h){this[o]=h}},{key:"getAttribute",value:function(o){return this[o]}},{key:"setAttributeNS",value:function(o,h){this[o]=h}},{key:"getAttributeNS",value:function(o){return this[o]}}]),a}(ie),$t=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,Ct,Tt,ue,Fe;if($t){var We=my.getSystemInfoSync();Ct=We.screenWidth,Tt=We.screenHeight,ue=We.windowWidth,Fe=We.windowHeight}else{var zt=dt.innerWidth,At=dt.innerHeight;Ct=zt,Tt=At,ue=zt,Fe=At}var Mt={width:Ct,height:Tt,availWidth:ue,availHeight:Fe,availLeft:0,availTop:0},Rt=Mt.availWidth,tt=Mt.availHeight,_t={style:[]};function Xt(n,l){if(!("parentNode"in n)){var a;l===0?a=function(){return null}:l===1?a=function(){return _t}:a=function(){return null},Object.defineProperty(n,"parentNode",{enumerable:!0,get:a})}if(!("parentElement"in n)){var s;l===0?s=function(){return null}:l===1?s=function(){return _t}:s=function(){return null},Object.defineProperty(n,"parentElement",{enumerable:!0,get:s})}}function ve(n){n.style=n.style||{},Object.assign(n.style,{top:"0px",left:"0px",width:Rt+"px",height:tt+"px",margin:"0px",padding:"0px"})}function Wt(n){"clientLeft"in n||(n.clientLeft=0,n.clientTop=0),"clientWidth"in n||(n.clientWidth=Rt,n.clientHeight=tt),"getBoundingClientRect"in n||(n.getBoundingClientRect=function(){var l={x:0,y:0,top:0,left:0,width:this.clientWidth,height:this.clientHeight,right:this.clientWidth,bottom:this.clientHeight};return l})}function Me(n){"offsetLeft"in n||(n.offsetLeft=0,n.offsetTop=0),"offsetWidth"in n||(n.offsetWidth=Rt,n.offsetHeight=tt)}function je(n){"scrollLeft"in n||(n.scrollLeft=0,n.scrollTop=0),"scrollWidth"in n||(n.scrollWidth=Rt,n.scrollHeight=tt)}function Qe(n){var l=function(){return!0};n.classList=[],n.classList.add=l,n.classList.remove=l,n.classList.contains=l,n.classList.toggle=l}function pr(n){var l=tr();return function(){var s=(0,b.Z)(n),o;if(l){var h=(0,b.Z)(this).constructor;o=Reflect.construct(s,arguments,h)}else o=s.apply(this,arguments);return(0,P.Z)(this,o)}}function tr(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}function Dr(){}var kr=function(n){(0,Zt.Z)(a,n);var l=pr(a);function a(){var s,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",h=arguments.length>1?arguments[1]:void 0;return(0,ct.Z)(this,a),s=l.call(this),s.className="",s.children=[],s.focus=Dr,s.blur=Dr,s.insertBefore=Dr,s.appendChild=Dr,s.removeChild=Dr,s.remove=Dr,s.innerHTML="",s.tagName=o.toUpperCase(),Xt((0,st.Z)(s),h),ve((0,st.Z)(s)),Qe((0,st.Z)(s)),Wt((0,st.Z)(s)),Me((0,st.Z)(s)),je((0,st.Z)(s)),s}return(0,et.Z)(a)}(qt);function Zr(n){var l=Tn();return function(){var s=(0,b.Z)(n),o;if(l){var h=(0,b.Z)(this).constructor;o=Reflect.construct(s,arguments,h)}else o=s.apply(this,arguments);return(0,P.Z)(this,o)}}function Tn(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var rn=function(n){(0,Zt.Z)(a,n);var l=Zr(a);function a(s){return(0,ct.Z)(this,a),l.call(this,s)}return(0,et.Z)(a,[{key:"addTextTrack",value:function(){}},{key:"captureStream",value:function(){}},{key:"fastSeek",value:function(){}},{key:"load",value:function(){}},{key:"pause",value:function(){}},{key:"play",value:function(){}}]),a}(kr);function Nn(n){var l=Un();return function(){var s=(0,b.Z)(n),o;if(l){var h=(0,b.Z)(this).constructor;o=Reflect.construct(s,arguments,h)}else o=s.apply(this,arguments);return(0,P.Z)(this,o)}}function Un(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var jn=function(n){(0,Zt.Z)(a,n);var l=Nn(a);function a(){return(0,ct.Z)(this,a),l.call(this,"video")}return(0,et.Z)(a)}(rn),wn={},Wn={};function Bt(n,l){wn=n,wn.id=l,"tagName"in wn||(wn.tagName="CANVAS"),wn.type="canvas",Mixin.parentNode(wn),Mixin.style(wn),Mixin.classList(wn),Mixin.clientRegion(wn),Mixin.offsetRegion(wn),wn.focus=function(){},wn.blur=function(){}}function Yt(n,l){var a=1024,s=1024;Wn={width:a,height:s,clientWidth:a/devicePixelRatio,clientHeight:s/devicePixelRatio,id:l,type:"canvas"},"tagName"in Wn||(Wn.tagName="CANVAS"),Mixin.parentNode(Wn),Mixin.style(Wn),Mixin.classList(Wn),Mixin.clientRegion(Wn),Mixin.offsetRegion(Wn),Wn.getContext=function(o){if(o==="2d")return n},Wn.focus=function(){},Wn.blur=function(){}}function oe(){return wn}function Ce(){return Wn}var Ze=(0,et.Z)(function n(){(0,ct.Z)(this,n);var l=oe(),a=l.createImage&&l.createImage()||{};return"tagName"in a||(a.tagName="IMG",a.__proto__=n.prototype),Xt(a),Qe(a),Object.assign(a,{addEventListener:function(o,h){a["on".concat(o)]=h.bind(a)},removeEventListener:function(o){a["on".concat(o)]=null}}),a}),hr={href:"",protocol:"",host:""};function Cr(n){var l=Pe();return function(){var s=(0,b.Z)(n),o;if(l){var h=(0,b.Z)(this).constructor;o=Reflect.construct(s,arguments,h)}else o=s.apply(this,arguments);return(0,P.Z)(this,o)}}function Pe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var ur=function(n){(0,Zt.Z)(a,n);var l=Cr(a);function a(){return(0,ct.Z)(this,a),l.call(this,"body",0)}return(0,et.Z)(a,[{key:"addEventListener",value:function(o,h){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}}},{key:"removeEventListener",value:function(o,h,v){}},{key:"dispatchEvent",value:function(o){}}]),a}(kr),Hr=function(n){(0,Zt.Z)(a,n);var l=Cr(a);function a(){return(0,ct.Z)(this,a),l.call(this,"html",0)}return(0,et.Z)(a,[{key:"addEventListener",value:function(o,h){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}}},{key:"removeEventListener",value:function(o,h){}},{key:"dispatchEvent",value:function(o){}}]),a}(kr),Sn={},$r={readyState:"complete",visibilityState:"visible",hidden:!1,fullscreen:!0,scripts:[],style:{},location:hr,ontouchstart:null,ontouchmove:null,ontouchend:null,onvisibilitychange:null,parentNode:null,parentElement:null,head:null,body:null,documentElement:{style:[]},createElement:function(l){return l=l.toLowerCase(),l==="canvas"?my.createOffscreenCanvas(1024,128,"2d"):l==="img"?new Ze:l==="video"?new jn:new kr(l)},createElementNS:function(l,a){return this.createElement(a)},createTextNode:function(l){return l},getElementById:function(l){return null},getElementsByTagName:function(l){return l=l.toLowerCase(),[]},getElementsByTagNameNS:function(l,a){return this.getElementsByTagName(a)},getElementsByName:function(l){return[]},querySelector:function(l){return null},querySelectorAll:function(l){return[]},addEventListener:function(l,a,s){Sn[l]||(Sn[l]=[]),Sn[l].push(a)},removeEventListener:function(l,a){var s=Sn[l];if(s&&s.length>0){for(var o=s.length;o--;o>0)if(s[o]===a){s.splice(o,1);break}}},dispatchEvent:function(l){var a=l.type,s=Sn[a];if(s)for(var o=0;o-1,presto:n.indexOf("Presto")>-1,webKit:n.indexOf("AppleWebKit")>-1,gecko:n.indexOf("Gecko")>-1&&n.indexOf("KHTML")===-1,mobile:!!n.match(/AppleWebKit.*Mobile.*/),ios:!!n.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:n.indexOf("Android")>-1||n.indexOf("Linux")>-1,iPhone:n.indexOf("iPhone")>-1,iPad:n.indexOf("iPad")>-1,webApp:n.indexOf("Safari")===-1,weixin:n.indexOf("MicroMessenger")>-1,qq:n.match(/\sQQ/i)===" qq"}}(),language:(dt.navigator.browserLanguage||dt.navigator.language).toLowerCase()};na.versions.android?ai="android":na.versions.trident?ai="IE":na.versions.presto?ai="Opera":na.versions.webKit?ai="webKit":na.versions.gecko?ai="Firefox":na.versions.mobile?ai="mobile":na.versions.ios?ai="ios":na.versions.iPhone?ai="iPhone":na.versions.iPad?ai="ipad":na.versions.webApp?ai="webApp":na.versions.weixin?ai="weixin":na.versions.qq&&(ai="qq"),qr=dt.navigator.userAgent,ui=na.language}var Ai=qr.toLowerCase().indexOf("android")!==-1,za=Ai?"Android; CPU Android 6.0":"iPhone; CPU iPhone OS 10_3_1 like Mac OS X",mo="Mozilla/5.0 (".concat(za,") AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E8301 MicroMessenger/6.6.0 MiniGame NetType/WIFI Language/").concat(ui),Za={platform:ai,language:ui,appVersion:"5.0 (".concat(za,") AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"),userAgent:mo},$a={mark:function(l){return null},clearMeasures:function(l){return null},clearMarks:function(l){return null},measure:function(l,a,s){return{duration:0}},now:function(){}},Ma=0,_a=0;function oo(n){var l=Date.now(),a=Math.max(Ma+23,l);return _a=setTimeout(function(){n(Ma=a)},a-l),_a}function Zo(n){var l=oe();return l.requestAnimationFrame?l.requestAnimationFrame(n):oo(n)}function yo(n){var l=oe();return l.cancelAnimationFrame?l.cancelAnimationFrame(n):clearTimeout(n)}var Xa=function(){function n(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if((0,ct.Z)(this,n),l.indexOf("http://")==0||l.indexOf("https://")==0){this.href=l;return}this.href=a+l}return(0,et.Z)(n,null,[{key:"createObjectURL",value:function(a){var s=a.buffers[0],o=a.type,h=ro(s),v="data:".concat(o,";base64, ");return v+h}}]),n}();function ro(n){for(var l="",a=new Uint8Array(n),s=a.byteLength,o=0;o1&&arguments[1]!==void 0?arguments[1]:{target:this};typeof this["on".concat(n)]=="function"&&this["on".concat(n)].call(this,l)}function In(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{readyState:n};this.readyState=n,Qr.call(this,"readystatechange",l)}var Zn=function(n){(0,Zt.Z)(a,n);var l=jo(a);function a(){var s;return(0,ct.Z)(this,a),s=l.call(this),s.onabort=null,s.onerror=null,s.onload=null,s.onloadstart=null,s.onprogress=null,s.ontimeout=null,s.onloadend=null,s.onreadystatechange=null,s.readyState=0,s.response=null,s.responseText=null,s._responseType="text",s.responseXML=null,s.status=0,s.statusText="",s.upload={},s.withCredentials=!1,nr.set("requestHeader",{"content-type":"application/x-www-form-urlencoded"}),s}return(0,et.Z)(a,[{key:"responseType",set:function(o){this._responseType=o}},{key:"abort",value:function(){var o=He.get("requestTask");o&&o.abort()}},{key:"getAllResponseHeaders",value:function(){var o=xe.get("responseHeader");return Object.keys(o).map(function(h){return"".concat(h,": ").concat(o[h])}).join(` +`)}},{key:"getResponseHeader",value:function(o){return xe.get("responseHeader")[o]}},{key:"open",value:function(o,h,v){this._method=o,this._url=h}},{key:"overrideMimeType",value:function(){}},{key:"send",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:""}},{key:"setRequestHeader",value:function(o,h){var v=nr.get("requestHeader");v[o]=h,nr.set("requestHeader",v)}},{key:"addEventListener",value:function(o,h){var v=this;typeof h=="function"&&(this["on"+o]=function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};m.target=m.target||v,h.call(v,m)})}},{key:"removeEventListener",value:function(o,h){this["on"+o]===h&&(this["on"+o]=null)}}]),a}(ae);Zn.UNSEND=0,Zn.OPENED=1,Zn.HEADERS_RECEIVED=2,Zn.LOADING=3,Zn.DONE=4;function Cn(n){var l=ta();return function(){var s=(0,b.Z)(n),o;if(l){var h=(0,b.Z)(this).constructor;o=Reflect.construct(s,arguments,h)}else o=s.apply(this,arguments);return(0,P.Z)(this,o)}}function ta(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Ya=function(n){(0,Zt.Z)(a,n);var l=Cn(a);function a(s){var o;return(0,ct.Z)(this,a),o=l.call(this,s),o.touches=[],o.targetTouches=[],o.changedTouches=[],o.target=oe(),o.currentTarget=oe(),o}return(0,et.Z)(a)}(ge);function Qo(n){var l=n||{},a=l.x,s=a===void 0?0:a,o=l.y,h=o===void 0?0:o,v=l.clientX,m=v===void 0?0:v,E=l.clientY,A=E===void 0?0:E;Object.keys(n).indexOf("x")!==-1?(n.pageX=n.clientX=s,n.pageY=n.clientY=h):(n.x=m,n.y=A)}function Mo(n){return function(l){var a=new Ya(n);a.changedTouches=l.changedTouches,a.touches=l.touches,a.targetTouches=Array.prototype.slice.call(l.touches),a.timeStamp=l.timeStamp,a.changedTouches.forEach(function(s){return Qo(s)}),a.touches.forEach(function(s){return Qo(s)}),a.targetTouches.forEach(function(s){return Qo(s)}),$r.dispatchEvent(a)}}function rs(n){return function(l){l.type=n,$r.dispatchEvent(l)}}var qa=Mo("touchstart"),Vo=Mo("touchmove"),pu=Mo("touchend"),_s=rs("mapCameaParams");function Bl(n){var l=ff();return function(){var s=(0,b.Z)(n),o;if(l){var h=(0,b.Z)(this).constructor;o=Reflect.construct(s,arguments,h)}else o=s.apply(this,arguments);return(0,P.Z)(this,o)}}function ff(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var $u=function(n){(0,Zt.Z)(a,n);var l=Bl(a);function a(s){var o;return(0,ct.Z)(this,a),o=l.call(this,s),o.target=oe(),o.currentTarget=oe(),o}return(0,et.Z)(a)}(ge),ke=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","pointerId","width","height","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","pageX","pageY","timeStamp"],Xe=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0,0,0,0,0,0,"",0,!1,0,0,0],Tr="touch";function sn(n,l,a){for(var s=new $u(n),o=0;o2&&arguments[2]!==void 0?arguments[2]:{};$r.addEventListener(l,a,s)},removeEventListener:function(l,a,s){$r.removeEventListener(l,a)},dispatchEvent:function(l){$r.dispatchEvent(l)},innerWidth:Mt.availWidth,innerHeight:Mt.availHeight,setTimeout,clearTimeout,setInterval,clearInterval},Co=Su?Bc:dt,sc=Su?Zn:dt.XMLHttpRequest,Xl=Su?hr:dt.location;function il(n){var l=n;return typeof n=="string"&&(l=Co.document.getElementById(n)),l}function uc(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function D(n){return uc(n).split(/\s+/)}function Y(n){var l,a,s=Co==null||(l=Co.document)===null||l===void 0||(a=l.documentElement)===null||a===void 0?void 0:a.style;if(!s)return n[0];for(var o in n)if(n[o]&&n[o]in s)return n[o];return n[0]}function bt(n,l,a){var s=Co.document.createElement(n);return l&&(s.className=l||""),a&&a.appendChild(s),s}function nt(n){var l=n.parentNode;l&&l.removeChild(n)}function se(n,l){if(n.classList!==void 0)for(var a=D(l),s=0,o=a.length;s0&&new RegExp("(^|\\s)"+l+"(\\s|$)").test(a)}function Gr(n,l){n instanceof HTMLElement?n.className=l:n.className.baseVal=l}function Vr(n){return n instanceof SVGElement&&(n=n.correspondingElement),n.className.baseVal===void 0?n.className:n.className.baseVal}function On(n){for(;n&&n.firstChild;)n.removeChild(n.firstChild)}var Gn=Y(["transform","WebkitTransform"]);function $i(n,l){n.style[Gn]=l}function Pa(){if(typeof Event=="function")Co.dispatchEvent(new Event("resize"));else{var n=Co.document.createEvent("UIEvents");n.initUIEvent("resize",!0,!1,Co,0),Co.dispatchEvent(n)}}function Ea(n){var l=["padding: "+(n.height/2-8)+"px "+n.width/2+"px;","line-height: "+n.height+"px;","background-image: url("+n.toDataURL()+");"];console.log(`%c +`,l.join(""))}function fo(){var n,l=Co.document.querySelector('meta[name="viewport"]');if(!l)return 1;var a=(n=l.content)===null||n===void 0?void 0:n.split(","),s=a.find(function(o){var h=o.split("="),v=(0,ht.Z)(h,1),m=v[0];return m==="initial-scale"});return s?s.split("=")[1]*1:1}var Aa=fo()<1?1:Co.devicePixelRatio;function Ao(n,l){n.setAttribute("style","".concat(n.style.cssText).concat(l))}function Ja(n){return n.split(";").map(function(l){return l.trim()}).filter(function(l){return l})}function vs(n,l){var a,s=Ja((a=n.getAttribute("style"))!==null&&a!==void 0?a:""),o=Ja(l),h=ee.pull.apply(void 0,[s].concat((0,me.Z)(o)));n.setAttribute("style",h.join(";"))}function Cu(n){return Object.entries(n).map(function(l){var a=(0,ht.Z)(l,2),s=a[0],o=a[1];return"".concat(s,": ").concat(o)}).join(";")}function al(n,l){return{left:n.left-l.left,top:n.top-l.top,right:l.left+l.width-n.left-n.width,bottom:l.top+l.height-n.top-n.height}}function Au(n,l){n.checked=l,l?n.setAttribute("checked","true"):n.removeAttribute("checked")}function nu(n){n.innerHTML=""}function Nc(n){n.setAttribute("draggable","false")}function Ks(n,l){if(typeof l=="string"){var a=document.createElement("div");for(a.innerHTML=l;a.firstChild;)n.append(a.firstChild)}else Array.isArray(l)?n.append.apply(n,(0,me.Z)(l)):n.append(l)}function Yl(n){if(n.length===0)throw new Error("max requires at least one data point");for(var l=n[0],a=1;al&&(l=n[a]);return l*1}function ye(n){if(n.length===0)throw new Error("min requires at least one data point");for(var l=n[0],a=1;as&&(s=o,a=l),o=1,l=n[h]):o++;return a*1}var xn={min:ye,max:Yl,mean:Or,sum:ir,mode:Xr};function yi(n,l){return n.map(function(a){return a[l]})}function qi(n,l){return xn[n](l)}var ka=ot(89611);function du(n){return Function.toString.call(n).indexOf("[native code]")!==-1}var Qs=ot(78814);function Ka(n,l,a){return(0,Qs.Z)()?Ka=Reflect.construct.bind():Ka=function(o,h,v){var m=[null];m.push.apply(m,h);var E=Function.bind.apply(o,m),A=new E;return v&&(0,ka.Z)(A,v.prototype),A},Ka.apply(null,arguments)}function Nl(n){var l=typeof Map=="function"?new Map:void 0;return Nl=function(s){if(s===null||!du(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l!="undefined"){if(l.has(s))return l.get(s);l.set(s,o)}function o(){return Ka(s,arguments,(0,b.Z)(this).constructor)}return o.prototype=Object.create(s.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),(0,ka.Z)(o,s)},Nl(n)}function tv(n){var l=hf();return function(){var s=(0,b.Z)(n),o;if(l){var h=(0,b.Z)(this).constructor;o=Reflect.construct(s,arguments,h)}else o=s.apply(this,arguments);return(0,P.Z)(this,o)}}function hf(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var vd=function(n){(0,Zt.Z)(a,n);var l=tv(a);function a(s,o,h,v){var m;return(0,ct.Z)(this,a),m=l.call(this,"AJAXError: ".concat(o," (").concat(s,"): ").concat(h)),m.status=s,m.statusText=o,m.url=h,m.body=v,m}return(0,et.Z)(a)}(Nl(Error));function ev(n,l){var a=new sc,s=Array.isArray(n.url)?n.url[0]:n.url;a.open(n.method||"GET",s,!0),n.type==="arrayBuffer"&&(a.responseType="arraybuffer");for(var o in n.headers)n.headers.hasOwnProperty(o)&&a.setRequestHeader(o,n.headers[o]);return n.type==="json"&&(a.responseType="text",a.setRequestHeader("Accept","application/json")),a.withCredentials=n.credentials==="include",a.onerror=function(){l(new Error(a.statusText))},a.onload=function(){if((a.status>=200&&a.status<300||a.status===0)&&a.response!==null){var h=a.response;if(n.type==="json")try{h=JSON.parse(a.response)}catch(m){return l(m)}l(null,h,a.getResponseHeader("Cache-Control"),a.getResponseHeader("Expires"),a)}else{var v=new Blob([a.response],{type:a.getResponseHeader("Content-Type")});l(new vd(a.status,a.statusText,s.toString(),v))}},a.send(n.body),a}function rv(n){return new Promise(function(l,a){ev(n,function(s,o,h,v,m){s?a({err:s,data:null,xhr:m}):l({err:null,data:o,cacheControl:h,expires:v,xhr:m})})})}function uh(n,l){return ev(n,l)}var Df=function(l,a){return uh((0,q.Z)((0,q.Z)({},l),{},{type:"json"}),a)},zc=function(l,a){return uh((0,q.Z)((0,q.Z)({},l),{},{type:"arrayBuffer"}),a)},lh=function(l,a){return uh(_objectSpread(_objectSpread({},l),{},{method:"POST"}),a)};function Bf(n){var l=$window.document.createElement("a");return l.href=n,l.protocol===$window.document.location.protocol&&l.host===$window.document.location.host}var lc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ol(n,l){var a=new Co.Image,s=Co.URL||Co.webkitURL;a.crossOrigin="anonymous",a.onload=function(){l(null,a),s.revokeObjectURL(a.src),a.onload=null,window.requestAnimationFrame(function(){a.src=lc})},a.onerror=function(){return l(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var o=new Blob([new Uint8Array(n)],{type:"image/png"});a.src=n.byteLength?s.createObjectURL(o):lc}function pf(n,l){var a=new Blob([new Uint8Array(n)],{type:"image/png"});createImageBitmap(a).then(function(s){l(null,s)}).catch(function(s){l(new Error("Could not load image because of ".concat(s.message,". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.")))})}var gl=function(l,a,s){var o=function(v,m){if(v)a(v);else if(m){var E=typeof createImageBitmap=="function",A=s?s(m):m;E?pf(A,a):ol(A,a)}};return l.type==="json"?Df(l,o):zc(l,o)},Tu=63710088e-1,Gh={centimeters:Tu*100,centimetres:Tu*100,degrees:Tu/111325,feet:Tu*3.28084,inches:Tu*39.37,kilometers:Tu/1e3,kilometres:Tu/1e3,meters:Tu,metres:Tu,miles:Tu/1609.344,millimeters:Tu*1e3,millimetres:Tu*1e3,nauticalmiles:Tu/1852,radians:1,yards:Tu*1.0936},Mp={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/Tu,yards:1.0936133},wc={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function ml(n,l,a){a===void 0&&(a={});var s={type:"Feature"};return(a.id===0||a.id)&&(s.id=a.id),a.bbox&&(s.bbox=a.bbox),s.properties=l||{},s.geometry=n,s}function Hh(n,l,a){switch(a===void 0&&(a={}),n){case"Point":return jh(l).geometry;case"LineString":return $l(l).geometry;case"Polygon":return Uc(l).geometry;case"MultiPoint":return gd(l).geometry;case"MultiLineString":return Il(l).geometry;case"MultiPolygon":return md(l).geometry;default:throw new Error(n+" is invalid")}}function jh(n,l,a){if(a===void 0&&(a={}),!n)throw new Error("coordinates is required");if(!Array.isArray(n))throw new Error("coordinates must be an Array");if(n.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ku(n[0])||!Ku(n[1]))throw new Error("coordinates must contain numbers");var s={type:"Point",coordinates:n};return ml(s,l,a)}function Ip(n,l,a){return a===void 0&&(a={}),Nf(n.map(function(s){return jh(s,l)}),a)}function Uc(n,l,a){a===void 0&&(a={});for(var s=0,o=n;s=0))throw new Error("precision must be a positive number");var a=Math.pow(10,l||0);return Math.round(n*a)/a}function _d(n,l){l===void 0&&(l="kilometers");var a=Gh[l];if(!a)throw new Error(l+" units is invalid");return n*a}function df(n,l){l===void 0&&(l="kilometers");var a=Gh[l];if(!a)throw new Error(l+" units is invalid");return n/a}function bs(n,l){return zf(df(n,l))}function Yh(n){var l=n%360;return l<0&&(l+=360),l}function zf(n){var l=n%(2*Math.PI);return l*180/Math.PI}function zl(n){var l=n%360;return l*Math.PI/180}function _o(n,l,a){if(l===void 0&&(l="kilometers"),a===void 0&&(a="kilometers"),!(n>=0))throw new Error("length must be a positive number");return _d(df(n,l),a)}function ns(n,l,a){if(l===void 0&&(l="meters"),a===void 0&&(a="kilometers"),!(n>=0))throw new Error("area must be a positive number");var s=wc[l];if(!s)throw new Error("invalid original units");var o=wc[a];if(!o)throw new Error("invalid final units");return n/s*o}function Ku(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}function kp(n){return!!n&&n.constructor===Object}function vf(n){if(!n)throw new Error("bbox is required");if(!Array.isArray(n))throw new Error("bbox must be an Array");if(n.length!==4&&n.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");n.forEach(function(l){if(!Ku(l))throw new Error("bbox must only contain numbers")})}function $h(n){if(!n)throw new Error("id is required");if(["string","number"].indexOf(typeof n)===-1)throw new Error("id must be a number or a string")}function xd(n){return typeof n=="number"}function qh(n,l,a){if(n!==null)for(var s,o,h,v,m,E,A,F=0,B=0,V,j=n.type,at=j==="FeatureCollection",ut=j==="Feature",xt=at?n.features.length:1,Nt=0;NtE||at>A||ut>F){m=B,E=s,A=at,F=ut,h=0;return}var xt=lineString([m,B],a.properties);if(l(xt,s,o,ut,h)===!1)return!1;h++,m=B})===!1)return!1}}})}function cc(n,l,a){var s=a,o=!1;return Uf(n,function(h,v,m,E,A){o===!1&&a===void 0?s=h:s=l(s,h,v,m,E,A),o=!0}),s}function yl(n,l){if(!n)throw new Error("geojson is required");is(n,function(a,s,o){if(a.geometry!==null){var h=a.geometry.type,v=a.geometry.coordinates;switch(h){case"LineString":if(l(a,s,o,0,0)===!1)return!1;break;case"Polygon":for(var m=0;ma[0]&&(l[0]=a[0]),l[1]>a[1]&&(l[1]=a[1]),l[2]s&&n.lng<=h&&n.lat>o&&n.lat<=v}function Vf(n){var l=[1/0,1/0,-1/0,-1/0];return n.forEach(function(a){var s=a.coordinates;fc(l,s)}),l}function fc(n,l){return Array.isArray(l[0])?l.forEach(function(a){fc(n,a)}):(n[0]>l[0]&&(n[0]=l[0]),n[1]>l[1]&&(n[1]=l[1]),n[2]1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{enable:!0,decimal:1};n=kl(n,l);var s=n[0],o=n[1],h=s*xa/180,v=Math.log(Math.tan((90+o)*Math.PI/360))/(Math.PI/180);return v=v*xa/180,a.enable&&(h=Number(h.toFixed(a.decimal)),v=Number(v.toFixed(a.decimal))),n.length===3?[h,v,n[2]]:[h,v]}function Fp(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=n[0],s=n[1],o=a/xa*180,h=s/xa*180;return h=180/Math.PI*(2*Math.atan(Math.exp(h*Math.PI/180))-Math.PI/2),l!=null&&(o=Number(o.toFixed(l)),h=Number(h.toFixed(l))),n.length===3?[o,h,n[2]]:[o,h]}function bd(n){if(n==null)throw new Error("lng is required");return(n>180||n<-180)&&(n=n%360,n>180&&(n=-360+n),n<-180&&(n=360+n),n===0&&(n=0)),n}function Ed(n){if(n==null)throw new Error("lat is required");return(n>90||n<-90)&&(n=n%180,n>90&&(n=-180+n),n<-90&&(n=180+n),n===0&&(n=0)),n}function kl(n,l){if(l===!1)return n;var a=bd(n[0]),s=Ed(n[1]);return s>85&&(s=85),s<-85&&(s=-85),n.length===3?[a,s,n[2]]:[a,s]}function qo(n){var l=85.0511287798,a=Math.max(Math.min(l,n[1]),-l),s=256<<20,o=Math.PI/180,h=n[0]*o,v=a*o;v=Math.log(Math.tan(Math.PI/4+v/2));var m=.5/Math.PI,E=.5,A=-.5/Math.PI;return o=.5,h=s*(m*h+E),v=s*(A*v+o),[Math.floor(h),Math.floor(v)]}function to(n){var l=.5/Math.PI,a=.5,s=-.5/Math.PI,o=.5,h=256<<20,v=_slicedToArray(n,2),m=v[0],E=v[1];m=(m/h-a)/l,E=(E/h-o)/s,E=(Math.atan(Math.pow(Math.E,E))-Math.PI/4)*2,o=Math.PI/180;var A=E/o,F=m/o;return[F,A]}function bl(n,l){var a=85.0511287798,s=Math.PI/180,o=6378137;return l=Math.max(Math.min(a,l),-a),n*=s,l*=s,l=Math.log(Math.tan(Math.PI/4+l/2)),[n*o,l*o]}function ql(n,l){var a=Math.PI/180,s=6378137,o=n/s/a,h=2*(Math.atan(Math.exp(l/s))-Math.PI/4)/a;return[o,h]}function Ps(n,l,a){var s=zl(l[1]-n[1]),o=zl(l[0]-n[0]),h=zl(n[1]),v=zl(l[1]),m=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(h)*Math.cos(v);return _d(2*Math.atan2(Math.sqrt(m),Math.sqrt(1-m)),a="meters")}function Zc(n){var l=Math.PI/180,a=85.0511287798,s=6378137,o=Math.max(Math.min(a,n[1]),-a),h=Math.sin(o*l),v=s*n[0]*l,m=s*Math.log((1+h)/(1-h))/2;return[v,m]}function Ul(n,l){var a=Math.abs(n[1][1]-n[0][1])*l,s=Math.abs(n[1][0]-n[0][0])*l;return[[n[0][0]-s,n[0][1]-a],[n[1][0]+s,n[1][1]+a]]}function Mu(n,l){return n[0][0]<=l[0][0]&&n[0][1]<=l[0][1]&&n[1][0]>=l[1][0]&&n[1][1]>=l[1][1]}function Iu(n){return[[n[0],n[1]],[n[2],n[3]]]}function Ll(n){var l=Ki(n,[0,0]);return[n[0]/l,n[1]/l]}function Ki(n,l){return Math.sqrt(Math.pow(n[0]-l[0],2)+Math.pow(n[1]-l[1],2))}function ji(n,l){return n[0]*l[0]+n[1]*l[1]}function xf(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function sl(n,l){return Math.acos(ji(n,l)/(xf(n)*xf(l)))*180/Math.PI}function ul(n,l){return l[0]>0?l[1]>0?90-Math.atan(l[1]/l[0])*180/Math.PI:90+Math.atan(-l[1]/l[0])*180/Math.PI:l[1]<0?180+(90-Math.atan(l[1]/l[0])*180/Math.PI):270+Math.atan(l[1]/-l[0])*180/Math.PI}function Bu(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;if(!(!n||n.length<2)){for(var a=[0,1],s=0,o=[],h=0;h0){var B=o[h-1].rotation;B-F>360-B+F&&(F=F+360)}o.push({start:v,end:m,dis:E,rotation:F,duration:0})}return o.map(function(V){V.duration=l*(V.dis/s)}),o}}function Es(n){if(xd(n[0]))return n;if(xd(n[0][0]))throw new Error("\u5F53\u524D\u6570\u636E\u4E0D\u652F\u6301\u6807\u6CE8");if(xd(n[0][0][0])){var l=n,a=0,s=0,o=0;return l.forEach(function(h){h.forEach(function(v){a+=v[0],s+=v[1],o++})}),[a/o,s/o,0]}else throw new Error("\u5F53\u524D\u6570\u636E\u4E0D\u652F\u6301\u6807\u6CE8")}function Cc(n){for(var l=n[0],a=n[1],s=n[0],o=n[1],h=0,v=0,m=0,E=0;E0&&arguments[0]!==void 0?arguments[0]:50,a=arguments.length>1?arguments[1]:void 0;(0,ct.Z)(this,n),this.limit=l,this.destroy=a||this.defaultDestroy,this.order=[],this.clear()}return(0,et.Z)(n,[{key:"clear",value:function(){var a=this;this.order.forEach(function(s){a.delete(s)}),this.cache={},this.order=[]}},{key:"get",value:function(a){var s=this.cache[a];return s&&(this.deleteOrder(a),this.appendOrder(a)),s}},{key:"set",value:function(a,s){this.cache[a]?(this.delete(a),this.cache[a]=s,this.appendOrder(a)):(Object.keys(this.cache).length===this.limit&&this.delete(this.order[0]),this.cache[a]=s,this.appendOrder(a))}},{key:"delete",value:function(a){var s=this.cache[a];s&&(this.deleteCache(a),this.deleteOrder(a),this.destroy(s,a))}},{key:"deleteCache",value:function(a){delete this.cache[a]}},{key:"deleteOrder",value:function(a){var s=this.order.findIndex(function(o){return o===a});s>=0&&this.order.splice(s,1)}},{key:"appendOrder",value:function(a){this.order.push(a)}},{key:"defaultDestroy",value:function(a,s){return null}}]),n}();function as(n,l){n.forEach(function(a){!l[a]||(l[a]=l[a].bind(l))})}var Jh=null;function Vc(n,l,a){n.prototype=l.prototype=a,a.constructor=n}function hc(n,l){var a=Object.create(n.prototype);for(var s in l)a[s]=l[s];return a}function ll(){}var Ns=.7,Os=1/Ns,Qu="\\s*([+-]?\\d+)\\s*",Gc="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",cl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Gf=/^#([0-9a-f]{3,8})$/,Tc=new RegExp("^rgb\\("+[Qu,Qu,Qu]+"\\)$"),fh=new RegExp("^rgb\\("+[cl,cl,cl]+"\\)$"),Hf=new RegExp("^rgba\\("+[Qu,Qu,Qu,Gc]+"\\)$"),wd=new RegExp("^rgba\\("+[cl,cl,cl,Gc]+"\\)$"),zs=new RegExp("^hsl\\("+[Gc,cl,cl]+"\\)$"),Mc=new RegExp("^hsla\\("+[Gc,cl,cl,Gc]+"\\)$"),tp={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Vc(ll,pc,{copy:function(n){return Object.assign(new this.constructor,this,n)},displayable:function(){return this.rgb().displayable()},hex:El,formatHex:El,formatHsl:Zl,formatRgb:ep,toString:ep});function El(){return this.rgb().formatHex()}function Zl(){return ft(this).formatHsl()}function ep(){return this.rgb().formatRgb()}function pc(n){var l,a;return n=(n+"").trim().toLowerCase(),(l=Gf.exec(n))?(a=l[1].length,l=parseInt(l[1],16),a===6?Rp(l):a===3?new w(l>>8&15|l>>4&240,l>>4&15|l&240,(l&15)<<4|l&15,1):a===8?Hc(l>>24&255,l>>16&255,l>>8&255,(l&255)/255):a===4?Hc(l>>12&15|l>>8&240,l>>8&15|l>>4&240,l>>4&15|l&240,((l&15)<<4|l&15)/255):null):(l=Tc.exec(n))?new w(l[1],l[2],l[3],1):(l=fh.exec(n))?new w(l[1]*255/100,l[2]*255/100,l[3]*255/100,1):(l=Hf.exec(n))?Hc(l[1],l[2],l[3],l[4]):(l=wd.exec(n))?Hc(l[1]*255/100,l[2]*255/100,l[3]*255/100,l[4]):(l=zs.exec(n))?$(l[1],l[2]/100,l[3]/100,1):(l=Mc.exec(n))?$(l[1],l[2]/100,l[3]/100,l[4]):tp.hasOwnProperty(n)?Rp(tp[n]):n==="transparent"?new w(NaN,NaN,NaN,0):null}function Rp(n){return new w(n>>16&255,n>>8&255,n&255,1)}function Hc(n,l,a,s){return s<=0&&(n=l=a=NaN),new w(n,l,a,s)}function x(n){return n instanceof ll||(n=pc(n)),n?(n=n.rgb(),new w(n.r,n.g,n.b,n.opacity)):new w}function C(n,l,a,s){return arguments.length===1?x(n):new w(n,l,a,s==null?1:s)}function w(n,l,a,s){this.r=+n,this.g=+l,this.b=+a,this.opacity=+s}Vc(w,C,hc(ll,{brighter:function(n){return n=n==null?Os:Math.pow(Os,n),new w(this.r*n,this.g*n,this.b*n,this.opacity)},darker:function(n){return n=n==null?Ns:Math.pow(Ns,n),new w(this.r*n,this.g*n,this.b*n,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:M,formatHex:M,formatRgb:z,toString:z}));function M(){return"#"+H(this.r)+H(this.g)+H(this.b)}function z(){var n=this.opacity;return n=isNaN(n)?1:Math.max(0,Math.min(1,n)),(n===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(n===1?")":", "+n+")")}function H(n){return n=Math.max(0,Math.min(255,Math.round(n)||0)),(n<16?"0":"")+n.toString(16)}function $(n,l,a,s){return s<=0?n=l=a=NaN:a<=0||a>=1?n=l=NaN:l<=0&&(n=NaN),new re(n,l,a,s)}function ft(n){if(n instanceof re)return new re(n.h,n.s,n.l,n.opacity);if(n instanceof ll||(n=pc(n)),!n)return new re;if(n instanceof re)return n;n=n.rgb();var l=n.r/255,a=n.g/255,s=n.b/255,o=Math.min(l,a,s),h=Math.max(l,a,s),v=NaN,m=h-o,E=(h+o)/2;return m?(l===h?v=(a-s)/m+(a0&&E<1?0:v,new re(v,m,E,n.opacity)}function Ut(n,l,a,s){return arguments.length===1?ft(n):new re(n,l,a,s==null?1:s)}function re(n,l,a,s){this.h=+n,this.s=+l,this.l=+a,this.opacity=+s}Vc(re,Ut,hc(ll,{brighter:function(n){return n=n==null?Os:Math.pow(Os,n),new re(this.h,this.s,this.l*n,this.opacity)},darker:function(n){return n=n==null?Ns:Math.pow(Ns,n),new re(this.h,this.s,this.l*n,this.opacity)},rgb:function(){var n=this.h%360+(this.h<0)*360,l=isNaN(n)||isNaN(this.s)?0:this.s,a=this.l,s=a+(a<.5?a:1-a)*l,o=2*a-s;return new w(De(n>=240?n-240:n+120,o,s),De(n,o,s),De(n<120?n+240:n-120,o,s),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var n=this.opacity;return n=isNaN(n)?1:Math.max(0,Math.min(1,n)),(n===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(n===1?")":", "+n+")")}}));function De(n,l,a){return(n<60?l+(a-l)*n/60:n<180?a:n<240?l+(a-l)*(240-n)/60:l)*255}function Be(n){return typeof n=="string"?!!d3.color(n):!1}function Le(n){var l=pc(n),a=[0,0,0,0];return l!=null&&(a[0]=l.r/255,a[1]=l.g/255,a[2]=l.b/255,a[3]=l.opacity),a}function cr(n){var l=n&&n[0],a=n&&n[1],s=n&&n[2],o=l+a*256+s*65536-1;return o}function ar(n){return[n+1&255,n+1>>8&255,n+1>>8>>8&255]}function Er(n){var l=Co.document.createElement("canvas"),a=l.getContext("2d");l.width=256,l.height=1;var s=null;if(n.weights){var o=0;n.weights.map(function(V,j){var at=n.colors[j]||"rgba(0, 0, 0, 0)",ut=o+V;a.fillStyle=at,a.fillRect(o*256,0,ut*256,1),o=ut})}else{for(var h=a.createLinearGradient(0,0,256,1),v=n.positions[0],m=n.positions[n.positions.length-1],E=0;E0&&h[h.length-1])&&(A[0]===6||A[0]===2)){a=0;continue}if(A[0]===3&&(!h||A[1]>h[0]&&A[1]this.getMaxConcurrency();a?(l.destroy(),this.count--):this.idleQueue.push(l),this.isDestroyed||this.startQueuedJob()},n.prototype.getAvailableWorker=function(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},Ic={maxConcurrency:3,maxMobileConcurrency:1,onDebug:function(){},reuseWorkers:!0},Ju=function(){function n(l){this.workerPools=new Map,this.props=vu({},Ic),this.setProps(l),this.workerPools=new Map}return n.isSupported=function(){return Us.isSupported()},n.getWorkerFarm=function(l){return l===void 0&&(l={}),n.workerFarm=n.workerFarm||new n({}),n.workerFarm.setProps(l),n.workerFarm},n.prototype.destroy=function(){var l,a;try{for(var s=Nu(this.workerPools.values()),o=s.next();!o.done;o=s.next()){var h=o.value;h.destroy()}}catch(v){l={error:v}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(l)throw l.error}}},n.prototype.setProps=function(l){var a,s;this.props=vu(vu({},this.props),l);try{for(var o=Nu(this.workerPools.values()),h=o.next();!h.done;h=o.next()){var v=h.value;v.setProps(this.getWorkerPoolProps())}}catch(m){a={error:m}}finally{try{h&&!h.done&&(s=o.return)&&s.call(o)}finally{if(a)throw a.error}}},n.prototype.getWorkerPool=function(l){var a=l.name,s=l.source,o=l.url,h=this.workerPools.get(a);return h||(h=new ls({name:a,source:s,url:o}),h.setProps(this.getWorkerPoolProps()),this.workerPools.set(a,h)),h},n.prototype.getWorkerPoolProps=function(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}},n}(),Kl=Ju,fl=new Map,hh=function(){function n(){}return Object.defineProperty(n,"onmessage",{set:function(l){self.onmessage=function(a){if(!!Ql(a)){var s=a.data,o=s.type,h=s.payload;l(o,h)}}},enumerable:!1,configurable:!0}),n.addEventListener=function(l){var a=fl.get(l);a||(a=function(s){if(!!Ql(s)){var o=s.data,h=o.type,v=o.payload;l(h,v)}}),self.addEventListener("message",a)},n.removeEventListener=function(l){var a=fl.get(l);fl.delete(l),self.removeEventListener("message",a)},n.postMessage=function(l,a){if(self){var s={source:"Worker thread",type:l,payload:a},o=la(a);self.postMessage(s,o)}},n}(),wl=hh;function Ql(n){var l=n.type,a=n.data;return l==="message"&&a&&typeof a.source=="string"&&a.source==="Main thread"}function ph(n){return JSON.parse(jf(n))}function jf(n){var l=new Set;return JSON.stringify(n,function(a,s){if(typeof s=="object"&&s!==null){if(l.has(s))try{return JSON.parse(JSON.stringify(s))}catch(o){return}l.add(s)}return s})}function dc(n){return""+n.name}function dh(n,l){l===void 0&&(l={});var a=l[n.id]||{},s=n.name+".worker.js",o=a.workerUrl;return l._workerType==="test"&&(o=n.module+"/dist/"+s),o||(o="https://unpkg.com/"+n.module+"/dist/"+s),assert(o),o}var Jl=function(n,l,a,s){function o(h){return h instanceof a?h:new a(function(v){v(h)})}return new(a||(a=Promise))(function(h,v){function m(F){try{A(s.next(F))}catch(B){v(B)}}function E(F){try{A(s.throw(F))}catch(B){v(B)}}function A(F){F.done?h(F.value):o(F.value).then(m,E)}A((s=s.apply(n,l||[])).next())})},Xs=function(n,l){var a={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},s,o,h,v;return v={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function m(A){return function(F){return E([A,F])}}function E(A){if(s)throw new TypeError("Generator is already executing.");for(;a;)try{if(s=1,o&&(h=A[0]&2?o.return:A[0]?o.throw||((h=o.return)&&h.call(o),0):o.next)&&!(h=h.call(o,A[1])).done)return h;switch(o=0,h&&(A=[A[0]&2,h.value]),A[0]){case 0:case 1:h=A;break;case 4:return a.label++,{value:A[1],done:!1};case 5:a.label++,o=A[1],A=[0];continue;case 7:A=a.ops.pop(),a.trys.pop();continue;default:if(h=a.trys,!(h=h.length>0&&h[h.length-1])&&(A[0]===6||A[0]===2)){a=0;continue}if(A[0]===3&&(!h||A[1]>h[0]&&A[1]0){if(this._values.length>0)throw new Error("Illegal internal state");var a=this._settlers.shift();l instanceof Error?a.reject(l):a.resolve({value:l})}else this._values.push(l)},n.prototype.close=function(){for(;this._settlers.length>0;){var l=this._settlers.shift();l.resolve({done:!0})}this._closed=!0},n.prototype.next=function(){var l=this;if(this._values.length>0){var a=this._values.shift();return a instanceof Error?Promise.reject(a):Promise.resolve({done:!1,value:a})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0,value:void 0})}return new Promise(function(s,o){l._settlers.push({resolve:s,reject:o})})},n}(),Sl=Io,tl=function(n,l,a,s){function o(h){return h instanceof a?h:new a(function(v){v(h)})}return new(a||(a=Promise))(function(h,v){function m(F){try{A(s.next(F))}catch(B){v(B)}}function E(F){try{A(s.throw(F))}catch(B){v(B)}}function A(F){F.done?h(F.value):o(F.value).then(m,E)}A((s=s.apply(n,l||[])).next())})},Wc=function(n,l){var a={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},s,o,h,v;return v={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function m(A){return function(F){return E([A,F])}}function E(A){if(s)throw new TypeError("Generator is already executing.");for(;a;)try{if(s=1,o&&(h=A[0]&2?o.return:A[0]?o.throw||((h=o.return)&&h.call(o),0):o.next)&&!(h=h.call(o,A[1])).done)return h;switch(o=0,h&&(A=[A[0]&2,h.value]),A[0]){case 0:case 1:h=A;break;case 4:return a.label++,{value:A[1],done:!1};case 5:a.label++,o=A[1],A=[0];continue;case 7:A=a.ops.pop(),a.trys.pop();continue;default:if(h=a.trys,!(h=h.length>0&&h[h.length-1])&&(A[0]===6||A[0]===2)){a=0;continue}if(A[0]===3&&(!h||A[1]>h[0]&&A[1]0&&h[h.length-1])&&(A[0]===6||A[0]===2)){a=0;continue}if(A[0]===3&&(!h||A[1]>h[0]&&A[1]0&&arguments[0]!==void 0?arguments[0]:{};(0,ct.Z)(this,n),(0,X.Z)(this,"lastFlip",-1),(0,X.Z)(this,"miter",ti.al(0,0)),(0,X.Z)(this,"started",!1),(0,X.Z)(this,"dash",!1),(0,X.Z)(this,"totalDistance",0),(0,X.Z)(this,"currentIndex",0),this.join=l.join||"miter",this.cap=l.cap||"butt",this.miterLimit=l.miterLimit||10,this.thickness=l.thickness||1,this.dash=l.dash||!1,this.complex={positions:[],indices:[],normals:[],startIndex:0,indexes:[]}}return(0,et.Z)(n,[{key:"extrude_gaode2",value:function(a,s){var o=this.complex;if(a.length<=1)return o;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var h=a.length,v=o.startIndex,m=1;mthis.miterLimit&&($n=!0)}$n?(j.push(this.normal[0],this.normal[1],0),j.push(yn[0],yn[1],0),V.push(h[0],h[1],h[2]|0,this.totalDistance,-this.thickness*cn,h[2]|0),this.complex.indexes.push(this.currentIndex),V.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness*cn,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,B.push.apply(B,(0,me.Z)(this.lastFlip!==-cn?[s,s+2,s+3]:[s+2,s+1,s+3])),B.push(s+2,s+3,s+4),Al(Cd,Ef),ti.JG(this.normal,Cd),j.push(this.normal[0],this.normal[1],0),V.push(h[0],h[1],h[2]|0,this.totalDistance,-this.thickness*cn,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,F+=3):(this.extrusions(V,j,h,yn,Wr,this.totalDistance),B.push.apply(B,(0,me.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),cn=-1,ti.JG(this.normal,yn),F+=2),this.lastFlip=cn}else{if(Al(this.normal,Zs),at){var Ye=ti.Ue(),yr=ti.Ue();ti.lu(yr,Zs,this.normal),ti.IH(Ye,Zs,this.normal),j.push(yr[0],yr[1],0),j.push(Ye[0],Ye[1],0),V.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness,h[2]|0),this.complex.indexes.push(this.currentIndex),V.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(V,j,h,this.normal,this.thickness,this.totalDistance);B.push.apply(B,(0,me.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),F+=2}return F}},{key:"simpleSegment",value:function(a,s,o,h,v){var m=0,E=a.indices,A=a.positions,F=a.normals,B=qo([h[0],h[1]]),V=qo([o[0],o[1]]);Lc(Zs,B,V);var j=0;if(this.dash&&(j=this.lineSegmentDistance(B,V),this.totalDistance+=j),this.normal||(this.normal=ti.Ue(),Al(this.normal,Zs)),this.started||(this.started=!0,this.extrusions(A,F,o,this.normal,this.thickness,this.totalDistance-j)),E.push(s+0,s+1,s+2),!v)Al(this.normal,Zs),this.extrusions(A,F,h,this.normal,this.thickness,this.totalDistance),E.push.apply(E,(0,me.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),m+=2;else{var at=qo([v[0],v[1]]);Np(B,at)&&ti.IH(at,B,ti.Fv(at,ti.$X(at,B,V))),Lc(Ef,at,B);var ut=Kc(Bp,ti.Ue(),Zs,Ef,this.thickness),xt=(0,ht.Z)(ut,2),Nt=xt[0],de=xt[1],fe=ti.AK(Bp,this.normal)<0?-1:1;this.extrusions(A,F,h,de,Nt,this.totalDistance),E.push.apply(E,(0,me.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),fe=-1,ti.JG(this.normal,de),m+=2,this.lastFlip=fe}return m}},{key:"segment",value:function(a,s,o,h,v){var m=0,E=a.indices,A=a.positions,F=a.normals,B=this.cap==="square",V=this.join==="bevel",j=qo([h[0],h[1]]),at=qo([o[0],o[1]]);Lc(Zs,j,at);var ut=0;if(this.dash&&(ut=this.lineSegmentDistance(j,at),this.totalDistance+=ut),this.normal||(this.normal=ti.Ue(),Al(this.normal,Zs)),!this.started)if(this.started=!0,B){var xt=ti.Ue(),Nt=ti.Ue();ti.IH(xt,this.normal,Zs),ti.IH(Nt,this.normal,Zs),F.push(Nt[0],Nt[1],0),F.push(xt[0],xt[1],0),A.push(o[0],o[1],o[2]|0,this.totalDistance-ut,-this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),A.push(o[0],o[1],o[2]|0,this.totalDistance-ut,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(A,F,o,this.normal,this.thickness,this.totalDistance-ut);if(E.push(s+0,s+1,s+2),v){var Ne=qo([v[0],v[1]]);Np(j,Ne)&&ti.IH(Ne,j,ti.Fv(Ne,ti.$X(Ne,j,at))),Lc(Ef,Ne,j);var Ye=Kc(Bp,ti.Ue(),Zs,Ef,this.thickness),yr=(0,ht.Z)(Ye,2),Ir=yr[0],Nr=yr[1],Wr=ti.AK(Bp,this.normal)<0?-1:1,yn=V;if(!yn&&this.join==="miter"){var cn=Ir;cn>this.miterLimit&&(yn=!0)}yn?(F.push(this.normal[0],this.normal[1],0),F.push(Nr[0],Nr[1],0),A.push(h[0],h[1],h[2]|0,this.totalDistance,-this.thickness*Wr,h[2]|0),this.complex.indexes.push(this.currentIndex),A.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness*Wr,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,E.push.apply(E,(0,me.Z)(this.lastFlip!==-Wr?[s,s+2,s+3]:[s+2,s+1,s+3])),E.push(s+2,s+3,s+4),Al(Cd,Ef),ti.JG(this.normal,Cd),F.push(this.normal[0],this.normal[1],0),A.push(h[0],h[1],h[2]|0,this.totalDistance,-this.thickness*Wr,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,m+=3):(this.extrusions(A,F,h,Nr,Ir,this.totalDistance),E.push.apply(E,(0,me.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),Wr=-1,ti.JG(this.normal,Nr),m+=2),this.lastFlip=Wr}else{if(Al(this.normal,Zs),B){var de=ti.Ue(),fe=ti.Ue();ti.lu(fe,Zs,this.normal),ti.IH(de,Zs,this.normal),F.push(fe[0],fe[1],0),F.push(de[0],de[1],0),A.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness,h[2]|0),this.complex.indexes.push(this.currentIndex),A.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(A,F,h,this.normal,this.thickness,this.totalDistance);E.push.apply(E,(0,me.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),m+=2}return m}},{key:"extrusions",value:function(a,s,o,h,v,m){s.push(h[0],h[1],0),s.push(h[0],h[1],0),a.push(o[0],o[1],o[2]|0,m,-v,o[2]|0),this.complex.indexes.push(this.currentIndex),a.push(o[0],o[1],o[2]|0,m,v,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}},{key:"lineSegmentDistance",value:function(a,s){var o=s[0]-a[0],h=s[1]-a[1];return Math.sqrt(o*o+h*h)}}]),n}();function Vs(n){var l=n.coordinates,a=n.originCoordinates,s=n.version,o=new ov({dash:!0,join:"bevel"});if(s==="GAODE2.x"){var h=l;Array.isArray(h[0][0])||(h=[l]);var v=a;Array.isArray(v[0][0])||(v=[a]);for(var m=0;m=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function n(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function u(t){n(a,o,i,u,s,"next",t)}function s(t){n(a,o,i,u,s,"throw",t)}u(void 0)}))}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&w[0]<4?1:+(w[0]+w[1])),!E&&X&&(!(w=X.match(/Edge\\/(\\d+)/))||w[1]>=74)&&(w=X.match(/Chrome\\/(\\d+)/))&&(E=+w[1]);var nt=E,ot=!!Object.getOwnPropertySymbols&&!j((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&nt&&nt<41})),it=ot&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,at=I("wks"),ut=O.Symbol,st=ut&&ut.for,ct=it?ut:ut&&ut.withoutSetter||V,ft=function(t){if(!B(at,t)||!ot&&"string"!=typeof at[t]){var e="Symbol."+t;ot&&B(ut,t)?at[t]=ut[t]:at[t]=it&&st?st(e):ct(e)}return at[t]},lt={};lt[ft("toStringTag")]="z";var ht="[object z]"===String(lt),pt=!j((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),vt=Z.all,dt=Z.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:$(t)||t===vt}:function(t){return"object"==typeof t?null!==t:$(t)},yt=O.document,gt=dt(yt)&&dt(yt.createElement),mt=function(t){return gt?yt.createElement(t):{}},xt=!pt&&!j((function(){return 7!=Object.defineProperty(mt("div"),"a",{get:function(){return 7}}).a})),bt=pt&&j((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),wt=String,Et=TypeError,At=function(t){if(dt(t))return t;throw Et(wt(t)+" is not an object")},Ot=Function.prototype.call,St=P?Ot.bind(Ot):function(){return Ot.apply(Ot,arguments)},Tt=R({}.isPrototypeOf),kt=Object,It=it?function(t){return"symbol"==typeof t}:function(t){var e=Q("Symbol");return $(e)&&Tt(e.prototype,kt(t))},jt=String,Pt=function(t){try{return jt(t)}catch(t){return"Object"}},_t=TypeError,Mt=function(t){if($(t))return t;throw _t(Pt(t)+" is not a function")},Lt=function(t,e){var r=t[e];return C(r)?void 0:Mt(r)},Rt=TypeError,Ct=TypeError,Nt=ft("toPrimitive"),Dt=function(t,e){if(!dt(t)||It(t))return t;var r,n=Lt(t,Nt);if(n){if(void 0===e&&(e="default"),r=St(n,t,e),!dt(r)||It(r))return r;throw Ct("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&$(r=t.toString)&&!dt(n=St(r,t)))return n;if($(r=t.valueOf)&&!dt(n=St(r,t)))return n;if("string"!==e&&$(r=t.toString)&&!dt(n=St(r,t)))return n;throw Rt("Can't convert object to primitive value")}(t,e)},Ft=function(t){var e=Dt(t,"string");return It(e)?e:e+""},Wt=TypeError,zt=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor,Ut={f:pt?bt?function(t,e,r){if(At(t),e=Ft(e),At(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=Bt(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return zt(t,e,r)}:zt:function(t,e,r){if(At(t),e=Ft(e),At(r),xt)try{return zt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Wt("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},Gt=Function.prototype,Ht=pt&&Object.getOwnPropertyDescriptor,Vt=B(Gt,"name"),qt={EXISTS:Vt,PROPER:Vt&&"something"===function(){}.name,CONFIGURABLE:Vt&&(!pt||pt&&Ht(Gt,"name").configurable)},Zt=R(Function.toString);$(k.inspectSource)||(k.inspectSource=function(t){return Zt(t)});var Yt,$t,Kt,Qt=k.inspectSource,Xt=O.WeakMap,Jt=$(Xt)&&/native code/.test(String(Xt)),te=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},ee=pt?function(t,e,r){return Ut.f(t,e,te(1,r))}:function(t,e,r){return t[e]=r,t},re=I("keys"),ne=function(t){return re[t]||(re[t]=V(t))},oe={},ie=O.TypeError,ae=O.WeakMap;if(Jt||k.state){var ue=k.state||(k.state=new ae);ue.get=ue.get,ue.has=ue.has,ue.set=ue.set,Yt=function(t,e){if(ue.has(t))throw ie("Object already initialized");return e.facade=t,ue.set(t,e),e},$t=function(t){return ue.get(t)||{}},Kt=function(t){return ue.has(t)}}else{var se=ne("state");oe[se]=!0,Yt=function(t,e){if(B(t,se))throw ie("Object already initialized");return e.facade=t,ee(t,se,e),e},$t=function(t){return B(t,se)?t[se]:{}},Kt=function(t){return B(t,se)}}var ce={set:Yt,get:$t,has:Kt,enforce:function(t){return Kt(t)?$t(t):Yt(t,{})},getterFor:function(t){return function(e){var r;if(!dt(e)||(r=$t(e)).type!==t)throw ie("Incompatible receiver, "+t+" required");return r}}},fe=b((function(t){var e=qt.CONFIGURABLE,r=ce.enforce,n=ce.get,o=Object.defineProperty,i=pt&&!j((function(){return 8!==o((function(){}),"length",{value:8}).length})),a=String(String).split("String"),u=t.exports=function(t,n,u){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\\(([^)]*)\\)/,"$1")+"]"),u&&u.getter&&(n="get "+n),u&&u.setter&&(n="set "+n),(!B(t,"name")||e&&t.name!==n)&&(pt?o(t,"name",{value:n,configurable:!0}):t.name=n),i&&u&&B(u,"arity")&&t.length!==u.arity&&o(t,"length",{value:u.arity});try{u&&B(u,"constructor")&&u.constructor?pt&&o(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var s=r(t);return B(s,"source")||(s.source=a.join("string"==typeof n?n:"")),t};Function.prototype.toString=u((function(){return $(this)&&n(this).source||Qt(this)}),"toString")})),le=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if($(r)&&fe(r,i,n),n.global)o?t[e]=r:T(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Ut.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},he=R({}.toString),pe=R("".slice),ve=function(t){return pe(he(t),8,-1)},de=ft("toStringTag"),ye=Object,ge="Arguments"==ve(function(){return arguments}()),me=ht?ve:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=ye(t),de))?r:ge?ve(e):"Object"==(n=ve(e))&&$(e.callee)?"Arguments":n},xe=ht?{}.toString:function(){return"[object "+me(this)+"]"};ht||le(Object.prototype,"toString",xe,{unsafe:!0});var be={}.propertyIsEnumerable,we=Object.getOwnPropertyDescriptor,Ee={f:we&&!be.call({1:2},1)?function(t){var e=we(this,t);return!!e&&e.enumerable}:be},Ae=Object,Oe=R("".split),Se=j((function(){return!Ae("z").propertyIsEnumerable(0)}))?function(t){return"String"==ve(t)?Oe(t,""):Ae(t)}:Ae,Te=function(t){return Se(D(t))},ke=Object.getOwnPropertyDescriptor,Ie={f:pt?ke:function(t,e){if(t=Te(t),e=Ft(e),xt)try{return ke(t,e)}catch(t){}if(B(t,e))return te(!St(Ee.f,t,e),t[e])}},je=Math.ceil,Pe=Math.floor,_e=Math.trunc||function(t){var e=+t;return(e>0?Pe:je)(e)},Me=function(t){var e=+t;return e!=e||0===e?0:_e(e)},Le=Math.max,Re=Math.min,Ce=function(t,e){var r=Me(t);return r<0?Le(r+e,0):Re(r,e)},Ne=Math.min,De=function(t){return t>0?Ne(Me(t),9007199254740991):0},Fe=function(t){return De(t.length)},We=function(t){return function(e,r,n){var o,i=Te(e),a=Fe(i),u=Ce(n,a);if(t&&r!=r){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===r)return t||u||0;return!t&&-1}},ze={includes:We(!0),indexOf:We(!1)},Be=ze.indexOf,Ue=R([].push),Ge=function(t,e){var r,n=Te(t),o=0,i=[];for(r in n)!B(oe,r)&&B(n,r)&&Ue(i,r);for(;e.length>o;)B(n,r=e[o++])&&(~Be(i,r)||Ue(i,r));return i},He=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ve=He.concat("length","prototype"),qe={f:Object.getOwnPropertyNames||function(t){return Ge(t,Ve)}},Ze={f:Object.getOwnPropertySymbols},Ye=R([].concat),$e=Q("Reflect","ownKeys")||function(t){var e=qe.f(At(t)),r=Ze.f;return r?Ye(e,r(t)):e},Ke=function(t,e,r){for(var n=$e(e),o=Ut.f,i=Ie.f,a=0;ai;i++)if((u=g(t[i]))&&Tt(So,u))return u;return new Oo(!1)}n=wo(t,o)}for(s=h?t.next:n.next;!(c=St(s,n)).done;){try{u=g(c.value)}catch(t){Eo(n,"throw",t)}if("object"==typeof u&&u&&Tt(So,u))return u}return new Oo(!1)},ko=ft("iterator"),Io=!1;try{var jo=0,Po={next:function(){return{done:!!jo++}},return:function(){Io=!0}};Po[ko]=function(){return this},Array.from(Po,(function(){throw 2}))}catch(t){}var _o=function(t,e){if(!e&&!Io)return!1;var r=!1;try{var n={};n[ko]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},Mo=Fn.CONSTRUCTOR||!_o((function(t){Mn.all(t).then(void 0,(function(){}))}));ir({target:"Promise",stat:!0,forced:Mo},{all:function(t){var e=this,r=Bn.f(e),n=r.resolve,o=r.reject,i=Tn((function(){var r=Mt(e.resolve),i=[],a=0,u=1;To(t,(function(t){var s=a++,c=!1;u++,St(r,e,t).then((function(t){c||(c=!0,i[s]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise}});var Lo=Fn.CONSTRUCTOR,Ro=Mn&&Mn.prototype;if(ir({target:"Promise",proto:!0,forced:Lo,real:!0},{catch:function(t){return this.then(void 0,t)}}),$(Mn)){var Co=Q("Promise").prototype.catch;Ro.catch!==Co&&le(Ro,"catch",Co,{unsafe:!0})}ir({target:"Promise",stat:!0,forced:Mo},{race:function(t){var e=this,r=Bn.f(e),n=r.reject,o=Tn((function(){var o=Mt(e.resolve);To(t,(function(t){St(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}}),ir({target:"Promise",stat:!0,forced:Fn.CONSTRUCTOR},{reject:function(t){var e=Bn.f(this);return St(e.reject,void 0,t),e.promise}});var No=Fn.CONSTRUCTOR;Q("Promise");function Do(t,e){if(!t)throw new Error(e||"web worker helper assertion failed.")}ir({target:"Promise",stat:!0,forced:No},{resolve:function(t){return function(t,e){if(At(t),dt(e)&&e.constructor===t)return e;var r=Bn.f(t);return(0,r.resolve)(e),r.promise}(this,t)}});var Fo="undefined"!=typeof window&&void 0!==window.orientation,Wo=function(){function t(t,e){var r=this;this.name=t,this.workerThread=e,this.isRunning=!0,this.resolve=function(){},this.reject=function(){},this.result=new Promise((function(t,e){r.resolve=t,r.reject=e}))}return t.prototype.postMessage=function(t,e){this.workerThread.postMessage({source:"Main thread",type:t,payload:e})},t.prototype.done=function(t){Do(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.resolve(t)},t.prototype.error=function(t){Do(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.reject(t)},t}(),zo=new Map;function Bo(t){Do(t.source&&!t.url||!t.source&&t.url);var e=zo.get(t.source||t.url);return e||(t.url&&(e=function(t){if(!t.startsWith("http"))return t;return Uo((e=t,"try {\\n importScripts('"+e+"');\\n} catch (error) {\\n console.error(error);\\n throw error;\\n}"));var e}(t.url),zo.set(t.url,e)),t.source&&(e=Uo(t.source),zo.set(t.source,e))),Do(e),e}function Uo(t){var e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function Go(t,e,r){void 0===e&&(e=!0);var n=r||new Set;if(t){if(Ho(t))n.add(t);else if(Ho(t.buffer))n.add(t.buffer);else if(ArrayBuffer.isView(t));else if(e&&"object"==typeof t)for(var o in t)Go(t[o],e,n)}else;return void 0===r?Array.from(n):[]}function Ho(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var Vo=function(){},qo=function(){function t(t){this.terminated=!1,this.loadableURL="";var e=t.name,r=t.source,n=t.url;Do(r||n),this.name=e,this.source=r,this.url=n,this.onMessage=Vo,this.onError=function(t){return console.log(t)},this.worker=this.createBrowserWorker()}return t.isSupported=function(){return"undefined"!=typeof Worker},t.prototype.destroy=function(){this.onMessage=Vo,this.onError=Vo,this.worker.terminate(),this.terminated=!0},Object.defineProperty(t.prototype,"isRunning",{get:function(){return Boolean(this.onMessage)},enumerable:!1,configurable:!0}),t.prototype.postMessage=function(t,e){e=e||Go(t),this.worker.postMessage(t,e)},t.prototype.getErrorFromErrorEvent=function(t){var e="Failed to load ";return e+="worker "+this.name+" from "+this.url+". ",t.message&&(e+=t.message+" in "),t.lineno&&(e+=":"+t.lineno+":"+t.colno),new Error(e)},t.prototype.createBrowserWorker=function(){var t=this;this.loadableURL=Bo({source:this.source,url:this.url});var e=new Worker(this.loadableURL,{name:this.name});return e.onmessage=function(e){e.data?t.onMessage(e.data):t.onError(new Error("No data received"))},e.onerror=function(e){t.onError(t.getErrorFromErrorEvent(e)),t.terminated=!0},e.onmessageerror=function(e){return console.error("worker "+t.name+", message error: "+e)},e},t}(),Zo=self&&self.__assign||function(){return(Zo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]this.getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this.startQueuedJob()},t.prototype.getAvailableWorker=function(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Jo={maxConcurrency:3,maxMobileConcurrency:1,onDebug:function(){},reuseWorkers:!0},ti=(function(){function t(t){this.workerPools=new Map,this.props=Qo({},Jo),this.setProps(t),this.workerPools=new Map}t.isSupported=function(){return qo.isSupported()},t.getWorkerFarm=function(e){return void 0===e&&(e={}),t.workerFarm=t.workerFarm||new t({}),t.workerFarm.setProps(e),t.workerFarm},t.prototype.destroy=function(){var t,e;try{for(var r=Xo(this.workerPools.values()),n=r.next();!n.done;n=r.next()){n.value.destroy()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.setProps=function(t){var e,r;this.props=Qo(Qo({},this.props),t);try{for(var n=Xo(this.workerPools.values()),o=n.next();!o.done;o=n.next()){o.value.setProps(this.getWorkerPoolProps())}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.getWorkerPool=function(t){var e=t.name,r=t.source,n=t.url,o=this.workerPools.get(e);return o||((o=new Ko({name:e,source:r,url:n})).setProps(this.getWorkerPoolProps()),this.workerPools.set(e,o)),o},t.prototype.getWorkerPoolProps=function(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}(),new Map),ei=function(){function t(){}return Object.defineProperty(t,"onmessage",{set:function(t){self.onmessage=function(e){if(ri(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}},enumerable:!1,configurable:!0}),t.addEventListener=function(t){var e=ti.get(t);e||(e=function(e){if(ri(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}),self.addEventListener("message",e)},t.removeEventListener=function(t){var e=ti.get(t);ti.delete(t),self.removeEventListener("message",e)},t.postMessage=function(t,e){if(self){var r={source:"Worker thread",type:t,payload:e},n=Go(e);self.postMessage(r,n)}},t}();function ri(t){var e=t.type,r=t.data;return"message"===e&&r&&"string"==typeof r.source&&"Main thread"===r.source}self&&self.__awaiter,self&&self.__generator;var ni,oi,ii=function(){function t(){this._values=[],this._settlers=[],this._closed=!1}return t.prototype[Symbol.asyncIterator]=function(){return this},t.prototype.push=function(t){return this.enqueue(t)},t.prototype.enqueue=function(t){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");var e=this._settlers.shift();t instanceof Error?e.reject(t):e.resolve({value:t})}else this._values.push(t)},t.prototype.close=function(){for(;this._settlers.length>0;){this._settlers.shift().resolve({done:!0})}this._closed=!0},t.prototype.next=function(){var t=this;if(this._values.length>0){var e=this._values.shift();return e instanceof Error?Promise.reject(e):Promise.resolve({done:!1,value:e})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0,value:void 0})}return new Promise((function(e,r){t._settlers.push({resolve:e,reject:r})}))},t}(),ai=self&&self.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}s((n=n.apply(t,e||[])).next())}))},ui=self&&self.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]m;m++)if((u||m in d)&&(p=y(h=d[m],m,v),t))if(e)b[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:bi(b,h)}else switch(t){case 4:return!1;case 7:bi(b,h)}return i?-1:n||o?o:b}},Ei={forEach:wi(0),map:wi(1),filter:wi(2),some:wi(3),every:wi(4),find:wi(5),findIndex:wi(6),filterReject:wi(7)},Ai=function(t,e){var r=[][t];return!!r&&j((function(){r.call(null,e||function(){return 1},1)}))},Oi=Ei.forEach,Si=Ai("forEach")?[].forEach:function(t){return Oi(this,t,arguments.length>1?arguments[1]:void 0)},Ti=function(t){if(t&&t.forEach!==Si)try{ee(t,"forEach",Si)}catch(e){t.forEach=Si}};for(var ki in hi)hi[ki]&&Ti(O[ki]&&O[ki].prototype);Ti(di);var Ii=function(t,e,r){var n=Ft(e);n in t?Ut.f(t,n,te(0,r)):t[n]=r},ji=ft("species"),Pi=function(t){return nt>=51||!j((function(){var e=[];return(e.constructor={})[ji]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},_i=Pi("slice"),Mi=ft("species"),Li=Array,Ri=Math.max;ir({target:"Array",proto:!0,forced:!_i},{slice:function(t,e){var r,n,o,i=Te(this),a=Fe(i),u=Ce(t,a),s=Ce(void 0===e?a:e,a);if(yi(i)&&(r=i.constructor,(jr(r)&&(r===Li||yi(r.prototype))||dt(r)&&null===(r=r[Mi]))&&(r=void 0),r===Li||void 0===r))return Ur(i,u,s);for(n=new(void 0===r?Li:r)(Ri(s-u,0)),o=0;u1?arguments[1]:void 0)}});var Gi,Hi=Object.keys||function(t){return Ge(t,He)},Vi={f:pt&&!bt?Object.defineProperties:function(t,e){At(t);for(var r,n=Te(e),o=Hi(e),i=o.length,a=0;i>a;)Ut.f(t,r=o[a++],n[r]);return t}},qi=ne("IE_PROTO"),Zi=function(){},Yi=function(t){return" + + \ No newline at end of file diff --git a/eiam-console/src/main/resources/fe/login-background.png b/eiam-console/src/main/resources/fe/login-background.png new file mode 100644 index 00000000..1b1ec093 Binary files /dev/null and b/eiam-console/src/main/resources/fe/login-background.png differ diff --git a/eiam-console/src/main/resources/fe/logo.svg b/eiam-console/src/main/resources/fe/logo.svg new file mode 100644 index 00000000..e7ea0577 --- /dev/null +++ b/eiam-console/src/main/resources/fe/logo.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eiam-console/src/main/resources/fe/p__404.11bb088a.async.js b/eiam-console/src/main/resources/fe/p__404.11bb088a.async.js new file mode 100644 index 00000000..0c3aecae --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__404.11bb088a.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[2571],{47680:function(i,n,t){t.r(n);var s=t(22181),u=t(71577),a=t(98971),o=t(85893),e=function(){return(0,o.jsx)(s.ZP,{status:"404",title:"404",subTitle:"Sorry, the page you visited does not exist.",extra:(0,o.jsx)(u.Z,{type:"primary",onClick:function(){return a.history.push("/")},children:"Back Home"})})};n.default=e}}]); diff --git a/eiam-console/src/main/resources/fe/p__Welcome.3630b9f4.async.js b/eiam-console/src/main/resources/fe/p__Welcome.3630b9f4.async.js new file mode 100644 index 00000000..678e80dc --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__Welcome.3630b9f4.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[8185],{24969:function(a,t,i){i.d(t,{Z:function(){return l}});var g=i(1413),d=i(67294),A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},u=A,e=i(84089),M=function(n,c){return d.createElement(e.Z,(0,g.Z)((0,g.Z)({},n),{},{ref:c,icon:u}))};M.displayName="PlusOutlined";var l=d.forwardRef(M)},42213:function(a,t,i){i.r(t);var g=i(88372),d=i(4393),A=i(67294),u=i(85893),e=function(I){var n=I.title,c=I.href,D=I.index,s=I.desc;return(0,u.jsxs)("div",{style:{backgroundColor:"#FFFFFF",boxShadow:"0 2px 4px 0 rgba(35,49,128,0.02), 0 4px 8px 0 rgba(49,69,179,0.02)",borderRadius:"8px",fontSize:"14px",color:"rgba(0,0,0,0.65)",textAlign:"justify",lineHeight:" 22px",padding:"16px 19px",flex:1},children:[(0,u.jsxs)("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:[(0,u.jsx)("div",{style:{width:48,height:48,lineHeight:"22px",backgroundSize:"100%",textAlign:"center",padding:"8px 16px 16px 12px",color:"#FFF",fontWeight:"bold",backgroundImage:"url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNTRweCIgaGVpZ2h0PSI1MXB4IiB2aWV3Qm94PSIwIDAgNTQgNTEiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgPHRpdGxlPuefqeW9ojwvdGl0bGU+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgeDE9IjMzLjAwNjM5OTclIiB5MT0iMzMuMTAxNzc3MiUiIHgyPSI2OC4yMzAzNTYzJSIgeTI9IjczLjU1Mzk3ODclIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+CiAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM0NzkxRkYiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzJBNjVFQyIgb2Zmc2V0PSIxMDAlIj48L3N0b3A+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPHBhdGggZD0iTTcuNDkyMjE0NCwwIEwyOC40OTI2MDc0LDAgQzMwLjA5OTI1MzksLTQuMDM3MjkyMThlLTE1IDMxLjQwMTY5ODMsMS4zMDI0NDQzNiAzMS40MDE2OTgzLDIuOTA5MDkwOTEgQzMxLjQwMTY5ODMsMy4wODk1MzczMyAzMS4zODQ5MDkxLDMuMjY5NTkyMzggMzEuMzUxNTQ3OSwzLjQ0NjkyODA1IEwyNy4zNjY3MjYyLDI0LjYyODc0NjIgQzI3LjEwODAzMzEsMjYuMDAzODYxNyAyNS45MDcwMjI3LDI3IDI0LjUwNzc4NTYsMjcgTDMuNTA3MzkyNjMsMjcgQzEuOTAwNzQ2MDksMjcgMC41OTgzMDE3MjQsMjUuNjk3NTU1NiAwLjU5ODMwMTcyNCwyNC4wOTA5MDkxIEMwLjU5ODMwMTcyNCwyMy45MTA0NjI3IDAuNjE1MDkwODY1LDIzLjczMDQwNzYgMC42NDg0NTIwNzMsMjMuNTUzMDcxOSBMNC42MzMyNzM4NCwyLjM3MTI1Mzc3IEM0Ljg5MTk2NjkyLDAuOTk2MTM4MzI1IDYuMDkyOTc3MjUsMS4xNDUyMTQxMWUtMTUgNy40OTIyMTQ0LDAgWiIgaWQ9InBhdGgtMiI+PC9wYXRoPgogICAgPGZpbHRlciB4PSItNTcuOCUiIHk9Ii01Ny40JSIgd2lkdGg9IjIyOC4xJSIgaGVpZ2h0PSIyNTEuOSUiIGZpbHRlclVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgaWQ9ImZpbHRlci0zIj4KICAgICAgPGZlT2Zmc2V0IGR4PSIyIiBkeT0iNSIgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSI+PC9mZU9mZnNldD4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iNiIgaW49InNoYWRvd09mZnNldE91dGVyMSIgcmVzdWx0PSJzaGFkb3dCbHVyT3V0ZXIxIj48L2ZlR2F1c3NpYW5CbHVyPgogICAgICA8ZmVDb2xvck1hdHJpeCB2YWx1ZXM9IjAgMCAwIDAgMC4yMDc4NDMxMzcgICAwIDAgMCAwIDAuNDQ3MDU4ODI0ICAgMCAwIDAgMCAwLjkyNTQ5MDE5NiAgMCAwIDAgMC4zIDAiIHR5cGU9Im1hdHJpeCIgaW49InNoYWRvd0JsdXJPdXRlcjEiPjwvZmVDb2xvck1hdHJpeD4KICAgIDwvZmlsdGVyPgogIDwvZGVmcz4KICA8ZyBpZD0i6aG16Z2iLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgPGcgaWQ9Iue8lue7hC00NSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTMxLjAwMDAwMCwgLTE1My4wMDAwMDApIj4KICAgICAgPGcgaWQ9Iue8lue7hC0zMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjQuMDAwMDAwLCAxNDQuMDAwMDAwKSI+CiAgICAgICAgPGcgaWQ9IuefqeW9oiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTYuMDAwMDAwLCAxNi4wMDAwMDApIj4KICAgICAgICAgIDx1c2UgZmlsbD0iYmxhY2siIGZpbGwtb3BhY2l0eT0iMSIgZmlsdGVyPSJ1cmwoI2ZpbHRlci0zKSIgeGxpbms6aHJlZj0iI3BhdGgtMiI+PC91c2U+CiAgICAgICAgICA8dXNlIGZpbGw9InVybCgjbGluZWFyR3JhZGllbnQtMSkiIGZpbGwtcnVsZT0iZXZlbm9kZCIgeGxpbms6aHJlZj0iI3BhdGgtMiI+PC91c2U+CiAgICAgICAgPC9nPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K')"},children:D}),(0,u.jsx)("div",{style:{fontSize:"16px",color:"rgba(0, 0, 0, 0.85)",paddingBottom:8},children:n})]}),(0,u.jsx)("div",{style:{fontSize:"14px",color:"rgba(0,0,0,0.65)",textAlign:"justify",lineHeight:"22px",marginBottom:8},children:s}),(0,u.jsxs)("a",{href:c,target:"_blank",rel:"noreferrer",children:["\u4E86\u89E3\u66F4\u591A ",">"]})]})},M=function(){return(0,u.jsx)(g.f,{children:(0,u.jsx)(d.Z,{style:{borderRadius:8},bodyStyle:{backgroundImage:"radial-gradient(circle at 97% 10%, #EBF2FF 0%, #F5F8FF 28%, #EBF1FF 124%)"},children:(0,u.jsxs)("div",{style:{backgroundPosition:"100% -30%",backgroundRepeat:"no-repeat",backgroundSize:"274px auto",backgroundImage:"url('/x4v0w8nb.png')"},children:[(0,u.jsx)("div",{style:{fontSize:"20px",color:"#1A1A1A"},children:"\u6B22\u8FCE\u4F7F\u7528 TopIAM \u4F01\u4E1A\u6570\u5B57\u8EAB\u4EFD\u7BA1\u63A7\u5E73\u53F0"}),(0,u.jsx)("p",{style:{fontSize:"14px",color:"rgba(0,0,0,0.65)",lineHeight:"22px",marginTop:16,marginBottom:32,width:"65%"},children:"TopIAM \u6570\u5B57\u8EAB\u4EFD\u7BA1\u63A7\u5E73\u53F0\uFF08Employee Identity and Access Management\uFF09\u7528\u4E8E\u7BA1\u7406\u4F01\u4E1A\u5185\u5458\u5DE5\u7684\u8D26\u53F7\u3001\u6743\u9650\u3001\u8EAB\u4EFD\u8BA4\u8BC1\u3001\u5E94\u7528\u8BBF\u95EE\uFF0C\u5E2E\u52A9\u6574\u5408\u90E8\u7F72\u5728\u672C\u5730\u6216\u4E91\u7AEF\u7684\u5185\u90E8\u529E\u516C\u7CFB\u7EDF\u3001\u4E1A\u52A1\u7CFB\u7EDF\u53CA\u4E09\u65B9 SaaS \u7CFB\u7EDF\u7684\u6240\u6709\u8EAB\u4EFD\uFF0C\u5B9E\u73B0\u4E00\u4E2A\u8D26\u53F7\u6253\u901A\u6240\u6709\u5E94\u7528\u7684\u670D\u52A1\u3002"}),(0,u.jsxs)("div",{style:{display:"flex",gap:16},children:[(0,u.jsx)(e,{index:1,href:"https://eiam.topiam.cn/docs/introduction/overview/",title:"\u5165\u95E8\u6587\u6863",desc:"\u5165\u95E8\u6587\u6863"}),(0,u.jsx)(e,{index:2,title:"\u7ED1\u5B9A\u73B0\u6709\u8D26\u6237\u7CFB\u7EDF",href:"https://eiam.topiam.cn/docs/admin-guide/account/identity-source/",desc:"\u5FEB\u901F\u5BFC\u5165\u8D26\u6237\uFF0C\u5E76\u590D\u7528\u73B0\u6709\u7684\u767B\u5F55\u65B9\u5F0F\u3002"}),(0,u.jsx)(e,{index:3,title:"\u96C6\u6210\u8EAB\u4EFD\u63D0\u4F9B\u5546",href:"https://eiam.topiam.cn/docs/identity-source/",desc:"\u96C6\u6210\u8EAB\u4EFD\u63D0\u4F9B\u5546\uFF0C\u5FEB\u901F\u7EB3\u5165\u4E09\u65B9\u5E73\u53F0\u767B\u5F55\u3002"})]}),(0,u.jsx)("br",{}),(0,u.jsxs)("div",{style:{display:"flex",gap:16},children:[(0,u.jsx)(e,{index:4,title:"\u5B9E\u73B0\u5E94\u7528\u5355\u70B9\u767B\u5F55",href:"https://eiam.topiam.cn/docs/standard/",desc:"\u521B\u5EFA\u914D\u7F6E\u5E94\u7528\uFF0C\u5B9E\u73B0\u5E94\u7528\u5355\u70B9\u767B\u5F55\u3002"}),(0,u.jsx)(e,{index:5,title:"\u7CFB\u7EDF\u57FA\u7840\u914D\u7F6E",href:"https://eiam.topiam.cn/docs/admin-guide/setting/basic/",desc:"\u8FDB\u884C\u7CFB\u7EDF\u57FA\u7840\u914D\u7F6E\uFF0C\u5982\u6587\u4EF6\u5B58\u50A8\u3001\u5730\u7406\u4F4D\u7F6E\u3001\u90AE\u4EF6\u77ED\u4FE1\u670D\u52A1\u3002"}),(0,u.jsx)(e,{index:6,title:"\u7CFB\u7EDF\u5B89\u5168\u914D\u7F6E",href:"https://eiam.topiam.cn/docs/admin-guide/setting/security/",desc:"\u8FDB\u884C\u7CFB\u7EDF\u5B89\u5168\u914D\u7F6E\uFF0C\u5982\u5BC6\u7801\u7B56\u7565\u3001\u4F1A\u8BDD\u7B56\u7565\uFF0C\u5B8C\u5584\u7CFB\u7EDF\u5B89\u5168\u3002"})]})]})})})};t.default=M}}]); diff --git a/eiam-console/src/main/resources/fe/p__account__IdentitySourceDetail__index.28baad45.async.js b/eiam-console/src/main/resources/fe/p__account__IdentitySourceDetail__index.28baad45.async.js new file mode 100644 index 00000000..7384250b --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__account__IdentitySourceDetail__index.28baad45.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[8724],{38692:function(Ke,re,r){r.r(re),r.d(re,{default:function(){return Tr}});var ie=r(11281),I=r.n(ie),le=r(97983),s=r.n(le),ae=r(40794),x=r.n(ae),Q=r(12741),y=r.n(Q),C=r(137),k=r(84865),oe=r(85307),xe=r(38345),ne=r(62113),Oe=r(76509),ze=r(14459),Le=r(2236),Me=r(78234),de=r(2093),Y=r(2453),be=r(21687),Ee=r(57953),He=r(96486),d=r(67294),D=r(5966),Ne=r(17057),V;(function(u){u.config="config",u.sync_history="sync-history",u.event_record="event-record"})(V||(V={}));var L;(function(u){u.dingtalk="dingtalk",u.wework="wechat_work",u.feishu="feishu"})(L||(L={}));var M;(function(u){u.period="period",u.timed="timed"})(M||(M={}));var Ue={labelCol:{span:5},wrapperCol:{span:15}},c={appId:["basicConfig","appId"],appKey:["basicConfig","appKey"],corpId:["basicConfig","corpId"],appSecret:["basicConfig","appSecret"],secret:["basicConfig","secret"],callbackUrl:["basicConfig","callbackUrl"]},te=r(71577),e=r(85893),We=function(i){var p=i.configured,t=i.onConfigValidator,l=i.formRef,f=i.basicConfigRef;(0,d.useEffect)(function(){},[p]);var h=(0,d.useCallback)(x()(s()().mark(function S(){var a,v;return s()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=l==null?void 0:l.current,n.prev=1,n.next=4,a==null?void 0:a.validateFields([c.corpId,c.appKey,c.appSecret]);case 4:return n.next=6,t({provider:L.dingtalk,corpId:a==null?void 0:a.getFieldValue(c.corpId),appKey:a==null?void 0:a.getFieldValue(c.appKey),appSecret:a==null?void 0:a.getFieldValue(c.appSecret)});case 6:if(v=n.sent,v){n.next=12;break}return a==null||a.setFields([{name:c.corpId,errors:["\u6D4B\u8BD5\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u6838\u5B9E\u53C2\u6570\u4FE1\u606F"]}]),a==null||a.setFields([{name:c.appKey,errors:["\u6D4B\u8BD5\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u6838\u5B9E\u53C2\u6570\u4FE1\u606F"]}]),a==null||a.setFields([{name:c.appSecret,errors:["\u6D4B\u8BD5\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u6838\u5B9E\u53C2\u6570\u4FE1\u606F"]}]),n.abrupt("return",!1);case 12:return Y.ZP.success("\u6D4B\u8BD5\u6210\u529F"),n.abrupt("return",!0);case 16:return n.prev=16,n.t0=n.catch(1),n.abrupt("return",!1);case 19:case"end":return n.stop()}},S,null,[[1,16]])})),[l,t]);return(0,d.useImperativeHandle)(f,function(){return{configValidator:h}},[h]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(D.Z,{name:c.corpId,label:"\u4F01\u4E1AID",placeholder:"\u8BF7\u8F93\u5165\u4F01\u4E1AID",extra:"\u4F60\u53EF\u4EE5\u5728\u9489\u9489\u5F00\u653E\u5E73\u53F0(https://open-dev.dingtalk.com/)\u9996\u9875\u53F3\u4E0A\u89D2\u83B7\u53D6\u4F01\u4E1A ID\uFF08CorpId\uFF09\u3002"}),(0,e.jsx)(D.Z,{name:c.appKey,label:"\u5E94\u7528\u5F00\u53D1Key",placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u5F00\u53D1Key",extra:"\u4F60\u53EF\u4EE5\u5728\u9489\u9489\u5F00\u653E\u5E73\u53F0(https://open-dev.dingtalk.com/)\u5E94\u7528\u8BE6\u60C5\u7684\u300C\u57FA\u7840\u4FE1\u606F\u300D\u9875\u9762\u83B7\u53D6 AppKey\u3002",rules:[{required:!0,message:"\u5E94\u7528\u5F00\u53D1Key\u4E3A\u5FC5\u586B\u9879"}]}),(0,e.jsx)(D.Z.Password,{name:c.appSecret,label:"\u5E94\u7528\u51ED\u8BC1\u5BC6\u94A5",placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u51ED\u8BC1\u5BC6\u94A5",extra:"\u4F60\u53EF\u4EE5\u5728\u9489\u9489\u5F00\u653E\u5E73\u53F0(https://open-dev.dingtalk.com/)\u5E94\u7528\u8BE6\u60C5\u7684\u300C\u57FA\u7840\u4FE1\u606F\u300D\u9875\u9762\u83B7\u53D6 AppSecret\u3002",fieldProps:{autoComplete:"new-password"},rules:[{required:!0,message:"\u5E94\u7528\u51ED\u8BC1\u5BC6\u94A5\u4E3A\u5FC5\u586B\u9879"}],addonAfter:(0,e.jsx)(te.Z,{type:"default",onClick:h,children:"\u6D4B\u8BD5\u8FDE\u63A5"})}),(0,e.jsx)(D.Z.Password,{name:["basicConfig","aesKey"],label:"\u52A0\u5BC6AesKey",extra:"\u4F60\u53EF\u4EE5\u5728\u9489\u9489\u5F00\u653E\u5E73\u53F0(https://open-dev.dingtalk.com/)\u5E94\u7528\u8BE6\u60C5\u7684\u300C\u4E8B\u4EF6\u8BA2\u9605\u300D\u9875\u9762\u83B7\u53D6\u52A0\u5BC6 aes_key\u3002\u5982\u679C\u4F60\u9700\u8981\u5F00\u542F\u5B9E\u65F6\u540C\u6B65\uFF0C\u6B64\u53C2\u6570\u5FC5\u586B\u3002",fieldProps:{autoComplete:"new-password"}}),(0,e.jsx)(D.Z.Password,{name:["basicConfig","token"],label:"\u7B7E\u540DToken",extra:"\u4F60\u53EF\u4EE5\u5728\u9489\u9489\u5F00\u653E\u5E73\u53F0(https://open-dev.dingtalk.com/)\u5E94\u7528\u8BE6\u60C5\u7684\u300C\u4E8B\u4EF6\u8BA2\u9605\u300D\u9875\u9762\u83B7\u53D6\u7B7E\u540D token\u3002\u5982\u679C\u4F60\u9700\u8981\u5F00\u542F\u5B9E\u65F6\u540C\u6B65\uFF0C\u6B64\u53C2\u6570\u5FC5\u586B\u3002",fieldProps:{autoComplete:"new-password"}})]})},Ge=We,Je=function(i){var p=i.configured,t=i.formRef,l=i.basicConfigRef,f=i.onConfigValidator;(0,d.useEffect)(function(){},[p]);var h=(0,d.useCallback)(x()(s()().mark(function S(){var a,v;return s()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=t==null?void 0:t.current,n.prev=1,n.next=4,a==null?void 0:a.validateFields([c.appId,c.appSecret]);case 4:return n.next=6,f({provider:L.feishu,appId:a==null?void 0:a.getFieldValue(c.appId),appSecret:a==null?void 0:a.getFieldValue(c.appSecret)});case 6:if(v=n.sent,v){n.next=11;break}return a==null||a.setFields([{name:c.appId,errors:["\u6D4B\u8BD5\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u6838\u5B9E\u53C2\u6570\u4FE1\u606F"]}]),a==null||a.setFields([{name:c.appSecret,errors:["\u6D4B\u8BD5\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u6838\u5B9E\u53C2\u6570\u4FE1\u606F"]}]),n.abrupt("return",!1);case 11:return n.abrupt("return",!0);case 14:return n.prev=14,n.t0=n.catch(1),n.abrupt("return",!1);case 17:case"end":return n.stop()}},S,null,[[1,14]])})),[t,f]);return(0,d.useImperativeHandle)(l,function(){return{configValidator:h}},[h]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(D.Z,{name:c.appId,label:"\u5E94\u7528 ID",placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528ID",extra:"\u767B\u5F55\u5F00\u653E\u4E2D\u5FC3\uFF0C\u70B9\u51FB\u5E94\u7528 \uFF0C\u5728\u51ED\u8BC1\u4E0E\u57FA\u7840\u4FE1\u606F\u9875\u9762\u67E5\u770BAPP ID\u3002",rules:[{required:!0,message:"\u5E94\u7528ID\u4E3A\u5FC5\u586B\u9879"}]}),(0,e.jsx)(D.Z.Password,{name:c.appSecret,label:"\u5E94\u7528\u51ED\u8BC1\u5BC6\u94A5",placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u51ED\u8BC1\u5BC6\u94A5",extra:"\u767B\u5F55\u5F00\u653E\u4E2D\u5FC3\uFF0C\u70B9\u51FB\u5E94\u7528 \uFF0C\u5728\u51ED\u8BC1\u4E0E\u57FA\u7840\u4FE1\u606F\u9875\u9762\u67E5\u770B APP Secret\u3002",fieldProps:{autoComplete:"new-password"},rules:[{required:!0,message:"\u5E94\u7528\u51ED\u8BC1\u5BC6\u94A5\u4E3A\u5FC5\u586B\u9879"}],addonAfter:(0,e.jsx)(te.Z,{type:"default",onClick:h,children:"\u6D4B\u8BD5\u8FDE\u63A5"})}),(0,e.jsx)(D.Z.Password,{name:["basicConfig","encryptKey"],label:"EncryptKey",extra:"\u98DE\u4E66\u4E8B\u4EF6\u8BA2\u9605\u7684 EncryptKey\uFF0C\u53EF\u4EE5\u5728\u98DE\u4E66\u5F00\u653E\u5E73\u53F0\u5E94\u7528\u8BE6\u60C5\u7684\u300C\u4E8B\u4EF6\u8BA2\u9605\u300D\u9875\u9762\u83B7\u53D6\u3002\u5982\u679C\u4F60\u9700\u8981\u5F00\u542F\u5B9E\u65F6\u540C\u6B65\uFF0C\u6B64\u53C2\u6570\u5FC5\u586B\u3002",fieldProps:{autoComplete:"new-password"}}),(0,e.jsx)(D.Z.Password,{name:["basicConfig","verificationToken"],label:"VerificationToken",extra:"\u98DE\u4E66\u4E8B\u4EF6\u8BA2\u9605\u7684 VerificationToken\uFF0C\u53EF\u4EE5\u5728\u98DE\u4E66\u5F00\u653E\u5E73\u53F0\u5E94\u7528\u8BE6\u60C5\u7684\u300C\u4E8B\u4EF6\u8BA2\u9605\u300D\u9875\u9762\u83B7\u53D6\u3002\u5982\u679C\u4F60\u9700\u8981\u5F00\u542F\u5B9E\u65F6\u540C\u6B65\uFF0C\u6B64\u53C2\u6570\u5FC5\u586B\u3002",fieldProps:{autoComplete:"new-password"}})]})},Qe=Je,Ye=function(i){var p=i.configured,t=i.formRef,l=i.onConfigValidator,f=i.basicConfigRef;(0,d.useEffect)(function(){},[p]);var h=(0,d.useCallback)(x()(s()().mark(function S(){var a,v;return s()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=t==null?void 0:t.current,n.prev=1,a==null||a.validateFields([c.corpId,c.corpId]),n.next=5,l({corpId:a==null?void 0:a.getFieldValue(c.corpId),secret:a==null?void 0:a.getFieldValue(c.secret),provider:L.wework});case 5:if(v=n.sent,v){n.next=10;break}return a==null||a.setFields([{name:c.corpId,errors:["\u6D4B\u8BD5\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u6838\u5B9E\u53C2\u6570\u4FE1\u606F"]}]),a==null||a.setFields([{name:c.secret,errors:["\u6D4B\u8BD5\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u6838\u5B9E\u53C2\u6570\u4FE1\u606F"]}]),n.abrupt("return",!1);case 10:return n.abrupt("return",!0);case 13:return n.prev=13,n.t0=n.catch(1),n.abrupt("return",!1);case 16:case"end":return n.stop()}},S,null,[[1,13]])})),[t,l]);return(0,d.useImperativeHandle)(f,function(){return{configValidator:h}},[h]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(D.Z,{name:c.corpId,label:"\u4F01\u4E1A ID",placeholder:"\u8BF7\u8F93\u5165\u4F01\u4E1A ID\uFF08CorpId\uFF09",extra:"\u4F60\u53EF\u4EE5\u5728\u4F01\u4E1A\u5FAE\u4FE1\u540E\u53F0\uFF08https://work.weixin.qq.com/\uFF09\u300C\u6211\u7684\u4F01\u4E1A\u300D-\u300C\u4F01\u4E1A\u4FE1\u606F\u300D\u9875\u9762\u83B7\u53D6\u4F01\u4E1A ID\uFF08CorpId\uFF09\u3002",rules:[{required:!0,message:"\u4F01\u4E1A ID\uFF08CorpId\uFF09\u4E3A\u5FC5\u586B\u9879"}]}),(0,e.jsx)(D.Z.Password,{name:c.secret,label:"\u5BC6\u94A5 Secret",placeholder:"\u8BF7\u8F93\u5165\u4F01\u4E1A\u5FAE\u4FE1\u901A\u8BAF\u5F55\u5BC6\u94A5 Secret",fieldProps:{autoComplete:"new-password"},rules:[{required:!0,message:"\u4F01\u4E1A\u5FAE\u4FE1\u901A\u8BAF\u5F55\u5BC6\u94A5 Secret\u4E3A\u5FC5\u586B\u9879"}],addonAfter:(0,e.jsx)(te.Z,{type:"default",onClick:h,children:"\u6D4B\u8BD5\u8FDE\u63A5"})}),(0,e.jsx)(D.Z.Password,{name:["basicConfig","token"],label:"\u4E8B\u4EF6\u56DE\u8C03 Token",placeholder:"\u8BF7\u8F93\u5165\u4F01\u4E1A\u5FAE\u4FE1\u56DE\u8C03 Token",fieldProps:{autoComplete:"new-password"},extra:"\u4F60\u53EF\u4EE5\u5728\u4F01\u4E1A\u5FAE\u4FE1\u540E\u53F0\uFF08https://work.weixin.qq.com/\uFF09\u300C\u7BA1\u7406\u5DE5\u5177\u300D-\u300C\u901A\u8BAF\u5F55\u540C\u6B65\u300D\u9875\u9762\u70B9\u51FB\u300C\u8BBE\u7F6E\u63A5\u6536\u4E8B\u4EF6\u670D\u52A1\u5668\u300D\u6309\u94AE\uFF0C\u4E4B\u540E\u53EF\u4EE5\u83B7\u53D6\u5230\u6B64 Token\u3002\u5982\u679C\u4F60\u9700\u8981\u5F00\u542F\u5B9E\u65F6\u540C\u6B65\uFF0C\u6B64\u53C2\u6570\u5FC5\u586B\u3002"}),(0,e.jsx)(D.Z.Password,{name:["basicConfig","encodingAESKey"],label:"EncodingAESKey",placeholder:"\u8BF7\u8F93\u5165\u901A\u8BAF\u5F55\u4E8B\u4EF6\u540C\u6B65 EncodingAESKey",fieldProps:{autoComplete:"new-password"},extra:"\u4F60\u53EF\u4EE5\u5728\u4F01\u4E1A\u5FAE\u4FE1\u540E\u53F0\uFF08https://work.weixin.qq.com/\uFF09\u300C\u7BA1\u7406\u5DE5\u5177\u300D-\u300C\u901A\u8BAF\u5F55\u540C\u6B65\u300D\u9875\u9762\u70B9\u51FB\u300C\u8BBE\u7F6E\u63A5\u6536\u4E8B\u4EF6\u670D\u52A1\u5668\u300D\u6309\u94AE\uFF0C\u4E4B\u540E\u53EF\u4EE5\u83B7\u53D6\u5230\u6B64 EncodingAESKey\u3002\u5982\u679C\u4F60\u9700\u8981\u5F00\u542F\u5B9E\u65F6\u540C\u6B65\uFF0C\u6B64\u53C2\u6570\u5FC5\u586B\u3002"})]})},Xe=Ye,qe=Ne.Z.Paragraph,_e=function(u){var i=u.provider,p=u.configured,t=u.basicConfigRef,l=u.onConfigValidator,f=u.formRef;return(0,e.jsxs)(e.Fragment,{children:[i===L.dingtalk&&(0,e.jsx)(Ge,{configured:p,basicConfigRef:t,onConfigValidator:l,formRef:f}),i===L.wework&&(0,e.jsx)(Xe,{configured:p,basicConfigRef:t,onConfigValidator:l,formRef:f}),i===L.feishu&&(0,e.jsx)(Qe,{configured:p,basicConfigRef:t,onConfigValidator:l,formRef:f}),(0,e.jsx)(D.Z,{label:"\u56DE\u8C03\u5730\u5740",name:c.callbackUrl,proFieldProps:{render:function(S){return S&&(0,e.jsx)(qe,{copyable:{text:S},style:{marginBottom:"0"},children:(0,e.jsx)("span",{dangerouslySetInnerHTML:{__html:"".concat(S,"")}})})}},readonly:!0,fieldProps:{autoComplete:"off"}})]})},Ie=r(63434),er=r(86615),rr=r(97462),ar=r(31199),nr=r(33725),Se=r(99138),ue=r(96074),tr=function(u){var i=u.configured;return(0,d.useEffect)(function(){},[i]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Se.Z,{type:"info",banner:!0,showIcon:!0,description:"\u5B9A\u65F6\u914D\u7F6E\u5FC5\u987B\u540C\u65F6\u914D\u7F6E\u661F\u671F\u6570\u53CA\u6267\u884C\u65B9\u5F0F\u3002\u4F8B\uFF1A\u52FE\u9009\u5468\u4E8C\u5E76\u9009\u62E9\u6BCF\u96942\u5C0F\u65F6\u6267\u884C\u4E00\u6B21\u65F6\uFF0C\u8868\u793A\u5728\u6BCF\u4E2A\u5468\u4E8C\uFF0C\u6BCF\u96942\u5C0F\u65F6\u6267\u884C\u4E00\u6B21\u540C\u6B65\u3002"}),(0,e.jsx)("br",{}),(0,e.jsxs)(xe.Z,{bordered:!0,headerBordered:!0,children:[(0,e.jsx)(Ie.Z.Group,{name:["jobConfig","dayOfWeek"],options:[{label:"\u6BCF\u5929",value:"always"}],rules:[{required:!0,message:"\u8BE5\u9879\u4E3A\u5FC5\u9009\u9879"}]}),(0,e.jsx)(ue.Z,{}),(0,e.jsx)(Ie.Z.Group,{name:["jobConfig","dayOfWeek"],rules:[{required:!0,message:"\u8BE5\u9879\u4E3A\u5FC5\u9009\u9879"}],options:[{label:"\u5468\u4E00",value:"monday"},{label:"\u5468\u4E8C",value:"tuesday"},{label:"\u5468\u4E09",value:"wednesday"},{label:"\u5468\u56DB",value:"thursday"},{label:"\u5468\u4E94",value:"friday"},{label:"\u5468\u516D",value:"saturday"},{label:"\u5468\u5929",value:"sunday"}]}),(0,e.jsx)(ue.Z,{}),(0,e.jsx)(er.Z.Group,{name:["jobConfig","mode"],options:[{label:"\u5468\u671F\u6267\u884C",value:M.period},{label:"\u5B9A\u65F6\u6267\u884C",value:M.timed}],rules:[{required:!0,message:"\u8BF7\u914D\u7F6E\u6267\u884C\u65B9\u5F0F"}]}),(0,e.jsx)(rr.Z,{name:["jobConfig","mode"],children:function(t){var l=t.jobConfig;return(l==null?void 0:l.mode)===M.period?(0,e.jsx)(ar.Z,{min:1,max:24,name:["jobConfig","interval"],width:"xs",addonBefore:"\u6BCF\u9694",addonAfter:"\u5C0F\u65F6\u6267\u884C\u4E00\u6B21",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u95F4\u9694\u5C0F\u65F6"}]}):(l==null?void 0:l.mode)===M.timed?(0,e.jsx)(nr.Z,{addonBefore:"\u6267\u884C\u65F6\u95F4",width:"xs",name:["jobConfig","time"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6267\u884C\u65F6\u95F4"}]}):(0,e.jsx)(e.Fragment,{})}})]})]})},ur=r(78098),sr=r(4499),Te=r(52688),ir=r(59847),lr=function(u){var i=u.configured;(0,d.useEffect)(function(){},[i]);var p=(0,d.useState)([]),t=y()(p,2),l=t[0],f=t[1],h=function(){var v=x()(s()().mark(function b(){var n,$,K;return s()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(0,C.mB)();case 2:if(g.t0=g.sent,g.t0){g.next=5;break}g.t0={};case 5:n=g.t0,$=n.success,K=n.result,$&&K&&f([K]);case 9:case"end":return g.stop()}},b)}));return function(){return v.apply(this,arguments)}}(),S=function(){var v=x()(s()().mark(function b(n){var $;return s()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,(0,C.z3)(n);case 2:return $=P.sent,$.success&&f(function(g){return(0,ur.J)(g,n,$.result)}),P.abrupt("return",Promise.resolve());case 5:case"end":return P.stop()}},b)}));return function(n){return v.apply(this,arguments)}}();(0,de.Z)(x()(s()().mark(function v(){return s()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,h();case 2:case"end":return n.stop()}},v)})),[]);var a=(0,e.jsxs)("span",{children:[(0,e.jsx)(e.Fragment,{children:"\u8EAB\u4EFD\u6E90\u7EC4\u7EC7\u540C\u6B65\u81F3 TopIAM \u540E\u7684\u7236\u7EA7\u7EC4\u7EC7\u3002"}),(0,e.jsx)("br",{}),(0,e.jsx)(e.Fragment,{children:"\u5982\u679C\u4E0D\u586B\uFF0C\u5C06\u81EA\u52A8\u521B\u5EFA\u9876\u5C42\u7EC4\u7EC7\u3002\u914D\u7F6E\u540E\u4E0D\u53EF\u66F4\u6539\u3002"})," "]});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(ue.Z,{orientation:"left",plain:!0,children:"\u7EC4\u7EC7\u76F8\u5173\u7B56\u7565"}),(0,e.jsx)(sr.Z,{name:["strategyConfig","organization","targetId"],label:"\u76EE\u6807\u6839\u7EC4\u7EC7",extra:a,children:(0,e.jsx)(ir.Z,{placeholder:"\u8BF7\u9009\u62E9\u76EE\u6807\u6839\u7EC4\u7EC7",allowClear:!0,labelInValue:!0,loadData:function(b){return S(b.id)},treeData:l,treeNodeFilterProp:"name",fieldNames:{label:"name",value:"id"}})}),(0,e.jsx)(ue.Z,{orientation:"left",plain:!0,children:"\u7528\u6237\u76F8\u5173\u7B56\u7565"}),(0,e.jsx)(D.Z.Password,{name:["strategyConfig","user","defaultPassword"],label:"\u9ED8\u8BA4\u5BC6\u7801",extra:"\u540C\u6B65\u8D26\u6237\u65F6\u7ED9\u8D26\u6237\u8BBE\u7F6E\u7684\u9ED8\u8BA4\u5BC6\u7801\uFF0C\u82E5\u4E0D\u8BBE\u7F6E\uFF0C\u5C06\u4F7F\u7528\u8BBE\u7F6E\u4E2D\u5BC6\u7801\u7B56\u7565\u968F\u673A\u751F\u6210\u3002",placeholder:"\u8BF7\u8F93\u5165\u9ED8\u8BA4\u5BC6\u7801",fieldProps:{autoComplete:"new-password"}}),(0,e.jsx)(Te.Z,{name:["strategyConfig","user","enabled"],label:"\u662F\u5426\u542F\u7528",initialValue:!0,extra:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{children:"\u9ED8\u8BA4\u542F\u7528\uFF0C\u9996\u6B21\u540C\u6B65\u7528\u6237\u65F6\uFF0C\u7528\u6237\u662F\u5426\u5728 TopIAM \u4E2D\u542F\u7528\u3002"}),(0,e.jsx)("br",{}),(0,e.jsx)("span",{style:{color:"red"},children:"\u6CE8\u610F\uFF1A\u8EAB\u4EFD\u6E90\u7528\u6237\u672A\u542F\u7528\u65F6\uFF0C\u5C06\u5DF2\u8EAB\u4EFD\u6E90\u4E3A\u51C6\u3002"})]})}),(0,e.jsx)(Te.Z,{name:["strategyConfig","user","emailNotify"],label:"\u90AE\u4EF6\u901A\u77E5",initialValue:!0,extra:"\u9ED8\u8BA4\u542F\u7528\uFF0C\u9996\u6B21\u540C\u6B65\u7528\u6237\u6210\u529F\u540E\uFF0C\u5C06\u53D1\u9001\u7535\u5B50\u90AE\u4EF6\uFF0C\u82E5\u6CA1\u6709\u83B7\u53D6\u5230\u90AE\u4EF6\u5730\u5740\uFF0C\u5C06\u65E0\u6CD5\u8FDB\u884C\u53D1\u9001\u3002"})]})},or=r(98165),dr=r(62548),ce=r(1914),Ze=r(26713),O=r(51904),cr=r(69400),fr=r(12812),fe=r.n(fr),De=r(8751),Re=r(18429),we=r(11475),vr=r(58455),Ae=r(38755),pr=function(u){var i=u.syncHistoryId,p=u.open,t=u.onClose,l=u.objectType,f=(0,d.useRef)(),h=[{title:"\u52A8\u4F5C\u7C7B\u578B",dataIndex:"actionType",align:"center",width:80,ellipsis:!0,valueType:"select",valueEnum:{insert:{text:"\u65B0\u589E"},update:{text:"\u4FEE\u6539"},delete:{text:"\u5220\u9664"}}},{title:"\u5BF9\u8C61 ID",dataIndex:"objectId",ellipsis:!0,search:!1},{title:"\u5BF9\u8C61\u540D\u79F0",dataIndex:"objectName",ellipsis:!0,search:!1},{title:"\u63CF\u8FF0",dataIndex:"desc",ellipsis:!0,search:!1},{title:"\u72B6\u6001",dataIndex:"status",align:"center",valueType:"select",width:80,valueEnum:{success:{text:"\u6210\u529F"},fail:{text:"\u5931\u8D25"},skip:{text:"\u8DF3\u8FC7"}},renderText:function(v){return(0,e.jsxs)(e.Fragment,{children:[v==="success"&&(0,e.jsx)(O.Z,{icon:(0,e.jsx)(De.Z,{}),color:"#87d068",children:"\u6210\u529F"}),v==="fail"&&(0,e.jsx)(O.Z,{icon:(0,e.jsx)(Re.Z,{}),color:"#e54545",children:"\u5931\u8D25"}),v==="skip"&&(0,e.jsx)(O.Z,{icon:(0,e.jsx)(we.Z,{}),color:"#faad14",children:"\u8DF3\u8FC7"})]})}}],S=(0,Ae.l)(function(){return fe()({},".ant-pro-card .ant-pro-card-body",{padding:"24px 0px 0px"})});return(0,e.jsx)(vr.Z,{open:p,title:"\u8BE6\u60C5\u8BB0\u5F55",onClose:t,width:630,destroyOnClose:!0,bodyStyle:{paddingTop:0},children:(0,e.jsx)(ce.Z,{actionRef:f,className:S,columns:h,search:{filterType:"light"},params:{syncHistoryId:i,objectType:l},request:C.eU,rowKey:"id",pagination:{defaultPageSize:10,showQuickJumper:!1}})})},mr=pr,gr=function(u){var i=u.identitySourceId,p=(0,d.useRef)(),t=(0,d.useState)(!1),l=y()(t,2),f=l[0],h=l[1],S=(0,d.useState)(),a=y()(S,2),v=a[0],b=a[1],n=(0,d.useState)(),$=y()(n,2),K=$[0],P=$[1],g=[{title:"\u6279\u53F7",fixed:"left",width:100,dataIndex:"batch",align:"center",search:!1},{title:"\u89E6\u53D1\u7C7B\u578B",dataIndex:"triggerType",ellipsis:!0,filterSearch:!0,align:"center",valueType:"select",valueEnum:{manual:{text:"\u624B\u52A8\u89E6\u53D1"},job:{text:"\u4EFB\u52A1\u89E6\u53D1"}}},{title:"\u5BF9\u8C61\u7C7B\u578B",dataIndex:"objectType",align:"center",valueType:"select",ellipsis:!0,filterSearch:!0,valueEnum:{user:{text:"\u7528\u6237"},organization:{text:"\u7EC4\u7EC7"}}},{title:"\u521B\u5EFA\u6570\u91CF",dataIndex:"createdCount",search:!1},{title:"\u66F4\u65B0\u6570\u91CF",dataIndex:"updatedCount",search:!1},{title:"\u5220\u9664\u6570\u91CF",dataIndex:"deletedCount",search:!1},{title:"\u8DF3\u8FC7\u6570\u91CF",dataIndex:"skippedCount",search:!1},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"startTime",ellipsis:!0,search:!1,align:"center",valueType:"dateTime"},{title:"\u7ED3\u675F\u65F6\u95F4",dataIndex:"endTime",ellipsis:!0,search:!1,align:"center",valueType:"dateTime"},{title:"\u8017\u65F6",dataIndex:"spendTime",valueType:"second",search:!1},{title:"\u72B6\u6001",dataIndex:"status",filterSearch:!0,valueType:"select",width:100,valueEnum:{success:{text:"\u6210\u529F"},fail:{text:"\u5931\u8D25"},pending:{text:"\u540C\u6B65\u4E2D"}},renderText:function(H){return(0,e.jsxs)(Ze.Z,{children:[H==="success"&&(0,e.jsx)(O.Z,{color:"#87d068",children:"\u6210\u529F"}),H==="fail"&&(0,e.jsx)(O.Z,{color:"#e54545",children:"\u5931\u8D25"}),H==="pending"&&(0,e.jsx)(O.Z,{icon:(0,e.jsx)(or.Z,{spin:!0}),color:"#1677ff",children:"\u540C\u6B65\u4E2D"})]})}},{title:"\u64CD\u4F5C",align:"center",valueType:"option",width:100,fixed:"right",render:function(H,N){return[(0,e.jsx)("a",{target:"_blank",onClick:function(){b(N.id),h(!0),P(N.objectType)},children:"\u8BE6\u60C5"},"details")]}}];return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(ce.Z,{actionRef:p,columns:g,params:{identitySourceId:i},request:C.QA,rowKey:"id",pagination:{defaultPageSize:10,showQuickJumper:!0},scroll:{x:1300},search:{filterType:"light"},toolBarRender:function(){return[(0,e.jsx)(te.Z,{icon:(0,e.jsx)(dr.Z,{}),type:"primary",onClick:function(){cr.Z.info({title:"\u4E00\u952E\u62C9\u53D6",width:500,onOk:function(){var N=x()(s()().mark(function pe(){var _,B;return s()().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,(0,C.nv)(i);case 2:_=z.sent,B=_.success,B&&(Y.ZP.success("\u4EFB\u52A1\u89E6\u53D1\u6210\u529F"),window.setInterval(function(){var U;(U=p.current)===null||U===void 0||U.reload()},5e3));case 5:case"end":return z.stop()}},pe)}));function q(){return N.apply(this,arguments)}return q}(),content:(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(Ze.Z,{direction:"vertical",children:[(0,e.jsx)("span",{children:"TopIAM \u5C06\u5168\u91CF\u62C9\u53D6\u8EAB\u4EFD\u6E90\u6388\u6743\u8303\u56F4\u5185\u90E8\u95E8\u548C\u8D26\u6237\uFF0C\u7F6E\u4E8E\u540C\u6B65\u76EE\u6807\u7EC4\u7EC7\u4E0B\u3002"}),(0,e.jsx)(Se.Z,{type:"info",banner:!0,showIcon:!1,description:"\u5DF2\u62C9\u53D6\u8FC7\u7684\u7EC4\u7EC7\u3001\u8D26\u6237\u4E0D\u4F1A\u91CD\u590D\u521B\u5EFA\uFF0C\u800C\u4F1A\u8986\u76D6\u66F4\u65B0\u3002\u53EF\u4EE5\u53CD\u590D\u89E6\u53D1\u62C9\u53D6\uFF0C\u5C06\u4E24\u4FA7\u6570\u636E\u62C9\u9F50\u3002"})]})}),okText:"\u786E\u8BA4",okType:"primary",centered:!1,maskClosable:!1,okCancel:!0})},children:"\u4E00\u952E\u62C9\u53D6"},"pull")]}}),v&&K&&(0,e.jsx)(mr,{open:f,syncHistoryId:v,objectType:K,onClose:function(){h(!1)}})]})},hr=gr,Cr=r(46986),yr=Cr.ZP.ConfigContext;function jr(){var u=(0,d.useContext)(yr),i=u.getPrefixCls,p=".".concat(i()),t=(0,Ae.l)(function(){return fe()({},"".concat(p,"-form-item"),fe()({},"".concat(p,"-form-item-control-input"),{width:"100%"}))});return{className:t}}var ve=r(67038),Fr=r(98971),xr=function(u){var i=(0,d.useRef)(),p=u.identitySourceId,t=[{title:"\u52A8\u4F5C\u7C7B\u578B",dataIndex:"actionType",align:"center",ellipsis:!0,width:100,valueType:"select",valueEnum:{insert:{text:"\u65B0\u589E"},update:{text:"\u4FEE\u6539"},delete:{text:"\u5220\u9664"}}},{title:"\u5BF9\u8C61\u7C7B\u578B",dataIndex:"objectType",align:"center",valueType:"select",width:100,ellipsis:!0,filterSearch:!0,valueEnum:{user:{text:"\u7528\u6237"},organization:{text:"\u7EC4\u7EC7"}}},{title:"\u5BF9\u8C61 ID",dataIndex:"objectId",ellipsis:!0,search:!1},{title:"\u5BF9\u8C61\u540D\u79F0",dataIndex:"objectName",search:!1},{title:"\u4E8B\u4EF6\u65F6\u95F4",dataIndex:"eventTime",align:"center",search:!1,ellipsis:!0,valueType:"dateTime"},{title:"\u63CF\u8FF0",dataIndex:"desc",ellipsis:!0,search:!1},{title:"\u4E8B\u4EF6\u72B6\u6001",dataIndex:"status",align:"center",valueType:"select",width:80,valueEnum:{success:{text:"\u6210\u529F"},fail:{text:"\u5931\u8D25"},skip:{text:"\u8DF3\u8FC7"}},renderText:function(f){return(0,e.jsxs)(e.Fragment,{children:[f==="success"&&(0,e.jsx)(O.Z,{icon:(0,e.jsx)(De.Z,{}),color:"#87d068",children:"\u6210\u529F"}),f==="fail"&&(0,e.jsx)(O.Z,{icon:(0,e.jsx)(Re.Z,{}),color:"#e54545",children:"\u5931\u8D25"}),f==="skip"&&(0,e.jsx)(O.Z,{icon:(0,e.jsx)(we.Z,{}),color:"#faad14",children:"\u8DF3\u8FC7"})]})}}];return(0,e.jsx)(ce.Z,{actionRef:i,params:{identitySourceId:p},columns:t,rowKey:"id",search:{filterType:"light"},scroll:{x:900},pagination:{defaultPageSize:10,showQuickJumper:!1},request:C.mo,toolBarRender:function(){return[]}})},br=xr,Er=r(30381),Ir=r.n(Er),Sr=function(){var u=(0,Fr.useLocation)(),i=(0,ve.parse)(u.search),p=i,t=p.id,l=i,f=l.tab,h=i,S=h.provider,a=(0,d.useState)(),v=y()(a,2),b=v[0],n=v[1],$=(0,d.useState)(!1),K=y()($,2),P=K[0],g=K[1],X=(0,d.useState)(!1),H=y()(X,2),N=H[0],q=H[1],pe=(0,d.useState)(),_=y()(pe,2),B=_[0],me=_[1],z=(0,d.useRef)(),U=(0,d.useRef)(),Pe=(0,d.useRef)(),Be=(0,d.useRef)(),Zr=(0,d.useState)(0),ke=y()(Zr,2),Dr=ke[0],Ve=ke[1],Rr=(0,d.useState)(!1),$e=y()(Rr,2),ee=$e[0],wr=$e[1],Ar=jr(),Pr=Ar.className;(0,Me.Z)(x()(s()().mark(function T(){return s()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(t){o.next=4;break}return Y.ZP.warning("\u8EAB\u4EFD\u6E90\u4E0D\u5B58\u5728"),k.m.push("/account/identity-source"),o.abrupt("return");case 4:if(f){o.next=8;break}return n(V.config),k.m.push({pathname:u.pathname,search:(0,ve.stringify)({tab:V.config,id:t})}),o.abrupt("return");case 8:n(f);case 9:case"end":return o.stop()}},T)}))),(0,de.Z)(x()(s()().mark(function T(){var m,o,j;return s()().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(!t){Z.next=8;break}return g(!0),Z.next=4,(0,C.bh)(t);case 4:m=Z.sent,o=m.success,j=m.result,o&&j&&(me(j),g(!1));case 8:case"end":return Z.stop()}},T)})),[t]),(0,de.Z)(x()(s()().mark(function T(){return s()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:f===V.config&&(q(!0),(0,C.$C)(t).then(function(){var j=x()(s()().mark(function E(Z){var R,w,W,se,F,ge,he,A,Ce,ye,G,je,Fe;return s()().wrap(function(J){for(;;)switch(J.prev=J.next){case 0:if(A=Z.result,wr(A==null?void 0:A.configured),Ce=(R=A.strategyConfig)===null||R===void 0||(w=R.organization)===null||w===void 0?void 0:w.targetId,ye=A.strategyConfig,!(Ce&&A!==null&&A!==void 0&&A.configured)){J.next=9;break}return J.next=7,(0,C.Xu)(Ce);case 7:G=J.sent,G&&G.success&&G.result&&(ye=I()(I()({},A.strategyConfig),{},{organization:I()(I()({},A.strategyConfig.organization),{},{targetId:{value:G.result.id,label:G.result.name}})}));case 9:(W=z.current)===null||W===void 0||W.setFieldsValue({basicConfig:I()({},A.basicConfig)}),(se=Be.current)===null||se===void 0||se.setFieldsValue({strategyConfig:I()({},ye)}),je=(F=A.jobConfig)===null||F===void 0?void 0:F.mode,Fe=(ge=A.jobConfig)===null||ge===void 0?void 0:ge.value,(he=Pe.current)===null||he===void 0||he.setFieldsValue({jobConfig:I()(I()({},A.jobConfig),{},{interval:je===M.period?Fe:void 0,time:je===M.timed?Ir()(Fe,"HH:mm:ss"):void 0})}),q(!1);case 15:case"end":return J.stop()}},E)}));return function(E){return j.apply(this,arguments)}}()));case 1:case"end":return o.stop()}},T)})),[f]);var Br=function(){var T=x()(s()().mark(function m(o,j){var E,Z;return s()().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,(0,C.Iw)({id:j.id,name:j.name,remark:j.remark});case 2:if(E=w.sent,Z=E.success,!Z){w.next=8;break}return Y.ZP.success("\u64CD\u4F5C\u6210\u529F"),me(I()({},j)),w.abrupt("return",Promise.resolve(!0));case 8:return w.abrupt("return",Promise.resolve(!1));case 9:case"end":return w.stop()}},m)}));return function(o,j){return T.apply(this,arguments)}}(),kr=(0,e.jsx)(Oe.X.Consumer,{children:function(m){var o=m.isMobile;return P?(0,e.jsx)(be.Z,{active:!0,paragraph:{rows:1}}):(0,e.jsxs)(oe.vY,{size:"small",column:o?1:2,dataSource:I()({},B),editable:{onSave:Br},children:[(0,e.jsx)(oe.vY.Item,{dataIndex:"name",label:"\u540D\u79F0"}),(0,e.jsx)(oe.vY.Item,{dataIndex:"remark",label:"\u5907\u6CE8",valueType:"textarea",fieldProps:{rows:2,maxLength:20}})]})}});return(0,e.jsxs)(ze._z,{onBack:function(){k.m.push("/account/identity-source")},title:P?(0,e.jsx)(be.Z.Input,{style:{width:50},active:!0,size:"small"}):B==null?void 0:B.name,content:kr,tabList:[{key:V.config,tab:"\u540C\u6B65\u914D\u7F6E"},{key:V.sync_history,tab:"\u540C\u6B65\u5386\u53F2"},{key:V.event_record,tab:"\u4E8B\u4EF6\u8BB0\u5F55"}],tabActiveKey:b,onTabChange:function(m){n(m),k.m.replace({pathname:u.pathname,search:(0,ve.stringify)({tab:m,id:t})})},children:[V.config===b&&(0,e.jsx)(xe.Z,{children:(0,e.jsx)(Ee.Z,{spinning:P,children:(0,e.jsxs)(ne.L,{current:Dr,onCurrentChange:Ve,formProps:I()({layout:"horizontal"},Ue),onFinish:function(){var T=x()(s()().mark(function m(o){var j,E,Z,R,w,W;return s()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.prev=0,g(!0),F.next=4,(0,C.NK)(I()(I()({id:t},(0,He.omit)(o,"strategyConfig")),{},{strategyConfig:I()(I()({},o.strategyConfig),{},{organization:{targetId:o==null||(j=o.strategyConfig)===null||j===void 0||(E=j.organization)===null||E===void 0||(Z=E.targetId)===null||Z===void 0?void 0:Z.value}})}));case 4:if(R=F.sent,w=R.result,W=R.success,!(W&&w)){F.next=13;break}return Ve(0),Y.ZP.success("\u64CD\u4F5C\u6210\u529F"),F.next=12,(0,C.bh)(t);case 12:return F.abrupt("return");case 13:g(!1),F.next=18;break;case 16:F.prev=16,F.t0=F.catch(0);case 18:return F.prev=18,g(!1),F.finish(18);case 21:case"end":return F.stop()}},m,null,[[0,16,18,21]])}));return function(m){return T.apply(this,arguments)}}(),submitter:{render:function(m,o){return(0,e.jsx)(Le.S,{children:o})}},children:[(0,e.jsx)(ne.L.StepForm,{scrollToFirstError:!0,name:"base-config",title:"\u57FA\u672C\u914D\u7F6E",formRef:z,className:Pr,onFinish:x()(s()().mark(function T(){var m,o;return s()().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return o=(m=U.current)===null||m===void 0?void 0:m.configValidator(),E.abrupt("return",Promise.resolve(o));case 2:case"end":return E.stop()}},T)})),children:(0,e.jsx)(Ee.Z,{spinning:N,children:(0,e.jsx)(_e,{provider:(B==null?void 0:B.provider)||S,configured:ee,formRef:z,basicConfigRef:U,onConfigValidator:function(){var T=x()(s()().mark(function m(o){var j,E;return s()().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return g(!0),R.next=3,(0,C.jA)({provider:B==null?void 0:B.provider,config:o});case 3:return j=R.sent,E=j.result,g(!1),R.abrupt("return",E);case 7:case"end":return R.stop()}},m)}));return function(m){return T.apply(this,arguments)}}()})})}),(0,e.jsx)(ne.L.StepForm,{scrollToFirstError:!0,name:"strategy-config",title:"\u9AD8\u7EA7\u914D\u7F6E",formRef:Be,children:ee!==void 0&&(0,e.jsx)(lr,{configured:ee})}),(0,e.jsx)(ne.L.StepForm,{scrollToFirstError:!0,name:"job-config",title:"\u4EFB\u52A1\u914D\u7F6E",formRef:Pe,children:ee!==void 0&&(0,e.jsx)(tr,{configured:ee})})]})})}),V.sync_history===b&&(0,e.jsx)(hr,{identitySourceId:t}),V.event_record===b&&(0,e.jsx)(br,{identitySourceId:t})]})},Tr=Sr},78098:function(Ke,re,r){r.d(re,{J:function(){return ae},h:function(){return x}});var ie=r(64129),I=r.n(ie),le=r(11281),s=r.n(le);function ae(Q,y,C){return Q.map(function(k){return k.id===y?s()(s()({},k),{},{isLeaf:!1,children:C}):k.children?s()(s()({},k),{},{children:ae(k.children,y,C)}):k})}function x(Q){var y=[];return Q.forEach(function(C){return y.push(C.id),C.children&&y.push.apply(y,I()(x(C.children))),y}),y}}}]); diff --git a/eiam-console/src/main/resources/fe/p__account__IdentitySourceList__index.4fdd0185.async.js b/eiam-console/src/main/resources/fe/p__account__IdentitySourceList__index.4fdd0185.async.js new file mode 100644 index 00000000..ac7928cf --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__account__IdentitySourceList__index.4fdd0185.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[9902],{27747:function(ie,R,n){n.r(R),n.d(R,{default:function(){return se}});var N=n(97983),h=n.n(N),M=n(40794),C=n.n(M),z=n(11281),T=n.n(z),k=n(12741),$=n.n(k),g=n(137),P=n(84865),O=n(24969),A=n(25035),G=n(14459),H=n(96495),I=n(51904),Q=n(71577),U=n(98293),D=n(86738),S=n(2453),V=n(69400),y=n(67294),X=n(37476),Y=n(64317),J=n(5966),K=n(90672),W=n(57953),t=n(85893),w=function(o){var p=(0,y.useRef)(),x=o.visible,v=o.onClose,F=o.onFinish,j=(0,y.useState)(!1),l=$()(j,2),E=l[0],u=l[1];return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(X.Y,{title:"\u65B0\u589E\u8EAB\u4EFD\u6E90",width:"500px",layout:"horizontal",labelCol:{span:4},wrapperCol:{span:19},onFinish:function(){var s=C()(h()().mark(function r(f){var c;return h()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return u(!0),i.next=3,F(f);case 3:return c=i.sent,u(!1),i.abrupt("return",!!c);case 6:case"end":return i.stop()}},r)}));return function(r){return s.apply(this,arguments)}}(),modalProps:{destroyOnClose:!0,onCancel:function(){var r;(r=p.current)===null||r===void 0||r.resetFields(),v()}},open:x,children:(0,t.jsxs)(W.Z,{spinning:E,children:[(0,t.jsx)(Y.Z,{name:"provider",label:"\u63D0\u4F9B\u8005",fieldProps:{placeholder:"\u8BF7\u9009\u62E9\u8EAB\u4EFD\u6E90\u63D0\u4F9B\u8005"},options:[{value:"dingtalk",label:"\u9489\u9489"},{value:"wechat_work",label:"\u4F01\u4E1A\u5FAE\u4FE1"},{value:"feishu",label:"\u98DE\u4E66"}],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8EAB\u4EFD\u6E90\u63D0\u4F9B\u8005"}]}),(0,t.jsx)(J.Z,{name:"name",label:"\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u6E90\u540D\u79F0",rules:[{required:!0,message:"\u8EAB\u4EFD\u6E90\u540D\u79F0\u4E3A\u5FC5\u586B\u9879"}]}),(0,t.jsx)(K.Z,{name:"remark",label:"\u5907\u6CE8",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8",fieldProps:{rows:2,maxLength:20}})]})})})},q=n(12812),a=n.n(q),_=n(46986),ee=n(38755),ne=_.ZP.ConfigContext;function te(o){var p=(0,y.useContext)(ne),x=p.getPrefixCls,v=".".concat(x()),F=(0,ee.l)(function(j){var l,E,u,s=j.token;return u={},a()(u,".".concat(o),(l={},a()(l,"&-content",{marginInlineStart:"15px","& > div":{marginInlineStart:"0"}}),a()(l,"&-item-content",{display:"block",flex:"none",width:"100%"}),a()(l,"".concat(v,"-avatar > img"),{objectFit:"fill"}),a()(l,"".concat(v,"-card-head"),{borderBottom:"none"}),a()(l,"".concat(v,"-card-head-title"),{padding:"24px 0",lineHeight:"32px"}),a()(l,"".concat(v,"-card-extra"),{padding:"24px 0"}),a()(l,"".concat(v,"-list-pagination"),{marginTop:"24px"}),a()(l,"".concat(v,"-avatar-lg"),{width:"48px",height:"48px",lineHeight:"48px"}),a()(l,"".concat(v,"-list-item-action"),{marginInlineStart:"15px"}),a()(l,".ant-pro-list .ant-pro-list-row",{paddingLeft:"10px",paddingRight:"10px"}),a()(l,".ant-pro-list .ant-pro-list-row-content",{flex:0,margin:"0"}),l)),a()(u,"@media (max-width: ".concat(s.screenXS,"px)"),a()({},".".concat(o),(E={},a()(E,"&-content",{marginInlineStart:"0","& > div":{marginInlineStart:"0"}}),a()(E,"&-item-content",{display:"block",flex:"none",width:"100%"}),E))),a()(u,"@media (max-width: ".concat(s.screenSM,"px)"),a()({},".".concat(o),{})),a()(u,"@media (max-width: ".concat(s.screenMD,"px)"),a()({},".".concat(o),a()({},"&-content",{"& > div":{display:"block","&:last-child":{top:"0",width:"100%"}}}))),a()(u,"@media (max-width: ".concat(s.screenLG,"px) and @media (min-width: ").concat(s.screenMD,"px)"),a()({},".".concat(o),a()({},"&-content",{"& > div":{display:"block","&:last-child":{top:"0",width:"100%"}}}))),a()(u,"@media (max-width: ".concat(s.screenXL,"px)"),a()({},".".concat(o),a()({},"&-content",{"& > div":{marginInlineStart:"24px","&:last-child":{top:"0"}}}))),a()(u,"@media (max-width: 1400px)",a()({},".".concat(o),a()({},"&-content",{"& > div":{"&:last-child":{top:"0"}}}))),u});return{className:F}}var ae=n(94184),b=n.n(ae),re=n(60918),B="identity-source-list",L=function(p,x){P.m.push("/account/identity-source/detail?id=".concat(p,"&tab=config&provider=").concat(x))},ue=function(){var o=(0,y.useState)(!1),p=$()(o,2),x=p[0],v=p[1],F=(0,y.useRef)(),j=te(B),l=j.className,E=function(s){return(0,t.jsx)("div",{className:b()("".concat(B,"-content")),children:(0,t.jsx)("div",{className:b()("".concat(B,"-item-content")),children:s.enabled?(0,t.jsx)(I.Z,{color:"#5BD8A6",children:"\u5DF2\u542F\u7528"}):(0,t.jsx)(I.Z,{color:"#e54545",children:"\u672A\u542F\u7528"})})})};return(0,t.jsx)("div",{className:l,children:(0,t.jsxs)(G._z,{content:"\u652F\u6301\u4F01\u4E1A\u4EE5\u591A\u79CD\u8EAB\u4EFD\u6E90\u9014\u5F84\u540C\u6B65\u7528\u6237\u548C\u7EC4\u7EC7\u4FE1\u606F\u5230\u7CFB\u7EDF\uFF0C\u5728\u9AD8\u7EA7\u914D\u7F6E\u4E2D\u53EF\u4EE5\u5BF9\u5BFC\u5165\u7684\u5904\u7406\u903B\u8F91\u8FDB\u884C\u7075\u6D3B\u914D\u7F6E \uFF0C\u5B9E\u73B0\u4ECE\u591A\u4E2A\u6570\u636E\u6E90\u7684\u6C47\u805A\u4E3A\u4E00\u4E2A\u5B8C\u6574\u7684\u7528\u6237\u76EE\u5F55\uFF0C\u90E8\u5206\u8EAB\u4EFD\u6E90\u8FD8\u53EF\u4EE5\u901A\u8FC7\u56DE\u8C03\u7684\u65B9\u5F0F\u652F\u6301\u5B9E\u65F6\u540C\u6B65\u3002",className:"".concat(B),children:[(0,t.jsx)(H.Rs,{toolBarRender:function(){return[(0,t.jsxs)(Q.Z,{type:"primary",onClick:function(){v(!0)},children:[(0,t.jsx)(O.Z,{}),"\u6DFB\u52A0\u8EAB\u4EFD\u6E90"]},"add")]},search:{},rowKey:"id",headerTitle:"\u8EAB\u4EFD\u6E90\u5217\u8868",actionRef:F,split:!0,pagination:{showQuickJumper:!1,defaultPageSize:5,size:"small"},showActions:"always",request:g.SN,form:{syncToUrl:function(s,r){return r==="get"?T()({},s):s}},metas:{title:{title:"\u8EAB\u4EFD\u6E90\u540D\u79F0",dataIndex:"name",render:function(s,r){return(0,t.jsx)("span",{onClick:function(){L(r.id,r.provider)},children:r.name})}},avatar:{search:!1,render:function(s,r){return(0,t.jsx)(U.C,{shape:"square",size:50,src:re.Y[r.provider]},r.id)}},description:{search:!1,render:function(s,r){return r.remark?(0,t.jsx)("span",{children:r.remark}):(0,t.jsx)("span",{children:r.desc})}},content:{search:!1,render:function(s,r){return[(0,t.jsx)(E,T()({},r),"context")]}},actions:{render:function(s,r){return[r.enabled?(0,t.jsx)(D.Z,{title:"\u786E\u5B9A\u7981\u7528\u8BE5\u8EAB\u4EFD\u6E90\u5417\uFF1F",placement:"bottomRight",icon:(0,t.jsx)(A.Z,{style:{color:"red"}}),onConfirm:C()(h()().mark(function f(){var c,m,i,d;return h()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g.lz)(r.id);case 2:if(c=e.sent,m=c.success,i=c.result,!(m&&i)){e.next=10;break}return S.ZP.success("\u64CD\u4F5C\u6210\u529F"),e.next=9,(d=F.current)===null||d===void 0?void 0:d.reload();case 9:return e.abrupt("return");case 10:case"end":return e.stop()}},f)})),okText:"\u662F",cancelText:"\u5426",children:(0,t.jsx)("a",{children:"\u7981\u7528"},"disabled")},"disabled"):(0,t.jsx)(D.Z,{title:"\u786E\u5B9A\u542F\u7528\u8BE5\u8EAB\u4EFD\u6E90\u5417\uFF1F",placement:"bottomRight",icon:(0,t.jsx)(A.Z,{}),onConfirm:C()(h()().mark(function f(){var c,m,i,d;return h()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g.Cj)(r.id);case 2:if(c=e.sent,m=c.success,i=c.result,!(m&&i)){e.next=10;break}return S.ZP.success("\u64CD\u4F5C\u6210\u529F").then(),e.next=9,(d=F.current)===null||d===void 0?void 0:d.reload();case 9:return e.abrupt("return");case 10:case"end":return e.stop()}},f)})),okText:"\u662F",cancelText:"\u5426",children:(0,t.jsx)("a",{children:"\u542F\u7528"},"enabled")},"disabled"),(0,t.jsx)("a",{onClick:function(){L(r.id,r.provider)},children:"\u8BE6\u60C5"},"detail"),(0,t.jsx)(D.Z,{title:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u8EAB\u4EFD\u6E90\u5417\uFF1F",placement:"bottomRight",icon:(0,t.jsx)(A.Z,{style:{color:"red"}}),onConfirm:C()(h()().mark(function f(){var c,m,i,d;return h()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g._p)(r.id);case 2:if(c=e.sent,m=c.success,i=c.result,!(m&&i)){e.next=10;break}return S.ZP.success("\u64CD\u4F5C\u6210\u529F"),e.next=9,(d=F.current)===null||d===void 0?void 0:d.reload();case 9:return e.abrupt("return");case 10:case"end":return e.stop()}},f)})),okText:"\u662F",cancelText:"\u5426",children:(0,t.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u5220\u9664"},"remove")},"delete")]}}}}),(0,t.jsx)(w,{visible:x,onClose:function(){v(!1)},onFinish:function(){var u=C()(h()().mark(function s(r){var f,c,m,i,d;return h()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,g.gD)(r);case 3:if(f=e.sent,c=f.result,m=f.success,!m){e.next=11;break}return v(!1),(i=F.current)===null||i===void 0||i.reload(),d=V.Z.success({title:"\u6DFB\u52A0\u6210\u529F",content:"\u8BF7\u8FDB\u5165\u8EAB\u4EFD\u6E90\u8BE6\u60C5\u9875\u9762\u5B8C\u5584\u8EAB\u4EFD\u6E90\u914D\u7F6E\u4FE1\u606F",okText:"\u5B8C\u5584\u914D\u7F6E",onOk:function(){d.destroy(),P.m.push("/account/identity-source/detail?id=".concat(c.id))}}),e.abrupt("return",!0);case 11:return e.abrupt("return",!1);case 14:return e.prev=14,e.t0=e.catch(0),e.abrupt("return",!1);case 17:case"end":return e.stop()}},s,null,[[0,14]])}));return function(s){return u.apply(this,arguments)}}()})]})})},se=ue}}]); diff --git a/eiam-console/src/main/resources/fe/p__account__List__index.04f77279.async.js b/eiam-console/src/main/resources/fe/p__account__List__index.04f77279.async.js new file mode 100644 index 00000000..df2dce39 --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__account__List__index.04f77279.async.js @@ -0,0 +1,22 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[7793],{21084:function(Me,ge,a){a.d(ge,{Z:function(){return Ee}});var Ce=a(98293),$=a(78613),ie=a(85893),f=function(he){var oe=he.avatar,i=he.username;return(0,ie.jsx)(ie.Fragment,{children:oe?(0,ie.jsx)(Ce.C,{size:"small",src:(0,ie.jsx)($.Z,{src:oe,fallback:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="})}):(0,ie.jsx)(Ce.C,{style:{color:"#f56a00",backgroundColor:"#fde3cf",verticalAlign:"middle"},size:"small",gap:1,children:i.substring(0,1).toLocaleUpperCase()})})},Ee=f},85580:function(Me,ge,a){a.r(ge),a.d(ge,{default:function(){return mr}});var Ce=a(11281),$=a.n(Ce),ie=a(12741),f=a.n(ie),Ee=a(14459),he=a(71230),oe=a(15746),i=a(67294),de=a(97983),r=a.n(de),pa=a(40794),j=a.n(pa),ha=a(26522),$e=a(24969),ga=a(86548),Ca=a(56477),Ea=a(48689),Aa=a(11475),ja=a(37446),Ie=a(80882),Fa=a(69400),ne=a(2453),xa=a(68508),Sa=a(13013),Je=a(83062),He=a(4393),be=a(21687),fe=a(57953),ke=a(31673),ba=a(94184),q=a.n(ba),ya=a(12812),Y=a.n(ya),ye=a(46986),Be=a(38755),Ba=ye.ZP.ConfigContext;function Ye(V){var h=(0,i.useContext)(Ba),F=h.getPrefixCls,N=".".concat(F()),K=(0,Be.l)(function(){var g,R,w;return Y()({},".".concat(V),(w={},Y()(w,"&-tree",Y()({marginTop:"10px"},"".concat(N,"-tree"),(g={},Y()(g,"&-title",{width:"100%"}),Y()(g,"&-switcher",{display:"flex",flexWrap:"nowrap",alignContent:"center",alignItems:"center",justifyContent:"center"}),Y()(g,"&-treenode",{alignItems:"center",height:"30px",paddingBottom:"0",overflow:"hidden"}),Y()(g,".ant-tree-node-content-wrapper",{overflow:"auto"}),g))),Y()(w,"&-item",(R={position:"relative",display:"flex",justifyContent:"space-between",width:"100%"},Y()(R,"".concat(N,"-dropdown-open"),{backgroundColor:"rgba(0, 0, 0, 0.04)"}),Y()(R,"&-title",{width:"100%",overflow:"hidden",lineHeight:"30px",whiteSpace:"nowrap",textOverflow:"ellipsis"}),Y()(R,"&-action",Y()({color:"#293350",fontWeight:400,fontSize:"14px",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, + 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', + 'Noto Color Emoji', PingFangSC-Regular, PingFang SC`},"&-text",{paddingInlineStart:"4px"})),R)),Y()(w,"&-dropdown",Y()({minWidth:"70px",color:"#293350",border:"1px solid #eaebee",boxShadow:"0 0 12px 0 #f3f5f8"},"&-more",{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignContent:"center",alignItems:"center",justifyContent:"center",width:"35px",height:"30px",fontSize:"20px","&:hover":{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignContent:"center",alignItems:"center",justifyContent:"center",width:"35px",backgroundColor:"rgba(0, 0, 0, 0.04)"},"&:checked":{backgroundColor:"rgba(0, 0, 0, 0.04)"}})),w))});return{className:K}}var Re;(function(V){V.root="root"})(Re||(Re={}));var Ve={labelCol:{span:4},wrapperCol:{span:20}},T=a(137),wa=a(78234),Ge=a(25191),ze=a(37476),ce=a(97269),X=a(5966),We=a(64317),Fe=a(43825),me=a(69677),Xe=a(43262),e=a(85893),Za=function(h){var F=h.visible,N=h.currentNode,K=h.onCancel,g=h.onFinish,R=(0,i.useState)(!1),w=f()(R,2),b=w[0],G=w[1],U=Fe.Z.useForm(),W=f()(U,1),Q=W[0];return(0,i.useEffect)(function(){F&&Q.setFieldsValue({parentId:N.id,code:(0,Ge.MX)(7),sort:9999,parentName:N.name})},[N,Q,F]),(0,e.jsx)(ze.Y,{preserve:!1,form:Q,scrollToFirstError:!0,modalProps:{maskClosable:!1,destroyOnClose:!0,onCancel:K},requiredMark:!0,layout:"horizontal",labelCol:{span:4},wrapperCol:{span:20},title:"\u65B0\u589E\u7EC4\u7EC7\u67B6\u6784",width:500,open:F,onFinish:function(){var J=j()(r()().mark(function L(Z){var E;return r()().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return G(!0),C.next=3,g(Z);case 3:return E=C.sent,G(!1),C.abrupt("return",!!E);case 6:case"end":return C.stop()}},L)}));return function(L){return J.apply(this,arguments)}}(),children:(0,e.jsxs)(fe.Z,{spinning:b,children:[(0,e.jsx)(ce.A.Item,{name:"parentId",hidden:!0,children:(0,e.jsx)(me.Z,{})}),(0,e.jsx)(X.Z,{name:"parentName",label:"\u4E0A\u7EA7\u7EC4\u7EC7",readonly:!0}),(0,e.jsx)(We.Z,{name:"type",label:"\u7EC4\u7EC7\u7C7B\u578B",fieldProps:{placeholder:"\u8BF7\u9009\u62E9\u7EC4\u7EC7\u7C7B\u578B"},options:[{value:"group",label:"\u96C6\u56E2"},{value:"company",label:"\u516C\u53F8"},{value:"department",label:"\u90E8\u95E8"},{value:"unit",label:"\u5355\u4F4D"}],rules:[{required:!0,message:"\u7EC4\u7EC7\u7C7B\u578B\u4E3A\u5FC5\u586B\u9879"}]}),(0,e.jsx)(ce.A.Item,{name:"name",label:"\u7EC4\u7EC7\u540D\u79F0",rules:[{required:!0,message:"\u7EC4\u7EC7\u540D\u79F0\u4E3A\u5FC5\u586B\u9879"}],children:(0,e.jsx)(me.Z,{autoComplete:"off",placeholder:"\u8BF7\u8F93\u5165\u7EC4\u7EC7\u540D\u79F0"})}),(0,e.jsx)(ce.A.Item,{name:"code",label:"\u7EC4\u7EC7\u4EE3\u7801",extra:"\u7EC4\u7EC7\u4EE3\u7801\u5168\u5C40\u552F\u4E00\uFF0C\u521B\u5EFA\u540E\u4E0D\u53EF\u4FEE\u6539\u3002",rules:[{required:!0,message:"\u7EC4\u7EC7\u4EE3\u7801\u4E3A\u5FC5\u586B\u9879"}],children:(0,e.jsx)(me.Z,{autoComplete:"off",placeholder:"\u8BF7\u8F93\u5165\u7EC4\u7EC7\u4EE3\u7801"})}),(0,e.jsx)(ce.A.Item,{name:"order",label:"\u6392\u5E8F",children:(0,e.jsx)(Xe.Z,{style:{width:"100%"},min:0})}),(0,e.jsx)(ce.A.Item,{name:"desc",label:"\u63CF\u8FF0",children:(0,e.jsx)(me.Z.TextArea,{autoComplete:"off"})})]})})},Pa=Za,we=a(78098),Te=a(71975),Ze=a(2093),qe=a(99138),Na=function(h){var F=h.visible,N=h.onCancel,K=h.onFinish,g=(0,i.useState)(!1),R=f()(g,2),w=R[0],b=R[1],G=(0,i.useState)([]),U=f()(G,2),W=U[0],Q=U[1],J=(0,i.useState)([]),L=f()(J,2),Z=L[0],E=L[1],P=(0,i.useState)(),C=f()(P,2),z=C[0],D=C[1],ae=(0,i.useState)([]),x=f()(ae,2),te=x[0],k=x[1],S=(0,i.useState)(!1),p=f()(S,2),o=p[0],t=p[1],s=function(){var l=j()(r()().mark(function n(){var u,y,v;return r()().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return b(!0),I.next=3,(0,T.mB)();case 3:if(I.t0=I.sent,I.t0){I.next=6;break}I.t0={};case 6:u=I.t0,y=u.success,v=u.result,b(!1),y&&v&&(Q([v]),D([]),E([v.id]),k([v.id]),t(!0));case 11:case"end":return I.stop()}},n)}));return function(){return l.apply(this,arguments)}}();(0,Ze.Z)(j()(r()().mark(function l(){return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!F){u.next=3;break}return u.next=3,s();case 3:case"end":return u.stop()}},l)})),[F]);var m=function(){var l=j()(r()().mark(function n(u){var y;return r()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return b(!0),d.next=3,(0,T.z3)(u);case 3:return y=d.sent,y.success&&Q(function(I){return(0,we.J)(I,u,y.result)}),b(!1),d.abrupt("return",Promise.resolve());case 7:case"end":return d.stop()}},n)}));return function(u){return l.apply(this,arguments)}}();return(0,e.jsxs)(Te.a,{preserve:!1,drawerProps:{maskClosable:!0,destroyOnClose:!0,onClose:function(){Q([]),N()}},onFinish:j()(r()().mark(function l(){return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!(te.length>0)){u.next=4;break}return u.next=3,K(te[0]);case 3:return u.abrupt("return",u.sent);case 4:ne.ZP.warning(" \u8BF7\u9009\u62E9\u8981\u79FB\u52A8\u5230\u7684\u7EC4\u7EC7\u673A\u6784");case 5:case"end":return u.stop()}},l)})),title:"\u79FB\u52A8\u7EC4\u7EC7",width:530,open:F,children:[(0,e.jsx)(qe.Z,{banner:!0,type:"info",message:"\u8BF7\u9009\u62E9\u9700\u8981\u79FB\u52A8\u5230\u7684\u90E8\u95E8\u6216\u7EC4\u7EC7, \u5E76\u70B9\u51FB\u786E\u8BA4\u6309\u94AE\u3002"}),(0,e.jsx)("br",{}),(0,e.jsx)(fe.Z,{spinning:w,children:(0,e.jsx)(ke.Z,{blockNode:!0,fieldNames:{key:"id",title:"name"},showLine:{showLeafIcon:!1},switcherIcon:(0,e.jsx)(Ie.Z,{}),loadData:function(n){return m(n.key)},loadedKeys:z,selectedKeys:te,treeData:W,onExpand:function(n){E(n),t(!1)},expandedKeys:Z,autoExpandParent:o,onSelect:function(n){k(n)}})})]})},Qa=Na,Da=a(32983),Oe="account-organization",Ia=me.Z.Search,ka=function(V){var h=Ye(Oe),F=h.className,N=V.handleTitleRender,K=V.onSearchChange,g=V.onSelect,R=(0,i.useState)([]),w=f()(R,2),b=w[0],G=w[1],U=(0,i.useState)(),W=f()(U,2),Q=W[0],J=W[1],L=(0,i.useState)(),Z=f()(L,2),E=Z[0],P=Z[1],C=(0,i.useState)(),z=f()(C,2),D=z[0],ae=z[1],x=(0,i.useState)(!1),te=f()(x,2),k=te[0],S=te[1],p=(0,i.useState)(!1),o=f()(p,2),t=o[0],s=o[1],m=(0,i.useState)(!1),l=f()(m,2),n=l[0],u=l[1],y=function(){var d=j()(r()().mark(function I(se){var re,ue,le;return r()().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return ve.next=2,(0,T.rl)(se);case 2:return re=ve.sent,ue=re.success,le=re.result,ue&&(G(le),S(!0),J((0,we.h)(le))),ve.abrupt("return",Promise.resolve(le));case 7:case"end":return ve.stop()}},I)}));return function(se){return d.apply(this,arguments)}}(),v=function(){var d=j()(r()().mark(function I(se){var re;return r()().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return s(!0),le.next=3,(0,T.z3)(se);case 3:return re=le.sent,re.success&&G(function(Se){return(0,we.J)(Se,se,re.result)}),s(!1),le.abrupt("return",Promise.resolve());case 7:case"end":return le.stop()}},I)}));return function(se){return d.apply(this,arguments)}}();return(0,e.jsx)("div",{className:F,children:(0,e.jsx)("div",{className:q()("".concat(Oe)),children:(0,e.jsxs)(fe.Z,{spinning:t,children:[(0,e.jsx)(Ia,{allowClear:!0,placeholder:"\u8F93\u5165\u7EC4\u7EC7\u540D\u79F0\u6216\u7EC4\u7EC7\u7F16\u7801",onSearch:function(){var d=j()(r()().mark(function I(se){return r()().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!se){ue.next=8;break}return s(!0),u(!0),K(!0),ue.next=6,y(se);case 6:return s(!1),ue.abrupt("return");case 8:u(!1),K(!1);case 10:case"end":return ue.stop()}},I)}));return function(I){return d.apply(this,arguments)}}()}),n&&(b==null?void 0:b.length)>0?(0,e.jsx)("div",{className:q()("".concat(Oe,"-tree")),children:(0,e.jsx)(ke.Z,{blockNode:!0,fieldNames:{key:"id",title:"name"},titleRender:N,treeData:b,loadData:function(I){return v(I.key)},showLine:{showLeafIcon:!1},switcherIcon:(0,e.jsx)(Ie.Z,{}),selectedKeys:D,loadedKeys:E,onLoad:P,onSelect:function(I,se){var re=se.node;ae(I),g(re.key,re==null?void 0:re.name)},onExpand:function(I){J(I),S(!1)},expandedKeys:Q,autoExpandParent:k})}):n&&!t&&(b==null?void 0:b.length)==0&&(0,e.jsx)(Da.Z,{image:"https://gw.alipayobjects.com/zos/antfincdn/ZHrcdLPrvN/empty.svg",imageStyle:{height:60}})]})})})},Ra=function(h){var F=h.visible,N=h.currentNode,K=h.onCancel,g=h.onFinish,R=(0,i.useState)(),w=f()(R,2),b=w[0],G=w[1],U=(0,i.useState)(!1),W=f()(U,2),Q=W[0],J=W[1],L=Fe.Z.useForm(),Z=f()(L,1),E=Z[0];return(0,Ze.Z)(j()(r()().mark(function P(){var C,z,D;return r()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(!(F&&N)){x.next=8;break}return G(!0),x.next=4,(0,T.Xu)(N);case 4:C=x.sent,z=C.success,D=C.result,z&&(E.setFieldsValue(D),G(!1));case 8:case"end":return x.stop()}},P)})),[N,F]),(0,e.jsx)(ze.Y,{form:E,scrollToFirstError:!0,preserve:!1,modalProps:{maskClosable:!1,destroyOnClose:!0,onCancel:function(C){K&&(K(C),E.resetFields())}},layout:"horizontal",labelCol:{span:4},wrapperCol:{span:20},requiredMark:!0,title:"\u7F16\u8F91\u7EC4\u7EC7\u67B6\u6784",width:500,open:F,onFinish:function(){var P=j()(r()().mark(function C(z){var D;return r()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return J(!0),x.next=3,g(z);case 3:return D=x.sent,J(!1),x.abrupt("return",!!D);case 6:case"end":return x.stop()}},C)}));return function(C){return P.apply(this,arguments)}}(),children:(0,e.jsx)(be.Z,{loading:b,active:!0,children:(0,e.jsxs)(fe.Z,{spinning:Q,children:[(0,e.jsx)(ce.A.Item,{name:"id",hidden:!0,children:(0,e.jsx)(me.Z,{})}),(0,e.jsx)(We.Z,{name:"type",label:"\u7EC4\u7EC7\u7C7B\u578B",rules:[{required:!0,message:"\u7EC4\u7EC7\u7C7B\u578B\u4E3A\u5FC5\u586B\u9879"}],options:[{value:"group",label:"\u96C6\u56E2"},{value:"company",label:"\u516C\u53F8"},{value:"department",label:"\u90E8\u95E8"},{value:"unit",label:"\u5355\u4F4D"}]}),(0,e.jsx)(ce.A.Item,{name:"name",label:"\u7EC4\u7EC7\u540D\u79F0",rules:[{required:!0,message:"\u7EC4\u7EC7\u540D\u79F0\u4E3A\u5FC5\u586B\u9879"}],children:(0,e.jsx)(me.Z,{autoComplete:"off",placeholder:"\u8BF7\u8F93\u5165\u7EC4\u7EC7\u540D\u79F0"})}),(0,e.jsx)(X.Z,{readonly:!0,name:"code",disabled:!0,label:"\u7EC4\u7EC7\u4EE3\u7801"}),(0,e.jsx)(ce.A.Item,{name:"order",label:"\u6392\u5E8F",children:(0,e.jsx)(Xe.Z,{style:{width:"100%"},min:0})}),(0,e.jsx)(ce.A.Item,{name:"desc",label:"\u63CF\u8FF0",children:(0,e.jsx)(me.Z.TextArea,{autoComplete:"off"})})]})})})},za=Ra,ee="account-organization",Ta=Fa.Z.confirm,Oa=function(h){var F=Ye(ee),N=F.className,K=(0,i.useState)(!1),g=f()(K,2),R=g[0],w=g[1],b=(0,i.useState)(!1),G=f()(b,2),U=G[0],W=G[1],Q=h.onSelect,J=(0,i.useState)([]),L=f()(J,2),Z=L[0],E=L[1],P=(0,i.useState)(),C=f()(P,2),z=C[0],D=C[1],ae=(0,i.useState)(),x=f()(ae,2),te=x[0],k=x[1],S=(0,i.useState)(),p=f()(S,2),o=p[0],t=p[1],s=(0,i.useState)(!1),m=f()(s,2),l=m[0],n=m[1],u=(0,i.useState)(),y=f()(u,2),v=y[0],d=y[1],I=(0,i.useState)(!1),se=f()(I,2),re=se[0],ue=se[1],le=(0,i.useState)(!1),Se=f()(le,2),ve=Se[0],Ue=Se[1],vr=(0,i.useState)(!1),ca=f()(vr,2),pr=ca[0],Ke=ca[1],hr=(0,i.useState)(!1),da=f()(hr,2),gr=da[0],Cr=da[1],je=function(){var M=j()(r()().mark(function A(){var B,H,O;return r()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return w(!0),c.next=3,(0,T.mB)();case 3:if(c.t0=c.sent,c.t0){c.next=6;break}c.t0={};case 6:B=c.t0,H=B.success,O=B.result,H&&O&&(E([O]),k([]),D([O.id]),t([O.id]),n(!0),Q(O.id,O.name),w(!1));case 10:case"end":return c.stop()}},A)}));return function(){return M.apply(this,arguments)}}();(0,wa.Z)(j()(r()().mark(function M(){return r()().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return W(!0),B.next=3,je();case 3:W(!1);case 4:case"end":return B.stop()}},M)})));var Er=function(){var M=j()(r()().mark(function A(B){var H;return r()().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return w(!0),_.next=3,(0,T.z3)(B);case 3:return H=_.sent,H!=null&&H.success&&E(function(c){return(0,we.J)(c,B,H.result)}),w(!1),_.abrupt("return",Promise.resolve());case 7:case"end":return _.stop()}},A)}));return function(B){return M.apply(this,arguments)}}(),Ar=function(A){return A?(0,e.jsx)(e.Fragment,{}):(0,e.jsx)(ha.Z,{style:{marginRight:5}})},jr=function(A){var B=function(){var _=[{key:"add",label:(0,e.jsx)("div",{className:N,children:(0,e.jsxs)("div",{className:q()("".concat(ee,"-item-action")),children:[(0,e.jsx)($e.Z,{}),(0,e.jsx)("span",{className:q()("".concat(ee,"-item-action-text")),onClick:function(){d(A),ue(!0)},children:"\u65B0\u589E\u5B50\u7EC4\u7EC7"})]})})}];return A.id!==Re.root?[].concat(_,[{key:"update",label:(0,e.jsx)("div",{className:N,children:(0,e.jsxs)("div",{className:q()("".concat(ee,"-item-action")),children:[(0,e.jsx)(ga.Z,{}),(0,e.jsx)("span",{className:q()("".concat(ee,"-item-action-text")),onClick:function(){d(A),Ke(!0)},children:"\u7F16\u8F91\u7EC4\u7EC7"})]})})},{key:"move",label:(0,e.jsx)("div",{className:N,children:(0,e.jsxs)("div",{className:q()("".concat(ee,"-item-action")),children:[(0,e.jsx)(Ca.Z,{}),(0,e.jsx)("span",{className:q()("".concat(ee,"-item-action-text")),onClick:function(){d(A),Ue(!0)},children:"\u79FB\u52A8\u7EC4\u7EC7"})]})})},{key:"remove",label:(0,e.jsx)("div",{className:N,children:(0,e.jsxs)("div",{className:q()("".concat(ee,"-item-action")),children:[(0,e.jsx)(Ea.Z,{}),(0,e.jsx)("span",{className:q()("".concat(ee,"-item-action-text")),onClick:function(){d(A),Ta({title:"\u8B66\u544A",icon:(0,e.jsx)(Aa.Z,{}),content:"\u5220\u9664\u64CD\u4F5C\u65E0\u6CD5\u6062\u590D\uFF0C\u8BF7\u8C28\u614E\u5220\u9664",okText:"\u786E\u8BA4",centered:!0,okType:"danger",cancelText:"\u53D6\u6D88",onOk:function(){var Le=j()(r()().mark(function xr(){var ma,va;return r()().wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return pe.next=2,(0,T.w0)(A.id);case 2:if(ma=pe.sent,va=ma.success,!va){pe.next=9;break}return ne.ZP.success("\u5220\u9664\u6210\u529F"),pe.next=8,je();case 8:return pe.abrupt("return");case 9:case"end":return pe.stop()}},xr)}));function Fr(){return Le.apply(this,arguments)}return Fr}()})},children:"\u5220\u9664\u7EC4\u7EC7"})]})})}]):_},H=function(){return(0,e.jsx)(xa.Z,{className:q()("".concat(ee,"-dropdown")),onClick:function(c){var Le=c.domEvent;Le.stopPropagation()},items:B()})};return(0,e.jsx)(Sa.Z,{dropdownRender:H,placement:"bottom",trigger:["click","contextMenu"],children:(0,e.jsx)("span",{className:q()("".concat(ee,"-dropdown-more")),onClick:function(_){_.stopPropagation()},children:(0,e.jsx)(ja.Z,{})})})},fa=function(A){return(0,e.jsxs)("div",{className:q()("".concat(ee,"-item")),children:[(0,e.jsxs)("div",{className:q()("".concat(ee,"-item-title")),children:[Ar(!!A.isLeaf),(0,e.jsx)(Je.Z,{title:A.name,placement:"topLeft",children:(0,e.jsx)("span",{children:A.name})})]}),jr(A)]})};return(0,e.jsx)("div",{className:N,children:(0,e.jsxs)(He.Z,{style:{height:"calc(100vh - 220px)",overflow:"auto"},bordered:!1,className:q()("".concat(ee)),children:[(0,e.jsx)(be.Z,{loading:U,paragraph:{rows:5},children:(0,e.jsxs)(fe.Z,{spinning:R,children:[(0,e.jsx)(ka,{handleTitleRender:fa,onSearchChange:function(){var M=j()(r()().mark(function A(B){return r()().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if(B){O.next=3;break}return O.next=3,je();case 3:Cr(B);case 4:case"end":return O.stop()}},A)}));return function(A){return M.apply(this,arguments)}}(),onSelect:Q}),!gr&&(0,e.jsx)("div",{className:q()("".concat(ee,"-tree")),children:(0,e.jsx)(ke.Z,{blockNode:!0,fieldNames:{key:"id",title:"name"},titleRender:fa,treeData:Z,loadData:function(A){return Er(A.key)},showLine:{showLeafIcon:!1},switcherIcon:(0,e.jsx)(Ie.Z,{}),selectedKeys:o,loadedKeys:te,onLoad:k,onSelect:function(A,B){var H=B.node;t(A),Q(H.key,H.name)},onExpand:function(A){D(A),n(!1)},expandedKeys:z,autoExpandParent:l})})]})}),(0,e.jsx)(Pa,{visible:re,onCancel:function(){ue(!1)},onFinish:function(){var M=j()(r()().mark(function A(B){var H,O;return r()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,(0,T.Yi)(B);case 3:if(H=c.sent,O=H.success,!O){c.next=11;break}return ne.ZP.success("\u65B0\u589E\u6210\u529F"),ue(!1),c.next=10,je();case 10:return c.abrupt("return",Promise.resolve(!0));case 11:return c.abrupt("return",Promise.resolve(!1));case 14:return c.prev=14,c.t0=c.catch(0),c.abrupt("return",Promise.resolve(!1));case 17:case"end":return c.stop()}},A,null,[[0,14]])}));return function(A){return M.apply(this,arguments)}}(),currentNode:v}),v&&(0,e.jsx)(za,{visible:pr,onCancel:j()(r()().mark(function M(){return r()().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:Ke(!1);case 1:case"end":return B.stop()}},M)})),onFinish:function(){var M=j()(r()().mark(function A(B){var H,O;return r()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,(0,T.FV)($()({},B));case 3:if(H=c.sent,O=H.success,!O){c.next=11;break}return ne.ZP.success("\u7F16\u8F91\u6210\u529F"),Ke(!1),c.next=10,je();case 10:return c.abrupt("return",Promise.resolve(!0));case 11:return c.abrupt("return",Promise.resolve(!1));case 14:return c.prev=14,c.t0=c.catch(0),c.abrupt("return",Promise.resolve(!1));case 17:case"end":return c.stop()}},A,null,[[0,14]])}));return function(A){return M.apply(this,arguments)}}(),currentNode:v.id}),v&&(0,e.jsx)(Qa,{onFinish:function(){var M=j()(r()().mark(function A(B){var H,O;return r()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,T.qb)(v.id,B);case 2:if(H=c.sent,O=H.success,!O){c.next=10;break}return Ue(!1),ne.ZP.success("\u64CD\u4F5C\u6210\u529F"),c.next=9,je();case 9:return c.abrupt("return",Promise.resolve(!0));case 10:return c.abrupt("return",Promise.resolve(!1));case 11:case"end":return c.stop()}},A)}));return function(A){return M.apply(this,arguments)}}(),visible:ve,onCancel:j()(r()().mark(function M(){return r()().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:Ue(!1);case 1:case"end":return B.stop()}},M)}))})]})})},Ua=Oa,Ka=Ua,_e=a(84865),xe=a(25035),La=a(93279),Ma=a(1914),ea=a(17057),Ae=a(26713),Pe=a(76521),Ne=a(86738),aa=a(27414),$a=a(32808),ra=a(96074),Qe=a(71577),na=a(52688),ta=a(97462),sa=a(63434),ua=a(50335),la=a(90672),De=a(34041),ia=a(96486),Ja=a(30381),oa=a.n(Ja),Ha=De.Z.Option,Ya=ye.ZP.ConfigContext,Va=function(h){var F=h.visible,N=h.onCancel,K=h.onFinish,g=h.organization,R=Fe.Z.useForm(),w=f()(R,1),b=w[0],G=(0,i.useState)(!1),U=f()(G,2),W=U[0],Q=U[1],J=(0,i.useState)(!1),L=f()(J,2),Z=L[0],E=L[1],P=(0,i.useState)(86),C=f()(P,2),z=C[0],D=C[1],ae=function(t){return t&&t1?(0,e.jsx)(Ae.Z,{size:16,children:(0,e.jsx)(Ne.Z,{title:"\u60A8\u786E\u5B9A\u8981\u6279\u91CF\u5220\u9664\u9009\u4E2D\u7528\u6237\u5417\uFF1F",placement:"bottomRight",icon:(0,e.jsx)(xe.Z,{style:{color:"red"}}),onConfirm:j()(r()().mark(function p(){var o;return r()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:ne.ZP.success("\u64CD\u4F5C\u6210\u529F"),S.onCleanSelected(),(o=F.current)===null||o===void 0||o.reload();case 3:case"end":return s.stop()}},p)})),okText:"\u662F",cancelText:"\u5426",children:(0,e.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u6279\u91CF\u5220\u9664"},"remove")},"offline")}):(0,e.jsx)(e.Fragment,{})},columns:te,actionRef:F,pagination:{defaultPageSize:10,showQuickJumper:!0},request:T.lE,rowKey:"id",dateFormatter:"string",headerTitle:h.name,form:{syncToUrl:function(S,p){return p==="get"?$()({},S):S}},toolbar:{actions:[(0,e.jsxs)(Ae.Z,{style:{alignItems:"flex-start"},children:[(0,e.jsx)($a.Z,{checked:G,onChange:function(S){var p,o=S.target.checked;U(o),(p=F.current)===null||p===void 0||p.reload()}}),(0,e.jsx)(Je.Z,{title:"\u82E5\u4E0D\u52FE\u9009\uFF0C\u5219\u53EA\u4F1A\u641C\u7D22\u5F53\u524D\u76F4\u5C5E\u8282\u70B9\u7684\u8D26\u6237\uFF0C\u4E0D\u5305\u542B\u4E0B\u7EA7\u8282\u70B9\u8D26\u6237\u3002",children:(0,e.jsxs)(sr,{ellipsis:!0,children:["\u5305\u542B\u8282\u70B9\u4E0B\u5168\u90E8\u8D26\u6237",(0,e.jsx)(xe.Z,{style:{marginInlineStart:3}})]})})]},"checkbox"),(0,e.jsx)(ra.Z,{type:"vertical"},"divider"),(0,e.jsx)(ur,{ellipsis:!0,onClick:function(){_e.m.push("/account/identity-source")},children:"\u8EAB\u4EFD\u6E90\u5BFC\u5165"},"identity-import"),(0,e.jsx)(ra.Z,{type:"vertical"},"divider"),(0,e.jsx)(Qe.Z,{type:"primary",icon:(0,e.jsx)($e.Z,{}),onClick:function(){L(!0)},children:"\u65B0\u589E\u7528\u6237"},"create")]}}):(0,e.jsx)(He.Z,{style:{height:"calc(100vh - 220px)"},bordered:!1,children:(0,e.jsx)(be.Z,{paragraph:{rows:10},active:!0})}),h&&(0,e.jsx)(Ga,{visible:J,onCancel:function(){L(!1)},organization:{id:h.id,name:h.name},onFinish:function(){var k=j()(r()().mark(function S(p,o){var t,s,m,l;return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,(0,T.r4)(p);case 2:if(t=u.sent,s=t.success,m=t.result,!(s&&m)){u.next=10;break}return ne.ZP.success("\u64CD\u4F5C\u6210\u529F"),(l=F.current)===null||l===void 0||l.reload(),o||L(!1),u.abrupt("return",Promise.resolve(!0));case 10:return u.abrupt("return",Promise.resolve(!1));case 11:case"end":return u.stop()}},S)}));return function(S,p){return k.apply(this,arguments)}}()}),g&&(0,e.jsx)(nr,{id:g,visible:P,onCancel:function(){C(!1)},onFinish:function(){var k=j()(r()().mark(function S(p){var o,t,s,m;return r()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,T.Nq)(p);case 2:if(o=n.sent,t=o.success,s=o.result,!(t&&s)){n.next=10;break}return ne.ZP.success("\u64CD\u4F5C\u6210\u529F"),C(!1),(m=F.current)===null||m===void 0||m.reload(),n.abrupt("return",Promise.resolve(!0));case 10:return n.abrupt("return",Promise.resolve(!1));case 11:case"end":return n.stop()}},S)}));return function(S){return k.apply(this,arguments)}}()}),g&&(0,e.jsx)(_a,{id:g,visible:ae,onCancel:function(){x(!1)}})]})},or=ir,cr={xxl:5,lg:6,md:24,sm:24,xs:24},dr={xxl:19,lg:18,md:24,sm:24,xs:24},fr=function(){var V=(0,i.useState)(),h=f()(V,2),F=h[0],N=h[1],K=function(R,w){N({id:R,name:w})};return(0,e.jsx)(Ee._z,{content:"\u7EC4\u7EC7\u4E0E\u7528\u6237\u7528\u4E8E\u89E3\u51B3\u4F01\u4E1A\u7EC4\u7EC7\u3001\u7528\u6237\u7B49\u5B9E\u4F53\u7684\u7BA1\u7406\u95EE\u9898\u3002\u8FD9\u4E9B\u5B9E\u4F53\u60A8\u53EF\u4EE5\u76F4\u63A5\u5728TopIAM\u4E2D\u8FDB\u884C\u7EF4\u62A4\uFF0C\u4E5F\u53EF\u4EE5\u901A\u8FC7\u914D\u7F6E\u8EAB\u4EFD\u6E90\u540E\uFF0C\u540C\u6B65\u8EAB\u4EFD\u6E90\u7684\u6570\u636E\u3002",children:(0,e.jsxs)(he.Z,{gutter:[16,16],children:[(0,e.jsx)(oe.Z,$()($()({},cr),{},{style:{minHeight:"100%",overflow:"auto"},children:(0,e.jsx)(Ka,{onSelect:K})})),(0,e.jsx)(oe.Z,$()($()({},dr),{},{style:{minHeight:"100%",overflow:"auto"},children:(0,e.jsx)(or,{organization:F})}))]})})},mr=fr},78098:function(Me,ge,a){a.d(ge,{J:function(){return Ee},h:function(){return he}});var Ce=a(64129),$=a.n(Ce),ie=a(11281),f=a.n(ie);function Ee(oe,i,de){return oe.map(function(r){return r.id===i?f()(f()({},r),{},{isLeaf:!1,children:de}):r.children?f()(f()({},r),{},{children:Ee(r.children,i,de)}):r})}function he(oe){var i=[];return oe.forEach(function(de){return i.push(de.id),de.children&&i.push.apply(i,$()(he(de.children))),i}),i}}}]); diff --git a/eiam-console/src/main/resources/fe/p__account__UserDetail__index.6d202951.async.js b/eiam-console/src/main/resources/fe/p__account__UserDetail__index.6d202951.async.js new file mode 100644 index 00000000..c2472e93 --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__account__UserDetail__index.6d202951.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[2845],{11911:function(Ae,W,r){r.d(W,{Gh:function(){return Y},SC:function(){return d},Zw:function(){return m},b$:function(){return $},n6:function(){return E},pR:function(){return w},rD:function(){return c}});var c;(function(n){n.EX900005="EX900005",n.EX000102="EX000102",n.EX000202="EX000202",n.SUCCESS="200"})(c||(c={}));var m;(function(n){n.ALIYUN="aliyun",n.QI_NIU="qiniu",n.TENCENT="tencent",n.NET_EASE="netease",n.MAXMIND="maxmind"})(m||(m={}));var E;(function(n){n.ALIYUN="aliyun",n.TENCENT="tencent",n.GEE_TEST="geetest",n.HCAPTCHA="hcaptcha",n.RECAPTCHA="recaptcha"})(E||(E={}));var w;(function(n){n.STANDARD="standard",n.CUSTOM_MADE="custom_made"})(w||(w={}));var $;(function(n){n.SAML2="saml2",n.OIDC="oidc",n.CAS="cas",n.JWT="jwt",n.FORM="form",n.OAUTH2="oauth2"})($||($={}));var Y;(function(n){n.ALLOW="ALLOW",n.DENY="DENY"})(Y||(Y={}));var d;(function(n){n.ROLE="ROLE",n.RESOURCE="RESOURCE",n.USER="USER",n.ORGANIZATION="ORGANIZATION",n.USER_GROUP="USER_GROUP"})(d||(d={}))},10176:function(Ae,W,r){r.r(W),r.d(W,{default:function(){return fe}});var c=r(12741),m=r.n(c),E=r(84865),w=r(14459),$=r(78234),Y=r(2453),d=r(67294),n=r(97983),p=r.n(n),me=r(40794),O=r.n(me),Ee=r(11911),te=r(56162),ne=r(25035),q=r(1914),H=r(76521),se=r(86738),_=r(27414),a=r(85893),he=function(u){var h=u.id,y=(0,d.useRef)(),v=[{title:"\u5E94\u7528",dataIndex:"appName",fixed:"left"},{title:"\u5E94\u7528\u534F\u8BAE",dataIndex:"appProtocol",align:"center",search:!1,render:function(C,T){return(0,a.jsx)(H.Z,{status:"success",text:T.appProtocol})}},{title:"\u6388\u6743\u65F6\u95F4",align:"center",dataIndex:"createTime",valueType:"dateTime",search:!1},{title:"\u64CD\u4F5C",valueType:"option",key:"option",width:80,align:"center",fixed:"right",render:function(C,T){return[(0,a.jsx)(se.Z,{title:"\u60A8\u786E\u5B9A\u8981\u53D6\u6D88\u4E3B\u4F53\u6388\u6743\uFF1F\u53D6\u6D88\u6388\u6743\u540E\u4E0D\u53EF\u81EA\u52A8\u6062\u590D\u3002",placement:"bottomRight",icon:(0,a.jsx)(ne.Z,{style:{color:"red"}}),onConfirm:O()(p()().mark(function U(){var Q,b,Z;return p()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,(0,te.AY)(T.id);case 2:if(Q=f.sent,b=Q.success,!b){f.next=8;break}return Y.ZP.success("\u64CD\u4F5C\u6210\u529F"),(Z=y.current)===null||Z===void 0||Z.reload(),f.abrupt("return");case 8:case"end":return f.stop()}},U)})),okText:"\u662F",cancelText:"\u5426",children:(0,a.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u53D6\u6D88\u6388\u6743"},"remove")},"delete")]}}];return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(q.Z,{columns:v,actionRef:y,scroll:{x:700},rowSelection:{selections:[_.Z.SELECTION_ALL,_.Z.SELECTION_INVERT]},request:te.Je,params:{subjectId:h,subjectType:Ee.SC.USER},rowKey:"id",pagination:{defaultPageSize:5},dateFormatter:"string"})})},pe=he,D=r(137),Ce=function(u){var h=u.id,y=(0,d.useRef)(),v=[{title:"\u5E94\u7528",dataIndex:"appName",fixed:"left"},{title:"\u5E94\u7528\u534F\u8BAE",dataIndex:"appProtocol",align:"center",search:!1,render:function(C,T){return(0,a.jsx)(H.Z,{status:"success",text:T.appProtocol})}},{title:"\u5E94\u7528\u8D26\u6237",dataIndex:"account",ellipsis:!0,search:!1},{title:"\u6DFB\u52A0\u65F6\u95F4",dataIndex:"createTime",valueType:"dateTime",search:!1},{title:"\u64CD\u4F5C",valueType:"option",key:"option",width:80,align:"center",fixed:"right",render:function(C,T){return[(0,a.jsx)(se.Z,{title:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u6B64\u5E94\u7528\u8D26\u6237\uFF1F",placement:"bottomRight",icon:(0,a.jsx)(ne.Z,{style:{color:"red"}}),onConfirm:O()(p()().mark(function U(){var Q,b,Z;return p()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,(0,D.AG)(T.id);case 2:if(Q=f.sent,b=Q.success,!b){f.next=8;break}return Y.ZP.success("\u64CD\u4F5C\u6210\u529F"),(Z=y.current)===null||Z===void 0||Z.reload(),f.abrupt("return");case 8:case"end":return f.stop()}},U)})),okText:"\u662F",cancelText:"\u5426",children:(0,a.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u5220\u9664"},"remove")},"delete")]}}];return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(q.Z,{columns:v,actionRef:y,scroll:{x:800},rowSelection:{selections:[_.Z.SELECTION_ALL,_.Z.SELECTION_INVERT]},request:te.IC,params:{userId:h},rowKey:"id",pagination:{defaultPageSize:5},dateFormatter:"string"})})},xe=Ce,Ie=r(26713),ve=r(51904),le=r(70147),ye=function(u){var h=u.id;(0,d.useEffect)(function(){},[]);var y=[{title:"\u5E94\u7528\u540D\u79F0",ellipsis:!0,search:!1,dataIndex:"appName",fixed:"left"},{title:"\u5BA2\u6237\u7AEFIP",dataIndex:"clientIp",ellipsis:!0,valueType:"text",search:!1,render:function(R,C){return C.clientIp?(0,a.jsx)(H.Z,{status:"success",text:C.clientIp}):(0,a.jsx)(H.Z,{status:"error",text:"\u672A\u77E5"})}},{title:"\u6D4F\u89C8\u5668",dataIndex:"browser",search:!1},{title:"\u5730\u7406\u4F4D\u7F6E",dataIndex:"location",search:!1},{title:"\u767B\u5F55\u65F6\u95F4",dataIndex:"eventTime",sorter:!0,valueType:"dateTime",search:!1},{title:"\u767B\u5F55\u7ED3\u679C",dataIndex:"eventStatus",search:!1,align:"center",render:function(R,C){return(0,a.jsxs)(Ie.Z,{children:[C.eventStatus===le.N.success&&(0,a.jsx)(ve.Z,{color:"#87d068",children:"\u6210\u529F"}),C.eventStatus===le.N.fail&&(0,a.jsx)(ve.Z,{color:"#f50",children:"\u5931\u8D25"})]})}}];return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(q.Z,{columns:y,search:!1,request:D.lu,params:{id:h},pagination:{pageSize:10}})})},s=r(4393),e=r(99138),i=function(u){return(0,a.jsx)(s.Z,{children:(0,a.jsx)(e.Z,{style:{backgroundColor:"#f1f1f2",border:"1px solid #f1f1f2"},message:"\u6682\u672A\u5B9E\u73B0"})})},t=r(21687),o=r(98293),z=r(78613),S=r(38345),l=r(85307),M=r(2093),P=r(96486),j=r(12812),V=r.n(j),G=r(46986),oe=r(38755),K=G.ZP.ConfigContext;function ee(u){var h=(0,d.useContext)(K),y=h.getPrefixCls,v=".".concat(y()),R=(0,oe.l)(function(){return V()({},".".concat(u,"-descriptions"),V()({},"".concat(v,"-descriptions-small ").concat(v,"-descriptions-row > th, ").concat(v,"-descriptions-small ").concat(v,"-descriptions-row > td"),{paddingBottom:"16px"}))});return{className:R}}var ie=r(94184),ue=r.n(ie),ce="user-detail-info",ae=function(u){var h=u.userId,y=(0,d.useState)(),v=m()(y,2),R=v[0],C=v[1],T=(0,d.useState)(),U=m()(T,2),Q=U[0],b=U[1],Z=(0,d.useRef)(),X=ee(ce),f=X.className;(0,M.Z)(O()(p()().mark(function k(){var J,A,B;return p()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return C(!0),x.next=3,(0,D.PR)(h);case 3:J=x.sent,A=J.result,B=J.success,B&&b(A),C(!1);case 8:case"end":return x.stop()}},k)})),[]);var de=[{title:"\u663E\u793A\u540D",dataIndex:"openId",ellipsis:!0,fixed:"left"},{title:"\u8EAB\u4EFD\u63D0\u4F9B\u65B9",dataIndex:"idpName",copyable:!1,search:!1},{title:"\u7ED1\u5B9A\u65F6\u95F4",dataIndex:"bindTime",valueType:"dateTime",copyable:!1,search:!1},{title:"\u64CD\u4F5C",align:"center",valueType:"option",fixed:"right",width:100,render:function(J,A){return[(0,a.jsx)(se.Z,{title:"\u60A8\u786E\u5B9A\u8981\u89E3\u7ED1\u8BE5\u8D26\u6237\u5417\uFF1F",placement:"bottomRight",icon:(0,a.jsx)(ne.Z,{style:{color:"red"}}),onConfirm:O()(p()().mark(function B(){var F;return p()().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return L.next=2,(0,D.re)(A.id);case 2:(F=Z.current)===null||F===void 0||F.reload();case 3:case"end":return L.stop()}},B)})),okText:"\u662F",cancelText:"\u5426",children:(0,a.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u89E3\u7ED1"},"remove")},"delete")]}}],be=function(){var k=O()(p()().mark(function J(A,B){var F,x;return p()().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return N.next=2,(0,D.Nq)((0,P.omit)(B,"avatar","username","externalId","authTotal","lastAuthIp","lastAuthTime","createTime","updateTime"));case 2:if(F=N.sent,x=F.success,!x){N.next=9;break}return N.next=7,(0,D.PR)(h).then(function(Se){var g=Se.result;b(g)});case 7:return Y.ZP.success("\u4FEE\u6539\u6210\u529F"),N.abrupt("return",Promise.resolve(!0));case 9:return N.abrupt("return",Promise.resolve(!1));case 10:case"end":return N.stop()}},J)}));return function(A,B){return k.apply(this,arguments)}}();return(0,a.jsxs)("div",{className:f,children:[(0,a.jsx)(S.Z,{style:{height:"100%"},title:"\u8D26\u6237\u4FE1\u606F",children:(0,a.jsx)(t.Z,{loading:R,active:!0,paragraph:{rows:8},children:(0,a.jsx)("div",{className:ue()("".concat(ce,"-descriptions")),children:(0,a.jsxs)(l.vY,{size:"small",column:2,dataSource:Q,editable:{onSave:be},children:[(0,a.jsx)(l.vY.Item,{dataIndex:"avatar",label:"\u5934\u50CF",editable:!1,render:function(J,A){var B;return A!=null&&A.avatar?(0,a.jsx)(o.C,{size:"small",src:(0,a.jsx)(z.Z,{src:A.avatar,fallback:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="})}):(0,a.jsx)(o.C,{style:{color:"#f56a00",backgroundColor:"#fde3cf",verticalAlign:"small"},size:"small",children:A==null||(B=A.fullName)===null||B===void 0?void 0:B.substring(0,1).toLocaleUpperCase()})}}),(0,a.jsx)(l.vY.Item,{dataIndex:"username",label:"\u7528\u6237\u540D",editable:!1,copyable:!0}),(0,a.jsx)(l.vY.Item,{dataIndex:"nickName",label:"\u6635\u79F0",formItemProps:{rules:[{required:!0,message:"\u7528\u6237\u6635\u79F0\u4E3A\u5FC5\u586B\u9879"}]}}),(0,a.jsx)(l.vY.Item,{dataIndex:"fullName",label:"\u59D3\u540D",formItemProps:{rules:[{required:!0,message:"\u7528\u6237\u59D3\u540D\u4E3A\u5FC5\u586B\u9879"}]}}),(0,a.jsx)(l.vY.Item,{dataIndex:"status",label:"\u7528\u6237\u72B6\u6001",valueEnum:{enabled:{text:"\u542F\u7528",status:"Success"},disabled:{text:"\u7981\u7528",status:"Error"},locked:{text:"\u9501\u5B9A",status:"Warning"},expired_locked:{text:"\u8FC7\u671F\u9501\u5B9A",status:"Warning",disabled:!0},password_expired_locked:{text:"\u5BC6\u7801\u8FC7\u671F\u9501\u5B9A",status:"Warning",disabled:!0}},formItemProps:{rules:[{required:!0,message:"\u7528\u6237\u72B6\u6001\u4E3A\u5FC5\u9009\u9879"}]}}),(0,a.jsx)(l.vY.Item,{dataIndex:"dataOrigin",label:"\u6570\u636E\u6765\u6E90",valueType:"select",editable:!1,valueEnum:{input:{text:"\u81EA\u5EFA"},dingtalk:{text:"\u9489\u9489\u5BFC\u5165"},wechat:{text:"\u4F01\u4E1A\u5FAE\u4FE1\u5BFC\u5165"},feishu:{text:"\u98DE\u4E66\u5BFC\u5165"},ldap:{text:"LDAP\u5BFC\u5165"}}}),(0,a.jsx)(l.vY.Item,{dataIndex:"id",label:"\u8D26\u6237 ID ",editable:!1,copyable:!0}),(0,a.jsx)(l.vY.Item,{dataIndex:"externalId",label:"\u5916\u90E8 ID ",editable:!1,copyable:!0}),(0,a.jsx)(l.vY.Item,{dataIndex:"phone",label:"\u624B\u673A\u53F7",copyable:!0,formItemProps:{rules:[{pattern:new RegExp(/^1[3-9]\d{9}$/),message:"\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u6B63\u786E"},{validator:function(){var k=O()(p()().mark(function A(B,F){var x,L,N;return p()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(F){g.next=2;break}return g.abrupt("return",Promise.resolve());case 2:return g.next=4,(0,D.mz)("PHONE",F,h);case 4:if(x=g.sent,L=x.success,N=x.result,L){g.next=9;break}return g.abrupt("return",Promise.reject());case 9:if(N){g.next=11;break}return g.abrupt("return",Promise.reject(new Error("\u624B\u673A\u53F7\u5DF2\u5B58\u5728")));case 11:case"end":return g.stop()}},A)}));function J(A,B){return k.apply(this,arguments)}return J}(),validateTrigger:["onBlur"]}]}}),(0,a.jsx)(l.vY.Item,{dataIndex:"email",label:"\u90AE\u7BB1",copyable:!0,formItemProps:{rules:[{type:"email",message:"\u90AE\u7BB1\u683C\u5F0F\u4E0D\u6B63\u786E"},{validator:function(){var k=O()(p()().mark(function A(B,F){var x,L,N;return p()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(F){g.next=2;break}return g.abrupt("return",Promise.resolve());case 2:return g.next=4,(0,D.mz)("EMAIL",F,h);case 4:if(x=g.sent,L=x.success,N=x.result,!(L&&!N)){g.next=9;break}return g.abrupt("return",Promise.reject(new Error("\u90AE\u7BB1\u5DF2\u5B58\u5728")));case 9:case"end":return g.stop()}},A)}));function J(A,B){return k.apply(this,arguments)}return J}(),validateTrigger:["onBlur"]}]}}),(0,a.jsx)(l.vY.Item,{dataIndex:"authTotal",label:"\u8BA4\u8BC1\u6B21\u6570",editable:!1}),(0,a.jsx)(l.vY.Item,{dataIndex:"lastAuthIp",label:"\u6700\u540E\u767B\u5F55 IP ",editable:!1}),(0,a.jsx)(l.vY.Item,{dataIndex:"lastAuthTime",label:"\u6700\u540E\u767B\u5F55\u65F6\u95F4",valueType:"dateTime",editable:!1}),(0,a.jsx)(l.vY.Item,{dataIndex:"expireDate",label:"\u8FC7\u671F\u65F6\u95F4",valueType:"date",formItemProps:{rules:[{required:!0,message:"\u8FC7\u671F\u65F6\u95F4\u4E3A\u5FC5\u586B\u9879"}]}}),(0,a.jsx)(l.vY.Item,{label:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createTime",editable:!1,valueType:"dateTime"}),(0,a.jsx)(l.vY.Item,{label:"\u4FEE\u6539\u65F6\u95F4",editable:!1,dataIndex:"updateTime",valueType:"dateTime"}),(0,a.jsx)(l.vY.Item,{label:"\u5907\u6CE8",dataIndex:"remark",valueType:"textarea",fieldProps:{placeholder:"\u5907\u6CE8",rows:2,autoComplete:"off",showCount:!0,maxLength:20}})]})})})}),(0,a.jsx)("br",{}),(0,a.jsx)(S.Z,{style:{height:"100%"},title:"\u5DF2\u7ED1\u5B9A\u8D26\u6237",bodyStyle:{padding:20},children:(0,a.jsx)(q.Z,{cardProps:{bodyStyle:{margin:0,padding:0}},search:!1,actionRef:Z,params:{userId:h},pagination:!1,columns:de,request:D.Zy,toolbar:{settings:[]}})})]})},I;(function(u){u.user_info="user-info",u.access_policy="access-policy",u.permission_info="permission-info",u.app_account="app-account",u.login_audit="login-audit"})(I||(I={}));var re=r(67038),ge=r(98971),Qe=function(){var u=(0,ge.useLocation)(),h=(0,re.parse)(u.search),y=h,v=y.id,R=h,C=R.tab,T=(0,d.useState)(),U=m()(T,2),Q=U[0],b=U[1];return(0,$.Z)(function(){if(!v){Y.ZP.warning("\u672A\u9009\u62E9\u7528\u6237").then(),E.m.push("/account/user");return}if(!C){b(I.user_info),E.m.replace({pathname:u.pathname,search:(0,re.stringify)({tab:I.user_info,id:v})});return}b(C)}),(0,a.jsxs)(w._z,{onBack:function(){E.m.push("/account/user")},tabList:[{key:I.user_info,tab:"\u7528\u6237\u4FE1\u606F"},{key:I.app_account,tab:"\u5E94\u7528\u8D26\u53F7"},{key:I.access_policy,tab:"\u6388\u6743\u5E94\u7528"},{key:I.permission_info,tab:"\u6743\u9650\u7BA1\u7406"},{key:I.login_audit,tab:"\u767B\u5F55\u65E5\u5FD7"}],tabActiveKey:Q,onTabChange:function(X){b(X),E.m.replace({pathname:u.pathname,search:(0,re.stringify)({tab:X,id:v})})},children:[I.user_info===Q&&(0,a.jsx)(ae,{userId:v}),I.permission_info===Q&&(0,a.jsx)(i,{id:v}),I.access_policy===Q&&(0,a.jsx)(pe,{id:v}),I.app_account===Q&&(0,a.jsx)(xe,{id:v}),I.login_audit===Q&&(0,a.jsx)(ye,{id:v})]})},fe=Qe},70147:function(Ae,W,r){r.d(W,{F:function(){return c},N:function(){return m}});var c;(function(E){E.admin="admin",E.user="user"})(c||(c={}));var m;(function(E){E.success="success",E.fail="fail"})(m||(m={}))},51904:function(Ae,W,r){r.d(W,{Z:function(){return ye}});var c=r(4942),m=r(87462),E=r(97685),w=r(97937),$=r(94184),Y=r.n($),d=r(67294),n=r(53124),p=r(98787),me=r(28704),O=r(8796),Ee=r(67968),te=r(45503);function ne(s){if(typeof s!="string")return s;var e=s.charAt(0).toUpperCase()+s.slice(1);return e}var q=r(14747),H=function(e,i,t){var o=ne(t);return(0,c.Z)({},e.componentCls+"-"+i,{color:e["color"+t],background:e["color"+o+"Bg"],borderColor:e["color"+o+"Border"]})},se=function(e){return O.i.reduce(function(i,t){var o,z=e[t+"-1"],S=e[t+"-3"],l=e[t+"-6"],M=e[t+"-7"];return(0,m.Z)((0,m.Z)({},i),(o={},(0,c.Z)(o,e.componentCls+"-"+t,{color:M,background:z,borderColor:S}),(0,c.Z)(o,e.componentCls+"-"+t+"-inverse",{color:e.colorTextLightSolid,background:l,borderColor:l}),o))},{})},_=function(e){var i,t=e.paddingXXS,o=e.lineWidth,z=e.tagPaddingHorizontal,S=z-o,l=t-o;return(0,c.Z)({},e.componentCls,(0,m.Z)((0,m.Z)({},(0,q.Wf)(e)),(i={display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:S,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight+"px",whiteSpace:"nowrap",background:e.tagDefaultBg,border:e.lineWidth+"px "+e.lineType+" "+e.colorBorder,borderRadius:e.borderRadiusSM,opacity:1,transition:"all "+e.motionDurationMid,textAlign:"start","&&-rtl":{direction:"rtl"},"&, a, a:hover":{color:e.tagDefaultColor}},(0,c.Z)(i,e.componentCls+"-close-icon",{marginInlineStart:l,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:"all "+e.motionDurationMid,"&:hover":{color:e.colorTextHeading}}),(0,c.Z)(i,"&&-has-color",(0,c.Z)({borderColor:"transparent"},"&, a, a:hover, "+e.iconCls+"-close, "+e.iconCls+"-close:hover",{color:e.colorTextLightSolid})),(0,c.Z)(i,"&-checkable",{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer","&:not(&-checked):hover":{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}}),(0,c.Z)(i,"&-hidden",{display:"none"}),(0,c.Z)(i,"> "+e.iconCls+" + span, > span + "+e.iconCls,{marginInlineStart:S}),i)))},a=(0,Ee.Z)("Tag",function(s){var e=s.fontSize,i=s.lineHeight,t=s.lineWidth,o=s.fontSizeIcon,z=Math.round(e*i),S=s.fontSizeSM,l=z-t*2,M=s.colorFillAlter,P=s.colorText,j=(0,te.TS)(s,{tagFontSize:S,tagLineHeight:l,tagDefaultBg:M,tagDefaultColor:P,tagIconSize:o-2*t,tagPaddingHorizontal:8});return[_(j),se(j),H(j,"success","Success"),H(j,"processing","Info"),H(j,"error","Error"),H(j,"warning","Warning")]}),he=function(s,e){var i={};for(var t in s)Object.prototype.hasOwnProperty.call(s,t)&&e.indexOf(t)<0&&(i[t]=s[t]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(s);o. + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[9656],{21084:function(w,x,n){n.d(x,{Z:function(){return K}});var j=n(98293),y=n(78613),C=n(85893),u=function(o){var E=o.avatar,e=o.username;return(0,C.jsx)(C.Fragment,{children:E?(0,C.jsx)(j.C,{size:"small",src:(0,C.jsx)(y.Z,{src:E,fallback:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="})}):(0,C.jsx)(j.C,{style:{color:"#f56a00",backgroundColor:"#fde3cf",verticalAlign:"middle"},size:"small",gap:1,children:e.substring(0,1).toLocaleUpperCase()})})},K=u},11911:function(w,x,n){n.d(x,{Gh:function(){return o},SC:function(){return E},Zw:function(){return y},b$:function(){return K},n6:function(){return C},pR:function(){return u},rD:function(){return j}});var j;(function(e){e.EX900005="EX900005",e.EX000102="EX000102",e.EX000202="EX000202",e.SUCCESS="200"})(j||(j={}));var y;(function(e){e.ALIYUN="aliyun",e.QI_NIU="qiniu",e.TENCENT="tencent",e.NET_EASE="netease",e.MAXMIND="maxmind"})(y||(y={}));var C;(function(e){e.ALIYUN="aliyun",e.TENCENT="tencent",e.GEE_TEST="geetest",e.HCAPTCHA="hcaptcha",e.RECAPTCHA="recaptcha"})(C||(C={}));var u;(function(e){e.STANDARD="standard",e.CUSTOM_MADE="custom_made"})(u||(u={}));var K;(function(e){e.SAML2="saml2",e.OIDC="oidc",e.CAS="cas",e.JWT="jwt",e.FORM="form",e.OAUTH2="oauth2"})(K||(K={}));var o;(function(e){e.ALLOW="ALLOW",e.DENY="DENY"})(o||(o={}));var E;(function(e){e.ROLE="ROLE",e.RESOURCE="RESOURCE",e.USER="USER",e.ORGANIZATION="ORGANIZATION",e.USER_GROUP="USER_GROUP"})(E||(E={}))},19444:function(w,x,n){n.r(x),n.d(x,{default:function(){return Je}});var j=n(11281),y=n.n(j),C=n(97983),u=n.n(C),K=n(40794),o=n.n(K),E=n(12741),e=n.n(E),l=n(137),d=n(84865),t=n(76509),v=n(85307),N=n(14459),M=n(78234),r=n(2093),g=n(2453),D=n(21687),ue=n(4393),ee=n(99138),L=n(67294),le=n(11911),ne=n(56162),X=n(25035),W=n(1914),oe=n(76521),V=n(86738),z=n(27414),a=n(85893),ce=function(Q){var m=Q.id,J=(0,L.useRef)(),I=[{title:"\u5E94\u7528",dataIndex:"appName",fixed:"left"},{title:"\u5E94\u7528\u534F\u8BAE",dataIndex:"appProtocol",align:"center",search:!1,render:function(Z,b){return(0,a.jsx)(oe.Z,{status:"success",text:b.appProtocol})}},{title:"\u6388\u6743\u65F6\u95F4",align:"center",dataIndex:"createTime",valueType:"dateTime",search:!1},{title:"\u64CD\u4F5C",valueType:"option",key:"option",fixed:"right",width:80,align:"center",render:function(Z,b){return[(0,a.jsx)(V.Z,{title:"\u60A8\u786E\u5B9A\u8981\u53D6\u6D88\u4E3B\u4F53\u6388\u6743\uFF1F\u53D6\u6D88\u6388\u6743\u540E\u4E0D\u53EF\u81EA\u52A8\u6062\u590D\u3002",placement:"bottomRight",icon:(0,a.jsx)(X.Z,{style:{color:"red"}}),onConfirm:o()(u()().mark(function U(){var f,h,i;return u()().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,(0,ne.AY)(b.id);case 2:if(f=A.sent,h=f.success,!h){A.next=8;break}return g.ZP.success("\u64CD\u4F5C\u6210\u529F"),(i=J.current)===null||i===void 0||i.reload(),A.abrupt("return");case 8:case"end":return A.stop()}},U)})),okText:"\u662F",cancelText:"\u5426",children:(0,a.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u53D6\u6D88\u6388\u6743"},"remove")},"delete")]}}];return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(W.Z,{columns:I,actionRef:J,rowSelection:{selections:[z.Z.SELECTION_ALL,z.Z.SELECTION_INVERT]},scroll:{x:700},request:ne.Je,params:{subjectId:m,subjectType:le.SC.USER_GROUP},rowKey:"id",pagination:{defaultPageSize:5},dateFormatter:"string"})})},Ee=ce,de=n(24969),q=n(26713),ae=n(98293),ge=n(78613),Qe=n(71577),fe=n(71975),ve=n(83062),me=n(12812),P=n.n(me),he=n(38755);function Be(Q){var m=(0,he.l)(function(){return P()({},".".concat(Q),P()({},"&-table",P()({},".ant-pro-card",P()({},".ant-pro-card-body",{padding:"24px 0px 0px"}))))});return{className:m}}var Ce=n(94184),Ie=n.n(Ce),ye=n(21084),$="user-group-add-member",Ne=function(Q){var m=Q.groupId,J=Q.onFinish,I=Q.onCancel,F=Q.visible,Z=(0,L.useState)([]),b=e()(Z,2),U=b[0],f=b[1],h=Be($),i=h.className,S=[{dataIndex:"username",title:"\u7528\u6237\u540D",width:130,fixed:"left",filterSearch:!0,ellipsis:!0,render:function(c,B){return(0,a.jsxs)(q.Z,{children:[(0,a.jsx)(ye.Z,{avatar:B.avatar,username:B.username}),(0,a.jsx)(ve.Z,{title:B.username,children:(0,a.jsx)("span",{children:B==null?void 0:B.username})})]})}},{title:"\u59D3\u540D",dataIndex:"fullName",align:"center",ellipsis:!0},{title:"\u624B\u673A\u53F7",dataIndex:"phone",align:"center",ellipsis:!0},{title:"\u6240\u5C5E\u7EC4\u7EC7",dataIndex:"orgDisplayPath",ellipsis:!0}];return(0,a.jsx)(fe.a,{open:F,preserve:!1,title:"\u6DFB\u52A0\u6210\u5458",width:650,drawerProps:{destroyOnClose:!0,maskClosable:!0,onClose:function(){f([]),I()}},className:i,onFinish:o()(u()().mark(function A(){var c;return u()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(!(U.length>0)){s.next=6;break}return s.next=3,J(U);case 3:return c=s.sent,c&&f([]),s.abrupt("return",c);case 6:return g.ZP.warning("\u8BF7\u9009\u62E9\u8981\u6DFB\u52A0\u7684\u7528\u6237"),s.abrupt("return",!1);case 8:case"end":return s.stop()}},A)})),children:(0,a.jsxs)("div",{className:"".concat($),children:[(0,a.jsx)(ee.Z,{banner:!0,type:"info",message:"\u52FE\u9009\u8981\u6DFB\u52A0\u7684\u7528\u6237\uFF0C\u70B9\u51FB\u786E\u8BA4"}),(0,a.jsx)(W.Z,{className:Ie()("".concat($,"-table")),rowSelection:{selections:[z.Z.SELECTION_ALL,z.Z.SELECTION_INVERT],selectedRowKeys:U,onChange:function(c){f(c)}},scroll:{x:600},search:!1,options:{setting:!0,density:!1,search:{placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D/\u59D3\u540D/\u624B\u673A\u53F7",name:"keyword"}},params:{id:m},tableAlertRender:!1,columns:S,rowKey:"id",pagination:{defaultPageSize:10,showQuickJumper:!1,showPrevNextJumpers:!1},request:l.eE})]})})},Se=function(Q){var m=Q.id,J=(0,L.useRef)(),I=(0,L.useState)(!1),F=e()(I,2),Z=F[0],b=F[1],U=[{title:"\u7528\u6237\u540D",dataIndex:"username",fixed:"left",ellipsis:!0,width:100,render:function(h,i){return(0,a.jsxs)(q.Z,{children:[i!=null&&i.avatar?(0,a.jsx)(ae.C,{size:"small",src:(0,a.jsx)(ge.Z,{src:i.avatar,fallback:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="})}):(0,a.jsx)(ae.C,{style:{color:"#f56a00",backgroundColor:"#fde3cf",verticalAlign:"middle"},size:"small",gap:1,children:i==null?void 0:i.fullName.substring(0,1).toLocaleUpperCase()}),i==null?void 0:i.fullName]})}},{title:"\u624B\u673A\u53F7",align:"center",width:200,ellipsis:!0,dataIndex:"phone",search:!1},{title:"\u90AE\u7BB1",ellipsis:!0,width:200,dataIndex:"email",search:!1},{title:"\u6240\u5C5E\u7EC4\u7EC7",dataIndex:"orgDisplayPath",width:300,search:!1,ellipsis:!0},{title:"\u64CD\u4F5C",width:100,align:"center",key:"option",fixed:"right",valueType:"option",render:function(h,i){return[(0,a.jsx)(V.Z,{title:"\u60A8\u786E\u5B9A\u8981\u79FB\u9664\u8BE5\u7528\u6237\u5417\uFF1F",placement:"bottomRight",icon:(0,a.jsx)(X.Z,{style:{color:"red"}}),onConfirm:o()(u()().mark(function S(){var A,c,B;return u()().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return T.next=2,(0,l.K8)(m,i.id);case 2:A=T.sent,c=A.success,c&&(g.ZP.success("\u64CD\u4F5C\u6210\u529F"),(B=J.current)===null||B===void 0||B.reload());case 5:case"end":return T.stop()}},S)})),okText:"\u662F",cancelText:"\u5426",children:(0,a.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u79FB\u9664\u7528\u6237"},"remove")},"delete")]}}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(W.Z,{actionRef:J,columns:U,request:l.rn,params:{id:m},rowKey:"id",scroll:{x:700},pagination:{defaultPageSize:10,showQuickJumper:!0},dateFormatter:"string",rowSelection:{selections:[z.Z.SELECTION_ALL,z.Z.SELECTION_INVERT]},tableAlertOptionRender:function(h){return(0,a.jsx)(q.Z,{size:16,children:(0,a.jsx)(V.Z,{title:"\u60A8\u786E\u5B9A\u8981\u79FB\u9664\u9009\u4E2D\u7528\u6237\u5417\uFF1F",placement:"bottomRight",icon:(0,a.jsx)(X.Z,{style:{color:"red"}}),onConfirm:o()(u()().mark(function i(){var S,A,c;return u()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,l.qD)(m,h.selectedRowKeys);case 2:if(S=s.sent,A=S.success,!A){s.next=9;break}return g.ZP.success("\u64CD\u4F5C\u6210\u529F"),h.onCleanSelected(),(c=J.current)===null||c===void 0||c.reload(),s.abrupt("return");case 9:case"end":return s.stop()}},i)})),okText:"\u662F",cancelText:"\u5426",children:(0,a.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u6279\u91CF\u79FB\u9664"},"remove")},"delete")})},toolbar:{actions:[(0,a.jsx)(Qe.Z,{type:"primary",icon:(0,a.jsx)(de.Z,{}),onClick:function(){b(!0)},children:"\u6DFB\u52A0\u6210\u5458"},"add")]}}),m&&(0,a.jsx)(Ne,{groupId:m,onFinish:function(){var f=o()(u()().mark(function h(i){var S,A,c;return u()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,l.wk)(m,i);case 2:if(S=s.sent,A=S.success,!A){s.next=9;break}return g.ZP.success("\u64CD\u4F5C\u6210\u529F"),b(!1),(c=J.current)===null||c===void 0||c.reload(),s.abrupt("return",Promise.resolve(!0));case 9:return s.abrupt("return",Promise.resolve(!1));case 10:case"end":return s.stop()}},h)}));return function(h){return f.apply(this,arguments)}}(),visible:Z,onCancel:function(){b(!1)}})]})},p;(function(Q){Q.access_policy="access-policy",Q.permission_info="permission-info",Q.member="member"})(p||(p={}));var _=n(67038),be=n(98971),je=function(){var Q=(0,be.useLocation)(),m=(0,_.parse)(Q.search),J=m,I=J.id,F=m,Z=F.tab,b=(0,L.useState)(),U=e()(b,2),f=U[0],h=U[1],i=(0,L.useState)(),S=e()(i,2),A=S[0],c=S[1],B=(0,L.useState)(!1),s=e()(B,2),T=s[0],te=s[1];(0,M.Z)(function(){if(!I){g.ZP.warning("\u672A\u9009\u62E9\u7528\u6237\u7EC4").then(),d.m.push("/account/user-group");return}if(!Z){c(p.member),d.m.push({pathname:Q.pathname,search:(0,_.stringify)({tab:p.member,id:I})});return}c(Z)}),(0,r.Z)(o()(u()().mark(function G(){var k,H,O;return u()().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(!(I&&Z)){R.next=11;break}return te(!0),R.next=4,(0,l.xc)(I);case 4:if(k=R.sent,H=k.success,O=k.result,!H){R.next=11;break}return h(O),te(!1),R.abrupt("return");case 11:case"end":return R.stop()}},G)})),[I]);var Re=(0,a.jsx)(t.X.Consumer,{children:function(k){var H=k.isMobile;return T?(0,a.jsx)(D.Z,{active:!0,paragraph:{rows:1}}):(0,a.jsxs)(v.vY,{size:"small",column:H?1:3,editable:{onSave:function(){var O=o()(u()().mark(function R(xe,se){var Ae,ie;return u()().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.next=2,(0,l.GX)(y()({},se));case 2:if(Ae=Y.sent,ie=Ae.success,!ie){Y.next=8;break}return g.ZP.success("\u64CD\u4F5C\u6210\u529F"),h(y()({},se)),Y.abrupt("return",Promise.resolve(!0));case 8:return Y.abrupt("return",Promise.resolve(!1));case 9:case"end":return Y.stop()}},R)}));function re(R,xe){return O.apply(this,arguments)}return re}()},dataSource:y()({},f),children:[(0,a.jsx)(v.vY.Item,{dataIndex:"name",label:"\u540D\u79F0",copyable:!0}),(0,a.jsx)(v.vY.Item,{dataIndex:"code",label:"\u7F16\u7801",copyable:!0,editable:!1}),(0,a.jsx)(v.vY.Item,{label:"\u5907\u6CE8",dataIndex:"remark",valueType:"textarea",fieldProps:{rows:2,maxLength:20}})]})}});return(0,a.jsxs)(N._z,{onBack:function(){d.m.push("/account/user-group")},title:T?(0,a.jsx)(D.Z.Input,{style:{width:50},active:!0,size:"small"}):f==null?void 0:f.name,content:Re,tabList:[{key:p.member,tab:"\u6210\u5458\u4FE1\u606F"},{key:p.access_policy,tab:"\u6388\u6743\u5E94\u7528"},{key:p.permission_info,tab:"\u6743\u9650\u7BA1\u7406"}],tabActiveKey:A,onTabChange:function(k){c(k),d.m.replace({pathname:Q.pathname,search:(0,_.stringify)({id:I,tab:k})})},children:[p.member===A&&(0,a.jsx)(Se,{id:I}),p.access_policy===A&&(0,a.jsx)(Ee,{id:I}),p.permission_info===A&&(0,a.jsx)(ue.Z,{children:(0,a.jsx)(ee.Z,{style:{backgroundColor:"#f1f1f2",border:"1px solid #f1f1f2"},message:"\u6682\u672A\u5B9E\u73B0"})})]})},Je=je},2093:function(w,x,n){var j=n(67294),y=n(92770),C=function(o,E,e,l){function d(t){return t instanceof e?t:new e(function(v){v(t)})}return new(e||(e=Promise))(function(t,v){function N(g){try{r(l.next(g))}catch(D){v(D)}}function M(g){try{r(l.throw(g))}catch(D){v(D)}}function r(g){g.done?t(g.value):d(g.value).then(N,M)}r((l=l.apply(o,E||[])).next())})},u=function(o,E){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},l,d,t,v;return v={next:N(0),throw:N(1),return:N(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function N(r){return function(g){return M([r,g])}}function M(r){if(l)throw new TypeError("Generator is already executing.");for(;e;)try{if(l=1,d&&(t=r[0]&2?d.return:r[0]?d.throw||((t=d.return)&&t.call(d),0):d.next)&&!(t=t.call(d,r[1])).done)return t;switch(d=0,t&&(r=[r[0]&2,t.value]),r[0]){case 0:case 1:t=r;break;case 4:return e.label++,{value:r[1],done:!1};case 5:e.label++,d=r[1],r=[0];continue;case 7:r=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!t||r[1]>t[0]&&r[1]. + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[4815],{85590:function(le,A,e){e.r(A),e.d(A,{default:function(){return se}});var G=e(97983),h=e.n(G),U=e(40794),j=e.n(U),B=e(11281),E=e.n(B),z=e(12741),P=e.n(z),S=e(137),D=e(84865),$=e(24969),L=e(25035),N=e(14459),O=e(96495),V=e(17057),I=e(71577),M=e(83062),K=e(98293),Q=e(86738),Z=e(2453),F=e(67294),X=e(25191),Y=e(37476),R=e(5966),H=e(90672),J=e(57953),W=e(88942),r=e(85893),b={labelCol:{span:4},wrapperCol:{span:19}},k=function(s){var m=(0,W.Z)(),i=P()(m,1),p=i[0],c=s.visible,u=s.onFinish,y=s.onCancel,l=(0,F.useState)(!1),t=P()(l,2),a=t[0],o=t[1];return(0,F.useEffect)(function(){c&&p.setFieldsValue({code:(0,X.MX)(9)})}),(0,r.jsx)(Y.Y,E()(E()({title:"\u65B0\u5EFA\u7528\u6237\u7EC4",form:p,scrollToFirstError:!0},b),{},{layout:"horizontal",labelAlign:"right",preserve:!1,width:"500px",open:c,modalProps:{maskClosable:!0,destroyOnClose:!0,onCancel:y},onFinish:function(){var C=j()(h()().mark(function d(g){var n;return h()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return o(!0),x.next=3,u(g);case 3:return n=x.sent,o(!1),x.abrupt("return",!!n);case 6:case"end":return x.stop()}},d)}));return function(d){return C.apply(this,arguments)}}(),children:(0,r.jsxs)(J.Z,{spinning:a,children:[(0,r.jsx)(R.Z,{name:"name",label:"\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u7EC4\u540D\u79F0",rules:[{required:!0,message:"\u7528\u6237\u7EC4\u540D\u79F0\u4E3A\u5FC5\u586B\u9879"}]}),(0,r.jsx)(R.Z,{name:"code",label:"\u7F16\u7801",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u7EC4\u7F16\u7801",rules:[{required:!0,message:"\u7528\u6237\u7EC4\u7F16\u7801\u4E3A\u5FC5\u586B\u9879"}]}),(0,r.jsx)(H.Z,{name:"remark",fieldProps:{rows:2,maxLength:20,showCount:!0},placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F",label:"\u5907\u6CE8"})]})}))},w=e(12812),v=e.n(w),q=e(46986),_=e(38755),ee=q.ZP.ConfigContext;function re(){var s=(0,F.useContext)(ee),m=s.getPrefixCls,i=".".concat(m()),p=(0,_.l)(function(c){var u,y=c.token;return u={},v()(u,".user-group-remark",{boxSizing:"border-box",width:"100%",margin:"0",color:"#00000073",fontSize:"14px"}),v()(u,".ant-pro-card-title",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),v()(u,".ant-pro-card-extra",{flex:"none"}),v()(u,".ant-pro-card-actions",v()({},`> li, + `.concat(i,"-space-item"),{margin:"5px 0"})),v()(u,"".concat(i,"-list-item-meta-avatar"),{width:"32px !important",height:"32px !important",marginRight:"16px"}),v()(u,"".concat(i,"-avatar-circle"),{verticalAlign:"middle",backgroundColor:y.colorPrimary}),u});return{className:p}}var ae=e(94184),ne=e.n(ae),te=V.Z.Paragraph,T=function(m){D.m.push("/account/user-group/detail?id=".concat(m,"&tab=member"))},ue=function(){var s=(0,F.useRef)(),m=(0,F.useState)(!1),i=P()(m,2),p=i[0],c=i[1],u=re(),y=u.className;return(0,r.jsx)("div",{className:ne()(y),children:(0,r.jsxs)(N._z,{content:"\u7528\u6237\u7EC4\u662F\u7528\u6237\u7684\u96C6\u5408\uFF0C\u5C06\u5177\u6709\u76F8\u540C\u804C\u80FD\u7684\u7528\u6237\u6DFB\u52A0\u5230\u4E00\u8D77\uFF0C\u5373\u5F62\u6210\u7528\u6237\u7EC4\u3002\u5C06\u6743\u9650\u6388\u6743\u5230\u7528\u6237\u7EC4\u540E\uFF0C\u7528\u6237\u7EC4\u5185\u7684\u7528\u6237\u90FD\u5C06\u7EE7\u627F\u8BE5\u6743\u9650\uFF0C\u56E0\u6B64\uFF0C\u7528\u6237\u7EC4\u5341\u5206\u9002\u5408\u7528\u4E8E\u6279\u91CF\u6388\u6743\u3002",children:[(0,r.jsx)(O.Rs,{actionRef:s,showActions:"always",search:{},pagination:{size:"small",defaultPageSize:10,showSizeChanger:!1},rowKey:"id",toolBarRender:function(){return[(0,r.jsxs)(I.Z,{type:"primary",onClick:function(){c(!0)},children:[(0,r.jsx)($.Z,{}),"\u65B0\u589E\u7528\u6237\u7EC4"]},"add")]},grid:{gutter:8,xs:1,sm:1,md:3,lg:3,xl:4,xxl:5},headerTitle:"\u7528\u6237\u7EC4\u5217\u8868",form:{syncToUrl:function(t,a){return a==="get"?E()({},t):t}},metas:{title:{dataIndex:"name",title:"\u7528\u6237\u7EC4\u540D\u79F0",render:function(t,a){return(0,r.jsx)(M.Z,{placement:"topLeft",title:a.name,children:(0,r.jsx)("a",{onClick:function(){T(a.id)},children:t})})}},avatar:{search:!1,render:function(t,a){return(0,r.jsx)(K.C,{children:a.name.substring(0,1).toLocaleUpperCase()})}},content:{search:!1,dataIndex:"remark",render:function(t,a){return(0,r.jsx)(te,{className:"user-group-remark",ellipsis:{tooltip:a.remark},title:a.remark,children:a.remark?a.remark:(0,r.jsx)(r.Fragment,{children:"\xA0"})})}},actions:{cardActionProps:"actions",render:function(t,a){return[(0,r.jsx)("a",{onClick:function(){T(a.id)},children:"\u8BE6\u60C5"},"member"),(0,r.jsx)(Q.Z,{title:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u7528\u6237\u7EC4\u5417\uFF1F",placement:"bottomRight",icon:(0,r.jsx)(L.Z,{style:{color:"red"}}),onConfirm:j()(h()().mark(function o(){var C,d,g;return h()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,(0,S.AG)(a.id);case 2:if(C=f.sent,d=C.success,!d){f.next=8;break}return Z.ZP.success("\u64CD\u4F5C\u6210\u529F"),(g=s.current)===null||g===void 0||g.reload(),f.abrupt("return");case 8:case"end":return f.stop()}},o)})),okText:"\u662F",cancelText:"\u5426",children:(0,r.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u5220\u9664"},"remove")},"delete")]}}},request:S.S4}),(0,r.jsx)(k,{visible:p,onFinish:function(){var l=j()(h()().mark(function t(a){var o,C,d;return h()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,(0,S.wZ)(a);case 3:if(C=n.sent,d=C.success,(o=s.current)===null||o===void 0||o.reload(),!d){n.next=10;break}return Z.ZP.success("\u64CD\u4F5C\u6210\u529F"),c(!1),n.abrupt("return",!0);case 10:return n.abrupt("return",!1);case 13:return n.prev=13,n.t0=n.catch(0),n.abrupt("return",!1);case 16:case"end":return n.stop()}},t,null,[[0,13]])}));return function(t){return l.apply(this,arguments)}}(),onCancel:function(){c(!1)}})]})})},se=ue}}]); diff --git a/eiam-console/src/main/resources/fe/p__app__AppConfig__index.22328e6d.async.js b/eiam-console/src/main/resources/fe/p__app__AppConfig__index.22328e6d.async.js new file mode 100644 index 00000000..82da0e08 --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__app__AppConfig__index.22328e6d.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[3091],{11911:function(hr,Be,S){S.d(Be,{Gh:function(){return k},SC:function(){return Ie},Zw:function(){return N},b$:function(){return Pe},n6:function(){return Ze},pR:function(){return a},rD:function(){return Ae}});var Ae;(function(p){p.EX900005="EX900005",p.EX000102="EX000102",p.EX000202="EX000202",p.SUCCESS="200"})(Ae||(Ae={}));var N;(function(p){p.ALIYUN="aliyun",p.QI_NIU="qiniu",p.TENCENT="tencent",p.NET_EASE="netease",p.MAXMIND="maxmind"})(N||(N={}));var Ze;(function(p){p.ALIYUN="aliyun",p.TENCENT="tencent",p.GEE_TEST="geetest",p.HCAPTCHA="hcaptcha",p.RECAPTCHA="recaptcha"})(Ze||(Ze={}));var a;(function(p){p.STANDARD="standard",p.CUSTOM_MADE="custom_made"})(a||(a={}));var Pe;(function(p){p.SAML2="saml2",p.OIDC="oidc",p.CAS="cas",p.JWT="jwt",p.FORM="form",p.OAUTH2="oauth2"})(Pe||(Pe={}));var k;(function(p){p.ALLOW="ALLOW",p.DENY="DENY"})(k||(k={}));var Ie;(function(p){p.ROLE="ROLE",p.RESOURCE="RESOURCE",p.USER="USER",p.ORGANIZATION="ORGANIZATION",p.USER_GROUP="USER_GROUP"})(Ie||(Ie={}))},71493:function(hr,Be,S){S.r(Be),S.d(Be,{default:function(){return Ja}});var Ae=S(11281),N=S.n(Ae),Ze=S(97983),a=S.n(Ze),Pe=S(40794),k=S.n(Pe),Ie=S(12741),p=S.n(Ie),De=S(84865),gr=S(45742),Fr=S(69243),Cr=S(62548),xr=S(56034),Sr=S(14459),Q=S(2093),K=S(2453),yr=S(71230),Xe=S(15746),br=S(68508),R=S(67294),jr=S(64129),Fe=S.n(jr),$e=S(137),Er=S(69606),e=S(85893),Ar=function(r){var n=(0,R.useState)(),y=p()(n,2),I=y[0],j=y[1];(0,Q.Z)(k()(a()().mark(function D(){var u,s,t;return a()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(0,$e.mB)();case 2:if(g.t0=g.sent,g.t0){g.next=5;break}g.t0={};case 5:u=g.t0,s=u.success,t=u.result,s&&t&&j([t]);case 9:case"end":return g.stop()}},D)})),[]);var b=function(){var D=k()(a()().mark(function u(s){var t,E,g,c;return a()().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return t=s[s.length-1],t.loading=!0,Z.next=4,(0,$e.z3)(t.id);case 4:E=Z.sent,g=E.success,c=E.result,g&&c&&(t.children=Fe()(c),j(Fe()(I))),t.loading=!1;case 9:case"end":return Z.stop()}},u)}));return function(s){return D.apply(this,arguments)}}();return(0,e.jsx)(Er.Z,N()({fieldNames:{value:"id",label:"name"},options:I,loadData:b,changeOnSelect:!0,showCheckedStrategy:"SHOW_CHILD"},r))},Zr=Ar,Je=Zr,Oe=S(34041),re=S(57953),me=S(96486),Pr=Oe.Z.Option,Qe,Ir=function(){var T=k()(a()().mark(function r(n){var y,I;return a()().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return Qe=n,b.next=3,(0,$e.S4)({name:n});case 3:if(y=b.sent,I=y.data,Qe!==n){b.next=7;break}return b.abrupt("return",I==null?void 0:I.map(function(D){return{value:D.id,label:"".concat(D.name)}}));case 7:return b.abrupt("return",[]);case 8:case"end":return b.stop()}},r)}));return function(n){return T.apply(this,arguments)}}(),wr=function(r){var n=(0,R.useState)([]),y=p()(n,2),I=y[0],j=y[1],b=(0,R.useState)(!1),D=p()(b,2),u=D[0],s=D[1],t=(0,R.useRef)(0),E=(0,R.useMemo)(function(){var A=function(i){t.current+=1;var f=t.current;j([]),s(!0),Ir(i).then(function(d){f===t.current&&(j(d),s(!1))})};return(0,me.debounce)(A,600)},[]),g=function(){var A=k()(a()().mark(function Z(i){return a()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:i?E(i):j([]);case 1:case"end":return d.stop()}},Z)}));return function(i){return A.apply(this,arguments)}}(),c=I.map(function(A){return(0,e.jsx)(Pr,{value:A.value,children:A.label},A.value)});return(0,e.jsx)(Oe.Z,N()(N()({showSearch:!0,defaultActiveFirstOption:!1,showArrow:!1,filterOption:!1,onSearch:g,allowClear:!0,notFoundContent:u?(0,e.jsx)(re.Z,{size:"small"}):null},r),{},{children:c}))},Rr=wr,qe=Rr,Tr=Oe.Z.Option,_e,Br=function(){var T=k()(a()().mark(function r(n){var y,I;return a()().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return _e=n,b.next=3,(0,$e.lE)({username:n});case 3:if(y=b.sent,I=y.data,_e!==n){b.next=7;break}return b.abrupt("return",I==null?void 0:I.map(function(D){return{value:D.id,label:"".concat(D.username)}}));case 7:return b.abrupt("return",[]);case 8:case"end":return b.stop()}},r)}));return function(n){return T.apply(this,arguments)}}(),Dr=function(r){var n=(0,R.useState)([]),y=p()(n,2),I=y[0],j=y[1],b=(0,R.useState)(!1),D=p()(b,2),u=D[0],s=D[1],t=(0,R.useRef)(0),E=(0,R.useMemo)(function(){var A=function(i){t.current+=1;var f=t.current;j([]),s(!0),Br(i).then(function(d){f===t.current&&(j(d),s(!1))})};return(0,me.debounce)(A,600)},[]),g=function(){var A=k()(a()().mark(function Z(i){return a()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:i?E(i):j([]);case 1:case"end":return d.stop()}},Z)}));return function(i){return A.apply(this,arguments)}}(),c=I.map(function(A){return(0,e.jsx)(Tr,{value:A.value,children:A.label},A.value)});return(0,e.jsx)(Oe.Z,N()(N()({showSearch:!0,defaultActiveFirstOption:!1,showArrow:!1,filterOption:!1,onSearch:g,allowClear:!0,notFoundContent:u?(0,e.jsx)(re.Z,{size:"small"}):null},r),{},{children:c}))},$r=Dr,Ne=$r,X=S(11911),U=S(56162),Ce=S(25035),ye=S(24969),z=S(5966),we=S(1914),er=S(37476),Or=S(86615),xe=S(97462),Se=S(86738),H=S(43825),fe=S(71577),ve=S(27414),Lr=function(T){var r=(0,R.useRef)(),n=T.appId,y=[{title:"\u6388\u6743\u4E3B\u4F53",dataIndex:"subjectName",ellipsis:!0,fixed:"left"},{title:"\u4E3B\u4F53\u7C7B\u578B",dataIndex:"subjectType",valueType:"select",ellipsis:!0,valueEnum:{USER:{text:"\u7528\u6237"},USER_GROUP:{text:"\u7528\u6237\u7EC4"},ORGANIZATION:{text:"\u7EC4\u7EC7\u673A\u6784"}}},{title:"\u6388\u6743\u65F6\u95F4",align:"center",ellipsis:!0,dataIndex:"createTime",valueType:"dateTime",search:!1},{title:"\u64CD\u4F5C",valueType:"option",key:"option",width:80,align:"center",fixed:"right",render:function(b,D){return[(0,e.jsx)(Se.Z,{title:"\u60A8\u786E\u5B9A\u8981\u53D6\u6D88\u4E3B\u4F53\u6388\u6743\uFF1F\u53D6\u6D88\u6388\u6743\u540E\u4E0D\u53EF\u81EA\u52A8\u6062\u590D\u3002",placement:"bottomRight",icon:(0,e.jsx)(Ce.Z,{style:{color:"red"}}),onConfirm:k()(a()().mark(function u(){var s,t,E;return a()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,U.AY)(D.id);case 2:if(s=c.sent,t=s.success,!t){c.next=8;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),(E=r.current)===null||E===void 0||E.reload(),c.abrupt("return");case 8:case"end":return c.stop()}},u)})),okText:"\u662F",cancelText:"\u5426",children:(0,e.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u53D6\u6D88\u6388\u6743"},"remove")},"delete")]}}],I=function(){var b=H.Z.useForm(),D=p()(b,1),u=D[0];return(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(er.Y,{title:"\u6DFB\u52A0\u6388\u6743",width:600,form:u,scrollToFirstError:!0,trigger:(0,e.jsx)(fe.Z,{icon:(0,e.jsx)(ye.Z,{}),type:"primary",children:"\u6DFB\u52A0\u6388\u6743"},"button"),layout:"horizontal",labelCol:{span:4},wrapperCol:{span:20},autoFocusFirstInput:!0,preserve:!1,modalProps:{forceRender:!0,destroyOnClose:!0,onCancel:function(){u.resetFields()}},onFinish:function(){var s=k()(a()().mark(function t(E){var g,c,A;return a()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,U.gI)(N()({appId:n},E));case 2:if(g=i.sent,c=g.success,!c){i.next=8;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),(A=r.current)===null||A===void 0||A.reload(),i.abrupt("return",!0);case 8:return K.ZP.error("\u64CD\u4F5C\u5931\u8D25"),i.abrupt("return",!1);case 10:case"end":return i.stop()}},t)}));return function(t){return s.apply(this,arguments)}}(),children:[(0,e.jsx)(Or.Z.Group,{name:"subjectType",label:"\u6388\u6743\u7C7B\u578B",initialValue:X.SC.USER,fieldProps:{onChange:function(){u.resetFields(["subjectIds"]),u.setFieldsValue({effect:X.Gh.ALLOW})}},options:[{value:X.SC.USER,label:"\u7528\u6237"},{value:X.SC.USER_GROUP,label:"\u7528\u6237\u7EC4"},{value:X.SC.ORGANIZATION,label:"\u7EC4\u7EC7\u673A\u6784"}],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6388\u6743\u7C7B\u578B"}]}),(0,e.jsx)(z.Z,{name:"effect",hidden:!0}),(0,e.jsx)(xe.Z,{name:["subjectType"],children:function(t){var E=t.subjectType;return E===X.SC.USER?(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(H.Z.Item,{label:"\u6388\u6743\u7528\u6237",name:"subjectIds",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6388\u6743\u7528\u6237"}],children:(0,e.jsx)(Ne,{placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u641C\u7D22\u7528\u6237",mode:"multiple"})})}):E===X.SC.USER_GROUP?(0,e.jsx)(H.Z.Item,{label:"\u6388\u6743\u5206\u7EC4",name:"subjectIds",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6388\u6743\u5206\u7EC4"}],children:(0,e.jsx)(qe,{placeholder:"\u8BF7\u9009\u62E9\u6388\u6743\u5206\u7EC4",mode:"multiple"})}):E===X.SC.ORGANIZATION?(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(H.Z.Item,{label:"\u6388\u6743\u7EC4\u7EC7",name:"subjectIds",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u9009\u62E9\u7EC4\u7EC7\u8282\u70B9"}],children:(0,e.jsx)(Je,{placeholder:"\u9009\u62E9\u7EC4\u7EC7\u8282\u70B9"})})}):(0,e.jsx)(e.Fragment,{})}})]})})};return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(we.Z,{columns:y,actionRef:r,scroll:{x:700},rowSelection:{selections:[ve.Z.SELECTION_ALL,ve.Z.SELECTION_INVERT]},request:U.Je,params:{appId:n},rowKey:"id",search:{},options:!1,pagination:{defaultPageSize:5},style:{height:"calc(100vh - 190px)",overflow:"auto"},cardProps:{style:{minHeight:"100%"}},dateFormatter:"string",toolBarRender:function(){return[(0,e.jsx)(I,{},"create")]}})})},kr=Lr,Ge=S(38345),ue=S(99138),Mr=function(){return(0,e.jsx)(Ge.Z,{style:{height:"calc(100vh - 190px)",overflow:"auto"},bodyStyle:{height:"100%"},children:(0,e.jsx)(ue.Z,{style:{backgroundColor:"#f1f1f2",border:"1px solid #f1f1f2"},message:"\u6682\u672A\u5B9E\u73B0"})})},Ur=function(T){var r=(0,R.useRef)(),n=T.appId,y=[{title:"\u7CFB\u7EDF\u7528\u6237",dataIndex:"username",ellipsis:!0,fixed:"left"},{title:"\u5E94\u7528\u8D26\u6237",dataIndex:"account",ellipsis:!0},{title:"\u6DFB\u52A0\u65F6\u95F4",dataIndex:"createTime",valueType:"dateTime",search:!1,ellipsis:!0},{title:"\u64CD\u4F5C",valueType:"option",key:"option",width:80,align:"center",fixed:"right",render:function(b,D){return[(0,e.jsx)(Se.Z,{title:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u6B64\u5E94\u7528\u8D26\u6237\uFF1F",placement:"bottomRight",icon:(0,e.jsx)(Ce.Z,{style:{color:"red"}}),onConfirm:k()(a()().mark(function u(){var s,t,E;return a()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,U.Zd)(D.id);case 2:if(s=c.sent,t=s.success,!t){c.next=8;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),(E=r.current)===null||E===void 0||E.reload(),c.abrupt("return");case 8:case"end":return c.stop()}},u)})),okText:"\u662F",cancelText:"\u5426",children:(0,e.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u5220\u9664"},"remove")},"delete")]}}],I=function(){var b=H.Z.useForm(),D=p()(b,1),u=D[0];return(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(er.Y,{title:"\u6DFB\u52A0\u5E94\u7528\u8D26\u6237",width:600,form:u,scrollToFirstError:!0,trigger:(0,e.jsx)(fe.Z,{icon:(0,e.jsx)(ye.Z,{}),type:"primary",children:"\u6DFB\u52A0\u5E94\u7528\u8D26\u6237"},"button"),layout:"horizontal",labelCol:{span:4},wrapperCol:{span:20},autoFocusFirstInput:!0,preserve:!1,modalProps:{destroyOnClose:!0,onCancel:function(){u.resetFields()}},onFinish:function(){var s=k()(a()().mark(function t(E){var g,c,A;return a()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,U.o1)(N()({appId:n},E));case 2:if(g=i.sent,c=g.success,!c){i.next=8;break}return K.ZP.success("\u6DFB\u52A0\u6210\u529F"),(A=r.current)===null||A===void 0||A.reload(),i.abrupt("return",!0);case 8:return K.ZP.error("\u6DFB\u52A0\u5931\u8D25"),i.abrupt("return",!1);case 10:case"end":return i.stop()}},t)}));return function(t){return s.apply(this,arguments)}}(),children:[(0,e.jsx)(H.Z.Item,{label:"\u7CFB\u7EDF\u7528\u6237",name:"userId",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7528\u6237"}],children:(0,e.jsx)(Ne,{placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u3001\u624B\u673A\u6216\u90AE\u7BB1\u641C\u7D22\u7528\u6237"})}),(0,e.jsx)(z.Z,{label:"\u5E94\u7528\u8EAB\u4EFD",name:"account",placeholder:"\u8BF7\u8F93\u5165\u8D26\u6237\u8BBF\u95EE\u5E94\u7528\u65F6\u6240\u4F7F\u8EAB\u4EFD",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u6237\u8BBF\u95EE\u5E94\u7528\u65F6\u6240\u4F7F\u8EAB\u4EFD"}]})]})})};return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(ue.Z,{banner:!0,type:"info",message:" \u5982\u679C\u60A8\u914D\u7F6E\u4F7F\u7528\u3010\u7CFB\u7EDF\u8D26\u6237\u540D\u3011\uFF0C\u5E94\u7528\u8D26\u6237\u5C5E\u6027\u914D\u7F6E\u540E\u4E0D\u4F1A\u751F\u6548\uFF1B\u5982\u9700\u53D8\u66F4\uFF0C\u8BF7\u5728 \u534F\u8BAE\u914D\u7F6E \u66F4\u6539\u914D\u7F6E\u3002",style:{marginBottom:16}}),(0,e.jsx)(we.Z,{columns:y,actionRef:r,scroll:{x:700},rowSelection:{selections:[ve.Z.SELECTION_ALL,ve.Z.SELECTION_INVERT]},request:U.IC,params:{appId:n},rowKey:"id",search:{},style:{height:"calc(100vh - 244px)",overflow:"auto"},cardProps:{style:{minHeight:"100%"}},options:!1,pagination:{defaultPageSize:5},dateFormatter:"string",toolBarRender:function(){return[(0,e.jsx)(I,{},"create")]}})]})},Nr=Ur,ce=S(85307),rr=S(21687),ze=S(98971),Le=S(67038),Gr=S(12812),se=S.n(Gr),Ve=S(46986),ar=S(38755),zr=Ve.ZP.ConfigContext;function Vr(T){var r=(0,R.useContext)(zr),n=r.getPrefixCls,y=".".concat(n()),I=(0,ar.l)(function(){return se()({},".".concat(T,"-descriptions"),se()({},"".concat(y,"-descriptions-small ").concat(y,"-descriptions-row > th, ").concat(y,"-descriptions-small ").concat(y,"-descriptions-row > td"),{"padding-bottom":"16px"}))});return{className:I}}var Kr=S(94184),Re=S.n(Kr),nr="user-detail-info",Hr=function(T){var r=T.appId,n=(0,R.useState)(!0),y=p()(n,2),I=y[0],j=y[1],b=(0,R.useState)(),D=p()(b,2),u=D[0],s=D[1],t=(0,ze.useLocation)(),E=(0,Le.parse)(t.search),g=Vr(nr),c=g.className;(0,Q.Z)(k()(a()().mark(function Z(){var i,f,d;return a()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return j(!0),F.next=3,(0,U.Mq)(r);case 3:i=F.sent,f=i.result,d=i.success,d&&f&&s(f),j(!1);case 8:case"end":return F.stop()}},Z)})),[]);var A=function(){var Z=k()(a()().mark(function i(f,d){var o,F;return a()().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,(0,U.KT)({id:d.id,name:d.name,remark:d.remark});case 2:if(o=C.sent,F=o.success,!F){C.next=9;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),s(N()({},d)),ze.history.replace("/app/config?id=".concat(E.id,"&name=").concat(d.name,"&type=").concat(E.type)),C.abrupt("return",Promise.resolve(!0));case 9:return C.abrupt("return",Promise.resolve(!1));case 10:case"end":return C.stop()}},i)}));return function(f,d){return Z.apply(this,arguments)}}();return(0,e.jsx)(Ge.Z,{title:"\u57FA\u672C\u914D\u7F6E",style:{height:"100%"},headerBordered:!0,className:c,children:(0,e.jsx)(rr.Z,{loading:I,active:!0,paragraph:{rows:5},children:(0,e.jsx)("div",{className:Re()("".concat(nr,"-descriptions")),children:(0,e.jsxs)(ce.vY,{size:"small",column:2,dataSource:(0,me.omit)(u,"config"),editable:{onSave:A},children:[(0,e.jsx)(ce.vY.Item,{dataIndex:"name",label:"\u5E94\u7528\u540D\u79F0",copyable:!1,formItemProps:{rules:[{required:!0,message:"\u5E94\u7528\u540D\u79F0\u4E3A\u5FC5\u586B\u9879"}]}}),(0,e.jsx)(ce.vY.Item,{dataIndex:"enabled",label:"\u5E94\u7528\u72B6\u6001",editable:!1,valueEnum:{true:{text:"\u6B63\u5E38",status:"Success"},false:{text:"\u7981\u7528",status:"Error"}}}),(0,e.jsx)(ce.vY.Item,{dataIndex:"type",label:"\u5E94\u7528\u7C7B\u578B",editable:!1,valueEnum:{custom_made:{text:"\u5B9A\u5236\u5E94\u7528"},standard:{text:"\u6807\u51C6\u5E94\u7528"},self_developed:{text:"\u81EA\u7814\u5E94\u7528"}}}),(0,e.jsx)(ce.vY.Item,{dataIndex:"protocolName",label:"\u5E94\u7528\u534F\u8BAE",editable:!1}),(u==null?void 0:u.clientId)&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(ce.vY.Item,{dataIndex:"clientId",label:"\u5BA2\u6237\u7AEF ID",valueType:"text",editable:!1,copyable:!0}),(0,e.jsx)(ce.vY.Item,{dataIndex:"clientSecret",label:"\u5BA2\u6237\u7AEF\u79D8\u94A5",valueType:"password",editable:!1,copyable:!0})]}),(0,e.jsx)(ce.vY.Item,{dataIndex:"createTime",label:"\u521B\u5EFA\u65F6\u95F4",valueType:"dateTime",copyable:!1,editable:!1}),(0,e.jsx)(ce.vY.Item,{dataIndex:"remark",label:"\u5907\u6CE8",valueType:"textarea",fieldProps:{rows:2,maxLength:20},copyable:!1})]})})})})},Y;(function(T){T.BASIC="basic",T.PROTOCOL_CONFIG="protocol_config",T.ACCOUNT_SYNC="account_sync",T.ACCESS_POLICY="access_policy",T.LOGIN_ACCESS="login_access",T.PERMISSION_RESOURCE="permission_resource",T.PERMISSION_ROLE="permission_role",T.PERMISSION_POLICY="permission_policy",T.APP_PERMISSION="app_permission",T.APP_ACCOUNT="app_account"})(Y||(Y={}));var he;(function(T){T.APP="only_app_init_sso",T.PORTAL_OR_APP="portal_or_app_init_sso"})(he||(he={}));var ge;(function(T){T.AUTHORIZATION="authorization",T.ALL_ACCESS="all_access"})(ge||(ge={}));var ke;(function(T){T.SAML_SIGN="saml_sign"})(ke||(ke={}));var q=S(15045),Me=S(4393),ee=S(96074),tr=S(71975),W=S(63434),Yr=q.Z.Panel,Wr=function(r){var n=(0,R.useState)(!1),y=p()(n,2),I=y[0],j=y[1],b=(0,R.useState)(),D=p()(b,2),u=D[0],s=D[1],t=(0,R.useState)([]),E=p()(t,2),g=E[0],c=E[1],A=r.open,Z=r.appId,i=r.onCancel,f=r.subjectType;(0,Q.Z)(k()(a()().mark(function o(){var F,v;return a()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(!A){x.next=8;break}return j(!0),x.next=4,(0,U.Sf)({appId:Z});case 4:F=x.sent,v=F.result,s(v),j(!1);case 8:case"end":return x.stop()}},o)})),[A,f]);var d=function(F){if(F.target.checked){c([].concat(Fe()(g),[F.target.value]));return}c(g==null?void 0:g.filter(function(v){return v!==F.target.value}))};return(0,e.jsx)(tr.a,{title:"\u6388\u6743",width:650,layout:"horizontal",labelCol:{span:4},open:A,wrapperCol:{span:19},onFinish:function(F){return j(!0),console.log("roles",F.roles),console.log("subjectIds",F.subjectIds),console.log("permissions",g),c([]),j(!1),Promise.resolve(!1)},drawerProps:{destroyOnClose:!0,onClose:function(F){c([]),i(F)}},children:(0,e.jsxs)(re.Z,{spinning:I,children:[(0,e.jsx)(ue.Z,{message:"\u652F\u6301\u4E24\u79CD\u6743\u9650\u6A21\u578B\uFF1A\u57FA\u4E8E\u89D2\u8272\u7684\u8BBF\u95EE\u63A7\u5236\uFF08RBAC\uFF09\u548C\u57FA\u4E8E\u5C5E\u6027\u7684\u8BBF\u95EE\u63A7\u5236\uFF08ABAC\uFF09"}),(0,e.jsx)("br",{}),f===X.SC.USER&&(0,e.jsx)(H.Z.Item,{label:"\u6388\u6743\u7528\u6237",name:"subjectIds",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6388\u6743\u7528\u6237"}],children:(0,e.jsx)(Ne,{placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u3001\u624B\u673A\u6216\u90AE\u7BB1\u641C\u7D22\u7528\u6237",mode:"multiple"})}),f===X.SC.USER_GROUP&&(0,e.jsx)(H.Z.Item,{label:"\u6388\u6743\u7528\u6237\u7EC4",name:"subjectIds",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6388\u6743\u5206\u7EC4"}],children:(0,e.jsx)(qe,{placeholder:"\u8BF7\u9009\u62E9\u6388\u6743\u5206\u7EC4",mode:"multiple"})}),f===X.SC.ORGANIZATION&&(0,e.jsx)(H.Z.Item,{label:"\u6388\u6743\u7EC4\u7EC7",name:"subjectIds",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u9009\u62E9\u7EC4\u7EC7\u8282\u70B9"}],children:(0,e.jsx)(Je,{placeholder:"\u9009\u62E9\u7EC4\u7EC7\u8282\u70B9"})}),(0,e.jsxs)(Me.Z,{bodyStyle:{paddingBottom:0,paddingTop:0},children:[(0,e.jsx)(ee.Z,{orientation:"left",children:"\u5E94\u7528\u89D2\u8272"}),(0,e.jsx)(W.Z.Group,{name:"roles",layout:"vertical",options:["\u8682\u8681\u533A\u5757\u94FEBaaS\u5E73\u53F0-\u7BA1\u7406\u5458","\u5BA1\u8BA1\u7BA1\u7406\u5458","Captain-\u96C6\u7FA4\u6269\u5BB9\u5DE5\u7A0B\u5E08","Captain-\u96C6\u7FA4\u8FD0\u7EF4\u5DE5\u7A0B\u5E08","Captain-\u96C6\u7FA4\u7BA1\u7406\u5458","Captain-\u8D85\u7EA7\u7BA1\u7406\u5458","\u51FD\u6570\u8BA1\u7B97\u7BA1\u7406\u5458","\u51FD\u6570\u8BA1\u7B97\u89C2\u5BDF\u8005"]})]}),(0,e.jsx)("br",{}),(0,e.jsxs)(Me.Z,{bodyStyle:{paddingBottom:0,paddingTop:0},children:[(0,e.jsx)(ee.Z,{orientation:"left",children:"\u5E94\u7528\u8D44\u6E90"}),u==null?void 0:u.map(function(o){var F,v,C,x,m;return(0,e.jsxs)("div",{children:[(0,e.jsx)(q.Z,{bordered:!1,children:(0,e.jsxs)(Yr,{header:o.name,children:[o.menus.length>0&&(0,e.jsx)(W.Z.Group,{name:"menu_".concat(o.id),label:"\u83DC\u5355\u6743\u9650",layout:"vertical",options:(F=o.menus)===null||F===void 0?void 0:F.map(function(l){return{label:l.name,value:l.id,onChange:d}})}),o.buttons.length>0&&(0,e.jsx)(W.Z.Group,{name:"button_".concat(o.id),label:"\u6309\u94AE\u6743\u9650",layout:"vertical",options:(v=o.buttons)===null||v===void 0?void 0:v.map(function(l){return{label:l.name,value:l.id,onChange:d}})}),o.apis.length>0&&(0,e.jsx)(W.Z.Group,{name:"api_".concat(o.id),layout:"vertical",label:"\u63A5\u53E3\u6743\u9650",options:(C=o.apis)===null||C===void 0?void 0:C.map(function(l){return{label:l.name,value:l.id,onChange:d}})}),o.datas.length>0&&(0,e.jsx)(W.Z.Group,{name:"data_".concat(o.id),layout:"vertical",label:"\u6570\u636E\u6743\u9650",options:(x=o.apis)===null||x===void 0?void 0:x.map(function(l){return{label:l.name,value:l.id,onChange:d}})}),o.others.length>0&&(0,e.jsx)(W.Z.Group,{name:"other_".concat(o.id),layout:"vertical",label:"\u5176\u4ED6\u6743\u9650",options:(m=o.apis)===null||m===void 0?void 0:m.map(function(l){return{label:l.name,value:l.id,onChange:d}})})]},o.id)},o.id),(0,e.jsx)("br",{})]},o.id)})]})]})},"create_permission")},Xr=Wr,Jr=q.Z.Panel,Qr=function(r){var n=H.Z.useForm(),y=p()(n,1),I=y[0],j=(0,R.useState)(!1),b=p()(j,2),D=b[0],u=b[1],s=(0,R.useState)(),t=p()(s,2),E=t[0],g=t[1],c=r.open,A=r.onCancel,Z=r.subjectType,i=r.subjectId,f=(0,R.useState)([]),d=p()(f,2),o=d[0],F=d[1];(0,Q.Z)(k()(a()().mark(function C(){return a()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:c&&(u(!0),console.log(i),g([]),u(!1));case 1:case"end":return m.stop()}},C)})),[c,Z,i]);var v=function(x){if(x.target.checked){F([].concat(Fe()(o),[x.target.value]));return}F(o==null?void 0:o.filter(function(m){return m!==x.target.value}))};return(0,e.jsx)(tr.a,{title:"\u6388\u6743",width:650,layout:"horizontal",labelCol:{span:4},wrapperCol:{span:19},form:I,scrollToFirstError:!0,trigger:(0,e.jsx)("a",{type:"primary",children:"\u4FEE\u6539"},"update"),onFinish:function(x){return u(!0),console.log("roles",x.roles),console.log("permissions",o),F([]),u(!1),Promise.resolve(!1)},drawerProps:{afterOpenChange:function(x){},destroyOnClose:!0,onClose:function(x){F([]),A(x)}},children:(0,e.jsxs)(re.Z,{spinning:D,children:[(0,e.jsx)(ue.Z,{message:"\u652F\u6301\u4E24\u79CD\u6743\u9650\u6A21\u578B\uFF1A\u57FA\u4E8E\u89D2\u8272\u7684\u8BBF\u95EE\u63A7\u5236\uFF08RBAC\uFF09\u548C\u57FA\u4E8E\u5C5E\u6027\u7684\u8BBF\u95EE\u63A7\u5236\uFF08ABAC\uFF09"}),(0,e.jsx)("br",{}),(0,e.jsxs)(Me.Z,{bodyStyle:{paddingBottom:0,paddingTop:0},children:[(0,e.jsx)(ee.Z,{orientation:"left",children:"\u5E94\u7528\u89D2\u8272"}),(0,e.jsx)(W.Z.Group,{name:"roles",layout:"vertical",options:["\u8682\u8681\u533A\u5757\u94FEBaaS\u5E73\u53F0-\u7BA1\u7406\u5458","\u5BA1\u8BA1\u7BA1\u7406\u5458","Captain-\u96C6\u7FA4\u6269\u5BB9\u5DE5\u7A0B\u5E08","Captain-\u96C6\u7FA4\u8FD0\u7EF4\u5DE5\u7A0B\u5E08","Captain-\u96C6\u7FA4\u7BA1\u7406\u5458","Captain-\u8D85\u7EA7\u7BA1\u7406\u5458","\u51FD\u6570\u8BA1\u7B97\u7BA1\u7406\u5458","\u51FD\u6570\u8BA1\u7B97\u89C2\u5BDF\u8005"]})]}),(0,e.jsx)("br",{}),(0,e.jsxs)(Me.Z,{bodyStyle:{paddingBottom:0,paddingTop:0},children:[(0,e.jsx)(ee.Z,{orientation:"left",children:"\u5E94\u7528\u8D44\u6E90"}),E==null?void 0:E.map(function(C){var x,m,l,h,B;return(0,e.jsxs)("div",{children:[(0,e.jsx)(q.Z,{bordered:!1,children:(0,e.jsxs)(Jr,{header:C.name,children:[C.menus.length>0&&(0,e.jsx)(W.Z.Group,{name:"menu_".concat(C.id),label:"\u83DC\u5355\u6743\u9650",layout:"vertical",options:(x=C.menus)===null||x===void 0?void 0:x.map(function(w){return{label:w.name,value:w.id,onChange:v}})}),C.buttons.length>0&&(0,e.jsx)(W.Z.Group,{name:"button_".concat(C.id),label:"\u6309\u94AE\u6743\u9650",layout:"vertical",options:(m=C.buttons)===null||m===void 0?void 0:m.map(function(w){return{label:w.name,value:w.id,onChange:v}})}),C.apis.length>0&&(0,e.jsx)(W.Z.Group,{name:"api_".concat(C.id),layout:"vertical",label:"\u63A5\u53E3\u6743\u9650",options:(l=C.apis)===null||l===void 0?void 0:l.map(function(w){return{label:w.name,value:w.id,onChange:v}})}),C.datas.length>0&&(0,e.jsx)(W.Z.Group,{name:"data_".concat(C.id),layout:"vertical",label:"\u6570\u636E\u6743\u9650",options:(h=C.apis)===null||h===void 0?void 0:h.map(function(w){return{label:w.name,value:w.id,onChange:v}})}),C.others.length>0&&(0,e.jsx)(W.Z.Group,{name:"other_".concat(C.id),layout:"vertical",label:"\u5176\u4ED6\u6743\u9650",options:(B=C.apis)===null||B===void 0?void 0:B.map(function(w){return{label:w.name,value:w.id,onChange:v}})})]},C.id)},C.id),(0,e.jsx)("br",{})]},C.id)})]})]})},"update_permission")},qr=Qr,_r=function(T){var r=(0,R.useState)(X.SC.USER),n=p()(r,2),y=n[0],I=n[1],j=(0,R.useState)(!1),b=p()(j,2),D=b[0],u=b[1],s=(0,R.useRef)(),t=T.appId,E=[{title:"\u540D\u79F0",dataIndex:"name",ellipsis:!0,width:"300",fixed:"left"},{title:"\u6388\u6743\u65F6\u95F4",align:"center",dataIndex:"desc",search:!1},{title:"\u64CD\u4F5C",align:"center",valueType:"option",fixed:"right",width:150,render:function(c,A){return[(0,e.jsx)(qr,{onCancel:function(){},open:!0,subjectType:y,subjectId:A.id},A.id),(0,e.jsx)(Se.Z,{title:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",placement:"bottomRight",icon:(0,e.jsx)(Ce.Z,{style:{color:"red"}}),onConfirm:k()(a()().mark(function Z(){return a()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:(0,U.IV)(A.id).then(function(d){if(d.success&&d.result){var o;K.ZP.success("\u64CD\u4F5C\u6210\u529F"),(o=s.current)===null||o===void 0||o.reload();return}});case 1:case"end":return f.stop()}},Z)})),okText:"\u662F",cancelText:"\u5426",children:(0,e.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u5220\u9664"},"remove")},"delete")]}}];return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(we.Z,{columns:E,options:!1,scroll:{x:700},pagination:{showQuickJumper:!0,defaultPageSize:10},style:{height:"calc(100vh - 190px)",overflow:"auto"},cardProps:{style:{minHeight:"100%"}},actionRef:s,request:U.zr,params:{appId:t,subjectType:y},rowKey:"id",dateFormatter:"string",toolbar:{menu:{type:"tab",activeKey:y,items:[{key:X.SC.USER,label:(0,e.jsx)("span",{children:"\u7528\u6237"})},{key:X.SC.USER_GROUP,label:(0,e.jsx)("span",{children:"\u7528\u6237\u7EC4"})},{key:X.SC.ORGANIZATION,label:(0,e.jsx)("span",{children:"\u7EC4\u7EC7\u673A\u6784"})}],onChange:function(c){I(c)}},actions:[(0,e.jsx)(fe.Z,{icon:(0,e.jsx)(ye.Z,{}),type:"primary",onClick:function(){u(!0)},children:"\u65B0\u589E\u6388\u6743"},"create")]}}),(0,e.jsx)(Xr,{subjectType:y,open:D,onCancel:function(){u(!1)},appId:t},"create")]})},ea=_r,ur=S(28058),sr=S(69400),lr=S(72269),de=S(26713),le=S(62113),pe=S(97269),Ke=S(50727),be=S(90672),Ue=S(58455),ra=function(r){var n=r.open,y=r.onCancel,I=r.onFinish,j=r.appId,b=(0,R.useState)(function(){return[]}),D=p()(b,2),u=D[0],s=D[1],t=(0,R.useState)(!1),E=p()(t,2),g=E[0],c=E[1],A=(0,R.useState)(0),Z=p()(A,2),i=Z[0],f=Z[1],d=(0,R.useRef)([]),o=H.Z.useForm(),F=p()(o,1),v=F[0],C=(0,R.useRef)();(0,R.useEffect)(function(){},[n]);var x=[{title:"\u6743\u9650\u7C7B\u578B",key:"type",dataIndex:"type",valueType:"select",width:80,fieldProps:{allowClear:!1,options:[{value:"DATA",label:"\u6570\u636E"},{value:"MENU",label:"\u83DC\u5355"},{value:"BUTTON",label:"\u6309\u94AE"},{value:"API",label:"API"},{value:"OTHER",label:"\u5176\u4ED6"}]},formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u6743\u9650\u503C",dataIndex:"value",width:150,formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u63CF\u8FF0",dataIndex:"name",width:150,formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u64CD\u4F5C",fixed:"right",align:"center",width:30,valueType:"option"}];return(0,e.jsxs)(le.L,{formMapRef:d,current:i,onCurrentChange:f,stepsFormRender:function(l,h){return(0,e.jsx)(Ue.Z,{title:"\u521B\u5EFA\u8D44\u6E90",width:600,maskClosable:!0,destroyOnClose:!0,onClose:function(w){f(0),y(w)},open:n,footer:(0,e.jsx)(de.Z,{style:{float:"right"},children:h}),children:(0,e.jsx)(re.Z,{spinning:g,children:l})})},onFinish:function(){var m=k()(a()().mark(function l(h){var B;return a()().wrap(function($){for(;;)switch($.prev=$.next){case 0:return c(!0),$.next=3,I==null?void 0:I(h);case 3:return B=$.sent,c(!1),f(0),$.abrupt("return",B);case 7:case"end":return $.stop()}},l)}));return function(l){return m.apply(this,arguments)}}(),children:[(0,e.jsxs)(le.L.StepForm,{scrollToFirstError:!0,name:"basic",title:"\u57FA\u672C\u4FE1\u606F",layout:"horizontal",labelCol:{span:4},wrapperCol:{span:19},labelAlign:"right",children:[(0,e.jsx)(z.Z,{name:"name",label:"\u8D44\u6E90\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u8D44\u6E90\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D44\u6E90\u540D\u79F0"},{validator:function(){var m=k()(a()().mark(function h(B,w){var $,L,M;return a()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(w){P.next=2;break}return P.abrupt("return",Promise.resolve());case 2:return P.next=4,(0,U.OR)(j,"NAME",w);case 4:if($=P.sent,L=$.success,M=$.result,L){P.next=9;break}return P.abrupt("return",Promise.reject());case 9:if(M){P.next=11;break}return P.abrupt("return",Promise.reject(new Error("\u8D44\u6E90\u540D\u79F0\u5DF2\u5B58\u5728")));case 11:case"end":return P.stop()}},h)}));function l(h,B){return m.apply(this,arguments)}return l}(),validateTrigger:["onBlur"]}]}),(0,e.jsx)(z.Z,{name:"code",label:"\u8D44\u6E90\u7F16\u7801",placeholder:"\u8BF7\u8F93\u5165\u8D44\u6E90\u7F16\u7801",rules:[{required:!0,message:"\u8D44\u6E90\u7F16\u7801\u4E3A\u5FC5\u586B\u9879"},{validator:function(){var m=k()(a()().mark(function h(B,w){var $,L,M;return a()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(w){P.next=2;break}return P.abrupt("return",Promise.resolve());case 2:return c(!0),P.next=5,(0,U.OR)(j,"CODE",w);case 5:if($=P.sent,L=$.success,M=$.result,c(!1),L){P.next=11;break}return P.abrupt("return",Promise.reject());case 11:if(M){P.next=13;break}return P.abrupt("return",Promise.reject(new Error("\u8D44\u6E90\u7F16\u7801\u5DF2\u5B58\u5728")));case 13:case"end":return P.stop()}},h)}));function l(h,B){return m.apply(this,arguments)}return l}(),validateTrigger:["onBlur"]}],extra:"\u8D44\u6E90\u7F16\u7801\u5728\u5F53\u524D\u5E94\u7528\u4E2D\u7684\u552F\u4E00\u6807\u8BC6\uFF0C\u4E0D\u80FD\u91CD\u590D\uFF0C\u4EC5\u652F\u6301\u82F1\u6587\u3001\u6570\u5B57\u3001\u4E0B\u5212\u7EBF\uFF0C\u521B\u5EFA\u540E\u4E0D\u53EF\u4FEE\u6539\u3002"}),(0,e.jsx)(be.Z,{name:"desc",fieldProps:{rows:2},label:"\u8D44\u6E90\u63CF\u8FF0",placeholder:"\u8BF7\u8F93\u5165\u8D44\u6E90\u63CF\u8FF0",rules:[{required:!0,message:"\u8D44\u6E90\u63CF\u8FF0\u4E3A\u5FC5\u586B\u9879"}]})]}),(0,e.jsx)(le.L.StepForm,{scrollToFirstError:!0,name:"actions",title:"\u6743\u9650\u9879",layout:"vertical",labelAlign:"right",onFinish:k()(a()().mark(function m(){var l;return a()().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return c(!0),B.next=3,v.validateFields();case 3:if(l=B.sent,c(!1),!l){B.next=7;break}return B.abrupt("return",Promise.resolve(!0));case 7:return B.abrupt("return",Promise.resolve(!1));case 8:case"end":return B.stop()}},m)})),children:(0,e.jsx)(pe.A.Item,{label:"\u8D44\u6E90\u6743\u9650",name:"actions",trigger:"onValuesChange",rules:[{required:!0,message:"\u8D44\u6E90\u6743\u9650\u4E3A\u5FC5\u586B\u9879"}],tooltip:"\u4E3A\u8D44\u6E90\u5B9A\u4E49\u6743\u9650\uFF0C\u8BF7\u9009\u62E9\u6743\u9650\u7C7B\u578B\uFF0C\u5E76\u914D\u7F6E\u6743\u9650\u503C\u3002",children:(0,e.jsx)(Ke.Z,{rowKey:"key",scroll:{x:700},actionRef:C,toolBarRender:!1,columns:x,recordCreatorProps:{creatorButtonText:"\u6DFB\u52A0\u8D44\u6E90\u6743\u9650",newRecordType:"dataSource",position:"bottom",record:function(){return{key:Date.now()}}},editable:{form:v,type:"multiple",editableKeys:u,onChange:s,deletePopconfirmMessage:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6743\u9650\u8D44\u6E90\u5417\uFF1F",actionRender:function(l,h,B){return[B.delete]}}})})})]})},aa=ra,ir=S(95462),na=function(r){var n=r.open,y=r.onCancel,I=r.onFinish,j=r.id,b=r.appId,D=(0,R.useState)(!1),u=p()(D,2),s=u[0],t=u[1],E=(0,R.useState)(0),g=p()(E,2),c=g[0],A=g[1],Z=(0,R.useState)(function(){return[]}),i=p()(Z,2),f=i[0],d=i[1],o=(0,R.useRef)([]),F=H.Z.useForm(),v=p()(F,1),C=v[0],x=(0,R.useRef)();(0,Q.Z)(k()(a()().mark(function l(){var h,B,w,$,L;return a()().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(!(n&&j)){V.next=14;break}return t(!0),V.next=4,(0,U.NZ)(j);case 4:if(h=V.sent,B=h.success,w=h.result,!(B&&w)){V.next=12;break}return o==null||($=o.current)===null||$===void 0||$.forEach(function(P){var O;P==null||(O=P.current)===null||O===void 0||O.setFieldsValue(N()(N()({},w),{},{id:j}))}),d((L=w.actions)===null||L===void 0?void 0:L.map(function(P){return P.id})),t(!1),V.abrupt("return");case 12:y(),K.ZP.warning("\u672A\u83B7\u53D6\u5230\u8BE5".concat(j,"\u8D44\u6E90\u6570\u636E\uFF01"));case 14:case"end":return V.stop()}},l)})),[j,y,n]);var m=[{title:"\u6743\u9650\u7C7B\u578B",key:"type",dataIndex:"type",valueType:"select",width:80,fieldProps:{allowClear:!1,options:[{value:"DATA",label:"\u6570\u636E"},{value:"MENU",label:"\u83DC\u5355"},{value:"BUTTON",label:"\u6309\u94AE"},{value:"API",label:"API"},{value:"OTHER",label:"\u5176\u4ED6"}]},formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u6743\u9650\u503C",dataIndex:"value",copyable:!0,width:150,formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u63CF\u8FF0",dataIndex:"name",width:150,formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u64CD\u4F5C",fixed:"right",align:"center",width:30,valueType:"option"}];return(0,e.jsxs)(le.L,{formMapRef:o,current:c,onCurrentChange:A,stepsFormRender:function(h,B){return(0,e.jsx)(Ue.Z,{title:"\u4FEE\u6539\u8D44\u6E90",width:600,maskClosable:!0,destroyOnClose:!0,onClose:function($){A(0),y($)},open:n,footer:(0,e.jsx)(de.Z,{style:{float:"right"},children:B}),children:(0,e.jsx)(re.Z,{spinning:s,children:h})})},onFinish:function(){var l=k()(a()().mark(function h(B){var w;return a()().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return t(!0),L.next=3,I==null?void 0:I(B);case 3:return w=L.sent,t(!1),A(0),L.abrupt("return",w);case 7:case"end":return L.stop()}},h)}));return function(h){return l.apply(this,arguments)}}(),children:[(0,e.jsxs)(le.L.StepForm,{scrollToFirstError:!0,name:"basic",title:"\u57FA\u672C\u4FE1\u606F",layout:"horizontal",labelCol:{span:4},wrapperCol:{span:19},labelAlign:"right",children:[(0,e.jsx)(z.Z,{name:"id",hidden:!0}),(0,e.jsx)(z.Z,{name:"name",label:"\u8D44\u6E90\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u8D44\u6E90\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D44\u6E90\u540D\u79F0"},{validator:function(){var l=k()(a()().mark(function B(w,$){var L,M,V;return a()().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if($){O.next=2;break}return O.abrupt("return",Promise.resolve());case 2:return t(!0),O.next=5,(0,U.OR)(b,"NAME",$,j);case 5:if(L=O.sent,M=L.success,V=L.result,t(!1),M){O.next=11;break}return O.abrupt("return",Promise.reject());case 11:if(V){O.next=13;break}return O.abrupt("return",Promise.reject(new Error("\u8D44\u6E90\u540D\u79F0\u5DF2\u5B58\u5728")));case 13:case"end":return O.stop()}},B)}));function h(B,w){return l.apply(this,arguments)}return h}(),validateTrigger:["onBlur"]}]}),(0,e.jsx)(z.Z,{name:"code",label:"\u8D44\u6E90\u7F16\u7801",placeholder:"\u8BF7\u8F93\u5165\u8D44\u6E90\u7F16\u7801",proFieldProps:{render:function(h){return h&&(0,e.jsx)(ir.Z,{copyable:{text:h},style:{marginBottom:"0"},children:(0,e.jsx)("span",{dangerouslySetInnerHTML:{__html:"".concat(h,"")}})})}},readonly:!0,extra:"\u8D44\u6E90\u7F16\u7801\u5728\u5F53\u524D\u5E94\u7528\u4E2D\u7684\u552F\u4E00\u6807\u8BC6\uFF0C\u4E0D\u80FD\u91CD\u590D\uFF0C\u4EC5\u652F\u6301\u82F1\u6587\u3001\u6570\u5B57\u3001\u4E0B\u5212\u7EBF\uFF0C\u521B\u5EFA\u540E\u4E0D\u53EF\u4FEE\u6539\u3002"}),(0,e.jsx)(be.Z,{name:"desc",fieldProps:{rows:2},label:"\u8D44\u6E90\u63CF\u8FF0",placeholder:"\u8BF7\u8F93\u5165\u8D44\u6E90\u63CF\u8FF0"})]}),(0,e.jsx)(le.L.StepForm,{scrollToFirstError:!0,name:"actions",title:"\u6743\u9650\u9879",layout:"vertical",labelAlign:"right",onFinish:k()(a()().mark(function l(){var h;return a()().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return t(!0),w.next=3,C.validateFields();case 3:if(h=w.sent,t(!1),!h){w.next=7;break}return w.abrupt("return",Promise.resolve(!0));case 7:return w.abrupt("return",Promise.resolve(!1));case 8:case"end":return w.stop()}},l)})),children:(0,e.jsx)(pe.A.Item,{label:"\u8D44\u6E90\u6743\u9650",name:"actions",trigger:"onValuesChange",rules:[{required:!0,message:"\u8D44\u6E90\u6743\u9650\u4E3A\u5FC5\u586B\u9879"}],tooltip:"\u4E3A\u8D44\u6E90\u5B9A\u4E49\u6743\u9650\uFF0C\u8BF7\u9009\u62E9\u6743\u9650\u7C7B\u578B\uFF0C\u5E76\u914D\u7F6E\u6743\u9650\u503C\u3002",children:(0,e.jsx)(Ke.Z,{rowKey:"id",scroll:{x:700},actionRef:x,toolBarRender:!1,columns:m,recordCreatorProps:{creatorButtonText:"\u6DFB\u52A0\u8D44\u6E90\u6743\u9650",newRecordType:"dataSource",position:"bottom",record:function(){return{id:Date.now()}}},editable:{form:C,type:"multiple",editableKeys:f,onChange:d,deletePopconfirmMessage:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6743\u9650\u8D44\u6E90\u5417\uFF1F",actionRender:function(h,B,w){return[w.delete]}}})})})]})},ta=na,ua=sr.Z.confirm,sa=function(T){var r=(0,R.useRef)(),n=T.appId,y=(0,R.useState)(!1),I=p()(y,2),j=I[0],b=I[1],D=(0,R.useState)(!1),u=p()(D,2),s=u[0],t=u[1],E=(0,R.useState)(),g=p()(E,2),c=g[0],A=g[1],Z=[{title:"\u8D44\u6E90\u540D\u79F0",dataIndex:"name",ellipsis:!0,fixed:"left",copyable:!1},{title:"\u8D44\u6E90\u7F16\u7801",dataIndex:"code",ellipsis:!0,copyable:!0},{title:"\u8D44\u6E90\u63CF\u8FF0",dataIndex:"desc",search:!1,ellipsis:!0,copyable:!1},{title:"\u72B6\u6001",dataIndex:"enabled",search:!1,align:"center",render:function(f,d){return(0,e.jsx)(lr.Z,{checked:f,onChange:function(){var o=k()(a()().mark(function F(v){var C,x,m;return a()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(!v){h.next=9;break}return h.next=3,(0,U.PE)(d.id);case 3:if(C=h.sent,x=C.success,!x){h.next=9;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),(m=r.current)===null||m===void 0||m.reload(),h.abrupt("return");case 9:ua({title:"\u8B66\u544A",icon:(0,e.jsx)(ur.Z,{}),content:"\u786E\u5B9A\u7981\u7528\u6B64\u8D44\u6E90\uFF1F",okText:"\u786E\u5B9A",okType:"danger",cancelText:"\u53D6\u6D88",centered:!0,onOk:function(){var B=k()(a()().mark(function $(){var L,M,V;return a()().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,(0,U._G)(d.id);case 2:if(L=O.sent,M=L.success,!M){O.next=8;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),(V=r.current)===null||V===void 0||V.reload(),O.abrupt("return");case 8:case"end":return O.stop()}},$)}));function w(){return B.apply(this,arguments)}return w}(),onCancel:function(){}});case 10:case"end":return h.stop()}},F)}));return function(F){return o.apply(this,arguments)}}()})}},{title:"\u64CD\u4F5C",align:"center",valueType:"option",fixed:"right",width:150,render:function(f,d){return[(0,e.jsx)("a",{target:"_blank",onClick:function(){A(d.id),t(!0)},children:"\u4FEE\u6539"},"update"),(0,e.jsx)(Se.Z,{title:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",placement:"bottomRight",icon:(0,e.jsx)(Ce.Z,{style:{color:"red"}}),onConfirm:k()(a()().mark(function o(){return a()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:(0,U.IV)(d.id).then(function(C){if(C.success&&C.result){var x;K.ZP.success("\u64CD\u4F5C\u6210\u529F"),(x=r.current)===null||x===void 0||x.reload();return}});case 1:case"end":return v.stop()}},o)})),okText:"\u662F",cancelText:"\u5426",children:(0,e.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u5220\u9664"},"remove")},"delete")]}}];return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(we.Z,{columns:Z,actionRef:r,request:U.UK,params:{appId:n},rowKey:"id",options:!1,scroll:{x:650},style:{height:"calc(100vh - 190px)",overflow:"auto"},cardProps:{style:{minHeight:"100%"}},toolbar:{actions:[(0,e.jsx)(fe.Z,{type:"primary",icon:(0,e.jsx)(ye.Z,{}),onClick:function(){b(!0)},children:"\u65B0\u589E\u8D44\u6E90"},"create")]},pagination:{showQuickJumper:!0,defaultPageSize:10},rowSelection:{selections:[ve.Z.SELECTION_ALL,ve.Z.SELECTION_INVERT]},tableAlertRender:function(f){var d=f.selectedRowKeys,o=f.onCleanSelected;return(0,e.jsx)(de.Z,{size:24,children:(0,e.jsxs)("span",{children:["\u5DF2\u9009 ",d.length," \u9879",(0,e.jsx)("a",{style:{marginLeft:8},onClick:o,children:"\u53D6\u6D88\u9009\u62E9"})]})})},tableAlertOptionRender:function(f){return(0,e.jsx)(de.Z,{size:16,children:(0,e.jsx)(Se.Z,{title:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",placement:"bottomRight",icon:(0,e.jsx)(Ce.Z,{style:{color:"red"}}),onConfirm:k()(a()().mark(function d(){var o,F,v;return a()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,(0,U.O0)(f.selectedRowKeys);case 2:if(o=x.sent,F=o.success,!F){x.next=9;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),f.onCleanSelected(),(v=r.current)===null||v===void 0||v.reload(),x.abrupt("return");case 9:case"end":return x.stop()}},d)})),okText:"\u662F",cancelText:"\u5426",children:(0,e.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u6279\u91CF\u5220\u9664"},"remove")},"delete")})}}),(0,e.jsx)(aa,{appId:n,open:j,onCancel:function(){b(!1)},onFinish:function(){var i=k()(a()().mark(function f(d){var o,F,v;return a()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,(0,U.bm)(N()(N()({},d),{},{appId:n}));case 2:if(o=x.sent,F=o.success,!F){x.next=9;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),(v=r.current)===null||v===void 0||v.reload(),b(!1),x.abrupt("return",Promise.resolve(!0));case 9:return x.abrupt("return",Promise.resolve(!1));case 10:case"end":return x.stop()}},f)}));return function(f){return i.apply(this,arguments)}}()}),(0,e.jsx)(ta,{id:c,appId:n,open:s,onCancel:function(){t(!1)},onFinish:function(){var i=k()(a()().mark(function f(d){var o,F,v;return a()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,(0,U.Y3)(N()(N()({},d),{},{appId:n}));case 2:o=x.sent,F=o.success,F&&((v=r.current)===null||v===void 0||v.reload(),t(!1),K.ZP.success("\u64CD\u4F5C\u6210\u529F"));case 5:case"end":return x.stop()}},f)}));return function(f){return i.apply(this,arguments)}}()})]})},la=S(25191),ia=q.Z.Panel,oa=function(r){var n=r.open,y=r.onCancel,I=r.onFinish,j=r.appId,b=(0,R.useRef)([]),D=(0,R.useState)(),u=p()(D,2),s=u[0],t=u[1],E=(0,R.useState)(!1),g=p()(E,2),c=g[0],A=g[1],Z=(0,R.useState)(0),i=p()(Z,2),f=i[0],d=i[1],o=(0,R.useState)([]),F=p()(o,2),v=F[0],C=F[1];(0,Q.Z)(k()(a()().mark(function m(){var l,h,B;return a()().wrap(function($){for(;;)switch($.prev=$.next){case 0:if(!n){$.next=9;break}return A(!0),b==null||(l=b.current)===null||l===void 0||l.forEach(function(L){var M;(M=L.current)===null||M===void 0||M.setFieldsValue({code:(0,la.MX)(9),appId:j})}),$.next=5,(0,U.Sf)({appId:j});case 5:h=$.sent,B=h.result,t(B),A(!1);case 9:case"end":return $.stop()}},m)})),[j,n]);var x=function(l){if(l.target.checked){C([].concat(Fe()(v),[l.target.value]));return}C(v==null?void 0:v.filter(function(h){return h!==l.target.value}))};return(0,e.jsxs)(le.L,{onFinish:function(){var m=k()(a()().mark(function l(h){var B;return a()().wrap(function($){for(;;)switch($.prev=$.next){case 0:return A(!0),console.log("permissions",v),$.next=4,I==null?void 0:I(h);case 4:return B=$.sent,A(!1),d(0),$.abrupt("return",B);case 8:case"end":return $.stop()}},l)}));return function(l){return m.apply(this,arguments)}}(),current:f,onCurrentChange:d,formProps:{validateMessages:{required:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}},formMapRef:b,stepsFormRender:function(l,h){return(0,e.jsx)(Ue.Z,{title:"\u65B0\u589E\u89D2\u8272",width:600,forceRender:!0,onClose:function(){d(0),y()},open:n,footer:(0,e.jsx)(de.Z,{style:{float:"right"},children:h}),destroyOnClose:!0,children:(0,e.jsx)(re.Z,{spinning:c,children:l})})},children:[(0,e.jsxs)(le.L.StepForm,{scrollToFirstError:!0,name:"basic",title:"\u57FA\u672C\u4FE1\u606F",layout:"horizontal",labelCol:{span:4},wrapperCol:{span:19},labelAlign:"right",children:[(0,e.jsx)(z.Z,{name:"appId",hidden:!0}),(0,e.jsx)(z.Z,{name:"name",label:"\u89D2\u8272\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u89D2\u8272\u540D\u79F0",rules:[{required:!0,message:"\u89D2\u8272\u540D\u79F0\u4E3A\u5FC5\u586B\u9879"},{validator:function(){var m=k()(a()().mark(function h(B,w){var $,L,M;return a()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(w){P.next=2;break}return P.abrupt("return",Promise.resolve());case 2:return A(!0),P.next=5,(0,U.ld)(j,"NAME",w);case 5:if($=P.sent,L=$.success,M=$.result,A(!1),L){P.next=11;break}return P.abrupt("return",Promise.reject());case 11:if(M){P.next=13;break}return P.abrupt("return",Promise.reject(new Error("\u89D2\u8272\u540D\u79F0\u5DF2\u5B58\u5728")));case 13:case"end":return P.stop()}},h)}));function l(h,B){return m.apply(this,arguments)}return l}(),validateTrigger:["onBlur"]}]}),(0,e.jsx)(z.Z,{name:"code",label:"\u89D2\u8272\u6807\u8BC6",placeholder:"\u8BF7\u8F93\u5165\u89D2\u8272\u6807\u8BC6",rules:[{required:!0,message:"\u89D2\u8272\u6807\u8BC6\u4E3A\u5FC5\u586B\u9879"},{validator:function(){var m=k()(a()().mark(function h(B,w){var $,L,M;return a()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(w){P.next=2;break}return P.abrupt("return",Promise.resolve());case 2:return A(!0),P.next=5,(0,U.ld)(j,"CODE",w);case 5:if($=P.sent,L=$.success,M=$.result,A(!1),L){P.next=11;break}return P.abrupt("return",Promise.reject());case 11:if(M){P.next=13;break}return P.abrupt("return",Promise.reject(new Error("\u89D2\u8272\u6807\u8BC6\u5DF2\u5B58\u5728")));case 13:case"end":return P.stop()}},h)}));function l(h,B){return m.apply(this,arguments)}return l}(),validateTrigger:["onBlur"]}],extra:"\u89D2\u8272\u7F16\u7801\u5728\u5F53\u524D\u5E94\u7528\u4E2D\u7684\u552F\u4E00\u6807\u8BC6\uFF0C\u4E0D\u80FD\u91CD\u590D\uFF0C\u4EC5\u652F\u6301\u82F1\u6587\u3001\u6570\u5B57\u3001\u4E0B\u5212\u7EBF\uFF0C\u521B\u5EFA\u540E\u4E0D\u53EF\u4FEE\u6539\u3002"}),(0,e.jsx)(be.Z,{name:"remark",label:"\u89D2\u8272\u63CF\u8FF0",fieldProps:{rows:2},placeholder:"\u8BF7\u8F93\u5165\u89D2\u8272\u63CF\u8FF0"})]}),(0,e.jsx)(le.L.StepForm,{scrollToFirstError:!0,name:"permission",title:"\u5206\u914D\u6743\u9650",layout:"horizontal",labelCol:{span:4},wrapperCol:{span:19},children:s==null?void 0:s.map(function(m){var l,h,B,w,$;return(0,e.jsxs)("div",{children:[(0,e.jsx)(q.Z,{bordered:!1,children:(0,e.jsxs)(ia,{header:m.name,children:[m.menus.length>0&&(0,e.jsx)(W.Z.Group,{name:"menu_".concat(m.id),label:"\u83DC\u5355\u6743\u9650",layout:"vertical",options:(l=m.menus)===null||l===void 0?void 0:l.map(function(L){return{label:L.name,value:L.id,onChange:x}})}),m.buttons.length>0&&(0,e.jsx)(W.Z.Group,{name:"button_".concat(m.id),label:"\u6309\u94AE\u6743\u9650",layout:"vertical",options:(h=m.buttons)===null||h===void 0?void 0:h.map(function(L){return{label:L.name,value:L.id,onChange:x}})}),m.apis.length>0&&(0,e.jsx)(W.Z.Group,{name:"api_".concat(m.id),layout:"vertical",label:"\u63A5\u53E3\u6743\u9650",options:(B=m.apis)===null||B===void 0?void 0:B.map(function(L){return{label:L.name,value:L.id,onChange:x}})}),m.datas.length>0&&(0,e.jsx)(W.Z.Group,{name:"data_".concat(m.id),layout:"vertical",label:"\u6570\u636E\u6743\u9650",options:(w=m.apis)===null||w===void 0?void 0:w.map(function(L){return{label:L.name,value:L.id,onChange:x}})}),m.others.length>0&&(0,e.jsx)(W.Z.Group,{name:"other_".concat(m.id),layout:"vertical",label:"\u5176\u4ED6\u6743\u9650",options:($=m.apis)===null||$===void 0?void 0:$.map(function(L){return{label:L.name,value:L.id,onChange:x}})})]},m.id)},m.id),(0,e.jsx)("br",{})]},m.id)})})]},"create")},ca=oa,da=q.Z.Panel,pa=function(r){var n=r.open,y=r.onCancel,I=r.onFinish,j=r.id,b=(0,R.useState)(!1),D=p()(b,2),u=D[0],s=D[1],t=(0,R.useState)(),E=p()(t,2),g=E[0],c=E[1],A=(0,R.useRef)(),Z=(0,R.useRef)([]),i=(0,R.useState)(0),f=p()(i,2),d=f[0],o=f[1],F=(0,R.useState)([]),v=p()(F,2),C=v[0],x=v[1];(0,Q.Z)(k()(a()().mark(function l(){var h,B,w,$;return a()().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(!(n&&j)){M.next=14;break}return s(!0),c([]),M.next=5,(0,U.Yq)(j);case 5:if(h=M.sent,B=h.success,w=h.result,!(B&&w)){M.next=12;break}return Z==null||($=Z.current)===null||$===void 0||$.forEach(function(V){var P;(P=V.current)===null||P===void 0||P.setFieldsValue(N()({},w))}),s(!1),M.abrupt("return");case 12:y(),K.ZP.warning("\u672A\u83B7\u53D6\u5230\u8BE5".concat(j,"\u89D2\u8272\u6570\u636E\uFF01")).then();case 14:case"end":return M.stop()}},l)})),[j,y,n]);var m=function(h){if(h.target.checked){x([].concat(Fe()(C),[h.target.value]));return}x(C==null?void 0:C.filter(function(B){return B!==h.target.value}))};return(0,e.jsxs)(le.L,{onFinish:function(){var l=k()(a()().mark(function h(B){var w;return a()().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return s(!0),console.log("permissions",C),L.next=4,I==null?void 0:I(B);case 4:return w=L.sent,s(!1),o(0),L.abrupt("return",w);case 8:case"end":return L.stop()}},h)}));return function(h){return l.apply(this,arguments)}}(),current:d,onCurrentChange:o,formProps:{validateMessages:{required:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}},formMapRef:Z,stepsFormRender:function(h,B){return(0,e.jsx)(Ue.Z,{title:"\u4FEE\u6539\u89D2\u8272",width:600,onClose:function(){o(0),y()},open:n,footer:(0,e.jsx)(de.Z,{style:{float:"right"},children:B}),destroyOnClose:!0,children:(0,e.jsxs)(re.Z,{spinning:u,children:[" ",h]})})},children:[(0,e.jsxs)(le.L.StepForm,{scrollToFirstError:!0,name:"basic",title:"\u57FA\u672C\u4FE1\u606F",layout:"horizontal",labelCol:{span:4},wrapperCol:{span:19},labelAlign:"right",formRef:A,children:[(0,e.jsx)(z.Z,{name:"id",hidden:!0}),(0,e.jsx)(z.Z,{name:"appId",hidden:!0}),(0,e.jsx)(z.Z,{name:"name",label:"\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u89D2\u8272\u540D\u79F0"},{validator:function(){var l=k()(a()().mark(function B(w,$){var L,M,V,P;return a()().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if($){G.next=2;break}return G.abrupt("return",Promise.resolve());case 2:return s(!0),G.next=5,(0,U.ld)((L=A.current)===null||L===void 0?void 0:L.getFieldValue("appId"),"NAME",$,j);case 5:if(M=G.sent,V=M.success,P=M.result,s(!1),V){G.next=11;break}return G.abrupt("return",Promise.reject());case 11:if(P){G.next=13;break}return G.abrupt("return",Promise.reject(new Error("\u624B\u673A\u53F7\u5DF2\u5B58\u5728")));case 13:case"end":return G.stop()}},B)}));function h(B,w){return l.apply(this,arguments)}return h}(),validateTrigger:["onBlur"]}],placeholder:"\u8BF7\u8F93\u5165\u89D2\u8272\u540D\u79F0"}),(0,e.jsx)(z.Z,{name:"code",label:"\u6807\u8BC6",placeholder:"\u8BF7\u8F93\u5165\u89D2\u8272\u6807\u8BC6",readonly:!0,proFieldProps:{render:function(h){return h&&(0,e.jsx)(ir.Z,{copyable:{text:h},style:{marginBottom:"0"},children:(0,e.jsx)("span",{dangerouslySetInnerHTML:{__html:"".concat(h,"")}})})}},extra:"\u89D2\u8272\u7F16\u7801\u5728\u5F53\u524D\u5E94\u7528\u4E2D\u7684\u552F\u4E00\u6807\u8BC6\uFF0C\u4E0D\u80FD\u91CD\u590D\uFF0C\u4EC5\u652F\u6301\u82F1\u6587\u3001\u6570\u5B57\u3001\u4E0B\u5212\u7EBF\uFF0C\u521B\u5EFA\u540E\u4E0D\u53EF\u4FEE\u6539\u3002"}),(0,e.jsx)(be.Z,{name:"remark",fieldProps:{rows:2},label:"\u63CF\u8FF0",placeholder:"\u8BF7\u8F93\u5165\u89D2\u8272\u63CF\u8FF0"})]}),(0,e.jsx)(le.L.StepForm,{scrollToFirstError:!0,name:"permission",title:"\u5206\u914D\u6743\u9650",layout:"horizontal",labelCol:{span:4},wrapperCol:{span:19},children:g==null?void 0:g.map(function(l){var h,B,w,$,L;return(0,e.jsxs)("div",{children:[(0,e.jsx)(q.Z,{bordered:!1,children:(0,e.jsxs)(da,{header:l.name,children:[l.menus.length>0&&(0,e.jsx)(W.Z.Group,{name:"menu_".concat(l.id),label:"\u83DC\u5355\u6743\u9650",layout:"vertical",options:(h=l.menus)===null||h===void 0?void 0:h.map(function(M){return{label:M.name,value:M.id,onChange:m}})}),l.buttons.length>0&&(0,e.jsx)(W.Z.Group,{name:"button_".concat(l.id),label:"\u6309\u94AE\u6743\u9650",layout:"vertical",options:(B=l.buttons)===null||B===void 0?void 0:B.map(function(M){return{label:M.name,value:M.id,onChange:m}})}),l.apis.length>0&&(0,e.jsx)(W.Z.Group,{name:"api_".concat(l.id),layout:"vertical",label:"\u63A5\u53E3\u6743\u9650",options:(w=l.apis)===null||w===void 0?void 0:w.map(function(M){return{label:M.name,value:M.id,onChange:m}})}),l.datas.length>0&&(0,e.jsx)(W.Z.Group,{name:"data_".concat(l.id),layout:"vertical",label:"\u6570\u636E\u6743\u9650",options:($=l.apis)===null||$===void 0?void 0:$.map(function(M){return{label:M.name,value:M.id,onChange:m}})}),l.others.length>0&&(0,e.jsx)(W.Z.Group,{name:"other_".concat(l.id),layout:"vertical",label:"\u5176\u4ED6\u6743\u9650",options:(L=l.apis)===null||L===void 0?void 0:L.map(function(M){return{label:M.name,value:M.id,onChange:m}})})]},l.id)},l.id),(0,e.jsx)("br",{})]},l.id)})})]},"update")},ma=pa,fa=sr.Z.confirm,va=function(T){var r=(0,R.useRef)(),n=T.appId,y=(0,R.useState)(!1),I=p()(y,2),j=I[0],b=I[1],D=(0,R.useState)(!1),u=p()(D,2),s=u[0],t=u[1],E=(0,R.useState)(),g=p()(E,2),c=g[0],A=g[1],Z=[{title:"\u89D2\u8272\u540D\u79F0",dataIndex:"name",ellipsis:!0,fixed:"left"},{title:"\u89D2\u8272\u7F16\u7801",dataIndex:"code",copyable:!0,search:!1},{title:"\u72B6\u6001",dataIndex:"enabled",search:!1,align:"center",render:function(f,d){return(0,e.jsx)(lr.Z,{checked:f,onChange:function(){var o=k()(a()().mark(function F(v){var C,x,m;return a()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(!v){h.next=9;break}return h.next=3,(0,U.Ko)(d.id);case 3:if(C=h.sent,x=C.success,!x){h.next=9;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),(m=r.current)===null||m===void 0||m.reload(),h.abrupt("return");case 9:fa({title:"\u8B66\u544A",icon:(0,e.jsx)(ur.Z,{}),content:"\u786E\u5B9A\u7981\u7528\u6B64\u89D2\u8272\uFF1F",okText:"\u786E\u5B9A",okType:"danger",cancelText:"\u53D6\u6D88",centered:!0,onOk:function(){var B=k()(a()().mark(function $(){var L,M,V;return a()().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,(0,U.RN)(d.id);case 2:if(L=O.sent,M=L.success,!M){O.next=8;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),(V=r.current)===null||V===void 0||V.reload(),O.abrupt("return");case 8:case"end":return O.stop()}},$)}));function w(){return B.apply(this,arguments)}return w}(),onCancel:function(){}});case 10:case"end":return h.stop()}},F)}));return function(F){return o.apply(this,arguments)}}()})}},{title:"\u89D2\u8272\u63CF\u8FF0",ellipsis:!0,dataIndex:"remark",search:!1,copyable:!1},{title:"\u64CD\u4F5C",align:"center",valueType:"option",width:180,fixed:"right",render:function(f,d){return[(0,e.jsx)("a",{target:"_blank",onClick:function(){t(!0),A(d.id)},children:"\u4FEE\u6539"},"update"),(0,e.jsx)(Se.Z,{title:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",placement:"bottomRight",icon:(0,e.jsx)(Ce.Z,{style:{color:"red"}}),onConfirm:k()(a()().mark(function o(){var F,v,C;return a()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,(0,U.AO)(d.id);case 2:if(F=m.sent,v=F.success,!v){m.next=8;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),(C=r.current)===null||C===void 0||C.reload(),m.abrupt("return");case 8:case"end":return m.stop()}},o)})),okText:"\u662F",cancelText:"\u5426",children:(0,e.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u5220\u9664"},"remove")},"delete")]}}];return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(we.Z,{columns:Z,pagination:{showQuickJumper:!0,defaultPageSize:10},rowSelection:{selections:[ve.Z.SELECTION_ALL,ve.Z.SELECTION_INVERT]},style:{height:"calc(100vh - 190px)",overflow:"auto"},cardProps:{style:{minHeight:"100%"}},scroll:{x:700},options:!1,tableAlertRender:function(f){var d=f.selectedRowKeys,o=f.onCleanSelected;return(0,e.jsx)(de.Z,{size:24,children:(0,e.jsxs)("span",{children:["\u5DF2\u9009 ",d.length," \u9879",(0,e.jsx)("a",{style:{marginLeft:8},onClick:o,children:"\u53D6\u6D88\u9009\u62E9"})]})})},tableAlertOptionRender:function(f){return(0,e.jsx)(de.Z,{size:16,children:(0,e.jsx)(Se.Z,{title:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",placement:"bottomRight",icon:(0,e.jsx)(Ce.Z,{style:{color:"red"}}),onConfirm:k()(a()().mark(function d(){var o,F,v;return a()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,(0,U.O0)(f.selectedRowKeys);case 2:if(o=x.sent,F=o.success,!F){x.next=9;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),f.onCleanSelected(),(v=r.current)===null||v===void 0||v.reload(),x.abrupt("return");case 9:case"end":return x.stop()}},d)})),okText:"\u662F",cancelText:"\u5426",children:(0,e.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u6279\u91CF\u5220\u9664"},"remove")},"delete")})},actionRef:r,params:{appId:n},request:U.TT,rowKey:"id",dateFormatter:"string",toolbar:{search:!1,actions:[(0,e.jsx)(fe.Z,{type:"primary",icon:(0,e.jsx)(ye.Z,{}),onClick:function(){b(!0)},children:"\u65B0\u589E\u89D2\u8272"},"create")]}}),(0,e.jsx)(ca,{appId:n,open:j,onCancel:function(){b(!1)},onFinish:function(){var i=k()(a()().mark(function f(d){var o,F,v,C;return a()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,(0,U.pW)(d);case 2:if(o=m.sent,F=o.success,v=o.result,!(F&&v)){m.next=10;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),(C=r.current)===null||C===void 0||C.reload(),b(!1),m.abrupt("return");case 10:case"end":return m.stop()}},f)}));return function(f){return i.apply(this,arguments)}}()}),(0,e.jsx)(ma,{id:c,open:s,onCancel:function(){t(!1)},onFinish:function(){var i=k()(a()().mark(function f(d){var o,F,v,C;return a()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,(0,U.UC)(d);case 2:o=m.sent,F=o.success,v=o.result,F&&v&&((C=r.current)===null||C===void 0||C.reload(),t(!1),K.ZP.success("\u64CD\u4F5C\u6210\u529F"));case 6:case"end":return m.stop()}},f)}));return function(f){return i.apply(this,arguments)}}()})]})},ha=function(T){var r=T.app,n=r.id,y=r.initLoginType,I=r.authorizationType,j=r.initLoginUrl,b=H.Z.useForm(),D=p()(b,1),u=D[0],s=(0,R.useState)(!0),t=p()(s,2),E=t[0],g=t[1];return(0,Q.Z)(k()(a()().mark(function c(){var A,Z,i;return a()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return g(!0),d.next=3,(0,U.hq)(n);case 3:A=d.sent,Z=A.result,i=A.success,i&&Z&&u.setFieldsValue({initLoginType:y,authorizationType:I,initLoginUrl:j}),g(!1);case 8:case"end":return d.stop()}},c)}))),(0,e.jsx)(re.Z,{spinning:E,children:(0,e.jsx)(ue.Z,{style:{backgroundColor:"#f1f1f2",border:"1px solid #f1f1f2"},message:"\u6682\u672A\u5B9E\u73B0"})})},ga=ha,Fa=function(T){var r=T.app,n=r.id,y=r.initLoginType,I=r.authorizationType,j=r.initLoginUrl,b=H.Z.useForm(),D=p()(b,1),u=D[0],s=(0,R.useState)(!0),t=p()(s,2),E=t[0],g=t[1];return(0,Q.Z)(k()(a()().mark(function c(){var A,Z,i;return a()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return g(!0),d.next=3,(0,U.hq)(n);case 3:A=d.sent,Z=A.result,i=A.success,i&&Z&&u.setFieldsValue(N()(N()({},Z),{},{initLoginType:y,authorizationType:I,initLoginUrl:j})),g(!1);case 8:case"end":return d.stop()}},c)}))),(0,e.jsx)(re.Z,{spinning:E,children:(0,e.jsx)(ue.Z,{style:{backgroundColor:"#f1f1f2",border:"1px solid #f1f1f2"},message:"\u6682\u672A\u5B9E\u73B0"})})},Ca=Fa,xa=function(T){var r=T.app,n=r.id,y=r.initLoginType,I=r.authorizationType,j=H.Z.useForm(),b=p()(j,1),D=b[0],u=(0,R.useState)(!0),s=p()(u,2),t=s[0],E=s[1];return(0,Q.Z)(k()(a()().mark(function g(){var c,A,Z;return a()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return E(!0),f.next=3,(0,U.hq)(n);case 3:c=f.sent,A=c.result,Z=c.success,Z&&A&&D.setFieldsValue({initLoginType:y,authorizationType:I}),E(!1);case 8:case"end":return f.stop()}},g)}))),(0,e.jsx)(re.Z,{spinning:t,children:(0,e.jsx)(ue.Z,{style:{backgroundColor:"#f1f1f2",border:"1px solid #f1f1f2"},message:"\u6682\u672A\u5B9E\u73B0"})})},Sa=xa,ya=S(5200),ba=S.n(ya),He=S(2236),je=S(52688),ae=S(64317),Ye=S(31199),ja=S(78234),or=S(69677),ie=S(17057),Ea=q.Z.Panel,Aa=function(T){var r=H.Z.useForm(),n=p()(r,1),y=n[0],I=T.protocolEndpoint,j=T.appId,b=T.collapsed,D=b===void 0?!0:b;return(0,Q.Z)(k()(a()().mark(function u(){return a()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:y.setFieldsValue(I);case 1:case"end":return t.stop()}},u)})),[j,I]),(0,e.jsx)(pe.A,{layout:"horizontal",labelCol:{xs:{span:24},sm:{span:6}},wrapperCol:{xs:{span:24},sm:{span:12}},labelAlign:"right",submitter:!1,form:y,children:(0,e.jsx)(q.Z,{ghost:!0,expandIconPosition:"start",defaultActiveKey:D?void 0:"config",children:(0,e.jsx)(Ea,{header:(0,e.jsx)("a",{children:"\u5E94\u7528\u914D\u7F6E\u4FE1\u606F"}),children:(0,e.jsx)(ue.Z,{style:{backgroundColor:"#f1f1f2",border:"1px solid #f1f1f2"},description:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(z.Z,{label:"Issuer",name:"issuer",extra:"\u7528\u4E8E\u6807\u8BC6 token \u53D1\u653E\u6765\u6E90\u7684\u5B57\u6BB5\u3002\u540C\u65F6\u662F\u4E0B\u8FF0\u63A5\u53E3\u7684 baseUrl\u3002",proFieldProps:{render:function(s){return s&&(0,e.jsx)(ie.Z.Text,{copyable:!0,children:s})}},readonly:!0,fieldProps:{autoComplete:"off"}}),(0,e.jsx)(z.Z,{label:"\u53D1\u73B0\u7AEF\u70B9",name:"discoveryEndpoint",extra:"\u7528\u4E8E\u83B7\u53D6\u5F53\u524D IAM \u652F\u6301\u7684\u5404\u7AEF\u70B9\u4FE1\u606F\u548C\u652F\u6301\u7684\u6A21\u5F0F\u3001\u53C2\u6570\u4FE1\u606F\uFF0C\u53EF\u516C\u5F00\u8BBF\u95EE\u3002",proFieldProps:{render:function(s){return s&&(0,e.jsx)(ie.Z.Text,{copyable:!0,children:s})}},readonly:!0,fieldProps:{autoComplete:"off"}}),(0,e.jsx)(z.Z,{label:"\u6388\u6743\u7AEF\u70B9",name:"authorizationEndpoint",extra:"\u5E94\u7528\u53D1\u8D77\u5355\u70B9\u767B\u5F55\u7684\u5730\u5740\u3002",proFieldProps:{render:function(s){return s&&(0,e.jsx)(ie.Z.Text,{copyable:!0,children:s})}},readonly:!0,fieldProps:{autoComplete:"off"}}),(0,e.jsx)(z.Z,{label:"\u4EE4\u724C\u7AEF\u70B9",name:"tokenEndpoint",extra:"\u5E94\u7528\u5728\u5355\u70B9\u767B\u5F55\u8FC7\u7A0B\u4E2D\uFF0C\u62FF\u5230 code \u540E\uFF0C\u4ECE\u540E\u7AEF\u53D1\u53BB\u6362\u53D6 token \u7684\u63A5\u53E3\u5730\u5740\u3002",proFieldProps:{render:function(s){return s&&(0,e.jsx)(ie.Z.Text,{copyable:!0,children:s})}},readonly:!0,fieldProps:{autoComplete:"off"}}),(0,e.jsx)(z.Z,{label:"\u4EE4\u724C\u540A\u9500\u7AEF\u70B9",name:"revokeEndpoint",proFieldProps:{render:function(s){return s&&(0,e.jsx)(ie.Z.Text,{copyable:!0,children:s})}},readonly:!0,fieldProps:{autoComplete:"off"}}),(0,e.jsx)(z.Z,{label:"\u9A8C\u7B7E\u516C\u94A5\u7AEF\u70B9",name:"jwksEndpoint",extra:"\u7528\u4E8E\u9A8C\u8BC1 id_token\u3001\u5B8C\u6210 SSO \u6D41\u7A0B\u7684\u516C\u94A5\u7AEF\u70B9\u3002\u516C\u94A5\u53EF\u80FD\u4F1A\u8F6E\u8F6C\u3002",proFieldProps:{render:function(s){return s&&(0,e.jsx)(ie.Z.Text,{copyable:!0,children:s})}},readonly:!0,fieldProps:{autoComplete:"off"}}),(0,e.jsx)(z.Z,{label:"\u7528\u6237\u4FE1\u606F\u7AEF\u70B9",name:"userinfoEndpoint",extra:"\u5728\u8D26\u6237\u767B\u5F55\u540E\uFF0C\u4F7F\u7528 access_token \u8C03\u7528\u7528\u6237\u4FE1\u606F\u7AEF\u70B9\uFF0C\u83B7\u53D6\u8D26\u6237\u57FA\u672C\u4FE1\u606F\u3002",proFieldProps:{render:function(s){return s&&(0,e.jsx)(ie.Z.Text,{copyable:!0,children:s})}},readonly:!0,fieldProps:{autoComplete:"off"}})]})})},"config")})})},Za=S(48689),Pa=q.Z.Panel,cr={labelCol:{span:6},wrapperCol:{span:12}},dr={wrapperCol:{span:12,offset:6}},Ia=function(T){var r=T.app,n=r.id,y=r.template,I=H.Z.useForm(),j=p()(I,1),b=j[0],D=(0,R.useState)({}),u=p()(D,2),s=u[0],t=u[1],E=(0,R.useState)(!0),g=p()(E,2),c=g[0],A=g[1];return(0,ja.Z)(k()(a()().mark(function Z(){var i,f,d,o;return a()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return A(!0),v.next=3,(0,U.hq)(n);case 3:i=v.sent,f=i.result,d=i.success,d&&f&&(b.setFieldsValue(N()(N()({appId:n},f),{},{redirectUris:((o=f.redirectUris)===null||o===void 0?void 0:o.length)>0?f.redirectUris:[void 0]})),t(f.protocolEndpoint)),A(!1);case 8:case"end":return v.stop()}},Z)}))),(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(re.Z,{spinning:c,children:[(0,e.jsx)(ue.Z,{showIcon:!0,message:(0,e.jsxs)("span",{children:["\u4E0D\u77E5\u9053\u600E\u4E48\u914D\u7F6E\uFF1F\u8BF7\u53C2\u8003 TopIAM \u914D\u7F6E"," ",(0,e.jsx)("a",{target:"_blank",href:"https://eiam.topiam.cn/docs/application/standard/oidc-sso",rel:"noreferrer",children:"OIDC \u5355\u70B9\u767B\u5F55"})," ","\u3002"]})}),(0,e.jsx)("br",{}),(0,e.jsxs)(pe.A,N()(N()({requiredMark:!0,layout:"horizontal"},cr),{},{form:b,scrollToFirstError:!0,onFinish:function(){var Z=k()(a()().mark(function i(f){var d,o;return a()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(0,U.$c)({id:n,template:y,config:(0,me.omit)(f,"id","template")});case 2:if(d=v.sent,o=d.success,!o){v.next=7;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),v.abrupt("return",!0);case 7:return K.ZP.error("\u64CD\u4F5C\u5931\u8D25"),v.abrupt("return",!1);case 9:case"end":return v.stop()}},i)}));return function(i){return Z.apply(this,arguments)}}(),submitter:{render:function(i,f){return(0,e.jsx)(He.S,{children:f})}},children:[(0,e.jsx)(z.Z,{name:"appId",hidden:!0}),(0,e.jsx)(W.Z.Group,{label:"\u6388\u6743\u6A21\u5F0F",layout:"vertical",name:"authGrantTypes",rules:[{required:!0,message:"\u8BF7\u52FE\u9009\u6388\u6743\u6A21\u5F0F"}],options:[{value:"authorization_code",label:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{style:{marginRight:"12px"},children:"\u6388\u6743\u7801\u6A21\u5F0F"}),(0,e.jsx)("span",{style:{color:"#999"},children:"authorization_code \u6A21\u5F0F\uFF0C\u7528\u4E8E\u8D26\u6237\u7684\u767B\u5F55\u8BA4\u8BC1\u3001\u6388\u6743\u3002"})]})},{value:"refresh_token",label:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{style:{marginRight:"12px"},children:"\u4EE4\u724C\u5237\u65B0\u6A21\u5F0F"}),(0,e.jsx)("span",{style:{color:"#999"},children:"refresh_token \u6A21\u5F0F\uFF0C\u7528\u4E8E\u65E2\u6709 token \u7684\u5EF6\u671F\u3002"})]})},{value:"implicit",label:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{style:{marginRight:"12px"},children:"\u9690\u5F0F\u6A21\u5F0F"}),(0,e.jsx)("span",{style:{color:"#999"},children:"implicit \u6A21\u5F0F\uFF0C\u7531\u4E8E\u534F\u8BAE\u672C\u8EAB\u7684\u5B89\u5168\u6027\uFF0C\u901A\u5E38\u4E0D\u63A8\u8350\u4F7F\u7528\u3002\u5982\u679C\u6709\u7279\u6B8A\u9700\u6C42\uFF0C\u53EF\u4EE5\u4F7F\u7528\u53D8\u4F53\u7684 PKCE \u7684\u6388\u6743\u7801\u6A21\u5F0F\u3002"})]})},{value:"password",label:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{style:{marginRight:"12px"},children:"\u5BC6\u7801\u6A21\u5F0F"}),(0,e.jsx)("span",{style:{color:"#999"},children:"password \u6A21\u5F0F\uFF0C\u7531\u4E8E\u534F\u8BAE\u672C\u8EAB\u7684\u5B89\u5168\u6027\uFF0C\u901A\u5E38\u4E0D\u63A8\u8350\u4F7F\u7528\u3002"})]})},{value:"device",disabled:!0,label:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{style:{marginRight:"12px"},children:"\u8BBE\u5907\u6A21\u5F0F"}),(0,e.jsx)("span",{style:{color:"#999"},children:"device \u6A21\u5F0F\uFF0C\u517C\u5BB9\u8BBE\u5907\u53D1\u8D77\u7684\u767B\u5F55\u6D41\u7A0B\u3002\uFF08\u6682\u4E0D\u652F\u6301\uFF09"})]})}]}),(0,e.jsx)(xe.Z,{name:["authGrantTypes"],children:function(i){var f=i.authGrantTypes;return(f==null?void 0:f.includes("authorization_code"))&&(0,e.jsx)(je.Z,{label:"PKCE\uFF08\u7528\u4E8E\u6388\u6743\u7801\u6A21\u5F0F\uFF09",name:"requireProofKey",extra:"PKCE \uFF08Proof Key for Code Exchange\uFF09\u662F OAuth 2.0 \u7684\u5B89\u5168\u6027\u6269\u5C55\u6A21\u5F0F\uFF0C\u7528\u4E8E\u9632\u62A4 CSRF\u3001\u4E2D\u95F4\u4EBA\u8FDB\u653B\u7B49\u6076\u610F\u653B\u51FB\u3002"})}}),(0,e.jsx)(H.Z.List,{name:"redirectUris",rules:[{validator:function(){var Z=k()(a()().mark(function f(d,o){return a()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(!(o&&o.length>0)){v.next=2;break}return v.abrupt("return");case 2:throw new Error("\u8BF7\u914D\u7F6E\u767B\u5F55 Redirect URI");case 3:case"end":return v.stop()}},f)}));function i(f,d){return Z.apply(this,arguments)}return i}()}],children:function(i,f,d){var o=f.add,F=f.remove;return ba()(d),(0,e.jsxs)(e.Fragment,{children:[i.map(function(v,C){return(0,R.createElement)(H.Z.Item,N()(N()({},C===0?cr:dr),{},{required:!1,key:v.key,label:C===0?"\u767B\u5F55 Redirect URI":"",extra:C===i.length-1&&"Redirect URI \u767D\u540D\u5355\uFF0C\u5E94\u7528\u5728\u8BF7\u6C42\u767B\u5F55\u65F6\u643A\u5E26 redirect_uri \u53C2\u6570\uFF0C\u8BE5\u503C\u9700\u8981\u5728\u767D\u540D\u5355\u4E2D\uFF0CIAM \u624D\u4F1A\u5728\u8BA4\u8BC1\u5B8C\u6210\u540E\u53D1\u8D77\u8DF3\u8F6C\u3002\u82E5\u6709\u591A\u6761\uFF0C\u8BF7\u70B9\u51FB\u6DFB\u52A0\u8FDB\u884C\u6269\u5C55"}),(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,e.jsx)(H.Z.Item,N()(N()({},v),{},{validateTrigger:["onChange","onBlur"],rules:[{required:!0,message:"\u8BF7\u914D\u7F6E\u767B\u5F55 Redirect URI"},{type:"url",message:"Redirect URI \u683C\u5F0F\u4E0D\u6B63\u786E"}],noStyle:!0,children:(0,e.jsx)(or.Z,{placeholder:"\u8BF7\u8F93\u5165\u767B\u5F55 Redirect URI"})})),i.length>1?(0,e.jsx)(Za.Z,{onClick:function(){return F(v.name)}}):null]}))}),(0,e.jsx)(H.Z.Item,N()(N()({},dr),{},{children:(0,e.jsx)(fe.Z,{type:"dashed",onClick:function(){return o()},icon:(0,e.jsx)(ye.Z,{}),style:{width:"100%"},children:"\u6DFB\u52A0"})}))]})}}),(0,e.jsx)(ae.Z,{label:"\u6388\u6743\u8303\u56F4",name:"authorizationType",allowClear:!1,extra:"\u82E5\u9009\u62E9\u624B\u52A8\u6388\u6743\uFF0C\u9700\u8981\u5728 \u8BBF\u95EE\u6388\u6743 \u4E2D\u8FDB\u884C\u6743\u9650\u5206\u914D\u3002",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6388\u6743\u8303\u56F4"}],options:[{value:ge.AUTHORIZATION,label:"\u624B\u52A8\u6388\u6743"},{value:ge.ALL_ACCESS,label:"\u5168\u5458\u53EF\u8BBF\u95EE"}]}),(0,e.jsx)(ae.Z,{label:"SSO \u53D1\u8D77\u65B9",name:"initLoginType",allowClear:!1,rules:[{required:!0,message:"\u8BF7\u914D\u7F6E SSO \u53D1\u8D77\u65B9"}],options:[{value:he.APP,label:"\u53EA\u5141\u8BB8\u5E94\u7528\u53D1\u8D77"},{value:he.PORTAL_OR_APP,label:"\u652F\u6301\u95E8\u6237\u548C\u5E94\u7528\u53D1\u8D77"}],extra:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{children:"\u95E8\u6237\u53D1\u8D77\uFF1A\u7531 IAM \u95E8\u6237\u9875\u70B9\u51FB\u8FDB\u884C SSO \u3002"}),(0,e.jsx)("br",{}),(0,e.jsx)("span",{children:"\u5E94\u7528\u53D1\u8D77\uFF1A\u7531\u5E94\u7528\u767B\u5F55\u4E3B\u52A8\u53D1\u8D77\u3002"})]})}),(0,e.jsx)(xe.Z,{name:["initLoginType"],children:function(i){return(i==null?void 0:i.initLoginType)===he.PORTAL_OR_APP&&(0,e.jsx)(z.Z,{label:"\u767B\u5F55\u53D1\u8D77\u5730\u5740",name:"initLoginUrl",rules:[{required:!0,message:"\u767B\u5F55\u53D1\u8D77\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"}],fieldProps:{placeholder:"\u8BF7\u8F93\u5165\u767B\u5F55\u94FE\u63A5"},extra:"\u82E5\u60A8\u5E0C\u671B\u7531 TopIAM \u95E8\u6237\u9875\u8BBF\u95EE\u5E94\u7528\uFF0C\u8BF7\u586B\u5199 TopIAM \u53D1\u8D77 SSO \u8BF7\u6C42\u8BBF\u95EE\u7684\u5E94\u7528\u5730\u5740\u3002\u8BE5\u5730\u5740\u63A5\u6536\u5230\u8BF7\u6C42\uFF0C\u5E94\u5373\u523B\u8F6C\u5411 TopIAM / authorize \u6388\u6743\u7AEF\u70B9\u3002"})}}),(0,e.jsx)(ee.Z,{style:{margin:0}}),(0,e.jsx)(q.Z,{ghost:!0,expandIconPosition:"start",defaultActiveKey:"advanced",children:(0,e.jsxs)(Pa,{header:(0,e.jsx)("a",{children:"\u663E\u793A\u9AD8\u7EA7\u914D\u7F6E"}),children:[(0,e.jsx)(W.Z.Group,{label:"\u7528\u6237\u4FE1\u606F\u8303\u56F4",layout:"vertical",name:"grantScopes",rules:[{required:!0,message:"\u8BF7\u52FE\u9009\u7528\u6237\u4FE1\u606F\u8303\u56F4"}],extra:"\u7528\u6237\u767B\u5F55\u540E\uFF0C\u4F7F\u7528\u7528\u6237\u4FE1\u606F\u7AEF\u70B9\u6216\u89E3\u6790 id_token \u53EF\u4EE5\u83B7\u53D6\u5230\u7684\u5DF2\u767B\u5F55\u7528\u6237\u4FE1\u606F \u3002",options:[{value:"openid",label:"openid",disabled:!0},{value:"email",label:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{style:{marginRight:"12px"},children:"email"}),(0,e.jsx)("span",{style:{color:"#999"},children:"\u5E94\u7528\u53EF\u83B7\u53D6\u767B\u5F55\u7528\u6237\u90AE\u7BB1\u4FE1\u606F\u3002"})]})},{value:"phone",label:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{style:{marginRight:"12px"},children:"phone"}),(0,e.jsx)("span",{style:{color:"#999"},children:"\u5E94\u7528\u53EF\u83B7\u53D6\u767B\u5F55\u7528\u6237\u624B\u673A\u4FE1\u606F\u3002"})]})},{value:"profile",label:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{style:{marginRight:"12px"},children:"profile"}),(0,e.jsx)("span",{style:{color:"#999"},children:"\u5E94\u7528\u53EF\u83B7\u53D6\u767B\u5F55\u7528\u6237\u8BE6\u60C5\u4FE1\u606F\u3002"})]})}]}),(0,e.jsx)(Ye.Z,{label:"access_token \u6709\u6548\u671F",name:"accessTokenTimeToLive",addonAfter:"\u5206\u949F",extra:"access_token \u7528\u4E8E\u8BF7\u6C42 IAM \u63A5\u53E3\uFF0C\u8FC7\u671F\u540E\u9700\u8981\u4F7F\u7528 refresh_token \u5237\u65B0\uFF0C\u6216\u91CD\u65B0\u767B\u5F55\u3002"}),(0,e.jsx)(Ye.Z,{label:"refresh_token \u6709\u6548\u671F",name:"refreshTokenTimeToLive",addonAfter:"\u5206\u949F",extra:"\u7528\u4E8E\u83B7\u53D6\u65B0\u7684 access_token \u548C id_token\uFF0Crefresh_token \u8FC7\u671F\u540E\uFF0C\u7528\u6237\u9700\u8981\u91CD\u65B0\u767B\u5F55\u3002"}),(0,e.jsx)(Ye.Z,{label:"id_token \u6709\u6548\u671F",readonly:!0,name:"idTokenTimeToLive",addonAfter:"\u5206\u949F\uFF08\u6682\u4E0D\u652F\u6301\u4FEE\u6539\uFF09",extra:"id_token \u7528\u4E8E\u9274\u522B\u7528\u6237\u8EAB\u4EFD\uFF0CJWT\u683C\u5F0F\uFF0C\u5141\u8BB8\u5E94\u7528\u4F7F\u7528\u516C\u94A5\u81EA\u884C\u9A8C\u8BC1\u7528\u6237\u8EAB\u4EFD\u3002\u6700\u5C0F5\u5206\u949F\uFF0C\u6700\u592724\u5C0F\u65F6\uFF0C\u8FC7\u671F\u540E\u9700\u8981\u4F7F\u7528refresh_token \u5237\u65B0\uFF0C\u6216\u91CD\u65B0\u767B\u5F55\u3002"}),(0,e.jsx)(ae.Z,{options:[{value:"ES256",label:"ES256"},{value:"RS256",label:"RS256"}],label:"id_token \u7B7E\u540D\u7B97\u6CD5",name:"idTokenSignatureAlgorithm",allowClear:!1,extra:"id_token \u7B7E\u540D\u4F7F\u7528\u7684\u975E\u5BF9\u79F0\u7B97\u6CD5\u3002",rules:[{required:!0,message:"\u8BF7\u914D\u7F6E id_token \u7B7E\u540D\u7B97\u6CD5"}]})]},"advanced")})]})),(0,e.jsx)(ee.Z,{style:{margin:0}}),(0,e.jsx)(Aa,{appId:n,protocolEndpoint:s,collapsed:!0})]})})},wa=Ia,Ra=S(59022),pr=S(66017),Ta=q.Z.Panel,mr=function(T){var r=H.Z.useForm(),n=p()(r,1),y=n[0],I=T.protocolEndpoint,j=T.appId,b=T.collapsed,D=b===void 0?!0:b;(0,Q.Z)(k()(a()().mark(function s(){return a()().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:y.setFieldsValue(I);case 1:case"end":return E.stop()}},s)})),[j,I]),(0,Q.Z)(k()(a()().mark(function s(){var t;return a()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(0,U.O$)(j,ke.SAML_SIGN);case 2:t=g.sent,t.success&&t.result&&t.result.forEach(function(c){c.usingType===ke.SAML_SIGN&&y.setFieldsValue({idpSignCert:c.cert})});case 4:case"end":return g.stop()}},s)})),[j]);var u=function(){var t=y.getFieldValue("idpSignCert");if(!!t){var E=new Blob([t],{type:"application/x-x509-ca-cert"}),g=URL.createObjectURL(E),c=document.createElement("a");c.href=g,c.download=j+"sign.cer",document.documentElement.appendChild(c),c.click(),document.documentElement.removeChild(c)}};return(0,e.jsx)(pe.A,{layout:"horizontal",labelCol:{xs:{span:24},sm:{span:6}},wrapperCol:{xs:{span:24},sm:{span:12}},labelAlign:"right",submitter:!1,form:y,scrollToFirstError:!0,children:(0,e.jsx)(q.Z,{ghost:!0,expandIconPosition:"start",defaultActiveKey:D?void 0:"config",children:(0,e.jsx)(Ta,{header:(0,e.jsx)("a",{children:"\u5E94\u7528\u914D\u7F6E\u4FE1\u606F"}),children:(0,e.jsx)(ue.Z,{style:{backgroundColor:"#f1f1f2",border:"1px solid #f1f1f2"},description:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(z.Z,{label:"IdP \u5143\u6570\u636E",name:"idpMetaEndpoint",extra:"\u82E5\u5E94\u7528\u652F\u6301 metadata \u914D\u7F6E\u4FE1\u606F\u4E0A\u4F20/\u62C9\u53D6\uFF0C\u53EF\u4EE5\u8282\u7701\u5927\u91CF\u914D\u7F6E\u6B65\u9AA4\u3002\u8BF7\u5728\u5E94\u7528 SSO \u914D\u7F6E\u4E2D\u5BFB\u627E\u662F\u5426\u6709 metadata \u4E0A\u4F20\u80FD\u529B\u3002",proFieldProps:{render:function(t){return t&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(ie.Z.Text,{copyable:!0,children:t}),(0,e.jsxs)("a",{style:{whiteSpace:"nowrap",marginLeft:"10px"},onClick:k()(a()().mark(function E(){return a()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,U.zA)(j);case 2:case"end":return c.stop()}},E)})),children:[(0,e.jsx)(pr.Z,{}),"\u4E0B\u8F7D"]})]})}},readonly:!0,fieldProps:{autoComplete:"off"}}),(0,e.jsx)(z.Z,{label:"IdP \u552F\u4E00\u6807\u8BC6",name:"idpEntityIdEndpoint",extra:"IAM \u5728\u5E94\u7528\u4E2D\u7684\u6807\u8BC6\u3002\u9700\u8981\u5C06\u503C\u586B\u5199\u5728\u5E94\u7528\u5355\u70B9\u767B\u5F55\u914D\u7F6E\u4E2D\u3002",readonly:!0,proFieldProps:{render:function(t){return t&&(0,e.jsx)(ie.Z.Text,{copyable:!0,children:t})}},fieldProps:{autoComplete:"off"}}),(0,e.jsx)(z.Z,{label:"IdP SSO \u5730\u5740",name:"idpSsoEndpoint",extra:"SAML \u534F\u8BAE\u652F\u6301 SP \u53D1\u8D77\u5355\u70B9\u767B\u5F55\uFF0C\u53EF\u80FD\u9700\u8981\u586B\u5199\u6B64\u5730\u5740\u5728\u5E94\u7528\u914D\u7F6E\u4E2D\u3002\u7531 IAM \u63D0\u4F9B\u3002\u53EF\u4EE5\u76F4\u63A5\u8BBF\u95EE\u8BE5\u5730\u5740\uFF0C\u8FDB\u884C\u5E94\u7528\u767B\u5F55\u3002",readonly:!0,proFieldProps:{render:function(t){return t&&(0,e.jsx)(ie.Z.Text,{copyable:!0,children:t})}},fieldProps:{autoComplete:"off"}}),(0,e.jsx)(z.Z,{label:"\u5355\u70B9\u9000\u51FA\u5730\u5740",name:"idpSloEndpoint",extra:"SAML \u534F\u8BAE\u652F\u6301\u5355\u70B9\u9000\u51FA\uFF0C\u53EF\u80FD\u9700\u8981\u586B\u5199\u6B64\u5730\u5740\u5728\u5E94\u7528\u914D\u7F6E\u4E2D\u3002\u7531 IAM \u63D0\u4F9B\u3002",readonly:!0,proFieldProps:{render:function(t){return t&&(0,e.jsx)(ie.Z.Text,{copyable:!0,children:t})}},fieldProps:{autoComplete:"off"}}),(0,e.jsx)(be.Z,{label:"\u7B7E\u540D\u516C\u94A5\u8BC1\u4E66",name:"idpSignCert",disabled:!0,fieldProps:{autoComplete:"off",rows:3},extra:(0,e.jsxs)("div",{style:{display:"inline-block"},children:[(0,e.jsx)("div",{style:{display:"inline-block"},children:"\u4E0B\u8F7D\u6216\u590D\u5236\u8BC1\u4E66\uFF0C\u5E76\u5BFC\u5165\u6216\u7C98\u8D34\u5230\u5E94\u7528\u4E2D\u3002"}),(0,e.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,e.jsx)(ie.Z.Paragraph,{style:{display:"inline-block"},copyable:{text:y.getFieldValue("idpSignCert")},children:(0,e.jsx)("a",{children:"\u590D\u5236\u8BC1\u4E66\u5185\u5BB9"})}),(0,e.jsxs)("a",{onClick:u,children:["\u4E0B\u8F7D\u8BC1\u4E66 .cer \u6587\u4EF6",(0,e.jsx)(pr.Z,{})]})]})]})})]})})},"config")})})},Ba=function(T){var r=T.app,n=r.id,y=r.template,I=H.Z.useForm(),j=p()(I,1),b=j[0],D=(0,R.useState)(!0),u=p()(D,2),s=u[0],t=u[1],E=(0,R.useState)([]),g=p()(E,2),c=g[0],A=g[1],Z=(0,R.useState)({}),i=p()(Z,2),f=i[0],d=i[1];return(0,Q.Z)(k()(a()().mark(function o(){var F,v,C;return a()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return t(!0),(0,U.P3)(y).then(function(l){var h=l.success,B=l.result;h&&A(B)}),m.next=4,(0,U.hq)(n);case 4:F=m.sent,v=F.result,C=F.success,C&&v&&(b.setFieldsValue(N()({},(0,me.omit)(v,"protocolEndpoint"))),d(v.protocolEndpoint)),t(!1);case 9:case"end":return m.stop()}},o)})),[]),(0,e.jsxs)(re.Z,{spinning:s,children:[(0,e.jsx)(ue.Z,{showIcon:!0,message:(0,e.jsxs)(e.Fragment,{children:["\u4E0D\u77E5\u9053\u600E\u4E48\u914D\u7F6E\uFF1F\u8BF7\u53C2\u8003 ",(0,e.jsx)("a",{children:"\u5BF9\u63A5\u6587\u6863 "})," \u3002"]})}),(0,e.jsx)("br",{}),(0,e.jsxs)(pe.A,{requiredMark:!0,layout:"horizontal",labelCol:{span:6},wrapperCol:{span:12},form:b,scrollToFirstError:!0,onFinish:function(){var o=k()(a()().mark(function F(v){var C,x;return a()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,(0,U.$c)({id:n,template:y,config:(0,me.omit)(v,"id","template")});case 2:if(C=l.sent,x=C.success,!x){l.next=7;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),l.abrupt("return",!0);case 7:return K.ZP.error("\u64CD\u4F5C\u5931\u8D25"),l.abrupt("return",!1);case 9:case"end":return l.stop()}},F)}));return function(F){return o.apply(this,arguments)}}(),submitter:{render:function(F,v){return(0,e.jsx)(He.S,{children:v})}},children:[(0,e.jsx)(Ra.Z,{layoutType:"Embed",columns:c,shouldUpdate:!1}),(0,e.jsx)(ae.Z,{label:"\u6388\u6743\u8303\u56F4",name:"authorizationType",allowClear:!1,extra:"\u82E5\u9009\u62E9\u624B\u52A8\u6388\u6743\uFF0C\u9700\u8981\u5728 \u8BBF\u95EE\u6388\u6743 \u4E2D\u8FDB\u884C\u6743\u9650\u5206\u914D\u3002",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6388\u6743\u8303\u56F4"}],options:[{value:ge.AUTHORIZATION,label:"\u624B\u52A8\u6388\u6743"},{value:ge.ALL_ACCESS,label:"\u5168\u5458\u53EF\u8BBF\u95EE"}]})]}),(0,e.jsx)(ee.Z,{style:{margin:0}}),(0,e.jsx)(mr,{appId:n,protocolEndpoint:f,collapsed:!1})]})},Da=S(4499),$a=Ve.ZP.ConfigContext;function Oa(){var T=(0,R.useContext)($a),r=T.getPrefixCls,n=".".concat(r()),y=(0,ar.l)(function(){return se()({},"".concat(n,"-form-item"),{div:se()({},"".concat(n,"-form-item-control-input"),{width:"100%"})})});return{className:y}}var La=S(2058),We=S(83062),ka=q.Z.Panel,fr={labelCol:{xs:{span:24},sm:{span:7},md:{span:6}},wrapperCol:{xs:{span:24},sm:{span:13},md:{span:14}}},Ma=function(T){var r=T.app,n=r.id,y=r.template,I=H.Z.useForm(),j=p()(I,1),b=j[0],D=H.Z.useForm(),u=p()(D,1),s=u[0],t=(0,R.useState)(!0),E=p()(t,2),g=E[0],c=E[1],A=(0,R.useState)(),Z=p()(A,2),i=Z[0],f=Z[1],d=(0,R.useState)({}),o=p()(d,2),F=o[0],v=o[1],C=(0,R.useState)(function(){return[]}),x=p()(C,2),m=x[0],l=x[1],h=H.Z.useForm(),B=p()(h,1),w=B[0],$=Oa(),L=$.className,M=function(){var P=k()(a()().mark(function O(){var G,_,te,oe;return a()().wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return c(!0),J.next=3,(0,U.hq)(n);case 3:G=J.sent,_=G.result,te=G.success,te&&_&&(b.setFieldsValue(N()({},(0,me.omit)(_,"protocolEndpoint"))),l((oe=_.attributeStatements)===null||oe===void 0?void 0:oe.map(function(vr){return vr.key})),v(_.protocolEndpoint)),c(!1);case 8:case"end":return J.stop()}},O)}));return function(){return P.apply(this,arguments)}}();(0,Q.Z)(k()(a()().mark(function P(){return a()().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.next=2,M();case 2:case"end":return G.stop()}},P)})),[]);var V=function(O){b.setFieldsValue({assertSigned:O.wantAssertionsSigned,spRequestsSigned:O.authnRequestsSigned,spSignCert:O.signCert,spAcsUrl:O.acsUrl,spEntityId:O.entityId,nameIdFormat:O.defaultNameIdFormat,acsBinding:O.defaultAcsBinding,spSloEnabled:O.sloEnabled,spSlsUrl:O.slsUrl,spSlsBinding:O.slsBinding})};return(0,e.jsx)("div",{className:L,children:(0,e.jsxs)(re.Z,{spinning:g,children:[(0,e.jsx)(ue.Z,{showIcon:!0,message:(0,e.jsxs)("span",{children:["\u4E0D\u77E5\u9053\u600E\u4E48\u914D\u7F6E\uFF1F\u8BF7\u53C2\u8003 TopIAM \u914D\u7F6E"," ",(0,e.jsx)("a",{target:"_blank",href:"https://eiam.topiam.cn/docs/application/standard/saml2-sso",rel:"noreferrer",children:"SAML \u5355\u70B9\u767B\u5F55"})," ","\u3002"]})}),(0,e.jsx)("br",{}),(0,e.jsx)(pe.A,N()(N()({layout:"horizontal"},fr),{},{form:s,submitter:!1,children:(0,e.jsx)(Da.Z,{rules:[{type:"url",message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u5E94\u7528 metadata \u5730\u5740"}],colon:!1,label:(0,e.jsxs)(de.Z,{children:[(0,e.jsx)(La.Z,{showUploadList:!1,name:"file",maxCount:1,beforeUpload:function(){return!1},withCredentials:!0,accept:".xml",onChange:function(){var P=k()(a()().mark(function G(_){var te,oe,ne,J;return a()().wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return te=Fe()(_.fileList),c(!0),c(!0),Te.next=5,(0,U.ZG)(te==null?void 0:te[0]);case 5:oe=Te.sent,ne=oe.result,J=oe.success,c(!1),J&&ne&&V(ne);case 10:case"end":return Te.stop()}},G)}));function O(G){return P.apply(this,arguments)}return O}(),children:(0,e.jsx)(fe.Z,{children:"\u4E0A\u4F20 SP \u5143\u6570\u636E "})}),(0,e.jsx)("span",{children:"\u6216"})]}),name:"metaDataUrl",extra:"SP \u5143\u6570\u636E\u4E3A\u5E94\u7528\u4FA7\u751F\u6210\u7684 SSO \u914D\u7F6E\u6587\u4EF6\u3002\u82E5\u5DF2\u6709\u5143\u6570\u636E\uFF0C\u76F4\u63A5\u5BFC\u5165\uFF0C\u53EF\u81EA\u52A8\u586B\u5145\u4E0B\u65B9 SSO \u53C2\u6570\uFF0C\u7B80\u5355\u5FEB\u6377\u3002",addonAfter:(0,e.jsx)(fe.Z,{onClick:k()(a()().mark(function P(){var O,G,_,te;return a()().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(O=s.getFieldValue("metaDataUrl"),O){ne.next=4;break}return K.ZP.error("\u8BF7\u8F93\u5165\u5E94\u7528 metadata \u5730\u5740"),ne.abrupt("return");case 4:return ne.next=6,s.validateFields();case 6:return c(!0),ne.next=9,(0,U.XW)(O);case 9:G=ne.sent,_=G.result,te=G.success,c(!1),te&&_&&V(_);case 14:case"end":return ne.stop()}},P)})),children:"\u89E3\u6790"}),children:(0,e.jsx)(or.Z,{allowClear:!0,placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528 metadata \u5730\u5740"})})})),(0,e.jsxs)(pe.A,N()(N()({scrollToFirstError:!0,requiredMark:!0,layout:"horizontal"},fr),{},{form:b,onFinish:function(){var P=k()(a()().mark(function O(G){var _,te,oe;return a()().wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return J.next=2,w.validateFields();case 2:if(_=J.sent,c(!0),!_){J.next=15;break}return J.next=7,(0,U.$c)({id:n,template:y,config:(0,me.omit)(G,"id","template")});case 7:if(te=J.sent,oe=te.success,!oe){J.next=14;break}return K.ZP.success("\u4FDD\u5B58\u6210\u529F"),J.next=13,M();case 13:return J.abrupt("return",!0);case 14:K.ZP.error("\u4FDD\u5B58\u5931\u8D25");case 15:return c(!1),J.abrupt("return",!1);case 17:case"end":return J.stop()}},O)}));return function(O){return P.apply(this,arguments)}}(),submitter:{render:function(O,G){return(0,e.jsx)(He.S,{children:G})}},children:[(0,e.jsx)(z.Z,{label:"ACS URL",name:"spAcsUrl",fieldProps:{placeholder:"\u8BF7\u8F93\u5165\u5355\u70B9\u767B\u5F55\u5730\u5740"},extra:"\u5E94\u7528\u7684 SAML SSO \u6838\u5FC3\u5730\u5740\uFF0C\u4E0E IAM \u4EA4\u4E92\u5904\u7406\u5355\u70B9\u767B\u5F55\u8BF7\u6C42\u3002",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u70B9\u767B\u5F55\u5730\u5740"}]}),(0,e.jsx)(z.Z,{label:"SP Entity ID",name:"spEntityId",fieldProps:{placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u552F\u4E00\u6807\u8BC6"},allowClear:!1,extra:"\u5E94\u7528\u5728 IAM \u4E2D\u7684\u6807\u8BC6\uFF0C\u901A\u5E38\u5728\u5E94\u7528\u4FA7\u83B7\u53D6\uFF0C\u683C\u5F0F\u901A\u5E38\u4E3A\u5E94\u7528 URI\u3002",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5E94\u7528\u552F\u4E00\u6807\u8BC6"}]}),(0,e.jsx)(ae.Z,{label:"Name ID \u7C7B\u578B",name:"nameIdValueType",options:[{value:"user.username",label:"\u7528\u6237\u540D"},{value:"user.fullName",label:"\u7528\u6237\u59D3\u540D"},{value:"user.nickName",label:"\u7528\u6237\u6635\u79F0"},{value:"user.email",label:"\u90AE\u7BB1\u5730\u5740"},{value:"app_user.username",label:"\u5E94\u7528\u8D26\u6237"}],fieldProps:{allowClear:!1},extra:"\u5355\u70B9\u767B\u5F55\u65F6\uFF0C\u5C06\u9009\u4E2D\u9879\u4F5C\u4E3A\u8D26\u6237\u6807\u8BC6\uFF0C\u4F20\u9012\u7ED9\u4E1A\u52A1\u7CFB\u7EDF\u3002",rules:[{required:!0,message:"\u8BF7\u9009\u62E9 Name ID"}]}),(0,e.jsx)(ee.Z,{}),(0,e.jsx)(ae.Z,{label:"\u6388\u6743\u8303\u56F4",name:"authorizationType",allowClear:!1,extra:"\u82E5\u9009\u62E9\u624B\u52A8\u6388\u6743\uFF0C\u9700\u8981\u5728 \u8BBF\u95EE\u6388\u6743 \u4E2D\u8FDB\u884C\u6743\u9650\u5206\u914D\u3002",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6388\u6743\u8303\u56F4"}],options:[{value:ge.AUTHORIZATION,label:"\u624B\u52A8\u6388\u6743"},{value:ge.ALL_ACCESS,label:"\u5168\u5458\u53EF\u8BBF\u95EE"}]}),(0,e.jsx)(ae.Z,{label:"SSO \u53D1\u8D77\u65B9",name:"initLoginType",allowClear:!1,rules:[{required:!0,message:"\u8BF7\u914D\u7F6E SSO \u53D1\u8D77\u65B9"}],fieldProps:{onChange:function(O){if(he.APP===O){f([{required:!0,message:"\u767B\u5F55\u53D1\u8D77\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"}]);return}b.setFields([{name:"initLoginUrl",errors:[]}]),f([])}},options:[{value:he.APP,label:"\u53EA\u5141\u8BB8\u5E94\u7528\u53D1\u8D77"},{value:he.PORTAL_OR_APP,label:"\u652F\u6301\u95E8\u6237\u548C\u5E94\u7528\u53D1\u8D77"}],extra:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{children:"\u95E8\u6237\u53D1\u8D77\uFF1A\u7531 IAM \u95E8\u6237\u9875\u70B9\u51FB\u8FDB\u884C SSO \u3002"}),(0,e.jsx)("br",{}),(0,e.jsx)("span",{children:"\u5E94\u7528\u53D1\u8D77\uFF1A\u7531\u5E94\u7528\u767B\u5F55\u4E3B\u52A8\u53D1\u8D77\u3002"})]})}),(0,e.jsx)(z.Z,{label:"\u767B\u5F55\u53D1\u8D77\u5730\u5740",name:"initLoginUrl",rules:i,fieldProps:{placeholder:"\u8BF7\u8F93\u5165\u767B\u5F55\u94FE\u63A5"},extra:"\u82E5\u5E94\u7528\u4EC5\u652F\u6301 SP \u53D1\u8D77 SSO\uFF0C\u60A8\u53C8\u5E0C\u671B\u5B9E\u73B0\u7531 IAM \u95E8\u6237\u9875\u53D1\u8D77\u767B\u5F55\uFF0C\u8BF7\u586B\u5199\u6B64\u9879\u3002\u95E8\u6237\u9875\u8BBF\u95EE\u5E94\u7528\u65F6\uFF0CIAM \u4F1A\u8DF3\u8F6C\u5230\u672C\u5730\u5740\uFF0C\u5E94\u5373\u523B\u81EA\u52A8\u5411 IAM \u53D1\u8D77 SAMLRequest \u767B\u5F55\u8BF7\u6C42\u3002\u5730\u5740\u53EF\u586B\u5199\u4E3A\u4EFB\u610F\u53D7\u4FDD\u62A4\u8D44\u6E90\u8BBF\u95EE\u5730\u5740\uFF0C\u5728\u672A\u767B\u5F55\u65F6\u4F1A\u81EA\u52A8\u89E6\u53D1 SAMLRequest \u5373\u53EF\u3002"}),(0,e.jsx)(ee.Z,{style:{margin:0}}),(0,e.jsx)(q.Z,{ghost:!0,expandIconPosition:"start",children:(0,e.jsxs)(ka,{header:(0,e.jsx)("a",{children:"\u663E\u793A\u9AD8\u7EA7\u914D\u7F6E"}),children:[(0,e.jsx)(z.Z,{label:"\u9ED8\u8BA4RelayState",name:"relayState",rules:[{type:"url",message:"RelayState \u683C\u5F0F\u4E0D\u6B63\u786E"}],fieldProps:{placeholder:"\u8BF7\u8F93\u5165\u9ED8\u8BA4\u8DF3\u8F6C\u5730\u5740"},extra:"IDP \u53D1\u8D77 SSO \u767B\u5F55\u6210\u529F\u540E\uFF0C\u5E94\u7528\u5E94\u81EA\u52A8\u8DF3\u8F6C\u7684\u5730\u5740\u3002\u5728 SAML Response \u4E2D\u4F1A\u5728 RelayState \u53C2\u6570\u4E2D\u4F20\u9012\uFF0C\u5E94\u7528\u8BFB\u53D6\u540E\u5B9E\u73B0\u8DF3\u8F6C\u3002"}),(0,e.jsx)(ee.Z,{orientation:"left",plain:!0,children:"\u65AD\u8A00"}),(0,e.jsx)(z.Z,{label:"Audience",name:"audience",allowClear:!1,extra:"SAML\u65AD\u8A00\u7684\u76EE\u6807\u53D7\u4F17\uFF0C\u9ED8\u8BA4\u548CSP Entity ID\u76F8\u540C\u3002",placeholder:"\u8BF7\u8F93\u5165SAML\u65AD\u8A00\u7684\u76EE\u6807\u53D7\u4F17"}),(0,e.jsx)(ae.Z,{label:"NameID \u683C\u5F0F",name:"nameIdFormat",allowClear:!1,initialValue:"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified",rules:[{required:!0,message:"\u8BF7\u9009\u62E9 NameID \u5B57\u6BB5\u683C\u5F0F"}],extra:"SAML Response \u4E2D\u6307\u5B9A\u8D26\u6237\u6807\u8BC6 NameID \u5B57\u6BB5\u683C\u5F0F\u3002",options:[{value:"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified",label:"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"},{value:"urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",label:"urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"},{value:"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",label:"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"},{value:"urn:oasis:names:tc:SAML:2.0:nameid-format:transient",label:"urn:oasis:names:tc:SAML:2.0:nameid-format:transient"}]}),(0,e.jsx)(ae.Z,{label:"ACS \u7ED1\u5B9A\u7C7B\u578B",name:"acsBinding",allowClear:!1,rules:[{required:!0,message:"\u8BF7\u9009\u62E9 ACS \u7ED1\u5B9A\u7C7B\u578B"}],extra:" \u6307\u5B9AIDP\u5411SP\u53D1\u9001\u65AD\u8A00\u8BF7\u6C42\u7684\u65B9\u5F0F\u3002",options:[{value:"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST",label:"HTTP-POST"},{value:"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect",label:"HTTP-Redirect"}]}),(0,e.jsx)(je.Z,{label:"\u662F\u5426\u52A0\u5BC6\u65AD\u8A00",name:"assertEncrypted",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u5BF9\u65AD\u8A00\u52A0\u5BC6"}]}),(0,e.jsx)(xe.Z,{name:["assertEncrypted"],children:function(O){var G=O.assertEncrypted;return G&&(0,e.jsx)(ae.Z,{label:"\u65AD\u8A00\u52A0\u5BC6\u7B97\u6CD5",name:"assertEncryptAlgorithm",extra:"\u65AD\u8A00\u52A0\u5BC6\u4F7F\u7528\u7684\u7B97\u6CD5",allowClear:!1,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u65AD\u8A00\u52A0\u5BC6\u4F7F\u7528\u7684\u7B97\u6CD5"}],options:[{value:"http://www.w3.org/2001/04/xmlenc#aes128-cbc",label:"AES128-CBC"},{value:"http://www.w3.org/2001/04/xmlenc#aes256-cbc",label:"AES256-CBC"}]})}}),(0,e.jsx)(je.Z,{label:"\u662F\u5426\u7B7E\u540D\u65AD\u8A00",name:"assertSigned",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u5BF9\u65AD\u8A00\u7B7E\u540D"}],initialValue:!0,extra:"\u662F\u5426\u5BF9\u65AD\u8A00\u4F7F\u7528IdP\u7684\u8BC1\u4E66\u7B7E\u540D\uFF0C\u5BF9\u5E94SP\u5143\u6570\u636E\u6587\u4EF6\u4E2D\u201CWantAssertionsSigned\u201D\u503C\u3002"}),(0,e.jsx)(xe.Z,{name:["assertSigned"],children:function(O){var G=O.assertSigned;return G&&(0,e.jsx)(ae.Z,{label:"\u65AD\u8A00\u7B7E\u540D\u7B97\u6CD5",name:"assertSignAlgorithm",extra:"\u65AD\u8A00\u7B7E\u540D\u4F7F\u7528\u7684\u7B97\u6CD5",allowClear:!1,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7B7E\u540D\u4F7F\u7528\u7684\u7B97\u6CD5"}],options:[{value:"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",label:"RSA-SHA256"}]})}}),(0,e.jsx)(ae.Z,{label:"\u8EAB\u4EFD\u8BA4\u8BC1\u4E0A\u4E0B\u6587",name:"authnContextClassRef",extra:"SAML \u8EAB\u4EFD\u8BA4\u8BC1\u4E0A\u4E0B\u6587",allowClear:!1,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8EAB\u4EFD\u8BA4\u8BC1\u4E0A\u4E0B\u6587"}],options:[{value:"urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified",label:(0,e.jsx)(We.Z,{title:"urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified",placement:"topLeft",children:(0,e.jsx)("span",{children:"urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified"})})},{value:"urn:oasis:names:tc:SAML:2.0:ac:classes:Password",label:(0,e.jsx)(We.Z,{placement:"topLeft",title:"urn:oasis:names:tc:SAML:2.0:ac:classes:Password",children:(0,e.jsx)("span",{children:"urn:oasis:names:tc:SAML:2.0:ac:classes:Password"})})},{value:"urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport",label:(0,e.jsx)(We.Z,{placement:"topLeft",title:"urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport",children:(0,e.jsx)("span",{children:"urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"})})}]}),(0,e.jsx)(pe.A.Item,{label:"\u65AD\u8A00\u5C5E\u6027",name:"attributeStatements",trigger:"onValuesChange",children:(0,e.jsx)(Ke.Z,{rowKey:"key",toolBarRender:!1,scroll:{x:500},columns:[{title:"\u5C5E\u6027\u540D\u79F0",dataIndex:"name",fieldProps:{allowClear:!1},formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u540D\u79F0\u683C\u5F0F",key:"nameFormat",dataIndex:"nameFormat",valueType:"select",ellipsis:!0,valueEnum:{"urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified":{text:"unspecified"},"urn:oasis:names:tc:SAML:2.0:attrname-format:basic":{text:"basic"},"urn:oasis:names:tc:SAML:2.0:attrname-format:uri":{text:"uri"}},formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u5C5E\u6027\u503C",tooltip:"\u652F\u6301\u7684\u53D8\u91CF\uFF1A${user.phone}\u3001${user.username}\u3001${user.email}\u3001${app_user.nickName}\u3001${app_user.username}",dataIndex:"valueExpression",fieldProps:{allowClear:!1,placeholder:"\u53D8\u91CF\u503C"},formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u64CD\u4F5C",valueType:"option",align:"center",fixed:"right",width:50}],recordCreatorProps:{creatorButtonText:"\u6DFB\u52A0\u65AD\u8A00\u5C5E\u6027",newRecordType:"dataSource",position:"bottom",record:function(){return{key:Date.now()}}},editable:{form:w,type:"multiple",editableKeys:m,onChange:l,deletePopconfirmMessage:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u6B64\u65AD\u8A00\u5C5E\u6027\u5417\uFF1F",actionRender:function(O,G,_){return[_.delete]}}})}),(0,e.jsx)(ee.Z,{orientation:"left",plain:!0,children:"\u54CD\u5E94\u7B7E\u540D"}),(0,e.jsx)(je.Z,{label:"\u662F\u5426\u7B7E\u540D\u54CD\u5E94",name:"responseSigned",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u5BF9\u54CD\u5E94\u7B7E\u540D"}],initialValue:!1}),(0,e.jsx)(xe.Z,{name:["responseSigned"],children:function(O){var G=O.responseSigned;return G&&(0,e.jsx)(ae.Z,{label:"\u54CD\u5E94\u7B7E\u540D\u7B97\u6CD5",name:"responseSignAlgorithm",extra:"\u65AD\u8A00\u54CD\u5E94\u4F7F\u7528\u7684\u7B97\u6CD5",allowClear:!1,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u54CD\u5E94\u7B7E\u540D\u4F7F\u7528\u7684\u7B97\u6CD5"}],options:[{value:"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",label:"RSA-SHA256"}]})}}),(0,e.jsx)(ee.Z,{orientation:"left",plain:!0,children:"\u9A8C\u8BC1\u8BF7\u6C42"}),(0,e.jsx)(je.Z,{label:"\u9A8C\u8BC1\u8BF7\u6C42\u7B7E\u540D",name:"spRequestsSigned",initialValue:!1,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u9A8C\u8BC1\u8BF7\u6C42\u7B7E\u540D"}],extra:"\u7528\u6765\u5BF9SAML Request\u7B7E\u540D\u8FDB\u884C\u9A8C\u8BC1\uFF0C\u5BF9\u5E94SP\u5143\u6570\u636E\u6587\u4EF6\u4E2D\u201CAuthnRequestsSigned\u201D\u503C\u3002"}),(0,e.jsx)(ee.Z,{orientation:"left",plain:!0,children:"\u5355\u70B9\u6CE8\u9500"}),(0,e.jsx)(je.Z,{label:"\u542F\u7528 SLO",name:"spSloEnabled",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u542F\u7528 SLO"}],initialValue:!1,extra:"SP \u662F\u5426\u652F\u6301\u5355\u70B9\u6CE8\u9500 (SLO) \u3002"}),(0,e.jsx)(xe.Z,{name:["spSloEnabled"],children:function(O){var G=O.spSloEnabled;return G&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(z.Z,{label:"\u5355\u70B9\u6CE8\u9500 URL",name:"spSlsUrl",rules:[{type:"url",message:"\u5355\u70B9\u6CE8\u9500\u5730\u5740\u683C\u5F0F\u4E0D\u6B63\u786E"},{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u70B9\u6CE8\u9500\u5730\u5740"}],allowClear:!0,extra:"\u4F1A\u8BDD\u6CE8\u9500\u529F\u80FD\uFF0C\u7528\u6237\u5728 TopIAM \u6CE8\u9500\u4F1A\u8BDD\u540E\u901A\u77E5\u8BE5\u5730\u5740\u3002",placeholder:"\u8BF7\u8F93\u5165\u5355\u70B9\u6CE8\u9500\u5730\u5740"}),(0,e.jsx)(ae.Z,{label:"\u5355\u70B9\u6CE8\u9500\u7ED1\u5B9A\u7C7B\u578B",name:"spSlsBinding",allowClear:!1,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5355\u70B9\u6CE8\u9500\u7ED1\u5B9A\u7C7B\u578B"}],extra:" \u6307\u5B9A\u4E86 IDP \u5411 SP \u53D1\u9001 SLO \u8BF7\u6C42\u7684\u65B9\u5F0F\u3002",options:[{value:"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST",label:"HTTP-POST"},{value:"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect",label:"HTTP-Redirect"}]})]})}}),(0,e.jsx)(ee.Z,{}),(0,e.jsx)(be.Z,{label:"\u7B7E\u540D\u8BC1\u4E66",name:"spSignCert",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u9A8C\u8BC1\u7B7E\u540D\u8BC1\u4E66"}],extra:'SP\u516C\u94A5\u8BC1\u4E66\uFF0C\u7528\u6765\u9A8C\u8BC1SAML request\u7684\u7B7E\u540D\uFF0C\u5BF9\u5E94SP\u5143\u6570\u636E\u6587\u4EF6\u4E2Duse="signing"\u8BC1\u4E66\u5185\u5BB9\u3002',fieldProps:{autoComplete:"off",rows:3}})]},"advanced")})]})),(0,e.jsx)(ee.Z,{style:{margin:0}}),(0,e.jsx)(mr,{appId:n,protocolEndpoint:F,collapsed:!0})]})})},Ua=function(T){var r=T.app;return(0,e.jsxs)(e.Fragment,{children:[r.type===X.pR.CUSTOM_MADE&&(0,e.jsx)(Ba,{app:r}),r.type===X.pR.STANDARD&&(0,e.jsx)(Ma,{app:r})]})},Na=Ua,Ga=function(T){var r=T.appId,n=(0,R.useState)(!0),y=p()(n,2),I=y[0],j=y[1],b=(0,R.useState)(),D=p()(b,2),u=D[0],s=D[1];return(0,Q.Z)(k()(a()().mark(function t(){var E,g,c;return a()().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return j(!0),Z.next=3,(0,U.Mq)(r);case 3:E=Z.sent,g=E.result,c=E.success,c&&g&&s(g),j(!1);case 8:case"end":return Z.stop()}},t)})),[]),(0,e.jsx)(Ge.Z,{title:"\u5355\u70B9\u767B\u5F55",style:{height:"calc(100vh - 190px)",overflow:"auto"},bodyStyle:{height:"100%"},headerBordered:!0,children:(0,e.jsxs)(rr.Z,{loading:I,active:!0,paragraph:{rows:5},children:[(u==null?void 0:u.protocol)===X.b$.SAML2&&(0,e.jsx)(Na,{app:u}),(u==null?void 0:u.protocol)===X.b$.CAS&&(0,e.jsx)(ga,{app:u}),(u==null?void 0:u.protocol)===X.b$.JWT&&(0,e.jsx)(Sa,{app:u}),(u==null?void 0:u.protocol)===X.b$.OIDC&&(0,e.jsx)(wa,{app:u}),(u==null?void 0:u.protocol)===X.b$.FORM&&(0,e.jsx)(Ca,{app:u})]})})},za=S(14855),Va=Ve.ZP.ConfigContext,Ka=function(r){var n,y,I,j,b,D,u,s,t,E,g,c,A=r.prefixCls;return c={},se()(c,"".concat(A,"-main"),{minHeight:"calc(100vh - 190px)"}),se()(c,"".concat(A,"-left"),se()({minHeight:"100%",overflow:"auto"},"".concat(A,"-left-menu"),(g={height:"calc(100vh - 190px)"},se()(g,"&.ant-menu-light.ant-menu-root.ant-menu-inline",{"border-inline-end":"none"}),se()(g,"&".concat(r.antCls,"-menu-light:not(").concat(r.antCls,"-menu-horizontal) ").concat(r.antCls,"-menu-item-selected"),{"background-color":(n=r.layout)===null||n===void 0||(y=n.sider)===null||y===void 0?void 0:y.colorBgMenuItemSelected,color:(I=r.layout)===null||I===void 0||(j=I.sider)===null||j===void 0?void 0:j.colorTextMenuSelected}),se()(g,"&".concat(r.antCls,"-menu-light:not(").concat(r.antCls,"-menu-horizontal) ").concat(r.antCls,"-menu-item:not(").concat(r.antCls,"-menu-item-selected):active"),{"background-color":(b=r.layout)===null||b===void 0||(D=b.sider)===null||D===void 0?void 0:D.colorBgMenuItemSelected,color:(u=r.layout)===null||u===void 0||(s=u.sider)===null||s===void 0?void 0:s.colorTextMenuActive}),se()(g,"&".concat(r.antCls,"-menu-light ").concat(r.antCls,"-menu-submenu-selected >").concat(r.antCls,"-menu-submenu-title"),{color:(t=r.layout)===null||t===void 0||(E=t.sider)===null||E===void 0?void 0:E.colorTextMenuSelected}),g))),se()(c,"".concat(A,"-right"),{minHeight:"100%",overflow:"auto"}),c};function Ha(T){var r=(0,R.useContext)(Va),n=r.getPrefixCls,y=".".concat(n());return(0,za.Xj)("AppConfig",function(I){var j=N()(N()({},I),{},{prefixCls:".".concat(T),antCls:y});return[Ka(j)]})}var Ee="app-config",Ya={xxl:3,xl:4,lg:5,md:24,sm:24,xs:24},Wa={xxl:21,xl:20,lg:19,md:24,sm:24,xs:24},Xa=function(){var T=(0,R.useState)(),r=p()(T,2),n=r[0],y=r[1],I=(0,R.useState)(),j=p()(I,2),b=j[0],D=j[1],u=(0,ze.useLocation)(),s=Ha(Ee),t=s.wrapSSR,E=s.hashId,g=(0,Le.parse)(u.search),c=g,A=c.type,Z=c.id,i=c.name,f=[{key:Y.BASIC,label:"\u57FA\u672C\u914D\u7F6E",icon:R.createElement(function(){return(0,e.jsx)(gr.Z,{})})},{key:Y.LOGIN_ACCESS,label:"\u767B\u5F55\u8BBF\u95EE",icon:R.createElement(function(){return(0,e.jsx)(Fr.Z,{})}),children:[{key:Y.PROTOCOL_CONFIG,label:"\u5355\u70B9\u767B\u5F55"},{key:Y.APP_ACCOUNT,label:"\u5E94\u7528\u8D26\u6237"},{key:Y.ACCESS_POLICY,label:"\u8BBF\u95EE\u6388\u6743"}]},{key:Y.ACCOUNT_SYNC,label:"\u8D26\u6237\u540C\u6B65",icon:R.createElement(function(){return(0,e.jsx)(Cr.Z,{})})},{key:Y.APP_PERMISSION,label:"\u6743\u9650\u7BA1\u7406",icon:R.createElement(function(){return(0,e.jsx)(xr.Z,{})}),children:[{key:Y.PERMISSION_RESOURCE,label:"\u8D44\u6E90\u7BA1\u7406"},{key:Y.PERMISSION_ROLE,label:"\u89D2\u8272\u7BA1\u7406"},{key:Y.PERMISSION_POLICY,label:"\u6388\u6743\u7BA1\u7406"}]}];return(0,Q.Z)(k()(a()().mark(function d(){return a()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(Z||(K.ZP.error("\u672A\u6307\u5B9A\u5E94\u7528"),De.m.push("/app")),!(!A||!(A.toUpperCase()in Y))){F.next=5;break}return y([Y.PROTOCOL_CONFIG]),De.m.replace({pathname:u.pathname,search:(0,Le.stringify)({type:Y.PROTOCOL_CONFIG,id:Z,name:i})}),F.abrupt("return");case 5:y([A]);case 6:case"end":return F.stop()}},d)})),[]),(0,Q.Z)(k()(a()().mark(function d(){return a()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:D(g.name);case 1:case"end":return F.stop()}},d)})),[u]),(0,e.jsx)(Sr._z,{title:b,style:{overflow:"hidden"},onBack:function(){De.m.push("/app")},children:t((0,e.jsxs)(yr.Z,{gutter:[16,16],className:Re()("".concat(Ee),"".concat(Ee,"-main"),E),children:[(0,e.jsx)(Xe.Z,N()(N()({},Ya),{},{className:Re()("".concat(Ee,"-left"),E),children:(0,e.jsx)(br.Z,{mode:"inline",selectedKeys:n,defaultOpenKeys:[Y.LOGIN_ACCESS,Y.APP_PERMISSION],className:Re()("".concat(Ee,"-left-menu"),E),items:f,onSelect:function(o){var F=o.selectedKeys;y(F),De.m.replace({pathname:u.pathname,search:(0,Le.stringify)({type:F==null?void 0:F[0],id:Z,name:i})})}})})),(0,e.jsxs)(Xe.Z,N()(N()({},Wa),{},{className:Re()("".concat(Ee,"-right"),E),children:[(n==null?void 0:n[0])===Y.BASIC&&(0,e.jsx)(Hr,{appId:Z}),(n==null?void 0:n[0])===Y.PROTOCOL_CONFIG&&(0,e.jsx)(Ga,{appId:Z}),(n==null?void 0:n[0])===Y.APP_ACCOUNT&&(0,e.jsx)(Nr,{appId:Z}),(n==null?void 0:n[0])===Y.ACCESS_POLICY&&(0,e.jsx)(kr,{appId:Z}),(n==null?void 0:n[0])===Y.ACCOUNT_SYNC&&(0,e.jsx)(Mr,{}),(n==null?void 0:n[0])===Y.PERMISSION_RESOURCE&&(0,e.jsx)(sa,{appId:Z}),(n==null?void 0:n[0])===Y.PERMISSION_ROLE&&(0,e.jsx)(va,{appId:Z}),(n==null?void 0:n[0])===Y.PERMISSION_POLICY&&(0,e.jsx)(ea,{appId:Z})]}))]}))})},Ja=Xa}}]); diff --git a/eiam-console/src/main/resources/fe/p__app__AppCreate__index.ec7a4eb2.async.js b/eiam-console/src/main/resources/fe/p__app__AppCreate__index.ec7a4eb2.async.js new file mode 100644 index 00000000..5bfa4bd6 --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__app__AppCreate__index.ec7a4eb2.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[976],{5966:function(j,D,n){var F=n(1413),p=n(91),A=n(85893),m=n(7772),y=["fieldProps","proFieldProps"],l=["fieldProps","proFieldProps"],r="text",e=function(o){var c=o.fieldProps,g=o.proFieldProps,a=(0,p.Z)(o,y);return(0,A.jsx)(m.Z,(0,F.Z)({valueType:r,fieldProps:c,filedConfig:{valueType:r},proFieldProps:g},a))},u=function(o){var c=o.fieldProps,g=o.proFieldProps,a=(0,p.Z)(o,l);return(0,A.jsx)(m.Z,(0,F.Z)({valueType:"password",fieldProps:c,proFieldProps:g,filedConfig:{valueType:r}},a))},s=e;s.Password=u,s.displayName="ProFormComponent",D.Z=s},90672:function(j,D,n){var F=n(1413),p=n(91),A=n(85893),m=n(67294),y=n(7772),l=["fieldProps","proFieldProps"],r=function(u,s){var t=u.fieldProps,o=u.proFieldProps,c=(0,p.Z)(u,l);return(0,A.jsx)(y.Z,(0,F.Z)({ref:s,valueType:"textarea",fieldProps:t,proFieldProps:o},c))};D.Z=m.forwardRef(r)},11911:function(j,D,n){n.d(D,{Gh:function(){return l},SC:function(){return r},Zw:function(){return p},b$:function(){return y},n6:function(){return A},pR:function(){return m},rD:function(){return F}});var F;(function(e){e.EX900005="EX900005",e.EX000102="EX000102",e.EX000202="EX000202",e.SUCCESS="200"})(F||(F={}));var p;(function(e){e.ALIYUN="aliyun",e.QI_NIU="qiniu",e.TENCENT="tencent",e.NET_EASE="netease",e.MAXMIND="maxmind"})(p||(p={}));var A;(function(e){e.ALIYUN="aliyun",e.TENCENT="tencent",e.GEE_TEST="geetest",e.HCAPTCHA="hcaptcha",e.RECAPTCHA="recaptcha"})(A||(A={}));var m;(function(e){e.STANDARD="standard",e.CUSTOM_MADE="custom_made"})(m||(m={}));var y;(function(e){e.SAML2="saml2",e.OIDC="oidc",e.CAS="cas",e.JWT="jwt",e.FORM="form",e.OAUTH2="oauth2"})(y||(y={}));var l;(function(e){e.ALLOW="ALLOW",e.DENY="DENY"})(l||(l={}));var r;(function(e){e.ROLE="ROLE",e.RESOURCE="RESOURCE",e.USER="USER",e.ORGANIZATION="ORGANIZATION",e.USER_GROUP="USER_GROUP"})(r||(r={}))},7859:function(j,D,n){n.r(D),n.d(D,{default:function(){return ae}});var F=n(97983),p=n.n(F),A=n(40794),m=n.n(A),y=n(12741),l=n.n(y),r=n(11911),e=n(56162),u=n(84865),s=n(37476),t=n(5966),o=n(90672),c=n(96495),g=n(14459),a=n(2093),C=n(69400),U=n(57953),w=n(98293),z=n(88942),I=n(67294),Y=n(12812),i=n.n(Y),H=n(46986),J=n(38755),Q=H.ZP.ConfigContext;function V(P){var T=(0,I.useContext)(Q),B=T.getPrefixCls,x=".".concat(B()),M=".".concat(P),N=(0,J.l)(function(b){var E,d,f=b.token;return d={},i()(d,"".concat(M),(E={},i()(E,"".concat(x,"-avatar > img"),{objectFit:"fill"}),i()(E,"".concat(x,"-card-head"),{borderBottom:"none"}),i()(E,"".concat(x,"-card-head-title"),{padding:"24px 0",lineHeight:"32px"}),i()(E,"".concat(x,"-card-extra"),{padding:"24px 0"}),i()(E,"".concat(x,"-list-pagination"),{marginTop:"24px"}),i()(E,"".concat(x,"-avatar-lg"),{width:"48px",height:"48px",lineHeight:"48px"}),i()(E,"".concat(x,"-list-item-action"),{marginInlineStart:"15px"}),i()(E,".ant-pro-list .ant-pro-list-row",{paddingLeft:"10px",paddingRight:"10px"}),E)),i()(d,"@media (max-width: ".concat(f.screenXS,"px)"),i()({},"".concat(P,"-list"),{})),i()(d,"@media (max-width: ".concat(f.screenSM,"px)"),i()({},"".concat(P,"-list"),{})),i()(d,"@media (max-width: ".concat(f.screenMD,"px)"),i()({},"".concat(P,"-list"),{})),i()(d,"@media (max-width: ".concat(f.screenLG,"px) and @media (min-width: ").concat(f.screenMD,"px)"),i()({},"".concat(P,"-list"),{})),i()(d,"@media (max-width: ".concat(f.screenXL,"px)"),i()({},"".concat(P,"-list"),{})),i()(d,"@media (max-width: 1400px)",i()({},"".concat(P,"-list"),{})),d});return{className:N}}var K=n(67038),k=n(98971),q=n(94184),_=n.n(q),v=n(85893),ee=function(T){return T===r.pR.STANDARD?"\u6807\u51C6\u534F\u8BAE":T===r.pR.CUSTOM_MADE?"\u5B9A\u5236\u6A21\u677F":"\u5168\u90E8"},ne=function(T){var B=T.name,x=T.code,M=(0,z.Z)(),N=l()(M,1),b=N[0],E=(0,I.useState)(!1),d=l()(E,2),f=d[0],h=d[1];return(0,v.jsx)(s.Y,{title:"\u6DFB\u52A0\u5E94\u7528",trigger:(0,v.jsx)("a",{children:"\u6DFB\u52A0\u5E94\u7528"},"add"),width:500,form:b,scrollToFirstError:!0,initialValues:{template:x},autoFocusFirstInput:!0,layout:"horizontal",labelAlign:"left",labelCol:{span:4},wrapperCol:{span:20},requiredMark:!0,preserve:!1,modalProps:{onCancel:function(){b.resetFields()}},onFinish:function(){var L=m()(p()().mark(function Z(S){var W,R,G,$;return p()().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return h(!0),O.next=3,(0,e.ri)(S).finally(function(){h(!1)});case 3:if(W=O.sent,R=W.success,G=W.result,!(R&&G)){O.next=9;break}return $=C.Z.success({title:"\u6DFB\u52A0\u6210\u529F",content:"\u8BF7\u8FDB\u5165\u5E94\u7528\u7BA1\u7406\u9875\u9762\u5B8C\u5584\u914D\u7F6E\u5E76\u67E5\u770B\u4FE1\u606F",okText:"\u5B8C\u5584\u914D\u7F6E",onOk:function(){$.destroy(),u.m.push("/app/config?id=".concat(G.id,"&name=").concat(S.name))}}),O.abrupt("return",!0);case 9:return O.abrupt("return",!1);case 10:case"end":return O.stop()}},Z)}));return function(Z){return L.apply(this,arguments)}}(),children:(0,v.jsxs)(U.Z,{spinning:f,children:[(0,v.jsx)(t.Z,{name:"template",hidden:!0}),(0,v.jsx)(t.Z,{initialValue:"".concat(B),name:"name",preserve:!1,label:"\u5E94\u7528\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u540D\u79F0",rules:[{required:!0,message:"\u5E94\u7528\u540D\u79F0\u4E3A\u5FC5\u586B\u9879"}]}),(0,v.jsx)(o.Z,{name:"remark",preserve:!1,fieldProps:{rows:2,maxLength:20,showCount:!1},placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F",label:"\u5907\u6CE8"})]})})},X="app-create",te=function(){var P=(0,I.useState)(r.pR.STANDARD),T=l()(P,2),B=T[0],x=T[1],M=(0,k.useLocation)(),N=(0,I.useRef)(),b=V(X),E=b.className;return(0,a.Z)(m()(p()().mark(function d(){var f,h,L,Z,S;return p()().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(L=(0,K.parse)(M.search),Z=L,S=Z.tab,!(!S||!(S.toUpperCase()in r.pR))){R.next=6;break}return x(r.pR.STANDARD),u.m.replace({pathname:M.pathname,search:(0,K.stringify)({tab:r.pR.STANDARD})}),R.abrupt("return");case 6:(f=N.current)===null||f===void 0||(h=f.reset)===null||h===void 0||h.call(f),x(S);case 8:case"end":return R.stop()}},d)})),[B]),(0,v.jsx)("div",{className:E,children:(0,v.jsx)(g._z,{onBack:function(){u.m.push("/app")},className:_()("".concat(X)),content:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("span",{children:"\u672C\u9875\u9762\u5305\u542B\u4E86\u6240\u6709\u5DF2\u652F\u6301\u7684\u53EF\u6DFB\u52A0\u5E94\u7528\u5217\u8868\uFF0C\u7BA1\u7406\u5458\u53EF\u4EE5\u9009\u62E9\u9700\u8981\u4F7F\u7528\u7684\u5E94\u7528\u8FDB\u884C\u521D\u59CB\u5316\u914D\u7F6E\uFF0C\u5E76\u5F00\u59CB\u540E\u7EED\u4F7F\u7528\u3002"}),(0,v.jsx)("span",{children:"\u5E94\u7528\u5206\u4E3A\u4E24\u79CD\uFF1A\u4E00\u79CD\u662F\u652F\u6301\u6807\u51C6\u7684 OIDC\u3001SAML\u3001JWT\u3001CAS \u7B49\u6A21\u677F\u7684\u5E94\u7528\uFF0C\u5728\u8FD9\u91CC\u53EF\u4EE5\u901A\u8FC7\u6DFB\u52A0\u5BF9\u5E94\u7684\u6807\u51C6\u5E94\u7528\u6A21\u677F\u6765\u5B9E\u73B0\u5355\u70B9\u767B\u5F55\u529F\u80FD\uFF1B\u53E6\u4E00\u79CD\u662F\u5B9A\u5236\u5E94\u7528\uFF0C\u672C\u7C7B\u5E94\u7528\u5DF2\u7ECF\u63D0\u4F9B\u4E86\u5BF9\u63A5\u5176\u5355\u70B9\u767B\u5F55\u6216\u7528\u6237\u540C\u6B65\u7684\u63A5\u53E3\uFF0C\u7531 TopIAM \u4E3A\u5176\u63D0\u4F9B\u5B9A\u5236\u5316\u6A21\u677F\u8FDB\u884C\u5BF9\u63A5\u3002"})]}),tabActiveKey:B,onTabChange:function(f){x(f),u.m.replace({pathname:M.pathname,search:(0,K.stringify)({tab:f})})},tabProps:{size:"small"},tabList:[{tab:"\u6807\u51C6\u534F\u8BAE",key:r.pR.STANDARD},{tab:"\u5B9A\u5236\u6A21\u677F",key:r.pR.CUSTOM_MADE}],children:(0,v.jsx)(c.Rs,{split:!0,rowKey:"code",showActions:"always",headerTitle:ee(B),search:{},actionRef:N,request:e.LB,pagination:{defaultPageSize:5,size:"small"},params:{type:B},metas:{title:{dataIndex:"name",title:"\u6A21\u7248\u540D\u79F0"},avatar:{search:!1,render:function(f,h){return(0,v.jsx)(w.C,{shape:"square",size:45,src:h.icon},h.code)}},description:{search:!1,dataIndex:"desc"},actions:{render:function(f,h){return[(0,v.jsx)(ne,{code:h.code,name:B===r.pR.STANDARD?"".concat(h.name," \u5E94\u7528"):h.name},h.code)]}}}})})})},ae=te},2093:function(j,D,n){var F=n(67294),p=n(92770),A=function(l,r,e,u){function s(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function c(C){try{a(u.next(C))}catch(U){o(U)}}function g(C){try{a(u.throw(C))}catch(U){o(U)}}function a(C){C.done?t(C.value):s(C.value).then(c,g)}a((u=u.apply(l,r||[])).next())})},m=function(l,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},u,s,t,o;return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(a){return function(C){return g([a,C])}}function g(a){if(u)throw new TypeError("Generator is already executing.");for(;e;)try{if(u=1,s&&(t=a[0]&2?s.return:a[0]?s.throw||((t=s.return)&&t.call(s),0):s.next)&&!(t=t.call(s,a[1])).done)return t;switch(s=0,t&&(a=[a[0]&2,t.value]),a[0]){case 0:case 1:t=a;break;case 4:return e.label++,{value:a[1],done:!1};case 5:e.label++,s=a[1],a=[0];continue;case 7:a=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!t||a[1]>t[0]&&a[1]. + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[6461],{18290:function(le,N,t){t.r(N),t.d(N,{default:function(){return i}});var m=t(97983),y=t.n(m),T=t(40794),B=t.n(T),$=t(11281),I=t.n($),C=t(56162),z=t(24969),P=t(25035),H=t(14459),L=t(96495),M=t(26713),A=t(51904),W=t(71577),X=t(98293),b=t(86738),R=t(2453),O=t(67294),E=t(98971),G=t(12812),l=t.n(G),U=t(46986),Y=t(38755),Q=U.ZP.ConfigContext;function V(n){var a=(0,O.useContext)(Q),S=a.getPrefixCls,f=".".concat(S()),c=".".concat(n),v=(0,Y.l)(function(s){var o,h,d,p=s.token;return d={},l()(d,"".concat(c),(o={},l()(o,"&-content",{marginInlineStart:"15px","& > div":{marginInlineStart:"0"}}),l()(o,"&-item-content",{display:"block",flex:"none",width:"100%"}),l()(o,"".concat(f,"-avatar > img"),{objectFit:"fill"}),l()(o,"".concat(f,"-card-head"),{borderBottom:"none"}),l()(o,"".concat(f,"-card-head-title"),{padding:"24px 0",lineHeight:"32px"}),l()(o,"".concat(f,"-card-extra"),{padding:"24px 0"}),l()(o,"".concat(f,"-list-pagination"),{marginTop:"24px"}),l()(o,"".concat(f,"-avatar-lg"),{width:"48px",height:"48px",lineHeight:"48px"}),l()(o,"".concat(f,"-list-item-action"),{marginInlineStart:"15px"}),l()(o,".ant-pro-list .ant-pro-list-row",{paddingLeft:"10px",paddingRight:"10px"}),l()(o,".ant-pro-list .ant-pro-list-row-content",{flex:0,margin:"0"}),o)),l()(d,"@media (max-width: ".concat(p.screenXS,"px)"),l()({},"".concat(c),(h={},l()(h,"&-content",{marginInlineStart:"0","& > div":{marginInlineStart:"0"}}),l()(h,"&-item-content",{display:"block",flex:"none",width:"100%"}),h))),l()(d,"@media (max-width: ".concat(p.screenSM,"px)"),l()({},"".concat(c),{})),l()(d,"@media (max-width: ".concat(p.screenMD,"px)"),l()({},"".concat(c),l()({},"&-content",{"& > div":{display:"block","&:last-child":{top:"0",width:"100%"}}}))),l()(d,"@media (max-width: ".concat(p.screenLG,") and @media (min-width: ").concat(p.screenMD,")"),l()({},"".concat(c),l()({},"&-content",{"& > div":{display:"block","&:last-child":{top:"0",width:"100%"}}}))),l()(d,"@media (max-width: ".concat(p.screenXL,"px)"),l()({},"".concat(c),l()({},"&-content",{"& > div":{marginInlineStart:"24px","&:last-child":{top:"0"}}}))),l()(d,"@media (max-width: 1400px)",l()({},"".concat(c),l()({},"&-content",{"& > div":{"&:last-child":{top:"0"}}}))),d});return{className:v}}var J=t(94184),F=t.n(J),u=t(85893),r="app-list",e=function(){var n=(0,O.useRef)(),a=V(r),S=a.className,f=function(v){return(0,u.jsx)("div",{className:F()("".concat(r,"-content")),children:(0,u.jsx)("div",{className:F()("".concat(r,"-item-content")),children:(0,u.jsx)(M.Z,{size:0,children:v.enabled?(0,u.jsx)(A.Z,{color:"#5BD8A6",children:"\u5DF2\u542F\u7528"},v.id):(0,u.jsx)(A.Z,{color:"#e54545",children:"\u672A\u542F\u7528"},v.id)},v.id)})})};return(0,u.jsx)("div",{className:S,children:(0,u.jsx)(H._z,{className:F()("".concat(r)),content:(0,u.jsx)(u.Fragment,{children:(0,u.jsx)("span",{children:"\u7BA1\u7406\u5458\u53EF\u4EE5\u5728\u5F53\u524D\u9875\u9762\u7BA1\u7406\u5DF2\u7ECF\u6DFB\u52A0\u7684\u6240\u6709\u5E94\u7528\uFF0C\u5E94\u7528\u53EF\u4EE5\u5B9E\u73B0\u5355\u70B9\u767B\u5F55\u548C\u6570\u636E\u540C\u6B65\u80FD\u529B\u3002"})}),children:(0,u.jsx)(L.Rs,{search:{},actionRef:n,rowKey:"id",split:!0,showActions:"always",pagination:{defaultPageSize:5,size:"small"},request:C.yk,headerTitle:"\u5E94\u7528\u5217\u8868",form:{syncToUrl:function(v,s){return s==="get"?I()({},v):v}},toolBarRender:function(){return[(0,u.jsxs)(W.Z,{type:"primary",onClick:function(){E.history.push("/app/create")},children:[(0,u.jsx)(z.Z,{}),"\u6DFB\u52A0\u5E94\u7528"]},"add")]},metas:{title:{dataIndex:"name",title:"\u5E94\u7528\u540D\u79F0",render:function(v,s){return(0,u.jsx)("span",{onClick:function(){E.history.push("/app/config?id=".concat(s.id,"&name=").concat(s.name))},children:v})}},avatar:{search:!1,render:function(v,s){return(0,u.jsx)(X.C,{shape:"square",size:45,src:s.icon},s.id)}},description:{search:!1,dataIndex:"remark"},content:{search:!1,render:function(v,s){return[(0,u.jsx)(f,I()({},s),"context")]}},actions:{render:function(v,s){return[s.enabled?(0,u.jsx)(b.Z,{title:"\u786E\u5B9A\u7981\u7528\u8BE5\u5E94\u7528\u5417\uFF1F",placement:"bottomRight",icon:(0,u.jsx)(P.Z,{style:{color:"red"}}),onConfirm:B()(y()().mark(function o(){var h,d,p,x;return y()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(0,C._b)(s.id);case 2:if(h=g.sent,d=h.success,p=h.result,!(d&&p)){g.next=10;break}return R.ZP.success("\u64CD\u4F5C\u6210\u529F"),g.next=9,(x=n.current)===null||x===void 0?void 0:x.reload();case 9:return g.abrupt("return");case 10:case"end":return g.stop()}},o)})),okText:"\u662F",cancelText:"\u5426",children:(0,u.jsx)("a",{children:"\u7981\u7528"},"disabled")},"disabled"):(0,u.jsx)(b.Z,{title:"\u786E\u5B9A\u542F\u7528\u8BE5\u5E94\u7528\u5417\uFF1F",placement:"bottomRight",icon:(0,u.jsx)(P.Z,{}),onConfirm:B()(y()().mark(function o(){var h,d,p,x;return y()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(0,C.Y8)(s.id);case 2:if(h=g.sent,d=h.success,p=h.result,!(d&&p)){g.next=10;break}return R.ZP.success("\u64CD\u4F5C\u6210\u529F").then(),g.next=9,(x=n.current)===null||x===void 0?void 0:x.reload();case 9:return g.abrupt("return");case 10:case"end":return g.stop()}},o)})),okText:"\u662F",cancelText:"\u5426",children:(0,u.jsx)("a",{children:"\u542F\u7528"},"enabled")},"disabled"),(0,u.jsx)("a",{onClick:function(){E.history.push("/app/config?id=".concat(s.id,"&name=").concat(s.name))},children:"\u7BA1\u7406"},"config"),(0,u.jsx)(b.Z,{title:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u6B64\u5E94\u7528\uFF1F",placement:"bottomRight",icon:(0,u.jsx)(P.Z,{style:{color:"red"}}),onConfirm:B()(y()().mark(function o(){var h,d,p;return y()().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.next=2,(0,C.Fq)(s.id);case 2:if(h=Z.sent,d=h.success,!d){Z.next=8;break}return R.ZP.success("\u64CD\u4F5C\u6210\u529F"),(p=n.current)===null||p===void 0||p.reload(),Z.abrupt("return");case 8:case"end":return Z.stop()}},o)})),okText:"\u662F",cancelText:"\u5426",children:(0,u.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u5220\u9664"},"remove")},"delete")]}}}})})})},i=e},51904:function(le,N,t){t.d(N,{Z:function(){return u}});var m=t(4942),y=t(87462),T=t(97685),B=t(97937),$=t(94184),I=t.n($),C=t(67294),z=t(53124),P=t(98787),H=t(28704),L=t(8796),M=t(67968),A=t(45503);function W(r){if(typeof r!="string")return r;var e=r.charAt(0).toUpperCase()+r.slice(1);return e}var X=t(14747),b=function(e,i,n){var a=W(n);return(0,m.Z)({},e.componentCls+"-"+i,{color:e["color"+n],background:e["color"+a+"Bg"],borderColor:e["color"+a+"Border"]})},R=function(e){return L.i.reduce(function(i,n){var a,S=e[n+"-1"],f=e[n+"-3"],c=e[n+"-6"],v=e[n+"-7"];return(0,y.Z)((0,y.Z)({},i),(a={},(0,m.Z)(a,e.componentCls+"-"+n,{color:v,background:S,borderColor:f}),(0,m.Z)(a,e.componentCls+"-"+n+"-inverse",{color:e.colorTextLightSolid,background:c,borderColor:c}),a))},{})},O=function(e){var i,n=e.paddingXXS,a=e.lineWidth,S=e.tagPaddingHorizontal,f=S-a,c=n-a;return(0,m.Z)({},e.componentCls,(0,y.Z)((0,y.Z)({},(0,X.Wf)(e)),(i={display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:f,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight+"px",whiteSpace:"nowrap",background:e.tagDefaultBg,border:e.lineWidth+"px "+e.lineType+" "+e.colorBorder,borderRadius:e.borderRadiusSM,opacity:1,transition:"all "+e.motionDurationMid,textAlign:"start","&&-rtl":{direction:"rtl"},"&, a, a:hover":{color:e.tagDefaultColor}},(0,m.Z)(i,e.componentCls+"-close-icon",{marginInlineStart:c,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:"all "+e.motionDurationMid,"&:hover":{color:e.colorTextHeading}}),(0,m.Z)(i,"&&-has-color",(0,m.Z)({borderColor:"transparent"},"&, a, a:hover, "+e.iconCls+"-close, "+e.iconCls+"-close:hover",{color:e.colorTextLightSolid})),(0,m.Z)(i,"&-checkable",{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer","&:not(&-checked):hover":{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}}),(0,m.Z)(i,"&-hidden",{display:"none"}),(0,m.Z)(i,"> "+e.iconCls+" + span, > span + "+e.iconCls,{marginInlineStart:f}),i)))},E=(0,M.Z)("Tag",function(r){var e=r.fontSize,i=r.lineHeight,n=r.lineWidth,a=r.fontSizeIcon,S=Math.round(e*i),f=r.fontSizeSM,c=S-n*2,v=r.colorFillAlter,s=r.colorText,o=(0,A.TS)(r,{tagFontSize:f,tagLineHeight:c,tagDefaultBg:v,tagDefaultColor:s,tagIconSize:a-2*n,tagPaddingHorizontal:8});return[O(o),R(o),b(o,"success","Success"),b(o,"processing","Info"),b(o,"error","Error"),b(o,"warning","Warning")]}),G=function(r,e){var i={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(i[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(r);a. + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[8271],{70147:function(te,Y,a){a.d(Y,{F:function(){return C},N:function(){return E}});var C;(function(O){O.admin="admin",O.user="user"})(C||(C={}));var E;(function(O){O.success="success",O.fail="fail"})(E||(E={}))},36598:function(te,Y,a){a.r(Y),a.d(Y,{default:function(){return be}});var C=a(12741),E=a.n(C),O=a(14459),S=a(70147),q=a(97983),Z=a.n(q),g=a(40794),o=a.n(g),I=a(11281),F=a.n(I),c=a(25191),B=a(98971);function A(T,y,x){return U.apply(this,arguments)}function U(){return U=o()(Z()().mark(function T(y,x,m){return Z()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.abrupt("return",(0,B.request)("/api/audit/list",{params:F()(F()(F()({},y),{},{startEventTime:y.eventTime&&y.eventTime[0],endEventTime:y.eventTime&&y.eventTime[1]},(0,c.YE)(x)),(0,c.oH)(m))}).then(function(N){var M,h,t,i,p={data:N!=null&&(M=N.result)!==null&&M!==void 0&&M.list?N==null||(h=N.result)===null||h===void 0?void 0:h.list:[],success:N==null?void 0:N.success,total:N!=null&&(t=N.result)!==null&&t!==void 0&&t.pagination?N==null||(i=N.result)===null||i===void 0?void 0:i.pagination.total:0};return Promise.resolve(p)}));case 1:case"end":return D.stop()}},T)})),U.apply(this,arguments)}function d(T){return b.apply(this,arguments)}function b(){return b=o()(Z()().mark(function T(y){return Z()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.abrupt("return",(0,B.request)("/api/audit/types/".concat(y)));case 1:case"end":return m.stop()}},T)})),b.apply(this,arguments)}var V=a(39398),ae=a(1413),$=a(67294),ge={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"},xe=ge,Ce=a(84089),re=function(y,x){return $.createElement(Ce.Z,(0,ae.Z)((0,ae.Z)({},y),{},{ref:x,icon:xe}))};re.displayName="CaretRightOutlined";var se=$.forwardRef(re),le=a(1914),oe=a(2093),G=a(34041),ce=a(98033),u=a(76521),n=a(26713),f=a(51904),l=a(27484),v=a.n(l),z=a(17057),L=a(95462),R=a(30381),X=a.n(R),w=a(12812),j=a.n(w),Q=a(38755);function J(T){var y=".".concat(T),x=(0,Q.l)(function(){var m;return j()({},"".concat(y),(m={display:"flex",paddingLeft:"10px"},j()(m,"&-line-user",{flex:1,marginRight:"24px"}),j()(m,"&-line-event",{flex:1,marginRight:"24px"}),j()(m,"&-line-geo",{flex:1,marginRight:"24px"}),j()(m,"&-label",{display:"block",minWidth:"80px",color:"#878a95",fontSize:"14px"}),j()(m,"&-content",{display:"block",flexWrap:"wrap",overflowX:"auto",color:"#293350",fontSize:"14px"}),j()(m,"&-each-line",{display:"flex",marginBottom:"14px"}),j()(m,"&-target",{flex:1}),m))});return{className:x}}var _=a(94184),r=a.n(_),e=a(85893),s="audit-expanded-card",ee=z.Z.Text,ie={user:"\u7528\u6237",admin:"\u7BA1\u7406\u5458"},k=function(y){var x,m,P,D,N,M,h,t=y.record,i=J(s),p=i.className,K=function(H){return!H||H==="null"||H==="-"||H==="undefined"?"-":H};return(0,e.jsx)("div",{className:p,children:(0,e.jsxs)("div",{className:r()("".concat(s)),children:[(0,e.jsxs)("div",{className:r()("".concat(s,"-line-user")),children:[(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u64CD\u4F5C\u8005 ID"}),(0,e.jsx)("span",{className:r()("".concat(s,"-content")),children:(0,e.jsx)(L.Z,{style:{marginBottom:0},className:r()("".concat(s,"-content")),copyable:!0,children:K(t.userId)})})]}),(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u64CD\u4F5C\u8005\u540D\u79F0"}),(0,e.jsx)("span",{className:r()("".concat(s,"-content")),children:K(t.username)})]}),(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u64CD\u4F5C\u8005\u7C7B\u578B"}),(0,e.jsx)("span",{className:r()("".concat(s,"-content")),children:ie[t.userType]})]})]}),(0,e.jsxs)("div",{className:r()("".concat(s,"-line-geo")),children:[(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u8BBE\u5907\u7C7B\u578B"}),(0,e.jsx)("span",{className:r()("".concat(s,"-content")),children:t.userAgent&&((x=t.userAgent)===null||x===void 0?void 0:x.deviceType)||"-"})]}),(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u64CD\u4F5C\u7CFB\u7EDF"}),(0,e.jsx)("span",{className:r()("".concat(s,"-content")),children:t.userAgent&&((m=t.userAgent)===null||m===void 0?void 0:m.platform)||"-"})]}),(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u5BA2\u6237\u7AEFIP"}),(0,e.jsx)("span",{className:r()("".concat(s,"-content")),children:((P=t.geoLocation)===null||P===void 0?void 0:P.ip)||"-"})]}),(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u6D4F\u89C8\u5668"}),(0,e.jsx)("span",{className:r()("".concat(s,"-content")),children:t.userAgent&&((D=t.userAgent)===null||D===void 0?void 0:D.browser)||"-"})]}),(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u56FD\u5BB6"}),(0,e.jsx)("span",{className:r()("".concat(s,"-content")),children:t.geoLocation&&((N=t.geoLocation)===null||N===void 0?void 0:N.countryName)||"-"})]}),(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u7701\u4EFD"}),(0,e.jsx)("span",{className:r()("".concat(s,"-content")),children:t.geoLocation&&((M=t.geoLocation)===null||M===void 0?void 0:M.provinceName)||"-"})]}),(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u57CE\u5E02"}),(0,e.jsx)("span",{className:r()("".concat(s,"-content")),children:t.geoLocation&&((h=t.geoLocation)===null||h===void 0?void 0:h.cityName)||"-"})]})]}),(0,e.jsxs)("div",{className:r()("".concat(s,"-line-event")),children:[(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u4E8B\u4EF6\u65F6\u95F4"}),(0,e.jsx)("span",{className:r()("".concat(s,"-content")),children:(0,e.jsx)(ee,{style:{maxWidth:"100%"},ellipsis:!0,children:X()(t.eventTime).format("YYYY.MM.DD HH:mm:ss")})})]}),(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u4E8B\u4EF6\u7C7B\u578B"}),(0,e.jsx)("span",{className:r()("".concat(s,"-content")),children:t.eventType})]}),(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u4E8B\u4EF6\u72B6\u6001"}),(0,e.jsxs)("span",{className:r()("".concat(s,"-content")),children:[t.eventStatus===S.N.success&&(0,e.jsx)("span",{style:{color:"#87d068"},children:"\u6210\u529F"}),t.eventStatus===S.N.fail&&(0,e.jsx)("span",{style:{color:"#e54545"},children:"\u5931\u8D25"})]})]})]}),t.targets&&(0,e.jsx)("div",{className:r()("".concat(s,"-line-target")),children:(0,e.jsxs)("div",{className:r()("".concat(s,"-each-line")),children:[(0,e.jsx)("span",{className:r()("".concat(s,"-label")),children:"\u64CD\u4F5C\u5BF9\u8C61"}),(0,e.jsx)("span",{className:r()("".concat(s,"-content")),children:(0,e.jsx)("pre",{children:JSON.stringify(t.targets,null,3)},t.id)})]})})]})})},ye=a(46986),ue=ye.ZP.ConfigContext;function ne(T){var y=".".concat(T),x=(0,$.useContext)(ue),m=x.getPrefixCls,P=".".concat(m()),D=(0,Q.l)(function(){return j()({},"".concat(y),j()({},"".concat(P,"-table-expanded-row-fixed"),{width:"auto !important"}))});return{className:D}}var de="audit-admin",ve=G.Z.OptGroup,W=G.Z.Option,je=ce.Z.RangePicker,fe=function(){var T=(0,$.useRef)(),y=(0,$.useState)(),x=E()(y,2),m=x[0],P=x[1],D=ne(de),N=D.className;(0,oe.Z)(o()(Z()().mark(function h(){return Z()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:d(S.F.admin).then(function(p){p.success&&P(p.result)});case 1:case"end":return i.stop()}},h)})),[]);var M=[{title:"\u4E8B\u4EF6\u7C7B\u578B",dataIndex:"eventType",fixed:"left",renderFormItem:function(){return(0,e.jsx)(G.Z,{placeholder:"\u8BF7\u9009\u62E9\u4E8B\u4EF6\u7C7B\u578B",showSearch:!0,allowClear:!0,mode:"multiple",maxTagCount:"responsive",children:m&&m.map(function(t){return(0,e.jsx)(ve,{label:t.name,children:t.types&&t.types.map(function(i){return(0,e.jsx)(W,{value:i.code,children:i.name},i.code)})},t.code)})},"select")}},{title:"\u64CD\u4F5C\u8005",ellipsis:!0,dataIndex:"username",fieldProps:{placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D"}},{title:"\u5BA2\u6237\u7AEFIP",dataIndex:"geoLocation",ellipsis:!0,valueType:"text",hideInSearch:!0,render:function(t,i){var p=i.geoLocation;return p?(0,e.jsx)(u.Z,{status:"success",text:p.ip}):(0,e.jsx)(u.Z,{status:"error",text:"\u672A\u77E5"})}},{title:"\u64CD\u4F5C\u7CFB\u7EDF",ellipsis:!0,dataIndex:"platform",render:function(t,i){var p=i.userAgent;return p.platform}},{title:"\u6D4F\u89C8\u5668",ellipsis:!0,dataIndex:"browser",render:function(t,i){var p=i.userAgent;return p.browser}},{title:"\u4E8B\u4EF6\u65F6\u95F4",sorter:!0,defaultSortOrder:"descend",ellipsis:!0,align:"center",dataIndex:"eventTime",valueType:"dateTime",renderFormItem:function(){return(0,e.jsx)(je,{showTime:{hideDisabledOptions:!0,defaultValue:[v()("00:00:00","HH:mm:ss"),v()("11:59:59","HH:mm:ss")]},placeholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"],format:"YYYY-MM-DD HH:mm:ss"})}},{title:"\u4E8B\u4EF6\u72B6\u6001",dataIndex:"eventStatus",hideInSearch:!0,align:"center",fixed:"right",width:100,render:function(t){return(0,e.jsxs)(n.Z,{children:[t===S.N.success&&(0,e.jsx)(f.Z,{color:"#87d068",children:"\u6210\u529F"}),t===S.N.fail&&(0,e.jsx)(f.Z,{color:"#e54545",children:"\u5931\u8D25"})]})}}];return(0,e.jsx)("div",{className:N,children:(0,e.jsx)(le.Z,{columns:M,scroll:{x:1200},pagination:{showQuickJumper:!0,defaultPageSize:10},search:{},expandable:{expandRowByClick:!0,expandedRowClassName:function(){return r()("".concat(de))},expandedRowRender:function(t,i){return(0,e.jsx)(k,{record:t,index:i,type:S.F.admin})},expandIcon:function(t){var i=t.expanded,p=t.onExpand,K=t.record;return i?(0,e.jsx)(V.Z,{onClick:function(H){return p(K,H)}}):(0,e.jsx)(se,{onClick:function(H){return p(K,H)}})}},actionRef:T,params:{userType:S.F.admin},request:A,rowKey:"id",dateFormatter:"string"})})},me="audit-user",Ne=G.Z.OptGroup,Se=G.Z.Option,he=ce.Z.RangePicker,Fe=function(){var T=(0,$.useRef)(),y=(0,$.useState)(),x=E()(y,2),m=x[0],P=x[1],D=ne(me),N=D.className;(0,oe.Z)(o()(Z()().mark(function h(){return Z()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:d(S.F.user).then(function(p){p.success&&P(p.result)});case 1:case"end":return i.stop()}},h)})),[]);var M=[{title:"\u4E8B\u4EF6\u7C7B\u578B",dataIndex:"eventType",fixed:"left",renderFormItem:function(){return(0,e.jsx)(G.Z,{placeholder:"\u8BF7\u9009\u62E9\u4E8B\u4EF6\u7C7B\u578B",showSearch:!0,allowClear:!0,mode:"multiple",maxTagCount:"responsive",children:m&&m.map(function(t){return(0,e.jsx)(Ne,{label:t.name,children:t.types&&t.types.map(function(i){return(0,e.jsx)(Se,{value:i.code,children:i.name},i.code)})},t.code)})},"select")}},{title:"\u64CD\u4F5C\u8005",ellipsis:!0,dataIndex:"username",fieldProps:{placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D"}},{title:"\u5BA2\u6237\u7AEFIP",dataIndex:"geoLocation",ellipsis:!0,valueType:"text",hideInSearch:!0,render:function(t,i){var p=i.geoLocation;return p?(0,e.jsx)(u.Z,{status:"success",text:p.ip}):(0,e.jsx)(u.Z,{status:"error",text:"\u672A\u77E5"})}},{title:"\u64CD\u4F5C\u7CFB\u7EDF",ellipsis:!0,dataIndex:"platform",render:function(t,i){var p=i.userAgent;return p.platform}},{title:"\u6D4F\u89C8\u5668",ellipsis:!0,dataIndex:"browser",render:function(t,i){var p=i.userAgent;return p.browser}},{title:"\u4E8B\u4EF6\u65F6\u95F4",sorter:!0,defaultSortOrder:"descend",ellipsis:!0,align:"center",dataIndex:"eventTime",valueType:"dateTime",renderFormItem:function(){return(0,e.jsx)(he,{showTime:{hideDisabledOptions:!0,defaultValue:[v()("00:00:00","HH:mm:ss"),v()("11:59:59","HH:mm:ss")]},placeholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"],format:"YYYY-MM-DD HH:mm:ss"})}},{title:"\u4E8B\u4EF6\u72B6\u6001",dataIndex:"eventStatus",hideInSearch:!0,align:"center",fixed:"right",width:100,render:function(t){return(0,e.jsxs)(n.Z,{children:[t===S.N.success&&(0,e.jsx)(f.Z,{color:"#87d068",children:"\u6210\u529F"}),t===S.N.fail&&(0,e.jsx)(f.Z,{color:"#e54545",children:"\u5931\u8D25"})]})}}];return(0,e.jsx)("div",{className:N,children:(0,e.jsx)(le.Z,{columns:M,scroll:{x:1200},pagination:{showQuickJumper:!0,defaultPageSize:10},search:{},expandable:{expandRowByClick:!0,expandedRowClassName:function(){return r()("".concat(me))},expandedRowRender:function(t,i){return(0,e.jsx)(k,{record:t,index:i,type:S.F.user})},expandIcon:function(t){var i=t.expanded,p=t.onExpand,K=t.record;return i?(0,e.jsx)(V.Z,{onClick:function(H){return p(K,H)}}):(0,e.jsx)(se,{onClick:function(H){return p(K,H)}})}},actionRef:T,params:{userType:S.F.user},request:A,rowKey:"id",dateFormatter:"string"})})},be=function(){var T=(0,$.useState)(S.F.user),y=E()(T,2),x=y[0],m=y[1];return(0,e.jsxs)(O._z,{tabActiveKey:x,onTabChange:function(D){m(D)},tabList:[{key:S.F.user,tab:"\u7528\u6237\u884C\u4E3A"},{key:S.F.admin,tab:"\u7BA1\u7406\u5458\u884C\u4E3A"}],content:"\u5BA1\u8BA1\u65E5\u5FD7\u8BB0\u5F55\u4E86\u6240\u6709\u5E73\u53F0\u7528\u6237\u8FDB\u884C\u7684\u5173\u952E\u64CD\u4F5C\uFF0C\u65E0\u8BBA\u662F\u7BA1\u7406\u5458\u8FDB\u884C\u7684\u6279\u91CF\u64CD\u4F5C\u3001\u8FD8\u662F\u7528\u6237\u4FA7\u8FDB\u884C\u7684\u591A\u56E0\u7D20\u8BA4\u8BC1\uFF0C\u90FD\u53EF\u4EE5\u5728\u8FD9\u91CC\u627E\u5230\u5BF9\u5E94\u7684\u8BB0\u5F55\uFF0C\u4EE5\u5BF9\u67D0\u6B21\u6539\u53D8\u63D0\u4F9B\u5145\u5206\u7684\u6EAF\u6E90\u6570\u636E\u3002",children:[x===S.F.user&&(0,e.jsx)(Fe,{}),x===S.F.admin&&(0,e.jsx)(fe,{})]})}},2093:function(te,Y,a){var C=a(67294),E=a(92770),O=function(Z,g,o,I){function F(c){return c instanceof o?c:new o(function(B){B(c)})}return new(o||(o=Promise))(function(c,B){function A(b){try{d(I.next(b))}catch(V){B(V)}}function U(b){try{d(I.throw(b))}catch(V){B(V)}}function d(b){b.done?c(b.value):F(b.value).then(A,U)}d((I=I.apply(Z,g||[])).next())})},S=function(Z,g){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},I,F,c,B;return B={next:A(0),throw:A(1),return:A(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function A(d){return function(b){return U([d,b])}}function U(d){if(I)throw new TypeError("Generator is already executing.");for(;o;)try{if(I=1,F&&(c=d[0]&2?F.return:d[0]?F.throw||((c=F.return)&&c.call(F),0):F.next)&&!(c=c.call(F,d[1])).done)return c;switch(F=0,c&&(d=[d[0]&2,c.value]),d[0]){case 0:case 1:c=d;break;case 4:return o.label++,{value:d[1],done:!1};case 5:o.label++,F=d[1],d=[0];continue;case 7:d=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(d[0]===6||d[0]===2)){o=0;continue}if(d[0]===3&&(!c||d[1]>c[0]&&d[1] "+n.iconCls+" + span, > span + "+n.iconCls,{marginInlineStart:L}),f)))},$=(0,B.Z)("Tag",function(u){var n=u.fontSize,f=u.lineHeight,l=u.lineWidth,v=u.fontSizeIcon,z=Math.round(n*f),L=u.fontSizeSM,R=z-l*2,X=u.colorFillAlter,w=u.colorText,j=(0,A.TS)(u,{tagFontSize:L,tagLineHeight:R,tagDefaultBg:X,tagDefaultColor:w,tagIconSize:v-2*l,tagPaddingHorizontal:8});return[ae(j),V(j),b(j,"success","Success"),b(j,"processing","Info"),b(j,"error","Error"),b(j,"warning","Warning")]}),ge=function(u,n){var f={};for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&n.indexOf(l)<0&&(f[l]=u[l]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,l=Object.getOwnPropertySymbols(u);v. + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[6462],{18679:function(pa,ue,t){t.r(ue),t.d(ue,{default:function(){return da}});var ge=t(11281),$=t.n(ge),Ee=t(97983),l=t.n(Ee),xe=t(40794),y=t.n(xe),ye=t(12741),L=t.n(ye),Ae=t(60918),re=t(25191),O=t(98971);function Be(u,r,s){return z.apply(this,arguments)}function z(){return z=y()(l()().mark(function u(r,s,a){return l()().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return B.abrupt("return",(0,O.request)("/api/authentication/idp/list",{params:$()($()($()({},r),(0,re.YE)(s)),(0,re.oH)(a))}).then(function(c){var n,g,h,E,Z={data:c!=null&&(n=c.result)!==null&&n!==void 0&&n.list?c==null||(g=c.result)===null||g===void 0?void 0:g.list:[],success:c==null?void 0:c.success,total:c!=null&&(h=c.result)!==null&&h!==void 0&&h.pagination?c==null||(E=c.result)===null||E===void 0?void 0:E.pagination.total:0};return Promise.resolve(Z)}));case 1:case"end":return B.stop()}},u)})),z.apply(this,arguments)}function te(u){return Q.apply(this,arguments)}function Q(){return Q=y()(l()().mark(function u(r){return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,O.request)("/api/authentication/idp/get/".concat(r)));case 1:case"end":return a.stop()}},u)})),Q.apply(this,arguments)}function je(u){return Y.apply(this,arguments)}function Y(){return Y=y()(l()().mark(function u(r){return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,O.request)("/api/authentication/idp/update",{data:r,method:"PUT",requestType:"json"}));case 1:case"end":return a.stop()}},u)})),Y.apply(this,arguments)}function De(u){return G.apply(this,arguments)}function G(){return G=y()(l()().mark(function u(r){return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,O.request)("/api/authentication/idp/create",{data:r,method:"POST",requestType:"json"}));case 1:case"end":return a.stop()}},u)})),G.apply(this,arguments)}function be(u){return X.apply(this,arguments)}function X(){return X=y()(l()().mark(function u(r){return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,O.request)("/api/authentication/idp/enable/".concat(r),{method:"PUT"}));case 1:case"end":return a.stop()}},u)})),X.apply(this,arguments)}function Se(u){return J.apply(this,arguments)}function J(){return J=y()(l()().mark(function u(r){return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,O.request)("/api/authentication/idp/disable/".concat(r),{method:"PUT"}));case 1:case"end":return a.stop()}},u)})),J.apply(this,arguments)}function we(u){return q.apply(this,arguments)}function q(){return q=y()(l()().mark(function u(r){return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,O.request)("/api/authentication/idp/delete/".concat(r),{method:"DELETE"}));case 1:case"end":return a.stop()}},u)})),q.apply(this,arguments)}var ne=t(84865),Pe=t(24969),_=t(25035),Ze=t(96495),Ie=t(14459),ke=t(78234),se=t(17057),$e=t(69400),W=t(2453),ie=t(51904),Te=t(71577),Le=t(98293),ee=t(86738),R=t(67294),le=t(37476),C=t(5966),oe=t(64317),ce=t(97462),de=t(90672),pe=t(2093),fe=t(57953),he=t(88942),A;(function(u){u.social="social",u.enterprise="enterprise"})(A||(A={}));var v;(function(u){u.wechatwork_scan_code="wechatwork_scan_code",u.dingtalk_scan_code="dingtalk_scan_code",u.feishu_scan_code="feishu_scan_code",u.dingtalk_oauth="dingtalk_oauth",u.feishu_oauth="feishu_oauth",u.ldap="ldap",u.qq="qq_oauth",u.wechat_scan_code="wechat_scan_code"})(v||(v={}));var Re=[v.wechatwork_scan_code,v.dingtalk_scan_code,v.dingtalk_oauth,v.wechat_scan_code,v.qq,v.feishu_oauth,v.feishu_scan_code],ve={labelCol:{span:4},wrapperCol:{span:19}},Oe=t(52688),e=t(85893),Ue=se.Z.Paragraph,K=function(){return(0,e.jsx)(C.Z,{label:"\u56DE\u8C03\u5730\u5740",name:"redirectUri",proFieldProps:{render:function(r){return r&&(0,e.jsx)(Ue,{copyable:{text:r},style:{marginBottom:"0"},children:(0,e.jsx)("span",{dangerouslySetInnerHTML:{__html:"".concat(r,"")}})})}},readonly:!0,fieldProps:{autoComplete:"off"}})},Ne=function(r){var s=r.isCreate;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(C.Z,{name:["config","appKey"],label:"AppId",rules:[{required:!0}],extra:"\u5728\u9489\u9489\u5F00\u653E\u5E73\u53F0\uFF0C\u5E94\u7528\u5F00\u53D1 -> \u4F01\u4E1A\u5185\u90E8\u5F00\u53D1\uFF0C\u6DFB\u52A0\u5C0F\u7A0B\u5E8F\u6216H5\u5FAE\u5E94\u7528\u540E\u83B7\u53D6",fieldProps:{autoComplete:"off"},placeholder:"\u8BF7\u586B\u5199AppId"}),(0,e.jsx)(C.Z.Password,{rules:[{required:!0}],name:["config","appSecret"],label:"AppSecret",extra:"\u5728\u9489\u9489\u5F00\u653E\u5E73\u53F0\uFF0C\u5E94\u7528\u5F00\u53D1 -> \u4F01\u4E1A\u5185\u90E8\u5F00\u53D1\uFF0C\u6DFB\u52A0\u5C0F\u7A0B\u5E8F\u6216H5\u5FAE\u5E94\u7528\u540E\u83B7\u53D6",placeholder:"\u8BF7\u586B\u5199AppSecret",fieldProps:{autoComplete:"off"}}),!s&&(0,e.jsx)(K,{})]})},We=Ne,Ke=function(r){var s=r.isCreate;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(C.Z,{name:["config","appKey"],label:"AppId",rules:[{required:!0}],extra:"\u5728\u9489\u9489\u5F00\u653E\u5E73\u53F0\uFF0C\u5E94\u7528\u5F00\u53D1 -> \u4F01\u4E1A\u5185\u90E8\u5F00\u53D1\uFF0C\u6DFB\u52A0\u5C0F\u7A0B\u5E8F\u6216H5\u5FAE\u5E94\u7528\u540E\u83B7\u53D6",fieldProps:{autoComplete:"off"},placeholder:"\u8BF7\u586B\u5199AppId"}),(0,e.jsx)(C.Z.Password,{rules:[{required:!0}],name:["config","appSecret"],label:"AppSecret",extra:"\u5728\u9489\u9489\u5F00\u653E\u5E73\u53F0\uFF0C\u5E94\u7528\u5F00\u53D1 -> \u4F01\u4E1A\u5185\u90E8\u5F00\u53D1\uFF0C\u6DFB\u52A0\u5C0F\u7A0B\u5E8F\u6216H5\u5FAE\u5E94\u7528\u540E\u83B7\u53D6",placeholder:"\u8BF7\u586B\u5199AppSecret",fieldProps:{autoComplete:"off"}}),!s&&(0,e.jsx)(K,{})]})},Ve=Ke,He=function(r){var s=r.isCreate;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(C.Z,{name:["config","appId"],label:"AppId",rules:[{required:!0}],fieldProps:{autoComplete:"off"},placeholder:"\u8BF7\u586B\u5199appId"}),(0,e.jsx)(C.Z.Password,{rules:[{required:!0}],name:["config","appKey"],label:"AppSecret",placeholder:"\u8BF7\u586B\u5199appKey",fieldProps:{autoComplete:"off"}}),!s&&(0,e.jsx)(K,{})]})},Me=He,ze=function(r){var s=r.isCreate;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(C.Z,{name:["config","appId"],label:"AppId",rules:[{required:!0}],extra:"\u5FAE\u4FE1\u626B\u7801\u767B\u5F55\u5F00\u53D1\u7533\u8BF7\u83B7\u53D6\u7684AppId",placeholder:"\u8BF7\u586B\u5199\u83B7\u53D6\u7684AppId",fieldProps:{autoComplete:"off"}}),(0,e.jsx)(C.Z.Password,{name:["config","appSecret"],label:"AppSecret",rules:[{required:!0}],extra:"\u5FAE\u4FE1\u626B\u7801\u767B\u5F55\u5F00\u53D1\u7533\u8BF7\u83B7\u53D6\u7684AppSecret",placeholder:"\u8BF7\u8F93\u5165\u83B7\u53D6\u7684AppSecret",fieldProps:{autoComplete:"new-password"}}),!s&&(0,e.jsx)(K,{})]})},Qe=ze,Fe=t(69677),Ye=function(r){var s=r.isCreate;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(C.Z,{name:["config","corpId"],label:"\u4F01\u4E1AID",rules:[{required:!0}],extra:"\u4F01\u4E1A\u5FAE\u4FE1\u7BA1\u7406\u540E\u53F0->\u6211\u7684\u4F01\u4E1A->\u4F01\u4E1A\u4FE1\u606F->\u4F01\u4E1AID",children:(0,e.jsx)(Fe.Z,{autoComplete:"off",placeholder:"\u8BF7\u8F93\u5165\u83B7\u53D6\u7684CorpID"})}),(0,e.jsx)(C.Z,{name:["config","agentId"],label:"AgentId",rules:[{required:!0}],extra:"\u4F01\u4E1A\u5FAE\u4FE1\u7BA1\u7406\u540E\u53F0->\u5E94\u7528\u7BA1\u7406->\u81EA\u5EFA\u5E94\u7528->\u9009\u62E9\u5E94\u7528->AgentId",children:(0,e.jsx)(Fe.Z,{autoComplete:"off",placeholder:"\u8BF7\u8F93\u5165AgentId"})}),(0,e.jsx)(C.Z.Password,{name:["config","appSecret"],label:"Secret",rules:[{required:!0}],extra:"\u4F01\u4E1A\u5FAE\u4FE1\u7BA1\u7406\u540E\u53F0->\u5E94\u7528\u7BA1\u7406->\u81EA\u5EFA\u5E94\u7528->\u9009\u62E9\u5E94\u7528->Secret",fieldProps:{autoComplete:"new-password"},placeholder:"\u8BF7\u8F93\u5165\u83B7\u53D6\u7684Secret"}),!s&&(0,e.jsx)(K,{})]})},Ge=Ye,Xe=function(r){var s=r.type,a=r.isCreate,f=a===void 0?!1:a;return(0,e.jsxs)(e.Fragment,{children:[s===v.wechat_scan_code&&(0,e.jsx)(Qe,{isCreate:f}),s===v.wechatwork_scan_code&&(0,e.jsx)(Ge,{isCreate:f}),s===v.dingtalk_scan_code&&(0,e.jsx)(Ve,{isCreate:f}),s===v.dingtalk_oauth&&(0,e.jsx)(We,{isCreate:f}),s===v.qq&&(0,e.jsx)(Me,{isCreate:f}),(0,e.jsx)(Oe.Z,{name:["displayed"],extra:"\u5728\u767B\u5F55\u9875\u5C55\u793A\u8BA4\u8BC1\u6E90\u56FE\u6807 ",label:"\u662F\u5426\u663E\u793A"})]})},me=Xe,Je=function(u){var r=u.visible,s=u.category,a=u.onCancel,f=u.onFinish,B=(0,he.Z)(),c=L()(B,1),n=c[0],g=(0,R.useState)(!1),h=L()(g,2),E=h[0],Z=h[1];return(0,pe.Z)(y()(l()().mark(function I(){return l()().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:r&&(s===A.enterprise&&(n==null||n.setFieldsValue({displayed:!0,type:v.dingtalk_scan_code})),s===A.social&&(n==null||n.setFieldsValue({displayed:!0,type:v.wechat_scan_code})));case 1:case"end":return k.stop()}},I)})),[r,s]),(0,e.jsx)(le.Y,$()($()({title:"\u521B\u5EFA\u8BA4\u8BC1\u6E90",width:600,modalProps:{forceRender:!0,onCancel:function(){a(),n==null||n.resetFields()},destroyOnClose:!0},open:r,form:n,scrollToFirstError:!0,layout:"horizontal"},ve),{},{onFinish:function(){var I=y()(l()().mark(function j(k){var T;return l()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return Z(!0),D.next=3,f(k);case 3:return T=D.sent,Z(!1),D.abrupt("return",!!T);case 6:case"end":return D.stop()}},j)}));return function(j){return I.apply(this,arguments)}}(),children:(0,e.jsxs)(fe.Z,{spinning:E,children:[s===A.social&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(C.Z,{hidden:!0,name:"category",initialValue:A.social}),(0,e.jsx)(oe.Z,{label:"\u8BA4\u8BC1\u63D0\u4F9B\u5546",name:"type",placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u63D0\u4F9B\u5546",rules:[{message:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u63D0\u4F9B\u5546",required:!0}],options:[{value:v.wechat_scan_code,label:"\u5FAE\u4FE1\u5F00\u653E\u5E73\u53F0\u626B\u7801\u8BA4\u8BC1"},{value:v.qq,label:"QQ\u8BA4\u8BC1"}]})]}),s===A.enterprise&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(C.Z,{hidden:!0,name:"category",initialValue:A.enterprise}),(0,e.jsx)(oe.Z,{label:"\u8BA4\u8BC1\u63D0\u4F9B\u5546",name:"type",placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u63D0\u4F9B\u5546",rules:[{message:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u63D0\u4F9B\u5546",required:!0}],options:[{value:v.dingtalk_oauth,label:"\u9489\u9489\u8BA4\u8BC1"},{value:v.dingtalk_scan_code,label:"\u9489\u9489\u626B\u7801\u8BA4\u8BC1"},{value:v.feishu_scan_code,label:"\u98DE\u4E66\u626B\u7801\u8BA4\u8BC1"},{value:v.wechatwork_scan_code,label:"\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u8BA4\u8BC1"}]})]}),(0,e.jsx)(C.Z,{label:"\u8BA4\u8BC1\u6E90\u540D\u79F0",name:"name",placeholder:"\u8BF7\u8F93\u5165\u8BA4\u8BC1\u6E90\u540D\u79F0",rules:[{message:"\u8BA4\u8BC1\u6E90\u540D\u79F0\u4E3A\u5FC5\u586B\u9879",required:!0}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(ce.Z,{name:["type"],children:function(j){var k=j.type;return(0,e.jsx)(me,{type:k,isCreate:!0})}}),(0,e.jsx)(de.Z,{name:"remark",fieldProps:{rows:2,maxLength:20,showCount:!1},placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F",label:"\u5907\u6CE8"})]})}))},qe=Je,_e=t(21687),ea=function(u){var r=u.visible,s=u.id,a=u.onCancel,f=u.onFinish,B=(0,he.Z)(),c=L()(B,1),n=c[0],g=(0,R.useState)(!1),h=L()(g,2),E=h[0],Z=h[1],I=(0,R.useState)(!1),j=L()(I,2),k=j[0],T=j[1];return(0,pe.Z)(y()(l()().mark(function U(){var D,N,F;return l()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(!r){i.next=8;break}return Z(!0),i.next=4,te(s);case 4:D=i.sent,N=D.success,F=D.result,N&&F&&(n==null||n.setFieldsValue($()({},F)),Z(!1));case 8:case"end":return i.stop()}},U)})),[r,s]),(0,e.jsx)(le.Y,$()($()({title:"\u4FEE\u6539\u8BA4\u8BC1\u6E90",width:600,layout:"horizontal"},ve),{},{modalProps:{forceRender:!0,onCancel:function(){a(),n==null||n.resetFields()},destroyOnClose:!0},form:n,scrollToFirstError:!0,onFinish:function(){var U=y()(l()().mark(function D(N){var F;return l()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return T(!0),i.next=3,f(N);case 3:return F=i.sent,T(!1),i.abrupt("return",!!F);case 6:case"end":return i.stop()}},D)}));return function(D){return U.apply(this,arguments)}}(),open:r,children:(0,e.jsx)(_e.Z,{loading:E,active:!0,children:(0,e.jsxs)(fe.Z,{spinning:k,children:[(0,e.jsx)(C.Z,{name:"id",hidden:!0}),(0,e.jsx)(C.Z,{name:"type",hidden:!0}),(0,e.jsx)(C.Z,{label:"\u8BA4\u8BC1\u6E90\u540D\u79F0",name:"name",placeholder:"\u8BF7\u8F93\u5165\u8BA4\u8BC1\u6E90\u540D\u79F0",rules:[{message:"\u8BA4\u8BC1\u6E90\u540D\u79F0\u4E3A\u5FC5\u586B\u9879",required:!0}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(ce.Z,{name:["type"],children:function(D){var N=D.type;return(0,e.jsx)(me,{type:N,isCreate:!1})}}),(0,e.jsx)(de.Z,{name:"remark",fieldProps:{rows:2,maxLength:20,showCount:!1},placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F",label:"\u5907\u6CE8"})]})})}))},aa=ea,ua=t(12812),o=t.n(ua),ra=t(46986),ta=t(38755),na=ra.ZP.ConfigContext;function sa(u){var r=(0,R.useContext)(na),s=r.getPrefixCls,a=".".concat(s()),f=".".concat(u),B=(0,ta.l)(function(c){var n,g,h,E=c.token;return h={},o()(h,"".concat(f),(n={},o()(n,"&-content",{marginInlineStart:"15px","& > div":{marginInlineStart:"0"}}),o()(n,"&-item-content",{display:"block",flex:"none",width:"100%"}),o()(n,"".concat(a,"-avatar > img"),{objectFit:"fill"}),o()(n,"".concat(a,"-card-head"),{borderBottom:"none"}),o()(n,"".concat(a,"-card-head-title"),{padding:"24px 0",lineHeight:"32px"}),o()(n,"".concat(a,"-card-extra"),{padding:"24px 0"}),o()(n,"".concat(a,"-list-pagination"),{marginTop:"24px"}),o()(n,"".concat(a,"-avatar-lg"),{width:"48px",height:"48px",lineHeight:"48px"}),o()(n,"".concat(a,"-list-item-action"),{marginInlineStart:"15px"}),o()(n,".ant-pro-list .ant-pro-list-row-content",{flex:0,margin:"0"}),o()(n,".ant-pro-list .ant-pro-list-row",{paddingLeft:"10px",paddingRight:"10px"}),n)),o()(h,"@media (max-width: ".concat(E.screenXS,"px)"),o()({},"".concat(f),(g={},o()(g,"&-content",{marginInlineStart:"0","& > div":{marginInlineStart:"0"}}),o()(g,"&-item-content",{display:"block",flex:"none",width:"100%"}),g))),o()(h,"@media (max-width: ".concat(E.screenSM,"px)"),o()({},"".concat(f),{})),o()(h,"@media (max-width: ".concat(E.screenMD,"px)"),o()({},"".concat(f),o()({},"&-content",{"& > div":{display:"block","&:last-child":{top:"0",width:"100%"}}}))),o()(h,"@media (max-width: ".concat(E.screenLG,"px) and @media (min-width: ").concat(E.screenMD,"px)"),o()({},"".concat(f),o()({},"&-content",{"& > div":{display:"block","&:last-child":{top:"0",width:"100%"}}}))),o()(h,"@media (max-width: ".concat(E.screenXL,"px)"),o()({},"".concat(f),o()({},"&-content",{"& > div":{marginInlineStart:"24px","&:last-child":{top:"0"}}}))),o()(h,"@media (max-width: 1400px)",o()({},"".concat(f),o()({},"&-content",{"& > div":{"&:last-child":{top:"0"}}}))),h});return{className:B}}var ia=t(94184),M=t.n(ia),ae=t(67038),V="identity-source-list",la=se.Z.Paragraph,Ce=function(r){var s=r.category,a=(0,R.useRef)(),f=(0,R.useState)(),B=L()(f,2),c=B[0],n=B[1],g=(0,R.useState)(!1),h=L()(g,2),E=h[0],Z=h[1],I=(0,R.useState)(!1),j=L()(I,2),k=j[0],T=j[1],U=function(){var F=y()(l()().mark(function w(i){var m,x,P,d,b,H;return l()().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.prev=0,S.next=3,De(i);case 3:if(m=S.sent,x=m.success,P=m.result,!(P&&x)){S.next=18;break}if(!(P.id&&Re.includes(P.type))){S.next=14;break}return S.next=10,te(P.id);case 10:b=S.sent,b.success&&b.result&&(H=$e.Z.success({title:"\u6DFB\u52A0\u6210\u529F",content:(0,e.jsxs)(e.Fragment,{children:["\u8BF7\u524D\u5F80\u63D0\u4F9B\u5546\u5F00\u53D1\u540E\u53F0\u914D\u7F6E\u56DE\u8C03\u5730\u5740\uFF1A",(0,e.jsx)(la,{copyable:{text:b.result.redirectUri},children:(0,e.jsx)("a",{href:"javascript:void(0);",children:b.result.redirectUri})})]}),okText:"\u786E\u8BA4",onOk:function(){H.destroy()}})),S.next=15;break;case 14:W.ZP.success("\u6DFB\u52A0\u6210\u529F");case 15:return Z(!1),(d=a.current)===null||d===void 0||d.reload(),S.abrupt("return",!0);case 18:return S.abrupt("return",!1);case 21:return S.prev=21,S.t0=S.catch(0),S.abrupt("return",!1);case 24:case"end":return S.stop()}},w,null,[[0,21]])}));return function(i){return F.apply(this,arguments)}}(),D=function(){var F=y()(l()().mark(function w(i){var m,x;return l()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,d.next=3,je($()({},i));case 3:if(m=d.sent,!(m!=null&&m.result&&m!==null&&m!==void 0&&m.success)){d.next=9;break}return W.ZP.success("\u64CD\u4F5C\u6210\u529F").then(),T(!1),(x=a.current)===null||x===void 0||x.reload(),d.abrupt("return",!0);case 9:return d.abrupt("return",!1);case 12:return d.prev=12,d.t0=d.catch(0),d.abrupt("return",!1);case 15:case"end":return d.stop()}},w,null,[[0,12]])}));return function(i){return F.apply(this,arguments)}}(),N=function(w){return(0,e.jsx)("div",{style:{flex:1,display:"flex",justifyContent:"flex-end"},children:(0,e.jsx)("div",{className:M()("".concat(V,"-content")),children:(0,e.jsx)("div",{className:M()("".concat(V,"-item-content")),children:w.enabled?(0,e.jsx)(ie.Z,{color:"#5BD8A6",children:"\u5DF2\u5F00\u542F"}):(0,e.jsx)(ie.Z,{color:"#e54545",children:"\u672A\u542F\u7528"})})})})};return(0,e.jsxs)("div",{className:M()("".concat(V)),children:[(0,e.jsx)(Ze.Rs,{actionRef:a,rowKey:"id",split:!0,pagination:{showQuickJumper:!1,defaultPageSize:5,size:"small"},showActions:"always",headerTitle:"\u63D0\u4F9B\u5546\u5217\u8868",toolBarRender:function(){return[(0,e.jsx)(Te.Z,{icon:(0,e.jsx)(Pe.Z,{}),type:"primary",onClick:function(){Z(!0)},children:"\u6DFB\u52A0\u8BA4\u8BC1\u6E90"},"add")]},request:Be,params:{category:s},search:{},metas:{title:{dataIndex:"name",title:"\u8BA4\u8BC1\u6E90\u540D\u79F0",render:function(w,i){return(0,e.jsx)("span",{onClick:function(){T(!0),n(i.id)},children:i.name})}},avatar:{search:!1,render:function(w,i){return(0,e.jsx)(Le.C,{shape:"square",size:50,src:Ae.Y[i.type]},i.id)}},description:{search:!1,render:function(w,i){return i.remark?(0,e.jsx)("span",{children:i.remark}):(0,e.jsx)("span",{children:i.desc})}},content:{search:!1,render:function(w,i){return[(0,e.jsx)(N,$()({},i),"context")]}},actions:{render:function(w,i){return[i.enabled?(0,e.jsx)(ee.Z,{title:"\u60A8\u662F\u5426\u8981\u7981\u7528\u8BA4\u8BC1\u6E90\u5417\uFF1F",placement:"bottomRight",icon:(0,e.jsx)(_.Z,{style:{color:"red"}}),onConfirm:y()(l()().mark(function m(){var x,P,d,b;return l()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,Se(i.id);case 2:if(x=p.sent,P=x.success,d=x.result,!(P&&d)){p.next=9;break}return W.ZP.success("\u64CD\u4F5C\u6210\u529F"),(b=a.current)===null||b===void 0||b.reload(),p.abrupt("return");case 9:case"end":return p.stop()}},m)})),okText:"\u662F",cancelText:"\u5426",children:(0,e.jsx)("a",{children:"\u7981\u7528"},"disabled")},"disabled"):(0,e.jsx)(ee.Z,{title:"\u60A8\u662F\u5426\u8981\u542F\u7528\u8EAB\u4EFD\u6E90\u5417\uFF1F",placement:"bottomRight",icon:(0,e.jsx)(_.Z,{}),onConfirm:y()(l()().mark(function m(){var x,P,d,b;return l()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,be(i.id);case 2:if(x=p.sent,P=x.success,d=x.result,!(P&&d)){p.next=9;break}return W.ZP.success("\u64CD\u4F5C\u6210\u529F"),(b=a.current)===null||b===void 0||b.reload(),p.abrupt("return");case 9:case"end":return p.stop()}},m)})),okText:"\u662F",cancelText:"\u5426",children:(0,e.jsx)("a",{children:"\u542F\u7528"},"enabled")},"disabled"),(0,e.jsx)("a",{onClick:function(){n(i.id),T(!0)},children:"\u914D\u7F6E"},"config"),(0,e.jsx)(ee.Z,{title:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u8BA4\u8BC1\u6E90\u5417\uFF1F",placement:"bottomRight",icon:(0,e.jsx)(_.Z,{style:{color:"red"}}),onConfirm:y()(l()().mark(function m(){var x,P,d,b;return l()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,we(i.id);case 2:if(x=p.sent,P=x.success,d=x.result,!(P&&d)){p.next=10;break}return W.ZP.success("\u64CD\u4F5C\u6210\u529F"),p.next=9,(b=a.current)===null||b===void 0?void 0:b.reload();case 9:return p.abrupt("return");case 10:case"end":return p.stop()}},m)})),okText:"\u662F",cancelText:"\u5426",children:(0,e.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u5220\u9664"},"remove")},"delete")]}}}}),(0,e.jsx)(qe,{category:s,visible:E,onCancel:function(){Z(!1)},onFinish:U}),c&&(0,e.jsx)(aa,{visible:k,id:c,onFinish:D,onCancel:function(){T(!1)}})]})},oa=function(){var r=(0,O.useLocation)(),s=(0,R.useState)(),a=L()(s,2),f=a[0],B=a[1],c=(0,ae.parse)(r.search),n=c,g=n.tab,h=sa(V),E=h.className;return(0,ke.Z)(y()(l()().mark(function Z(){return l()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(!(!g||!(g.toUpperCase()in A))){j.next=4;break}return B(A.social),ne.m.push({pathname:r.pathname,search:(0,ae.stringify)({tab:A.social})}),j.abrupt("return");case 4:B(g);case 5:case"end":return j.stop()}},Z)}))),(0,e.jsx)("div",{className:E,children:(0,e.jsxs)(Ie._z,{content:"\u652F\u6301\u8BBE\u7F6E\u591A\u79CD\u8BA4\u8BC1\u6E90\uFF0C\u4F01\u4E1A\u7528\u6237\u5373\u53EF\u901A\u8FC7\u4E0D\u540C\u65B9\u5F0F\u767B\u5F55\u95E8\u6237\u3002\u7CFB\u7EDF\u9ED8\u8BA4\u7684\u8BA4\u8BC1\u6E90\u4E3A\u7528\u6237\u5BC6\u7801\u548C\u77ED\u4FE1\u5FEB\u6377\u8BA4\u8BC1\uFF0C\u60A8\u8FD8\u53EF\u6DFB\u52A0\u9489\u9489\u626B\u7801\u3001\u5FAE\u4FE1\u626B\u7801\u3001\u4F01\u4E1A\u5FAE\u4FE1\u3001LDAP\u548CCAS\u534F\u8BAE\u8BA4\u8BC1\u6E90\u4F5C\u4E3A\u8BA4\u8BC1\u6E90\u3002",tabActiveKey:f,onTabChange:function(I){B(I),ne.m.replace({pathname:r.pathname,search:(0,ae.stringify)({tab:I})})},tabProps:{size:"small"},className:M()("".concat(V)),tabList:[{tab:"\u793E\u4EA4\u8BA4\u8BC1\u6E90",key:A.social},{tab:"\u4F01\u4E1A\u8BA4\u8BC1\u6E90",key:A.enterprise}],children:[A.social===f&&(0,e.jsx)(Ce,{category:A.social}),A.enterprise===f&&(0,e.jsx)(Ce,{category:A.enterprise})]})})},ca=oa,da=ca}}]); diff --git a/eiam-console/src/main/resources/fe/p__dashboard__Analysis__index.35de0d16.async.js b/eiam-console/src/main/resources/fe/p__dashboard__Analysis__index.35de0d16.async.js new file mode 100644 index 00000000..de97fdcd --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__dashboard__Analysis__index.35de0d16.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[1097],{88693:function(T1,z,r){r.r(z),r.d(z,{default:function(){return M1}});var X=r(11281),v=r.n(X),K=r(88372),O=r(71230),I=r(15746),U=r(97983),y=r.n(U),q=r(40794),Z=r.n(q),_=r(12741),F=r.n(_),R=r(74273),f=r(67294),b=r(2093),H=r(84865),e1=r(56034),t1=r(67841),r1=r(55355),a1=r(41156),w=r(98971);function n1(){return Y.apply(this,arguments)}function Y(){return Y=Z()(y()().mark(function n(){return y()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,w.request)("/api/analysis/overview"));case 1:case"end":return a.stop()}},n)})),Y.apply(this,arguments)}function o1(n,t){return B.apply(this,arguments)}function B(){return B=Z()(y()().mark(function n(t,a){return y()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,w.request)("/api/analysis/authn/quantity",{params:{startTime:t,endTime:a}}));case 1:case"end":return o.stop()}},n)})),B.apply(this,arguments)}function i1(n,t){return L.apply(this,arguments)}function L(){return L=Z()(y()().mark(function n(t,a){return y()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,w.request)("/api/analysis/authn/hot_provider",{params:{startTime:t,endTime:a}}));case 1:case"end":return o.stop()}},n)})),L.apply(this,arguments)}function s1(n,t){return W.apply(this,arguments)}function W(){return W=Z()(y()().mark(function n(t,a){return y()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,w.request)("/api/analysis/app/visit_rank",{params:{startTime:t,endTime:a}}));case 1:case"end":return o.stop()}},n)})),W.apply(this,arguments)}var e=r(85893),A={xs:24,sm:12,md:12,lg:12,xl:6,style:{marginBottom:24}},l1=function(){var n=(0,f.useState)(!1),t=F()(n,2),a=t[0],c=t[1],o=(0,f.useState)(),i=F()(o,2),s=i[0],h=i[1];return(0,b.Z)(Z()(y()().mark(function x(){var d,u,j;return y()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return c(!0),m.next=3,n1();case 3:d=m.sent,u=d.result,j=d.success,j&&h(u),c(!1);case 8:case"end":return m.stop()}},x)})),[]),(0,e.jsxs)(O.Z,{gutter:24,children:[(0,e.jsx)(I.Z,v()(v()({},A),{},{children:(0,e.jsx)(R.Z,{loading:a,statistic:{title:"\u4ECA\u65E5\u8BA4\u8BC1\u91CF",tip:"\u4ECA\u65E5\u8BA4\u8BC1\u91CF",value:s==null?void 0:s.todayAuthnCount,icon:(0,e.jsx)(e1.Z,{style:{width:46,height:46,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:21,color:"#1890FF",backgroundColor:"rgba(0,145,255,0.10)",fontSize:20}})}})})),(0,e.jsx)(I.Z,v()(v()({},A),{},{children:(0,e.jsx)(R.Z,{loading:a,statistic:{title:"\u8BA4\u8BC1\u6E90\u603B\u6570",tip:"\u8BA4\u8BC1\u6E90\u603B\u6570",value:s==null?void 0:s.idpCount,valueRender:function(d){return(0,e.jsx)("a",{onClick:function(){H.m.replace("/authentication/identity-provider")},children:d})},icon:(0,e.jsx)(t1.Z,{style:{width:46,height:46,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:21,color:"#1890FF",backgroundColor:"rgba(0,145,255,0.10)",fontSize:20}})}})})),(0,e.jsx)(I.Z,v()(v()({},A),{},{children:(0,e.jsx)(R.Z,{loading:a,statistic:{title:"\u7528\u6237\u6570\u91CF",tip:"\u7528\u6237\u6570\u91CF",value:s==null?void 0:s.userCount,valueRender:function(d){return(0,e.jsx)("a",{onClick:function(){H.m.replace("/account/user")},children:d})},icon:(0,e.jsx)(r1.Z,{style:{width:46,height:46,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:21,color:"#1890FF",backgroundColor:"rgba(0,145,255,0.10)",fontSize:20}})}})})),(0,e.jsx)(I.Z,v()(v()({},A),{},{children:(0,e.jsx)(R.Z,{loading:a,statistic:{title:"\u5E94\u7528\u6570\u91CF",tip:"\u5E94\u7528\u6570\u91CF",value:s==null?void 0:s.appCount,valueRender:function(d){return(0,e.jsx)("a",{onClick:function(){H.m.replace("/app")},children:d})},icon:(0,e.jsx)(a1.Z,{style:{width:46,height:46,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:21,color:"#1890FF",backgroundColor:"rgba(0,145,255,0.10)",fontSize:20}})}})}))]})},k=r(38345),u1=r(63430),c1=r(98033),d1=r(92783),p1=r(27484),S=r.n(p1);function E(n){return n<10?"0".concat(n):n}function G(n){var t=new Date,a=1e3*60*60*24;if(n==="today")return t.setHours(0),t.setMinutes(0),t.setSeconds(0),[S()(t),S()(t.getTime()+(a-1e3))];if(n==="week"){var c=t.getDay();t.setHours(0),t.setMinutes(0),t.setSeconds(0),c===0?c=6:c-=1;var o=t.getTime()-c*a;return[S()(o),S()(o+(7*a-1e3))]}var i=t.getFullYear();if(n==="month"){var s=t.getMonth(),h=S()(t).add(1,"months"),x=h.year(),d=h.month();return[S()("".concat(i,"-").concat(E(s+1),"-01 00:00:00")),S()(S()("".concat(x,"-").concat(E(d+1),"-01 00:00:00")).valueOf()-1e3)]}return[S()("".concat(i,"-01-01 00:00:00")),S()("".concat(i,"-12-31 23:59:59"))]}var m1=r(12812),M=r.n(m1),y1=r(38755),v1=r(46986),g1=v1.ZP.ConfigContext;function h1(){var n=(0,f.useContext)(g1),t=n.getPrefixCls,a=".".concat(t()),c=(0,y1.l)(function(o){var i,s,h=o.token;return s={},M()(s,".sales-extra-wrap",(i={},M()(i,".sales-extra",{display:"inline-block",marginRight:"24px",a:M()({marginLeft:"24px",color:h.colorText},"&:hover",{color:h.colorPrimary})}),M()(i,"".concat(a,"-picker-range"),{width:"270px"}),i)),M()(s,"@media (max-width: ".concat(h.screenXXL,"px)"),M()({},".sales-extra-wrap",M()({},"".concat(a,"-picker-range"),{display:"none"}))),M()(s,"@media (max-width: ".concat(h.screenXL,"px)"),M()({},".sales-extra-wrap",M()({},".sales-extra",{display:"none"}))),s});return{className:c}}var f1=c1.Z.RangePicker,D=function(n){var t=n.onChange,a=n.type,c=(0,f.useState)(),o=F()(c,2),i=o[0],s=o[1],h=(0,f.useState)(),x=F()(h,2),d=x[0],u=x[1],j=h1(),T=j.className;return(0,b.Z)(Z()(y()().mark(function m(){return y()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:s(G(a)),u(a);case 2:case"end":return l.stop()}},m)})),[a]),(0,b.Z)(Z()(y()().mark(function m(){return y()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:t(S()(i==null?void 0:i[0]).format("YYYY-MM-DD HH:mm:ss"),S()(i==null?void 0:i[1]).format("YYYY-MM-DD HH:mm:ss"));case 1:case"end":return l.stop()}},m)})),[i]),(0,e.jsx)("div",{className:T,children:(0,e.jsxs)("div",{className:"sales-extra-wrap",children:[(0,e.jsx)("div",{className:"sales-extra",children:(0,e.jsx)(d1.Z,{defaultValue:d,options:[{label:"\u4ECA\u65E5",value:"today"},{label:"\u672C\u5468",value:"week"},{label:"\u672C\u6708",value:"month"},{label:"\u672C\u5E74",value:"year"}],onChange:function(p){var l=G(p);s(l)}})}),(0,e.jsx)(f1,{format:"YYYY-MM-DD HH:mm:ss",value:i})]})})},V=r(21687),x1=function(){var n=(0,f.useState)(!1),t=F()(n,2),a=t[0],c=t[1],o=(0,f.useState)([]),i=F()(o,2),s=i[0],h=i[1],x=(0,f.useState)(),d=F()(x,2),u=d[0],j=d[1];(0,b.Z)(Z()(y()().mark(function m(){var p,l,P,C,N;return y()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(!u){g.next=10;break}return p=u.startTime,l=u.endTime,c(!0),g.next=5,i1(p,l);case 5:P=g.sent,C=P.result,N=P.success,N&&h(C),setTimeout(function(){c(!1)},90);case 10:case"end":return g.stop()}},m)})),[u]);var T={height:280,appendPadding:10,data:s,angleField:"count",colorField:"name",radius:1,innerRadius:.6,label:{type:"inner",offset:"-50%",content:"{value}",style:{textAlign:"center",fontSize:14}},statistic:{title:!1,content:{style:{whiteSpace:"pre-wrap",overflow:"hidden",textOverflow:"ellipsis"},content:""}},interactions:[{type:"element-selected"},{type:"element-active"},{type:"pie-statistic-active"}]};return(0,e.jsx)(k.Z,{title:"\u70ED\u95E8\u8BA4\u8BC1\u65B9\u5F0F",headerBordered:!0,extra:(0,e.jsx)(D,{type:"today",onChange:function(p,l){j({startTime:p,endTime:l})}}),children:(0,e.jsx)(V.Z,{loading:a,active:!0,paragraph:{rows:7},children:(0,e.jsx)(u1.Z,v()({},T))})})},Q=JSON.parse('{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"adcode":110000,"name":"\u5317\u4EAC\u5E02","center":[116.405285,39.904989],"centroid":[116.41995,40.18994],"childrenNum":16,"level":"province","parent":{"adcode":100000},"subFeatureIndex":0,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[117.348611,40.581141],[117.389879,40.561593],[117.429915,40.576141],[117.412669,40.605226],[117.467487,40.649738],[117.467487,40.649738],[117.501364,40.636569],[117.514914,40.660181],[117.493973,40.675161],[117.408973,40.686961],[117.342451,40.673799],[117.319662,40.657911],[117.278394,40.664267],[117.208177,40.694675],[117.117018,40.70012],[117.11209,40.707379],[117.012308,40.693767],[116.964881,40.709647],[116.926692,40.745022],[116.924229,40.773581],[116.848468,40.839264],[116.81336,40.848319],[116.759773,40.889954],[116.713577,40.909858],[116.722201,40.927495],[116.677853,40.970888],[116.698795,41.021477],[116.688324,41.044501],[116.647672,41.059394],[116.615643,41.053076],[116.623034,41.021026],[116.598397,40.974503],[116.5676,40.992574],[116.519557,40.98128],[116.519557,40.98128],[116.455499,40.980828],[116.447492,40.953715],[116.477057,40.899907],[116.398216,40.90624],[116.370499,40.94377],[116.339702,40.929303],[116.334159,40.90443],[116.438253,40.81934],[116.46597,40.774487],[116.453651,40.765876],[116.316912,40.772221],[116.311369,40.754996],[116.273181,40.762703],[116.247311,40.791707],[116.22021,40.744115],[116.204812,40.740035],[116.171551,40.695582],[116.162928,40.662451],[116.133979,40.666536],[116.09887,40.630665],[116.005247,40.583868],[115.982457,40.578868],[115.971986,40.6025],[115.907929,40.617493],[115.885139,40.595229],[115.827857,40.587504],[115.819849,40.55932],[115.784741,40.55841],[115.755176,40.540221],[115.736082,40.503372],[115.781045,40.49336],[115.771806,40.443734],[115.864197,40.359422],[115.917784,40.354405],[115.95166,40.281852],[115.968907,40.264045],[115.89869,40.234354],[115.870356,40.185909],[115.855574,40.188652],[115.847567,40.147036],[115.806299,40.15344],[115.773654,40.176307],[115.75456,40.145663],[115.75456,40.145663],[115.599959,40.119583],[115.59072,40.096239],[115.527278,40.076092],[115.485394,40.040364],[115.454597,40.029825],[115.450286,39.992697],[115.428728,39.984443],[115.426264,39.950502],[115.481083,39.935819],[115.522967,39.899099],[115.515575,39.892212],[115.515575,39.892212],[115.526046,39.87568],[115.514344,39.837549],[115.567314,39.816407],[115.552532,39.794799],[115.50572,39.784222],[115.483547,39.798477],[115.483547,39.798477],[115.443511,39.785601],[115.439815,39.752022],[115.486626,39.741899],[115.491554,39.670074],[115.478619,39.650723],[115.478619,39.650723],[115.522351,39.640124],[115.518039,39.597252],[115.545756,39.618922],[115.587024,39.589873],[115.633836,39.599557],[115.633836,39.599557],[115.667712,39.615234],[115.698509,39.577881],[115.698509,39.577881],[115.699125,39.570039],[115.699125,39.570039],[115.716988,39.56035],[115.716988,39.56035],[115.718835,39.553891],[115.718835,39.553891],[115.720683,39.551122],[115.720683,39.551122],[115.722531,39.5442],[115.721299,39.543738],[115.722531,39.5442],[115.722531,39.543738],[115.721299,39.543738],[115.722531,39.543738],[115.724995,39.5442],[115.724995,39.5442],[115.738545,39.540046],[115.738545,39.539585],[115.738545,39.540046],[115.738545,39.539585],[115.752712,39.515581],[115.806299,39.510041],[115.806299,39.510041],[115.821081,39.522968],[115.821081,39.522968],[115.828473,39.541431],[115.867893,39.546507],[115.867893,39.546507],[115.91532,39.582955],[115.91532,39.582955],[115.910393,39.600479],[115.910393,39.600479],[115.957204,39.560812],[115.978146,39.595868],[115.995392,39.576958],[116.026189,39.587567],[116.036044,39.571884],[116.09887,39.575113],[116.130283,39.567732],[116.151841,39.583416],[116.198652,39.589412],[116.240536,39.564041],[116.257782,39.500344],[116.307057,39.488337],[116.337854,39.455536],[116.361876,39.455074],[116.361876,39.455074],[116.434557,39.442597],[116.454883,39.453226],[116.444412,39.482332],[116.411767,39.482794],[116.401912,39.528046],[116.443796,39.510041],[116.437637,39.526661],[116.478289,39.535431],[116.473361,39.552968],[116.50847,39.551122],[116.524484,39.596329],[116.592237,39.621227],[116.592237,39.621227],[116.620571,39.601863],[116.664918,39.605552],[116.723432,39.59264],[116.724048,39.59264],[116.723432,39.59264],[116.724048,39.59264],[116.726512,39.595407],[116.726512,39.595407],[116.709266,39.618],[116.748686,39.619844],[116.79057,39.595868],[116.812128,39.615695],[116.8497,39.66777],[116.906366,39.677444],[116.90575,39.688037],[116.889736,39.687576],[116.887272,39.72533],[116.916837,39.731314],[116.902055,39.763523],[116.949482,39.778703],[116.918069,39.84628],[116.907598,39.832494],[116.865714,39.843982],[116.812128,39.889916],[116.78441,39.891294],[116.782563,39.947749],[116.757925,39.967934],[116.781331,40.034866],[116.820135,40.02845],[116.831222,40.051359],[116.867562,40.041739],[116.927924,40.055024],[116.945171,40.04128],[117.025243,40.030283],[117.051728,40.059605],[117.105315,40.074261],[117.105315,40.074261],[117.140423,40.064185],[117.159517,40.077008],[117.204481,40.069681],[117.210024,40.082045],[117.224191,40.094865],[117.224191,40.094865],[117.254988,40.114548],[117.254988,40.114548],[117.254988,40.114548],[117.274082,40.105852],[117.307343,40.136971],[117.349227,40.136513],[117.367089,40.172649],[117.367089,40.173106],[117.367089,40.173106],[117.367089,40.172649],[117.383719,40.188195],[117.389879,40.227958],[117.351075,40.229786],[117.331365,40.289613],[117.295024,40.2782],[117.271618,40.325211],[117.271618,40.325211],[117.243285,40.369453],[117.226039,40.368997],[117.234046,40.417312],[117.263611,40.442367],[117.208793,40.501552],[117.262995,40.512927],[117.247597,40.539766],[117.269771,40.560684],[117.348611,40.581141],[117.348611,40.581141]]]]}},{"type":"Feature","properties":{"adcode":120000,"name":"\u5929\u6D25\u5E02","center":[117.190182,39.125596],"centroid":[117.347043,39.288036],"childrenNum":16,"level":"province","parent":{"adcode":100000},"subFeatureIndex":1,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[117.765602,39.400527],[117.846906,39.407926],[117.871543,39.411625],[117.870311,39.455074],[117.899877,39.474479],[117.912195,39.517428],[117.912195,39.517428],[117.904804,39.533585],[117.933753,39.574191],[117.868464,39.59679],[117.829659,39.589873],[117.766834,39.598635],[117.753899,39.579726],[117.753899,39.579726],[117.745276,39.547892],[117.715711,39.529892],[117.707088,39.576036],[117.684914,39.58895],[117.654117,39.575113],[117.637486,39.603246],[117.66274,39.636437],[117.668899,39.666849],[117.627015,39.703693],[117.57774,39.726711],[117.595603,39.74604],[117.56111,39.754782],[117.546327,39.775943],[117.561726,39.799856],[117.529081,39.859144],[117.529081,39.859144],[117.508139,39.901854],[117.508139,39.901854],[117.512451,39.90874],[117.512451,39.90874],[117.513067,39.910576],[117.513067,39.910576],[117.514914,39.946832],[117.534625,39.954631],[117.546327,39.999116],[117.594987,39.994531],[117.594987,39.994531],[117.614697,39.97252],[117.671363,39.973896],[117.691073,39.984902],[117.756363,39.965181],[117.781616,39.966558],[117.781616,39.966558],[117.795167,39.996823],[117.795167,39.996823],[117.793319,40.005534],[117.793319,40.005534],[117.768681,40.022034],[117.768681,40.022034],[117.744044,40.018368],[117.74774,40.047236],[117.776073,40.059605],[117.752667,40.081588],[117.71879,40.082045],[117.71879,40.082045],[117.675059,40.082045],[117.655965,40.109514],[117.655965,40.109514],[117.654117,40.114548],[117.654117,40.114548],[117.651653,40.122786],[117.651653,40.122786],[117.613465,40.158014],[117.613465,40.158014],[117.609769,40.160301],[117.609769,40.160301],[117.576508,40.178593],[117.571581,40.219276],[117.548791,40.232527],[117.505059,40.227044],[117.450241,40.252627],[117.415748,40.248973],[117.389879,40.227958],[117.383719,40.188195],[117.367089,40.172649],[117.367089,40.173106],[117.367089,40.173106],[117.367089,40.172649],[117.349227,40.136513],[117.307343,40.136971],[117.274082,40.105852],[117.254988,40.114548],[117.254988,40.114548],[117.254988,40.114548],[117.224191,40.094865],[117.224191,40.094865],[117.210024,40.082045],[117.192162,40.066475],[117.198322,39.992697],[117.150894,39.944996],[117.162597,39.876598],[117.162597,39.876598],[117.227887,39.852712],[117.247597,39.860981],[117.251908,39.834332],[117.192162,39.832953],[117.156438,39.817326],[117.15767,39.796638],[117.205713,39.763984],[117.161981,39.748801],[117.165061,39.718886],[117.165061,39.718886],[117.177996,39.645194],[117.152742,39.623532],[117.10901,39.625375],[117.10901,39.625375],[117.016004,39.653949],[116.983359,39.638742],[116.983359,39.638742],[116.964265,39.64335],[116.948866,39.680668],[116.948866,39.680668],[116.944555,39.695405],[116.944555,39.695405],[116.932236,39.706456],[116.932236,39.706456],[116.90575,39.688037],[116.906366,39.677444],[116.8497,39.66777],[116.812128,39.615695],[116.808432,39.576497],[116.78749,39.554352],[116.819519,39.528507],[116.820751,39.482332],[116.785026,39.465702],[116.832454,39.435664],[116.876185,39.43474],[116.839845,39.413474],[116.840461,39.378326],[116.818287,39.3737],[116.829374,39.338994],[116.870642,39.357506],[116.889736,39.338068],[116.87249,39.291304],[116.881729,39.225966],[116.881729,39.225966],[116.855859,39.215766],[116.870026,39.153607],[116.909446,39.150822],[116.912526,39.110898],[116.91191,39.111362],[116.91191,39.111362],[116.912526,39.110898],[116.871874,39.054688],[116.812744,39.05097],[116.812744,39.05097],[116.783179,39.05097],[116.783179,39.05097],[116.754229,39.034701],[116.754229,39.034701],[116.754845,39.003084],[116.72836,38.975174],[116.708034,38.931892],[116.722201,38.896968],[116.723432,38.852706],[116.75115,38.831264],[116.737599,38.784629],[116.746222,38.754299],[116.794265,38.744498],[116.794265,38.744498],[116.858939,38.741231],[116.877417,38.680522],[116.948866,38.689398],[116.950714,38.689398],[116.95133,38.689398],[116.950714,38.689398],[116.948866,38.689398],[116.95133,38.689398],[117.038793,38.688464],[117.068358,38.680522],[117.055424,38.639398],[117.070822,38.608072],[117.109626,38.584685],[117.150894,38.617892],[117.183539,38.61836],[117.183539,38.61836],[117.213104,38.639866],[117.213104,38.639866],[117.258684,38.608072],[117.258684,38.608072],[117.238358,38.580943],[117.25314,38.556143],[117.368937,38.564566],[117.432379,38.601524],[117.47919,38.616489],[117.55803,38.613683],[117.639334,38.626776],[117.65658,38.66043],[117.729261,38.680055],[117.740964,38.700141],[117.740964,38.753833],[117.671363,38.772032],[117.646725,38.788827],[117.64611,38.828933],[117.752051,38.847579],[117.778536,38.869016],[117.847522,38.855502],[117.875855,38.920252],[117.898029,38.948649],[117.855529,38.957492],[117.837667,39.057011],[117.871543,39.122506],[117.96455,39.172631],[117.977485,39.206028],[118.032919,39.219939],[118.034767,39.218548],[118.064948,39.231065],[118.064948,39.256094],[118.036615,39.264898],[118.024296,39.289451],[118.024296,39.289451],[117.982412,39.298714],[117.982412,39.298714],[117.979333,39.300566],[117.979333,39.300566],[117.973173,39.312143],[117.973173,39.312143],[117.965782,39.314921],[117.965782,39.314921],[117.919587,39.318162],[117.919587,39.318162],[117.88879,39.332051],[117.854913,39.328348],[117.854297,39.328348],[117.854913,39.328348],[117.854297,39.328348],[117.850601,39.363984],[117.850601,39.363984],[117.810565,39.354729],[117.805022,39.373237],[117.784696,39.376938],[117.74466,39.354729],[117.670747,39.357969],[117.669515,39.322792],[117.594987,39.349176],[117.536472,39.338068],[117.521074,39.357043],[117.570965,39.404689],[117.601146,39.419485],[117.614081,39.407001],[117.668899,39.412087],[117.673211,39.386652],[117.699696,39.407463],[117.765602,39.400527]]],[[[117.805022,39.373237],[117.852449,39.380639],[117.846906,39.407926],[117.765602,39.400527],[117.784696,39.376938],[117.805022,39.373237]]]]}},{"type":"Feature","properties":{"adcode":130000,"name":"\u6CB3\u5317\u7701","center":[114.502461,38.045474],"childrenNum":11,"level":"province","parent":{"adcode":100000},"subFeatureIndex":2,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[117.467487,40.649738],[117.412669,40.605226],[117.429915,40.576141],[117.389879,40.561593],[117.348611,40.581141],[117.348611,40.581141],[117.269771,40.560684],[117.247597,40.539766],[117.262995,40.512927],[117.208793,40.501552],[117.263611,40.442367],[117.234046,40.417312],[117.226039,40.368997],[117.243285,40.369453],[117.271618,40.325211],[117.271618,40.325211],[117.295024,40.2782],[117.331365,40.289613],[117.351075,40.229786],[117.389879,40.227958],[117.415748,40.248973],[117.450241,40.252627],[117.505059,40.227044],[117.548791,40.232527],[117.571581,40.219276],[117.576508,40.178593],[117.609769,40.160301],[117.609769,40.160301],[117.613465,40.158014],[117.613465,40.158014],[117.651653,40.122786],[117.651653,40.122786],[117.654117,40.114548],[117.654117,40.114548],[117.655965,40.109514],[117.655965,40.109514],[117.675059,40.082045],[117.71879,40.082045],[117.71879,40.082045],[117.752667,40.081588],[117.776073,40.059605],[117.74774,40.047236],[117.744044,40.018368],[117.768681,40.022034],[117.768681,40.022034],[117.793319,40.005534],[117.793319,40.005534],[117.795167,39.996823],[117.795167,39.996823],[117.781616,39.966558],[117.781616,39.966558],[117.756363,39.965181],[117.691073,39.984902],[117.671363,39.973896],[117.614697,39.97252],[117.594987,39.994531],[117.594987,39.994531],[117.546327,39.999116],[117.534625,39.954631],[117.514914,39.946832],[117.513067,39.910576],[117.513067,39.910576],[117.512451,39.90874],[117.512451,39.90874],[117.508139,39.901854],[117.508139,39.901854],[117.529081,39.859144],[117.529081,39.859144],[117.561726,39.799856],[117.546327,39.775943],[117.56111,39.754782],[117.595603,39.74604],[117.57774,39.726711],[117.627015,39.703693],[117.668899,39.666849],[117.66274,39.636437],[117.637486,39.603246],[117.654117,39.575113],[117.684914,39.58895],[117.707088,39.576036],[117.715711,39.529892],[117.745276,39.547892],[117.753899,39.579726],[117.753899,39.579726],[117.766834,39.598635],[117.829659,39.589873],[117.868464,39.59679],[117.933753,39.574191],[117.904804,39.533585],[117.912195,39.517428],[117.912195,39.517428],[117.899877,39.474479],[117.870311,39.455074],[117.871543,39.411625],[117.846906,39.407926],[117.852449,39.380639],[117.805022,39.373237],[117.810565,39.354729],[117.850601,39.363984],[117.850601,39.363984],[117.854297,39.328348],[117.854913,39.328348],[117.854297,39.328348],[117.854913,39.328348],[117.88879,39.332051],[117.919587,39.318162],[117.919587,39.318162],[117.965782,39.314921],[117.965782,39.314921],[117.973173,39.312143],[117.973173,39.312143],[117.979333,39.300566],[117.979333,39.300566],[117.982412,39.298714],[117.982412,39.298714],[118.024296,39.289451],[118.024296,39.289451],[118.036615,39.264898],[118.064948,39.256094],[118.064948,39.231065],[118.034767,39.218548],[118.026144,39.201854],[118.070492,39.213911],[118.077883,39.201854],[118.12531,39.182838],[118.162883,39.136433],[118.1906,39.080708],[118.225092,39.034701],[118.319331,39.009594],[118.366143,39.016104],[118.377845,38.971917],[118.491178,38.909077],[118.539837,38.910008],[118.604511,38.971452],[118.570634,38.999363],[118.533062,39.090928],[118.588497,39.107648],[118.578642,39.130863],[118.637156,39.157319],[118.76096,39.133648],[118.814546,39.138754],[118.857662,39.162888],[118.897082,39.151286],[118.920488,39.171703],[118.951285,39.178662],[118.896466,39.139683],[118.890307,39.118792],[118.926031,39.123435],[118.97777,39.163352],[119.023966,39.187012],[119.038132,39.211593],[119.096031,39.24219],[119.121284,39.281576],[119.185342,39.342234],[119.272805,39.363521],[119.317153,39.4107],[119.316537,39.437051],[119.269726,39.498497],[119.366428,39.734996],[119.474217,39.813189],[119.536427,39.809052],[119.520413,39.840306],[119.540739,39.888079],[119.588166,39.910576],[119.620195,39.904609],[119.642369,39.925264],[119.681789,39.922511],[119.726137,39.940867],[119.787115,39.950502],[119.820375,39.979399],[119.842549,39.956007],[119.872114,39.960594],[119.854252,39.98857],[119.845629,40.000949],[119.845629,40.000949],[119.854252,40.033033],[119.81668,40.050443],[119.81668,40.050443],[119.787115,40.041739],[119.787115,40.041739],[119.783419,40.046778],[119.783419,40.046778],[119.772332,40.08113],[119.736608,40.104936],[119.760629,40.136056],[119.745847,40.207851],[119.716898,40.195966],[119.671934,40.23938],[119.639289,40.231613],[119.639289,40.231613],[119.651608,40.271808],[119.598021,40.334335],[119.586934,40.375381],[119.604797,40.455119],[119.553674,40.502007],[119.572152,40.523846],[119.559217,40.547952],[119.503783,40.553864],[119.477913,40.533399],[119.429254,40.540221],[119.30237,40.530215],[119.256175,40.543404],[119.22045,40.569322],[119.230921,40.603863],[119.177951,40.609315],[119.162552,40.600228],[119.14469,40.632482],[119.184726,40.680153],[119.165632,40.69286],[119.115125,40.666536],[119.054763,40.664721],[119.028277,40.692406],[119.011031,40.687414],[118.96114,40.72008],[118.950053,40.747743],[118.895234,40.75409],[118.907553,40.775394],[118.878604,40.783098],[118.845959,40.822057],[118.873061,40.847866],[118.90201,40.960946],[118.916792,40.969984],[118.977154,40.959138],[118.977154,40.959138],[119.00056,40.967273],[119.013495,41.007479],[118.951901,41.018317],[118.937118,41.052625],[118.964836,41.079246],[119.037516,41.067516],[119.080632,41.095936],[119.081248,41.131555],[119.126212,41.138767],[119.189038,41.198234],[119.169943,41.222996],[119.204436,41.222546],[119.209364,41.244599],[119.2494,41.279689],[119.239545,41.31431],[119.211827,41.308016],[119.197661,41.282837],[119.168712,41.294978],[119.092951,41.293629],[118.980234,41.305769],[118.949437,41.317906],[118.890923,41.300823],[118.844727,41.342622],[118.843496,41.374516],[118.770199,41.352956],[118.741866,41.324198],[118.677192,41.35026],[118.629765,41.346666],[118.528135,41.355202],[118.412338,41.331838],[118.380309,41.312062],[118.348896,41.342622],[118.361215,41.384844],[118.348896,41.428384],[118.327338,41.450816],[118.271904,41.471446],[118.315636,41.512688],[118.302701,41.55256],[118.215237,41.59554],[118.206614,41.650566],[118.159187,41.67605],[118.155491,41.712694],[118.132702,41.733241],[118.140093,41.784134],[118.178281,41.814917],[118.236179,41.80778],[118.247266,41.773869],[118.29223,41.772976],[118.335346,41.845241],[118.340273,41.87243],[118.268824,41.930336],[118.306396,41.940131],[118.313788,41.98819],[118.291614,42.007759],[118.239875,42.024655],[118.286686,42.033991],[118.296541,42.057545],[118.27252,42.083312],[118.239259,42.092639],[118.212774,42.081091],[118.220165,42.058434],[118.194296,42.031324],[118.116687,42.037102],[118.155491,42.081091],[118.097593,42.105072],[118.089586,42.12283],[118.106216,42.172082],[118.033535,42.199132],[117.977485,42.229716],[117.974405,42.25054],[118.047702,42.280656],[118.060021,42.298364],[118.008898,42.346595],[118.024296,42.385064],[117.997811,42.416884],[117.874007,42.510038],[117.856761,42.539148],[117.797631,42.585431],[117.801326,42.612744],[117.779768,42.61847],[117.708935,42.588515],[117.667051,42.582347],[117.60053,42.603054],[117.537088,42.603054],[117.530313,42.590278],[117.475494,42.602613],[117.435458,42.585431],[117.434226,42.557224],[117.387415,42.517537],[117.387415,42.517537],[117.410205,42.519743],[117.413284,42.471645],[117.390495,42.461933],[117.332596,42.46105],[117.332596,42.46105],[117.275314,42.481797],[117.275314,42.481797],[117.188467,42.468114],[117.188467,42.468114],[117.135496,42.468996],[117.09546,42.484004],[117.080061,42.463699],[117.080061,42.463699],[117.01662,42.456193],[117.01662,42.456193],[117.009228,42.44957],[117.009228,42.44957],[117.005533,42.43367],[117.005533,42.43367],[116.99075,42.425719],[116.99075,42.425719],[116.974736,42.426603],[116.974736,42.426603],[116.97104,42.427486],[116.97104,42.427486],[116.944555,42.415116],[116.944555,42.415116],[116.936547,42.410256],[116.936547,42.410256],[116.921765,42.403628],[116.921765,42.403628],[116.910062,42.395231],[116.910062,42.395231],[116.910678,42.394789],[116.910678,42.394789],[116.886656,42.366496],[116.897743,42.297479],[116.918685,42.229716],[116.903287,42.190708],[116.789338,42.200462],[116.825062,42.155669],[116.850316,42.156556],[116.890352,42.092639],[116.879881,42.018431],[116.796113,41.977958],[116.748686,41.984186],[116.727744,41.951259],[116.66923,41.947698],[116.639049,41.929891],[116.597165,41.935679],[116.553433,41.928555],[116.510933,41.974399],[116.4826,41.975734],[116.453651,41.945917],[116.393289,41.942802],[116.414231,41.982407],[116.373579,42.009983],[116.310137,41.997086],[116.298434,41.96817],[116.223906,41.932562],[116.212819,41.885352],[116.194341,41.861734],[116.122892,41.861734],[116.106877,41.831419],[116.129051,41.805996],[116.09887,41.776547],[116.034196,41.782795],[116.007095,41.79752],[116.007095,41.797966],[116.007095,41.79752],[116.007095,41.797966],[115.994776,41.828743],[115.954124,41.874213],[115.916552,41.945027],[115.85311,41.927665],[115.834632,41.93835],[115.811226,41.912525],[115.726227,41.870202],[115.688038,41.867528],[115.654162,41.829189],[115.57409,41.80555],[115.519887,41.76762],[115.488474,41.760924],[115.42996,41.728775],[115.346808,41.712247],[115.319091,41.691693],[115.360975,41.661297],[115.345576,41.635807],[115.377605,41.603148],[115.310468,41.592854],[115.290142,41.622835],[115.26612,41.616124],[115.256881,41.580768],[115.20391,41.571367],[115.195287,41.602253],[115.0992,41.62373],[115.056085,41.602253],[115.016049,41.615229],[114.860832,41.60091],[114.895325,41.636255],[114.902716,41.695715],[114.89594,41.76762],[114.868839,41.813579],[114.922426,41.825175],[114.939056,41.846132],[114.923658,41.871093],[114.915035,41.960605],[114.9021,42.015763],[114.860832,42.054879],[114.86268,42.097967],[114.825723,42.139695],[114.79431,42.149457],[114.789383,42.130819],[114.75489,42.115727],[114.675434,42.12061],[114.647717,42.109512],[114.560254,42.132595],[114.510978,42.110844],[114.502355,42.06732],[114.480181,42.064654],[114.467863,42.025989],[114.511594,41.981962],[114.478334,41.951704],[114.419203,41.942356],[114.352066,41.953484],[114.343443,41.926774],[114.282465,41.863517],[114.200545,41.789934],[114.215328,41.75646],[114.206704,41.7386],[114.237501,41.698843],[114.215328,41.68499],[114.259059,41.623282],[114.226414,41.616572],[114.221487,41.582111],[114.230726,41.513584],[114.101379,41.537779],[114.032394,41.529715],[113.976959,41.505966],[113.953553,41.483553],[113.933227,41.487139],[113.919677,41.454404],[113.877793,41.431076],[113.871017,41.413126],[113.94493,41.392477],[113.92522,41.325546],[113.899351,41.316108],[113.914749,41.294529],[113.95109,41.282837],[113.971416,41.239649],[113.992357,41.269794],[114.016379,41.231999],[113.996669,41.19238],[113.960945,41.171211],[113.920293,41.172112],[113.877793,41.115777],[113.819279,41.09774],[113.868554,41.06887],[113.973263,40.983087],[113.994821,40.938798],[114.057647,40.925234],[114.041633,40.917546],[114.055183,40.867782],[114.073661,40.857372],[114.044712,40.830661],[114.080437,40.790348],[114.104458,40.797597],[114.103227,40.770861],[114.134639,40.737314],[114.162357,40.71373],[114.183299,40.67153],[114.236269,40.607043],[114.283081,40.590685],[114.273842,40.552954],[114.293552,40.55159],[114.282465,40.494725],[114.267066,40.474242],[114.299711,40.44009],[114.286161,40.425057],[114.31203,40.372645],[114.381015,40.36307],[114.390254,40.351213],[114.438914,40.371733],[114.481413,40.34802],[114.530688,40.345283],[114.510978,40.302851],[114.46971,40.268155],[114.406269,40.246232],[114.362537,40.249886],[114.292936,40.230242],[114.255364,40.236182],[114.235654,40.198252],[114.180219,40.191395],[114.135871,40.175392],[114.097683,40.193681],[114.073046,40.168533],[114.073046,40.168533],[114.101995,40.099901],[114.086596,40.071513],[114.045944,40.056856],[114.018227,40.103563],[113.989278,40.11226],[113.959097,40.033491],[113.910438,40.015618],[114.029314,39.985819],[114.028082,39.959218],[114.047176,39.916085],[114.067502,39.922511],[114.17406,39.897722],[114.212248,39.918839],[114.229494,39.899558],[114.204241,39.885324],[114.215943,39.8619],[114.286776,39.871087],[114.285545,39.858225],[114.395182,39.867412],[114.406885,39.833413],[114.390254,39.819165],[114.41674,39.775943],[114.409964,39.761683],[114.408117,39.652106],[114.431522,39.613851],[114.49558,39.608318],[114.51529,39.564964],[114.568877,39.573729],[114.532536,39.486027],[114.501739,39.476789],[114.496812,39.438437],[114.469095,39.400989],[114.466631,39.329736],[114.430906,39.307513],[114.437066,39.259337],[114.416124,39.242654],[114.47587,39.21623],[114.443841,39.174023],[114.388406,39.176807],[114.360689,39.134112],[114.369928,39.107648],[114.345907,39.075133],[114.252284,39.073739],[114.180835,39.049111],[114.157429,39.061194],[114.10877,39.052364],[114.082901,39.09325],[114.082901,39.09325],[114.064422,39.094179],[114.050872,39.135969],[114.006524,39.122971],[113.994821,39.095572],[113.961561,39.100681],[113.930148,39.063517],[113.898119,39.067699],[113.80696,38.989595],[113.776779,38.986804],[113.76754,38.959819],[113.776163,38.885788],[113.795257,38.860628],[113.855619,38.828933],[113.836525,38.795824],[113.839605,38.7585],[113.802648,38.763166],[113.775547,38.709949],[113.720728,38.713218],[113.70225,38.651551],[113.612939,38.645942],[113.603084,38.587024],[113.561816,38.558483],[113.546417,38.492936],[113.583374,38.459671],[113.537794,38.417952],[113.525475,38.383245],[113.557504,38.343359],[113.54457,38.270569],[113.570439,38.237202],[113.598772,38.22733],[113.64312,38.232031],[113.678844,38.20523],[113.711489,38.213695],[113.720728,38.174656],[113.797105,38.162894],[113.831597,38.16854],[113.811271,38.117707],[113.876561,38.055059],[113.872249,37.990471],[113.901198,37.984811],[113.936307,37.922993],[113.959097,37.906468],[113.976959,37.816696],[114.006524,37.813386],[114.044712,37.761834],[113.996669,37.730128],[113.993589,37.706932],[114.068118,37.721608],[114.12848,37.698409],[114.139567,37.675676],[114.115545,37.619761],[114.118625,37.59084],[114.036705,37.494037],[114.014531,37.42468],[113.973879,37.40329],[113.962792,37.355734],[113.90243,37.310052],[113.886416,37.239095],[113.853155,37.215269],[113.832213,37.167594],[113.773083,37.151855],[113.773699,37.107004],[113.758301,37.075497],[113.788482,37.059739],[113.771851,37.016745],[113.791561,36.98759],[113.76138,36.956034],[113.792793,36.894796],[113.773083,36.85506],[113.731815,36.858891],[113.731815,36.878521],[113.696707,36.882351],[113.676381,36.855539],[113.680692,36.789907],[113.600004,36.752995],[113.549497,36.752515],[113.535946,36.732373],[113.499606,36.740527],[113.465113,36.707908],[113.506997,36.705029],[113.476816,36.655114],[113.486671,36.635427],[113.54457,36.62342],[113.539642,36.594116],[113.569823,36.585947],[113.588917,36.547974],[113.559968,36.528741],[113.554425,36.494589],[113.587069,36.460904],[113.635729,36.451277],[113.670221,36.425278],[113.708409,36.423352],[113.731199,36.363135],[113.755221,36.366026],[113.813119,36.332285],[113.856851,36.329392],[113.84946,36.347711],[113.882104,36.353977],[113.911054,36.314927],[113.962792,36.353977],[113.981887,36.31782],[114.002828,36.334214],[114.056415,36.329392],[114.04348,36.303353],[114.080437,36.269585],[114.129096,36.280199],[114.175907,36.264759],[114.170364,36.245938],[114.170364,36.245938],[114.203009,36.245456],[114.2104,36.272962],[114.241197,36.251247],[114.257827,36.263794],[114.299095,36.245938],[114.345291,36.255591],[114.356378,36.230492],[114.408117,36.224699],[114.417356,36.205868],[114.466015,36.197658],[114.480181,36.177855],[114.533152,36.171575],[114.586739,36.141133],[114.588587,36.118414],[114.640326,36.137266],[114.720398,36.140166],[114.734564,36.15563],[114.771521,36.124699],[114.857752,36.127599],[114.858368,36.144516],[114.912571,36.140649],[114.926737,36.089403],[114.914419,36.052155],[114.998186,36.069572],[115.04623,36.112613],[115.048693,36.161912],[115.06286,36.178338],[115.104744,36.172058],[115.12507,36.209731],[115.1842,36.193312],[115.201446,36.210214],[115.201446,36.210214],[115.202678,36.209248],[115.202678,36.209248],[115.202678,36.208765],[115.202678,36.208765],[115.242098,36.19138],[115.279055,36.13775],[115.30246,36.127599],[115.312931,36.088436],[115.365902,36.099074],[115.376989,36.128083],[115.450902,36.152248],[115.465068,36.170125],[115.483547,36.148865],[115.474923,36.248352],[115.466916,36.258969],[115.466916,36.258969],[115.462605,36.276339],[115.417025,36.292742],[115.423185,36.32216],[115.366518,36.30914],[115.368982,36.342409],[115.340033,36.398307],[115.297533,36.413239],[115.317243,36.454166],[115.291374,36.460423],[115.272895,36.497476],[115.33141,36.550378],[115.355431,36.627262],[115.365902,36.621979],[115.420105,36.686795],[115.451518,36.702151],[115.479851,36.760187],[115.524815,36.763543],[115.683727,36.808117],[115.71206,36.883308],[115.75764,36.902453],[115.79706,36.968945],[115.776734,36.992848],[115.85619,37.060694],[115.888219,37.112254],[115.879596,37.150901],[115.91224,37.177132],[115.909777,37.20669],[115.969523,37.239572],[115.975682,37.337179],[116.024341,37.360015],[116.085935,37.373809],[116.106261,37.368577],[116.169087,37.384271],[116.193109,37.365723],[116.236224,37.361442],[116.2855,37.404241],[116.226369,37.428007],[116.243,37.447965],[116.224522,37.479791],[116.240536,37.489764],[116.240536,37.489764],[116.27626,37.466967],[116.290427,37.484065],[116.278724,37.524895],[116.295355,37.554316],[116.336007,37.581355],[116.36742,37.566177],[116.379738,37.522047],[116.38097,37.522522],[116.379738,37.522047],[116.38097,37.522522],[116.433941,37.473142],[116.448108,37.503059],[116.4826,37.521573],[116.575607,37.610754],[116.604556,37.624975],[116.66307,37.686096],[116.679085,37.728708],[116.724664,37.744327],[116.753613,37.77035],[116.753613,37.793054],[116.804736,37.848837],[116.837997,37.835132],[116.919301,37.846002],[117.027091,37.832296],[117.074518,37.848837],[117.150278,37.839385],[117.185387,37.849783],[117.271618,37.839858],[117.320278,37.861596],[117.400966,37.844584],[117.438538,37.854035],[117.481038,37.914967],[117.513067,37.94329],[117.524154,37.989527],[117.557414,38.046105],[117.557414,38.046105],[117.586979,38.071551],[117.704624,38.076262],[117.746508,38.12524],[117.771145,38.134655],[117.766834,38.158658],[117.789007,38.180772],[117.808718,38.22827],[117.848754,38.255062],[117.895565,38.301572],[117.948536,38.346644],[117.957775,38.376208],[117.937449,38.387936],[117.84629,38.368232],[117.781,38.373862],[117.730493,38.424985],[117.72495,38.457328],[117.678754,38.477008],[117.644878,38.52759],[117.68553,38.539293],[117.638102,38.54491],[117.639334,38.626776],[117.55803,38.613683],[117.47919,38.616489],[117.432379,38.601524],[117.368937,38.564566],[117.25314,38.556143],[117.238358,38.580943],[117.258684,38.608072],[117.258684,38.608072],[117.213104,38.639866],[117.213104,38.639866],[117.183539,38.61836],[117.183539,38.61836],[117.150894,38.617892],[117.109626,38.584685],[117.070822,38.608072],[117.055424,38.639398],[117.068358,38.680522],[117.038793,38.688464],[116.95133,38.689398],[116.948866,38.689398],[116.950714,38.689398],[116.95133,38.689398],[116.950714,38.689398],[116.948866,38.689398],[116.877417,38.680522],[116.858939,38.741231],[116.794265,38.744498],[116.794265,38.744498],[116.746222,38.754299],[116.737599,38.784629],[116.75115,38.831264],[116.723432,38.852706],[116.722201,38.896968],[116.708034,38.931892],[116.72836,38.975174],[116.754845,39.003084],[116.754229,39.034701],[116.754229,39.034701],[116.783179,39.05097],[116.783179,39.05097],[116.812744,39.05097],[116.812744,39.05097],[116.871874,39.054688],[116.912526,39.110898],[116.91191,39.111362],[116.91191,39.111362],[116.912526,39.110898],[116.909446,39.150822],[116.870026,39.153607],[116.855859,39.215766],[116.881729,39.225966],[116.881729,39.225966],[116.87249,39.291304],[116.889736,39.338068],[116.870642,39.357506],[116.829374,39.338994],[116.818287,39.3737],[116.840461,39.378326],[116.839845,39.413474],[116.876185,39.43474],[116.832454,39.435664],[116.785026,39.465702],[116.820751,39.482332],[116.819519,39.528507],[116.78749,39.554352],[116.808432,39.576497],[116.812128,39.615695],[116.79057,39.595868],[116.748686,39.619844],[116.709266,39.618],[116.726512,39.595407],[116.726512,39.595407],[116.724048,39.59264],[116.723432,39.59264],[116.724048,39.59264],[116.723432,39.59264],[116.664918,39.605552],[116.620571,39.601863],[116.592237,39.621227],[116.592237,39.621227],[116.524484,39.596329],[116.50847,39.551122],[116.473361,39.552968],[116.478289,39.535431],[116.437637,39.526661],[116.443796,39.510041],[116.401912,39.528046],[116.411767,39.482794],[116.444412,39.482332],[116.454883,39.453226],[116.434557,39.442597],[116.361876,39.455074],[116.361876,39.455074],[116.337854,39.455536],[116.307057,39.488337],[116.257782,39.500344],[116.240536,39.564041],[116.198652,39.589412],[116.151841,39.583416],[116.130283,39.567732],[116.09887,39.575113],[116.036044,39.571884],[116.026189,39.587567],[115.995392,39.576958],[115.978146,39.595868],[115.957204,39.560812],[115.910393,39.600479],[115.910393,39.600479],[115.91532,39.582955],[115.91532,39.582955],[115.867893,39.546507],[115.867893,39.546507],[115.828473,39.541431],[115.821081,39.522968],[115.821081,39.522968],[115.806299,39.510041],[115.806299,39.510041],[115.752712,39.515581],[115.738545,39.539585],[115.738545,39.540046],[115.738545,39.539585],[115.738545,39.540046],[115.724995,39.5442],[115.724995,39.5442],[115.722531,39.543738],[115.721299,39.543738],[115.722531,39.543738],[115.722531,39.5442],[115.721299,39.543738],[115.722531,39.5442],[115.720683,39.551122],[115.720683,39.551122],[115.718835,39.553891],[115.718835,39.553891],[115.716988,39.56035],[115.716988,39.56035],[115.699125,39.570039],[115.699125,39.570039],[115.698509,39.577881],[115.698509,39.577881],[115.667712,39.615234],[115.633836,39.599557],[115.633836,39.599557],[115.587024,39.589873],[115.545756,39.618922],[115.518039,39.597252],[115.522351,39.640124],[115.478619,39.650723],[115.478619,39.650723],[115.491554,39.670074],[115.486626,39.741899],[115.439815,39.752022],[115.443511,39.785601],[115.483547,39.798477],[115.483547,39.798477],[115.50572,39.784222],[115.552532,39.794799],[115.567314,39.816407],[115.514344,39.837549],[115.526046,39.87568],[115.515575,39.892212],[115.515575,39.892212],[115.522967,39.899099],[115.481083,39.935819],[115.426264,39.950502],[115.428728,39.984443],[115.450286,39.992697],[115.454597,40.029825],[115.485394,40.040364],[115.527278,40.076092],[115.59072,40.096239],[115.599959,40.119583],[115.75456,40.145663],[115.75456,40.145663],[115.773654,40.176307],[115.806299,40.15344],[115.847567,40.147036],[115.855574,40.188652],[115.870356,40.185909],[115.89869,40.234354],[115.968907,40.264045],[115.95166,40.281852],[115.917784,40.354405],[115.864197,40.359422],[115.771806,40.443734],[115.781045,40.49336],[115.736082,40.503372],[115.755176,40.540221],[115.784741,40.55841],[115.819849,40.55932],[115.827857,40.587504],[115.885139,40.595229],[115.907929,40.617493],[115.971986,40.6025],[115.982457,40.578868],[116.005247,40.583868],[116.09887,40.630665],[116.133979,40.666536],[116.162928,40.662451],[116.171551,40.695582],[116.204812,40.740035],[116.22021,40.744115],[116.247311,40.791707],[116.273181,40.762703],[116.311369,40.754996],[116.316912,40.772221],[116.453651,40.765876],[116.46597,40.774487],[116.438253,40.81934],[116.334159,40.90443],[116.339702,40.929303],[116.370499,40.94377],[116.398216,40.90624],[116.477057,40.899907],[116.447492,40.953715],[116.455499,40.980828],[116.519557,40.98128],[116.519557,40.98128],[116.5676,40.992574],[116.598397,40.974503],[116.623034,41.021026],[116.615643,41.053076],[116.647672,41.059394],[116.688324,41.044501],[116.698795,41.021477],[116.677853,40.970888],[116.722201,40.927495],[116.713577,40.909858],[116.759773,40.889954],[116.81336,40.848319],[116.848468,40.839264],[116.924229,40.773581],[116.926692,40.745022],[116.964881,40.709647],[117.012308,40.693767],[117.11209,40.707379],[117.117018,40.70012],[117.208177,40.694675],[117.278394,40.664267],[117.319662,40.657911],[117.342451,40.673799],[117.408973,40.686961],[117.493973,40.675161],[117.514914,40.660181],[117.501364,40.636569],[117.467487,40.649738],[117.467487,40.649738]]],[[[117.210024,40.082045],[117.204481,40.069681],[117.159517,40.077008],[117.140423,40.064185],[117.105315,40.074261],[117.105315,40.074261],[117.051728,40.059605],[117.025243,40.030283],[116.945171,40.04128],[116.927924,40.055024],[116.867562,40.041739],[116.831222,40.051359],[116.820135,40.02845],[116.781331,40.034866],[116.757925,39.967934],[116.782563,39.947749],[116.78441,39.891294],[116.812128,39.889916],[116.865714,39.843982],[116.907598,39.832494],[116.918069,39.84628],[116.949482,39.778703],[116.902055,39.763523],[116.916837,39.731314],[116.887272,39.72533],[116.889736,39.687576],[116.90575,39.688037],[116.932236,39.706456],[116.932236,39.706456],[116.944555,39.695405],[116.944555,39.695405],[116.948866,39.680668],[116.948866,39.680668],[116.964265,39.64335],[116.983359,39.638742],[116.983359,39.638742],[117.016004,39.653949],[117.10901,39.625375],[117.10901,39.625375],[117.152742,39.623532],[117.177996,39.645194],[117.165061,39.718886],[117.165061,39.718886],[117.161981,39.748801],[117.205713,39.763984],[117.15767,39.796638],[117.156438,39.817326],[117.192162,39.832953],[117.251908,39.834332],[117.247597,39.860981],[117.227887,39.852712],[117.162597,39.876598],[117.162597,39.876598],[117.150894,39.944996],[117.198322,39.992697],[117.192162,40.066475],[117.210024,40.082045]]],[[[117.784696,39.376938],[117.765602,39.400527],[117.699696,39.407463],[117.673211,39.386652],[117.668899,39.412087],[117.614081,39.407001],[117.601146,39.419485],[117.570965,39.404689],[117.521074,39.357043],[117.536472,39.338068],[117.594987,39.349176],[117.669515,39.322792],[117.670747,39.357969],[117.74466,39.354729],[117.784696,39.376938]]],[[[118.869365,39.142932],[118.82009,39.108576],[118.857662,39.098824],[118.869365,39.142932]]]]}},{"type":"Feature","properties":{"adcode":140000,"name":"\u5C71\u897F\u7701","center":[112.549248,37.857014],"centroid":[112.304436,37.618179],"childrenNum":11,"level":"province","parent":{"adcode":100000},"subFeatureIndex":3,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[110.379257,34.600612],[110.424837,34.588295],[110.488279,34.610956],[110.533242,34.583368],[110.610851,34.607508],[110.710017,34.605045],[110.749437,34.65232],[110.791937,34.649858],[110.824582,34.615881],[110.883712,34.64395],[110.903422,34.669056],[110.920052,34.730068],[110.976103,34.706456],[111.035233,34.740887],[111.118385,34.756623],[111.148566,34.807742],[111.232949,34.789559],[111.255123,34.819535],[111.29208,34.806759],[111.345666,34.831816],[111.389398,34.815113],[111.439289,34.838202],[111.502731,34.829851],[111.543999,34.853428],[111.570484,34.843114],[111.592042,34.881416],[111.617911,34.894671],[111.646861,34.938836],[111.681969,34.9511],[111.664107,34.984449],[111.740483,35.00455],[111.807005,35.032977],[111.810084,35.062374],[111.933272,35.083435],[111.97762,35.067272],[112.018888,35.068742],[112.039214,35.045717],[112.062004,35.056005],[112.05646,35.098615],[112.066315,35.153437],[112.03983,35.194039],[112.078634,35.219467],[112.058924,35.280069],[112.13838,35.271275],[112.21722,35.253195],[112.242474,35.234622],[112.304684,35.251728],[112.288053,35.219956],[112.36751,35.219956],[112.390915,35.239021],[112.513487,35.218489],[112.637291,35.225822],[112.628052,35.263457],[112.720443,35.206265],[112.772798,35.207732],[112.822073,35.258082],[112.884283,35.243909],[112.934174,35.262968],[112.936022,35.284466],[112.992072,35.29619],[112.985913,35.33965],[112.996384,35.362104],[113.067217,35.353806],[113.126347,35.332327],[113.149137,35.350878],[113.165151,35.412845],[113.185477,35.409431],[113.189789,35.44893],[113.243375,35.449418],[113.304353,35.426989],[113.31236,35.481101],[113.348085,35.468429],[113.391817,35.506925],[113.439244,35.507412],[113.49899,35.532254],[113.513773,35.57364],[113.55812,35.621816],[113.547649,35.656835],[113.578446,35.633491],[113.625258,35.632518],[113.622794,35.674825],[113.592613,35.691838],[113.587685,35.736542],[113.604932,35.797727],[113.582758,35.818111],[113.660982,35.837035],[113.637576,35.870019],[113.654207,35.931586],[113.648663,35.994073],[113.678844,35.985841],[113.694859,36.026991],[113.660366,36.034735],[113.68562,36.056026],[113.671453,36.115514],[113.655439,36.125182],[113.712721,36.129533],[113.705946,36.148865],[113.651127,36.174473],[113.697939,36.181719],[113.681924,36.216491],[113.716417,36.262347],[113.712105,36.303353],[113.736127,36.324571],[113.731199,36.363135],[113.708409,36.423352],[113.670221,36.425278],[113.635729,36.451277],[113.587069,36.460904],[113.554425,36.494589],[113.559968,36.528741],[113.588917,36.547974],[113.569823,36.585947],[113.539642,36.594116],[113.54457,36.62342],[113.486671,36.635427],[113.476816,36.655114],[113.506997,36.705029],[113.465113,36.707908],[113.499606,36.740527],[113.535946,36.732373],[113.549497,36.752515],[113.600004,36.752995],[113.680692,36.789907],[113.676381,36.855539],[113.696707,36.882351],[113.731815,36.878521],[113.731815,36.858891],[113.773083,36.85506],[113.792793,36.894796],[113.76138,36.956034],[113.791561,36.98759],[113.771851,37.016745],[113.788482,37.059739],[113.758301,37.075497],[113.773699,37.107004],[113.773083,37.151855],[113.832213,37.167594],[113.853155,37.215269],[113.886416,37.239095],[113.90243,37.310052],[113.962792,37.355734],[113.973879,37.40329],[114.014531,37.42468],[114.036705,37.494037],[114.118625,37.59084],[114.115545,37.619761],[114.139567,37.675676],[114.12848,37.698409],[114.068118,37.721608],[113.993589,37.706932],[113.996669,37.730128],[114.044712,37.761834],[114.006524,37.813386],[113.976959,37.816696],[113.959097,37.906468],[113.936307,37.922993],[113.901198,37.984811],[113.872249,37.990471],[113.876561,38.055059],[113.811271,38.117707],[113.831597,38.16854],[113.797105,38.162894],[113.720728,38.174656],[113.711489,38.213695],[113.678844,38.20523],[113.64312,38.232031],[113.598772,38.22733],[113.570439,38.237202],[113.54457,38.270569],[113.557504,38.343359],[113.525475,38.383245],[113.537794,38.417952],[113.583374,38.459671],[113.546417,38.492936],[113.561816,38.558483],[113.603084,38.587024],[113.612939,38.645942],[113.70225,38.651551],[113.720728,38.713218],[113.775547,38.709949],[113.802648,38.763166],[113.839605,38.7585],[113.836525,38.795824],[113.855619,38.828933],[113.795257,38.860628],[113.776163,38.885788],[113.76754,38.959819],[113.776779,38.986804],[113.80696,38.989595],[113.898119,39.067699],[113.930148,39.063517],[113.961561,39.100681],[113.994821,39.095572],[114.006524,39.122971],[114.050872,39.135969],[114.064422,39.094179],[114.082901,39.09325],[114.082901,39.09325],[114.10877,39.052364],[114.157429,39.061194],[114.180835,39.049111],[114.252284,39.073739],[114.345907,39.075133],[114.369928,39.107648],[114.360689,39.134112],[114.388406,39.176807],[114.443841,39.174023],[114.47587,39.21623],[114.416124,39.242654],[114.437066,39.259337],[114.430906,39.307513],[114.466631,39.329736],[114.469095,39.400989],[114.496812,39.438437],[114.501739,39.476789],[114.532536,39.486027],[114.568877,39.573729],[114.51529,39.564964],[114.49558,39.608318],[114.431522,39.613851],[114.408117,39.652106],[114.409964,39.761683],[114.41674,39.775943],[114.390254,39.819165],[114.406885,39.833413],[114.395182,39.867412],[114.285545,39.858225],[114.286776,39.871087],[114.215943,39.8619],[114.204241,39.885324],[114.229494,39.899558],[114.212248,39.918839],[114.17406,39.897722],[114.067502,39.922511],[114.047176,39.916085],[114.028082,39.959218],[114.029314,39.985819],[113.910438,40.015618],[113.959097,40.033491],[113.989278,40.11226],[114.018227,40.103563],[114.045944,40.056856],[114.086596,40.071513],[114.101995,40.099901],[114.073046,40.168533],[114.073046,40.168533],[114.097683,40.193681],[114.135871,40.175392],[114.180219,40.191395],[114.235654,40.198252],[114.255364,40.236182],[114.292936,40.230242],[114.362537,40.249886],[114.406269,40.246232],[114.46971,40.268155],[114.510978,40.302851],[114.530688,40.345283],[114.481413,40.34802],[114.438914,40.371733],[114.390254,40.351213],[114.381015,40.36307],[114.31203,40.372645],[114.286161,40.425057],[114.299711,40.44009],[114.267066,40.474242],[114.282465,40.494725],[114.293552,40.55159],[114.273842,40.552954],[114.283081,40.590685],[114.236269,40.607043],[114.183299,40.67153],[114.162357,40.71373],[114.134639,40.737314],[114.084748,40.729605],[114.063806,40.706925],[114.07243,40.679246],[114.041633,40.608861],[114.076741,40.575686],[114.080437,40.547952],[114.061959,40.52885],[114.011452,40.515657],[113.948626,40.514747],[113.890112,40.466503],[113.850691,40.460583],[113.794641,40.517932],[113.763228,40.473787],[113.688699,40.448288],[113.559968,40.348476],[113.500222,40.334335],[113.387505,40.319279],[113.316672,40.319736],[113.27602,40.388601],[113.251382,40.413211],[113.083231,40.374925],[113.03334,40.368997],[112.898449,40.329317],[112.848558,40.206937],[112.744464,40.167161],[112.712436,40.178593],[112.6299,40.235725],[112.511639,40.269068],[112.456205,40.300112],[112.418017,40.295091],[112.349031,40.257194],[112.310227,40.256281],[112.299756,40.21105],[112.232619,40.169905],[112.232003,40.133311],[112.183344,40.083877],[112.182112,40.061437],[112.142076,40.027076],[112.133453,40.001866],[112.07617,39.919298],[112.042294,39.886243],[112.012729,39.827438],[111.970229,39.796638],[111.959758,39.692642],[111.925265,39.66731],[111.9382,39.623071],[111.87907,39.606013],[111.842729,39.620305],[111.783599,39.58895],[111.722621,39.606013],[111.659179,39.641507],[111.625303,39.633672],[111.525521,39.662242],[111.497187,39.661781],[111.445448,39.640124],[111.460847,39.606935],[111.441137,39.59679],[111.422043,39.539123],[111.431282,39.508656],[111.372152,39.479099],[111.358601,39.432428],[111.337043,39.420872],[111.171971,39.423183],[111.143022,39.407926],[111.125776,39.366297],[111.159037,39.362596],[111.155341,39.338531],[111.186138,39.35149],[111.179363,39.326959],[111.202152,39.305197],[111.247732,39.302419],[111.213239,39.257021],[111.219399,39.244044],[111.163348,39.152678],[111.173819,39.135041],[111.147334,39.100681],[111.138095,39.064447],[111.094363,39.030053],[111.038313,39.020289],[110.998276,38.998433],[110.980414,38.970056],[111.009979,38.932823],[111.016755,38.889981],[110.995813,38.868084],[111.009363,38.847579],[110.965016,38.755699],[110.915125,38.704345],[110.916357,38.673981],[110.880632,38.626776],[110.898494,38.587024],[110.920052,38.581878],[110.907733,38.521035],[110.870777,38.510265],[110.874473,38.453579],[110.840596,38.439986],[110.796864,38.453579],[110.77777,38.440924],[110.746973,38.366355],[110.701394,38.353215],[110.661358,38.308617],[110.601612,38.308147],[110.57759,38.297345],[110.565887,38.215105],[110.528315,38.211814],[110.509221,38.192061],[110.519692,38.130889],[110.501829,38.097929],[110.507989,38.013107],[110.528315,37.990471],[110.522771,37.955088],[110.59422,37.922049],[110.680452,37.790216],[110.735886,37.77035],[110.750669,37.736281],[110.716792,37.728708],[110.706321,37.705511],[110.775306,37.680886],[110.793169,37.650567],[110.763604,37.639668],[110.771611,37.594634],[110.795017,37.558586],[110.770995,37.538184],[110.759292,37.474567],[110.740198,37.44939],[110.644111,37.435135],[110.630561,37.372858],[110.641648,37.360015],[110.695234,37.34955],[110.678604,37.317668],[110.690307,37.287201],[110.661974,37.281963],[110.651503,37.256722],[110.590525,37.187145],[110.53509,37.138021],[110.535706,37.115118],[110.49567,37.086956],[110.460561,37.044932],[110.417446,37.027257],[110.426685,37.008621],[110.382953,37.022001],[110.381721,37.002408],[110.424221,36.963685],[110.408823,36.892403],[110.376178,36.882351],[110.424221,36.855539],[110.406975,36.824886],[110.423605,36.818179],[110.407591,36.776007],[110.447011,36.737649],[110.438388,36.685835],[110.402663,36.697352],[110.394656,36.676716],[110.426685,36.657514],[110.447627,36.621018],[110.496902,36.582102],[110.488895,36.556628],[110.503677,36.488335],[110.47288,36.453203],[110.489511,36.430094],[110.487047,36.393972],[110.459946,36.327946],[110.474112,36.306729],[110.474112,36.248352],[110.45625,36.22663],[110.447011,36.164328],[110.467953,36.074893],[110.491974,36.034735],[110.49259,35.994073],[110.516612,35.971796],[110.502445,35.947575],[110.516612,35.918501],[110.511684,35.879718],[110.549257,35.877778],[110.550489,35.838005],[110.571431,35.800639],[110.57759,35.701559],[110.609619,35.632031],[110.589293,35.602355],[110.567735,35.539559],[110.531394,35.511309],[110.477808,35.413821],[110.45009,35.327933],[110.374946,35.251728],[110.378642,35.210666],[110.364475,35.197952],[110.373714,35.134351],[110.320743,35.00504],[110.262229,34.944233],[110.230816,34.880925],[110.246831,34.789068],[110.243135,34.725641],[110.229584,34.692679],[110.269004,34.629671],[110.29549,34.610956],[110.379257,34.600612]]]]}},{"type":"Feature","properties":{"adcode":150000,"name":"\u5185\u8499\u53E4\u81EA\u6CBB\u533A","center":[111.670801,40.818311],"centroid":[114.077429,44.331087],"childrenNum":12,"level":"province","parent":{"adcode":100000},"subFeatureIndex":4,"acroutes":[100000]},"geometry":{"type":"Polygon","coordinates":[[[97.172903,42.795257],[97.371235,42.457076],[97.500582,42.243894],[97.653335,41.986856],[97.84674,41.656379],[97.613915,41.477276],[97.629314,41.440498],[97.903407,41.168057],[97.971776,41.09774],[98.142391,41.001607],[98.184891,40.988056],[98.25018,40.93925],[98.333332,40.918903],[98.344419,40.568413],[98.627751,40.677884],[98.569853,40.746836],[98.668403,40.773128],[98.689345,40.691952],[98.72199,40.657911],[98.762642,40.639748],[98.802678,40.607043],[98.80699,40.660181],[98.790975,40.705564],[98.984996,40.782644],[99.041662,40.693767],[99.102025,40.676522],[99.12543,40.715091],[99.172858,40.747289],[99.174705,40.858278],[99.565827,40.846961],[99.673,40.93292],[99.985897,40.909858],[100.057346,40.908049],[100.107853,40.875475],[100.224882,40.727337],[100.237201,40.716905],[100.242744,40.618855],[100.169447,40.541131],[100.169447,40.277743],[100.007455,40.20008],[99.955716,40.150695],[99.927383,40.063727],[99.841152,40.013326],[99.751225,40.006909],[99.714268,39.972061],[99.533182,39.891753],[99.491298,39.884406],[99.459885,39.898181],[99.440791,39.885783],[99.469124,39.875221],[99.672384,39.888079],[99.822058,39.860063],[99.904593,39.785601],[99.958796,39.769504],[100.040716,39.757083],[100.128179,39.702312],[100.250135,39.685274],[100.314193,39.606935],[100.301258,39.572345],[100.326512,39.509118],[100.44354,39.485565],[100.500823,39.481408],[100.498975,39.400527],[100.606764,39.387577],[100.707778,39.404689],[100.842053,39.405614],[100.842669,39.199999],[100.864227,39.106719],[100.829118,39.075133],[100.835278,39.025869],[100.875314,39.002619],[100.901799,39.030053],[100.961545,39.005874],[100.969553,38.946788],[101.117378,38.975174],[101.228863,39.020754],[101.198682,38.943064],[101.237486,38.907214],[101.24303,38.860628],[101.33542,38.847113],[101.34158,38.822406],[101.307087,38.80282],[101.331109,38.777164],[101.412413,38.764099],[101.562702,38.713218],[101.601506,38.65529],[101.672955,38.6908],[101.777049,38.66043],[101.873751,38.733761],[101.941505,38.808883],[102.075164,38.891378],[102.045599,38.904885],[101.955055,38.985874],[101.926106,39.000758],[101.833715,39.08907],[101.902701,39.111827],[102.012338,39.127149],[102.050526,39.141075],[102.276576,39.188868],[102.3548,39.231993],[102.45335,39.255167],[102.579002,39.183301],[102.616574,39.171703],[102.883892,39.120649],[103.007696,39.099753],[103.133347,39.192579],[103.188166,39.215302],[103.259615,39.263971],[103.344615,39.331588],[103.428998,39.353341],[103.595302,39.386652],[103.728961,39.430117],[103.85338,39.461543],[103.955626,39.456923],[104.089901,39.419947],[104.073271,39.351953],[104.047401,39.297788],[104.171205,39.160567],[104.207546,39.083495],[104.190915,39.042139],[104.196459,38.9882],[104.173053,38.94446],[104.044322,38.895105],[104.011677,38.85923],[103.85954,38.64454],[103.416063,38.404821],[103.465339,38.353215],[103.507838,38.280905],[103.53494,38.156776],[103.368636,38.08898],[103.362477,38.037621],[103.40744,37.860651],[103.627947,37.797783],[103.683381,37.777919],[103.841062,37.64725],[103.874938,37.604117],[103.935916,37.572818],[104.089285,37.465067],[104.183524,37.406618],[104.237727,37.411847],[104.287002,37.428007],[104.322726,37.44844],[104.407726,37.464592],[104.419429,37.511604],[104.433595,37.515402],[104.623305,37.522522],[104.805007,37.539133],[104.866601,37.566651],[105.027977,37.580881],[105.111128,37.633981],[105.187505,37.657674],[105.221998,37.677097],[105.315004,37.702197],[105.4037,37.710246],[105.467141,37.695094],[105.598952,37.699356],[105.616199,37.722555],[105.622358,37.777919],[105.677177,37.771769],[105.760944,37.799674],[105.80406,37.862068],[105.799749,37.939986],[105.840401,38.004147],[105.780655,38.084741],[105.76772,38.121474],[105.775111,38.186887],[105.802828,38.220277],[105.842248,38.240962],[105.86627,38.296406],[105.821307,38.366824],[105.835473,38.387467],[105.827466,38.432486],[105.850872,38.443736],[105.836705,38.476071],[105.863806,38.53508],[105.856415,38.569714],[105.874277,38.593105],[105.852719,38.641735],[105.894603,38.696405],[105.88598,38.716953],[105.908154,38.737496],[105.909386,38.791159],[105.992538,38.857366],[105.97098,38.909077],[106.021487,38.953769],[106.060907,38.96866],[106.087392,39.006339],[106.078153,39.026333],[106.096631,39.084889],[106.145907,39.153142],[106.170544,39.163352],[106.192718,39.142932],[106.251232,39.131327],[106.285109,39.146181],[106.29558,39.167992],[106.280181,39.262118],[106.402753,39.291767],[106.511774,39.272311],[106.525325,39.308439],[106.556122,39.322329],[106.602318,39.37555],[106.643586,39.357969],[106.683622,39.357506],[106.751375,39.381564],[106.781556,39.371849],[106.806809,39.318625],[106.806193,39.277407],[106.790795,39.241263],[106.795723,39.214375],[106.825288,39.19397],[106.859164,39.107648],[106.878874,39.091392],[106.933693,39.076527],[106.96757,39.054688],[106.971881,39.026333],[106.954019,38.941202],[106.837606,38.847579],[106.756302,38.748699],[106.709491,38.718821],[106.66268,38.601524],[106.647897,38.470917],[106.599854,38.389812],[106.482209,38.319417],[106.555506,38.263521],[106.627571,38.232501],[106.654672,38.22921],[106.737824,38.197706],[106.779092,38.171833],[106.858548,38.156306],[106.942316,38.132302],[107.010069,38.120532],[107.051337,38.122886],[107.071047,38.138892],[107.119091,38.134185],[107.138801,38.161011],[107.19054,38.153953],[107.240431,38.111586],[107.33159,38.086625],[107.3938,38.014993],[107.440611,37.995659],[107.411662,37.948009],[107.448618,37.933378],[107.49235,37.944706],[107.560719,37.893717],[107.65003,37.86443],[107.684523,37.888522],[107.732566,37.84931],[107.842819,37.828987],[107.884703,37.808186],[107.982022,37.787378],[107.993109,37.735335],[108.025753,37.696041],[108.012819,37.66857],[108.025137,37.649619],[108.055318,37.652462],[108.134159,37.622131],[108.193905,37.638246],[108.205608,37.655779],[108.24626,37.665728],[108.293071,37.656726],[108.301078,37.640616],[108.422418,37.648672],[108.485244,37.678044],[108.532671,37.690832],[108.628142,37.651988],[108.699591,37.669518],[108.720533,37.683728],[108.777815,37.683728],[108.791982,37.700303],[108.784591,37.764673],[108.799989,37.784068],[108.791982,37.872934],[108.798141,37.93385],[108.82709,37.989056],[108.797525,38.04799],[108.830786,38.049875],[108.883141,38.01405],[108.893612,37.978207],[108.93488,37.922521],[108.9743,37.931962],[108.982923,37.964053],[109.018648,37.971602],[109.037742,38.021593],[109.06977,38.023008],[109.050676,38.055059],[109.069155,38.091336],[108.964445,38.154894],[108.938575,38.207582],[108.976148,38.245192],[108.961981,38.26493],[109.007561,38.359316],[109.051292,38.385122],[109.054372,38.433892],[109.128901,38.480288],[109.175712,38.518694],[109.196654,38.552867],[109.276726,38.623035],[109.331545,38.597783],[109.367269,38.627711],[109.329081,38.66043],[109.338936,38.701542],[109.404226,38.720689],[109.444262,38.782763],[109.511399,38.833595],[109.549587,38.805618],[109.624116,38.85457],[109.672159,38.928167],[109.685094,38.968195],[109.665384,38.981687],[109.72513,39.018429],[109.762086,39.057476],[109.793499,39.074204],[109.851397,39.122971],[109.890818,39.103932],[109.92223,39.107183],[109.893897,39.141075],[109.961035,39.191651],[109.871723,39.243581],[109.90252,39.271848],[109.962267,39.212056],[110.041107,39.21623],[110.109476,39.249606],[110.217881,39.281113],[110.184005,39.355192],[110.161831,39.387115],[110.136577,39.39174],[110.12549,39.432891],[110.152592,39.45415],[110.243751,39.423645],[110.257917,39.407001],[110.385417,39.310291],[110.429764,39.341308],[110.434692,39.381101],[110.482735,39.360745],[110.524003,39.382952],[110.559728,39.351027],[110.566503,39.320014],[110.596684,39.282966],[110.626249,39.266751],[110.702626,39.273701],[110.731575,39.30705],[110.73835,39.348713],[110.782698,39.38804],[110.869545,39.494341],[110.891103,39.509118],[110.958856,39.519275],[111.017371,39.552045],[111.101138,39.559428],[111.136863,39.587106],[111.154725,39.569116],[111.148566,39.531277],[111.10545,39.497573],[111.10545,39.472631],[111.058639,39.447681],[111.064182,39.400989],[111.098059,39.401914],[111.087588,39.376013],[111.125776,39.366297],[111.143022,39.407926],[111.171971,39.423183],[111.337043,39.420872],[111.358601,39.432428],[111.372152,39.479099],[111.431282,39.508656],[111.422043,39.539123],[111.441137,39.59679],[111.460847,39.606935],[111.445448,39.640124],[111.497187,39.661781],[111.525521,39.662242],[111.625303,39.633672],[111.659179,39.641507],[111.722621,39.606013],[111.783599,39.58895],[111.842729,39.620305],[111.87907,39.606013],[111.9382,39.623071],[111.925265,39.66731],[111.959758,39.692642],[111.970229,39.796638],[112.012729,39.827438],[112.042294,39.886243],[112.07617,39.919298],[112.133453,40.001866],[112.142076,40.027076],[112.182112,40.061437],[112.183344,40.083877],[112.232003,40.133311],[112.232619,40.169905],[112.299756,40.21105],[112.310227,40.256281],[112.349031,40.257194],[112.418017,40.295091],[112.456205,40.300112],[112.511639,40.269068],[112.6299,40.235725],[112.712436,40.178593],[112.744464,40.167161],[112.848558,40.206937],[112.898449,40.329317],[113.03334,40.368997],[113.083231,40.374925],[113.251382,40.413211],[113.27602,40.388601],[113.316672,40.319736],[113.387505,40.319279],[113.500222,40.334335],[113.559968,40.348476],[113.688699,40.448288],[113.763228,40.473787],[113.794641,40.517932],[113.850691,40.460583],[113.890112,40.466503],[113.948626,40.514747],[114.011452,40.515657],[114.061959,40.52885],[114.080437,40.547952],[114.076741,40.575686],[114.041633,40.608861],[114.07243,40.679246],[114.063806,40.706925],[114.084748,40.729605],[114.134639,40.737314],[114.103227,40.770861],[114.104458,40.797597],[114.080437,40.790348],[114.044712,40.830661],[114.073661,40.857372],[114.055183,40.867782],[114.041633,40.917546],[114.057647,40.925234],[113.994821,40.938798],[113.973263,40.983087],[113.868554,41.06887],[113.819279,41.09774],[113.877793,41.115777],[113.920293,41.172112],[113.960945,41.171211],[113.996669,41.19238],[114.016379,41.231999],[113.992357,41.269794],[113.971416,41.239649],[113.95109,41.282837],[113.914749,41.294529],[113.899351,41.316108],[113.92522,41.325546],[113.94493,41.392477],[113.871017,41.413126],[113.877793,41.431076],[113.919677,41.454404],[113.933227,41.487139],[113.953553,41.483553],[113.976959,41.505966],[114.032394,41.529715],[114.101379,41.537779],[114.230726,41.513584],[114.221487,41.582111],[114.226414,41.616572],[114.259059,41.623282],[114.215328,41.68499],[114.237501,41.698843],[114.206704,41.7386],[114.215328,41.75646],[114.200545,41.789934],[114.282465,41.863517],[114.343443,41.926774],[114.352066,41.953484],[114.419203,41.942356],[114.478334,41.951704],[114.511594,41.981962],[114.467863,42.025989],[114.480181,42.064654],[114.502355,42.06732],[114.510978,42.110844],[114.560254,42.132595],[114.647717,42.109512],[114.675434,42.12061],[114.75489,42.115727],[114.789383,42.130819],[114.79431,42.149457],[114.825723,42.139695],[114.86268,42.097967],[114.860832,42.054879],[114.9021,42.015763],[114.915035,41.960605],[114.923658,41.871093],[114.939056,41.846132],[114.922426,41.825175],[114.868839,41.813579],[114.89594,41.76762],[114.902716,41.695715],[114.895325,41.636255],[114.860832,41.60091],[115.016049,41.615229],[115.056085,41.602253],[115.0992,41.62373],[115.195287,41.602253],[115.20391,41.571367],[115.256881,41.580768],[115.26612,41.616124],[115.290142,41.622835],[115.310468,41.592854],[115.377605,41.603148],[115.345576,41.635807],[115.360975,41.661297],[115.319091,41.691693],[115.346808,41.712247],[115.42996,41.728775],[115.488474,41.760924],[115.519887,41.76762],[115.57409,41.80555],[115.654162,41.829189],[115.688038,41.867528],[115.726227,41.870202],[115.811226,41.912525],[115.834632,41.93835],[115.85311,41.927665],[115.916552,41.945027],[115.954124,41.874213],[115.994776,41.828743],[116.007095,41.797966],[116.007095,41.79752],[116.034196,41.782795],[116.09887,41.776547],[116.129051,41.805996],[116.106877,41.831419],[116.122892,41.861734],[116.194341,41.861734],[116.212819,41.885352],[116.223906,41.932562],[116.298434,41.96817],[116.310137,41.997086],[116.373579,42.009983],[116.414231,41.982407],[116.393289,41.942802],[116.453651,41.945917],[116.4826,41.975734],[116.510933,41.974399],[116.553433,41.928555],[116.597165,41.935679],[116.639049,41.929891],[116.66923,41.947698],[116.727744,41.951259],[116.748686,41.984186],[116.796113,41.977958],[116.879881,42.018431],[116.890352,42.092639],[116.850316,42.156556],[116.825062,42.155669],[116.789338,42.200462],[116.903287,42.190708],[116.918685,42.229716],[116.897743,42.297479],[116.886656,42.366496],[116.910678,42.394789],[116.910062,42.395231],[116.921765,42.403628],[116.936547,42.410256],[116.944555,42.415116],[116.97104,42.427486],[116.974736,42.426603],[116.99075,42.425719],[117.005533,42.43367],[117.009228,42.44957],[117.01662,42.456193],[117.080061,42.463699],[117.09546,42.484004],[117.135496,42.468996],[117.188467,42.468114],[117.275314,42.481797],[117.332596,42.46105],[117.390495,42.461933],[117.413284,42.471645],[117.410205,42.519743],[117.387415,42.517537],[117.434226,42.557224],[117.435458,42.585431],[117.475494,42.602613],[117.530313,42.590278],[117.537088,42.603054],[117.60053,42.603054],[117.667051,42.582347],[117.708935,42.588515],[117.779768,42.61847],[117.801326,42.612744],[117.797631,42.585431],[117.856761,42.539148],[117.874007,42.510038],[117.997811,42.416884],[118.024296,42.385064],[118.008898,42.346595],[118.060021,42.298364],[118.047702,42.280656],[117.974405,42.25054],[117.977485,42.229716],[118.033535,42.199132],[118.106216,42.172082],[118.089586,42.12283],[118.097593,42.105072],[118.155491,42.081091],[118.116687,42.037102],[118.194296,42.031324],[118.220165,42.058434],[118.212774,42.081091],[118.239259,42.092639],[118.27252,42.083312],[118.296541,42.057545],[118.286686,42.033991],[118.239875,42.024655],[118.291614,42.007759],[118.313788,41.98819],[118.306396,41.940131],[118.268824,41.930336],[118.340273,41.87243],[118.335346,41.845241],[118.29223,41.772976],[118.247266,41.773869],[118.236179,41.80778],[118.178281,41.814917],[118.140093,41.784134],[118.132702,41.733241],[118.155491,41.712694],[118.159187,41.67605],[118.206614,41.650566],[118.215237,41.59554],[118.302701,41.55256],[118.315636,41.512688],[118.271904,41.471446],[118.327338,41.450816],[118.348896,41.428384],[118.361215,41.384844],[118.348896,41.342622],[118.380309,41.312062],[118.412338,41.331838],[118.528135,41.355202],[118.629765,41.346666],[118.677192,41.35026],[118.741866,41.324198],[118.770199,41.352956],[118.843496,41.374516],[118.844727,41.342622],[118.890923,41.300823],[118.949437,41.317906],[118.980234,41.305769],[119.092951,41.293629],[119.168712,41.294978],[119.197661,41.282837],[119.211827,41.308016],[119.239545,41.31431],[119.296211,41.325097],[119.330704,41.385293],[119.309762,41.405944],[119.376283,41.422102],[119.378131,41.459787],[119.401537,41.472343],[119.406464,41.503276],[119.361501,41.545841],[119.362116,41.566442],[119.420015,41.567785],[119.415703,41.590169],[119.342406,41.617914],[119.307914,41.657273],[119.299907,41.705545],[119.319001,41.727435],[119.317769,41.764049],[119.292515,41.790827],[119.312841,41.80555],[119.334399,41.871539],[119.323312,41.889807],[119.340559,41.926774],[119.323928,41.937014],[119.324544,41.969505],[119.375667,42.023322],[119.384906,42.08953],[119.352261,42.118391],[119.314689,42.119723],[119.30853,42.147239],[119.286972,42.154781],[119.277733,42.185387],[119.237697,42.200905],[119.274037,42.239021],[119.280197,42.260728],[119.34795,42.300578],[119.432949,42.317396],[119.482841,42.347037],[119.502551,42.388159],[119.540123,42.363401],[119.572152,42.359421],[119.571536,42.335536],[119.539507,42.297922],[119.557985,42.289068],[119.609108,42.276671],[119.617115,42.252755],[119.679941,42.240793],[119.744615,42.211545],[119.841933,42.215534],[119.854868,42.170308],[119.837622,42.135257],[119.845629,42.097079],[119.87581,42.077982],[119.897368,42.030879],[119.921389,42.014429],[119.924469,41.98908],[119.950954,41.974399],[119.954034,41.923212],[119.989759,41.899163],[120.023019,41.816701],[120.041498,41.818932],[120.050737,41.776101],[120.024867,41.737707],[120.035954,41.708226],[120.096316,41.697056],[120.1382,41.729221],[120.127113,41.77253],[120.183164,41.826513],[120.188707,41.848361],[120.215808,41.853265],[120.251533,41.884016],[120.286641,41.880005],[120.290337,41.897381],[120.260156,41.904062],[120.271859,41.925439],[120.318054,41.93746],[120.309431,41.951704],[120.373489,41.994862],[120.399358,41.984631],[120.456641,42.016208],[120.450481,42.057101],[120.493597,42.073539],[120.466496,42.105516],[120.56751,42.152119],[120.58414,42.167203],[120.624792,42.154338],[120.72211,42.203565],[120.745516,42.223512],[120.79048,42.218636],[120.820661,42.227943],[120.8299,42.252755],[120.883487,42.242565],[120.883487,42.269585],[120.933994,42.27977],[120.992508,42.264714],[121.028848,42.242565],[121.070732,42.254083],[121.087978,42.278885],[121.120623,42.280656],[121.133558,42.300135],[121.184681,42.333324],[121.218558,42.371802],[121.285079,42.387717],[121.314644,42.42837],[121.304789,42.435879],[121.386093,42.474294],[121.434752,42.475176],[121.4791,42.49636],[121.506201,42.482239],[121.570875,42.487093],[121.607831,42.516214],[121.604136,42.495037],[121.66573,42.437204],[121.69899,42.438529],[121.747649,42.484887],[121.803084,42.514891],[121.817867,42.504303],[121.831417,42.533856],[121.844352,42.522389],[121.889931,42.556784],[121.921344,42.605697],[121.915801,42.656332],[121.94167,42.666014],[121.939207,42.688453],[122.018663,42.69901],[122.062394,42.723635],[122.072865,42.710444],[122.160945,42.684934],[122.204676,42.685374],[122.204676,42.732867],[122.261343,42.695931],[122.324785,42.684934],[122.338951,42.669975],[122.396234,42.684054],[122.396234,42.707366],[122.460907,42.755282],[122.439349,42.770221],[122.371596,42.776371],[122.35127,42.830378],[122.436886,42.843105],[122.556378,42.827745],[122.576088,42.819405],[122.580399,42.789987],[122.624747,42.773296],[122.653696,42.78252],[122.733152,42.786034],[122.73808,42.77066],[122.786123,42.757479],[122.848949,42.712203],[122.883442,42.751766],[122.887137,42.770221],[122.925941,42.772417],[122.945651,42.753524],[122.980144,42.777689],[123.058368,42.768903],[123.118114,42.801405],[123.227752,42.831695],[123.169853,42.859777],[123.188947,42.895739],[123.18402,42.925983],[123.259165,42.993431],[123.323222,43.000872],[123.434707,43.027565],[123.474743,43.042438],[123.536337,43.007],[123.572678,43.003498],[123.580685,43.036314],[123.631192,43.088346],[123.636119,43.141644],[123.666916,43.179623],[123.645974,43.208855],[123.676771,43.223684],[123.664453,43.264663],[123.698329,43.272071],[123.703873,43.37047],[123.608402,43.366119],[123.54496,43.415262],[123.519707,43.402219],[123.486446,43.44525],[123.442098,43.437863],[123.419925,43.410046],[123.382968,43.469143],[123.36449,43.483475],[123.315831,43.492159],[123.329998,43.519071],[123.304744,43.550742],[123.360179,43.567223],[123.452569,43.545971],[123.461193,43.568523],[123.434091,43.575461],[123.421157,43.598435],[123.5117,43.592801],[123.510468,43.624867],[123.536953,43.633964],[123.518475,43.682024],[123.520323,43.708419],[123.48275,43.737396],[123.498149,43.771114],[123.461809,43.822518],[123.467968,43.853599],[123.397135,43.954929],[123.37065,43.970006],[123.400831,43.979481],[123.365722,44.013922],[123.331229,44.028984],[123.32815,44.084035],[123.350939,44.092633],[123.362642,44.133452],[123.386664,44.161794],[123.323838,44.179823],[123.286882,44.211574],[123.277027,44.25274],[123.196955,44.34483],[123.128585,44.367081],[123.114419,44.40258],[123.142136,44.428228],[123.125506,44.455147],[123.137209,44.486322],[123.12489,44.5098],[123.06576,44.505959],[123.025108,44.493153],[122.85634,44.398304],[122.76087,44.369648],[122.702971,44.319145],[122.675254,44.285738],[122.641993,44.283595],[122.515726,44.251025],[122.483081,44.236877],[122.319241,44.233018],[122.271198,44.255741],[122.291524,44.310152],[122.294604,44.41113],[122.28598,44.477783],[122.228082,44.480345],[122.224386,44.526016],[122.196053,44.559712],[122.13138,44.577619],[122.113517,44.615546],[122.103046,44.67388],[122.117213,44.701961],[122.161561,44.728328],[122.152322,44.744057],[122.10243,44.736406],[122.110438,44.767856],[122.142467,44.753833],[122.168952,44.770405],[122.099967,44.7823],[122.098119,44.81882],[122.04946,44.912985],[122.079025,44.914256],[122.087032,44.95281],[122.074713,45.006573],[122.098735,45.02138],[122.119677,45.068739],[122.109822,45.142236],[122.143082,45.183167],[122.192358,45.180636],[122.22993,45.206784],[122.239169,45.276313],[122.147394,45.295682],[122.146778,45.374352],[122.180039,45.409655],[122.168336,45.439897],[122.064242,45.472641],[122.002648,45.507882],[121.993409,45.552741],[121.966308,45.596308],[121.995873,45.59882],[122.003264,45.623102],[121.970004,45.692956],[121.934279,45.71051],[121.867142,45.719703],[121.812323,45.704659],[121.811091,45.687103],[121.713773,45.701734],[121.666345,45.727641],[121.644172,45.752284],[121.657106,45.770238],[121.697142,45.76314],[121.754425,45.794862],[121.766744,45.830318],[121.769823,45.84366],[121.817251,45.875336],[121.805548,45.900746],[121.821562,45.918235],[121.809243,45.961102],[121.761816,45.998947],[121.819098,46.023054],[121.843736,46.024301],[121.864062,46.002272],[121.923808,46.004767],[121.92812,45.988552],[122.040221,45.959022],[122.085184,45.912406],[122.091344,45.882002],[122.200981,45.857],[122.236705,45.831569],[122.253952,45.7982],[122.301379,45.813218],[122.337719,45.859917],[122.372828,45.856166],[122.362357,45.917403],[122.446125,45.916986],[122.496016,45.85825],[122.504639,45.786933],[122.522501,45.786933],[122.556378,45.82156],[122.603189,45.778169],[122.640761,45.771072],[122.650001,45.731401],[122.671558,45.70048],[122.741775,45.705077],[122.751015,45.735996],[122.792283,45.766063],[122.752246,45.834905],[122.772572,45.856583],[122.80029,45.856583],[122.828623,45.912406],[122.792898,46.073313],[123.04605,46.099878],[123.070071,46.123527],[123.112571,46.130163],[123.102716,46.172037],[123.127354,46.174523],[123.128585,46.210565],[123.178476,46.248239],[123.142136,46.298293],[123.089781,46.347888],[123.011557,46.434984],[123.010325,46.524823],[123.002318,46.574624],[123.052825,46.579972],[123.04605,46.617803],[123.077462,46.622324],[123.098404,46.603002],[123.18094,46.614103],[123.228368,46.588198],[123.279491,46.616981],[123.276411,46.660947],[123.318295,46.662179],[123.366338,46.677784],[123.474743,46.686817],[123.603475,46.68928],[123.631808,46.728675],[123.629344,46.813524],[123.580069,46.827447],[123.625648,46.847508],[123.599163,46.868378],[123.605322,46.891286],[123.576989,46.891286],[123.575757,46.845461],[123.562823,46.82581],[123.506772,46.827038],[123.483366,46.84587],[123.52833,46.944836],[123.487678,46.959951],[123.42362,46.934212],[123.337389,46.988943],[123.301664,46.999965],[123.304128,46.964852],[123.360179,46.970978],[123.404526,46.935438],[123.40699,46.906416],[123.374345,46.837683],[123.341084,46.826628],[123.295505,46.865105],[123.221592,46.850373],[123.22344,46.821305],[123.198802,46.803283],[123.163694,46.74016],[123.103332,46.734828],[123.076846,46.745082],[123.026339,46.718829],[123.00355,46.730726],[122.996774,46.761483],[122.906847,46.80738],[122.893913,46.895376],[122.895144,46.960359],[122.83971,46.937072],[122.791051,46.941567],[122.798442,46.9575],[122.77442,46.973837],[122.778116,47.002822],[122.845869,47.046881],[122.852645,47.072158],[122.821232,47.065636],[122.710363,47.093349],[122.679566,47.094164],[122.615508,47.124306],[122.582863,47.158092],[122.531124,47.198771],[122.498479,47.255262],[122.462755,47.27841],[122.441197,47.310476],[122.418407,47.350632],[122.507103,47.401291],[122.543443,47.495589],[122.59395,47.54732],[122.765181,47.614333],[122.848949,47.67441],[122.926557,47.697777],[123.041122,47.746492],[123.161846,47.781892],[123.214201,47.824502],[123.256085,47.876711],[123.300432,47.953723],[123.537569,48.021816],[123.579453,48.045427],[123.705105,48.152142],[123.746373,48.197638],[123.862785,48.271782],[124.019234,48.39313],[124.07898,48.43603],[124.136878,48.463023],[124.25945,48.536385],[124.314269,48.503881],[124.302566,48.456673],[124.330283,48.435633],[124.309957,48.413393],[124.331515,48.380015],[124.317964,48.35099],[124.353689,48.315978],[124.365392,48.283731],[124.422058,48.245884],[124.412819,48.219175],[124.418978,48.181679],[124.475029,48.173698],[124.471333,48.133373],[124.430065,48.12099],[124.415899,48.08782],[124.46579,48.098213],[124.478108,48.123387],[124.505826,48.124985],[124.529847,48.146951],[124.512601,48.164518],[124.547094,48.200829],[124.579122,48.262221],[124.558796,48.268197],[124.579738,48.297269],[124.540934,48.335476],[124.547094,48.35775],[124.51876,48.378027],[124.52492,48.426897],[124.507674,48.445558],[124.555717,48.467784],[124.533543,48.515379],[124.548941,48.535593],[124.520608,48.556195],[124.579122,48.596582],[124.601912,48.632587],[124.624702,48.701755],[124.612383,48.747945],[124.656115,48.783842],[124.644412,48.80789],[124.654267,48.83429],[124.697383,48.841775],[124.715861,48.885475],[124.709086,48.920487],[124.744194,48.920487],[124.756513,48.967262],[124.808252,49.020666],[124.828578,49.077933],[124.809484,49.115943],[124.847672,49.129651],[124.860607,49.166448],[124.906802,49.184054],[124.983179,49.162535],[125.039845,49.17623],[125.034302,49.157056],[125.117453,49.126127],[125.158721,49.144921],[125.187671,49.186792],[125.219699,49.189139],[125.227707,49.248947],[125.214772,49.277066],[125.261583,49.322336],[125.256656,49.359769],[125.277598,49.379644],[125.25604,49.395227],[125.256656,49.437275],[125.270822,49.454395],[125.228323,49.487063],[125.211076,49.539908],[125.233866,49.536801],[125.23017,49.595411],[125.205533,49.593859],[125.16796,49.629923],[125.15441,49.616741],[125.127308,49.655113],[125.132236,49.672157],[125.164881,49.669446],[125.189518,49.652401],[125.185207,49.634574],[125.219699,49.669058],[125.225243,49.726349],[125.204301,49.734086],[125.221547,49.754969],[125.222779,49.799026],[125.177815,49.829533],[125.239409,49.844587],[125.225243,49.867351],[125.245569,49.87198],[125.212924,49.907452],[125.225859,49.922481],[125.199373,49.935194],[125.190134,49.959841],[125.231402,49.957531],[125.241873,49.987938],[125.278214,49.996402],[125.297924,50.014481],[125.283757,50.036012],[125.25296,50.041393],[125.289916,50.057917],[125.315786,50.04562],[125.328105,50.065985],[125.283757,50.070211],[125.287453,50.093636],[125.258504,50.103618],[125.27883,50.127411],[125.311474,50.140453],[125.376148,50.137385],[125.335496,50.161161],[125.382923,50.172278],[125.39093,50.199868],[125.417416,50.195654],[125.448829,50.216338],[125.442053,50.260357],[125.466075,50.266861],[125.463611,50.295925],[125.530749,50.331085],[125.520278,50.3498],[125.546763,50.358965],[125.522126,50.404759],[125.536292,50.420014],[125.567089,50.402852],[125.583104,50.409717],[125.562162,50.438314],[125.580024,50.449366],[125.627451,50.443268],[125.654553,50.471082],[125.699516,50.487078],[125.740784,50.523237],[125.754335,50.506874],[125.770349,50.531227],[125.794987,50.532748],[125.829479,50.56165],[125.807921,50.60383],[125.814697,50.62092],[125.793139,50.643316],[125.804226,50.658874],[125.789443,50.679735],[125.825784,50.70362],[125.78082,50.725598],[125.795603,50.738856],[125.758646,50.746809],[125.804226,50.773309],[125.828863,50.756654],[125.846726,50.769524],[125.836255,50.793363],[125.890457,50.805845],[125.878138,50.816812],[125.913247,50.825885],[125.939732,50.85423],[125.961906,50.901054],[125.997631,50.872738],[125.996399,50.906715],[126.02042,50.927466],[126.042594,50.92558],[126.068464,50.967434],[126.041978,50.981753],[126.033971,51.011132],[126.059225,51.043503],[125.976073,51.084498],[125.993935,51.119072],[125.970529,51.123955],[125.946508,51.108176],[125.909551,51.138977],[125.864588,51.146487],[125.850421,51.21364],[125.819008,51.227134],[125.761726,51.226385],[125.76111,51.261976],[125.740784,51.27583],[125.700132,51.327465],[125.626219,51.380163],[125.623756,51.387633],[125.62314,51.398089],[125.600966,51.410409],[125.60035,51.413396],[125.595422,51.416755],[125.559082,51.461521],[125.528285,51.488359],[125.424807,51.562827],[125.38046,51.585516],[125.35151,51.623801],[125.316402,51.610052],[125.289301,51.633831],[125.228938,51.640517],[125.214772,51.627888],[125.175968,51.639403],[125.130388,51.635317],[125.12854,51.659083],[125.098975,51.658341],[125.060171,51.59667],[125.073106,51.553526],[125.047236,51.529704],[125.004737,51.529332],[124.983795,51.508478],[124.928976,51.498419],[124.917889,51.474196],[124.942527,51.447349],[124.885244,51.40817],[124.864302,51.37979],[124.783614,51.392115],[124.76452,51.38726],[124.752817,51.35812],[124.693687,51.3327],[124.62655,51.327465],[124.58713,51.363725],[124.555717,51.375307],[124.490427,51.380537],[124.478108,51.36223],[124.443616,51.35812],[124.426985,51.331953],[124.430065,51.301281],[124.406659,51.272086],[124.339522,51.293422],[124.297638,51.298661],[124.271769,51.308389],[124.239124,51.344664],[124.192313,51.33943],[124.128255,51.347281],[124.090067,51.3413],[124.071588,51.320734],[123.994596,51.322604],[123.939777,51.313253],[123.926227,51.300532],[123.887423,51.320734],[123.842459,51.367462],[123.794416,51.361109],[123.711264,51.398089],[123.660141,51.342795],[123.661989,51.319237],[123.582533,51.306893],[123.582533,51.294545],[123.46304,51.286686],[123.440251,51.270963],[123.414381,51.278825],[123.376809,51.266844],[123.339853,51.27246],[123.294273,51.254111],[123.231447,51.268716],[123.231447,51.279199],[123.127969,51.297913],[123.069455,51.321108],[123.002934,51.31213],[122.965977,51.345786],[122.965977,51.386886],[122.946267,51.405183],[122.903768,51.415262],[122.900072,51.445112],[122.871123,51.455181],[122.854492,51.477551],[122.880362,51.511085],[122.858804,51.524864],[122.880362,51.537894],[122.874202,51.561339],[122.832935,51.581797],[122.85634,51.606707],[122.820616,51.633088],[122.816304,51.655371],[122.778732,51.698048],[122.749167,51.746613],[122.771957,51.779579],[122.732536,51.832495],[122.725761,51.87833],[122.706051,51.890151],[122.729457,51.919321],[122.726377,51.978709],[122.683877,51.974654],[122.664783,51.99861],[122.650616,52.058997],[122.625363,52.067459],[122.643841,52.111585],[122.629059,52.13657],[122.690653,52.140243],[122.73808,52.153464],[122.769493,52.179893],[122.766413,52.232705],[122.787355,52.252494],[122.76087,52.26678],[122.710979,52.256157],[122.67895,52.276667],[122.585943,52.266413],[122.560689,52.282526],[122.478153,52.29607],[122.484313,52.341432],[122.447356,52.394052],[122.419023,52.375057],[122.378987,52.395512],[122.367284,52.413768],[122.342031,52.414133],[122.326016,52.459374],[122.310618,52.475416],[122.207756,52.469218],[122.178191,52.48963],[122.168952,52.513674],[122.140003,52.510032],[122.142467,52.495096],[122.107358,52.452445],[122.080873,52.440407],[122.091344,52.427272],[122.040837,52.413038],[122.035909,52.377615],[121.976779,52.343626],[121.94783,52.298266],[121.901018,52.280695],[121.841272,52.282526],[121.769207,52.308147],[121.714389,52.318025],[121.715621,52.342894],[121.658338,52.3904],[121.678664,52.419973],[121.63986,52.44442],[121.590585,52.443326],[121.565331,52.460468],[121.519136,52.456821],[121.495114,52.484892],[121.474172,52.482706],[121.416274,52.499468],[121.411963,52.52205],[121.353448,52.534793],[121.323883,52.573727],[121.280151,52.586819],[121.225333,52.577364],[121.182217,52.59918],[121.237036,52.619167],[121.29247,52.651855],[121.309717,52.676173],[121.373158,52.683067],[121.455078,52.73528],[121.476636,52.772225],[121.511129,52.779104],[121.537614,52.801542],[121.591201,52.824693],[121.620766,52.853251],[121.604136,52.872401],[121.610295,52.892264],[121.66265,52.912478],[121.677432,52.948192],[121.715621,52.997926],[121.785838,53.018451],[121.817867,53.061631],[121.775367,53.089674],[121.784606,53.104408],[121.753193,53.147501],[121.722396,53.145706],[121.665114,53.170467],[121.660186,53.195213],[121.67928,53.199515],[121.679896,53.240722],[121.642324,53.262564],[121.615222,53.258984],[121.575802,53.29155],[121.504969,53.323018],[121.499426,53.337314],[121.416274,53.319443],[121.336818,53.325877],[121.308485,53.301565],[121.227797,53.280459],[121.155732,53.285468],[121.129246,53.277238],[121.098449,53.306929],[121.055334,53.29155],[120.950624,53.29763],[120.936457,53.28833],[120.882871,53.294411],[120.867472,53.278669],[120.820661,53.269007],[120.838523,53.239648],[120.821893,53.241797],[120.736277,53.204892],[120.690698,53.174771],[120.687002,53.142476],[120.659901,53.137091],[120.643886,53.106923],[120.562582,53.082845],[120.529321,53.045803],[120.452945,53.01017],[120.411061,52.957927],[120.363018,52.94134],[120.350699,52.906343],[120.295265,52.891542],[120.297112,52.869872],[120.222584,52.84277],[120.181316,52.806969],[120.14128,52.813119],[120.101244,52.788877],[120.031642,52.773674],[120.071063,52.70628],[120.035338,52.646409],[120.049505,52.598453],[120.07599,52.586092],[120.125265,52.586819],[120.194866,52.578819],[120.289721,52.623527],[120.396895,52.616261],[120.462184,52.64532],[120.483742,52.630066],[120.56135,52.595544],[120.605082,52.589364],[120.62664,52.570818],[120.658669,52.56718],[120.690698,52.547532],[120.734429,52.536977],[120.687002,52.511489],[120.706712,52.492909],[120.68269,52.464479],[120.688234,52.427637],[120.64943,52.3904],[120.653741,52.371038],[120.62356,52.361172],[120.627256,52.323878],[120.653741,52.302658],[120.695625,52.290214],[120.715951,52.261286],[120.755371,52.258355],[120.745516,52.20594],[120.786784,52.15787],[120.760299,52.136937],[120.76769,52.10938],[120.753523,52.085483],[120.717183,52.072978],[120.690698,52.047221],[120.691929,52.026973],[120.717799,52.015556],[120.704864,51.983501],[120.66298,51.958061],[120.656821,51.926333],[120.548416,51.907877],[120.549032,51.882394],[120.481278,51.885719],[120.480046,51.855049],[120.40059,51.833605],[120.40675,51.81659],[120.363634,51.789945],[120.317438,51.785873],[120.294649,51.752171],[120.226279,51.717703],[120.172693,51.679868],[120.087077,51.678013],[120.100628,51.649058],[120.05936,51.634203],[120.035954,51.583657],[120.052584,51.560967],[120.017476,51.52114],[119.985447,51.505125],[119.982367,51.482396],[120.002693,51.459283],[119.982983,51.445112],[119.97128,51.40033],[119.910918,51.390994],[119.914614,51.374187],[119.946643,51.360736],[119.883817,51.336813],[119.885049,51.302777],[119.811136,51.281071],[119.828383,51.263099],[119.797586,51.243622],[119.821607,51.21439],[119.784035,51.22601],[119.760629,51.212516],[119.788346,51.174636],[119.771716,51.124331],[119.752622,51.117193],[119.764325,51.092017],[119.719361,51.075099],[119.726753,51.051028],[119.678093,51.016404],[119.630666,51.00925],[119.598637,50.984767],[119.569688,50.933879],[119.491464,50.87878],[119.498855,50.827776],[119.515485,50.814165],[119.496391,50.771795],[119.506862,50.763846],[119.450196,50.695281],[119.430486,50.684286],[119.385522,50.682769],[119.394145,50.667219],[119.361501,50.632689],[119.298059,50.616743],[119.281428,50.601551],[119.295595,50.573814],[119.264182,50.536933],[119.262334,50.490124],[119.250631,50.448604],[119.22353,50.441363],[119.217371,50.414675],[119.165016,50.422683],[119.125596,50.389118],[119.176719,50.378814],[119.155777,50.364691],[119.188422,50.347509],[119.232153,50.365455],[119.259871,50.345218],[119.277117,50.366218],[119.322696,50.352474],[119.358421,50.358965],[119.381827,50.324208],[119.35103,50.303953],[119.339943,50.244668],[119.319001,50.220933],[119.358421,50.197953],[119.339327,50.192206],[119.350414,50.166145],[119.309762,50.161161],[119.290052,50.121655],[119.236465,50.075204],[119.190269,50.087877],[119.193965,50.069826],[119.163168,50.027554],[119.12498,50.019095],[119.090487,49.985629],[118.982082,49.979087],[118.964836,49.988708],[118.791757,49.955606],[118.761576,49.959456],[118.739402,49.946364],[118.672264,49.955991],[118.605127,49.926719],[118.574946,49.931342],[118.531214,49.887791],[118.485019,49.866194],[118.483787,49.830691],[118.443751,49.835709],[118.385853,49.827217],[118.398787,49.802502],[118.384005,49.783958],[118.315636,49.766953],[118.284223,49.743755],[118.220781,49.729831],[118.211542,49.690744],[118.156723,49.660149],[118.129622,49.669446],[118.082811,49.616741],[118.011362,49.614803],[117.995963,49.623332],[117.950999,49.596187],[117.866,49.591532],[117.849369,49.551557],[117.809333,49.521263],[117.638102,49.574847],[117.485349,49.633024],[117.278394,49.636512],[117.068974,49.695389],[116.736367,49.847674],[116.717889,49.847288],[116.428397,49.430659],[116.048363,48.873274],[116.077928,48.822471],[116.069305,48.811437],[115.83032,48.560156],[115.799523,48.514982],[115.822929,48.259432],[115.81061,48.257042],[115.529126,48.155336],[115.545141,48.134971],[115.539597,48.104607],[115.580249,47.921649],[115.939342,47.683275],[115.968291,47.689721],[116.111189,47.811642],[116.130283,47.823296],[116.26579,47.876711],[116.453035,47.837358],[116.669846,47.890758],[116.791186,47.89758],[116.879265,47.893968],[117.094844,47.8241],[117.384335,47.641356],[117.493357,47.758563],[117.519226,47.761782],[117.529081,47.782697],[117.813645,48.016212],[117.886942,48.025418],[117.96147,48.011007],[118.052014,48.01421],[118.107448,48.031021],[118.124694,48.047427],[118.150564,48.036224],[118.238643,48.041826],[118.238027,48.031422],[118.284839,48.011007],[118.351976,48.006203],[118.37415,48.016612],[118.422193,48.01461],[118.441903,47.995791],[118.568171,47.992187],[118.773278,47.771034],[119.134219,47.664335],[119.152081,47.540453],[119.205052,47.520249],[119.365812,47.47739],[119.32208,47.42721],[119.365812,47.423161],[119.386138,47.397645],[119.437877,47.378602],[119.450812,47.353065],[119.559217,47.303172],[119.56784,47.248357],[119.627586,47.247544],[119.716282,47.195518],[119.763093,47.13082],[119.806825,47.055037],[119.79081,47.04525],[119.795122,47.013024],[119.845013,46.964852],[119.859795,46.917046],[119.926933,46.903963],[119.920157,46.853238],[119.936172,46.790173],[119.917078,46.758203],[119.93494,46.712674],[119.911534,46.669572],[119.859179,46.669572],[119.804361,46.68189],[119.8136,46.66834],[119.783419,46.626023],[119.739687,46.615336],[119.677477,46.584908],[119.682405,46.605058],[119.656535,46.625612],[119.598637,46.618214],[119.557985,46.633832],[119.491464,46.629311],[119.431718,46.638763],[119.374435,46.603414],[119.357805,46.619447],[119.325776,46.608759],[119.26295,46.649034],[119.20074,46.648213],[119.152081,46.658072],[119.123132,46.642872],[119.073857,46.676552],[119.011647,46.745902],[118.951285,46.722111],[118.912481,46.733188],[118.914329,46.77501],[118.845343,46.771731],[118.788061,46.717598],[118.788061,46.687227],[118.677192,46.6979],[118.639004,46.721291],[118.586033,46.692975],[118.446831,46.704467],[118.41049,46.728265],[118.316252,46.73934],[118.274984,46.715957],[118.238643,46.709392],[118.192448,46.682711],[118.124078,46.678195],[118.04647,46.631366],[117.992883,46.631366],[117.982412,46.614925],[117.914659,46.607936],[117.868464,46.575447],[117.870927,46.549935],[117.813645,46.530588],[117.769913,46.537586],[117.748355,46.521941],[117.704008,46.516587],[117.641182,46.558166],[117.622704,46.596012],[117.596218,46.603414],[117.49582,46.600535],[117.42006,46.582029],[117.447777,46.528117],[117.392343,46.463023],[117.375712,46.416421],[117.383719,46.394962],[117.372017,46.36028],[117.247597,46.366888],[117.097308,46.356976],[116.876801,46.375559],[116.834302,46.384229],[116.81336,46.355737],[116.745606,46.327642],[116.673541,46.325163],[116.585462,46.292504],[116.573143,46.258998],[116.536187,46.23251],[116.439484,46.137628],[116.414231,46.133896],[116.271949,45.966926],[116.243,45.876169],[116.288579,45.839074],[116.278108,45.831152],[116.286731,45.775247],[116.260862,45.776082],[116.22329,45.747273],[116.217746,45.72221],[116.17463,45.688775],[116.1155,45.679577],[116.035428,45.685013],[116.026805,45.661177],[115.936878,45.632727],[115.864197,45.572853],[115.699741,45.45963],[115.586408,45.440317],[115.36467,45.392427],[115.178041,45.396209],[114.983404,45.379397],[114.920578,45.386122],[114.745035,45.438217],[114.600906,45.403773],[114.551014,45.387383],[114.539928,45.325985],[114.519602,45.283893],[114.459855,45.21353],[114.409348,45.179371],[114.347139,45.119436],[114.313262,45.107189],[114.19069,45.036607],[114.158045,44.994301],[114.116777,44.957045],[114.065038,44.931206],[113.907358,44.915104],[113.861778,44.863377],[113.798953,44.849377],[113.712105,44.788247],[113.631417,44.745333],[113.540874,44.759358],[113.503918,44.777628],[113.11526,44.799714],[113.037652,44.822641],[112.937869,44.840042],[112.850406,44.840466],[112.712436,44.879494],[112.599719,44.930783],[112.540589,45.001072],[112.438959,45.071697],[112.396459,45.064512],[112.113743,45.072965],[112.071243,45.096206],[112.002874,45.090713],[111.903707,45.052252],[111.764505,44.969325],[111.69244,44.859983],[111.624687,44.778477],[111.585267,44.705789],[111.560629,44.647062],[111.569868,44.57634],[111.530448,44.55033],[111.514434,44.507666],[111.478709,44.488884],[111.427586,44.394455],[111.415883,44.35724],[111.428818,44.319573],[111.507042,44.294305],[111.534144,44.26217],[111.541535,44.206855],[111.559397,44.171238],[111.662875,44.061247],[111.702295,44.034147],[111.773128,44.010479],[111.870447,43.940279],[111.959758,43.823382],[111.970845,43.748205],[111.951135,43.693275],[111.891388,43.6738],[111.79407,43.672068],[111.606209,43.513863],[111.564325,43.490422],[111.456535,43.494329],[111.400485,43.472618],[111.354289,43.436125],[111.183674,43.396132],[111.151029,43.38004],[111.069725,43.357852],[111.02045,43.329998],[110.82027,43.149067],[110.769763,43.099272],[110.736502,43.089657],[110.687227,43.036314],[110.689691,43.02144],[110.631177,42.936061],[110.469801,42.839156],[110.437156,42.781203],[110.34846,42.742098],[110.139657,42.674815],[110.108244,42.642687],[109.906216,42.635643],[109.733753,42.579262],[109.683862,42.558988],[109.544044,42.472528],[109.486761,42.458842],[109.291509,42.435879],[109.026039,42.458401],[108.983539,42.449128],[108.845569,42.395673],[108.798757,42.415116],[108.705134,42.413349],[108.532671,42.442945],[108.298614,42.438529],[108.238252,42.460167],[108.089195,42.436321],[108.022058,42.433229],[107.986949,42.413349],[107.939522,42.403628],[107.736262,42.415116],[107.57427,42.412907],[107.501589,42.456635],[107.46648,42.458842],[107.303872,42.412465],[107.271844,42.364285],[107.051337,42.319166],[106.785867,42.291281],[106.612789,42.241679],[106.372572,42.161436],[106.344855,42.149457],[106.01348,42.032213],[105.74185,41.949033],[105.589713,41.888471],[105.385221,41.797073],[105.291599,41.749763],[105.230621,41.751103],[105.009498,41.583007],[104.923267,41.654143],[104.803775,41.652355],[104.68921,41.6452],[104.524138,41.661745],[104.530298,41.875104],[104.418813,41.860397],[104.30856,41.840782],[104.080046,41.805104],[103.868779,41.802427],[103.454868,41.877332],[103.418527,41.882233],[103.20726,41.96283],[103.021862,42.028212],[102.712045,42.153007],[102.621502,42.154338],[102.540814,42.162323],[102.449039,42.144133],[102.093642,42.223512],[102.070236,42.232374],[101.877447,42.432345],[101.803534,42.503861],[101.770274,42.509597],[101.557775,42.529887],[101.291689,42.586312],[100.862995,42.671295],[100.826655,42.675255],[100.32528,42.690213],[100.272309,42.636523],[100.004376,42.648849],[99.969267,42.647969],[99.51224,42.568244],[98.962822,42.607018],[98.546447,42.638284],[98.195362,42.653251],[97.831958,42.706047],[97.28254,42.782081],[97.172903,42.795257]]]}},{"type":"Feature","properties":{"adcode":210000,"name":"\u8FBD\u5B81\u7701","center":[123.429096,41.796767],"centroid":[122.604994,41.299712],"childrenNum":14,"level":"province","parent":{"adcode":100000},"subFeatureIndex":5,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[123.534489,39.788361],[123.546808,39.756163],[123.579453,39.781002],[123.612714,39.775023],[123.642279,39.796178],[123.645358,39.823761],[123.674924,39.826979],[123.687858,39.808132],[123.795032,39.822842],[123.812278,39.831115],[123.95148,39.817786],[124.002603,39.800316],[124.103001,39.823302],[124.099306,39.777323],[124.151045,39.74558],[124.173218,39.841225],[124.214486,39.865116],[124.215102,39.883487],[124.21695,39.894049],[124.218182,39.895885],[124.219414,39.899099],[124.241588,39.928477],[124.286551,39.931689],[124.288399,39.962888],[124.349377,39.989029],[124.372167,40.021576],[124.336442,40.049985],[124.346913,40.079756],[124.428217,40.144291],[124.457782,40.177679],[124.490427,40.18408],[124.513833,40.218362],[124.515065,40.22019],[124.62655,40.291896],[124.722636,40.321561],[124.739267,40.371733],[124.834121,40.423235],[124.913578,40.481981],[124.945606,40.45603],[124.985642,40.475153],[125.044157,40.466503],[125.042925,40.483802],[125.004737,40.496091],[125.015823,40.533853],[125.076801,40.562048],[125.113758,40.569322],[125.181511,40.611132],[125.262815,40.620218],[125.279445,40.655187],[125.305315,40.661089],[125.329337,40.643835],[125.375532,40.658365],[125.422343,40.635661],[125.418648,40.673345],[125.453756,40.676522],[125.459916,40.707379],[125.49564,40.728697],[125.544915,40.729605],[125.551075,40.761796],[125.585567,40.788535],[125.61698,40.763609],[125.685349,40.769048],[125.67611,40.788082],[125.641002,40.798503],[125.648393,40.826133],[125.707523,40.866877],[125.687813,40.897645],[125.652089,40.91619],[125.584335,40.891764],[125.589263,40.931112],[125.635458,40.94151],[125.650241,40.970888],[125.674879,40.974503],[125.684118,41.021929],[125.726617,41.055332],[125.739552,41.08917],[125.712451,41.095485],[125.734009,41.125695],[125.759878,41.132908],[125.791291,41.167607],[125.73832,41.178418],[125.758646,41.232449],[125.749407,41.245499],[125.695205,41.244599],[125.685349,41.273842],[125.646545,41.264396],[125.642234,41.296327],[125.62006,41.318355],[125.637306,41.34442],[125.610205,41.365084],[125.589879,41.359245],[125.581256,41.396517],[125.547995,41.401006],[125.534444,41.428833],[125.533212,41.479069],[125.493176,41.509103],[125.507343,41.534195],[125.479626,41.544946],[125.450061,41.597777],[125.461148,41.642516],[125.446981,41.67605],[125.412488,41.691246],[125.344119,41.672474],[125.317018,41.676944],[125.332416,41.711354],[125.336112,41.768067],[125.336112,41.768067],[125.323177,41.771191],[125.323177,41.771191],[125.319482,41.776993],[125.319482,41.776993],[125.294844,41.822945],[125.307779,41.924548],[125.35151,41.92811],[125.291764,41.958825],[125.29854,41.974399],[125.369989,42.002868],[125.363213,42.017097],[125.416184,42.063766],[125.414336,42.101964],[125.446365,42.098411],[125.490097,42.136145],[125.458068,42.160105],[125.458068,42.160105],[125.41372,42.156112],[125.368141,42.182726],[125.357054,42.145464],[125.305931,42.146351],[125.312706,42.197359],[125.280677,42.175187],[125.312706,42.219966],[125.27575,42.231045],[125.27575,42.266928],[125.299156,42.289953],[125.264047,42.312528],[125.224011,42.30102],[125.175352,42.308102],[125.167345,42.351903],[125.203685,42.366938],[125.185823,42.38197],[125.186439,42.427928],[125.140243,42.44692],[125.150098,42.458842],[125.105135,42.490624],[125.068794,42.499449],[125.090968,42.515773],[125.066946,42.534738],[125.089736,42.567803],[125.082961,42.591159],[125.097127,42.622433],[125.038613,42.615387],[125.010896,42.63212],[125.014592,42.666014],[124.99057,42.677455],[124.968396,42.722756],[124.996729,42.745174],[124.975171,42.802722],[124.92836,42.819844],[124.897563,42.787791],[124.874157,42.789987],[124.856911,42.824234],[124.84952,42.882585],[124.87231,42.962344],[124.869846,42.988178],[124.840897,43.032377],[124.88894,43.074796],[124.882781,43.13422],[124.785462,43.117185],[124.755281,43.074359],[124.719557,43.069987],[124.686912,43.051185],[124.677673,43.002185],[124.658579,42.972854],[124.635173,42.972854],[124.632093,42.949642],[124.607456,42.937376],[124.586514,42.905384],[124.466406,42.847054],[124.435609,42.880831],[124.371551,42.880831],[124.38079,42.912835],[124.431913,42.930803],[124.442384,42.958841],[124.42329,42.975482],[124.369703,42.972854],[124.333363,42.997371],[124.425754,43.076107],[124.366007,43.121554],[124.273617,43.17875],[124.287167,43.207983],[124.27608,43.233278],[124.228653,43.235022],[124.215102,43.255947],[124.168291,43.244177],[124.114088,43.247229],[124.117168,43.2773],[124.099306,43.292983],[124.032784,43.280786],[123.964415,43.34088],[123.896046,43.361333],[123.881263,43.392218],[123.881263,43.392218],[123.852314,43.406133],[123.857858,43.459153],[123.857858,43.459153],[123.79688,43.489988],[123.747604,43.472184],[123.749452,43.439167],[123.710032,43.417001],[123.703873,43.37047],[123.698329,43.272071],[123.664453,43.264663],[123.676771,43.223684],[123.645974,43.208855],[123.666916,43.179623],[123.636119,43.141644],[123.631192,43.088346],[123.580685,43.036314],[123.572678,43.003498],[123.536337,43.007],[123.474743,43.042438],[123.434707,43.027565],[123.323222,43.000872],[123.259165,42.993431],[123.18402,42.925983],[123.188947,42.895739],[123.169853,42.859777],[123.227752,42.831695],[123.118114,42.801405],[123.058368,42.768903],[122.980144,42.777689],[122.945651,42.753524],[122.925941,42.772417],[122.887137,42.770221],[122.883442,42.751766],[122.883442,42.751766],[122.848949,42.712203],[122.848949,42.712203],[122.786123,42.757479],[122.73808,42.77066],[122.733152,42.786034],[122.653696,42.78252],[122.624747,42.773296],[122.580399,42.789987],[122.576088,42.819405],[122.556378,42.827745],[122.436886,42.843105],[122.35127,42.830378],[122.371596,42.776371],[122.439349,42.770221],[122.460907,42.755282],[122.396234,42.707366],[122.396234,42.684054],[122.338951,42.669975],[122.324785,42.684934],[122.261343,42.695931],[122.204676,42.732867],[122.204676,42.685374],[122.160945,42.684934],[122.072865,42.710444],[122.062394,42.723635],[122.018663,42.69901],[121.939207,42.688453],[121.94167,42.666014],[121.915801,42.656332],[121.921344,42.605697],[121.889931,42.556784],[121.844352,42.522389],[121.831417,42.533856],[121.817867,42.504303],[121.803084,42.514891],[121.747649,42.484887],[121.69899,42.438529],[121.66573,42.437204],[121.604136,42.495037],[121.607831,42.516214],[121.570875,42.487093],[121.506201,42.482239],[121.4791,42.49636],[121.434752,42.475176],[121.386093,42.474294],[121.304789,42.435879],[121.314644,42.42837],[121.285079,42.387717],[121.218558,42.371802],[121.184681,42.333324],[121.133558,42.300135],[121.120623,42.280656],[121.087978,42.278885],[121.070732,42.254083],[121.028848,42.242565],[120.992508,42.264714],[120.933994,42.27977],[120.883487,42.269585],[120.883487,42.269585],[120.883487,42.242565],[120.8299,42.252755],[120.820661,42.227943],[120.79048,42.218636],[120.745516,42.223512],[120.72211,42.203565],[120.624792,42.154338],[120.58414,42.167203],[120.56751,42.152119],[120.466496,42.105516],[120.493597,42.073539],[120.450481,42.057101],[120.456641,42.016208],[120.399358,41.984631],[120.373489,41.994862],[120.309431,41.951704],[120.318054,41.93746],[120.271859,41.925439],[120.260156,41.904062],[120.290337,41.897381],[120.286641,41.880005],[120.251533,41.884016],[120.215808,41.853265],[120.188707,41.848361],[120.183164,41.826513],[120.127113,41.77253],[120.1382,41.729221],[120.096316,41.697056],[120.035954,41.708226],[120.024867,41.737707],[120.050737,41.776101],[120.041498,41.818932],[120.023019,41.816701],[119.989759,41.899163],[119.954034,41.923212],[119.950954,41.974399],[119.924469,41.98908],[119.921389,42.014429],[119.897368,42.030879],[119.87581,42.077982],[119.845629,42.097079],[119.837622,42.135257],[119.854868,42.170308],[119.841933,42.215534],[119.744615,42.211545],[119.679941,42.240793],[119.617115,42.252755],[119.609108,42.276671],[119.557985,42.289068],[119.557985,42.289068],[119.539507,42.297922],[119.571536,42.335536],[119.572152,42.359421],[119.540123,42.363401],[119.502551,42.388159],[119.482841,42.347037],[119.432949,42.317396],[119.34795,42.300578],[119.280197,42.260728],[119.274037,42.239021],[119.237697,42.200905],[119.277733,42.185387],[119.286972,42.154781],[119.30853,42.147239],[119.314689,42.119723],[119.352261,42.118391],[119.384906,42.08953],[119.375667,42.023322],[119.324544,41.969505],[119.323928,41.937014],[119.340559,41.926774],[119.323312,41.889807],[119.334399,41.871539],[119.312841,41.80555],[119.292515,41.790827],[119.317769,41.764049],[119.319001,41.727435],[119.299907,41.705545],[119.307914,41.657273],[119.342406,41.617914],[119.415703,41.590169],[119.420015,41.567785],[119.362116,41.566442],[119.361501,41.545841],[119.406464,41.503276],[119.401537,41.472343],[119.378131,41.459787],[119.376283,41.422102],[119.309762,41.405944],[119.330704,41.385293],[119.296211,41.325097],[119.239545,41.31431],[119.2494,41.279689],[119.209364,41.244599],[119.204436,41.222546],[119.169943,41.222996],[119.189038,41.198234],[119.126212,41.138767],[119.081248,41.131555],[119.080632,41.095936],[119.037516,41.067516],[118.964836,41.079246],[118.937118,41.052625],[118.951901,41.018317],[119.013495,41.007479],[119.00056,40.967273],[118.977154,40.959138],[118.977154,40.959138],[118.916792,40.969984],[118.90201,40.960946],[118.873061,40.847866],[118.845959,40.822057],[118.878604,40.783098],[118.907553,40.775394],[118.895234,40.75409],[118.950053,40.747743],[118.96114,40.72008],[119.011031,40.687414],[119.028277,40.692406],[119.054763,40.664721],[119.115125,40.666536],[119.165632,40.69286],[119.184726,40.680153],[119.14469,40.632482],[119.162552,40.600228],[119.177951,40.609315],[119.230921,40.603863],[119.22045,40.569322],[119.256175,40.543404],[119.30237,40.530215],[119.429254,40.540221],[119.477913,40.533399],[119.503783,40.553864],[119.559217,40.547952],[119.572152,40.523846],[119.553674,40.502007],[119.604797,40.455119],[119.586934,40.375381],[119.598021,40.334335],[119.651608,40.271808],[119.639289,40.231613],[119.639289,40.231613],[119.671934,40.23938],[119.716898,40.195966],[119.745847,40.207851],[119.760629,40.136056],[119.736608,40.104936],[119.772332,40.08113],[119.783419,40.046778],[119.783419,40.046778],[119.787115,40.041739],[119.787115,40.041739],[119.81668,40.050443],[119.81668,40.050443],[119.854252,40.033033],[119.845629,40.000949],[119.845629,40.000949],[119.854252,39.98857],[119.91831,39.989946],[119.941715,40.009659],[119.947259,40.040364],[120.092005,40.077466],[120.134504,40.074719],[120.161606,40.096239],[120.273091,40.127362],[120.371641,40.174478],[120.451097,40.177679],[120.491749,40.20008],[120.523778,40.256737],[120.52193,40.304676],[120.537329,40.325211],[120.602618,40.36079],[120.596459,40.399084],[120.617401,40.41959],[120.616169,40.444645],[120.619249,40.460128],[120.666676,40.467413],[120.693777,40.505647],[120.72211,40.515657],[120.72827,40.539311],[120.822509,40.59432],[120.837291,40.644289],[120.8299,40.671076],[120.861313,40.684692],[120.939537,40.686507],[120.983269,40.712822],[121.032544,40.709193],[121.028848,40.746382],[120.991276,40.744115],[120.980189,40.766329],[120.994356,40.790801],[120.971566,40.805751],[121.00729,40.807563],[121.010986,40.784457],[121.086747,40.79805],[121.076892,40.815716],[121.096602,40.839717],[121.126167,40.86914],[121.177906,40.873665],[121.23642,40.851035],[121.290622,40.851488],[121.439064,40.830208],[121.440296,40.88181],[121.499426,40.880001],[121.526527,40.85194],[121.55486,40.849677],[121.553013,40.817528],[121.576418,40.837906],[121.626309,40.844244],[121.682976,40.829755],[121.732251,40.846961],[121.735331,40.862351],[121.778446,40.886787],[121.816019,40.894931],[121.84312,40.831567],[121.883772,40.802127],[121.934279,40.79805],[121.936127,40.711462],[121.951525,40.680607],[122.025438,40.674253],[122.06609,40.64883],[122.122141,40.657457],[122.148626,40.671983],[122.133843,40.614313],[122.150474,40.588413],[122.245944,40.519752],[122.231162,40.505192],[122.265038,40.48016],[122.221923,40.481071],[122.240401,40.461039],[122.250872,40.445555],[122.229314,40.424146],[122.186814,40.422779],[122.198517,40.382219],[122.152322,40.357597],[122.135691,40.374925],[122.111054,40.348932],[122.138155,40.338897],[122.110438,40.315629],[122.079641,40.332967],[122.040221,40.322017],[122.039605,40.260391],[122.02667,40.244862],[121.940438,40.242121],[121.950293,40.204194],[121.98109,40.173106],[122.003264,40.172191],[121.995257,40.128277],[121.956453,40.133311],[121.910257,40.072887],[121.824642,40.025701],[121.796309,39.999116],[121.779062,39.942702],[121.76428,39.933525],[121.699606,39.937196],[121.626925,39.882569],[121.572107,39.865116],[121.541926,39.874302],[121.530223,39.851334],[121.472325,39.802155],[121.487107,39.760303],[121.45939,39.747881],[121.502506,39.703233],[121.482796,39.659478],[121.451999,39.658095],[121.450151,39.624914],[121.325731,39.601402],[121.299246,39.606013],[121.263521,39.589873],[121.226565,39.554814],[121.224717,39.519275],[121.268449,39.482794],[121.286927,39.507271],[121.301709,39.476327],[121.245659,39.456923],[121.270296,39.434277],[121.246891,39.421334],[121.245659,39.389427],[121.270296,39.374162],[121.307869,39.391277],[121.324499,39.371386],[121.35468,39.377863],[121.432904,39.357506],[121.435984,39.329736],[121.466781,39.320014],[121.474788,39.296398],[121.508665,39.29223],[121.51544,39.286672],[121.562252,39.322792],[121.621382,39.326033],[121.72486,39.364447],[121.711925,39.33992],[121.7187,39.320477],[121.667577,39.310754],[121.672505,39.275554],[121.623846,39.285745],[121.589353,39.263044],[121.631237,39.22643],[121.591201,39.228748],[121.586889,39.193506],[121.604136,39.166136],[121.639244,39.166136],[121.68236,39.117863],[121.631853,39.077921],[121.605983,39.080708],[121.642324,39.11972],[121.590585,39.154999],[121.562252,39.127149],[121.599208,39.098824],[121.581962,39.075598],[121.508049,39.034237],[121.431057,39.027263],[121.370695,39.060264],[121.317108,39.012384],[121.341129,38.980757],[121.275224,38.971917],[121.204391,38.941202],[121.180369,38.959819],[121.128014,38.958888],[121.08921,38.922115],[121.094138,38.894173],[121.129862,38.879266],[121.110768,38.862026],[121.12863,38.799089],[121.112,38.776231],[121.13787,38.723023],[121.198848,38.721623],[121.259825,38.786495],[121.280767,38.786961],[121.288775,38.78976],[121.315876,38.793958],[121.359608,38.822406],[121.399028,38.812613],[121.509897,38.817743],[121.564715,38.874607],[121.618302,38.862492],[121.675585,38.86156],[121.708845,38.872744],[121.719316,38.920252],[121.655874,38.946788],[121.618918,38.950046],[121.66265,38.966333],[121.671273,39.010059],[121.73841,38.998898],[121.756889,39.025869],[121.790149,39.022614],[121.804932,38.970986],[121.863446,38.942598],[121.920728,38.969591],[121.905946,38.997503],[121.852975,39.035631],[121.8887,39.027263],[121.929352,39.024939],[121.907178,39.055617],[121.923192,39.053758],[121.963228,39.030053],[122.013735,39.073275],[122.061778,39.060264],[122.071634,39.074204],[122.048228,39.101146],[122.088264,39.112291],[122.127684,39.144788],[122.167104,39.158711],[122.123988,39.172631],[122.117213,39.213911],[122.160329,39.238019],[122.242865,39.267678],[122.274893,39.322329],[122.30877,39.346399],[122.366053,39.370461],[122.412864,39.411625],[122.455364,39.408388],[122.467682,39.403301],[122.51203,39.413474],[122.532972,39.419947],[122.581631,39.464316],[122.637066,39.488799],[122.649385,39.516505],[122.682645,39.514658],[122.808913,39.559889],[122.847101,39.581571],[122.860652,39.604629],[122.941956,39.604629],[122.972753,39.594946],[122.978912,39.616156],[123.021412,39.64335],[123.010941,39.655331],[123.103332,39.676983],[123.146448,39.647037],[123.166774,39.674219],[123.212969,39.665928],[123.215433,39.696786],[123.253005,39.689879],[123.286882,39.704154],[123.270251,39.714743],[123.274563,39.753862],[123.350939,39.750641],[123.388512,39.74742],[123.392823,39.723949],[123.477823,39.74696],[123.521555,39.772724],[123.534489,39.788361]]],[[[122.63953,39.286209],[122.593334,39.278334],[122.539131,39.308439],[122.50895,39.290377],[122.57732,39.269994],[122.67895,39.268605],[122.673406,39.269531],[122.662935,39.273701],[122.655544,39.277407],[122.640761,39.288061],[122.63953,39.286209]]],[[[122.318625,39.170775],[122.345111,39.144788],[122.366053,39.174951],[122.398697,39.16196],[122.383299,39.190723],[122.393154,39.213448],[122.343263,39.203246],[122.322321,39.177271],[122.322937,39.174487],[122.319241,39.172167],[122.318625,39.170775]]],[[[122.691884,39.23292],[122.696812,39.206492],[122.751631,39.229675],[122.740544,39.248679],[122.635834,39.241727],[122.628443,39.231993],[122.690037,39.234774],[122.691268,39.23431],[122.691884,39.23292]]],[[[122.738696,39.034701],[122.704819,39.044463],[122.733152,39.014244],[122.75779,39.009594],[122.739312,39.036561],[122.738696,39.034701]]],[[[123.022644,39.546507],[122.96105,39.551122],[122.945035,39.520198],[122.995542,39.495264],[123.036194,39.533123],[123.022644,39.546507]]],[[[122.503407,39.241263],[122.502175,39.224112],[122.547755,39.229211],[122.503407,39.241263]]],[[[120.786784,40.473787],[120.83298,40.491995],[120.8299,40.516112],[120.805262,40.525666],[120.774465,40.48016],[120.786784,40.473787]]],[[[123.086702,39.426881],[123.090397,39.450915],[123.054057,39.457847],[123.086702,39.426881]]],[[[123.160614,39.025404],[123.205578,39.057011],[123.20065,39.077921],[123.145832,39.091857],[123.143984,39.038885],[123.160614,39.025404]]],[[[123.716807,39.74512],[123.756843,39.754322],[123.719887,39.763063],[123.716807,39.74512]]]]}},{"type":"Feature","properties":{"adcode":220000,"name":"\u5409\u6797\u7701","center":[125.3245,43.886841],"centroid":[126.171208,43.703954],"childrenNum":9,"level":"province","parent":{"adcode":100000},"subFeatureIndex":6,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[129.601492,42.415116],[129.601492,42.422627],[129.591021,42.447803],[129.627361,42.462816],[129.651999,42.426603],[129.704354,42.427045],[129.748701,42.471204],[129.738846,42.500332],[129.749933,42.546644],[129.746237,42.58455],[129.786889,42.615387],[129.754245,42.645768],[129.796744,42.681854],[129.767179,42.707806],[129.78381,42.762752],[129.810911,42.795257],[129.816454,42.851003],[129.835549,42.866796],[129.846636,42.918533],[129.874969,42.923792],[129.856491,42.951833],[129.868193,42.97373],[129.903918,42.968475],[129.897143,43.001748],[129.954425,43.010938],[129.963664,42.978547],[130.002468,42.981174],[130.027106,42.9676],[130.072685,42.971541],[130.10841,42.989929],[130.144134,42.976357],[130.120729,42.954461],[130.127504,42.932556],[130.10225,42.922916],[130.136127,42.90363],[130.17062,42.912397],[130.21004,42.902315],[130.258083,42.90626],[130.277793,42.892232],[130.258083,42.860655],[130.245148,42.799209],[130.242069,42.738582],[130.257467,42.710884],[130.290112,42.702968],[130.333228,42.64973],[130.373264,42.630799],[130.388046,42.603054],[130.420691,42.617148],[130.44656,42.607459],[130.423771,42.574855],[130.435474,42.553257],[130.476125,42.570007],[130.459495,42.588075],[130.482285,42.626837],[130.522937,42.622433],[130.520473,42.593362],[130.558661,42.495919],[130.585763,42.485328],[130.581451,42.435437],[130.645509,42.426603],[130.600545,42.450453],[130.599929,42.486211],[130.565437,42.506509],[130.570364,42.557224],[130.622719,42.573092],[130.633806,42.603494],[130.592538,42.671295],[130.521089,42.702089],[130.464423,42.688453],[130.425003,42.706926],[130.40714,42.731548],[130.46627,42.772417],[130.532792,42.787352],[130.562357,42.815015],[130.603625,42.819405],[130.665835,42.847932],[130.708335,42.846615],[130.719422,42.831695],[130.75453,42.845738],[130.784095,42.842227],[130.801957,42.879515],[130.845073,42.881269],[130.890653,42.852758],[130.912826,42.870744],[130.949783,42.876884],[130.981812,42.857145],[131.043406,42.862848],[131.017536,42.915027],[131.034167,42.929051],[131.114855,42.915027],[131.145652,42.9365],[131.151195,42.968475],[131.115471,42.975482],[131.11855,43.007875],[131.102536,43.021002],[131.120398,43.068238],[131.171521,43.06955],[131.173985,43.111506],[131.207861,43.1316],[131.218948,43.191405],[131.201086,43.203185],[131.206014,43.237202],[131.255289,43.265099],[131.269455,43.297775],[131.275615,43.369165],[131.314419,43.392653],[131.295941,43.441774],[131.314419,43.461325],[131.31873,43.499539],[131.304564,43.502144],[131.294093,43.470012],[131.234963,43.475224],[131.201086,43.442209],[131.175217,43.444816],[131.142572,43.425695],[131.026775,43.508655],[130.959638,43.48608],[130.907283,43.434387],[130.864167,43.437863],[130.841378,43.454374],[130.822899,43.503446],[130.776704,43.52341],[130.727429,43.560284],[130.671378,43.565054],[130.665835,43.583698],[130.623335,43.589767],[130.630726,43.622268],[130.57098,43.626167],[130.57098,43.626167],[130.501995,43.636563],[130.488444,43.65605],[130.437937,43.646091],[130.412684,43.652586],[130.394206,43.703227],[130.423155,43.745179],[130.382503,43.777164],[130.381887,43.817768],[130.362793,43.844967],[130.386198,43.85403],[130.368336,43.894151],[130.381887,43.910106],[130.338155,43.963975],[130.364025,43.992399],[130.365256,44.044042],[130.319061,44.03974],[130.307358,44.002731],[130.27225,43.981634],[130.262395,43.949328],[130.208192,43.948466],[130.153373,43.915711],[130.143518,43.878624],[130.116417,43.878192],[130.110873,43.852735],[130.079461,43.835039],[130.027722,43.851872],[130.009243,43.889407],[130.022794,43.917866],[130.017867,43.961821],[129.979062,44.015644],[129.951345,44.027263],[129.907614,44.023821],[129.881128,44.000148],[129.868193,44.012631],[129.802904,43.964837],[129.780114,43.892857],[129.739462,43.895876],[129.743158,43.876035],[129.699426,43.8838],[129.650767,43.873016],[129.529427,43.870427],[129.467833,43.874741],[129.449971,43.850578],[129.417942,43.843672],[129.406855,43.819496],[129.348341,43.798333],[129.30892,43.812155],[129.289826,43.797038],[129.254718,43.819496],[129.211602,43.784509],[129.232544,43.709284],[129.214066,43.695006],[129.217146,43.648689],[129.232544,43.635263],[129.23008,43.593234],[129.169102,43.561585],[129.145081,43.570258],[129.093958,43.547706],[129.037907,43.540332],[129.013886,43.522976],[128.962763,43.53903],[128.949828,43.553779],[128.878379,43.539898],[128.834647,43.587599],[128.821097,43.637429],[128.78722,43.686784],[128.768126,43.732207],[128.729322,43.736964],[128.760119,43.755554],[128.739177,43.806972],[128.719467,43.816905],[128.760734,43.857482],[128.729938,43.889838],[128.696061,43.903207],[128.636315,43.891132],[128.64001,43.948035],[128.610445,43.960529],[128.584576,43.990246],[128.574721,44.047914],[128.529141,44.112401],[128.471859,44.157501],[128.450301,44.203423],[128.471859,44.247596],[128.453997,44.257884],[128.472475,44.320001],[128.446605,44.339694],[128.475555,44.346114],[128.481714,44.375637],[128.457076,44.409848],[128.463236,44.431647],[128.427511,44.473512],[128.397946,44.483761],[128.372693,44.514495],[128.295084,44.480772],[128.293237,44.467961],[128.228563,44.445748],[128.211317,44.431647],[128.172512,44.34697],[128.137404,44.357668],[128.094904,44.354673],[128.074578,44.370075],[128.049941,44.349965],[128.065339,44.307155],[128.101679,44.293449],[128.064107,44.251454],[128.104143,44.230017],[128.09244,44.181539],[128.060411,44.168663],[128.088129,44.158359],[128.091208,44.133022],[128.042549,44.103807],[127.950158,44.088334],[127.912586,44.064687],[127.862695,44.062967],[127.846065,44.081886],[127.808492,44.086615],[127.783239,44.071997],[127.729036,44.09908],[127.735811,44.11412],[127.712406,44.199133],[127.681609,44.166946],[127.641573,44.193555],[127.626174,44.187977],[127.59045,44.227872],[127.623711,44.278025],[127.579363,44.310581],[127.486356,44.410275],[127.50853,44.437202],[127.463566,44.484615],[127.465414,44.516628],[127.485124,44.528576],[127.536247,44.522176],[127.570124,44.55033],[127.557189,44.575488],[127.392733,44.632158],[127.275705,44.640249],[127.261538,44.61299],[127.214111,44.624917],[127.228893,44.642804],[127.182082,44.644507],[127.138966,44.607451],[127.094619,44.615972],[127.089691,44.593816],[127.049655,44.566961],[127.041648,44.591258],[127.044112,44.653874],[127.030561,44.673454],[127.041032,44.712169],[126.9973,44.764882],[126.984366,44.823914],[126.999764,44.87398],[127.021938,44.898997],[127.073061,44.907051],[127.092771,44.94688],[127.050271,45.004034],[127.018242,45.024341],[126.984981,45.067893],[126.970815,45.070852],[126.96404,45.132104],[126.85625,45.145613],[126.792808,45.135481],[126.787265,45.159118],[126.732446,45.187385],[126.685635,45.187807],[126.640055,45.214373],[126.644983,45.225334],[126.569222,45.252725],[126.540273,45.23882],[126.519331,45.248091],[126.402919,45.222805],[126.356107,45.185698],[126.293282,45.180214],[126.285274,45.162494],[126.235383,45.140125],[126.225528,45.154054],[126.166398,45.13337],[126.142992,45.147723],[126.091869,45.149411],[126.047522,45.170933],[125.998247,45.162072],[125.992703,45.192447],[125.957595,45.201303],[125.915095,45.196664],[125.849805,45.23882],[125.823936,45.237978],[125.815929,45.264942],[125.761726,45.291472],[125.726001,45.336503],[125.695205,45.352066],[125.712451,45.389485],[125.711835,45.477677],[125.687813,45.514173],[125.660096,45.507043],[125.61698,45.517947],[125.583104,45.491942],[125.497488,45.469283],[125.480242,45.486488],[125.424807,45.485649],[125.434662,45.462988],[125.398322,45.416797],[125.361981,45.392847],[125.319482,45.422678],[125.301619,45.402092],[125.248649,45.417637],[125.189518,45.39915],[125.137779,45.409655],[125.097127,45.38276],[125.06633,45.39915],[125.08912,45.420998],[125.0497,45.428558],[125.025678,45.493201],[124.961005,45.495299],[124.936983,45.53388],[124.911114,45.535976],[124.884628,45.495299],[124.886476,45.442836],[124.839665,45.455852],[124.792853,45.436958],[124.776223,45.468024],[124.729412,45.444096],[124.690607,45.452493],[124.625318,45.437377],[124.575427,45.451234],[124.579738,45.424358],[124.544014,45.411756],[124.507058,45.424778],[124.480572,45.456271],[124.398652,45.440737],[124.374015,45.45795],[124.352457,45.496557],[124.369087,45.512915],[124.348761,45.546874],[124.287783,45.539329],[124.264377,45.555256],[124.273001,45.584163],[124.238508,45.591702],[124.226805,45.633564],[124.162132,45.616404],[124.128255,45.641933],[124.147349,45.665359],[124.122096,45.669123],[124.13503,45.690448],[124.10177,45.700898],[124.098074,45.722628],[124.054342,45.751449],[124.014922,45.749779],[124.001987,45.770655],[124.064197,45.802372],[124.03648,45.83824],[124.067277,45.840325],[124.061118,45.886168],[123.996444,45.906993],[123.968727,45.936551],[123.973654,45.973997],[124.011842,45.981899],[123.989053,46.011833],[124.040176,46.01973],[124.034016,46.045074],[124.009995,46.057534],[124.015538,46.088257],[123.99398,46.101123],[124.01677,46.118549],[123.991516,46.143019],[124.001987,46.166649],[123.971806,46.170379],[123.956408,46.206009],[123.979814,46.228784],[123.952096,46.256516],[123.960103,46.288369],[123.936082,46.286715],[123.917604,46.25693],[123.896046,46.303668],[123.84985,46.302428],[123.775938,46.263136],[123.726047,46.255688],[123.673692,46.258585],[123.604706,46.251964],[123.569598,46.223816],[123.569598,46.223816],[123.499381,46.259826],[123.452569,46.233338],[123.430396,46.243687],[123.357099,46.232096],[123.357099,46.232096],[123.320758,46.254447],[123.286266,46.250308],[123.248078,46.273065],[123.178476,46.248239],[123.128585,46.210565],[123.127354,46.174523],[123.102716,46.172037],[123.112571,46.130163],[123.070071,46.123527],[123.04605,46.099878],[122.792898,46.073313],[122.828623,45.912406],[122.80029,45.856583],[122.772572,45.856583],[122.752246,45.834905],[122.792283,45.766063],[122.751015,45.735996],[122.741775,45.705077],[122.671558,45.70048],[122.650001,45.731401],[122.640761,45.771072],[122.603189,45.778169],[122.556378,45.82156],[122.522501,45.786933],[122.504639,45.786933],[122.496016,45.85825],[122.446125,45.916986],[122.362357,45.917403],[122.372828,45.856166],[122.337719,45.859917],[122.301379,45.813218],[122.253952,45.7982],[122.236705,45.831569],[122.200981,45.857],[122.091344,45.882002],[122.085184,45.912406],[122.040221,45.959022],[121.92812,45.988552],[121.923808,46.004767],[121.864062,46.002272],[121.843736,46.024301],[121.819098,46.023054],[121.761816,45.998947],[121.809243,45.961102],[121.821562,45.918235],[121.805548,45.900746],[121.817251,45.875336],[121.769823,45.84366],[121.766744,45.830318],[121.766744,45.830318],[121.754425,45.794862],[121.697142,45.76314],[121.657106,45.770238],[121.644172,45.752284],[121.666345,45.727641],[121.713773,45.701734],[121.811091,45.687103],[121.812323,45.704659],[121.867142,45.719703],[121.934279,45.71051],[121.970004,45.692956],[122.003264,45.623102],[121.995873,45.59882],[121.966308,45.596308],[121.993409,45.552741],[122.002648,45.507882],[122.064242,45.472641],[122.168336,45.439897],[122.180039,45.409655],[122.146778,45.374352],[122.147394,45.295682],[122.239169,45.276313],[122.22993,45.206784],[122.192358,45.180636],[122.143082,45.183167],[122.109822,45.142236],[122.119677,45.068739],[122.098735,45.02138],[122.074713,45.006573],[122.087032,44.95281],[122.079025,44.914256],[122.04946,44.912985],[122.098119,44.81882],[122.099967,44.7823],[122.168952,44.770405],[122.142467,44.753833],[122.110438,44.767856],[122.10243,44.736406],[122.152322,44.744057],[122.161561,44.728328],[122.117213,44.701961],[122.103046,44.67388],[122.113517,44.615546],[122.13138,44.577619],[122.196053,44.559712],[122.224386,44.526016],[122.228082,44.480345],[122.28598,44.477783],[122.294604,44.41113],[122.291524,44.310152],[122.271198,44.255741],[122.319241,44.233018],[122.483081,44.236877],[122.515726,44.251025],[122.641993,44.283595],[122.675254,44.285738],[122.702971,44.319145],[122.76087,44.369648],[122.85634,44.398304],[123.025108,44.493153],[123.06576,44.505959],[123.12489,44.5098],[123.137209,44.486322],[123.125506,44.455147],[123.142136,44.428228],[123.114419,44.40258],[123.128585,44.367081],[123.196955,44.34483],[123.277027,44.25274],[123.286882,44.211574],[123.323838,44.179823],[123.386664,44.161794],[123.362642,44.133452],[123.350939,44.092633],[123.32815,44.084035],[123.331229,44.028984],[123.365722,44.013922],[123.400831,43.979481],[123.37065,43.970006],[123.397135,43.954929],[123.467968,43.853599],[123.461809,43.822518],[123.498149,43.771114],[123.48275,43.737396],[123.520323,43.708419],[123.518475,43.682024],[123.536953,43.633964],[123.510468,43.624867],[123.5117,43.592801],[123.421157,43.598435],[123.434091,43.575461],[123.461193,43.568523],[123.452569,43.545971],[123.452569,43.545971],[123.360179,43.567223],[123.304744,43.550742],[123.329998,43.519071],[123.315831,43.492159],[123.36449,43.483475],[123.382968,43.469143],[123.419925,43.410046],[123.442098,43.437863],[123.486446,43.44525],[123.519707,43.402219],[123.54496,43.415262],[123.608402,43.366119],[123.703873,43.37047],[123.710032,43.417001],[123.749452,43.439167],[123.747604,43.472184],[123.79688,43.489988],[123.857858,43.459153],[123.857858,43.459153],[123.852314,43.406133],[123.881263,43.392218],[123.881263,43.392218],[123.896046,43.361333],[123.964415,43.34088],[124.032784,43.280786],[124.099306,43.292983],[124.117168,43.2773],[124.114088,43.247229],[124.168291,43.244177],[124.215102,43.255947],[124.228653,43.235022],[124.27608,43.233278],[124.287167,43.207983],[124.273617,43.17875],[124.366007,43.121554],[124.425754,43.076107],[124.333363,42.997371],[124.369703,42.972854],[124.42329,42.975482],[124.442384,42.958841],[124.431913,42.930803],[124.38079,42.912835],[124.371551,42.880831],[124.435609,42.880831],[124.466406,42.847054],[124.586514,42.905384],[124.607456,42.937376],[124.632093,42.949642],[124.635173,42.972854],[124.658579,42.972854],[124.677673,43.002185],[124.686912,43.051185],[124.719557,43.069987],[124.755281,43.074359],[124.785462,43.117185],[124.882781,43.13422],[124.88894,43.074796],[124.840897,43.032377],[124.869846,42.988178],[124.87231,42.962344],[124.84952,42.882585],[124.856911,42.824234],[124.874157,42.789987],[124.897563,42.787791],[124.92836,42.819844],[124.975171,42.802722],[124.996729,42.745174],[124.968396,42.722756],[124.99057,42.677455],[125.014592,42.666014],[125.010896,42.63212],[125.038613,42.615387],[125.097127,42.622433],[125.082961,42.591159],[125.089736,42.567803],[125.066946,42.534738],[125.090968,42.515773],[125.068794,42.499449],[125.105135,42.490624],[125.150098,42.458842],[125.140243,42.44692],[125.186439,42.427928],[125.185823,42.38197],[125.203685,42.366938],[125.167345,42.351903],[125.175352,42.308102],[125.224011,42.30102],[125.264047,42.312528],[125.299156,42.289953],[125.27575,42.266928],[125.27575,42.231045],[125.312706,42.219966],[125.280677,42.175187],[125.312706,42.197359],[125.305931,42.146351],[125.357054,42.145464],[125.368141,42.182726],[125.41372,42.156112],[125.458068,42.160105],[125.458068,42.160105],[125.490097,42.136145],[125.446365,42.098411],[125.414336,42.101964],[125.416184,42.063766],[125.363213,42.017097],[125.369989,42.002868],[125.29854,41.974399],[125.291764,41.958825],[125.35151,41.92811],[125.307779,41.924548],[125.294844,41.822945],[125.319482,41.776993],[125.319482,41.776993],[125.323177,41.771191],[125.323177,41.771191],[125.336112,41.768067],[125.336112,41.768067],[125.332416,41.711354],[125.317018,41.676944],[125.344119,41.672474],[125.412488,41.691246],[125.446981,41.67605],[125.461148,41.642516],[125.450061,41.597777],[125.479626,41.544946],[125.507343,41.534195],[125.493176,41.509103],[125.533212,41.479069],[125.534444,41.428833],[125.547995,41.401006],[125.581256,41.396517],[125.589879,41.359245],[125.610205,41.365084],[125.637306,41.34442],[125.62006,41.318355],[125.642234,41.296327],[125.646545,41.264396],[125.685349,41.273842],[125.695205,41.244599],[125.749407,41.245499],[125.758646,41.232449],[125.73832,41.178418],[125.791291,41.167607],[125.759878,41.132908],[125.734009,41.125695],[125.712451,41.095485],[125.739552,41.08917],[125.726617,41.055332],[125.684118,41.021929],[125.674879,40.974503],[125.650241,40.970888],[125.635458,40.94151],[125.589263,40.931112],[125.584335,40.891764],[125.652089,40.91619],[125.687813,40.897645],[125.707523,40.866877],[125.778356,40.897645],[125.817161,40.866877],[125.860892,40.888597],[125.875059,40.908501],[125.921254,40.882715],[125.959442,40.88181],[126.008102,40.936537],[126.041362,40.928851],[126.051833,40.96185],[126.08263,40.976762],[126.066,40.997542],[126.1085,41.011995],[126.099877,41.036376],[126.133753,41.063906],[126.124514,41.092327],[126.16763,41.094583],[126.187956,41.113072],[126.188572,41.114875],[126.295129,41.171661],[126.332086,41.236949],[126.35426,41.244599],[126.373354,41.289133],[126.437411,41.353405],[126.497158,41.374965],[126.524259,41.349362],[126.539041,41.366881],[126.497158,41.406842],[126.559983,41.548081],[126.582773,41.563307],[126.564295,41.608965],[126.592628,41.624624],[126.608027,41.669345],[126.644983,41.661297],[126.688099,41.674262],[126.724439,41.710907],[126.690562,41.728328],[126.694874,41.751103],[126.723207,41.753335],[126.8002,41.702865],[126.809439,41.749317],[126.848243,41.734134],[126.85625,41.760031],[126.887047,41.791719],[126.931395,41.812687],[126.952953,41.804212],[126.940018,41.773423],[126.979438,41.776993],[127.005923,41.749317],[127.050887,41.744852],[127.057662,41.703758],[127.037952,41.676944],[127.103242,41.647883],[127.093387,41.629993],[127.127263,41.622388],[127.135887,41.600463],[127.178386,41.600015],[127.125416,41.566442],[127.11864,41.540018],[127.164836,41.542706],[127.188241,41.527475],[127.241212,41.520754],[127.28864,41.501932],[127.253531,41.486691],[127.296031,41.486243],[127.360704,41.466065],[127.360088,41.479518],[127.405668,41.478621],[127.419835,41.460235],[127.459255,41.461581],[127.465414,41.479069],[127.526392,41.467859],[127.547334,41.477276],[127.563964,41.432871],[127.618783,41.432871],[127.636645,41.413575],[127.684073,41.422999],[127.780159,41.427038],[127.854688,41.420755],[127.86947,41.4037],[127.882405,41.448124],[127.909506,41.42973],[127.93168,41.444984],[127.970484,41.438704],[127.991426,41.421204],[128.000049,41.442741],[128.040085,41.393375],[128.110919,41.393375],[128.090593,41.374516],[128.114614,41.364186],[128.169433,41.404149],[128.203925,41.410882],[128.243345,41.477276],[128.238418,41.497898],[128.301244,41.540018],[128.317874,41.575844],[128.30186,41.627756],[128.248889,41.681414],[128.208853,41.688565],[128.163889,41.721628],[128.147875,41.78101],[128.112766,41.793504],[128.104143,41.843457],[128.115846,41.896935],[128.106607,41.949923],[128.033926,42.000199],[128.090593,42.022877],[128.294468,42.026434],[128.405338,42.018876],[128.466316,42.020654],[128.49896,42.000644],[128.598127,42.007315],[128.60675,42.02999],[128.637547,42.035324],[128.658489,42.018876],[128.70222,42.02021],[128.737945,42.050435],[128.779213,42.033546],[128.795227,42.042436],[128.898089,42.016653],[128.952908,42.025545],[128.954755,42.083756],[128.971386,42.097079],[129.008958,42.09175],[129.039139,42.107736],[129.048378,42.137476],[129.113668,42.140583],[129.166639,42.188047],[129.215914,42.208442],[129.209138,42.237692],[129.181421,42.242122],[129.183269,42.262056],[129.215914,42.265157],[129.231312,42.283755],[129.208522,42.293052],[129.260261,42.335536],[129.231312,42.356325],[129.240551,42.376223],[129.326167,42.389927],[129.30892,42.403628],[129.331094,42.429695],[129.356348,42.427045],[129.342181,42.441179],[129.368051,42.459284],[129.366203,42.428811],[129.392688,42.42837],[129.400695,42.449128],[129.452434,42.441179],[129.49863,42.412023],[129.546057,42.361632],[129.578086,42.380202],[129.569463,42.399208],[129.601492,42.415116]]]]}},{"type":"Feature","properties":{"adcode":230000,"name":"\u9ED1\u9F99\u6C5F\u7701","center":[126.642464,45.756967],"centroid":[127.693027,48.040465],"childrenNum":13,"level":"province","parent":{"adcode":100000},"subFeatureIndex":7,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[123.569598,46.223816],[123.604706,46.251964],[123.673692,46.258585],[123.726047,46.255688],[123.775938,46.263136],[123.84985,46.302428],[123.896046,46.303668],[123.917604,46.25693],[123.936082,46.286715],[123.960103,46.288369],[123.952096,46.256516],[123.979814,46.228784],[123.956408,46.206009],[123.971806,46.170379],[124.001987,46.166649],[123.991516,46.143019],[124.01677,46.118549],[123.99398,46.101123],[124.015538,46.088257],[124.009995,46.057534],[124.034016,46.045074],[124.040176,46.01973],[123.989053,46.011833],[124.011842,45.981899],[123.973654,45.973997],[123.968727,45.936551],[123.996444,45.906993],[124.061118,45.886168],[124.067277,45.840325],[124.03648,45.83824],[124.064197,45.802372],[124.001987,45.770655],[124.014922,45.749779],[124.054342,45.751449],[124.098074,45.722628],[124.10177,45.700898],[124.13503,45.690448],[124.122096,45.669123],[124.147349,45.665359],[124.128255,45.641933],[124.162132,45.616404],[124.226805,45.633564],[124.238508,45.591702],[124.273001,45.584163],[124.264377,45.555256],[124.287783,45.539329],[124.348761,45.546874],[124.369087,45.512915],[124.352457,45.496557],[124.374015,45.45795],[124.398652,45.440737],[124.480572,45.456271],[124.507058,45.424778],[124.544014,45.411756],[124.579738,45.424358],[124.575427,45.451234],[124.625318,45.437377],[124.690607,45.452493],[124.729412,45.444096],[124.776223,45.468024],[124.792853,45.436958],[124.839665,45.455852],[124.886476,45.442836],[124.884628,45.495299],[124.911114,45.535976],[124.936983,45.53388],[124.961005,45.495299],[125.025678,45.493201],[125.0497,45.428558],[125.08912,45.420998],[125.06633,45.39915],[125.097127,45.38276],[125.137779,45.409655],[125.189518,45.39915],[125.248649,45.417637],[125.301619,45.402092],[125.319482,45.422678],[125.361981,45.392847],[125.398322,45.416797],[125.434662,45.462988],[125.424807,45.485649],[125.480242,45.486488],[125.497488,45.469283],[125.583104,45.491942],[125.61698,45.517947],[125.660096,45.507043],[125.687813,45.514173],[125.711835,45.477677],[125.712451,45.389485],[125.695205,45.352066],[125.726001,45.336503],[125.761726,45.291472],[125.815929,45.264942],[125.823936,45.237978],[125.849805,45.23882],[125.915095,45.196664],[125.957595,45.201303],[125.992703,45.192447],[125.998247,45.162072],[126.047522,45.170933],[126.091869,45.149411],[126.142992,45.147723],[126.166398,45.13337],[126.225528,45.154054],[126.235383,45.140125],[126.285274,45.162494],[126.293282,45.180214],[126.356107,45.185698],[126.402919,45.222805],[126.519331,45.248091],[126.540273,45.23882],[126.569222,45.252725],[126.644983,45.225334],[126.640055,45.214373],[126.685635,45.187807],[126.732446,45.187385],[126.787265,45.159118],[126.792808,45.135481],[126.85625,45.145613],[126.96404,45.132104],[126.970815,45.070852],[126.984981,45.067893],[127.018242,45.024341],[127.050271,45.004034],[127.092771,44.94688],[127.073061,44.907051],[127.021938,44.898997],[126.999764,44.87398],[126.984366,44.823914],[126.9973,44.764882],[127.041032,44.712169],[127.030561,44.673454],[127.044112,44.653874],[127.041648,44.591258],[127.049655,44.566961],[127.089691,44.593816],[127.094619,44.615972],[127.138966,44.607451],[127.182082,44.644507],[127.228893,44.642804],[127.214111,44.624917],[127.261538,44.61299],[127.275705,44.640249],[127.392733,44.632158],[127.557189,44.575488],[127.570124,44.55033],[127.536247,44.522176],[127.485124,44.528576],[127.465414,44.516628],[127.463566,44.484615],[127.50853,44.437202],[127.486356,44.410275],[127.579363,44.310581],[127.623711,44.278025],[127.59045,44.227872],[127.626174,44.187977],[127.641573,44.193555],[127.681609,44.166946],[127.712406,44.199133],[127.735811,44.11412],[127.729036,44.09908],[127.783239,44.071997],[127.808492,44.086615],[127.846065,44.081886],[127.862695,44.062967],[127.912586,44.064687],[127.950158,44.088334],[128.042549,44.103807],[128.091208,44.133022],[128.088129,44.158359],[128.060411,44.168663],[128.09244,44.181539],[128.104143,44.230017],[128.064107,44.251454],[128.101679,44.293449],[128.065339,44.307155],[128.049941,44.349965],[128.074578,44.370075],[128.094904,44.354673],[128.137404,44.357668],[128.172512,44.34697],[128.211317,44.431647],[128.228563,44.445748],[128.293237,44.467961],[128.295084,44.480772],[128.372693,44.514495],[128.397946,44.483761],[128.427511,44.473512],[128.463236,44.431647],[128.457076,44.409848],[128.481714,44.375637],[128.475555,44.346114],[128.446605,44.339694],[128.472475,44.320001],[128.453997,44.257884],[128.471859,44.247596],[128.450301,44.203423],[128.471859,44.157501],[128.529141,44.112401],[128.574721,44.047914],[128.584576,43.990246],[128.610445,43.960529],[128.64001,43.948035],[128.636315,43.891132],[128.696061,43.903207],[128.729938,43.889838],[128.760734,43.857482],[128.719467,43.816905],[128.739177,43.806972],[128.760119,43.755554],[128.729322,43.736964],[128.768126,43.732207],[128.78722,43.686784],[128.821097,43.637429],[128.834647,43.587599],[128.878379,43.539898],[128.949828,43.553779],[128.962763,43.53903],[129.013886,43.522976],[129.037907,43.540332],[129.093958,43.547706],[129.145081,43.570258],[129.169102,43.561585],[129.23008,43.593234],[129.232544,43.635263],[129.217146,43.648689],[129.214066,43.695006],[129.232544,43.709284],[129.211602,43.784509],[129.254718,43.819496],[129.289826,43.797038],[129.30892,43.812155],[129.348341,43.798333],[129.406855,43.819496],[129.417942,43.843672],[129.449971,43.850578],[129.467833,43.874741],[129.529427,43.870427],[129.650767,43.873016],[129.699426,43.8838],[129.743158,43.876035],[129.739462,43.895876],[129.780114,43.892857],[129.802904,43.964837],[129.868193,44.012631],[129.881128,44.000148],[129.907614,44.023821],[129.951345,44.027263],[129.979062,44.015644],[130.017867,43.961821],[130.022794,43.917866],[130.009243,43.889407],[130.027722,43.851872],[130.079461,43.835039],[130.110873,43.852735],[130.116417,43.878192],[130.143518,43.878624],[130.153373,43.915711],[130.208192,43.948466],[130.262395,43.949328],[130.27225,43.981634],[130.307358,44.002731],[130.319061,44.03974],[130.365256,44.044042],[130.364025,43.992399],[130.338155,43.963975],[130.381887,43.910106],[130.368336,43.894151],[130.386198,43.85403],[130.362793,43.844967],[130.381887,43.817768],[130.382503,43.777164],[130.423155,43.745179],[130.394206,43.703227],[130.412684,43.652586],[130.437937,43.646091],[130.488444,43.65605],[130.501995,43.636563],[130.57098,43.626167],[130.57098,43.626167],[130.630726,43.622268],[130.623335,43.589767],[130.665835,43.583698],[130.671378,43.565054],[130.727429,43.560284],[130.776704,43.52341],[130.822899,43.503446],[130.841378,43.454374],[130.864167,43.437863],[130.907283,43.434387],[130.959638,43.48608],[131.026775,43.508655],[131.142572,43.425695],[131.175217,43.444816],[131.201086,43.442209],[131.234963,43.475224],[131.294093,43.470012],[131.304564,43.502144],[131.276847,43.495632],[131.20047,43.532089],[131.222028,43.593234],[131.216485,43.613169],[131.239274,43.670337],[131.221412,43.682024],[131.215869,43.72745],[131.232499,43.742585],[131.213405,43.801357],[131.2171,43.836334],[131.254057,43.893289],[131.26268,43.948897],[131.245434,43.95579],[131.26576,44.034578],[131.28239,44.035868],[131.287318,44.03802],[131.293477,44.043182],[131.310723,44.046623],[131.111775,44.710042],[131.090833,44.717272],[131.093297,44.746183],[131.069275,44.759783],[131.064348,44.786973],[131.016304,44.789521],[131.015688,44.814999],[130.972573,44.820094],[130.965181,44.85065],[131.07913,44.881614],[131.10192,44.898997],[131.090217,44.924427],[131.16105,44.948151],[131.20355,44.932901],[131.207861,44.913833],[131.263296,44.929935],[131.274999,44.919766],[131.313803,44.950692],[131.313803,44.965938],[131.355071,44.990068],[131.380324,44.978216],[131.409889,44.985836],[131.464708,44.963397],[131.501664,44.977793],[131.484418,44.99557],[131.529382,45.012073],[131.566338,45.045487],[131.63286,45.075078],[131.695685,45.132104],[131.687678,45.1511],[131.650722,45.159962],[131.681519,45.215217],[131.721555,45.234606],[131.759127,45.213952],[131.79362,45.211844],[131.788692,45.245984],[131.825649,45.291472],[131.82996,45.311677],[131.887858,45.342393],[131.917423,45.339448],[131.93159,45.287683],[131.976554,45.277156],[132.003655,45.25441],[132.17427,45.216903],[132.394161,45.16376],[132.76434,45.081417],[132.867202,45.061976],[132.916477,45.031109],[132.954049,45.023072],[132.98731,45.043373],[133.035969,45.054366],[133.070462,45.097051],[133.089556,45.097473],[133.107418,45.124504],[133.139447,45.127459],[133.129592,45.211422],[133.095715,45.246827],[133.110498,45.266627],[133.097563,45.284735],[133.128976,45.336924],[133.119121,45.352908],[133.144991,45.367205],[133.143759,45.430658],[133.164701,45.437377],[133.170244,45.465506],[133.203505,45.516689],[133.246005,45.517528],[133.333468,45.562379],[133.342707,45.554836],[133.393214,45.580393],[133.423395,45.584163],[133.412924,45.618079],[133.471438,45.631053],[133.448649,45.647372],[133.485605,45.658667],[133.484989,45.691702],[133.445569,45.705077],[133.454192,45.731819],[133.486837,45.740173],[133.469591,45.777751],[133.505315,45.785681],[133.469591,45.799451],[133.467743,45.834905],[133.494228,45.840325],[133.491764,45.867002],[133.51209,45.887001],[133.55459,45.893249],[133.583539,45.868669],[133.618032,45.903662],[133.614952,45.942794],[133.676546,45.94321],[133.681474,45.986473],[133.740604,46.048812],[133.745531,46.075389],[133.690713,46.133896],[133.706111,46.163333],[133.764626,46.17328],[133.794807,46.193583],[133.814517,46.230854],[133.849625,46.203939],[133.87919,46.233752],[133.867487,46.250722],[133.909987,46.254447],[133.91861,46.280924],[133.908139,46.308216],[133.922922,46.330948],[133.869335,46.338386],[133.876726,46.362345],[133.940784,46.38134],[133.948791,46.401153],[133.902596,46.446119],[133.852089,46.450242],[133.849625,46.475389],[133.890893,46.525235],[133.919842,46.596012],[134.011001,46.637941],[134.030711,46.708981],[134.033175,46.759023],[134.052885,46.779928],[134.025168,46.810657],[134.041182,46.848326],[134.042414,46.886787],[134.076291,46.938298],[134.063972,46.979962],[134.10216,47.005678],[134.118175,47.061968],[134.142812,47.093349],[134.222268,47.105164],[134.232739,47.134892],[134.230276,47.182097],[134.210566,47.210155],[134.156979,47.248357],[134.177305,47.326299],[134.203174,47.347389],[134.263536,47.371307],[134.266616,47.391974],[134.307268,47.428829],[134.339297,47.439759],[134.490202,47.446235],[134.522847,47.468086],[134.568426,47.478199],[134.576434,47.519036],[134.627556,47.546512],[134.678064,47.588507],[134.689766,47.63813],[134.779694,47.7159],[134.772918,47.763391],[134.678679,47.819278],[134.670056,47.864667],[134.677448,47.884738],[134.658969,47.901191],[134.607846,47.909214],[134.599839,47.947711],[134.55426,47.982173],[134.551796,48.032622],[134.632484,48.099412],[134.67252,48.170505],[134.679295,48.256245],[134.77107,48.288908],[134.864077,48.332293],[135.009439,48.365703],[135.090743,48.403461],[135.09567,48.437618],[135.068569,48.459451],[135.035924,48.440795],[134.996504,48.439603],[134.927519,48.451513],[134.886867,48.437618],[134.848679,48.393925],[134.820961,48.37604],[134.764295,48.370076],[134.704549,48.405448],[134.640491,48.409818],[134.578281,48.405448],[134.501905,48.418954],[134.438463,48.405448],[134.369478,48.382797],[134.20379,48.3824],[134.150819,48.346217],[134.116327,48.333089],[134.0689,48.338659],[134.029479,48.327519],[133.995603,48.303639],[133.940784,48.302047],[133.876111,48.282536],[133.824372,48.277359],[133.791111,48.261026],[133.740604,48.254651],[133.693177,48.186866],[133.667307,48.183275],[133.59709,48.194846],[133.573068,48.182078],[133.545967,48.121389],[133.451728,48.112999],[133.407997,48.124585],[133.302055,48.103009],[133.239845,48.126583],[133.182563,48.135769],[133.130208,48.134971],[133.053216,48.110202],[133.02673,48.085421],[133.016259,48.054228],[132.992238,48.035424],[132.883216,48.002599],[132.819159,47.936887],[132.769268,47.93849],[132.723072,47.962941],[132.691043,47.962941],[132.661478,47.944905],[132.662094,47.922451],[132.687348,47.88514],[132.662094,47.854227],[132.621442,47.82852],[132.599268,47.792347],[132.6005,47.740858],[132.558,47.718316],[132.469305,47.726368],[132.371987,47.765402],[132.325175,47.762184],[132.288835,47.742065],[132.272205,47.718718],[132.242639,47.70986],[132.19706,47.714289],[132.157024,47.70543],[132.086191,47.703013],[132.000575,47.712276],[131.976554,47.673201],[131.900793,47.685692],[131.825649,47.677231],[131.741881,47.706638],[131.690142,47.707041],[131.641483,47.663932],[131.59036,47.660707],[131.568186,47.682469],[131.559563,47.724757],[131.543548,47.736028],[131.456085,47.747297],[131.359998,47.730796],[131.273767,47.738846],[131.236811,47.733211],[131.183224,47.702611],[131.115471,47.689721],[131.029855,47.694555],[130.983659,47.713081],[130.966413,47.733211],[130.961486,47.828118],[130.891269,47.927263],[130.870943,47.943301],[130.770544,47.998194],[130.737284,48.034223],[130.699711,48.044227],[130.666451,48.105007],[130.673842,48.12818],[130.765617,48.18926],[130.769313,48.231136],[130.787791,48.256643],[130.817972,48.265409],[130.845073,48.296473],[130.81982,48.341444],[130.785327,48.357353],[130.747755,48.404256],[130.745907,48.449131],[130.776704,48.480084],[130.767465,48.507846],[130.711414,48.511414],[130.647357,48.484844],[130.620871,48.49595],[130.615944,48.575601],[130.605473,48.594207],[130.538335,48.612016],[130.538951,48.635751],[130.576524,48.688719],[130.622103,48.783842],[130.689856,48.849651],[130.680617,48.881146],[130.609168,48.881146],[130.559277,48.861071],[130.501995,48.865795],[130.471198,48.905541],[130.412068,48.905148],[130.279641,48.866976],[130.237757,48.868551],[130.219895,48.893739],[130.113337,48.956653],[130.059135,48.979047],[130.020946,49.021058],[129.937179,49.040285],[129.9187,49.060681],[129.934715,49.078717],[129.913157,49.1085],[129.866962,49.113985],[129.855259,49.133567],[129.864498,49.158621],[129.847867,49.181316],[129.784426,49.184054],[129.753629,49.208692],[129.761636,49.25754],[129.730223,49.288387],[129.696962,49.298535],[129.604571,49.279018],[129.562687,49.299706],[129.546057,49.395227],[129.51834,49.423652],[129.448739,49.441167],[129.390224,49.432605],[129.374826,49.414309],[129.379138,49.367175],[129.358196,49.355871],[129.320623,49.3586],[129.266421,49.396006],[129.215298,49.399122],[129.180805,49.386657],[129.143849,49.357431],[129.084719,49.359769],[129.061929,49.374189],[129.013886,49.457119],[128.932582,49.46801],[128.871604,49.492506],[128.792147,49.473065],[128.76135,49.482009],[128.763198,49.515824],[128.813089,49.558157],[128.802618,49.58222],[128.744104,49.595023],[128.715155,49.564756],[128.656025,49.577564],[128.619684,49.593471],[128.537764,49.604332],[128.500192,49.593859],[128.389939,49.58998],[128.343128,49.544956],[128.287077,49.566309],[128.243345,49.563203],[128.185447,49.53952],[128.122005,49.55311],[128.070882,49.556604],[128.001281,49.592307],[127.949542,49.596187],[127.897804,49.579116],[127.815268,49.593859],[127.782007,49.630698],[127.705015,49.665185],[127.677913,49.697712],[127.674833,49.764247],[127.653892,49.780094],[127.583059,49.786277],[127.531936,49.826059],[127.529472,49.864265],[127.547334,49.928645],[127.543638,49.944438],[127.495595,49.994479],[127.501755,50.056764],[127.58737,50.137768],[127.60708,50.178794],[127.603385,50.239309],[127.44632,50.270686],[127.371791,50.29669],[127.332371,50.340634],[127.369944,50.403996],[127.3644,50.438314],[127.30527,50.45432],[127.293567,50.46575],[127.323132,50.52552],[127.36132,50.547582],[127.370559,50.581415],[127.294799,50.663426],[127.28864,50.699451],[127.305886,50.733932],[127.295415,50.755139],[127.236285,50.781256],[127.143894,50.910111],[127.113713,50.93765],[127.052119,50.962911],[126.985597,51.029202],[126.922772,51.061937],[126.917844,51.138977],[126.899982,51.200518],[126.926467,51.246244],[126.976358,51.291551],[126.98375,51.318863],[126.970815,51.332327],[126.887047,51.321856],[126.877808,51.300906],[126.908605,51.283691],[126.92154,51.259729],[126.908605,51.246619],[126.863025,51.248492],[126.820526,51.281071],[126.813134,51.311756],[126.837156,51.345038],[126.904293,51.340552],[126.930163,51.359241],[126.908605,51.407423],[126.835308,51.413769],[126.791577,51.432428],[126.784185,51.448095],[126.812518,51.493948],[126.843931,51.521885],[126.837156,51.536033],[126.69549,51.57845],[126.67886,51.602246],[126.741069,51.642374],[126.723823,51.679126],[126.734294,51.711399],[126.724439,51.7266],[126.6727,51.73179],[126.658534,51.762544],[126.622809,51.777357],[126.580925,51.824728],[126.555056,51.874266],[126.510092,51.922274],[126.462665,51.948471],[126.468208,51.982395],[126.447882,52.009294],[126.450962,52.027709],[126.487918,52.041699],[126.514404,52.037282],[126.563679,52.119302],[126.556288,52.136203],[126.499005,52.16044],[126.457121,52.165212],[126.403535,52.185031],[126.34502,52.192002],[126.306832,52.205574],[126.312992,52.235271],[126.357955,52.264216],[126.401071,52.279597],[126.436795,52.277034],[126.4331,52.298632],[126.327774,52.310342],[126.320999,52.342163],[126.348716,52.357882],[126.353644,52.389304],[126.326542,52.424353],[126.268644,52.475051],[126.205202,52.466302],[126.192883,52.492181],[126.213209,52.525327],[126.147304,52.573],[126.066616,52.603905],[126.055529,52.582455],[126.030891,52.576273],[125.989008,52.603178],[125.968682,52.630429],[125.971145,52.654033],[125.995783,52.675085],[126.061688,52.673271],[126.072775,52.691048],[126.044442,52.739628],[126.112195,52.757016],[126.116507,52.768243],[126.052449,52.800095],[126.02042,52.795753],[125.985312,52.758465],[125.966834,52.759914],[125.937269,52.786705],[125.923718,52.815651],[125.855349,52.866259],[125.854117,52.891542],[125.827631,52.899123],[125.772197,52.89804],[125.751255,52.88143],[125.722306,52.880347],[125.678574,52.86084],[125.666871,52.869872],[125.665023,52.913561],[125.737088,52.943504],[125.742632,52.993964],[125.684118,53.00801],[125.643466,53.039686],[125.640386,53.06199],[125.613901,53.083564],[125.588647,53.081047],[125.530749,53.0512],[125.504263,53.061271],[125.503647,53.095424],[125.452524,53.107641],[125.343503,53.14463],[125.315786,53.144989],[125.252344,53.18051],[125.195062,53.198439],[125.142091,53.204175],[125.038613,53.202741],[124.970244,53.194137],[124.887708,53.164368],[124.909266,53.118059],[124.87231,53.099018],[124.832889,53.145347],[124.787926,53.140681],[124.734339,53.146783],[124.712165,53.162574],[124.720789,53.192344],[124.678905,53.207043],[124.590209,53.208476],[124.563108,53.201666],[124.496587,53.207759],[124.487348,53.217436],[124.435609,53.223886],[124.412203,53.248601],[124.375863,53.258984],[124.327819,53.331954],[124.239124,53.379817],[124.19416,53.37339],[124.125791,53.348033],[124.058038,53.404085],[124.01369,53.403371],[123.985973,53.434401],[123.865249,53.489627],[123.797495,53.489983],[123.746373,53.500308],[123.698329,53.498528],[123.668764,53.533756],[123.620721,53.550115],[123.58746,53.546915],[123.569598,53.505291],[123.53141,53.507071],[123.557895,53.531978],[123.546808,53.551537],[123.517243,53.558292],[123.490758,53.542648],[123.510468,53.509206],[123.499381,53.497816],[123.47228,53.509206],[123.454417,53.536602],[123.394055,53.538024],[123.309672,53.56078],[123.274563,53.563269],[123.231447,53.549404],[123.179092,53.509918],[123.137209,53.498172],[123.093477,53.508138],[123.052209,53.506715],[122.943804,53.483929],[122.894528,53.462914],[122.826775,53.457213],[122.763949,53.463626],[122.673406,53.459351],[122.608117,53.465408],[122.5379,53.453293],[122.496016,53.458638],[122.435038,53.444739],[122.37406,53.47467],[122.350038,53.505647],[122.266886,53.470039],[122.227466,53.461845],[122.161561,53.468614],[122.111054,53.426913],[122.077177,53.422277],[122.026054,53.428339],[121.875765,53.426556],[121.816019,53.41336],[121.754425,53.389454],[121.697758,53.392666],[121.589969,53.350891],[121.499426,53.337314],[121.504969,53.323018],[121.575802,53.29155],[121.615222,53.258984],[121.642324,53.262564],[121.679896,53.240722],[121.67928,53.199515],[121.660186,53.195213],[121.665114,53.170467],[121.722396,53.145706],[121.753193,53.147501],[121.784606,53.104408],[121.775367,53.089674],[121.817867,53.061631],[121.785838,53.018451],[121.715621,52.997926],[121.677432,52.948192],[121.66265,52.912478],[121.610295,52.892264],[121.604136,52.872401],[121.620766,52.853251],[121.591201,52.824693],[121.537614,52.801542],[121.511129,52.779104],[121.476636,52.772225],[121.455078,52.73528],[121.373158,52.683067],[121.309717,52.676173],[121.29247,52.651855],[121.237036,52.619167],[121.182217,52.59918],[121.225333,52.577364],[121.280151,52.586819],[121.323883,52.573727],[121.353448,52.534793],[121.411963,52.52205],[121.416274,52.499468],[121.474172,52.482706],[121.495114,52.484892],[121.519136,52.456821],[121.565331,52.460468],[121.590585,52.443326],[121.63986,52.44442],[121.678664,52.419973],[121.658338,52.3904],[121.715621,52.342894],[121.714389,52.318025],[121.769207,52.308147],[121.841272,52.282526],[121.901018,52.280695],[121.94783,52.298266],[121.976779,52.343626],[122.035909,52.377615],[122.040837,52.413038],[122.091344,52.427272],[122.080873,52.440407],[122.107358,52.452445],[122.142467,52.495096],[122.140003,52.510032],[122.168952,52.513674],[122.178191,52.48963],[122.207756,52.469218],[122.310618,52.475416],[122.326016,52.459374],[122.342031,52.414133],[122.367284,52.413768],[122.378987,52.395512],[122.419023,52.375057],[122.447356,52.394052],[122.484313,52.341432],[122.478153,52.29607],[122.560689,52.282526],[122.585943,52.266413],[122.67895,52.276667],[122.710979,52.256157],[122.76087,52.26678],[122.787355,52.252494],[122.766413,52.232705],[122.769493,52.179893],[122.73808,52.153464],[122.690653,52.140243],[122.629059,52.13657],[122.643841,52.111585],[122.625363,52.067459],[122.650616,52.058997],[122.664783,51.99861],[122.683877,51.974654],[122.726377,51.978709],[122.729457,51.919321],[122.706051,51.890151],[122.725761,51.87833],[122.732536,51.832495],[122.771957,51.779579],[122.749167,51.746613],[122.778732,51.698048],[122.816304,51.655371],[122.820616,51.633088],[122.85634,51.606707],[122.832935,51.581797],[122.874202,51.561339],[122.880362,51.537894],[122.858804,51.524864],[122.880362,51.511085],[122.854492,51.477551],[122.871123,51.455181],[122.900072,51.445112],[122.903768,51.415262],[122.946267,51.405183],[122.965977,51.386886],[122.965977,51.345786],[123.002934,51.31213],[123.069455,51.321108],[123.127969,51.297913],[123.231447,51.279199],[123.231447,51.268716],[123.294273,51.254111],[123.339853,51.27246],[123.376809,51.266844],[123.414381,51.278825],[123.440251,51.270963],[123.46304,51.286686],[123.582533,51.294545],[123.582533,51.306893],[123.661989,51.319237],[123.660141,51.342795],[123.711264,51.398089],[123.794416,51.361109],[123.842459,51.367462],[123.887423,51.320734],[123.926227,51.300532],[123.939777,51.313253],[123.994596,51.322604],[124.071588,51.320734],[124.090067,51.3413],[124.128255,51.347281],[124.192313,51.33943],[124.239124,51.344664],[124.271769,51.308389],[124.297638,51.298661],[124.339522,51.293422],[124.406659,51.272086],[124.430065,51.301281],[124.426985,51.331953],[124.443616,51.35812],[124.478108,51.36223],[124.490427,51.380537],[124.555717,51.375307],[124.58713,51.363725],[124.62655,51.327465],[124.693687,51.3327],[124.752817,51.35812],[124.76452,51.38726],[124.783614,51.392115],[124.864302,51.37979],[124.885244,51.40817],[124.942527,51.447349],[124.917889,51.474196],[124.928976,51.498419],[124.983795,51.508478],[125.004737,51.529332],[125.047236,51.529704],[125.073106,51.553526],[125.060171,51.59667],[125.098975,51.658341],[125.12854,51.659083],[125.130388,51.635317],[125.175968,51.639403],[125.214772,51.627888],[125.228938,51.640517],[125.289301,51.633831],[125.316402,51.610052],[125.35151,51.623801],[125.38046,51.585516],[125.424807,51.562827],[125.528285,51.488359],[125.559082,51.461521],[125.559082,51.461521],[125.595422,51.416755],[125.595422,51.416755],[125.60035,51.413396],[125.60035,51.413396],[125.600966,51.410409],[125.600966,51.410409],[125.62314,51.398089],[125.62314,51.398089],[125.623756,51.387633],[125.623756,51.387633],[125.626219,51.380163],[125.626219,51.380163],[125.700132,51.327465],[125.700132,51.327465],[125.740784,51.27583],[125.740784,51.27583],[125.76111,51.261976],[125.76111,51.261976],[125.761726,51.226385],[125.819008,51.227134],[125.850421,51.21364],[125.864588,51.146487],[125.909551,51.138977],[125.946508,51.108176],[125.970529,51.123955],[125.993935,51.119072],[125.976073,51.084498],[126.059225,51.043503],[126.033971,51.011132],[126.041978,50.981753],[126.068464,50.967434],[126.042594,50.92558],[126.02042,50.927466],[125.996399,50.906715],[125.997631,50.872738],[125.961906,50.901054],[125.939732,50.85423],[125.913247,50.825885],[125.878138,50.816812],[125.890457,50.805845],[125.836255,50.793363],[125.846726,50.769524],[125.828863,50.756654],[125.804226,50.773309],[125.758646,50.746809],[125.795603,50.738856],[125.78082,50.725598],[125.825784,50.70362],[125.789443,50.679735],[125.804226,50.658874],[125.793139,50.643316],[125.814697,50.62092],[125.807921,50.60383],[125.829479,50.56165],[125.794987,50.532748],[125.770349,50.531227],[125.754335,50.506874],[125.740784,50.523237],[125.699516,50.487078],[125.654553,50.471082],[125.627451,50.443268],[125.580024,50.449366],[125.562162,50.438314],[125.583104,50.409717],[125.567089,50.402852],[125.536292,50.420014],[125.522126,50.404759],[125.546763,50.358965],[125.520278,50.3498],[125.530749,50.331085],[125.463611,50.295925],[125.466075,50.266861],[125.442053,50.260357],[125.448829,50.216338],[125.417416,50.195654],[125.39093,50.199868],[125.382923,50.172278],[125.335496,50.161161],[125.376148,50.137385],[125.311474,50.140453],[125.27883,50.127411],[125.258504,50.103618],[125.287453,50.093636],[125.283757,50.070211],[125.328105,50.065985],[125.315786,50.04562],[125.289916,50.057917],[125.25296,50.041393],[125.283757,50.036012],[125.297924,50.014481],[125.278214,49.996402],[125.241873,49.987938],[125.231402,49.957531],[125.190134,49.959841],[125.199373,49.935194],[125.225859,49.922481],[125.212924,49.907452],[125.245569,49.87198],[125.225243,49.867351],[125.239409,49.844587],[125.177815,49.829533],[125.222779,49.799026],[125.221547,49.754969],[125.204301,49.734086],[125.225243,49.726349],[125.219699,49.669058],[125.185207,49.634574],[125.189518,49.652401],[125.164881,49.669446],[125.132236,49.672157],[125.127308,49.655113],[125.15441,49.616741],[125.16796,49.629923],[125.205533,49.593859],[125.23017,49.595411],[125.233866,49.536801],[125.211076,49.539908],[125.228323,49.487063],[125.270822,49.454395],[125.256656,49.437275],[125.25604,49.395227],[125.277598,49.379644],[125.256656,49.359769],[125.261583,49.322336],[125.214772,49.277066],[125.227707,49.248947],[125.219699,49.189139],[125.187671,49.186792],[125.158721,49.144921],[125.117453,49.126127],[125.034302,49.157056],[125.039845,49.17623],[124.983179,49.162535],[124.906802,49.184054],[124.860607,49.166448],[124.847672,49.129651],[124.809484,49.115943],[124.828578,49.077933],[124.808252,49.020666],[124.756513,48.967262],[124.744194,48.920487],[124.709086,48.920487],[124.715861,48.885475],[124.697383,48.841775],[124.654267,48.83429],[124.644412,48.80789],[124.656115,48.783842],[124.612383,48.747945],[124.624702,48.701755],[124.601912,48.632587],[124.579122,48.596582],[124.520608,48.556195],[124.548941,48.535593],[124.533543,48.515379],[124.555717,48.467784],[124.507674,48.445558],[124.52492,48.426897],[124.51876,48.378027],[124.547094,48.35775],[124.540934,48.335476],[124.579738,48.297269],[124.558796,48.268197],[124.579122,48.262221],[124.547094,48.200829],[124.512601,48.164518],[124.529847,48.146951],[124.505826,48.124985],[124.478108,48.123387],[124.46579,48.098213],[124.415899,48.08782],[124.430065,48.12099],[124.471333,48.133373],[124.475029,48.173698],[124.418978,48.181679],[124.412819,48.219175],[124.422058,48.245884],[124.365392,48.283731],[124.353689,48.315978],[124.317964,48.35099],[124.331515,48.380015],[124.309957,48.413393],[124.330283,48.435633],[124.302566,48.456673],[124.314269,48.503881],[124.25945,48.536385],[124.25945,48.536385],[124.136878,48.463023],[124.07898,48.43603],[124.019234,48.39313],[123.862785,48.271782],[123.746373,48.197638],[123.705105,48.152142],[123.579453,48.045427],[123.537569,48.021816],[123.300432,47.953723],[123.256085,47.876711],[123.214201,47.824502],[123.161846,47.781892],[123.041122,47.746492],[122.926557,47.697777],[122.848949,47.67441],[122.765181,47.614333],[122.59395,47.54732],[122.543443,47.495589],[122.507103,47.401291],[122.418407,47.350632],[122.441197,47.310476],[122.441197,47.310476],[122.462755,47.27841],[122.498479,47.255262],[122.531124,47.198771],[122.582863,47.158092],[122.582863,47.158092],[122.615508,47.124306],[122.679566,47.094164],[122.710363,47.093349],[122.710363,47.093349],[122.821232,47.065636],[122.852645,47.072158],[122.845869,47.046881],[122.778116,47.002822],[122.77442,46.973837],[122.798442,46.9575],[122.791051,46.941567],[122.83971,46.937072],[122.895144,46.960359],[122.893913,46.895376],[122.906847,46.80738],[122.996774,46.761483],[123.00355,46.730726],[123.026339,46.718829],[123.076846,46.745082],[123.103332,46.734828],[123.163694,46.74016],[123.198802,46.803283],[123.22344,46.821305],[123.221592,46.850373],[123.295505,46.865105],[123.341084,46.826628],[123.374345,46.837683],[123.40699,46.906416],[123.404526,46.935438],[123.360179,46.970978],[123.304128,46.964852],[123.301664,46.999965],[123.337389,46.988943],[123.42362,46.934212],[123.487678,46.959951],[123.52833,46.944836],[123.483366,46.84587],[123.506772,46.827038],[123.562823,46.82581],[123.575757,46.845461],[123.576989,46.891286],[123.605322,46.891286],[123.599163,46.868378],[123.625648,46.847508],[123.580069,46.827447],[123.629344,46.813524],[123.631808,46.728675],[123.603475,46.68928],[123.474743,46.686817],[123.366338,46.677784],[123.318295,46.662179],[123.276411,46.660947],[123.279491,46.616981],[123.228368,46.588198],[123.18094,46.614103],[123.098404,46.603002],[123.077462,46.622324],[123.04605,46.617803],[123.052825,46.579972],[123.002318,46.574624],[123.010325,46.524823],[123.011557,46.434984],[123.089781,46.347888],[123.142136,46.298293],[123.178476,46.248239],[123.248078,46.273065],[123.286266,46.250308],[123.320758,46.254447],[123.357099,46.232096],[123.357099,46.232096],[123.430396,46.243687],[123.452569,46.233338],[123.499381,46.259826],[123.569598,46.223816],[123.569598,46.223816]]]]}},{"type":"Feature","properties":{"adcode":310000,"name":"\u4E0A\u6D77\u5E02","center":[121.472644,31.231706],"centroid":[121.438737,31.072559],"childrenNum":16,"level":"province","parent":{"adcode":100000},"subFeatureIndex":8,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[120.901349,31.017327],[120.940153,31.010146],[120.949392,31.030148],[120.989428,31.01425],[121.000515,30.938309],[120.993124,30.889532],[121.020225,30.872069],[120.991892,30.837133],[121.038087,30.814007],[121.060261,30.845354],[121.097833,30.857171],[121.13787,30.826342],[121.123087,30.77905],[121.174826,30.771851],[121.21671,30.785734],[121.232108,30.755909],[121.272144,30.723504],[121.274608,30.677191],[121.362071,30.679764],[121.426129,30.730192],[121.517288,30.775451],[121.601056,30.805269],[121.681128,30.818633],[121.904714,30.814007],[121.943518,30.776993],[121.970004,30.789333],[121.954605,30.825828],[121.994025,30.862823],[121.990945,30.96859],[121.977395,31.016301],[121.946598,31.066039],[121.809859,31.196669],[121.722396,31.3036],[121.599208,31.37465],[121.520984,31.394575],[121.404571,31.479337],[121.343593,31.511996],[121.301093,31.49873],[121.301093,31.49873],[121.247507,31.476785],[121.241963,31.493117],[121.174826,31.44922],[121.143413,31.392021],[121.113848,31.37465],[121.130478,31.343987],[121.142797,31.275472],[121.090442,31.291838],[121.060261,31.245289],[121.076892,31.158267],[121.018377,31.134194],[120.930298,31.141365],[120.881023,31.134706],[120.859465,31.100379],[120.890878,31.094229],[120.901349,31.017327]]],[[[121.974931,31.61704],[121.715005,31.673592],[121.64294,31.697527],[121.599824,31.703128],[121.49881,31.753012],[121.431673,31.769295],[121.384861,31.833382],[121.323267,31.868458],[121.265369,31.863883],[121.200079,31.834907],[121.118775,31.759119],[121.145261,31.75403],[121.289391,31.61653],[121.371926,31.553314],[121.395332,31.585437],[121.434136,31.590535],[121.547469,31.531382],[121.625693,31.501792],[121.682976,31.491075],[121.819098,31.437987],[121.890547,31.428795],[121.981706,31.464024],[121.995873,31.493117],[121.974931,31.61704]]],[[[121.795693,31.330186],[121.792613,31.363408],[121.742106,31.407345],[121.585657,31.454836],[121.567179,31.48342],[121.520984,31.494137],[121.509897,31.4824],[121.572107,31.435944],[121.727939,31.35472],[121.76428,31.31536],[121.785222,31.31127],[121.795693,31.330186]]],[[[121.801852,31.356765],[121.8037,31.328652],[121.840656,31.295418],[121.932431,31.283144],[122.016199,31.282121],[122.097503,31.255522],[122.122756,31.307179],[122.116597,31.320984],[122.040837,31.324051],[121.951525,31.337343],[121.845584,31.37465],[121.792613,31.377715],[121.801852,31.356765]]],[[[121.626925,31.445135],[121.631853,31.456878],[121.579498,31.479848],[121.626925,31.445135]]],[[[121.943518,31.215608],[121.959533,31.159291],[121.995873,31.160828],[122.008808,31.221238],[121.950909,31.228915],[121.943518,31.215608]]],[[[121.88254,31.240684],[121.909026,31.195133],[121.923808,31.234032],[121.88254,31.240684]]]]}},{"type":"Feature","properties":{"adcode":320000,"name":"\u6C5F\u82CF\u7701","center":[118.767413,32.041544],"centroid":[119.486506,32.983991],"childrenNum":13,"level":"province","parent":{"adcode":100000},"subFeatureIndex":9,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[117.311654,34.561686],[117.27285,34.556757],[117.303647,34.542463],[117.267923,34.532603],[117.27285,34.499565],[117.252524,34.48674],[117.248213,34.451216],[117.166293,34.434435],[117.139191,34.526687],[117.15151,34.559222],[117.104083,34.648874],[117.073286,34.639026],[117.061583,34.675947],[117.070206,34.713835],[117.022163,34.759081],[116.969192,34.771864],[116.95133,34.81069],[116.979047,34.815113],[116.966113,34.844588],[116.929156,34.843114],[116.922381,34.894671],[116.858323,34.928533],[116.821983,34.929515],[116.815823,34.965324],[116.789338,34.975133],[116.781331,34.916757],[116.677853,34.939327],[116.622418,34.939818],[116.613795,34.922645],[116.557745,34.908905],[116.445028,34.895652],[116.408071,34.850972],[116.403144,34.756131],[116.369267,34.749247],[116.363724,34.715311],[116.392057,34.710391],[116.374195,34.640011],[116.430245,34.650843],[116.432709,34.630163],[116.477057,34.614896],[116.490607,34.573513],[116.594085,34.511894],[116.592237,34.493646],[116.662454,34.472927],[116.722816,34.472434],[116.773939,34.453683],[116.782563,34.429993],[116.828142,34.389012],[116.909446,34.408271],[116.969192,34.389012],[116.960569,34.363821],[116.983359,34.348011],[116.969192,34.283753],[117.051112,34.221425],[117.025243,34.167469],[117.046801,34.151622],[117.123793,34.128342],[117.130568,34.101586],[117.192162,34.068873],[117.257452,34.065899],[117.277162,34.078787],[117.311654,34.067882],[117.357234,34.088205],[117.404045,34.03218],[117.435458,34.028212],[117.514914,34.060941],[117.543248,34.038627],[117.569117,33.985051],[117.612849,34.000433],[117.629479,34.028708],[117.671363,33.992494],[117.672595,33.934916],[117.715095,33.879287],[117.753899,33.891211],[117.759442,33.874318],[117.739732,33.758467],[117.72495,33.74951],[117.750203,33.710688],[117.791471,33.733585],[117.843826,33.736074],[117.901724,33.720146],[117.972557,33.74951],[118.019985,33.738562],[118.065564,33.76593],[118.117919,33.766427],[118.161035,33.735576],[118.16781,33.663381],[118.112376,33.617045],[118.117919,33.594615],[118.107448,33.475391],[118.050782,33.491863],[118.027376,33.455421],[118.016905,33.402978],[118.029224,33.374995],[117.992883,33.333005],[117.974405,33.279487],[117.939297,33.262475],[117.942376,33.224936],[117.977485,33.226437],[117.988572,33.180869],[118.037231,33.152314],[118.038463,33.134776],[118.149332,33.169348],[118.178281,33.217926],[118.217085,33.191888],[118.219549,33.114227],[118.243571,33.027967],[118.244803,32.998359],[118.26944,32.969242],[118.303933,32.96874],[118.291614,32.946143],[118.252194,32.936601],[118.2331,32.914498],[118.250346,32.848157],[118.301469,32.846145],[118.300237,32.783275],[118.334114,32.761637],[118.363063,32.770695],[118.375382,32.718849],[118.411106,32.715828],[118.450526,32.743518],[118.483787,32.721367],[118.560163,32.729926],[118.572482,32.719856],[118.642699,32.744525],[118.707373,32.72036],[118.756648,32.737477],[118.73817,32.772708],[118.743097,32.853184],[118.743097,32.853184],[118.810235,32.853687],[118.821322,32.920527],[118.846575,32.922034],[118.849039,32.956689],[118.89585,32.957694],[118.89585,32.957694],[118.892771,32.941121],[118.934039,32.93861],[118.993169,32.958196],[119.020886,32.955685],[119.054763,32.8748],[119.113277,32.823014],[119.184726,32.825529],[119.211827,32.708275],[119.208748,32.641276],[119.230921,32.607001],[119.22045,32.576748],[119.152697,32.557582],[119.168096,32.536394],[119.142226,32.499556],[119.084944,32.452602],[119.041212,32.515201],[118.975923,32.505108],[118.922336,32.557078],[118.92172,32.557078],[118.922336,32.557078],[118.92172,32.557078],[118.890923,32.553042],[118.908169,32.59238],[118.84288,32.56767],[118.820706,32.60448],[118.784981,32.582295],[118.757264,32.603976],[118.73509,32.58885],[118.719076,32.614059],[118.719076,32.614059],[118.688895,32.588346],[118.658714,32.594397],[118.632844,32.578261],[118.59712,32.600951],[118.568787,32.585825],[118.564475,32.562122],[118.608823,32.536899],[118.592192,32.481383],[118.628533,32.467751],[118.691359,32.472295],[118.685199,32.403604],[118.703061,32.328792],[118.657482,32.30148],[118.674728,32.250375],[118.643931,32.209875],[118.510888,32.194176],[118.49549,32.165304],[118.501033,32.121726],[118.433896,32.086746],[118.394476,32.076098],[118.389548,31.985281],[118.363679,31.930443],[118.472084,31.879639],[118.466541,31.857784],[118.504729,31.841516],[118.481939,31.778453],[118.533678,31.76726],[118.521975,31.743343],[118.5577,31.73011],[118.571866,31.746397],[118.641467,31.75861],[118.653786,31.73011],[118.697518,31.709747],[118.643315,31.671555],[118.643315,31.649651],[118.736322,31.633347],[118.748025,31.675629],[118.773894,31.682759],[118.802844,31.619078],[118.858894,31.623665],[118.881684,31.564023],[118.885995,31.519139],[118.883532,31.500261],[118.852119,31.393553],[118.824401,31.375672],[118.767735,31.363919],[118.745561,31.372606],[118.720924,31.322518],[118.726467,31.282121],[118.756648,31.279564],[118.794836,31.229426],[118.870597,31.242219],[118.984546,31.237102],[119.014727,31.241707],[119.10527,31.235055],[119.107118,31.250917],[119.158241,31.294907],[119.197661,31.295418],[119.198277,31.270357],[119.266646,31.250405],[119.294363,31.263195],[119.338095,31.259103],[119.350414,31.301043],[119.374435,31.258591],[119.360269,31.213049],[119.391682,31.174142],[119.439109,31.177214],[119.461283,31.156219],[119.532732,31.159291],[119.599869,31.10909],[119.623891,31.130096],[119.678093,31.167997],[119.705811,31.152634],[119.715666,31.169533],[119.779723,31.17875],[119.809904,31.148536],[119.827151,31.174142],[119.878274,31.160828],[119.921389,31.170045],[119.946027,31.106016],[119.988527,31.059375],[120.001461,31.027071],[120.052584,31.00553],[120.111099,30.955761],[120.149903,30.937283],[120.223816,30.926502],[120.316206,30.933689],[120.371025,30.948575],[120.35809,30.886964],[120.42338,30.902884],[120.435083,30.920855],[120.441858,30.860768],[120.460336,30.839702],[120.489285,30.763624],[120.504684,30.757967],[120.563814,30.835592],[120.589684,30.854089],[120.654973,30.846896],[120.68269,30.882342],[120.713487,30.88491],[120.709176,30.933176],[120.684538,30.955247],[120.698089,30.970643],[120.746132,30.962432],[120.770154,30.996809],[120.820661,31.006556],[120.865624,30.989627],[120.901349,31.017327],[120.890878,31.094229],[120.859465,31.100379],[120.881023,31.134706],[120.930298,31.141365],[121.018377,31.134194],[121.076892,31.158267],[121.060261,31.245289],[121.090442,31.291838],[121.142797,31.275472],[121.130478,31.343987],[121.113848,31.37465],[121.143413,31.392021],[121.174826,31.44922],[121.241963,31.493117],[121.247507,31.476785],[121.301093,31.49873],[121.301093,31.49873],[121.343593,31.511996],[121.371926,31.553314],[121.289391,31.61653],[121.145261,31.75403],[121.118775,31.759119],[121.200079,31.834907],[121.265369,31.863883],[121.323267,31.868458],[121.384861,31.833382],[121.431673,31.769295],[121.49881,31.753012],[121.599824,31.703128],[121.64294,31.697527],[121.715005,31.673592],[121.974931,31.61704],[121.970004,31.718911],[121.889315,31.866425],[121.856055,31.955328],[121.772287,32.032984],[121.759352,32.059362],[121.525295,32.136423],[121.542542,32.152132],[121.458774,32.177462],[121.499426,32.211394],[121.493882,32.263533],[121.450151,32.282256],[121.425513,32.430885],[121.390405,32.460682],[121.352216,32.474315],[121.269681,32.483402],[121.153268,32.52933],[121.121855,32.569183],[121.076892,32.576243],[121.020225,32.605489],[120.961711,32.612042],[120.979573,32.636236],[120.963559,32.68259],[120.916131,32.701225],[120.953088,32.714318],[120.972182,32.761134],[120.981421,32.85972],[120.957399,32.893395],[120.932762,33.005887],[120.917979,33.02596],[120.871784,33.047032],[120.874247,33.093672],[120.843451,33.209915],[120.819429,33.237951],[120.833595,33.274984],[120.813885,33.303499],[120.769538,33.307],[120.741205,33.337505],[120.717183,33.436945],[120.680227,33.520306],[120.622944,33.615051],[120.611241,33.627012],[120.583524,33.668362],[120.534249,33.782346],[120.48559,33.859411],[120.367329,34.091674],[120.347619,34.179352],[120.314359,34.255563],[120.311895,34.306991],[120.103707,34.391481],[119.962657,34.459112],[119.811752,34.485754],[119.781571,34.515839],[119.641137,34.569078],[119.610956,34.592729],[119.569072,34.615389],[119.465594,34.672994],[119.525956,34.73351],[119.456971,34.748264],[119.381827,34.752198],[119.494543,34.754656],[119.497007,34.754164],[119.439725,34.785136],[119.440957,34.769406],[119.378747,34.764489],[119.312841,34.774813],[119.272189,34.797914],[119.238313,34.799388],[119.217371,34.827886],[119.202588,34.890253],[119.214907,34.925589],[119.211211,34.981507],[119.238313,35.048657],[119.285124,35.068252],[119.291899,35.028567],[119.307298,35.032977],[119.292515,35.068742],[119.306066,35.076578],[119.286972,35.115261],[119.250016,35.124562],[119.217371,35.106939],[119.137915,35.096167],[119.114509,35.055026],[119.027045,35.055516],[118.942662,35.040817],[118.928495,35.051106],[118.86259,35.025626],[118.860742,34.944233],[118.805307,34.87307],[118.80038,34.843114],[118.772047,34.794474],[118.739402,34.792508],[118.719076,34.745313],[118.764039,34.740396],[118.783749,34.723181],[118.739402,34.693663],[118.690127,34.678408],[118.664257,34.693663],[118.607591,34.694155],[118.601431,34.714327],[118.545997,34.705964],[118.460997,34.656258],[118.473932,34.623269],[118.439439,34.626223],[118.424657,34.595193],[118.439439,34.507949],[118.416034,34.473914],[118.404947,34.427525],[118.379693,34.415183],[118.290382,34.424563],[118.277447,34.404814],[118.220165,34.405802],[118.217701,34.379134],[118.179513,34.379628],[118.177665,34.45319],[118.132702,34.483287],[118.16473,34.50499],[118.185056,34.543942],[118.079115,34.569571],[118.114839,34.614404],[118.084042,34.655766],[118.053861,34.650843],[117.951615,34.678408],[117.909732,34.670533],[117.902956,34.644443],[117.793935,34.651827],[117.791471,34.583368],[117.801942,34.518798],[117.684298,34.547392],[117.659044,34.501044],[117.609769,34.490686],[117.592523,34.462566],[117.53832,34.467006],[117.465023,34.484767],[117.402813,34.550843],[117.402813,34.569571],[117.370785,34.584846],[117.325205,34.573021],[117.325205,34.573021],[117.32151,34.566614],[117.32151,34.566614],[117.311654,34.561686],[117.311654,34.561686]]]]}},{"type":"Feature","properties":{"adcode":330000,"name":"\u6D59\u6C5F\u7701","center":[120.153576,30.287459],"centroid":[120.109913,29.181466],"childrenNum":11,"level":"province","parent":{"adcode":100000},"subFeatureIndex":10,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[118.433896,28.288335],[118.444367,28.253548],[118.490562,28.238259],[118.493026,28.262509],[118.588497,28.282538],[118.595272,28.258292],[118.651322,28.277267],[118.674728,28.27147],[118.699366,28.309939],[118.719692,28.312047],[118.756032,28.252493],[118.802228,28.240368],[118.804075,28.207675],[118.771431,28.188687],[118.805923,28.154923],[118.802228,28.117453],[118.767735,28.10584],[118.719076,28.063601],[118.733858,28.027684],[118.730163,27.970615],[118.753568,27.947885],[118.818242,27.916689],[118.829329,27.847921],[118.873677,27.733563],[118.879836,27.667859],[118.913713,27.619616],[118.909401,27.568168],[118.869365,27.540047],[118.907553,27.460952],[118.955597,27.4498],[118.986393,27.47582],[118.983314,27.498649],[119.020886,27.498118],[119.03998,27.478475],[119.092335,27.466262],[119.129907,27.475289],[119.121284,27.438115],[119.14777,27.424836],[119.224146,27.416868],[119.26911,27.42218],[119.285124,27.457766],[119.334399,27.480067],[119.360269,27.524657],[119.416935,27.539517],[119.438493,27.508734],[119.466826,27.526249],[119.501935,27.610601],[119.501319,27.649837],[119.541971,27.666799],[119.606028,27.674749],[119.644217,27.663619],[119.626354,27.620676],[119.630666,27.582491],[119.675014,27.574534],[119.659615,27.540578],[119.690412,27.537394],[119.70889,27.514042],[119.703347,27.446613],[119.685485,27.438646],[119.711354,27.403054],[119.750774,27.373829],[119.739687,27.362668],[119.782187,27.330241],[119.768636,27.307909],[119.843165,27.300464],[119.938636,27.329709],[119.960194,27.365857],[120.008237,27.375423],[120.026099,27.344063],[120.052584,27.338747],[120.096316,27.390302],[120.136968,27.402523],[120.134504,27.420055],[120.221352,27.420055],[120.26262,27.432804],[120.273091,27.38924],[120.340844,27.399867],[120.343924,27.363199],[120.430155,27.258976],[120.401822,27.250996],[120.404286,27.204166],[120.461568,27.142407],[120.492365,27.136016],[120.545952,27.156785],[120.574901,27.234501],[120.554575,27.25206],[120.580444,27.321203],[120.665444,27.357884],[120.673451,27.420055],[120.703016,27.478475],[120.637111,27.561271],[120.634647,27.577186],[120.685154,27.622797],[120.709176,27.682699],[120.771386,27.734623],[120.777545,27.774873],[120.809574,27.775402],[120.840371,27.758986],[120.910588,27.864852],[120.942001,27.896592],[120.97403,27.887071],[121.027616,27.832574],[121.070116,27.834162],[121.107688,27.81352],[121.152036,27.815638],[121.134174,27.787051],[121.13479,27.787051],[121.149572,27.801345],[121.149572,27.801875],[121.153268,27.809815],[121.152652,27.810344],[121.192072,27.822518],[121.193304,27.872259],[121.162507,27.879136],[121.162507,27.90717],[121.099681,27.895005],[121.05595,27.900294],[120.991892,27.95],[121.015298,27.981714],[121.059029,28.096338],[121.108304,28.139092],[121.121239,28.12537],[121.140949,28.031382],[121.176058,28.022401],[121.261057,28.034551],[121.299862,28.067297],[121.328195,28.134343],[121.373774,28.133287],[121.402107,28.197127],[121.45631,28.250385],[121.488955,28.301509],[121.538846,28.299401],[121.571491,28.279376],[121.580114,28.240368],[121.627541,28.251966],[121.669425,28.33312],[121.660186,28.355768],[121.634317,28.347868],[121.658954,28.392628],[121.692831,28.407368],[121.671273,28.472621],[121.646019,28.511544],[121.634317,28.562542],[121.596128,28.575156],[121.557324,28.645033],[121.540694,28.655537],[121.646019,28.682842],[121.689135,28.719062],[121.704534,28.804577],[121.687287,28.863294],[121.774751,28.863818],[121.772287,28.898404],[121.743338,28.954451],[121.711309,28.985865],[121.712541,29.028783],[121.658954,29.058606],[121.660186,29.118226],[121.616454,29.143318],[121.608447,29.168927],[121.715621,29.125022],[121.750113,29.136523],[121.767975,29.166837],[121.780294,29.10986],[121.811091,29.10986],[121.85975,29.086328],[121.884388,29.105677],[121.966308,29.052852],[121.970004,29.092604],[121.988482,29.110906],[121.986634,29.154817],[121.948446,29.193485],[121.971851,29.193485],[121.966924,29.249894],[122.002032,29.260336],[122.000185,29.278608],[121.94475,29.28435],[121.958301,29.334448],[121.936127,29.348012],[121.937975,29.384],[121.975547,29.411113],[121.993409,29.45229],[121.973083,29.477821],[121.968772,29.515846],[121.995257,29.545007],[122.000185,29.582486],[121.966308,29.636078],[121.909641,29.650122],[121.872685,29.632437],[121.833265,29.653242],[121.937359,29.748373],[122.003264,29.762401],[122.043916,29.822647],[122.10243,29.859504],[122.143082,29.877668],[122.140003,29.901535],[122.00696,29.891678],[122.00388,29.92021],[121.971235,29.955476],[121.919497,29.920729],[121.835113,29.958068],[121.78399,29.99332],[121.721164,29.992802],[121.699606,30.007832],[121.652795,30.071037],[121.635548,30.070002],[121.561636,30.184395],[121.497578,30.258861],[121.395332,30.338435],[121.371926,30.37097],[121.328195,30.397299],[121.225333,30.404526],[121.183449,30.434458],[121.092906,30.515952],[121.058413,30.563888],[121.148956,30.599953],[121.188992,30.632916],[121.239499,30.648878],[121.274608,30.677191],[121.272144,30.723504],[121.232108,30.755909],[121.21671,30.785734],[121.174826,30.771851],[121.123087,30.77905],[121.13787,30.826342],[121.097833,30.857171],[121.060261,30.845354],[121.038087,30.814007],[120.991892,30.837133],[121.020225,30.872069],[120.993124,30.889532],[121.000515,30.938309],[120.989428,31.01425],[120.949392,31.030148],[120.940153,31.010146],[120.901349,31.017327],[120.865624,30.989627],[120.820661,31.006556],[120.770154,30.996809],[120.746132,30.962432],[120.698089,30.970643],[120.684538,30.955247],[120.709176,30.933176],[120.713487,30.88491],[120.68269,30.882342],[120.654973,30.846896],[120.589684,30.854089],[120.563814,30.835592],[120.504684,30.757967],[120.489285,30.763624],[120.460336,30.839702],[120.441858,30.860768],[120.435083,30.920855],[120.42338,30.902884],[120.35809,30.886964],[120.371025,30.948575],[120.316206,30.933689],[120.223816,30.926502],[120.149903,30.937283],[120.111099,30.955761],[120.052584,31.00553],[120.001461,31.027071],[119.988527,31.059375],[119.946027,31.106016],[119.921389,31.170045],[119.878274,31.160828],[119.827151,31.174142],[119.809904,31.148536],[119.779723,31.17875],[119.715666,31.169533],[119.705811,31.152634],[119.678093,31.167997],[119.623891,31.130096],[119.649144,31.104991],[119.629434,31.085517],[119.633746,31.019379],[119.580159,30.967051],[119.582007,30.932149],[119.563529,30.919315],[119.557369,30.874124],[119.575847,30.829939],[119.55429,30.825828],[119.527188,30.77905],[119.479761,30.772365],[119.482841,30.704467],[119.444652,30.650422],[119.408312,30.645274],[119.39045,30.685941],[119.343022,30.664322],[119.323312,30.630341],[119.238929,30.609225],[119.265414,30.574709],[119.237081,30.546881],[119.272189,30.510281],[119.326392,30.532964],[119.336247,30.508734],[119.335015,30.448389],[119.36766,30.38491],[119.402768,30.374584],[119.349182,30.349281],[119.326392,30.372002],[119.277117,30.341018],[119.246936,30.341018],[119.236465,30.297106],[119.201356,30.290905],[119.126828,30.304856],[119.091719,30.323972],[119.06277,30.304856],[118.988857,30.332237],[118.954365,30.360126],[118.880452,30.31519],[118.877988,30.282637],[118.905089,30.216464],[118.929727,30.2025],[118.852735,30.166805],[118.852119,30.149729],[118.895234,30.148694],[118.873677,30.11505],[118.878604,30.064822],[118.902626,30.029078],[118.894619,29.937845],[118.838568,29.934733],[118.841032,29.891159],[118.740634,29.814859],[118.744945,29.73902],[118.700598,29.706277],[118.647011,29.64336],[118.61991,29.654282],[118.573714,29.638159],[118.532446,29.588731],[118.500417,29.57572],[118.496106,29.519492],[118.381541,29.504909],[118.347664,29.474174],[118.329802,29.495012],[118.306396,29.479384],[118.316252,29.422581],[118.248498,29.431443],[118.193064,29.395472],[118.205382,29.343839],[118.166578,29.314099],[118.178281,29.297921],[118.138861,29.283828],[118.077883,29.290614],[118.073571,29.216993],[118.042159,29.210202],[118.027992,29.167882],[118.045238,29.149068],[118.037847,29.102017],[118.076035,29.074822],[118.066796,29.053898],[118.097593,28.998952],[118.115455,29.009944],[118.115455,29.009944],[118.133933,28.983771],[118.165346,28.986912],[118.227556,28.942406],[118.195527,28.904167],[118.270056,28.918836],[118.300237,28.826075],[118.364295,28.813491],[118.403099,28.702791],[118.428352,28.681267],[118.428352,28.617193],[118.428352,28.617193],[118.412338,28.55676],[118.4302,28.515225],[118.414802,28.497344],[118.474548,28.478934],[118.456686,28.424738],[118.432048,28.402104],[118.455454,28.384204],[118.480091,28.327325],[118.433896,28.288335]]],[[[122.163408,29.988137],[122.239785,29.962735],[122.279205,29.937326],[122.322321,29.940438],[122.341415,29.976733],[122.343879,30.020269],[122.310002,30.039958],[122.290908,30.074663],[122.301379,30.086574],[122.293988,30.100554],[122.152938,30.113497],[122.095655,30.158008],[122.048844,30.147141],[121.955221,30.183878],[121.934895,30.161631],[121.983554,30.100554],[121.989714,30.077252],[121.978011,30.059125],[122.027902,29.991247],[122.106742,30.005759],[122.118445,29.986582],[122.163408,29.988137]]],[[[122.213915,30.186464],[122.178807,30.199396],[122.152938,30.19112],[122.143698,30.163183],[122.168336,30.138343],[122.213915,30.186464]]],[[[122.229314,29.711995],[122.210836,29.700559],[122.269966,29.685482],[122.231162,29.710435],[122.229314,29.711995]]],[[[122.427646,30.738422],[122.427031,30.697777],[122.532972,30.696748],[122.528045,30.725047],[122.475074,30.714243],[122.445509,30.745109],[122.427646,30.738422]]],[[[122.162793,30.329654],[122.058083,30.291938],[122.154169,30.244903],[122.231778,30.234562],[122.247176,30.30124],[122.228082,30.329654],[122.191126,30.329654],[122.176343,30.351863],[122.162793,30.329654]]],[[[122.317393,30.249556],[122.277973,30.242835],[122.358661,30.236113],[122.365437,30.255242],[122.417175,30.238699],[122.40732,30.272817],[122.333408,30.272817],[122.317393,30.249556]]],[[[122.026054,29.178333],[122.013119,29.151681],[122.056851,29.158476],[122.075945,29.176243],[122.036525,29.20759],[122.026054,29.178333]]],[[[122.372212,29.893234],[122.386379,29.834069],[122.415944,29.828877],[122.401777,29.869884],[122.433806,29.883376],[122.43319,29.919173],[122.411632,29.951846],[122.398081,29.9394],[122.351886,29.959105],[122.330944,29.937845],[122.338951,29.911911],[122.353734,29.89946],[122.362973,29.894272],[122.372212,29.893234]]],[[[122.43011,30.408655],[122.432574,30.445294],[122.37406,30.461802],[122.277973,30.471603],[122.281669,30.418461],[122.318625,30.407106],[122.352502,30.422074],[122.43011,30.408655]]],[[[121.837577,28.770484],[121.86283,28.782024],[121.861598,28.814016],[121.837577,28.770484]]],[[[122.265038,29.84549],[122.221307,29.832512],[122.248408,29.804473],[122.310002,29.766557],[122.325401,29.781621],[122.299531,29.819532],[122.319241,29.829397],[122.265038,29.84549]]],[[[121.790765,29.082144],[121.832649,29.050236],[121.84312,29.082144],[121.82033,29.099402],[121.790765,29.082144]]],[[[121.201311,27.623328],[121.197616,27.618025],[121.198848,27.616964],[121.203775,27.625979],[121.201311,27.623328]]],[[[121.943518,30.776993],[121.968156,30.688514],[121.997105,30.658659],[122.087032,30.602014],[122.133227,30.595317],[122.075329,30.647848],[122.011271,30.66947],[121.992793,30.695204],[121.987866,30.753338],[121.970004,30.789333],[121.943518,30.776993]]],[[[121.889315,28.471569],[121.918881,28.497344],[121.881924,28.502603],[121.889315,28.471569]]],[[[122.182503,29.650642],[122.211452,29.692241],[122.200365,29.712515],[122.146778,29.749412],[122.13138,29.788893],[122.083952,29.78318],[122.047612,29.719791],[122.074097,29.701599],[122.095655,29.716673],[122.138155,29.662083],[122.182503,29.650642]]],[[[122.461523,29.944068],[122.459675,29.944586],[122.460291,29.947179],[122.451668,29.943031],[122.451052,29.940956],[122.450436,29.940956],[122.449204,29.9394],[122.4529,29.936807],[122.452284,29.935252],[122.45598,29.926435],[122.457827,29.927472],[122.462755,29.927991],[122.467067,29.928509],[122.459059,29.938882],[122.461523,29.944068]]],[[[122.570544,30.644244],[122.559457,30.679764],[122.546523,30.651967],[122.570544,30.644244]]],[[[121.869605,28.423685],[121.910873,28.44],[121.889931,28.45105],[121.869605,28.423685]]],[[[122.065474,30.179739],[122.055619,30.200431],[122.017431,30.186464],[122.025438,30.161631],[122.065474,30.179739]]],[[[122.391306,29.970512],[122.411632,30.025969],[122.378371,30.023896],[122.3679,29.980361],[122.391306,29.970512]]],[[[121.850511,29.977251],[121.874533,29.964809],[121.933047,29.994875],[121.924424,30.052391],[121.88562,30.094859],[121.848663,30.101072],[121.84004,30.047211],[121.844968,29.982953],[121.850511,29.977251]]],[[[121.066421,27.478475],[121.066421,27.461483],[121.107073,27.443958],[121.067036,27.478475],[121.066421,27.478475]]],[[[121.952141,29.187738],[121.979243,29.160043],[121.976779,29.191918],[121.952141,29.187738]]],[[[122.038373,29.759284],[122.011271,29.746294],[122.02975,29.716673],[122.038373,29.759284]]],[[[121.940438,30.114533],[121.910257,30.089163],[121.945982,30.064304],[121.962612,30.106249],[121.940438,30.114533]]],[[[121.957685,30.287804],[122.0008,30.308473],[121.989098,30.339985],[121.94167,30.33327],[121.921344,30.30744],[121.957685,30.287804]]],[[[122.192974,29.965327],[122.163408,29.988137],[122.152322,29.97103],[122.154169,29.97103],[122.155401,29.970512],[122.18435,29.955476],[122.192974,29.965327]]],[[[122.287828,29.723949],[122.301379,29.748373],[122.258263,29.753569],[122.241633,29.784738],[122.2133,29.771752],[122.251488,29.731225],[122.287828,29.723949]]],[[[121.134174,27.787051],[121.134174,27.785992],[121.13479,27.787051],[121.134174,27.787051]]],[[[122.760254,30.141966],[122.784275,30.130062],[122.781196,30.13265],[122.778116,30.13679],[122.770725,30.138861],[122.763333,30.141966],[122.762101,30.142484],[122.760254,30.141966]]],[[[122.264423,30.269716],[122.253952,30.237147],[122.315545,30.250073],[122.300147,30.271266],[122.264423,30.269716]]],[[[122.282901,29.860542],[122.30877,29.849642],[122.343263,29.860542],[122.343263,29.882857],[122.301379,29.883895],[122.282901,29.860542]]],[[[122.781196,30.694175],[122.799674,30.716301],[122.778732,30.729677],[122.757174,30.713728],[122.781196,30.694175]]],[[[121.098449,27.937311],[121.152652,27.961629],[121.120623,27.986471],[121.0695,27.984357],[121.038087,27.948942],[121.098449,27.937311]]],[[[121.185913,27.963215],[121.237652,27.988056],[121.197616,28.000739],[121.17113,27.978543],[121.185913,27.963215]]],[[[122.454132,29.956513],[122.447972,29.955994],[122.445509,29.952365],[122.446741,29.951327],[122.447972,29.947698],[122.459059,29.950809],[122.458443,29.951846],[122.455364,29.955994],[122.454132,29.956513]]],[[[122.836014,30.698806],[122.831087,30.728648],[122.807681,30.714243],[122.836014,30.698806]]],[[[122.200365,29.969475],[122.233626,29.946661],[122.273662,29.93214],[122.239785,29.960142],[122.200365,29.969475]]],[[[122.029134,29.954957],[122.043916,29.930584],[122.058699,29.955994],[122.029134,29.954957]]],[[[121.044247,27.979072],[121.089826,27.998625],[121.073812,28.007608],[121.044247,27.979072]]],[[[122.471378,29.927472],[122.470762,29.925916],[122.473226,29.925397],[122.47261,29.927472],[122.471378,29.927472]]],[[[122.152322,29.97103],[122.155401,29.970512],[122.154169,29.97103],[122.152322,29.97103]]]]}},{"type":"Feature","properties":{"adcode":340000,"name":"\u5B89\u5FBD\u7701","center":[117.283042,31.86119],"centroid":[117.226884,31.849254],"childrenNum":16,"level":"province","parent":{"adcode":100000},"subFeatureIndex":11,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[116.599629,34.014324],[116.641512,33.978103],[116.64336,33.896675],[116.631042,33.887733],[116.566984,33.9081],[116.558361,33.881274],[116.486296,33.869846],[116.437637,33.846489],[116.437021,33.801246],[116.408071,33.805721],[116.393905,33.782843],[116.316912,33.771402],[116.263326,33.730101],[116.230065,33.735078],[116.155536,33.709693],[116.132747,33.751501],[116.100102,33.782843],[116.074232,33.781351],[116.055754,33.804727],[116.05945,33.860902],[115.982457,33.917039],[116.00032,33.965199],[115.95782,34.007875],[115.904233,34.009859],[115.876516,34.028708],[115.877132,34.002913],[115.85003,34.004898],[115.846335,34.028708],[115.809378,34.062428],[115.768726,34.061932],[115.736082,34.076805],[115.705901,34.059949],[115.658473,34.061437],[115.642459,34.03218],[115.60735,34.030196],[115.579017,33.974133],[115.577785,33.950307],[115.547604,33.874815],[115.631988,33.869846],[115.614126,33.775879],[115.576553,33.787817],[115.563003,33.772895],[115.601807,33.718653],[115.601191,33.658898],[115.639995,33.585143],[115.564851,33.576169],[115.511264,33.55323],[115.463837,33.567193],[115.422569,33.557219],[115.394851,33.506335],[115.366518,33.5233],[115.345576,33.502842],[115.345576,33.449928],[115.324634,33.457418],[115.315395,33.431451],[115.328946,33.403477],[115.313547,33.376994],[115.341881,33.370997],[115.365286,33.336005],[115.361591,33.298497],[115.335105,33.297997],[115.340033,33.260973],[115.300613,33.204407],[115.303692,33.149809],[115.289526,33.131769],[115.245178,33.135778],[115.194671,33.120743],[115.168186,33.088658],[115.041302,33.086653],[114.990795,33.102195],[114.966158,33.147304],[114.932897,33.153817],[114.902716,33.129764],[114.897172,33.086653],[114.913187,33.083143],[114.925506,33.016928],[114.891629,33.020441],[114.883006,32.990328],[114.916266,32.971251],[114.943368,32.935094],[115.009273,32.940117],[115.035143,32.932582],[115.029599,32.906962],[115.139237,32.897917],[115.155867,32.864747],[115.197135,32.856201],[115.189744,32.812452],[115.211301,32.785791],[115.189744,32.770695],[115.179273,32.726402],[115.182968,32.666973],[115.20083,32.591876],[115.24333,32.593388],[115.267352,32.578261],[115.30554,32.583303],[115.304924,32.553042],[115.411482,32.575235],[115.409018,32.549007],[115.497713,32.492489],[115.5088,32.468761],[115.510648,32.468761],[115.510648,32.468256],[115.510648,32.467751],[115.509416,32.466741],[115.522967,32.441997],[115.57101,32.419266],[115.604271,32.425833],[115.626445,32.40512],[115.657857,32.428864],[115.667712,32.409667],[115.704669,32.495013],[115.742241,32.476335],[115.771806,32.505108],[115.789052,32.468761],[115.861117,32.537403],[115.891298,32.576243],[115.910393,32.567165],[115.8759,32.542448],[115.845719,32.501575],[115.883291,32.487946],[115.865429,32.458662],[115.899306,32.390971],[115.912856,32.227596],[115.941805,32.166318],[115.922095,32.049725],[115.928871,32.003046],[115.909161,31.94314],[115.920248,31.920285],[115.894994,31.8649],[115.893762,31.832365],[115.914704,31.814567],[115.886371,31.776418],[115.851878,31.786593],[115.808147,31.770313],[115.808147,31.770313],[115.767495,31.78761],[115.731154,31.76726],[115.676336,31.778453],[115.553764,31.69549],[115.534054,31.698545],[115.495249,31.673083],[115.476771,31.643028],[115.485394,31.608885],[115.439815,31.588496],[115.415793,31.525771],[115.371446,31.495668],[115.389924,31.450241],[115.373909,31.405813],[115.393004,31.389977],[115.372062,31.349098],[115.40717,31.337854],[115.443511,31.344498],[115.473076,31.265242],[115.507568,31.267799],[115.539597,31.231985],[115.540213,31.194621],[115.585793,31.143926],[115.603655,31.17363],[115.655394,31.211002],[115.700973,31.201276],[115.778582,31.112164],[115.797676,31.128047],[115.837712,31.127022],[115.867277,31.147512],[115.887603,31.10909],[115.939958,31.071678],[115.938726,31.04707],[116.006479,31.034764],[116.015102,31.011685],[116.058834,31.012711],[116.071769,30.956787],[116.03974,30.957813],[115.976298,30.931636],[115.932566,30.889532],[115.865429,30.864364],[115.848799,30.828397],[115.863581,30.815549],[115.851262,30.756938],[115.782893,30.751795],[115.762567,30.685426],[115.81369,30.637035],[115.819234,30.597893],[115.848799,30.602014],[115.876516,30.582438],[115.887603,30.542758],[115.910393,30.519046],[115.894994,30.452517],[115.921479,30.416397],[115.885139,30.379747],[115.91532,30.337919],[115.903001,30.31364],[115.985537,30.290905],[115.997856,30.252657],[116.065609,30.204569],[116.055754,30.180774],[116.088399,30.110391],[116.078544,30.062233],[116.091479,30.036331],[116.073616,29.969993],[116.128435,29.897904],[116.13521,29.819532],[116.172783,29.828358],[116.227601,29.816936],[116.250391,29.785777],[116.280572,29.788893],[116.342782,29.835626],[116.467818,29.896347],[116.525716,29.897385],[116.552201,29.909836],[116.585462,30.045657],[116.620571,30.073109],[116.666766,30.076734],[116.720353,30.053945],[116.747454,30.057053],[116.783794,30.030632],[116.802889,29.99643],[116.830606,30.004723],[116.83307,29.95755],[116.868794,29.980361],[116.900207,29.949253],[116.882961,29.893753],[116.780715,29.792529],[116.762237,29.802396],[116.673541,29.709916],[116.698795,29.707836],[116.70557,29.69692],[116.706802,29.6964],[116.704954,29.688602],[116.680317,29.681323],[116.651983,29.637118],[116.716657,29.590813],[116.721585,29.564789],[116.760389,29.599139],[116.780715,29.569994],[116.849084,29.57624],[116.873722,29.609546],[116.939627,29.648561],[116.974736,29.657403],[116.996294,29.683403],[117.041873,29.680803],[117.112706,29.711995],[117.108395,29.75201],[117.136728,29.775388],[117.123177,29.798761],[117.073286,29.831992],[117.127489,29.86158],[117.129952,29.89946],[117.171836,29.920729],[117.2168,29.926953],[117.246365,29.915023],[117.261763,29.880781],[117.25314,29.834588],[117.29256,29.822647],[117.338756,29.848085],[117.359082,29.812782],[117.382487,29.840818],[117.415132,29.85068],[117.408973,29.802396],[117.455168,29.749412],[117.453936,29.688082],[117.490277,29.660003],[117.530313,29.654282],[117.523538,29.630356],[117.543248,29.588731],[117.608537,29.591333],[117.647957,29.614749],[117.678754,29.595496],[117.690457,29.555939],[117.729877,29.550213],[117.795167,29.570515],[117.872775,29.54761],[117.933753,29.549172],[118.00397,29.578322],[118.042774,29.566351],[118.050782,29.542924],[118.095129,29.534072],[118.143788,29.489803],[118.127774,29.47209],[118.136397,29.418932],[118.193064,29.395472],[118.248498,29.431443],[118.316252,29.422581],[118.306396,29.479384],[118.329802,29.495012],[118.347664,29.474174],[118.381541,29.504909],[118.496106,29.519492],[118.500417,29.57572],[118.532446,29.588731],[118.573714,29.638159],[118.61991,29.654282],[118.647011,29.64336],[118.700598,29.706277],[118.744945,29.73902],[118.740634,29.814859],[118.841032,29.891159],[118.838568,29.934733],[118.894619,29.937845],[118.902626,30.029078],[118.878604,30.064822],[118.873677,30.11505],[118.895234,30.148694],[118.852119,30.149729],[118.852735,30.166805],[118.929727,30.2025],[118.905089,30.216464],[118.877988,30.282637],[118.880452,30.31519],[118.954365,30.360126],[118.988857,30.332237],[119.06277,30.304856],[119.091719,30.323972],[119.126828,30.304856],[119.201356,30.290905],[119.236465,30.297106],[119.246936,30.341018],[119.277117,30.341018],[119.326392,30.372002],[119.349182,30.349281],[119.402768,30.374584],[119.36766,30.38491],[119.335015,30.448389],[119.336247,30.508734],[119.326392,30.532964],[119.272189,30.510281],[119.237081,30.546881],[119.265414,30.574709],[119.238929,30.609225],[119.323312,30.630341],[119.343022,30.664322],[119.39045,30.685941],[119.408312,30.645274],[119.444652,30.650422],[119.482841,30.704467],[119.479761,30.772365],[119.527188,30.77905],[119.55429,30.825828],[119.575847,30.829939],[119.557369,30.874124],[119.563529,30.919315],[119.582007,30.932149],[119.580159,30.967051],[119.633746,31.019379],[119.629434,31.085517],[119.649144,31.104991],[119.623891,31.130096],[119.599869,31.10909],[119.532732,31.159291],[119.461283,31.156219],[119.439109,31.177214],[119.391682,31.174142],[119.360269,31.213049],[119.374435,31.258591],[119.350414,31.301043],[119.338095,31.259103],[119.294363,31.263195],[119.266646,31.250405],[119.198277,31.270357],[119.197661,31.295418],[119.158241,31.294907],[119.107118,31.250917],[119.10527,31.235055],[119.014727,31.241707],[118.984546,31.237102],[118.870597,31.242219],[118.794836,31.229426],[118.756648,31.279564],[118.726467,31.282121],[118.720924,31.322518],[118.745561,31.372606],[118.767735,31.363919],[118.824401,31.375672],[118.852119,31.393553],[118.883532,31.500261],[118.857046,31.506384],[118.865669,31.519139],[118.885995,31.519139],[118.881684,31.564023],[118.858894,31.623665],[118.802844,31.619078],[118.773894,31.682759],[118.748025,31.675629],[118.736322,31.633347],[118.643315,31.649651],[118.643315,31.671555],[118.697518,31.709747],[118.653786,31.73011],[118.641467,31.75861],[118.571866,31.746397],[118.5577,31.73011],[118.521975,31.743343],[118.533678,31.76726],[118.481939,31.778453],[118.504729,31.841516],[118.466541,31.857784],[118.472084,31.879639],[118.363679,31.930443],[118.389548,31.985281],[118.394476,32.076098],[118.433896,32.086746],[118.501033,32.121726],[118.49549,32.165304],[118.510888,32.194176],[118.643931,32.209875],[118.674728,32.250375],[118.657482,32.30148],[118.703061,32.328792],[118.685199,32.403604],[118.691359,32.472295],[118.628533,32.467751],[118.592192,32.481383],[118.608823,32.536899],[118.564475,32.562122],[118.568787,32.585825],[118.59712,32.600951],[118.632844,32.578261],[118.658714,32.594397],[118.688895,32.588346],[118.719076,32.614059],[118.719076,32.614059],[118.73509,32.58885],[118.757264,32.603976],[118.784981,32.582295],[118.820706,32.60448],[118.84288,32.56767],[118.908169,32.59238],[118.890923,32.553042],[118.92172,32.557078],[118.922336,32.557078],[118.92172,32.557078],[118.922336,32.557078],[118.975923,32.505108],[119.041212,32.515201],[119.084944,32.452602],[119.142226,32.499556],[119.168096,32.536394],[119.152697,32.557582],[119.22045,32.576748],[119.230921,32.607001],[119.208748,32.641276],[119.211827,32.708275],[119.184726,32.825529],[119.113277,32.823014],[119.054763,32.8748],[119.020886,32.955685],[118.993169,32.958196],[118.934039,32.93861],[118.892771,32.941121],[118.89585,32.957694],[118.89585,32.957694],[118.849039,32.956689],[118.846575,32.922034],[118.821322,32.920527],[118.810235,32.853687],[118.743097,32.853184],[118.743097,32.853184],[118.73817,32.772708],[118.756648,32.737477],[118.707373,32.72036],[118.642699,32.744525],[118.572482,32.719856],[118.560163,32.729926],[118.483787,32.721367],[118.450526,32.743518],[118.411106,32.715828],[118.375382,32.718849],[118.363063,32.770695],[118.334114,32.761637],[118.300237,32.783275],[118.301469,32.846145],[118.250346,32.848157],[118.2331,32.914498],[118.252194,32.936601],[118.291614,32.946143],[118.303933,32.96874],[118.26944,32.969242],[118.244803,32.998359],[118.243571,33.027967],[118.219549,33.114227],[118.217085,33.191888],[118.178281,33.217926],[118.149332,33.169348],[118.038463,33.134776],[118.037231,33.152314],[117.988572,33.180869],[117.977485,33.226437],[117.942376,33.224936],[117.939297,33.262475],[117.974405,33.279487],[117.992883,33.333005],[118.029224,33.374995],[118.016905,33.402978],[118.027376,33.455421],[118.050782,33.491863],[118.107448,33.475391],[118.117919,33.594615],[118.112376,33.617045],[118.16781,33.663381],[118.161035,33.735576],[118.117919,33.766427],[118.065564,33.76593],[118.019985,33.738562],[117.972557,33.74951],[117.901724,33.720146],[117.843826,33.736074],[117.791471,33.733585],[117.750203,33.710688],[117.72495,33.74951],[117.739732,33.758467],[117.759442,33.874318],[117.753899,33.891211],[117.715095,33.879287],[117.672595,33.934916],[117.671363,33.992494],[117.629479,34.028708],[117.612849,34.000433],[117.569117,33.985051],[117.543248,34.038627],[117.514914,34.060941],[117.435458,34.028212],[117.404045,34.03218],[117.357234,34.088205],[117.311654,34.067882],[117.277162,34.078787],[117.257452,34.065899],[117.192162,34.068873],[117.130568,34.101586],[117.123793,34.128342],[117.046801,34.151622],[117.025243,34.167469],[117.051112,34.221425],[116.969192,34.283753],[116.983359,34.348011],[116.960569,34.363821],[116.969192,34.389012],[116.909446,34.408271],[116.828142,34.389012],[116.782563,34.429993],[116.773939,34.453683],[116.722816,34.472434],[116.662454,34.472927],[116.592237,34.493646],[116.594085,34.511894],[116.490607,34.573513],[116.477057,34.614896],[116.432709,34.630163],[116.430245,34.650843],[116.374195,34.640011],[116.334159,34.620806],[116.32492,34.601104],[116.286116,34.608986],[116.247927,34.551829],[116.196804,34.575977],[116.191261,34.535561],[116.204196,34.508442],[116.178326,34.496112],[116.162312,34.459605],[116.178942,34.430487],[116.215898,34.403333],[116.213435,34.382098],[116.255934,34.376665],[116.301514,34.342082],[116.357564,34.319843],[116.372347,34.26595],[116.409303,34.273863],[116.409303,34.273863],[116.456731,34.268917],[116.516477,34.296114],[116.562056,34.285731],[116.582382,34.266444],[116.545426,34.241711],[116.542962,34.203608],[116.565752,34.16945],[116.536187,34.151127],[116.52818,34.122892],[116.576223,34.068873],[116.576223,34.068873],[116.599629,34.014324],[116.599629,34.014324]]],[[[118.865669,31.519139],[118.857046,31.506384],[118.883532,31.500261],[118.885995,31.519139],[118.865669,31.519139]]],[[[116.698795,29.707836],[116.673541,29.709916],[116.653831,29.694841],[116.680317,29.681323],[116.704954,29.688602],[116.706802,29.6964],[116.70557,29.69692],[116.698795,29.707836]]],[[[115.5088,32.468761],[115.509416,32.466741],[115.510648,32.467751],[115.510648,32.468256],[115.510648,32.468761],[115.5088,32.468761]]]]}},{"type":"Feature","properties":{"adcode":350000,"name":"\u798F\u5EFA\u7701","center":[119.306239,26.075302],"centroid":[118.006468,26.069925],"childrenNum":9,"level":"province","parent":{"adcode":100000},"subFeatureIndex":12,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[119.004872,24.970009],[118.989473,24.973807],[119.023966,25.04377],[119.016575,25.058409],[118.974691,25.024792],[118.945126,25.028588],[118.892155,25.092558],[118.974691,25.115319],[118.951901,25.15162],[118.985162,25.168954],[118.985162,25.19495],[118.942046,25.211195],[118.940198,25.21715],[118.943278,25.221482],[118.903242,25.239347],[118.900162,25.242595],[118.919256,25.248008],[118.91556,25.256668],[118.918024,25.25721],[118.956212,25.272905],[118.996864,25.266411],[118.975307,25.237723],[118.990089,25.20199],[119.055379,25.219316],[119.074473,25.211195],[119.054147,25.168412],[119.032589,25.17437],[119.028893,25.139702],[119.06585,25.102855],[119.075705,25.099604],[119.134219,25.106107],[119.107118,25.075214],[119.119436,25.012861],[119.146538,25.056782],[119.165632,25.145661],[119.137299,25.15487],[119.108349,25.193867],[119.131755,25.223106],[119.190269,25.175995],[119.231537,25.188993],[119.26911,25.159746],[119.314689,25.190076],[119.294979,25.237182],[119.331935,25.230685],[119.380595,25.250173],[119.333167,25.287516],[119.299291,25.328634],[119.247552,25.333502],[119.240776,25.316733],[119.218603,25.368115],[119.14469,25.388121],[119.151465,25.426503],[119.191501,25.424341],[119.232153,25.442176],[119.219834,25.468654],[119.256175,25.488643],[119.275269,25.476758],[119.26295,25.428124],[119.288204,25.410827],[119.353493,25.411908],[119.343638,25.472436],[119.359037,25.521592],[119.400921,25.493505],[119.45266,25.493505],[119.438493,25.412449],[119.463131,25.448661],[119.491464,25.443257],[119.48592,25.418935],[119.507478,25.396231],[119.486536,25.369737],[119.548746,25.365952],[119.578927,25.400556],[119.555521,25.429205],[119.577695,25.445959],[119.59063,25.398394],[119.582623,25.374063],[119.597405,25.334584],[119.649144,25.342697],[119.665159,25.3719],[119.656535,25.396772],[119.670086,25.435691],[119.622659,25.434069],[119.675014,25.468113],[119.682405,25.445959],[119.688564,25.441095],[119.773564,25.395691],[119.764325,25.433529],[119.804977,25.457847],[119.866571,25.455145],[119.864107,25.469734],[119.862875,25.474597],[119.811136,25.507009],[119.81668,25.532393],[119.861027,25.531313],[119.883817,25.546432],[119.831462,25.579905],[119.843165,25.597717],[119.790194,25.614447],[119.785883,25.66786],[119.700267,25.616606],[119.683637,25.592859],[119.716898,25.551292],[119.715666,25.51187],[119.680557,25.497827],[119.675014,25.475137],[119.634362,25.475137],[119.611572,25.519972],[119.616499,25.556691],[119.586934,25.59232],[119.534579,25.585303],[119.541355,25.6247],[119.478529,25.631715],[119.472986,25.662466],[119.543819,25.684581],[119.602949,25.68512],[119.602949,25.714779],[119.626354,25.723406],[119.628202,25.87212],[119.638057,25.889888],[119.69534,25.904424],[119.723673,26.011503],[119.700267,26.032477],[119.668854,26.026024],[119.654688,26.090002],[119.618963,26.11956],[119.604181,26.168985],[119.664543,26.202282],[119.676246,26.262943],[119.7711,26.285481],[119.802513,26.268846],[119.806825,26.307479],[119.845013,26.323036],[119.862875,26.307479],[119.904143,26.308552],[119.95465,26.352534],[119.946027,26.374519],[119.893672,26.355752],[119.835774,26.434019],[119.83639,26.454381],[119.788346,26.583435],[119.740303,26.610727],[119.670086,26.618218],[119.605412,26.595744],[119.577695,26.622498],[119.619579,26.649246],[119.637441,26.703256],[119.664543,26.726243],[119.711354,26.686681],[119.833926,26.690959],[119.864107,26.671174],[119.873962,26.642827],[119.908455,26.661547],[119.899216,26.693098],[119.938636,26.747088],[119.942947,26.784492],[120.052584,26.786629],[120.061824,26.768997],[119.99407,26.720363],[119.969433,26.686681],[119.972512,26.654594],[119.949107,26.624638],[119.901679,26.624638],[119.851788,26.595209],[119.828383,26.524013],[119.867187,26.509019],[119.947875,26.56042],[119.93802,26.576478],[119.967585,26.597885],[120.007621,26.595744],[120.063671,26.627848],[120.093852,26.613938],[120.1382,26.638012],[120.110483,26.692563],[120.162222,26.717691],[120.151135,26.750829],[120.106787,26.752966],[120.136352,26.797847],[120.103707,26.794642],[120.102476,26.82669],[120.073526,26.823485],[120.054432,26.863533],[120.117874,26.882751],[120.126497,26.920644],[120.130193,26.917976],[120.1807,26.920644],[120.233055,26.907837],[120.25954,26.982526],[120.279866,26.987326],[120.275554,27.027315],[120.29588,27.035845],[120.282946,27.089671],[120.391967,27.081146],[120.403054,27.10086],[120.461568,27.142407],[120.404286,27.204166],[120.401822,27.250996],[120.430155,27.258976],[120.343924,27.363199],[120.340844,27.399867],[120.273091,27.38924],[120.26262,27.432804],[120.221352,27.420055],[120.134504,27.420055],[120.136968,27.402523],[120.096316,27.390302],[120.052584,27.338747],[120.026099,27.344063],[120.008237,27.375423],[119.960194,27.365857],[119.938636,27.329709],[119.843165,27.300464],[119.768636,27.307909],[119.782187,27.330241],[119.739687,27.362668],[119.750774,27.373829],[119.711354,27.403054],[119.685485,27.438646],[119.703347,27.446613],[119.70889,27.514042],[119.690412,27.537394],[119.659615,27.540578],[119.675014,27.574534],[119.630666,27.582491],[119.626354,27.620676],[119.644217,27.663619],[119.606028,27.674749],[119.541971,27.666799],[119.501319,27.649837],[119.501935,27.610601],[119.466826,27.526249],[119.438493,27.508734],[119.416935,27.539517],[119.360269,27.524657],[119.334399,27.480067],[119.285124,27.457766],[119.26911,27.42218],[119.224146,27.416868],[119.14777,27.424836],[119.121284,27.438115],[119.129907,27.475289],[119.092335,27.466262],[119.03998,27.478475],[119.020886,27.498118],[118.983314,27.498649],[118.986393,27.47582],[118.955597,27.4498],[118.907553,27.460952],[118.869365,27.540047],[118.909401,27.568168],[118.913713,27.619616],[118.879836,27.667859],[118.873677,27.733563],[118.829329,27.847921],[118.818242,27.916689],[118.753568,27.947885],[118.730163,27.970615],[118.733858,28.027684],[118.719076,28.063601],[118.767735,28.10584],[118.802228,28.117453],[118.805923,28.154923],[118.771431,28.188687],[118.804075,28.207675],[118.802228,28.240368],[118.756032,28.252493],[118.719692,28.312047],[118.699366,28.309939],[118.674728,28.27147],[118.651322,28.277267],[118.595272,28.258292],[118.588497,28.282538],[118.493026,28.262509],[118.490562,28.238259],[118.444367,28.253548],[118.433896,28.288335],[118.424041,28.291497],[118.314404,28.221913],[118.339041,28.193962],[118.375382,28.186577],[118.361215,28.155978],[118.356288,28.091586],[118.242339,28.075746],[118.199839,28.049869],[118.153644,28.062016],[118.120999,28.041946],[118.129006,28.017118],[118.094513,28.003909],[118.096977,27.970615],[117.999043,27.991227],[117.965166,27.962687],[117.942992,27.974315],[117.910963,27.949471],[117.856145,27.94577],[117.78716,27.896063],[117.788392,27.855858],[117.740348,27.800286],[117.704624,27.834162],[117.68245,27.823577],[117.649805,27.851625],[117.609769,27.863265],[117.556182,27.966387],[117.52169,27.982243],[117.477958,27.930966],[117.453936,27.939955],[117.407741,27.893948],[117.366473,27.88231],[117.341836,27.855858],[117.334444,27.8876],[117.280242,27.871201],[117.276546,27.847921],[117.303031,27.833103],[117.296256,27.764282],[117.245133,27.71926],[117.205097,27.714492],[117.204481,27.683759],[117.174916,27.677399],[117.114554,27.692238],[117.096076,27.667329],[117.11209,27.645596],[117.094228,27.627569],[117.065279,27.665739],[117.040641,27.669979],[117.003685,27.625449],[117.024627,27.592569],[117.01662,27.563393],[117.054808,27.5427],[117.076982,27.566046],[117.103467,27.533149],[117.110242,27.458828],[117.133032,27.42218],[117.107163,27.393491],[117.104699,27.330773],[117.140423,27.322798],[117.136728,27.303123],[117.171836,27.29036],[117.149662,27.241419],[117.044953,27.146667],[117.05296,27.100327],[116.967344,27.061962],[116.936547,27.019319],[116.910062,27.034779],[116.851548,27.009188],[116.817671,27.018252],[116.679085,26.978259],[116.632889,26.933984],[116.602092,26.888623],[116.548506,26.84004],[116.543578,26.803723],[116.557745,26.773806],[116.515245,26.720898],[116.520172,26.684543],[116.566368,26.650315],[116.553433,26.575942],[116.539267,26.559349],[116.597165,26.512768],[116.610716,26.476882],[116.638433,26.477418],[116.608252,26.429732],[116.601476,26.372911],[116.553433,26.365404],[116.553433,26.400253],[116.519557,26.410437],[116.499846,26.361651],[116.459194,26.345026],[116.437021,26.308016],[116.412999,26.297822],[116.385282,26.238253],[116.400064,26.202819],[116.392057,26.171133],[116.435789,26.159854],[116.476441,26.172745],[116.489375,26.113649],[116.384666,26.030864],[116.360028,25.991601],[116.369883,25.963088],[116.326152,25.956631],[116.303362,25.924341],[116.258398,25.902809],[116.225138,25.908731],[116.17771,25.894195],[116.132131,25.860273],[116.131515,25.824185],[116.18079,25.778926],[116.129667,25.758985],[116.106877,25.701299],[116.067457,25.703995],[116.068689,25.646282],[116.041588,25.62416],[116.063145,25.56317],[116.040356,25.548052],[116.03666,25.514571],[116.005247,25.490264],[116.023109,25.435691],[115.992928,25.374063],[116.008327,25.319437],[115.987385,25.290221],[115.949813,25.292386],[115.930719,25.236099],[115.855574,25.20957],[115.860501,25.165704],[115.888219,25.128866],[115.880212,25.092016],[115.908545,25.084428],[115.928255,25.050276],[115.873436,25.019911],[115.925175,24.960786],[115.870356,24.959701],[115.89253,24.936911],[115.907929,24.923343],[115.985537,24.899461],[116.015102,24.905975],[116.068073,24.850053],[116.153073,24.846795],[116.191877,24.877203],[116.221442,24.829959],[116.251007,24.82507],[116.244232,24.793563],[116.297202,24.801712],[116.345862,24.828872],[116.363724,24.87123],[116.395137,24.877746],[116.417927,24.840821],[116.381586,24.82507],[116.375427,24.803885],[116.419158,24.767482],[116.416079,24.744113],[116.44626,24.714216],[116.485064,24.720196],[116.517709,24.652225],[116.506622,24.621218],[116.530027,24.604895],[116.570679,24.621762],[116.600861,24.654401],[116.623034,24.64189],[116.667382,24.658752],[116.777635,24.679418],[116.815207,24.654944],[116.761005,24.583128],[116.759157,24.545572],[116.796729,24.502014],[116.83307,24.496568],[116.860787,24.460075],[116.839229,24.442097],[116.903903,24.369614],[116.895895,24.350533],[116.919301,24.321087],[116.914374,24.287817],[116.938395,24.28127],[116.933468,24.220157],[116.956257,24.216883],[116.998757,24.179217],[116.9347,24.126794],[116.930388,24.064514],[116.953178,24.008218],[116.981511,23.999471],[116.976583,23.931659],[116.955642,23.922359],[116.981511,23.855602],[117.012308,23.855054],[117.019083,23.801952],[117.048032,23.758687],[117.055424,23.694038],[117.123793,23.647448],[117.147199,23.654027],[117.192778,23.629356],[117.192778,23.5619],[117.291328,23.571225],[117.302415,23.550379],[117.387415,23.555317],[117.463791,23.584937],[117.454552,23.628259],[117.493357,23.642514],[117.501364,23.70445],[117.54448,23.715956],[117.601762,23.70171],[117.660276,23.789357],[117.651653,23.815093],[117.671979,23.878041],[117.691073,23.888985],[117.762522,23.886796],[117.792703,23.906494],[117.807486,23.947521],[117.864768,24.004938],[117.910347,24.012045],[117.927594,24.039922],[117.936217,24.100029],[118.000275,24.152462],[118.019369,24.197232],[118.074803,24.225615],[118.115455,24.229435],[118.158571,24.269814],[118.112376,24.357075],[118.081579,24.35653],[118.088354,24.408858],[118.048934,24.418122],[118.084042,24.528695],[118.121615,24.570067],[118.150564,24.583673],[118.169042,24.559725],[118.242955,24.51236],[118.375382,24.536317],[118.363679,24.567889],[118.444367,24.614689],[118.512736,24.60816],[118.557084,24.572788],[118.558316,24.51236],[118.614366,24.521617],[118.680272,24.58204],[118.687047,24.63373],[118.661178,24.622306],[118.652554,24.653857],[118.670417,24.679962],[118.703677,24.665278],[118.778822,24.743569],[118.786213,24.77672],[118.650707,24.808774],[118.647627,24.843536],[118.702445,24.865258],[118.69875,24.848967],[118.748641,24.84245],[118.807771,24.870687],[118.834256,24.854397],[118.864437,24.887518],[118.933423,24.870687],[118.988857,24.878831],[118.987009,24.898375],[118.932807,24.906518],[118.91864,24.932569],[118.945741,24.954275],[119.014111,24.941252],[119.032589,24.961328],[119.032589,24.961871],[119.007335,24.963499],[119.004872,24.970009]]],[[[118.412338,24.514538],[118.374766,24.458986],[118.318715,24.486765],[118.298389,24.477506],[118.31194,24.424661],[118.282375,24.413218],[118.329802,24.382152],[118.353208,24.415398],[118.405563,24.427931],[118.457918,24.412128],[118.477012,24.437738],[118.451758,24.506915],[118.412338,24.514538]]],[[[119.471138,25.197116],[119.507478,25.183036],[119.52534,25.157579],[119.549362,25.161912],[119.566608,25.210112],[119.540739,25.20199],[119.501319,25.21715],[119.473601,25.259916],[119.44342,25.238806],[119.444036,25.20199],[119.471138,25.197116]]],[[[119.580159,25.627398],[119.611572,25.669479],[119.580775,25.650059],[119.580159,25.627398]]],[[[119.976824,26.191005],[120.016244,26.217316],[119.998998,26.235569],[119.970665,26.217852],[119.976824,26.191005]]],[[[118.230636,24.401228],[118.273752,24.441007],[118.233716,24.445911],[118.230636,24.401228]]],[[[119.906607,26.68989],[119.926933,26.664756],[119.950954,26.692563],[119.906607,26.68989]]],[[[118.204151,24.504737],[118.191832,24.536861],[118.14502,24.560814],[118.093281,24.540672],[118.068644,24.463344],[118.084042,24.435559],[118.143173,24.420847],[118.19368,24.463344],[118.204151,24.504737]]],[[[119.929397,26.134067],[119.960194,26.146961],[119.919542,26.172208],[119.929397,26.134067]]],[[[119.642985,26.129231],[119.665159,26.155556],[119.62697,26.173282],[119.606028,26.15287],[119.642985,26.129231]]],[[[120.034106,26.488667],[120.066751,26.498308],[120.071679,26.521336],[120.035954,26.515981],[120.034106,26.488667]]],[[[119.662079,25.646822],[119.673782,25.632794],[119.718745,25.634952],[119.716898,25.664624],[119.662079,25.646822]]],[[[119.760629,26.613402],[119.776644,26.600025],[119.818527,26.616613],[119.796354,26.630523],[119.760629,26.613402]]],[[[120.135736,26.550784],[120.167149,26.571661],[120.153598,26.604841],[120.117874,26.568984],[120.135736,26.550784]]],[[[120.360554,26.916909],[120.394431,26.933984],[120.363018,26.967592],[120.327909,26.963858],[120.319286,26.944654],[120.360554,26.916909]]],[[[120.150519,26.798916],[120.140048,26.795176],[120.163454,26.798381],[120.161606,26.803189],[120.150519,26.798916]]],[[[119.668238,26.628383],[119.720593,26.635873],[119.758781,26.659408],[119.748926,26.681334],[119.712586,26.6685],[119.673782,26.680799],[119.651608,26.657269],[119.668238,26.628383]]]]}},{"type":"Feature","properties":{"adcode":360000,"name":"\u6C5F\u897F\u7701","center":[115.892151,28.676493],"centroid":[115.732975,27.636112],"childrenNum":11,"level":"province","parent":{"adcode":100000},"subFeatureIndex":13,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[118.193064,29.395472],[118.136397,29.418932],[118.127774,29.47209],[118.143788,29.489803],[118.095129,29.534072],[118.050782,29.542924],[118.042774,29.566351],[118.00397,29.578322],[117.933753,29.549172],[117.872775,29.54761],[117.795167,29.570515],[117.729877,29.550213],[117.690457,29.555939],[117.678754,29.595496],[117.647957,29.614749],[117.608537,29.591333],[117.543248,29.588731],[117.523538,29.630356],[117.530313,29.654282],[117.490277,29.660003],[117.453936,29.688082],[117.455168,29.749412],[117.408973,29.802396],[117.415132,29.85068],[117.382487,29.840818],[117.359082,29.812782],[117.338756,29.848085],[117.29256,29.822647],[117.25314,29.834588],[117.261763,29.880781],[117.246365,29.915023],[117.2168,29.926953],[117.171836,29.920729],[117.129952,29.89946],[117.127489,29.86158],[117.073286,29.831992],[117.123177,29.798761],[117.136728,29.775388],[117.108395,29.75201],[117.112706,29.711995],[117.041873,29.680803],[116.996294,29.683403],[116.974736,29.657403],[116.939627,29.648561],[116.873722,29.609546],[116.849084,29.57624],[116.780715,29.569994],[116.760389,29.599139],[116.721585,29.564789],[116.716657,29.590813],[116.651983,29.637118],[116.680317,29.681323],[116.653831,29.694841],[116.673541,29.709916],[116.762237,29.802396],[116.780715,29.792529],[116.882961,29.893753],[116.900207,29.949253],[116.868794,29.980361],[116.83307,29.95755],[116.830606,30.004723],[116.802889,29.99643],[116.783794,30.030632],[116.747454,30.057053],[116.720353,30.053945],[116.666766,30.076734],[116.620571,30.073109],[116.585462,30.045657],[116.552201,29.909836],[116.525716,29.897385],[116.467818,29.896347],[116.342782,29.835626],[116.280572,29.788893],[116.250391,29.785777],[116.227601,29.816936],[116.172783,29.828358],[116.13521,29.819532],[116.087167,29.795125],[116.049595,29.761881],[115.965827,29.724469],[115.909777,29.723949],[115.837096,29.748373],[115.762567,29.793048],[115.706517,29.837703],[115.667712,29.850161],[115.611662,29.841337],[115.51188,29.840299],[115.479235,29.811224],[115.470612,29.739539],[115.412714,29.688602],[115.355431,29.649602],[115.304924,29.637118],[115.28583,29.618391],[115.250722,29.660003],[115.176809,29.654803],[115.113367,29.684963],[115.117679,29.655843],[115.143548,29.645961],[115.120142,29.597578],[115.157099,29.584568],[115.154019,29.510117],[115.086266,29.525741],[115.087498,29.560104],[115.033295,29.546568],[115.00065,29.572076],[114.947679,29.542924],[114.966773,29.522096],[114.940288,29.493971],[114.900868,29.505951],[114.860216,29.476258],[114.888549,29.436134],[114.918114,29.454374],[114.90518,29.473132],[114.935977,29.486678],[114.947063,29.465317],[114.931049,29.422581],[114.895325,29.397557],[114.866375,29.404335],[114.812173,29.383478],[114.784455,29.386086],[114.759818,29.363139],[114.740724,29.386607],[114.67297,29.395993],[114.621847,29.379828],[114.589819,29.352707],[114.519602,29.325578],[114.466015,29.324013],[114.440145,29.341752],[114.376088,29.322969],[114.341595,29.327665],[114.307102,29.365225],[114.259059,29.343839],[114.252284,29.23475],[114.169748,29.216993],[114.063191,29.204978],[114.034857,29.152204],[113.98743,29.126068],[113.952321,29.092604],[113.94185,29.047097],[113.961561,28.999476],[113.955401,28.978536],[113.973879,28.937692],[114.008988,28.955498],[114.005292,28.917788],[114.028082,28.891069],[114.060111,28.902596],[114.056415,28.872204],[114.076741,28.834464],[114.124784,28.843376],[114.153734,28.829221],[114.137719,28.779926],[114.157429,28.761566],[114.122321,28.623497],[114.132176,28.607211],[114.08598,28.558337],[114.138335,28.533629],[114.15435,28.507337],[114.218407,28.48472],[114.217175,28.466308],[114.172212,28.432632],[114.214712,28.403157],[114.252284,28.395787],[114.2529,28.319423],[114.198081,28.29097],[114.182067,28.249858],[114.143879,28.246694],[114.109386,28.205038],[114.107538,28.182885],[114.068734,28.171806],[114.012068,28.174972],[113.992357,28.161255],[114.025002,28.080499],[114.047176,28.057263],[114.025618,28.031382],[113.970184,28.041418],[113.966488,28.017646],[113.936307,28.018703],[113.914133,27.991227],[113.864242,28.004966],[113.845148,27.971672],[113.822974,27.982243],[113.752141,27.93361],[113.72812,27.874904],[113.756453,27.860091],[113.763228,27.799228],[113.69917,27.740979],[113.696707,27.71979],[113.652359,27.663619],[113.607395,27.625449],[113.608627,27.585143],[113.579062,27.545354],[113.583374,27.524657],[113.627105,27.49971],[113.591381,27.467855],[113.59754,27.428554],[113.632033,27.40518],[113.605548,27.38924],[113.616635,27.345658],[113.657902,27.347253],[113.699786,27.331836],[113.72812,27.350442],[113.872865,27.384988],[113.872865,27.346721],[113.854387,27.30525],[113.872865,27.289828],[113.846996,27.222262],[113.779242,27.137081],[113.771851,27.096598],[113.803264,27.099261],[113.824206,27.036378],[113.86301,27.018252],[113.892575,26.964925],[113.927068,26.948922],[113.890112,26.895562],[113.877177,26.859262],[113.835909,26.806394],[113.853771,26.769532],[113.860546,26.664221],[113.912901,26.613938],[113.996669,26.615543],[114.019459,26.587182],[114.10877,26.56952],[114.07243,26.480096],[114.110002,26.482775],[114.090292,26.455988],[114.085364,26.406149],[114.062575,26.406149],[114.030546,26.376664],[114.047792,26.337518],[114.021307,26.288701],[114.029314,26.266163],[113.978807,26.237716],[113.972647,26.20604],[113.949242,26.192616],[113.962792,26.150722],[114.013299,26.184023],[114.088444,26.168448],[114.102611,26.187783],[114.181451,26.214631],[114.216559,26.203355],[114.237501,26.152333],[114.188842,26.121172],[114.10569,26.097526],[114.121089,26.085702],[114.087828,26.06635],[114.044096,26.076564],[114.008372,26.015806],[114.028082,25.98138],[114.028082,25.893119],[113.971416,25.836036],[113.961561,25.77731],[113.920293,25.741197],[113.913517,25.701299],[113.957249,25.611749],[113.983118,25.599336],[113.986198,25.529153],[113.962792,25.528072],[113.94493,25.441635],[114.003444,25.442716],[113.983118,25.415152],[114.050256,25.36433],[114.029314,25.328093],[114.017611,25.273987],[114.039785,25.250714],[114.055799,25.277775],[114.083517,25.275611],[114.115545,25.302125],[114.190074,25.316733],[114.204857,25.29942],[114.260291,25.291845],[114.2954,25.299961],[114.31511,25.33837],[114.382863,25.317274],[114.43029,25.343779],[114.438914,25.376226],[114.477718,25.37136],[114.541159,25.416773],[114.599674,25.385959],[114.63663,25.324306],[114.714238,25.315651],[114.743188,25.274528],[114.73518,25.225813],[114.693912,25.213902],[114.685905,25.173287],[114.73518,25.155954],[114.735796,25.121822],[114.664963,25.10123],[114.640326,25.074129],[114.604601,25.083886],[114.561485,25.077382],[114.532536,25.022623],[114.506051,24.999844],[114.45616,24.99659],[114.454928,24.977062],[114.395798,24.951019],[114.403189,24.877746],[114.378551,24.861457],[114.342211,24.807145],[114.336052,24.749004],[114.281849,24.724001],[114.27261,24.700624],[114.169132,24.689749],[114.19069,24.656576],[114.258443,24.641346],[114.289856,24.619042],[114.300943,24.578775],[114.363769,24.582584],[114.391486,24.563535],[114.403189,24.497657],[114.429058,24.48622],[114.534384,24.559181],[114.589819,24.537406],[114.627391,24.576598],[114.664963,24.583673],[114.704999,24.525973],[114.73826,24.565168],[114.729637,24.608704],[114.781376,24.613057],[114.827571,24.588026],[114.846665,24.602719],[114.868839,24.562446],[114.893477,24.582584],[114.909491,24.661471],[114.940288,24.650049],[115.00373,24.679418],[115.024672,24.669085],[115.057317,24.703343],[115.083802,24.699537],[115.104744,24.667997],[115.1842,24.711498],[115.258729,24.728894],[115.269816,24.749548],[115.306772,24.758787],[115.358511,24.735416],[115.372678,24.774546],[115.412714,24.79302],[115.476771,24.762591],[115.522967,24.702799],[115.555611,24.683768],[115.569778,24.622306],[115.605503,24.62557],[115.671408,24.604895],[115.68927,24.545027],[115.752712,24.546116],[115.785357,24.567345],[115.843871,24.562446],[115.840791,24.584217],[115.797676,24.628834],[115.780429,24.663103],[115.801371,24.705517],[115.769342,24.708236],[115.756408,24.749004],[115.776734,24.774546],[115.764415,24.791933],[115.790284,24.856027],[115.807531,24.862543],[115.824161,24.909232],[115.863581,24.891318],[115.861733,24.863629],[115.907313,24.879917],[115.885139,24.898918],[115.89253,24.936911],[115.870356,24.959701],[115.925175,24.960786],[115.873436,25.019911],[115.928255,25.050276],[115.908545,25.084428],[115.880212,25.092016],[115.888219,25.128866],[115.860501,25.165704],[115.855574,25.20957],[115.930719,25.236099],[115.949813,25.292386],[115.987385,25.290221],[116.008327,25.319437],[115.992928,25.374063],[116.023109,25.435691],[116.005247,25.490264],[116.03666,25.514571],[116.040356,25.548052],[116.063145,25.56317],[116.041588,25.62416],[116.068689,25.646282],[116.067457,25.703995],[116.106877,25.701299],[116.129667,25.758985],[116.18079,25.778926],[116.131515,25.824185],[116.132131,25.860273],[116.17771,25.894195],[116.225138,25.908731],[116.258398,25.902809],[116.303362,25.924341],[116.326152,25.956631],[116.369883,25.963088],[116.360028,25.991601],[116.384666,26.030864],[116.489375,26.113649],[116.476441,26.172745],[116.435789,26.159854],[116.392057,26.171133],[116.400064,26.202819],[116.385282,26.238253],[116.412999,26.297822],[116.437021,26.308016],[116.459194,26.345026],[116.499846,26.361651],[116.519557,26.410437],[116.553433,26.400253],[116.553433,26.365404],[116.601476,26.372911],[116.608252,26.429732],[116.638433,26.477418],[116.610716,26.476882],[116.597165,26.512768],[116.539267,26.559349],[116.553433,26.575942],[116.566368,26.650315],[116.520172,26.684543],[116.515245,26.720898],[116.557745,26.773806],[116.543578,26.803723],[116.548506,26.84004],[116.602092,26.888623],[116.632889,26.933984],[116.679085,26.978259],[116.817671,27.018252],[116.851548,27.009188],[116.910062,27.034779],[116.936547,27.019319],[116.967344,27.061962],[117.05296,27.100327],[117.044953,27.146667],[117.149662,27.241419],[117.171836,27.29036],[117.136728,27.303123],[117.140423,27.322798],[117.104699,27.330773],[117.107163,27.393491],[117.133032,27.42218],[117.110242,27.458828],[117.103467,27.533149],[117.076982,27.566046],[117.054808,27.5427],[117.01662,27.563393],[117.024627,27.592569],[117.003685,27.625449],[117.040641,27.669979],[117.065279,27.665739],[117.094228,27.627569],[117.11209,27.645596],[117.096076,27.667329],[117.114554,27.692238],[117.174916,27.677399],[117.204481,27.683759],[117.205097,27.714492],[117.245133,27.71926],[117.296256,27.764282],[117.303031,27.833103],[117.276546,27.847921],[117.280242,27.871201],[117.334444,27.8876],[117.341836,27.855858],[117.366473,27.88231],[117.407741,27.893948],[117.453936,27.939955],[117.477958,27.930966],[117.52169,27.982243],[117.556182,27.966387],[117.609769,27.863265],[117.649805,27.851625],[117.68245,27.823577],[117.704624,27.834162],[117.740348,27.800286],[117.788392,27.855858],[117.78716,27.896063],[117.856145,27.94577],[117.910963,27.949471],[117.942992,27.974315],[117.965166,27.962687],[117.999043,27.991227],[118.096977,27.970615],[118.094513,28.003909],[118.129006,28.017118],[118.120999,28.041946],[118.153644,28.062016],[118.199839,28.049869],[118.242339,28.075746],[118.356288,28.091586],[118.361215,28.155978],[118.375382,28.186577],[118.339041,28.193962],[118.314404,28.221913],[118.424041,28.291497],[118.433896,28.288335],[118.480091,28.327325],[118.455454,28.384204],[118.432048,28.402104],[118.456686,28.424738],[118.474548,28.478934],[118.414802,28.497344],[118.4302,28.515225],[118.412338,28.55676],[118.428352,28.617193],[118.428352,28.617193],[118.428352,28.681267],[118.403099,28.702791],[118.364295,28.813491],[118.300237,28.826075],[118.270056,28.918836],[118.195527,28.904167],[118.227556,28.942406],[118.165346,28.986912],[118.133933,28.983771],[118.115455,29.009944],[118.115455,29.009944],[118.097593,28.998952],[118.066796,29.053898],[118.076035,29.074822],[118.037847,29.102017],[118.045238,29.149068],[118.027992,29.167882],[118.042159,29.210202],[118.073571,29.216993],[118.077883,29.290614],[118.138861,29.283828],[118.178281,29.297921],[118.166578,29.314099],[118.205382,29.343839],[118.193064,29.395472]]]]}},{"type":"Feature","properties":{"adcode":370000,"name":"\u5C71\u4E1C\u7701","center":[117.000923,36.675807],"centroid":[118.187759,36.376092],"childrenNum":16,"level":"province","parent":{"adcode":100000},"subFeatureIndex":14,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[116.374195,34.640011],[116.392057,34.710391],[116.363724,34.715311],[116.369267,34.749247],[116.403144,34.756131],[116.408071,34.850972],[116.445028,34.895652],[116.557745,34.908905],[116.613795,34.922645],[116.622418,34.939818],[116.677853,34.939327],[116.781331,34.916757],[116.789338,34.975133],[116.815823,34.965324],[116.821983,34.929515],[116.858323,34.928533],[116.922381,34.894671],[116.929156,34.843114],[116.966113,34.844588],[116.979047,34.815113],[116.95133,34.81069],[116.969192,34.771864],[117.022163,34.759081],[117.070206,34.713835],[117.061583,34.675947],[117.073286,34.639026],[117.104083,34.648874],[117.15151,34.559222],[117.139191,34.526687],[117.166293,34.434435],[117.248213,34.451216],[117.252524,34.48674],[117.27285,34.499565],[117.267923,34.532603],[117.303647,34.542463],[117.27285,34.556757],[117.311654,34.561686],[117.311654,34.561686],[117.32151,34.566614],[117.32151,34.566614],[117.325205,34.573021],[117.325205,34.573021],[117.370785,34.584846],[117.402813,34.569571],[117.402813,34.550843],[117.465023,34.484767],[117.53832,34.467006],[117.592523,34.462566],[117.609769,34.490686],[117.659044,34.501044],[117.684298,34.547392],[117.801942,34.518798],[117.791471,34.583368],[117.793935,34.651827],[117.902956,34.644443],[117.909732,34.670533],[117.951615,34.678408],[118.053861,34.650843],[118.084042,34.655766],[118.114839,34.614404],[118.079115,34.569571],[118.185056,34.543942],[118.16473,34.50499],[118.132702,34.483287],[118.177665,34.45319],[118.179513,34.379628],[118.217701,34.379134],[118.220165,34.405802],[118.277447,34.404814],[118.290382,34.424563],[118.379693,34.415183],[118.404947,34.427525],[118.416034,34.473914],[118.439439,34.507949],[118.424657,34.595193],[118.439439,34.626223],[118.473932,34.623269],[118.460997,34.656258],[118.545997,34.705964],[118.601431,34.714327],[118.607591,34.694155],[118.664257,34.693663],[118.690127,34.678408],[118.739402,34.693663],[118.783749,34.723181],[118.764039,34.740396],[118.719076,34.745313],[118.739402,34.792508],[118.772047,34.794474],[118.80038,34.843114],[118.805307,34.87307],[118.860742,34.944233],[118.86259,35.025626],[118.928495,35.051106],[118.942662,35.040817],[119.027045,35.055516],[119.114509,35.055026],[119.137915,35.096167],[119.217371,35.106939],[119.250016,35.124562],[119.286972,35.115261],[119.306066,35.076578],[119.354109,35.080007],[119.373819,35.078538],[119.428022,35.121136],[119.397841,35.137777],[119.411392,35.231689],[119.450812,35.285443],[119.493312,35.318655],[119.538275,35.296678],[119.543819,35.347949],[119.590014,35.37284],[119.579543,35.406504],[119.618963,35.459655],[119.663311,35.562931],[119.662079,35.589215],[119.718129,35.615492],[119.75139,35.617924],[119.772332,35.578995],[119.780339,35.584835],[119.792658,35.615492],[119.824071,35.646136],[119.83023,35.620357],[119.868419,35.60868],[119.925085,35.637382],[119.91215,35.660725],[119.950339,35.729741],[119.920157,35.739943],[119.926317,35.759856],[119.958346,35.760342],[120.01378,35.714193],[120.049505,35.786562],[120.032258,35.812288],[120.064287,35.873414],[120.112331,35.885052],[120.125265,35.906868],[120.152983,35.907353],[120.207801,35.947575],[120.169613,35.888446],[120.202258,35.89184],[120.209033,35.917531],[120.265699,35.966468],[120.30512,35.971796],[120.316206,36.002304],[120.289721,36.017311],[120.285409,36.01247],[120.249069,35.992136],[120.257076,36.025055],[120.198562,35.995525],[120.234902,36.030863],[120.239214,36.062316],[120.181316,36.066669],[120.152367,36.095206],[120.116642,36.102943],[120.108635,36.127599],[120.142512,36.143549],[120.140664,36.173507],[120.181316,36.203936],[120.22012,36.209248],[120.224432,36.19138],[120.260772,36.198624],[120.263236,36.182202],[120.310047,36.185101],[120.297112,36.225664],[120.319902,36.232423],[120.362402,36.196209],[120.35809,36.174956],[120.286025,36.047317],[120.337764,36.055058],[120.429539,36.056994],[120.468959,36.087952],[120.546568,36.091821],[120.546568,36.107778],[120.593995,36.100525],[120.615553,36.120348],[120.64327,36.114547],[120.672835,36.130016],[120.712255,36.126632],[120.696857,36.15563],[120.696857,36.203936],[120.680843,36.238698],[120.686386,36.279234],[120.657437,36.276339],[120.66298,36.331803],[120.744284,36.327946],[120.694393,36.390118],[120.759683,36.46283],[120.828668,36.46668],[120.837291,36.459942],[120.858849,36.424797],[120.848994,36.403124],[120.871784,36.36699],[120.911204,36.412276],[120.917979,36.417573],[120.90874,36.450315],[120.938305,36.447908],[120.965407,36.466199],[120.95432,36.507578],[120.983269,36.546051],[120.962327,36.562877],[120.909972,36.568645],[120.884718,36.601323],[120.847146,36.618617],[120.882255,36.627262],[120.926602,36.611892],[120.955551,36.575855],[121.028848,36.572971],[121.078123,36.607568],[121.161275,36.651273],[121.251818,36.671436],[121.29863,36.702151],[121.31218,36.702151],[121.35776,36.713186],[121.400876,36.701191],[121.3941,36.738129],[121.454462,36.752515],[121.496962,36.795179],[121.506817,36.803805],[121.565331,36.830635],[121.548701,36.807638],[121.485259,36.786073],[121.532071,36.73621],[121.575186,36.740047],[121.556092,36.764502],[121.651563,36.723739],[121.631853,36.80093],[121.6762,36.819137],[121.726092,36.826323],[121.762432,36.84644],[121.767975,36.874691],[121.927504,36.932597],[121.965076,36.938337],[122.008808,36.96225],[122.042684,36.871819],[122.051923,36.904846],[122.093191,36.913938],[122.115981,36.94025],[122.124604,36.944077],[122.141235,36.938337],[122.119677,36.891924],[122.175727,36.894317],[122.188662,36.866073],[122.174495,36.842609],[122.220691,36.848835],[122.275509,36.83734],[122.280437,36.835904],[122.344495,36.828239],[122.378371,36.844525],[122.383915,36.865595],[122.415944,36.85937],[122.454748,36.879],[122.452284,36.88618],[122.434422,36.914416],[122.483081,36.913938],[122.48924,36.886659],[122.532356,36.901496],[122.55761,36.968467],[122.544675,37.004797],[122.583479,37.037289],[122.575472,37.054485],[122.494168,37.033945],[122.467067,37.037289],[122.478769,37.058784],[122.484313,37.128956],[122.533588,37.153286],[122.581015,37.147562],[122.573624,37.176178],[122.624131,37.190959],[122.592718,37.261485],[122.567465,37.25958],[122.573624,37.296247],[122.611196,37.339558],[122.607501,37.364296],[122.650616,37.388551],[122.6925,37.373809],[122.714058,37.392355],[122.701739,37.418501],[122.67587,37.413273],[122.641377,37.428482],[122.553914,37.407093],[122.4954,37.413748],[122.487393,37.43466],[122.41656,37.414699],[122.337103,37.414223],[122.281053,37.430858],[122.287212,37.445114],[122.25272,37.467917],[122.194205,37.456041],[122.166488,37.438937],[122.131996,37.49926],[122.163408,37.519199],[122.150474,37.557163],[122.08888,37.554316],[122.075329,37.540556],[122.017431,37.531065],[121.997721,37.494512],[121.923808,37.473142],[121.772903,37.466492],[121.66573,37.473617],[121.635548,37.494037],[121.575802,37.460317],[121.571491,37.441313],[121.477252,37.475992],[121.460006,37.522522],[121.400876,37.557638],[121.395948,37.589891],[121.435368,37.592737],[121.391021,37.625449],[121.349137,37.635403],[121.358376,37.597479],[121.304789,37.582778],[121.217326,37.582778],[121.17421,37.597479],[121.148956,37.626397],[121.161891,37.646302],[121.142797,37.661464],[121.160043,37.698882],[121.136022,37.723501],[121.037471,37.718767],[120.994356,37.759468],[120.943233,37.785486],[120.940769,37.819533],[120.874863,37.833241],[120.845298,37.826623],[120.839139,37.82426],[120.733197,37.833714],[120.656821,37.793054],[120.634031,37.796364],[120.590915,37.7642],[120.517619,37.750005],[120.454793,37.757576],[120.367945,37.697935],[120.227511,37.693673],[120.22012,37.671886],[120.269395,37.658622],[120.272475,37.636824],[120.215192,37.621183],[120.208417,37.588469],[120.246605,37.556689],[120.222584,37.532963],[120.144359,37.481691],[120.086461,37.465067],[120.064903,37.448915],[120.010085,37.442263],[119.949723,37.419927],[119.926933,37.386649],[119.843781,37.376662],[119.837006,37.346695],[119.883201,37.311004],[119.89244,37.263866],[119.865339,37.233854],[119.83023,37.225754],[119.808057,37.196203],[119.740303,37.133727],[119.687332,37.143746],[119.678709,37.158056],[119.576463,37.127524],[119.489616,37.134681],[119.428022,37.125616],[119.361501,37.125616],[119.327624,37.115595],[119.301138,37.139452],[119.298675,37.197156],[119.2069,37.223371],[119.190885,37.25958],[119.204436,37.280058],[119.136683,37.230995],[119.12806,37.254816],[119.091103,37.257674],[119.084328,37.239572],[119.054147,37.254816],[119.03998,37.30434],[119.001176,37.31862],[118.942662,37.497361],[118.939582,37.527268],[118.988857,37.620709],[119.023966,37.642037],[119.153313,37.655305],[119.236465,37.651988],[119.262334,37.660517],[119.280197,37.692726],[119.309146,37.805349],[119.291899,37.869627],[119.24016,37.878131],[119.212443,37.838913],[119.16132,37.81906],[119.12806,37.847892],[119.110813,37.921577],[119.001792,37.99613],[118.974075,38.094162],[118.908169,38.139362],[118.811467,38.157717],[118.703677,38.151129],[118.626069,38.138421],[118.607591,38.129006],[118.597736,38.079088],[118.552156,38.05553],[118.534294,38.063541],[118.517048,38.088509],[118.504729,38.11394],[118.44991,38.124299],[118.431432,38.106406],[118.404331,38.121003],[118.331034,38.12524],[118.217085,38.146893],[118.177665,38.186417],[118.112376,38.210403],[118.045238,38.214165],[118.018753,38.202409],[117.896797,38.279495],[117.895565,38.301572],[117.848754,38.255062],[117.808718,38.22827],[117.789007,38.180772],[117.766834,38.158658],[117.771145,38.134655],[117.746508,38.12524],[117.704624,38.076262],[117.586979,38.071551],[117.557414,38.046105],[117.557414,38.046105],[117.524154,37.989527],[117.513067,37.94329],[117.481038,37.914967],[117.438538,37.854035],[117.400966,37.844584],[117.320278,37.861596],[117.271618,37.839858],[117.185387,37.849783],[117.150278,37.839385],[117.074518,37.848837],[117.027091,37.832296],[116.919301,37.846002],[116.837997,37.835132],[116.804736,37.848837],[116.753613,37.793054],[116.753613,37.77035],[116.724664,37.744327],[116.679085,37.728708],[116.66307,37.686096],[116.604556,37.624975],[116.575607,37.610754],[116.4826,37.521573],[116.448108,37.503059],[116.433941,37.473142],[116.38097,37.522522],[116.379738,37.522047],[116.38097,37.522522],[116.379738,37.522047],[116.36742,37.566177],[116.336007,37.581355],[116.295355,37.554316],[116.278724,37.524895],[116.290427,37.484065],[116.27626,37.466967],[116.240536,37.489764],[116.240536,37.489764],[116.224522,37.479791],[116.243,37.447965],[116.226369,37.428007],[116.2855,37.404241],[116.236224,37.361442],[116.193109,37.365723],[116.169087,37.384271],[116.106261,37.368577],[116.085935,37.373809],[116.024341,37.360015],[115.975682,37.337179],[115.969523,37.239572],[115.909777,37.20669],[115.91224,37.177132],[115.879596,37.150901],[115.888219,37.112254],[115.85619,37.060694],[115.776734,36.992848],[115.79706,36.968945],[115.75764,36.902453],[115.71206,36.883308],[115.683727,36.808117],[115.524815,36.763543],[115.479851,36.760187],[115.451518,36.702151],[115.420105,36.686795],[115.365902,36.621979],[115.355431,36.627262],[115.33141,36.550378],[115.272895,36.497476],[115.291374,36.460423],[115.317243,36.454166],[115.297533,36.413239],[115.340033,36.398307],[115.368982,36.342409],[115.366518,36.30914],[115.423185,36.32216],[115.417025,36.292742],[115.462605,36.276339],[115.466916,36.258969],[115.466916,36.258969],[115.474923,36.248352],[115.483547,36.148865],[115.484163,36.125666],[115.449054,36.047317],[115.447822,36.01247],[115.362822,35.971796],[115.353583,35.938854],[115.364054,35.894264],[115.335105,35.796756],[115.363438,35.779765],[115.407786,35.80889],[115.460141,35.867594],[115.487858,35.880688],[115.495249,35.896203],[115.505104,35.899112],[115.513112,35.890385],[115.583945,35.921893],[115.648618,35.922863],[115.699125,35.966468],[115.774886,35.974702],[115.779813,35.993588],[115.817386,36.012954],[115.859886,36.003756],[115.89869,36.026507],[115.989849,36.045381],[116.057602,36.104877],[116.099486,36.112129],[116.063145,36.028927],[116.048979,35.970343],[115.984921,35.974218],[115.911624,35.960171],[115.907929,35.92674],[115.873436,35.918985],[115.882675,35.879718],[115.859886,35.857894],[115.81677,35.844312],[115.773654,35.854014],[115.73485,35.833154],[115.696046,35.788989],[115.693582,35.754028],[115.622749,35.739457],[115.52851,35.733628],[115.48601,35.710306],[115.383148,35.568772],[115.34496,35.55368],[115.356047,35.490359],[115.307388,35.480126],[115.237171,35.423087],[115.172497,35.426501],[115.126302,35.41821],[115.117679,35.400163],[115.091809,35.416259],[115.073947,35.374304],[115.04315,35.376744],[114.957534,35.261014],[114.929201,35.244886],[114.932281,35.198441],[114.861448,35.182301],[114.841738,35.15099],[114.883006,35.098615],[114.835578,35.076578],[114.818948,35.051596],[114.852209,35.041797],[114.824492,35.012393],[114.880542,35.00357],[114.923658,34.968757],[114.950759,34.989843],[115.008041,34.988372],[115.028983,34.9717],[115.075179,35.000628],[115.12815,35.00455],[115.157099,34.957968],[115.219309,34.96042],[115.205142,34.914303],[115.251953,34.906451],[115.239019,34.87798],[115.256265,34.845079],[115.317243,34.859321],[115.42688,34.805285],[115.449054,34.74433],[115.433655,34.725149],[115.461373,34.637057],[115.515575,34.582383],[115.553148,34.568586],[115.622749,34.574499],[115.685575,34.556265],[115.697278,34.594207],[115.787821,34.580905],[115.827241,34.558236],[115.838328,34.5676],[115.984305,34.589281],[115.991081,34.615389],[116.037276,34.593222],[116.101334,34.60603],[116.134594,34.559715],[116.156768,34.5538],[116.196804,34.575977],[116.247927,34.551829],[116.286116,34.608986],[116.32492,34.601104],[116.334159,34.620806],[116.374195,34.640011]]],[[[120.729502,37.947065],[120.721495,37.917328],[120.76461,37.895134],[120.76461,37.923937],[120.729502,37.947065]]],[[[120.692545,37.983867],[120.732581,37.961694],[120.724574,37.987641],[120.692545,37.983867]]],[[[120.990044,36.413239],[120.978341,36.428649],[120.950624,36.414684],[120.990044,36.413239]]],[[[120.750444,38.150188],[120.7874,38.158658],[120.742436,38.199116],[120.750444,38.150188]]],[[[120.918595,38.345236],[120.914899,38.373393],[120.895189,38.36307],[120.918595,38.345236]]],[[[120.159142,35.765198],[120.169613,35.740428],[120.193019,35.756942],[120.172077,35.785591],[120.159142,35.765198]]],[[[120.62664,37.94565],[120.631567,37.981037],[120.602002,37.978678],[120.62664,37.94565]]],[[[120.802183,38.284193],[120.848378,38.305799],[120.816349,38.318008],[120.802183,38.284193]]],[[[121.489571,37.577086],[121.489571,37.577561],[121.489571,37.578509],[121.488955,37.578035],[121.489571,37.577086]]],[[[121.485875,37.578509],[121.487723,37.578035],[121.487723,37.578509],[121.485875,37.578509]]],[[[121.487723,37.578509],[121.487723,37.577561],[121.488955,37.578035],[121.488955,37.578509],[121.488339,37.578509],[121.487723,37.578509]]],[[[115.495249,35.896203],[115.487858,35.880688],[115.513112,35.890385],[115.505104,35.899112],[115.495249,35.896203]]]]}},{"type":"Feature","properties":{"adcode":410000,"name":"\u6CB3\u5357\u7701","center":[113.665412,34.757975],"centroid":[113.619717,33.902648],"childrenNum":18,"level":"province","parent":{"adcode":100000},"subFeatureIndex":15,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[112.716747,32.357612],[112.735841,32.356095],[112.776493,32.358623],[112.860877,32.396024],[112.888594,32.37682],[112.912,32.390971],[112.992072,32.378336],[113.000695,32.41674],[113.025949,32.425328],[113.078919,32.394508],[113.107869,32.398551],[113.118956,32.375809],[113.155912,32.380863],[113.158992,32.410677],[113.211962,32.431895],[113.2366,32.407141],[113.333918,32.336377],[113.317904,32.327275],[113.353628,32.294904],[113.376418,32.298445],[113.428773,32.270618],[113.511925,32.316654],[113.624642,32.36115],[113.650511,32.412698],[113.700402,32.420782],[113.735511,32.410677],[113.76754,32.370249],[113.753989,32.328286],[113.768772,32.30148],[113.768156,32.284279],[113.758301,32.27669],[113.749061,32.272642],[113.73859,32.255942],[113.752757,32.215951],[113.782322,32.184553],[113.750293,32.11615],[113.722576,32.12426],[113.728735,32.083197],[113.791561,32.036028],[113.757685,31.98985],[113.817431,31.964467],[113.805728,31.929428],[113.832213,31.918761],[113.830981,31.87913],[113.854387,31.843042],[113.893807,31.847109],[113.914749,31.877098],[113.957865,31.852701],[113.952321,31.793714],[113.988662,31.749959],[114.017611,31.770822],[114.086596,31.782014],[114.121705,31.809482],[114.134024,31.843042],[114.191922,31.852192],[114.235654,31.833382],[114.292936,31.752503],[114.350218,31.755557],[114.403189,31.746906],[114.443841,31.728074],[114.530688,31.742834],[114.549783,31.766751],[114.586123,31.762172],[114.57134,31.660858],[114.547935,31.623665],[114.560869,31.560963],[114.572572,31.553824],[114.61692,31.585437],[114.641558,31.582378],[114.696376,31.525771],[114.778912,31.520669],[114.789383,31.480358],[114.830035,31.45892],[114.870071,31.479337],[114.884238,31.469129],[114.962462,31.494648],[114.995107,31.471171],[115.022824,31.527811],[115.096121,31.508425],[115.114599,31.530362],[115.106592,31.567592],[115.12507,31.599201],[115.16449,31.604808],[115.212533,31.555354],[115.235939,31.555354],[115.218077,31.515057],[115.211301,31.442072],[115.252569,31.421646],[115.250722,31.392021],[115.301229,31.383846],[115.338801,31.40428],[115.373909,31.405813],[115.389924,31.450241],[115.371446,31.495668],[115.415793,31.525771],[115.439815,31.588496],[115.485394,31.608885],[115.476771,31.643028],[115.495249,31.673083],[115.534054,31.698545],[115.553764,31.69549],[115.676336,31.778453],[115.731154,31.76726],[115.767495,31.78761],[115.808147,31.770313],[115.808147,31.770313],[115.851878,31.786593],[115.886371,31.776418],[115.914704,31.814567],[115.893762,31.832365],[115.894994,31.8649],[115.920248,31.920285],[115.909161,31.94314],[115.928871,32.003046],[115.922095,32.049725],[115.941805,32.166318],[115.912856,32.227596],[115.899306,32.390971],[115.865429,32.458662],[115.883291,32.487946],[115.845719,32.501575],[115.8759,32.542448],[115.910393,32.567165],[115.891298,32.576243],[115.861117,32.537403],[115.789052,32.468761],[115.771806,32.505108],[115.742241,32.476335],[115.704669,32.495013],[115.667712,32.409667],[115.657857,32.428864],[115.626445,32.40512],[115.604271,32.425833],[115.57101,32.419266],[115.522967,32.441997],[115.509416,32.466741],[115.5088,32.468761],[115.497713,32.492489],[115.409018,32.549007],[115.411482,32.575235],[115.304924,32.553042],[115.30554,32.583303],[115.267352,32.578261],[115.24333,32.593388],[115.20083,32.591876],[115.182968,32.666973],[115.179273,32.726402],[115.189744,32.770695],[115.211301,32.785791],[115.189744,32.812452],[115.197135,32.856201],[115.155867,32.864747],[115.139237,32.897917],[115.029599,32.906962],[115.035143,32.932582],[115.009273,32.940117],[114.943368,32.935094],[114.916266,32.971251],[114.883006,32.990328],[114.891629,33.020441],[114.925506,33.016928],[114.913187,33.083143],[114.897172,33.086653],[114.902716,33.129764],[114.932897,33.153817],[114.966158,33.147304],[114.990795,33.102195],[115.041302,33.086653],[115.168186,33.088658],[115.194671,33.120743],[115.245178,33.135778],[115.289526,33.131769],[115.303692,33.149809],[115.300613,33.204407],[115.340033,33.260973],[115.335105,33.297997],[115.361591,33.298497],[115.365286,33.336005],[115.341881,33.370997],[115.313547,33.376994],[115.328946,33.403477],[115.315395,33.431451],[115.324634,33.457418],[115.345576,33.449928],[115.345576,33.502842],[115.366518,33.5233],[115.394851,33.506335],[115.422569,33.557219],[115.463837,33.567193],[115.511264,33.55323],[115.564851,33.576169],[115.639995,33.585143],[115.601191,33.658898],[115.601807,33.718653],[115.563003,33.772895],[115.576553,33.787817],[115.614126,33.775879],[115.631988,33.869846],[115.547604,33.874815],[115.577785,33.950307],[115.579017,33.974133],[115.60735,34.030196],[115.642459,34.03218],[115.658473,34.061437],[115.705901,34.059949],[115.736082,34.076805],[115.768726,34.061932],[115.809378,34.062428],[115.846335,34.028708],[115.85003,34.004898],[115.877132,34.002913],[115.876516,34.028708],[115.904233,34.009859],[115.95782,34.007875],[116.00032,33.965199],[115.982457,33.917039],[116.05945,33.860902],[116.055754,33.804727],[116.074232,33.781351],[116.100102,33.782843],[116.132747,33.751501],[116.155536,33.709693],[116.230065,33.735078],[116.263326,33.730101],[116.316912,33.771402],[116.393905,33.782843],[116.408071,33.805721],[116.437021,33.801246],[116.437637,33.846489],[116.486296,33.869846],[116.558361,33.881274],[116.566984,33.9081],[116.631042,33.887733],[116.64336,33.896675],[116.641512,33.978103],[116.599629,34.014324],[116.599629,34.014324],[116.576223,34.068873],[116.576223,34.068873],[116.52818,34.122892],[116.536187,34.151127],[116.565752,34.16945],[116.542962,34.203608],[116.545426,34.241711],[116.582382,34.266444],[116.562056,34.285731],[116.516477,34.296114],[116.456731,34.268917],[116.409303,34.273863],[116.409303,34.273863],[116.372347,34.26595],[116.357564,34.319843],[116.301514,34.342082],[116.255934,34.376665],[116.213435,34.382098],[116.215898,34.403333],[116.178942,34.430487],[116.162312,34.459605],[116.178326,34.496112],[116.204196,34.508442],[116.191261,34.535561],[116.196804,34.575977],[116.156768,34.5538],[116.134594,34.559715],[116.101334,34.60603],[116.037276,34.593222],[115.991081,34.615389],[115.984305,34.589281],[115.838328,34.5676],[115.827241,34.558236],[115.787821,34.580905],[115.697278,34.594207],[115.685575,34.556265],[115.622749,34.574499],[115.553148,34.568586],[115.515575,34.582383],[115.461373,34.637057],[115.433655,34.725149],[115.449054,34.74433],[115.42688,34.805285],[115.317243,34.859321],[115.256265,34.845079],[115.239019,34.87798],[115.251953,34.906451],[115.205142,34.914303],[115.219309,34.96042],[115.157099,34.957968],[115.12815,35.00455],[115.075179,35.000628],[115.028983,34.9717],[115.008041,34.988372],[114.950759,34.989843],[114.923658,34.968757],[114.880542,35.00357],[114.824492,35.012393],[114.852209,35.041797],[114.818948,35.051596],[114.835578,35.076578],[114.883006,35.098615],[114.841738,35.15099],[114.861448,35.182301],[114.932281,35.198441],[114.929201,35.244886],[114.957534,35.261014],[115.04315,35.376744],[115.073947,35.374304],[115.091809,35.416259],[115.117679,35.400163],[115.126302,35.41821],[115.172497,35.426501],[115.237171,35.423087],[115.307388,35.480126],[115.356047,35.490359],[115.34496,35.55368],[115.383148,35.568772],[115.48601,35.710306],[115.52851,35.733628],[115.622749,35.739457],[115.693582,35.754028],[115.696046,35.788989],[115.73485,35.833154],[115.773654,35.854014],[115.81677,35.844312],[115.859886,35.857894],[115.882675,35.879718],[115.873436,35.918985],[115.907929,35.92674],[115.911624,35.960171],[115.984921,35.974218],[116.048979,35.970343],[116.063145,36.028927],[116.099486,36.112129],[116.057602,36.104877],[115.989849,36.045381],[115.89869,36.026507],[115.859886,36.003756],[115.817386,36.012954],[115.779813,35.993588],[115.774886,35.974702],[115.699125,35.966468],[115.648618,35.922863],[115.583945,35.921893],[115.513112,35.890385],[115.487858,35.880688],[115.460141,35.867594],[115.407786,35.80889],[115.363438,35.779765],[115.335105,35.796756],[115.364054,35.894264],[115.353583,35.938854],[115.362822,35.971796],[115.447822,36.01247],[115.449054,36.047317],[115.484163,36.125666],[115.483547,36.148865],[115.465068,36.170125],[115.450902,36.152248],[115.376989,36.128083],[115.365902,36.099074],[115.312931,36.088436],[115.30246,36.127599],[115.279055,36.13775],[115.242098,36.19138],[115.202678,36.208765],[115.202678,36.208765],[115.202678,36.209248],[115.202678,36.209248],[115.201446,36.210214],[115.201446,36.210214],[115.1842,36.193312],[115.12507,36.209731],[115.104744,36.172058],[115.06286,36.178338],[115.048693,36.161912],[115.04623,36.112613],[114.998186,36.069572],[114.914419,36.052155],[114.926737,36.089403],[114.912571,36.140649],[114.858368,36.144516],[114.857752,36.127599],[114.771521,36.124699],[114.734564,36.15563],[114.720398,36.140166],[114.640326,36.137266],[114.588587,36.118414],[114.586739,36.141133],[114.533152,36.171575],[114.480181,36.177855],[114.466015,36.197658],[114.417356,36.205868],[114.408117,36.224699],[114.356378,36.230492],[114.345291,36.255591],[114.299095,36.245938],[114.257827,36.263794],[114.241197,36.251247],[114.2104,36.272962],[114.203009,36.245456],[114.170364,36.245938],[114.170364,36.245938],[114.175907,36.264759],[114.129096,36.280199],[114.080437,36.269585],[114.04348,36.303353],[114.056415,36.329392],[114.002828,36.334214],[113.981887,36.31782],[113.962792,36.353977],[113.911054,36.314927],[113.882104,36.353977],[113.84946,36.347711],[113.856851,36.329392],[113.813119,36.332285],[113.755221,36.366026],[113.731199,36.363135],[113.736127,36.324571],[113.712105,36.303353],[113.716417,36.262347],[113.681924,36.216491],[113.697939,36.181719],[113.651127,36.174473],[113.705946,36.148865],[113.712721,36.129533],[113.655439,36.125182],[113.671453,36.115514],[113.68562,36.056026],[113.660366,36.034735],[113.694859,36.026991],[113.678844,35.985841],[113.648663,35.994073],[113.654207,35.931586],[113.637576,35.870019],[113.660982,35.837035],[113.582758,35.818111],[113.604932,35.797727],[113.587685,35.736542],[113.592613,35.691838],[113.622794,35.674825],[113.625258,35.632518],[113.578446,35.633491],[113.547649,35.656835],[113.55812,35.621816],[113.513773,35.57364],[113.49899,35.532254],[113.439244,35.507412],[113.391817,35.506925],[113.348085,35.468429],[113.31236,35.481101],[113.304353,35.426989],[113.243375,35.449418],[113.189789,35.44893],[113.185477,35.409431],[113.165151,35.412845],[113.149137,35.350878],[113.126347,35.332327],[113.067217,35.353806],[112.996384,35.362104],[112.985913,35.33965],[112.992072,35.29619],[112.936022,35.284466],[112.934174,35.262968],[112.884283,35.243909],[112.822073,35.258082],[112.772798,35.207732],[112.720443,35.206265],[112.628052,35.263457],[112.637291,35.225822],[112.513487,35.218489],[112.390915,35.239021],[112.36751,35.219956],[112.288053,35.219956],[112.304684,35.251728],[112.242474,35.234622],[112.21722,35.253195],[112.13838,35.271275],[112.058924,35.280069],[112.078634,35.219467],[112.03983,35.194039],[112.066315,35.153437],[112.05646,35.098615],[112.062004,35.056005],[112.039214,35.045717],[112.018888,35.068742],[111.97762,35.067272],[111.933272,35.083435],[111.810084,35.062374],[111.807005,35.032977],[111.740483,35.00455],[111.664107,34.984449],[111.681969,34.9511],[111.646861,34.938836],[111.617911,34.894671],[111.592042,34.881416],[111.570484,34.843114],[111.543999,34.853428],[111.502731,34.829851],[111.439289,34.838202],[111.389398,34.815113],[111.345666,34.831816],[111.29208,34.806759],[111.255123,34.819535],[111.232949,34.789559],[111.148566,34.807742],[111.118385,34.756623],[111.035233,34.740887],[110.976103,34.706456],[110.920052,34.730068],[110.903422,34.669056],[110.883712,34.64395],[110.824582,34.615881],[110.791937,34.649858],[110.749437,34.65232],[110.710017,34.605045],[110.610851,34.607508],[110.533242,34.583368],[110.488279,34.610956],[110.424837,34.588295],[110.379257,34.600612],[110.366939,34.566614],[110.404511,34.557743],[110.372482,34.544435],[110.360779,34.516825],[110.403279,34.433448],[110.403279,34.433448],[110.473496,34.393457],[110.503677,34.33714],[110.451938,34.292653],[110.428533,34.288203],[110.43962,34.243196],[110.507989,34.217466],[110.55172,34.213012],[110.55788,34.193214],[110.621938,34.177372],[110.642264,34.161032],[110.61393,34.113478],[110.591757,34.101586],[110.587445,34.023252],[110.620706,34.035652],[110.671213,33.966192],[110.665669,33.937895],[110.627481,33.925482],[110.628713,33.910086],[110.587445,33.887733],[110.612083,33.852453],[110.66259,33.85295],[110.712481,33.833564],[110.74143,33.798759],[110.782082,33.796272],[110.81719,33.751003],[110.831973,33.713675],[110.823966,33.685793],[110.878784,33.634486],[110.966864,33.609071],[111.00382,33.578662],[111.002588,33.535772],[111.02661,33.478386],[111.02661,33.467903],[110.996429,33.435946],[111.025994,33.375495],[111.025994,33.330504],[110.984726,33.255469],[111.046936,33.202905],[111.045704,33.169849],[111.08882,33.181871],[111.12824,33.15532],[111.146102,33.12375],[111.179363,33.115229],[111.192913,33.071609],[111.152877,33.039507],[111.221862,33.042517],[111.258819,33.006389],[111.273601,32.971753],[111.242804,32.930573],[111.255123,32.883846],[111.276065,32.903445],[111.293311,32.859217],[111.380159,32.829049],[111.41342,32.757108],[111.475629,32.760127],[111.458383,32.726402],[111.513202,32.674026],[111.530448,32.628172],[111.577875,32.593388],[111.640701,32.634724],[111.646245,32.605993],[111.713382,32.606497],[111.808853,32.536899],[111.858128,32.528826],[111.890157,32.503089],[111.948671,32.51722],[111.975772,32.471791],[112.014576,32.450077],[112.063851,32.474315],[112.081098,32.425833],[112.155626,32.377326],[112.150083,32.411688],[112.172873,32.385412],[112.206133,32.392992],[112.328089,32.321712],[112.360118,32.3657],[112.390915,32.37126],[112.448814,32.34295],[112.477147,32.380863],[112.530733,32.37682],[112.545516,32.404109],[112.589248,32.381369],[112.612037,32.386928],[112.645298,32.368227],[112.716747,32.357612]]],[[[113.768156,32.284279],[113.768772,32.30148],[113.749061,32.272642],[113.758301,32.27669],[113.768156,32.284279]]]]}},{"type":"Feature","properties":{"adcode":420000,"name":"\u6E56\u5317\u7701","center":[114.298572,30.584355],"centroid":[112.271301,30.987527],"childrenNum":17,"level":"province","parent":{"adcode":100000},"subFeatureIndex":16,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[111.045704,33.169849],[111.034001,33.177864],[111.035849,33.187881],[111.046936,33.202905],[110.984726,33.255469],[110.960704,33.253967],[110.9219,33.203907],[110.865234,33.213921],[110.828893,33.201403],[110.824582,33.158327],[110.753133,33.15031],[110.702626,33.097182],[110.650887,33.157324],[110.623785,33.143796],[110.59422,33.168346],[110.57759,33.250464],[110.54125,33.255469],[110.471032,33.171352],[110.398352,33.176862],[110.398352,33.176862],[110.372482,33.186379],[110.33799,33.160331],[110.285635,33.171352],[110.218497,33.163336],[110.164911,33.209415],[110.031252,33.191888],[109.999223,33.212419],[109.973353,33.203907],[109.916687,33.229942],[109.852013,33.247961],[109.813209,33.236449],[109.732521,33.231443],[109.693101,33.254468],[109.649985,33.251465],[109.619804,33.275484],[109.60687,33.235949],[109.514479,33.237951],[109.498464,33.207412],[109.438718,33.152314],[109.468283,33.140288],[109.522486,33.138785],[109.576073,33.110216],[109.688174,33.116733],[109.704188,33.101694],[109.794731,33.067095],[109.785492,32.987316],[109.76455,32.909474],[109.789804,32.882339],[109.847702,32.893395],[109.856941,32.910479],[109.907448,32.903947],[109.927158,32.887364],[109.988752,32.886359],[110.051578,32.851676],[110.105164,32.832569],[110.142121,32.802895],[110.127338,32.77774],[110.159367,32.767173],[110.156903,32.683093],[110.206179,32.633212],[110.153824,32.593388],[110.124259,32.616579],[110.090382,32.617083],[110.084223,32.580782],[110.017701,32.546989],[109.97089,32.577756],[109.910528,32.592884],[109.816905,32.577252],[109.746072,32.594901],[109.726978,32.608513],[109.631507,32.599943],[109.619804,32.56767],[109.637051,32.540935],[109.575457,32.506622],[109.526797,32.43341],[109.529877,32.405625],[109.502776,32.38895],[109.513247,32.342444],[109.495385,32.300468],[109.528645,32.270112],[109.550203,32.225065],[109.592703,32.219495],[109.604406,32.199241],[109.58716,32.161251],[109.621652,32.106519],[109.590855,32.047696],[109.590855,32.012688],[109.631507,31.962436],[109.62042,31.928412],[109.584696,31.900472],[109.60379,31.885737],[109.633971,31.824738],[109.633971,31.804396],[109.592087,31.789136],[109.585928,31.726546],[109.622268,31.711783],[109.683246,31.719929],[109.731289,31.700582],[109.737449,31.628761],[109.76455,31.602769],[109.745456,31.598182],[109.727594,31.548214],[109.837847,31.555354],[109.894513,31.519139],[109.969658,31.508935],[109.94502,31.47066],[109.98752,31.474744],[110.036795,31.436966],[110.054042,31.410921],[110.118715,31.409899],[110.161831,31.314338],[110.155671,31.279564],[110.180309,31.179774],[110.200019,31.158779],[110.180309,31.121899],[110.147048,31.116776],[110.119947,31.088592],[110.120563,31.0322],[110.140273,31.030661],[110.140889,30.987062],[110.172918,30.978853],[110.153824,30.953708],[110.151976,30.911613],[110.082375,30.799614],[110.048498,30.800642],[110.019549,30.829425],[110.008462,30.883369],[109.943788,30.878746],[109.894513,30.899803],[109.828608,30.864364],[109.780564,30.848437],[109.701724,30.783677],[109.656761,30.760538],[109.661072,30.738936],[109.625348,30.702923],[109.590855,30.69366],[109.574225,30.646818],[109.543428,30.63961],[109.535421,30.664837],[109.435638,30.595832],[109.418392,30.559766],[109.35495,30.487076],[109.337088,30.521623],[109.36111,30.551004],[109.314298,30.599953],[109.299516,30.630341],[109.245313,30.580892],[109.191726,30.545851],[109.191726,30.545851],[109.143683,30.521108],[109.103647,30.565949],[109.09256,30.578831],[109.106111,30.61077],[109.111654,30.646303],[109.071002,30.640125],[109.042669,30.655571],[109.006329,30.626736],[108.971836,30.627766],[108.893612,30.565434],[108.838793,30.503062],[108.808612,30.491202],[108.789518,30.513374],[108.743939,30.494812],[108.698975,30.54482],[108.688504,30.58759],[108.642925,30.578831],[108.6497,30.53915],[108.56778,30.468508],[108.556077,30.487592],[108.512961,30.501515],[108.472925,30.487076],[108.42673,30.492233],[108.411331,30.438586],[108.430425,30.416397],[108.402092,30.376649],[108.431041,30.354446],[108.460606,30.35961],[108.501258,30.314673],[108.524048,30.309506],[108.54499,30.269716],[108.581947,30.255759],[108.551766,30.1637],[108.56778,30.157491],[108.546222,30.104178],[108.513577,30.057571],[108.532055,30.051873],[108.536367,29.983472],[108.517889,29.9394],[108.516041,29.885451],[108.467998,29.864175],[108.433505,29.880262],[108.371295,29.841337],[108.424266,29.815897],[108.422418,29.772791],[108.442744,29.778505],[108.437201,29.741098],[108.460606,29.741098],[108.504338,29.707836],[108.504954,29.728626],[108.548686,29.749412],[108.52528,29.770713],[108.556077,29.818493],[108.601041,29.863656],[108.658939,29.854833],[108.680497,29.800319],[108.676801,29.749412],[108.690968,29.689642],[108.752562,29.649082],[108.786438,29.691721],[108.797525,29.660003],[108.781511,29.635558],[108.844337,29.658443],[108.888068,29.628795],[108.870206,29.596537],[108.901003,29.604863],[108.913322,29.574679],[108.878213,29.539279],[108.888684,29.502305],[108.866511,29.470527],[108.884373,29.440824],[108.927488,29.435612],[108.934264,29.399643],[108.919481,29.3261],[108.983539,29.332883],[108.999553,29.36366],[109.034662,29.360531],[109.060531,29.403292],[109.11227,29.361053],[109.106727,29.288526],[109.141835,29.270256],[109.110422,29.21647],[109.139372,29.168927],[109.162777,29.180946],[109.215748,29.145409],[109.232378,29.119271],[109.274262,29.121885],[109.261328,29.161089],[109.275494,29.202366],[109.257632,29.222738],[109.312451,29.25146],[109.352487,29.284872],[109.343863,29.369398],[109.391291,29.372005],[109.368501,29.413719],[109.418392,29.453332],[109.415928,29.497617],[109.436254,29.488761],[109.433791,29.530948],[109.458428,29.513242],[109.467051,29.560104],[109.488609,29.553336],[109.516326,29.626194],[109.558826,29.606944],[109.578536,29.629836],[109.651833,29.625674],[109.664768,29.599659],[109.717739,29.615269],[109.701108,29.636078],[109.714659,29.673524],[109.760238,29.689122],[109.755311,29.733304],[109.779333,29.757725],[109.869876,29.774869],[109.908064,29.763959],[109.941325,29.774349],[110.02386,29.769674],[110.113788,29.789932],[110.160599,29.753569],[110.219729,29.746814],[110.289946,29.6964],[110.302265,29.661563],[110.339221,29.668324],[110.372482,29.633477],[110.447011,29.664684],[110.467337,29.713034],[110.507373,29.692241],[110.562807,29.712515],[110.642879,29.775907],[110.60038,29.839779],[110.549873,29.848085],[110.538786,29.895828],[110.49875,29.91243],[110.517228,29.961179],[110.557264,29.988137],[110.491358,30.019751],[110.497518,30.055499],[110.531394,30.061197],[110.600996,30.054463],[110.650887,30.07777],[110.712481,30.033223],[110.756212,30.054463],[110.746973,30.112979],[110.851067,30.126439],[110.924364,30.111426],[110.929907,30.063268],[111.031537,30.048765],[111.242188,30.040476],[111.266826,30.01146],[111.3315,29.970512],[111.342587,29.944586],[111.382623,29.95029],[111.394325,29.912948],[111.436825,29.930065],[111.475629,29.918654],[111.527368,29.925916],[111.553854,29.894272],[111.669034,29.888565],[111.669034,29.888565],[111.705375,29.890121],[111.723853,29.909317],[111.723853,29.909317],[111.75773,29.92021],[111.8107,29.901017],[111.861207,29.856909],[111.899396,29.855871],[111.899396,29.855871],[111.925881,29.836665],[111.965917,29.832512],[111.95483,29.796683],[112.008417,29.778505],[112.07617,29.743696],[112.065699,29.681323],[112.089721,29.685482],[112.111279,29.659483],[112.178416,29.656883],[112.202438,29.633997],[112.244322,29.659483],[112.233851,29.61631],[112.303452,29.585609],[112.281278,29.536676],[112.291133,29.517409],[112.333017,29.545007],[112.368741,29.541362],[112.424792,29.598619],[112.439574,29.633997],[112.499321,29.629316],[112.54182,29.60122],[112.572001,29.624113],[112.640371,29.607985],[112.650842,29.592374],[112.693957,29.601741],[112.714283,29.648561],[112.733378,29.645441],[112.788812,29.681323],[112.79374,29.735902],[112.861493,29.78318],[112.894138,29.783699],[112.902145,29.79149],[112.929246,29.77383],[112.923703,29.766557],[112.926782,29.692241],[112.944645,29.682883],[112.974826,29.732784],[113.025949,29.772791],[113.005007,29.693801],[112.915696,29.620992],[112.912,29.606944],[112.950188,29.473132],[113.034572,29.523658],[113.057362,29.522616],[113.078304,29.438218],[113.099861,29.459585],[113.145441,29.449163],[113.181781,29.485636],[113.222433,29.543965],[113.277252,29.594976],[113.37765,29.703158],[113.571671,29.849123],[113.575367,29.809147],[113.550729,29.768115],[113.558736,29.727067],[113.540258,29.699519],[113.547033,29.675603],[113.606164,29.666764],[113.663446,29.684443],[113.680692,29.64336],[113.704098,29.634518],[113.73859,29.579363],[113.710257,29.555419],[113.630801,29.523137],[113.677613,29.513763],[113.755221,29.446557],[113.731199,29.393907],[113.674533,29.388172],[113.660982,29.333405],[113.632033,29.316186],[113.609859,29.25146],[113.651743,29.225872],[113.693011,29.226394],[113.691779,29.19662],[113.66283,29.16945],[113.690547,29.114566],[113.696091,29.077437],[113.722576,29.104631],[113.749677,29.060699],[113.775547,29.095219],[113.816199,29.105154],[113.852539,29.058606],[113.882104,29.065407],[113.876561,29.038202],[113.898119,29.029307],[113.94185,29.047097],[113.952321,29.092604],[113.98743,29.126068],[114.034857,29.152204],[114.063191,29.204978],[114.169748,29.216993],[114.252284,29.23475],[114.259059,29.343839],[114.307102,29.365225],[114.341595,29.327665],[114.376088,29.322969],[114.440145,29.341752],[114.466015,29.324013],[114.519602,29.325578],[114.589819,29.352707],[114.621847,29.379828],[114.67297,29.395993],[114.740724,29.386607],[114.759818,29.363139],[114.784455,29.386086],[114.812173,29.383478],[114.866375,29.404335],[114.895325,29.397557],[114.931049,29.422581],[114.947063,29.465317],[114.935977,29.486678],[114.90518,29.473132],[114.918114,29.454374],[114.888549,29.436134],[114.860216,29.476258],[114.900868,29.505951],[114.940288,29.493971],[114.966773,29.522096],[114.947679,29.542924],[115.00065,29.572076],[115.033295,29.546568],[115.087498,29.560104],[115.086266,29.525741],[115.154019,29.510117],[115.157099,29.584568],[115.120142,29.597578],[115.143548,29.645961],[115.117679,29.655843],[115.113367,29.684963],[115.176809,29.654803],[115.250722,29.660003],[115.28583,29.618391],[115.304924,29.637118],[115.355431,29.649602],[115.412714,29.688602],[115.470612,29.739539],[115.479235,29.811224],[115.51188,29.840299],[115.611662,29.841337],[115.667712,29.850161],[115.706517,29.837703],[115.762567,29.793048],[115.837096,29.748373],[115.909777,29.723949],[115.965827,29.724469],[116.049595,29.761881],[116.087167,29.795125],[116.13521,29.819532],[116.128435,29.897904],[116.073616,29.969993],[116.091479,30.036331],[116.078544,30.062233],[116.088399,30.110391],[116.055754,30.180774],[116.065609,30.204569],[115.997856,30.252657],[115.985537,30.290905],[115.903001,30.31364],[115.91532,30.337919],[115.885139,30.379747],[115.921479,30.416397],[115.894994,30.452517],[115.910393,30.519046],[115.887603,30.542758],[115.876516,30.582438],[115.848799,30.602014],[115.819234,30.597893],[115.81369,30.637035],[115.762567,30.685426],[115.782893,30.751795],[115.851262,30.756938],[115.863581,30.815549],[115.848799,30.828397],[115.865429,30.864364],[115.932566,30.889532],[115.976298,30.931636],[116.03974,30.957813],[116.071769,30.956787],[116.058834,31.012711],[116.015102,31.011685],[116.006479,31.034764],[115.938726,31.04707],[115.939958,31.071678],[115.887603,31.10909],[115.867277,31.147512],[115.837712,31.127022],[115.797676,31.128047],[115.778582,31.112164],[115.700973,31.201276],[115.655394,31.211002],[115.603655,31.17363],[115.585793,31.143926],[115.540213,31.194621],[115.539597,31.231985],[115.507568,31.267799],[115.473076,31.265242],[115.443511,31.344498],[115.40717,31.337854],[115.372062,31.349098],[115.393004,31.389977],[115.373909,31.405813],[115.338801,31.40428],[115.301229,31.383846],[115.250722,31.392021],[115.252569,31.421646],[115.211301,31.442072],[115.218077,31.515057],[115.235939,31.555354],[115.212533,31.555354],[115.16449,31.604808],[115.12507,31.599201],[115.106592,31.567592],[115.114599,31.530362],[115.096121,31.508425],[115.022824,31.527811],[114.995107,31.471171],[114.962462,31.494648],[114.884238,31.469129],[114.870071,31.479337],[114.830035,31.45892],[114.789383,31.480358],[114.778912,31.520669],[114.696376,31.525771],[114.641558,31.582378],[114.61692,31.585437],[114.572572,31.553824],[114.560869,31.560963],[114.547935,31.623665],[114.57134,31.660858],[114.586123,31.762172],[114.549783,31.766751],[114.530688,31.742834],[114.443841,31.728074],[114.403189,31.746906],[114.350218,31.755557],[114.292936,31.752503],[114.235654,31.833382],[114.191922,31.852192],[114.134024,31.843042],[114.121705,31.809482],[114.086596,31.782014],[114.017611,31.770822],[113.988662,31.749959],[113.952321,31.793714],[113.957865,31.852701],[113.914749,31.877098],[113.893807,31.847109],[113.854387,31.843042],[113.830981,31.87913],[113.832213,31.918761],[113.805728,31.929428],[113.817431,31.964467],[113.757685,31.98985],[113.791561,32.036028],[113.728735,32.083197],[113.722576,32.12426],[113.750293,32.11615],[113.782322,32.184553],[113.752757,32.215951],[113.73859,32.255942],[113.749061,32.272642],[113.768772,32.30148],[113.753989,32.328286],[113.76754,32.370249],[113.735511,32.410677],[113.700402,32.420782],[113.650511,32.412698],[113.624642,32.36115],[113.511925,32.316654],[113.428773,32.270618],[113.376418,32.298445],[113.353628,32.294904],[113.317904,32.327275],[113.333918,32.336377],[113.2366,32.407141],[113.211962,32.431895],[113.158992,32.410677],[113.155912,32.380863],[113.118956,32.375809],[113.107869,32.398551],[113.078919,32.394508],[113.025949,32.425328],[113.000695,32.41674],[112.992072,32.378336],[112.912,32.390971],[112.888594,32.37682],[112.860877,32.396024],[112.776493,32.358623],[112.735841,32.356095],[112.733993,32.356601],[112.724138,32.358623],[112.716747,32.357612],[112.645298,32.368227],[112.612037,32.386928],[112.589248,32.381369],[112.545516,32.404109],[112.530733,32.37682],[112.477147,32.380863],[112.448814,32.34295],[112.390915,32.37126],[112.360118,32.3657],[112.328089,32.321712],[112.206133,32.392992],[112.172873,32.385412],[112.150083,32.411688],[112.155626,32.377326],[112.081098,32.425833],[112.063851,32.474315],[112.014576,32.450077],[111.975772,32.471791],[111.948671,32.51722],[111.890157,32.503089],[111.858128,32.528826],[111.808853,32.536899],[111.713382,32.606497],[111.646245,32.605993],[111.640701,32.634724],[111.577875,32.593388],[111.530448,32.628172],[111.513202,32.674026],[111.458383,32.726402],[111.475629,32.760127],[111.41342,32.757108],[111.380159,32.829049],[111.293311,32.859217],[111.276065,32.903445],[111.255123,32.883846],[111.242804,32.930573],[111.273601,32.971753],[111.258819,33.006389],[111.221862,33.042517],[111.152877,33.039507],[111.192913,33.071609],[111.179363,33.115229],[111.146102,33.12375],[111.12824,33.15532],[111.08882,33.181871],[111.045704,33.169849]]],[[[109.106111,30.570587],[109.101183,30.579346],[109.09872,30.579346],[109.106111,30.570587]]],[[[111.046936,33.202905],[111.035849,33.187881],[111.034001,33.177864],[111.045704,33.169849],[111.046936,33.202905]]],[[[112.716747,32.357612],[112.735841,32.356095],[112.733993,32.356601],[112.724138,32.358623],[112.716747,32.357612]]],[[[112.902145,29.79149],[112.894138,29.783699],[112.923703,29.766557],[112.929246,29.77383],[112.902145,29.79149]]]]}},{"type":"Feature","properties":{"adcode":430000,"name":"\u6E56\u5357\u7701","center":[112.982279,28.19409],"centroid":[111.711649,27.629216],"childrenNum":14,"level":"province","parent":{"adcode":100000},"subFeatureIndex":17,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[112.024431,24.740308],[112.03367,24.771286],[112.124214,24.841364],[112.149467,24.837019],[112.167329,24.859828],[112.175337,24.927685],[112.119902,24.963499],[112.12175,24.989538],[112.155626,25.026419],[112.151931,25.055698],[112.177184,25.106649],[112.187039,25.182494],[112.246785,25.185202],[112.256025,25.159204],[112.302836,25.157037],[112.315771,25.175453],[112.365046,25.191701],[112.414937,25.14241],[112.44327,25.185744],[112.458053,25.152162],[112.562762,25.124531],[112.628052,25.140785],[112.660081,25.132658],[112.712436,25.083344],[112.714899,25.025876],[112.742001,24.99876],[112.743233,24.959701],[112.778341,24.947764],[112.780805,24.896747],[112.873812,24.896747],[112.904609,24.921715],[112.941565,24.915745],[112.994536,24.927142],[113.009934,24.977604],[112.979137,25.03401],[113.004391,25.089306],[112.96805,25.141869],[112.97421,25.168412],[113.034572,25.198199],[112.992688,25.247467],[112.958195,25.254503],[112.897833,25.238264],[112.867036,25.249632],[112.854718,25.337829],[112.891058,25.339993],[112.924319,25.296714],[112.93479,25.325929],[112.969898,25.350269],[113.013014,25.352432],[113.078304,25.382174],[113.096782,25.412449],[113.131274,25.414611],[113.11834,25.445418],[113.176854,25.471355],[113.226129,25.50971],[113.248919,25.514031],[113.311129,25.490264],[113.314208,25.442716],[113.341926,25.448661],[113.373338,25.402719],[113.407215,25.401637],[113.449715,25.359463],[113.479896,25.375145],[113.535946,25.368656],[113.579062,25.34432],[113.584606,25.306453],[113.611707,25.327552],[113.680076,25.334584],[113.686852,25.351891],[113.753373,25.362707],[113.76446,25.333502],[113.814967,25.328634],[113.839605,25.363248],[113.877177,25.380552],[113.887032,25.436772],[113.94493,25.441635],[113.962792,25.528072],[113.986198,25.529153],[113.983118,25.599336],[113.957249,25.611749],[113.913517,25.701299],[113.920293,25.741197],[113.961561,25.77731],[113.971416,25.836036],[114.028082,25.893119],[114.028082,25.98138],[114.008372,26.015806],[114.044096,26.076564],[114.087828,26.06635],[114.121089,26.085702],[114.10569,26.097526],[114.188842,26.121172],[114.237501,26.152333],[114.216559,26.203355],[114.181451,26.214631],[114.102611,26.187783],[114.088444,26.168448],[114.013299,26.184023],[113.962792,26.150722],[113.949242,26.192616],[113.972647,26.20604],[113.978807,26.237716],[114.029314,26.266163],[114.021307,26.288701],[114.047792,26.337518],[114.030546,26.376664],[114.062575,26.406149],[114.085364,26.406149],[114.090292,26.455988],[114.110002,26.482775],[114.07243,26.480096],[114.10877,26.56952],[114.019459,26.587182],[113.996669,26.615543],[113.912901,26.613938],[113.860546,26.664221],[113.853771,26.769532],[113.835909,26.806394],[113.877177,26.859262],[113.890112,26.895562],[113.927068,26.948922],[113.892575,26.964925],[113.86301,27.018252],[113.824206,27.036378],[113.803264,27.099261],[113.771851,27.096598],[113.779242,27.137081],[113.846996,27.222262],[113.872865,27.289828],[113.854387,27.30525],[113.872865,27.346721],[113.872865,27.384988],[113.72812,27.350442],[113.699786,27.331836],[113.657902,27.347253],[113.616635,27.345658],[113.605548,27.38924],[113.632033,27.40518],[113.59754,27.428554],[113.591381,27.467855],[113.627105,27.49971],[113.583374,27.524657],[113.579062,27.545354],[113.608627,27.585143],[113.607395,27.625449],[113.652359,27.663619],[113.696707,27.71979],[113.69917,27.740979],[113.763228,27.799228],[113.756453,27.860091],[113.72812,27.874904],[113.752141,27.93361],[113.822974,27.982243],[113.845148,27.971672],[113.864242,28.004966],[113.914133,27.991227],[113.936307,28.018703],[113.966488,28.017646],[113.970184,28.041418],[114.025618,28.031382],[114.047176,28.057263],[114.025002,28.080499],[113.992357,28.161255],[114.012068,28.174972],[114.068734,28.171806],[114.107538,28.182885],[114.109386,28.205038],[114.143879,28.246694],[114.182067,28.249858],[114.198081,28.29097],[114.2529,28.319423],[114.252284,28.395787],[114.214712,28.403157],[114.172212,28.432632],[114.217175,28.466308],[114.218407,28.48472],[114.15435,28.507337],[114.138335,28.533629],[114.08598,28.558337],[114.132176,28.607211],[114.122321,28.623497],[114.157429,28.761566],[114.137719,28.779926],[114.153734,28.829221],[114.124784,28.843376],[114.076741,28.834464],[114.056415,28.872204],[114.060111,28.902596],[114.028082,28.891069],[114.005292,28.917788],[114.008988,28.955498],[113.973879,28.937692],[113.955401,28.978536],[113.961561,28.999476],[113.94185,29.047097],[113.898119,29.029307],[113.876561,29.038202],[113.882104,29.065407],[113.852539,29.058606],[113.816199,29.105154],[113.775547,29.095219],[113.749677,29.060699],[113.722576,29.104631],[113.696091,29.077437],[113.690547,29.114566],[113.66283,29.16945],[113.691779,29.19662],[113.693011,29.226394],[113.651743,29.225872],[113.609859,29.25146],[113.632033,29.316186],[113.660982,29.333405],[113.674533,29.388172],[113.731199,29.393907],[113.755221,29.446557],[113.677613,29.513763],[113.630801,29.523137],[113.710257,29.555419],[113.73859,29.579363],[113.704098,29.634518],[113.680692,29.64336],[113.663446,29.684443],[113.606164,29.666764],[113.547033,29.675603],[113.540258,29.699519],[113.558736,29.727067],[113.550729,29.768115],[113.575367,29.809147],[113.571671,29.849123],[113.37765,29.703158],[113.277252,29.594976],[113.222433,29.543965],[113.181781,29.485636],[113.145441,29.449163],[113.099861,29.459585],[113.078304,29.438218],[113.057362,29.522616],[113.034572,29.523658],[112.950188,29.473132],[112.912,29.606944],[112.915696,29.620992],[113.005007,29.693801],[113.025949,29.772791],[112.974826,29.732784],[112.944645,29.682883],[112.926782,29.692241],[112.923703,29.766557],[112.894138,29.783699],[112.861493,29.78318],[112.79374,29.735902],[112.788812,29.681323],[112.733378,29.645441],[112.714283,29.648561],[112.693957,29.601741],[112.650842,29.592374],[112.640371,29.607985],[112.572001,29.624113],[112.54182,29.60122],[112.499321,29.629316],[112.439574,29.633997],[112.424792,29.598619],[112.368741,29.541362],[112.333017,29.545007],[112.291133,29.517409],[112.281278,29.536676],[112.303452,29.585609],[112.233851,29.61631],[112.244322,29.659483],[112.202438,29.633997],[112.178416,29.656883],[112.111279,29.659483],[112.089721,29.685482],[112.065699,29.681323],[112.07617,29.743696],[112.008417,29.778505],[111.95483,29.796683],[111.965917,29.832512],[111.925881,29.836665],[111.899396,29.855871],[111.899396,29.855871],[111.861207,29.856909],[111.8107,29.901017],[111.75773,29.92021],[111.723853,29.909317],[111.723853,29.909317],[111.705375,29.890121],[111.669034,29.888565],[111.669034,29.888565],[111.553854,29.894272],[111.527368,29.925916],[111.475629,29.918654],[111.436825,29.930065],[111.394325,29.912948],[111.382623,29.95029],[111.342587,29.944586],[111.3315,29.970512],[111.266826,30.01146],[111.242188,30.040476],[111.031537,30.048765],[110.929907,30.063268],[110.924364,30.111426],[110.851067,30.126439],[110.746973,30.112979],[110.756212,30.054463],[110.712481,30.033223],[110.650887,30.07777],[110.600996,30.054463],[110.531394,30.061197],[110.497518,30.055499],[110.491358,30.019751],[110.557264,29.988137],[110.517228,29.961179],[110.49875,29.91243],[110.538786,29.895828],[110.549873,29.848085],[110.60038,29.839779],[110.642879,29.775907],[110.562807,29.712515],[110.507373,29.692241],[110.467337,29.713034],[110.447011,29.664684],[110.372482,29.633477],[110.339221,29.668324],[110.302265,29.661563],[110.289946,29.6964],[110.219729,29.746814],[110.160599,29.753569],[110.113788,29.789932],[110.02386,29.769674],[109.941325,29.774349],[109.908064,29.763959],[109.869876,29.774869],[109.779333,29.757725],[109.755311,29.733304],[109.760238,29.689122],[109.714659,29.673524],[109.701108,29.636078],[109.717739,29.615269],[109.664768,29.599659],[109.651833,29.625674],[109.578536,29.629836],[109.558826,29.606944],[109.516326,29.626194],[109.488609,29.553336],[109.467051,29.560104],[109.458428,29.513242],[109.433791,29.530948],[109.436254,29.488761],[109.415928,29.497617],[109.418392,29.453332],[109.368501,29.413719],[109.391291,29.372005],[109.343863,29.369398],[109.352487,29.284872],[109.312451,29.25146],[109.257632,29.222738],[109.275494,29.202366],[109.261328,29.161089],[109.274262,29.121885],[109.232378,29.119271],[109.240386,29.086328],[109.312451,29.066453],[109.319842,29.042388],[109.294588,29.015177],[109.292741,28.987436],[109.261328,28.952356],[109.235458,28.882161],[109.246545,28.80143],[109.241002,28.776779],[109.2989,28.7474],[109.294588,28.722211],[109.252704,28.691767],[109.271183,28.671816],[109.192958,28.636104],[109.201581,28.597753],[109.235458,28.61982],[109.252089,28.606685],[109.306907,28.62087],[109.319842,28.579886],[109.273646,28.53836],[109.274262,28.494714],[109.260712,28.46473],[109.264407,28.392628],[109.289045,28.373673],[109.268719,28.33786],[109.275494,28.313101],[109.317994,28.277795],[109.33524,28.293605],[109.388211,28.268307],[109.367885,28.254602],[109.340168,28.19027],[109.33832,28.141731],[109.314298,28.103729],[109.298284,28.036136],[109.335856,28.063073],[109.378972,28.034551],[109.362342,28.007608],[109.319842,27.988585],[109.30198,27.956343],[109.32169,27.868027],[109.346943,27.838396],[109.332777,27.782815],[109.37774,27.736741],[109.366653,27.721909],[109.414081,27.725087],[109.470747,27.680049],[109.45658,27.673689],[109.470131,27.62863],[109.451037,27.586204],[109.461508,27.567637],[109.404841,27.55066],[109.303211,27.47582],[109.300132,27.423774],[109.245313,27.41793],[109.202197,27.450331],[109.167089,27.41793],[109.141835,27.448207],[109.142451,27.418461],[109.103647,27.336621],[109.044517,27.331304],[109.053756,27.293551],[108.983539,27.26802],[108.963213,27.235565],[108.907778,27.204699],[108.926873,27.160512],[108.878829,27.106187],[108.79075,27.084343],[108.877597,27.01612],[108.942887,27.017186],[108.942887,27.017186],[108.940423,27.044907],[109.007561,27.08008],[109.032814,27.104056],[109.128901,27.122701],[109.101183,27.06889],[109.165857,27.066758],[109.21698,27.114711],[109.239154,27.14933],[109.264407,27.131755],[109.33524,27.139212],[109.358646,27.153058],[109.415312,27.154123],[109.441182,27.117907],[109.472595,27.134951],[109.454733,27.069423],[109.486761,27.053968],[109.497848,27.079548],[109.520022,27.058764],[109.555131,26.946788],[109.436254,26.892359],[109.452885,26.861932],[109.486761,26.895562],[109.509551,26.877947],[109.513247,26.84004],[109.497232,26.815474],[109.522486,26.749226],[109.528645,26.743881],[109.554515,26.73533],[109.597015,26.756173],[109.568065,26.726243],[109.528645,26.743881],[109.52187,26.749226],[109.486761,26.759913],[109.447957,26.759913],[109.407305,26.719829],[109.35495,26.693098],[109.283501,26.698445],[109.306291,26.661012],[109.334008,26.646036],[109.35495,26.658873],[109.390675,26.598955],[109.407305,26.533116],[109.381436,26.518659],[109.385747,26.493487],[109.362342,26.472061],[109.38082,26.454381],[109.319842,26.418477],[109.29582,26.350389],[109.271183,26.327863],[109.285965,26.295676],[109.325385,26.29031],[109.351255,26.264016],[109.369733,26.277432],[109.442414,26.289774],[109.467051,26.313917],[109.439334,26.238789],[109.47629,26.148035],[109.513863,26.128157],[109.502776,26.096451],[109.449805,26.101826],[109.452885,26.055598],[109.48245,26.029788],[109.513247,25.998056],[109.560058,26.021184],[109.588391,26.019571],[109.635203,26.047533],[109.649369,26.016882],[109.730057,25.989988],[109.710963,25.954478],[109.693717,25.959321],[109.67955,25.921649],[109.685094,25.880197],[109.768246,25.890427],[109.779333,25.866196],[109.811361,25.877504],[109.826144,25.911422],[109.806434,25.973848],[109.782412,25.996981],[109.814441,26.041081],[109.864332,26.027637],[109.898825,26.095377],[109.904368,26.135679],[109.970274,26.195301],[110.03002,26.166299],[110.099005,26.168985],[110.100853,26.132455],[110.065128,26.050221],[110.100853,26.020108],[110.168606,26.028713],[110.181541,26.060437],[110.24991,26.010965],[110.257301,25.961473],[110.325671,25.975462],[110.373098,26.088927],[110.437772,26.153945],[110.477808,26.179727],[110.495054,26.166299],[110.546793,26.233421],[110.552952,26.283335],[110.584365,26.296749],[110.612083,26.333764],[110.643495,26.308552],[110.673676,26.317135],[110.721104,26.294066],[110.742046,26.313917],[110.73527,26.270993],[110.759292,26.248451],[110.836284,26.255966],[110.939762,26.286554],[110.926212,26.320354],[110.944074,26.326791],[110.94469,26.373447],[110.974255,26.385778],[111.008747,26.35897],[111.008132,26.336982],[111.090667,26.308016],[111.208928,26.30426],[111.204616,26.276359],[111.228022,26.261333],[111.277913,26.272066],[111.293311,26.222148],[111.271754,26.217316],[111.274833,26.183486],[111.258203,26.151796],[111.26621,26.095914],[111.244652,26.078177],[111.267442,26.058824],[111.235413,26.048071],[111.189834,25.953402],[111.230486,25.916267],[111.251428,25.864581],[111.29208,25.854349],[111.297007,25.874274],[111.346282,25.906577],[111.376463,25.906039],[111.383239,25.881812],[111.460231,25.885042],[111.4861,25.859196],[111.43313,25.84627],[111.442369,25.77192],[111.399869,25.744431],[111.30871,25.720171],[111.309942,25.645203],[111.343202,25.602574],[111.324724,25.564249],[111.32842,25.521592],[111.279145,25.42326],[111.210776,25.363248],[111.184906,25.367034],[111.138711,25.303748],[111.103602,25.285351],[111.112841,25.21715],[110.998892,25.161371],[110.98411,25.101772],[110.951465,25.04377],[110.968711,24.975434],[111.009363,24.921172],[111.100522,24.945593],[111.101754,25.035095],[111.139943,25.042144],[111.200921,25.074672],[111.221862,25.106649],[111.274833,25.151078],[111.321645,25.105023],[111.36784,25.108817],[111.375231,25.128324],[111.435593,25.093642],[111.416499,25.047566],[111.467622,25.02208],[111.460231,24.992793],[111.43313,24.979774],[111.434977,24.951562],[111.470086,24.92877],[111.447296,24.892947],[111.449144,24.857113],[111.479325,24.797366],[111.461463,24.728894],[111.431282,24.687574],[111.451608,24.665822],[111.499035,24.667997],[111.526752,24.637538],[111.570484,24.64461],[111.588962,24.690837],[111.641933,24.684856],[111.637621,24.715303],[111.666571,24.760961],[111.708455,24.788673],[111.783599,24.785957],[111.814396,24.770199],[111.868599,24.771829],[111.875374,24.756613],[111.929577,24.75607],[111.951135,24.769655],[112.024431,24.740308]]],[[[109.528645,26.743881],[109.522486,26.749226],[109.52187,26.749226],[109.528645,26.743881]]]]}},{"type":"Feature","properties":{"adcode":440000,"name":"\u5E7F\u4E1C\u7701","center":[113.280637,23.125178],"centroid":[113.429919,23.334643],"childrenNum":21,"level":"province","parent":{"adcode":100000},"subFeatureIndex":18,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[113.558736,22.212244],[113.594461,22.228864],[113.595693,22.304186],[113.617866,22.315259],[113.604932,22.339617],[113.627721,22.349027],[113.669605,22.416539],[113.66591,22.438667],[113.624642,22.443092],[113.608627,22.408793],[113.573519,22.41156],[113.631417,22.475723],[113.668373,22.4807],[113.691779,22.514981],[113.740438,22.534329],[113.717033,22.645391],[113.678228,22.726007],[113.733663,22.736494],[113.758301,22.683496],[113.765692,22.665825],[113.803264,22.593463],[113.856851,22.539857],[113.869786,22.459685],[113.893807,22.442539],[113.952937,22.486783],[113.954785,22.491206],[113.976343,22.510558],[114.031778,22.503923],[114.082285,22.512216],[114.095219,22.534329],[114.156813,22.543726],[114.166052,22.559201],[114.222719,22.553122],[114.232574,22.539857],[114.294784,22.563623],[114.321885,22.587385],[114.381631,22.60175],[114.427211,22.589042],[114.472174,22.522168],[114.476486,22.459132],[114.506667,22.438667],[114.549167,22.465769],[114.611377,22.481806],[114.628623,22.513875],[114.614456,22.545384],[114.568261,22.560859],[114.559022,22.583517],[114.603369,22.638763],[114.579964,22.661407],[114.51529,22.655332],[114.567029,22.685705],[114.591666,22.690122],[114.601521,22.730975],[114.689601,22.7674],[114.709927,22.787817],[114.749963,22.764089],[114.73518,22.724351],[114.728405,22.651466],[114.743803,22.632687],[114.746267,22.581859],[114.866375,22.591805],[114.88547,22.538751],[114.922426,22.549253],[114.927969,22.621639],[114.945216,22.645391],[115.039454,22.713862],[115.02344,22.726007],[115.053621,22.747533],[115.076411,22.788368],[115.154635,22.80161],[115.190975,22.77347],[115.190359,22.818711],[115.236555,22.82533],[115.230396,22.776781],[115.319091,22.783402],[115.338185,22.776781],[115.349272,22.712206],[115.381301,22.684048],[115.430576,22.684048],[115.471844,22.697852],[115.575322,22.650914],[115.565467,22.684048],[115.609198,22.753052],[115.541445,22.755259],[115.570394,22.786713],[115.583945,22.82864],[115.654162,22.865591],[115.696046,22.84298],[115.760103,22.834707],[115.788437,22.809885],[115.796444,22.739254],[115.829089,22.734838],[115.883291,22.78561],[115.931334,22.802713],[115.965211,22.800506],[115.99724,22.826985],[116.05637,22.844635],[116.104413,22.816505],[116.14137,22.835259],[116.239304,22.921275],[116.259014,22.932298],[116.302746,22.951588],[116.382818,22.91907],[116.449955,22.936707],[116.50539,22.930645],[116.544194,22.996769],[116.576839,23.014397],[116.557129,23.056253],[116.566368,23.088738],[116.550969,23.109656],[116.566368,23.134424],[116.665534,23.158086],[116.701259,23.198248],[116.74499,23.215299],[116.806584,23.200998],[116.821367,23.240597],[116.798577,23.244996],[116.782563,23.313714],[116.871874,23.4159],[116.871258,23.416449],[116.874338,23.447199],[116.874953,23.447748],[116.895895,23.476295],[116.888504,23.501543],[116.92854,23.530079],[116.963649,23.507031],[117.01046,23.502641],[117.044953,23.539955],[117.085605,23.536663],[117.192778,23.5619],[117.192778,23.629356],[117.147199,23.654027],[117.123793,23.647448],[117.055424,23.694038],[117.048032,23.758687],[117.019083,23.801952],[117.012308,23.855054],[116.981511,23.855602],[116.955642,23.922359],[116.976583,23.931659],[116.981511,23.999471],[116.953178,24.008218],[116.930388,24.064514],[116.9347,24.126794],[116.998757,24.179217],[116.956257,24.216883],[116.933468,24.220157],[116.938395,24.28127],[116.914374,24.287817],[116.919301,24.321087],[116.895895,24.350533],[116.903903,24.369614],[116.839229,24.442097],[116.860787,24.460075],[116.83307,24.496568],[116.796729,24.502014],[116.759157,24.545572],[116.761005,24.583128],[116.815207,24.654944],[116.777635,24.679418],[116.667382,24.658752],[116.623034,24.64189],[116.600861,24.654401],[116.570679,24.621762],[116.530027,24.604895],[116.506622,24.621218],[116.517709,24.652225],[116.485064,24.720196],[116.44626,24.714216],[116.416079,24.744113],[116.419158,24.767482],[116.375427,24.803885],[116.381586,24.82507],[116.417927,24.840821],[116.395137,24.877746],[116.363724,24.87123],[116.345862,24.828872],[116.297202,24.801712],[116.244232,24.793563],[116.251007,24.82507],[116.221442,24.829959],[116.191877,24.877203],[116.153073,24.846795],[116.068073,24.850053],[116.015102,24.905975],[115.985537,24.899461],[115.907929,24.923343],[115.89253,24.936911],[115.885139,24.898918],[115.907313,24.879917],[115.861733,24.863629],[115.863581,24.891318],[115.824161,24.909232],[115.807531,24.862543],[115.790284,24.856027],[115.764415,24.791933],[115.776734,24.774546],[115.756408,24.749004],[115.769342,24.708236],[115.801371,24.705517],[115.780429,24.663103],[115.797676,24.628834],[115.840791,24.584217],[115.843871,24.562446],[115.785357,24.567345],[115.752712,24.546116],[115.68927,24.545027],[115.671408,24.604895],[115.605503,24.62557],[115.569778,24.622306],[115.555611,24.683768],[115.522967,24.702799],[115.476771,24.762591],[115.412714,24.79302],[115.372678,24.774546],[115.358511,24.735416],[115.306772,24.758787],[115.269816,24.749548],[115.258729,24.728894],[115.1842,24.711498],[115.104744,24.667997],[115.083802,24.699537],[115.057317,24.703343],[115.024672,24.669085],[115.00373,24.679418],[114.940288,24.650049],[114.909491,24.661471],[114.893477,24.582584],[114.868839,24.562446],[114.846665,24.602719],[114.827571,24.588026],[114.781376,24.613057],[114.729637,24.608704],[114.73826,24.565168],[114.704999,24.525973],[114.664963,24.583673],[114.627391,24.576598],[114.589819,24.537406],[114.534384,24.559181],[114.429058,24.48622],[114.403189,24.497657],[114.391486,24.563535],[114.363769,24.582584],[114.300943,24.578775],[114.289856,24.619042],[114.258443,24.641346],[114.19069,24.656576],[114.169132,24.689749],[114.27261,24.700624],[114.281849,24.724001],[114.336052,24.749004],[114.342211,24.807145],[114.378551,24.861457],[114.403189,24.877746],[114.395798,24.951019],[114.454928,24.977062],[114.45616,24.99659],[114.506051,24.999844],[114.532536,25.022623],[114.561485,25.077382],[114.604601,25.083886],[114.640326,25.074129],[114.664963,25.10123],[114.735796,25.121822],[114.73518,25.155954],[114.685905,25.173287],[114.693912,25.213902],[114.73518,25.225813],[114.743188,25.274528],[114.714238,25.315651],[114.63663,25.324306],[114.599674,25.385959],[114.541159,25.416773],[114.477718,25.37136],[114.438914,25.376226],[114.43029,25.343779],[114.382863,25.317274],[114.31511,25.33837],[114.2954,25.299961],[114.260291,25.291845],[114.204857,25.29942],[114.190074,25.316733],[114.115545,25.302125],[114.083517,25.275611],[114.055799,25.277775],[114.039785,25.250714],[114.017611,25.273987],[114.029314,25.328093],[114.050256,25.36433],[113.983118,25.415152],[114.003444,25.442716],[113.94493,25.441635],[113.887032,25.436772],[113.877177,25.380552],[113.839605,25.363248],[113.814967,25.328634],[113.76446,25.333502],[113.753373,25.362707],[113.686852,25.351891],[113.680076,25.334584],[113.611707,25.327552],[113.584606,25.306453],[113.579062,25.34432],[113.535946,25.368656],[113.479896,25.375145],[113.449715,25.359463],[113.407215,25.401637],[113.373338,25.402719],[113.341926,25.448661],[113.314208,25.442716],[113.311129,25.490264],[113.248919,25.514031],[113.226129,25.50971],[113.176854,25.471355],[113.11834,25.445418],[113.131274,25.414611],[113.096782,25.412449],[113.078304,25.382174],[113.013014,25.352432],[112.969898,25.350269],[112.93479,25.325929],[112.924319,25.296714],[112.891058,25.339993],[112.854718,25.337829],[112.867036,25.249632],[112.897833,25.238264],[112.958195,25.254503],[112.992688,25.247467],[113.034572,25.198199],[112.97421,25.168412],[112.96805,25.141869],[113.004391,25.089306],[112.979137,25.03401],[113.009934,24.977604],[112.994536,24.927142],[112.941565,24.915745],[112.904609,24.921715],[112.873812,24.896747],[112.780805,24.896747],[112.778341,24.947764],[112.743233,24.959701],[112.742001,24.99876],[112.714899,25.025876],[112.712436,25.083344],[112.660081,25.132658],[112.628052,25.140785],[112.562762,25.124531],[112.458053,25.152162],[112.44327,25.185744],[112.414937,25.14241],[112.365046,25.191701],[112.315771,25.175453],[112.302836,25.157037],[112.256025,25.159204],[112.246785,25.185202],[112.187039,25.182494],[112.177184,25.106649],[112.151931,25.055698],[112.155626,25.026419],[112.12175,24.989538],[112.119902,24.963499],[112.175337,24.927685],[112.167329,24.859828],[112.149467,24.837019],[112.124214,24.841364],[112.03367,24.771286],[112.024431,24.740308],[111.961606,24.721283],[111.939432,24.686487],[111.953598,24.64733],[111.927729,24.629378],[111.936968,24.595645],[111.972077,24.578775],[112.007185,24.534684],[112.009649,24.503103],[111.985011,24.467701],[112.025047,24.438828],[112.057692,24.387057],[112.05954,24.339628],[112.026279,24.294908],[111.990555,24.279634],[111.986243,24.25672],[111.958526,24.263813],[111.912946,24.221795],[111.877222,24.227252],[111.871062,24.176487],[111.886461,24.163929],[111.878454,24.109862],[111.92157,24.012045],[111.940664,23.987989],[111.911714,23.943693],[111.854432,23.947521],[111.845809,23.904305],[111.812548,23.887343],[111.824867,23.832612],[111.8107,23.80688],[111.722621,23.823305],[111.683201,23.822758],[111.683201,23.822758],[111.654868,23.833159],[111.627766,23.78881],[111.621607,23.725819],[111.666571,23.718696],[111.614832,23.65896],[111.615448,23.639225],[111.555702,23.64087],[111.487332,23.626615],[111.479941,23.532822],[111.428818,23.466414],[111.399869,23.469159],[111.383239,23.399423],[111.389398,23.375804],[111.363528,23.340641],[111.376463,23.30437],[111.353058,23.284582],[111.36476,23.240047],[111.388782,23.210349],[111.38447,23.16744],[111.365992,23.14488],[111.377695,23.082132],[111.402333,23.066165],[111.43313,23.073322],[111.433746,23.036428],[111.389398,23.005583],[111.403565,22.99126],[111.362913,22.967568],[111.374615,22.938361],[111.358601,22.889301],[111.218167,22.748085],[111.185522,22.735942],[111.118385,22.744773],[111.058023,22.729871],[111.089435,22.695643],[111.055559,22.648705],[110.997045,22.631582],[110.958856,22.636553],[110.950233,22.61059],[110.896031,22.613352],[110.897878,22.591805],[110.812263,22.576333],[110.778386,22.585174],[110.749437,22.556991],[110.762988,22.518298],[110.740198,22.498947],[110.74143,22.464109],[110.688459,22.477935],[110.712481,22.440879],[110.711249,22.369506],[110.74143,22.361757],[110.749437,22.329653],[110.787009,22.28259],[110.759292,22.274837],[110.725415,22.29588],[110.687843,22.249914],[110.646575,22.220554],[110.678604,22.172901],[110.629329,22.149068],[110.598532,22.162924],[110.602843,22.18343],[110.55788,22.196175],[110.505525,22.14297],[110.456866,22.189526],[110.414366,22.208365],[110.378026,22.164587],[110.34846,22.195621],[110.326287,22.152393],[110.364475,22.125785],[110.35154,22.097508],[110.359547,22.015973],[110.352772,21.97602],[110.374946,21.967695],[110.374946,21.967695],[110.378642,21.939942],[110.378642,21.939942],[110.391576,21.89386],[110.337374,21.887751],[110.290562,21.917736],[110.283787,21.892194],[110.224041,21.882198],[110.224041,21.882198],[110.212338,21.886085],[110.212338,21.886085],[110.196323,21.899968],[110.12857,21.902744],[110.101469,21.86998],[110.050962,21.857205],[109.999839,21.881643],[109.94502,21.84443],[109.940093,21.769419],[109.916071,21.668787],[109.888354,21.652101],[109.888354,21.652101],[109.839695,21.636525],[109.786108,21.637638],[109.778101,21.670455],[109.742992,21.616497],[109.754695,21.556396],[109.788572,21.490702],[109.785492,21.45673],[109.819369,21.445033],[109.894513,21.442248],[109.904368,21.429992],[109.868644,21.365913],[109.770709,21.359783],[109.757775,21.346963],[109.763934,21.226514],[109.674623,21.136671],[109.674007,21.067997],[109.655529,20.929435],[109.664768,20.862343],[109.711579,20.774519],[109.730057,20.719673],[109.74484,20.621124],[109.793499,20.615522],[109.813825,20.574627],[109.811977,20.541566],[109.839695,20.489439],[109.888354,20.475423],[109.895745,20.42776],[109.864948,20.40196],[109.861252,20.376717],[109.916071,20.316677],[109.909296,20.236961],[109.929006,20.211691],[109.993679,20.254368],[110.082375,20.258859],[110.118099,20.219553],[110.168606,20.219553],[110.220345,20.25156],[110.296722,20.249314],[110.349076,20.258859],[110.384185,20.293103],[110.425453,20.291419],[110.452554,20.311064],[110.491358,20.373912],[110.54125,20.42047],[110.550489,20.47262],[110.499982,20.572386],[110.487047,20.640167],[110.466105,20.680485],[110.411286,20.670966],[110.392192,20.682724],[110.407591,20.731987],[110.393424,20.816479],[110.350924,20.84165],[110.327519,20.847802],[110.269004,20.839972],[110.209874,20.860106],[110.184005,20.891979],[110.180925,20.98197],[110.204947,21.003202],[110.208642,21.050684],[110.241903,21.016051],[110.24991,21.045098],[110.296722,21.093684],[110.39096,21.124949],[110.422373,21.190807],[110.451322,21.186343],[110.501213,21.217588],[110.534474,21.204198],[110.626249,21.215915],[110.65951,21.239902],[110.713097,21.3124],[110.768531,21.364799],[110.796248,21.37483],[110.888639,21.367585],[110.929291,21.375945],[111.034617,21.438906],[111.103602,21.455616],[111.171355,21.458401],[111.28284,21.485691],[111.276065,21.443362],[111.250196,21.45116],[111.257587,21.41495],[111.28592,21.41885],[111.353058,21.464528],[111.382623,21.495714],[111.444217,21.514088],[111.494724,21.501282],[111.521825,21.517429],[111.560629,21.50518],[111.609904,21.530234],[111.650556,21.512418],[111.677658,21.529677],[111.693672,21.590345],[111.736788,21.609821],[111.794686,21.61149],[111.832258,21.578659],[111.810084,21.555283],[111.887693,21.578659],[111.941896,21.607039],[111.972692,21.603144],[112.026895,21.633744],[111.997946,21.657107],[111.954214,21.667674],[111.956062,21.710494],[112.036134,21.761637],[112.136532,21.793871],[112.192583,21.789425],[112.196894,21.736624],[112.236315,21.727173],[112.238778,21.702153],[112.353343,21.707157],[112.415553,21.734956],[112.427256,21.789981],[112.445734,21.803317],[112.497473,21.785535],[112.535661,21.753856],[112.647146,21.758302],[112.68595,21.810541],[112.792508,21.921067],[112.841167,21.920512],[112.893522,21.84443],[112.929862,21.838875],[112.989608,21.869424],[113.047507,21.956595],[113.053666,22.012089],[113.032108,22.04593],[113.045659,22.088636],[113.086927,22.12634],[113.091854,22.065344],[113.142977,22.012089],[113.1516,21.979905],[113.235368,21.887751],[113.266781,21.871646],[113.319752,21.909407],[113.330223,21.96159],[113.442324,22.009315],[113.45957,22.043711],[113.527939,22.073663],[113.567359,22.075327],[113.554425,22.107489],[113.554425,22.142416],[113.534715,22.174009],[113.53841,22.209473],[113.558736,22.212244]]],[[[117.024627,23.437865],[116.982743,23.460924],[116.944555,23.440061],[116.951946,23.419744],[117.027091,23.41535],[117.050496,23.400522],[117.081909,23.409309],[117.124409,23.389537],[117.142887,23.400522],[117.142887,23.459826],[117.129336,23.483431],[117.093612,23.459277],[117.058503,23.47355],[117.029554,23.443356],[117.024627,23.437865]]],[[[112.853486,21.740515],[112.876275,21.772753],[112.840551,21.776644],[112.782653,21.739959],[112.724138,21.719945],[112.70566,21.679354],[112.734609,21.666562],[112.780189,21.671568],[112.730914,21.613715],[112.775261,21.564189],[112.817145,21.590345],[112.798667,21.610933],[112.821457,21.655994],[112.804826,21.686583],[112.83316,21.736624],[112.853486,21.740515]]],[[[112.530733,21.583667],[112.563378,21.591458],[112.571385,21.619835],[112.621277,21.606482],[112.665624,21.642644],[112.639139,21.67268],[112.66624,21.683803],[112.663776,21.714386],[112.592327,21.693256],[112.560299,21.666562],[112.57077,21.645982],[112.535045,21.628737],[112.530733,21.583667]]],[[[114.231342,22.016528],[114.311414,22.041493],[114.302791,22.050368],[114.239965,22.03539],[114.231342,22.016528]]],[[[110.43346,21.171276],[110.489511,21.138904],[110.508605,21.140579],[110.544945,21.083633],[110.582517,21.094801],[110.632409,21.210893],[110.589293,21.194713],[110.525235,21.190249],[110.499366,21.213125],[110.445163,21.184669],[110.431612,21.180763],[110.43346,21.171276]]],[[[112.435263,21.663781],[112.456205,21.648763],[112.458669,21.68992],[112.435263,21.663781]]],[[[110.517844,21.079166],[110.459946,21.062971],[110.398352,21.096476],[110.352772,21.079724],[110.305961,21.0881],[110.27578,21.033369],[110.211106,20.986999],[110.201251,20.938378],[110.309656,20.963529],[110.347845,20.984763],[110.407591,20.990351],[110.47288,20.983087],[110.511684,20.916578],[110.535706,20.922727],[110.539402,20.987557],[110.560344,21.061295],[110.517844,21.079166]]],[[[113.765076,21.962145],[113.774315,21.998218],[113.74167,21.991559],[113.765076,21.962145]]],[[[113.723192,21.922177],[113.742902,21.950489],[113.71888,21.951599],[113.723192,21.922177]]],[[[113.142977,21.831653],[113.162071,21.853873],[113.203955,21.861093],[113.167615,21.876644],[113.136818,21.868869],[113.142977,21.831653]]],[[[113.819894,22.396068],[113.813735,22.419858],[113.786634,22.413773],[113.819894,22.396068]]],[[[114.190074,21.986564],[114.229494,21.995443],[114.180835,22.00987],[114.190074,21.986564]]],[[[114.153734,21.97491],[114.171596,22.000437],[114.124169,21.985455],[114.153734,21.97491]]],[[[116.769628,20.771721],[116.761005,20.750456],[116.87249,20.738143],[116.889736,20.683284],[116.849084,20.628405],[116.749302,20.600958],[116.796113,20.582471],[116.862635,20.588633],[116.905135,20.619443],[116.934084,20.676565],[116.925461,20.726949],[116.88604,20.775638],[116.820135,20.780674],[116.769628,20.771721]]],[[[113.025333,21.847762],[113.045659,21.882753],[113.007471,21.869424],[113.025333,21.847762]]],[[[110.405127,20.678245],[110.437772,20.677685],[110.414366,20.710157],[110.405127,20.678245]]],[[[110.644727,20.935584],[110.584365,20.948998],[110.548641,20.908752],[110.562807,20.861224],[110.611467,20.860106],[110.646575,20.917137],[110.644727,20.935584]]],[[[110.556648,20.32734],[110.593604,20.360447],[110.586213,20.381205],[110.556648,20.32734]]],[[[115.943037,21.097592],[115.953508,21.064088],[115.989233,21.035603],[116.040356,21.02052],[116.067457,21.04063],[116.044051,21.110434],[116.024341,21.12439],[115.965211,21.123832],[115.943037,21.097592]]],[[[115.926407,20.981411],[115.939342,20.945644],[115.970139,20.919373],[115.999088,20.922727],[116.000936,20.948439],[115.954124,20.99985],[115.926407,20.981411]]],[[[115.834632,22.722695],[115.834632,22.722143],[115.835248,22.722695],[115.834632,22.722695]]],[[[115.834632,22.723247],[115.834632,22.722695],[115.835248,22.722695],[115.834632,22.723247]]]]}},{"type":"Feature","properties":{"adcode":450000,"name":"\u5E7F\u897F\u58EE\u65CF\u81EA\u6CBB\u533A","center":[108.320004,22.82402],"centroid":[108.7944,23.833381],"childrenNum":14,"level":"province","parent":{"adcode":100000},"subFeatureIndex":19,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[109.48245,26.029788],[109.473211,26.006663],[109.408537,25.967392],[109.435022,25.93349],[109.396834,25.900117],[109.359262,25.836036],[109.339552,25.83442],[109.327849,25.76168],[109.340168,25.731493],[109.296436,25.71424],[109.207125,25.740119],[109.206509,25.788087],[109.147995,25.741736],[109.13198,25.762758],[109.143683,25.795092],[109.095024,25.80533],[109.077778,25.776771],[109.048213,25.790781],[108.989698,25.778926],[108.999553,25.765453],[108.963829,25.732572],[108.940423,25.740119],[108.896076,25.71424],[108.900387,25.682423],[108.953974,25.686738],[108.953974,25.686738],[109.007561,25.734728],[109.043285,25.738502],[109.07901,25.72071],[109.075314,25.693749],[109.030966,25.629556],[109.051908,25.566949],[109.088249,25.550752],[109.024807,25.51241],[108.949046,25.557231],[108.8893,25.543193],[108.890532,25.556151],[108.826474,25.550212],[108.814772,25.526992],[108.781511,25.554531],[108.799989,25.576666],[108.783975,25.628477],[108.724844,25.634952],[108.68912,25.623081],[108.68604,25.587462],[108.660787,25.584763],[108.658323,25.550212],[108.68912,25.533473],[108.634917,25.520512],[108.6072,25.491885],[108.600425,25.432448],[108.62999,25.335666],[108.625062,25.308076],[108.589338,25.335125],[108.585642,25.365952],[108.471693,25.458928],[108.418723,25.443257],[108.400244,25.491344],[108.359592,25.513491],[108.348506,25.536173],[108.308469,25.525912],[108.280752,25.48],[108.241332,25.46217],[108.251803,25.430286],[108.192673,25.458928],[108.162492,25.444878],[108.193289,25.405421],[108.142782,25.390825],[108.152021,25.324306],[108.143398,25.269658],[108.115065,25.210112],[108.080572,25.193867],[108.001732,25.196574],[107.928435,25.155954],[107.872384,25.141327],[107.839124,25.115861],[107.762747,25.125073],[107.789233,25.15487],[107.760283,25.188451],[107.762131,25.229061],[107.741805,25.24043],[107.700537,25.194408],[107.696226,25.219858],[107.661733,25.258833],[107.659885,25.316192],[107.632168,25.310241],[107.599523,25.250714],[107.576734,25.256668],[107.512676,25.209029],[107.472024,25.213902],[107.489886,25.276693],[107.481263,25.299961],[107.432604,25.289139],[107.409198,25.347024],[107.420901,25.392987],[107.375937,25.411908],[107.358691,25.393528],[107.318039,25.401637],[107.308184,25.432988],[107.336517,25.461089],[107.263836,25.543193],[107.232423,25.556691],[107.228728,25.604733],[107.205322,25.607971],[107.185612,25.578825],[107.064272,25.559391],[107.066736,25.50917],[107.015613,25.495666],[106.996519,25.442716],[106.963874,25.437852],[106.987896,25.358922],[107.012533,25.352973],[107.013765,25.275611],[106.975577,25.232851],[106.933077,25.250714],[106.904128,25.231768],[106.888113,25.181953],[106.853005,25.186827],[106.787715,25.17112],[106.764926,25.183036],[106.732281,25.162454],[106.691013,25.179245],[106.644817,25.164621],[106.63989,25.132658],[106.590615,25.08768],[106.551195,25.082802],[106.519782,25.054072],[106.450181,25.033468],[106.442173,25.019369],[106.332536,24.988454],[106.304819,24.973807],[106.253696,24.971094],[106.215508,24.981944],[106.191486,24.95319],[106.145291,24.954275],[106.197645,24.885889],[106.206269,24.851139],[106.173008,24.760417],[106.150218,24.762591],[106.113878,24.714216],[106.047356,24.684312],[106.024566,24.633186],[105.961741,24.677786],[105.942031,24.725088],[105.863806,24.729437],[105.827466,24.702799],[105.767104,24.719109],[105.70551,24.768569],[105.617431,24.78161],[105.607576,24.803885],[105.573083,24.797366],[105.497322,24.809318],[105.493011,24.833217],[105.457286,24.87123],[105.428337,24.930941],[105.365511,24.943423],[105.334099,24.9266],[105.267577,24.929313],[105.251563,24.967296],[105.212758,24.995505],[105.178266,24.985199],[105.157324,24.958616],[105.131454,24.959701],[105.09573,24.92877],[105.096346,24.928228],[105.082179,24.915745],[105.077868,24.918459],[105.039064,24.872859],[105.026745,24.815836],[105.03352,24.787586],[104.899245,24.752809],[104.865985,24.730524],[104.841963,24.676155],[104.771746,24.659839],[104.729246,24.617953],[104.703377,24.645698],[104.628848,24.660927],[104.595587,24.709323],[104.529682,24.731611],[104.489646,24.653313],[104.520443,24.535228],[104.550008,24.518894],[104.575877,24.424661],[104.616529,24.421937],[104.63008,24.397958],[104.610986,24.377246],[104.641783,24.367979],[104.70892,24.321087],[104.721239,24.340173],[104.703377,24.419757],[104.715695,24.441552],[104.74834,24.435559],[104.765587,24.45953],[104.784681,24.443732],[104.83642,24.446456],[104.914028,24.426296],[104.930042,24.411038],[104.979933,24.412673],[105.042759,24.442097],[105.106817,24.414853],[105.111744,24.37234],[105.138846,24.376701],[105.188121,24.347261],[105.196744,24.326541],[105.164715,24.288362],[105.215222,24.214699],[105.24294,24.208695],[105.229389,24.165567],[105.182577,24.167205],[105.20044,24.105491],[105.260186,24.061236],[105.292831,24.074896],[105.273121,24.092927],[105.320548,24.116416],[105.334099,24.094566],[105.395692,24.065607],[105.406163,24.043748],[105.493011,24.016965],[105.533663,24.130071],[105.594641,24.137718],[105.628518,24.126794],[105.649459,24.032816],[105.704278,24.0667],[105.739387,24.059596],[105.765256,24.073804],[105.802212,24.051945],[105.796669,24.023524],[105.841633,24.03063],[105.859495,24.056864],[105.89214,24.040468],[105.908154,24.069432],[105.901995,24.099482],[105.919241,24.122425],[105.963589,24.110954],[105.998081,24.120786],[106.011632,24.099482],[106.04982,24.089649],[106.053516,24.051399],[106.096631,24.018058],[106.091088,23.998924],[106.128044,23.956819],[106.157609,23.891174],[106.192718,23.879135],[106.173008,23.861622],[106.192102,23.824947],[106.136667,23.795381],[106.157609,23.724175],[106.149602,23.665538],[106.120653,23.605229],[106.141595,23.569579],[106.08616,23.524043],[106.071994,23.495506],[106.039965,23.484529],[105.999929,23.447748],[105.986378,23.489469],[105.935871,23.508678],[105.913081,23.499348],[105.89214,23.52514],[105.852103,23.526786],[105.815763,23.507031],[105.805908,23.467512],[105.758481,23.459826],[105.699966,23.40162],[105.637757,23.404366],[105.694423,23.363168],[105.699966,23.327453],[105.649459,23.346136],[105.593409,23.312614],[105.560148,23.257093],[105.526272,23.234548],[105.542902,23.184495],[105.558916,23.177893],[105.574931,23.066165],[105.625438,23.064513],[105.648844,23.078828],[105.724604,23.06231],[105.74185,23.030921],[105.780039,23.022659],[105.805908,22.994565],[105.839169,22.987403],[105.879205,22.916865],[105.893987,22.936707],[105.959277,22.948832],[105.994385,22.93781],[106.019639,22.990709],[106.08616,22.996218],[106.106486,22.980792],[106.153914,22.988505],[106.206885,22.978588],[106.270326,22.907494],[106.258007,22.889852],[106.286957,22.867245],[106.366413,22.857871],[106.37134,22.878273],[106.41384,22.877171],[106.504383,22.91025],[106.525941,22.946628],[106.562282,22.923479],[106.606013,22.925684],[106.631267,22.88103],[106.657136,22.863385],[106.674998,22.891506],[106.716882,22.881582],[106.709491,22.866142],[106.774781,22.812643],[106.776012,22.813746],[106.778476,22.814298],[106.779092,22.813746],[106.779708,22.813195],[106.78094,22.813195],[106.784636,22.812643],[106.796338,22.812091],[106.801882,22.815401],[106.804346,22.816505],[106.808657,22.817608],[106.813585,22.817608],[106.838838,22.803265],[106.820976,22.768504],[106.768621,22.739254],[106.780324,22.708894],[106.756302,22.68957],[106.711955,22.575228],[106.650361,22.575228],[106.61402,22.602303],[106.585071,22.517192],[106.588151,22.472958],[106.560434,22.455813],[106.588767,22.374486],[106.562897,22.345706],[106.663296,22.33076],[106.670071,22.283144],[106.688549,22.260438],[106.7021,22.207257],[106.673151,22.182322],[106.706411,22.160707],[106.691629,22.13521],[106.71565,22.089745],[106.706411,22.021521],[106.683006,21.999882],[106.698404,21.959925],[106.73844,22.008205],[106.790179,22.004876],[106.802498,21.98157],[106.859164,21.986009],[106.926302,21.967695],[106.935541,21.933836],[106.974345,21.923288],[106.999598,21.947714],[107.05996,21.914959],[107.058729,21.887196],[107.018693,21.859427],[107.018077,21.81943],[107.093837,21.803317],[107.148656,21.758858],[107.194851,21.736624],[107.199163,21.718833],[107.242279,21.703265],[107.271844,21.727173],[107.310648,21.733844],[107.356843,21.667674],[107.363619,21.602031],[107.388256,21.594241],[107.431372,21.642088],[107.477567,21.659888],[107.500973,21.613715],[107.486806,21.59591],[107.547168,21.58645],[107.584741,21.614828],[107.603219,21.597579],[107.712856,21.616497],[107.807711,21.655438],[107.837892,21.640419],[107.863761,21.650988],[107.892095,21.622617],[107.893942,21.596466],[107.929051,21.585893],[107.958,21.534131],[108.034376,21.545821],[108.108289,21.508521],[108.193905,21.519656],[108.156332,21.55083],[108.205608,21.597579],[108.241332,21.599805],[108.249955,21.561406],[108.210535,21.505737],[108.230245,21.491259],[108.330027,21.540254],[108.397781,21.533017],[108.492635,21.554727],[108.591802,21.677129],[108.626294,21.67991],[108.658939,21.643757],[108.678033,21.659331],[108.735931,21.628181],[108.734084,21.626512],[108.745786,21.602587],[108.801837,21.626512],[108.83325,21.610933],[108.881293,21.627068],[108.937959,21.589789],[109.093792,21.579215],[109.09872,21.571424],[109.110422,21.568085],[109.138756,21.567528],[109.142451,21.511861],[109.074698,21.489589],[109.039589,21.457844],[109.046365,21.424421],[109.095024,21.419407],[109.138756,21.388762],[109.186183,21.390991],[109.245929,21.425536],[109.41716,21.438906],[109.484914,21.453388],[109.529877,21.437234],[109.540964,21.466199],[109.576689,21.493487],[109.604406,21.523553],[109.612413,21.556953],[109.654913,21.493487],[109.704188,21.462857],[109.785492,21.45673],[109.788572,21.490702],[109.754695,21.556396],[109.742992,21.616497],[109.778101,21.670455],[109.786108,21.637638],[109.839695,21.636525],[109.888354,21.652101],[109.888354,21.652101],[109.916071,21.668787],[109.940093,21.769419],[109.94502,21.84443],[109.999839,21.881643],[110.050962,21.857205],[110.101469,21.86998],[110.12857,21.902744],[110.196323,21.899968],[110.212338,21.886085],[110.212338,21.886085],[110.224041,21.882198],[110.224041,21.882198],[110.283787,21.892194],[110.290562,21.917736],[110.337374,21.887751],[110.391576,21.89386],[110.378642,21.939942],[110.378642,21.939942],[110.374946,21.967695],[110.374946,21.967695],[110.352772,21.97602],[110.359547,22.015973],[110.35154,22.097508],[110.364475,22.125785],[110.326287,22.152393],[110.34846,22.195621],[110.378026,22.164587],[110.414366,22.208365],[110.456866,22.189526],[110.505525,22.14297],[110.55788,22.196175],[110.602843,22.18343],[110.598532,22.162924],[110.629329,22.149068],[110.678604,22.172901],[110.646575,22.220554],[110.687843,22.249914],[110.725415,22.29588],[110.759292,22.274837],[110.787009,22.28259],[110.749437,22.329653],[110.74143,22.361757],[110.711249,22.369506],[110.712481,22.440879],[110.688459,22.477935],[110.74143,22.464109],[110.740198,22.498947],[110.762988,22.518298],[110.749437,22.556991],[110.778386,22.585174],[110.812263,22.576333],[110.897878,22.591805],[110.896031,22.613352],[110.950233,22.61059],[110.958856,22.636553],[110.997045,22.631582],[111.055559,22.648705],[111.089435,22.695643],[111.058023,22.729871],[111.118385,22.744773],[111.185522,22.735942],[111.218167,22.748085],[111.358601,22.889301],[111.374615,22.938361],[111.362913,22.967568],[111.403565,22.99126],[111.389398,23.005583],[111.433746,23.036428],[111.43313,23.073322],[111.402333,23.066165],[111.377695,23.082132],[111.365992,23.14488],[111.38447,23.16744],[111.388782,23.210349],[111.36476,23.240047],[111.353058,23.284582],[111.376463,23.30437],[111.363528,23.340641],[111.389398,23.375804],[111.383239,23.399423],[111.399869,23.469159],[111.428818,23.466414],[111.479941,23.532822],[111.487332,23.626615],[111.555702,23.64087],[111.615448,23.639225],[111.614832,23.65896],[111.666571,23.718696],[111.621607,23.725819],[111.627766,23.78881],[111.654868,23.833159],[111.683201,23.822758],[111.683201,23.822758],[111.722621,23.823305],[111.8107,23.80688],[111.824867,23.832612],[111.812548,23.887343],[111.845809,23.904305],[111.854432,23.947521],[111.911714,23.943693],[111.940664,23.987989],[111.92157,24.012045],[111.878454,24.109862],[111.886461,24.163929],[111.871062,24.176487],[111.877222,24.227252],[111.912946,24.221795],[111.958526,24.263813],[111.986243,24.25672],[111.990555,24.279634],[112.026279,24.294908],[112.05954,24.339628],[112.057692,24.387057],[112.025047,24.438828],[111.985011,24.467701],[112.009649,24.503103],[112.007185,24.534684],[111.972077,24.578775],[111.936968,24.595645],[111.927729,24.629378],[111.953598,24.64733],[111.939432,24.686487],[111.961606,24.721283],[112.024431,24.740308],[111.951135,24.769655],[111.929577,24.75607],[111.875374,24.756613],[111.868599,24.771829],[111.814396,24.770199],[111.783599,24.785957],[111.708455,24.788673],[111.666571,24.760961],[111.637621,24.715303],[111.641933,24.684856],[111.588962,24.690837],[111.570484,24.64461],[111.526752,24.637538],[111.499035,24.667997],[111.451608,24.665822],[111.431282,24.687574],[111.461463,24.728894],[111.479325,24.797366],[111.449144,24.857113],[111.447296,24.892947],[111.470086,24.92877],[111.434977,24.951562],[111.43313,24.979774],[111.460231,24.992793],[111.467622,25.02208],[111.416499,25.047566],[111.435593,25.093642],[111.375231,25.128324],[111.36784,25.108817],[111.321645,25.105023],[111.274833,25.151078],[111.221862,25.106649],[111.200921,25.074672],[111.139943,25.042144],[111.101754,25.035095],[111.100522,24.945593],[111.009363,24.921172],[110.968711,24.975434],[110.951465,25.04377],[110.98411,25.101772],[110.998892,25.161371],[111.112841,25.21715],[111.103602,25.285351],[111.138711,25.303748],[111.184906,25.367034],[111.210776,25.363248],[111.279145,25.42326],[111.32842,25.521592],[111.324724,25.564249],[111.343202,25.602574],[111.309942,25.645203],[111.30871,25.720171],[111.399869,25.744431],[111.442369,25.77192],[111.43313,25.84627],[111.4861,25.859196],[111.460231,25.885042],[111.383239,25.881812],[111.376463,25.906039],[111.346282,25.906577],[111.297007,25.874274],[111.29208,25.854349],[111.251428,25.864581],[111.230486,25.916267],[111.189834,25.953402],[111.235413,26.048071],[111.267442,26.058824],[111.244652,26.078177],[111.26621,26.095914],[111.258203,26.151796],[111.274833,26.183486],[111.271754,26.217316],[111.293311,26.222148],[111.277913,26.272066],[111.228022,26.261333],[111.204616,26.276359],[111.208928,26.30426],[111.090667,26.308016],[111.008132,26.336982],[111.008747,26.35897],[110.974255,26.385778],[110.94469,26.373447],[110.944074,26.326791],[110.926212,26.320354],[110.939762,26.286554],[110.836284,26.255966],[110.759292,26.248451],[110.73527,26.270993],[110.742046,26.313917],[110.721104,26.294066],[110.673676,26.317135],[110.643495,26.308552],[110.612083,26.333764],[110.584365,26.296749],[110.552952,26.283335],[110.546793,26.233421],[110.495054,26.166299],[110.477808,26.179727],[110.437772,26.153945],[110.373098,26.088927],[110.325671,25.975462],[110.257301,25.961473],[110.24991,26.010965],[110.181541,26.060437],[110.168606,26.028713],[110.100853,26.020108],[110.065128,26.050221],[110.100853,26.132455],[110.099005,26.168985],[110.03002,26.166299],[109.970274,26.195301],[109.904368,26.135679],[109.898825,26.095377],[109.864332,26.027637],[109.814441,26.041081],[109.782412,25.996981],[109.806434,25.973848],[109.826144,25.911422],[109.811361,25.877504],[109.779333,25.866196],[109.768246,25.890427],[109.685094,25.880197],[109.67955,25.921649],[109.693717,25.959321],[109.710963,25.954478],[109.730057,25.989988],[109.649369,26.016882],[109.635203,26.047533],[109.588391,26.019571],[109.560058,26.021184],[109.513247,25.998056],[109.48245,26.029788]]],[[[105.096346,24.928228],[105.09573,24.92877],[105.077868,24.918459],[105.082179,24.915745],[105.096346,24.928228]]],[[[109.088249,21.014934],[109.11227,21.02499],[109.117814,21.017727],[109.144299,21.041189],[109.138756,21.067439],[109.09256,21.057386],[109.088865,21.031134],[109.088249,21.014934]]]]}},{"type":"Feature","properties":{"adcode":460000,"name":"\u6D77\u5357\u7701","center":[110.33119,20.031971],"centroid":[109.754859,19.189767],"childrenNum":19,"level":"province","parent":{"adcode":100000},"subFeatureIndex":20,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[110.106396,20.026812],[110.042339,19.991384],[109.997375,19.980136],[109.965346,19.993634],[109.898825,19.994196],[109.855093,19.984073],[109.814441,19.993072],[109.76147,19.981261],[109.712195,20.017253],[109.657993,20.01163],[109.585312,19.98801],[109.526797,19.943573],[109.498464,19.873236],[109.411001,19.895184],[109.349407,19.898561],[109.300748,19.917693],[109.25948,19.898561],[109.255784,19.867045],[109.231147,19.863105],[109.159082,19.79048],[109.169553,19.736411],[109.147379,19.704863],[109.093792,19.68965],[109.048829,19.619764],[108.993394,19.587065],[108.92872,19.524468],[108.855424,19.469182],[108.806148,19.450561],[108.765496,19.400894],[108.694047,19.387346],[108.644772,19.349518],[108.609048,19.276661],[108.591186,19.141592],[108.598577,19.055633],[108.630606,19.003017],[108.637997,18.924346],[108.595497,18.872256],[108.593033,18.809386],[108.65278,18.740258],[108.663866,18.67337],[108.641077,18.565614],[108.644772,18.486738],[108.68912,18.447571],[108.776583,18.441894],[108.881293,18.416344],[108.905315,18.389087],[108.944735,18.314107],[109.006329,18.323198],[109.108575,18.323766],[109.138756,18.268081],[109.17448,18.260125],[109.287813,18.264671],[109.355566,18.215221],[109.441182,18.199303],[109.467051,18.173718],[109.527413,18.169169],[109.584696,18.143579],[109.661688,18.175424],[109.726362,18.177698],[109.749767,18.193618],[109.785492,18.339672],[109.919767,18.375457],[110.022629,18.360121],[110.070672,18.376025],[110.090382,18.399309],[110.116867,18.506602],[110.214186,18.578662],[110.246215,18.609859],[110.329366,18.642185],[110.367555,18.631977],[110.499366,18.651824],[110.499366,18.751592],[110.578206,18.784458],[110.590525,18.838841],[110.585597,18.88075],[110.619474,19.152334],[110.676756,19.286264],[110.706321,19.320153],[110.729727,19.378878],[110.787009,19.399765],[110.844292,19.449996],[110.888023,19.518827],[110.920668,19.552668],[111.008747,19.60398],[111.061718,19.612436],[111.071573,19.628784],[111.043856,19.763448],[111.013675,19.850159],[110.966248,20.018377],[110.940994,20.028499],[110.871393,20.01163],[110.808567,20.035808],[110.778386,20.068415],[110.744509,20.074036],[110.717408,20.148778],[110.687843,20.163947],[110.655814,20.134169],[110.562191,20.110006],[110.526467,20.07516],[110.495054,20.077408],[110.387265,20.113378],[110.318279,20.108882],[110.28933,20.056047],[110.243135,20.077408],[110.144585,20.074598],[110.106396,20.026812]]],[[[112.208597,3.876129],[112.241858,3.845677],[112.280046,3.86777],[112.260336,3.917925],[112.219068,3.908969],[112.208597,3.876129]]],[[[113.266165,8.125929],[113.311129,8.177469],[113.343157,8.193463],[113.288955,8.119412],[113.349933,8.172137],[113.386273,8.238479],[113.386273,8.289412],[113.354244,8.304217],[113.353628,8.237887],[113.293882,8.176284],[113.266165,8.125929]]],[[[111.99733,3.848065],[112.015192,3.823583],[112.064467,3.830152],[112.073707,3.865979],[112.03367,3.892251],[111.99733,3.848065]]],[[[111.463311,17.077491],[111.536607,17.104949],[111.4861,17.058039],[111.559397,17.087788],[111.542151,17.11982],[111.452224,17.092936],[111.463311,17.077491]]],[[[117.708319,15.182712],[117.712631,15.118592],[117.726798,15.105303],[117.827812,15.111659],[117.72495,15.131302],[117.720638,15.195418],[117.74466,15.217941],[117.784696,15.16885],[117.838899,15.15903],[117.782848,15.187333],[117.748355,15.230068],[117.715095,15.222561],[117.708319,15.182712]]],[[[112.241858,3.942404],[112.292365,3.946583],[112.288053,3.97345],[112.254177,3.97942],[112.241858,3.942404]]],[[[111.734324,16.19732],[111.779903,16.19732],[111.81686,16.224329],[111.813164,16.261676],[111.782367,16.273741],[111.716462,16.249036],[111.789758,16.250186],[111.790374,16.220307],[111.734324,16.19732]]],[[[111.649324,16.255931],[111.577875,16.208239],[111.56802,16.162834],[111.611136,16.156511],[111.690592,16.211112],[111.606825,16.177779],[111.598817,16.198469],[111.681353,16.262251],[111.649324,16.255931]]],[[[113.896887,7.607204],[113.919677,7.566865],[113.98743,7.536014],[114.058879,7.537794],[114.157429,7.561525],[114.289856,7.617288],[114.368696,7.638642],[114.407501,7.683126],[114.419819,7.765557],[114.464167,7.814771],[114.540543,7.862201],[114.555326,7.891249],[114.540543,7.945783],[114.511594,7.966527],[114.47279,7.968898],[114.414892,7.952895],[114.268298,7.870501],[114.211632,7.786904],[114.095219,7.721082],[114.029314,7.670078],[113.921524,7.639235],[113.896887,7.607204]]],[[[113.976959,8.872888],[114.013299,8.836817],[114.035473,8.783591],[114.060111,8.816119],[114.041017,8.843913],[113.989894,8.878801],[113.976959,8.872888]]],[[[113.956017,8.840365],[113.975111,8.793054],[114.012068,8.798376],[113.977575,8.841548],[113.956017,8.840365]]],[[[111.97454,16.323715],[112.002258,16.306484],[112.07617,16.323715],[112.074938,16.349558],[112.047221,16.360469],[112.002874,16.350707],[111.97454,16.323715]]],[[[111.739251,16.452898],[111.766969,16.470116],[111.786679,16.520039],[111.759577,16.545857],[111.765737,16.495366],[111.739251,16.452898]]],[[[112.216604,8.866383],[112.206133,8.88767],[112.180264,8.862244],[112.216604,8.866383]]],[[[113.792177,7.373422],[113.828518,7.362145],[113.829134,7.383511],[113.792177,7.373422]]],[[[114.194386,8.764664],[114.201161,8.727991],[114.248588,8.724442],[114.222103,8.784773],[114.194386,8.764664]]],[[[112.232619,16.996239],[112.207981,16.987081],[112.222764,16.960751],[112.292981,16.96762],[112.266496,16.993949],[112.232619,16.996239]]],[[[114.689601,10.345648],[114.702536,10.312677],[114.725941,10.319154],[114.747499,10.37214],[114.717318,10.380381],[114.689601,10.345648]]],[[[115.837712,9.709775],[115.861117,9.694438],[115.867277,9.650191],[115.901153,9.67084],[115.925791,9.781734],[115.901153,9.795888],[115.870972,9.778785],[115.837712,9.709775]]],[[[114.617536,9.965688],[114.642173,9.917351],[114.672355,9.927963],[114.685905,9.979245],[114.617536,9.965688]]],[[[113.769387,7.636862],[113.773699,7.601865],[113.814967,7.603051],[113.831597,7.644573],[113.769387,7.636862]]],[[[109.463972,7.344339],[109.463972,7.315254],[109.513247,7.320002],[109.571761,7.373422],[109.654297,7.479648],[109.709115,7.511095],[109.791651,7.524742],[109.938861,7.504569],[109.948716,7.522962],[109.904984,7.55144],[109.816289,7.572797],[109.72205,7.575763],[109.653065,7.559745],[109.536037,7.448792],[109.463972,7.344339]]],[[[116.273181,8.879392],[116.294123,8.858105],[116.332311,8.901269],[116.305826,8.917233],[116.273181,8.879392]]],[[[112.476531,16.001247],[112.570154,16.011027],[112.612037,16.039212],[112.588016,16.070844],[112.462364,16.043813],[112.448814,16.005274],[112.476531,16.001247]]],[[[112.537509,8.846278],[112.57077,8.815527],[112.639755,8.818484],[112.598487,8.859288],[112.537509,8.846278]]],[[[114.469095,10.836261],[114.475254,10.814512],[114.513442,10.848605],[114.565181,10.836261],[114.593514,10.856245],[114.587355,10.909138],[114.55471,10.900911],[114.469095,10.836261]]],[[[112.409393,16.294996],[112.383524,16.265698],[112.411241,16.2634],[112.475915,16.288677],[112.531349,16.285805],[112.536893,16.312228],[112.509176,16.317397],[112.409393,16.294996]]],[[[116.48876,10.395686],[116.461658,10.34918],[116.467202,10.309144],[116.511549,10.297957],[116.566368,10.304434],[116.644592,10.335051],[116.637817,10.365076],[116.514629,10.34918],[116.542346,10.41982],[116.526332,10.426883],[116.48876,10.395686]]],[[[112.349031,16.912088],[112.360734,16.925257],[112.334249,16.962469],[112.30222,16.963041],[112.349031,16.912088]]],[[[111.500267,16.45175],[111.49534,16.4374],[111.545847,16.43453],[111.538455,16.461507],[111.500267,16.45175]]],[[[115.500177,9.897897],[115.54822,9.869007],[115.585177,9.896128],[115.581481,9.917351],[115.518039,9.933857],[115.500177,9.897897]]],[[[114.669891,8.210048],[114.691449,8.18517],[114.74134,8.189316],[114.726557,8.21064],[114.669891,8.210048]]],[[[114.507899,8.120004],[114.530073,8.103415],[114.595978,8.120596],[114.624311,8.149626],[114.595978,8.15792],[114.507899,8.120004]]],[[[115.16757,8.386523],[115.18112,8.345668],[115.235939,8.321982],[115.285214,8.314876],[115.315395,8.356326],[115.299381,8.370537],[115.202678,8.395403],[115.16757,8.386523]]],[[[113.895039,8.00505],[113.904894,7.963564],[113.9708,7.944597],[113.969568,7.974825],[113.940003,8.018088],[113.895039,8.00505]]],[[[115.436119,9.393447],[115.450286,9.345028],[115.469996,9.3592],[115.456445,9.417064],[115.436119,9.393447]]],[[[116.457347,9.174326],[116.477057,9.137103],[116.500462,9.164282],[116.457347,9.174326]]],[[[113.638192,8.976942],[113.654823,8.962163],[113.730583,9.004133],[113.719496,9.020092],[113.644968,8.989355],[113.638192,8.976942]]],[[[114.696992,11.004322],[114.710543,11.001972],[114.793079,11.07657],[114.799854,11.10476],[114.766593,11.110045],[114.710543,11.039567],[114.696992,11.004322]]],[[[114.62,11.432264],[114.652644,11.436957],[114.661884,11.522584],[114.621232,11.518479],[114.62,11.432264]]],[[[114.910723,10.863298],[114.931049,10.841551],[114.959998,10.902087],[114.934129,10.902674],[114.910723,10.863298]]],[[[111.572948,16.470116],[111.578491,16.447158],[111.614216,16.44027],[111.592658,16.490775],[111.572948,16.470116]]],[[[113.939387,8.875253],[113.912285,8.888853],[113.893807,8.862836],[113.916597,8.837999],[113.939387,8.875253]]],[[[109.936397,7.848566],[109.936397,7.823665],[109.988136,7.8124],[110.050346,7.846194],[110.082991,7.896584],[110.078063,7.949339],[110.0331,7.944597],[109.953027,7.888878],[109.936397,7.848566]]],[[[116.727128,11.501473],[116.765316,11.430504],[116.772092,11.445755],[116.738215,11.514961],[116.727128,11.501473]]],[[[111.690592,16.587731],[111.724469,16.560198],[111.717078,16.59404],[111.690592,16.587731]]],[[[112.507328,16.466098],[112.586784,16.525777],[112.575081,16.537251],[112.499321,16.493645],[112.507328,16.466098]]],[[[111.761425,16.061642],[111.791606,16.028859],[111.828563,16.049565],[111.829795,16.070844],[111.761425,16.061642]]],[[[113.845764,10.018733],[113.865474,10.00341],[113.872249,10.123029],[113.856851,10.12185],[113.845764,10.018733]]],[[[114.791847,8.160882],[114.777064,8.114079],[114.812173,8.110524],[114.818332,8.141332],[114.791847,8.160882]]],[[[116.557129,9.745167],[116.566368,9.718623],[116.593469,9.723932],[116.557129,9.745167]]],[[[115.28275,10.191951],[115.288294,10.172513],[115.333257,10.200198],[115.28891,10.211388],[115.28275,10.191951]]],[[[116.832454,10.476908],[116.855243,10.468669],[116.868794,10.495739],[116.832454,10.476908]]],[[[114.703151,16.170307],[114.816484,16.198469],[114.802934,16.215135],[114.704383,16.199044],[114.703151,16.170307]]],[[[115.97753,9.321997],[115.926407,9.311366],[115.943037,9.269433],[115.976298,9.268252],[115.999088,9.293649],[115.97753,9.321997]]],[[[113.660366,9.231039],[113.676997,9.202683],[113.697323,9.225722],[113.660366,9.231039]]],[[[114.665579,7.590001],[114.671739,7.563898],[114.72163,7.59178],[114.703767,7.614915],[114.665579,7.590001]]],[[[114.493116,10.717504],[114.513442,10.722208],[114.562717,10.778064],[114.539312,10.793349],[114.493116,10.717504]]],[[[117.770529,10.773361],[117.798862,10.753371],[117.835819,10.803931],[117.831507,10.838612],[117.801942,10.839788],[117.775457,10.809222],[117.770529,10.773361]]],[[[114.242429,10.242014],[114.263371,10.239658],[114.326197,10.284414],[114.312646,10.300901],[114.265219,10.275581],[114.242429,10.242014]]],[[[114.688985,11.469217],[114.722246,11.429331],[114.737644,11.463938],[114.720398,11.49209],[114.688985,11.469217]]],[[[116.638433,10.503977],[116.653215,10.491031],[116.70865,10.492797],[116.699411,10.517511],[116.638433,10.503977]]],[[[110.459946,8.116449],[110.471032,8.072012],[110.554184,8.093935],[110.599764,8.156735],[110.568351,8.17273],[110.461793,8.128298],[110.459946,8.116449]]],[[[111.463311,8.52504],[111.497187,8.523857],[111.509506,8.550489],[111.463311,8.52504]]],[[[115.258113,8.509652],[115.271048,8.477098],[115.296301,8.510836],[115.258113,8.509652]]],[[[113.221817,8.073789],[113.235984,8.068456],[113.283411,8.111117],[113.269861,8.120004],[113.221817,8.073789]]],[[[114.074893,10.929118],[114.064422,10.904437],[114.110002,10.918541],[114.096451,10.947921],[114.074893,10.929118]]],[[[117.258068,10.320331],[117.299336,10.313855],[117.299952,10.343293],[117.274698,10.358011],[117.258068,10.320331]]],[[[114.212864,16.040937],[114.31203,16.034611],[114.306487,16.057616],[114.268914,16.059342],[114.212864,16.040937]]],[[[110.609003,8.010976],[110.642879,7.989049],[110.641648,8.031125],[110.622553,8.041199],[110.609003,8.010976]]],[[[115.509416,8.490712],[115.521735,8.460523],[115.55438,8.461115],[115.569162,8.49012],[115.558691,8.523265],[115.514344,8.519122],[115.509416,8.490712]]],[[[111.539071,7.54432],[111.542767,7.524742],[111.583419,7.543134],[111.612368,7.592374],[111.566788,7.606017],[111.539071,7.54432]]],[[[111.657947,8.672974],[111.665955,8.622683],[111.717694,8.6499],[111.697368,8.67889],[111.657947,8.672974]]],[[[110.460561,7.799948],[110.487663,7.783346],[110.511684,7.805878],[110.485199,7.827815],[110.460561,7.799948]]],[[[112.345952,8.926101],[112.392763,8.919598],[112.384756,8.946793],[112.345952,8.926101]]],[[[116.469665,9.810041],[116.47952,9.785272],[116.50847,9.79117],[116.490607,9.821246],[116.469665,9.810041]]],[[[111.925265,8.070827],[111.949287,8.05068],[111.994866,8.047125],[112.018888,8.065494],[112.013344,8.093342],[111.95483,8.106377],[111.925265,8.070827]]],[[[114.457392,15.599305],[114.466631,15.576823],[114.491884,15.59354],[114.457392,15.599305]]],[[[114.985252,11.078332],[115.013585,11.063062],[115.021592,11.085967],[114.985252,11.078332]]],[[[114.10569,16.004124],[114.110618,15.978235],[114.132176,16.007575],[114.10569,16.004124]]],[[[116.045283,10.095338],[116.067457,10.065876],[116.09579,10.09357],[116.070537,10.12892],[116.045283,10.095338]]],[[[117.266691,10.69163],[117.348611,10.672811],[117.404661,10.671047],[117.418212,10.702803],[117.369553,10.7422],[117.293176,10.735144],[117.266691,10.69163]]],[[[114.854057,7.244611],[114.819564,7.192957],[114.869455,7.198895],[114.854057,7.244611]]],[[[112.823305,8.910729],[112.859645,8.889444],[112.873196,8.908364],[112.823305,8.910729]]],[[[111.670266,7.651098],[111.707223,7.648725],[111.749722,7.703884],[111.726317,7.729977],[111.691208,7.711593],[111.670266,7.651098]]],[[[112.207981,8.835634],[112.235699,8.827355],[112.241242,8.852783],[112.207981,8.835634]]],[[[112.527654,5.79444],[112.531965,5.766455],[112.562762,5.75931],[112.562146,5.820637],[112.527654,5.79444]]],[[[114.599058,8.846278],[114.645869,8.844504],[114.68221,8.881166],[114.665579,8.900087],[114.61692,8.881166],[114.599058,8.846278]]],[[[114.868223,7.983715],[114.907643,7.951117],[114.914419,8.00742],[114.883006,8.011569],[114.868223,7.983715]]],[[[112.945261,8.410204],[112.985297,8.429149],[112.949572,8.432701],[112.945261,8.410204]]],[[[113.600004,6.961929],[113.580294,6.920344],[113.62341,6.942325],[113.600004,6.961929]]],[[[116.695099,16.345538],[116.708034,16.299591],[116.738831,16.303612],[116.747454,16.360469],[116.717889,16.373676],[116.695099,16.345538]]],[[[117.347995,10.090624],[117.354154,10.06293],[117.385567,10.063519],[117.373864,10.106532],[117.347995,10.090624]]],[[[112.993304,19.472003],[113.038883,19.480466],[113.048123,19.506417],[113.029028,19.52898],[112.993304,19.52616],[112.980369,19.496263],[112.993304,19.472003]]],[[[114.448153,16.034035],[114.485109,16.034611],[114.521449,16.056466],[114.465399,16.067393],[114.448153,16.034035]]],[[[113.832213,19.158552],[113.874097,19.151203],[113.914749,19.172119],[113.920293,19.223551],[113.875945,19.237113],[113.80696,19.222986],[113.799568,19.19925],[113.832213,19.158552]]],[[[112.650842,5.106941],[112.655769,5.055676],[112.682871,5.048522],[112.719211,5.075944],[112.678559,5.121247],[112.650842,5.106941]]],[[[111.638853,7.907254],[111.665339,7.887099],[111.712766,7.887099],[111.713382,7.927408],[111.651788,7.932743],[111.638853,7.907254]]],[[[112.244322,8.874662],[112.281278,8.855148],[112.288669,8.885896],[112.244322,8.874662]]],[[[112.89229,7.844416],[112.929862,7.827815],[112.93171,7.867537],[112.89229,7.844416]]],[[[112.583088,5.56159],[112.606494,5.51751],[112.614501,5.465683],[112.642834,5.489512],[112.616349,5.568737],[112.583088,5.56159]]],[[[112.523342,5.656289],[112.5449,5.616386],[112.565842,5.63068],[112.56153,5.677133],[112.528886,5.687257],[112.523342,5.656289]]],[[[115.361591,13.948985],[115.397315,13.92517],[115.438583,13.943757],[115.423185,13.977443],[115.377605,13.968732],[115.361591,13.948985]]],[[[113.596924,10.240836],[113.617866,10.22199],[113.638192,10.243192],[113.596924,10.240836]]],[[[113.860546,15.477068],[113.893807,15.463802],[113.890112,15.490909],[113.860546,15.477068]]],[[[112.907072,4.993079],[112.943413,4.991887],[112.952652,5.047926],[112.910768,5.038388],[112.907072,4.993079]]],[[[112.557219,5.109326],[112.568922,5.071771],[112.610806,5.091443],[112.601567,5.120055],[112.557219,5.109326]]],[[[112.350263,5.621747],[112.385988,5.615791],[112.385372,5.643187],[112.350263,5.621747]]],[[[112.226459,16.759147],[112.254177,16.751698],[112.262184,16.778057],[112.211061,16.795819],[112.226459,16.759147]]],[[[112.233851,15.69612],[112.25972,15.734718],[112.240626,15.741055],[112.20367,15.71398],[112.233851,15.69612]]],[[[112.612037,5.367973],[112.640371,5.347715],[112.685334,5.371548],[112.690878,5.406702],[112.62374,5.401935],[112.612037,5.367973]]],[[[112.472219,5.73966],[112.496857,5.736683],[112.498089,5.775387],[112.472219,5.73966]]],[[[113.217506,6.306249],[113.230441,6.285429],[113.243991,6.325878],[113.217506,6.306249]]],[[[116.152457,9.579384],[116.189413,9.565221],[116.187565,9.595317],[116.152457,9.579384]]],[[[114.948911,7.508722],[114.960614,7.484988],[115.012353,7.484988],[115.013585,7.525928],[114.948911,7.508722]]],[[[111.553854,7.807656],[111.585267,7.771487],[111.619759,7.840265],[111.603745,7.861608],[111.553854,7.807656]]],[[[113.938771,15.8355],[113.973263,15.805558],[113.9708,15.83953],[113.938771,15.8355]]],[[[114.926122,16.036911],[114.895325,16.036336],[114.910723,16.001823],[114.926122,16.036911]]],[[[116.749302,9.056736],[116.699411,9.049053],[116.70865,9.024229],[116.740679,9.028367],[116.749302,9.056736]]],[[[112.64653,16.385733],[112.681639,16.400661],[112.660081,16.426494],[112.64653,16.385733]]],[[[111.203384,19.92557],[111.203384,19.925007],[111.204,19.92557],[111.204,19.926132],[111.203384,19.92557]]],[[[115.758256,10.461018],[115.776118,10.434534],[115.801987,10.463372],[115.758256,10.461018]]],[[[117.21372,10.735144],[117.187235,10.741612],[117.206945,10.707507],[117.21372,10.735144]]],[[[112.671784,16.331755],[112.701349,16.331755],[112.677943,16.35932],[112.671784,16.331755]]],[[[115.782277,10.541046],[115.795212,10.499858],[115.805067,10.524571],[115.782277,10.541046]]],[[[112.512255,9.544566],[112.50856,9.525679],[112.568922,9.516826],[112.567074,9.554008],[112.512255,9.544566]]],[[[114.610145,15.649447],[114.581195,15.625242],[114.610761,15.615444],[114.610145,15.649447]]],[[[117.299336,11.077745],[117.264227,11.063062],[117.284553,11.02547],[117.304263,11.027232],[117.299336,11.077745]]],[[[117.691073,11.048965],[117.653501,11.046029],[117.655965,11.024882],[117.690457,11.016658],[117.691073,11.048965]]],[[[114.166668,9.38459],[114.175291,9.342075],[114.195617,9.350933],[114.194386,9.391676],[114.166668,9.38459]]],[[[114.714854,9.736909],[114.693296,9.741038],[114.680978,9.707416],[114.704999,9.700337],[114.714854,9.736909]]],[[[112.554139,5.97839],[112.553523,5.942676],[112.575697,5.971247],[112.554139,5.97839]]]]}},{"type":"Feature","properties":{"adcode":500000,"name":"\u91CD\u5E86\u5E02","center":[106.504962,29.533155],"centroid":[107.8839,30.067297],"childrenNum":38,"level":"province","parent":{"adcode":100000},"subFeatureIndex":21,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[106.37442,28.525742],[106.403369,28.569901],[106.477282,28.530474],[106.504999,28.544669],[106.466811,28.586193],[106.49268,28.591448],[106.502535,28.661313],[106.528405,28.677591],[106.492064,28.742153],[106.461883,28.761041],[106.45326,28.817162],[106.474202,28.832891],[106.561666,28.756319],[106.56105,28.719062],[106.587535,28.691767],[106.6171,28.691242],[106.617716,28.66709],[106.651593,28.649235],[106.618332,28.645033],[106.63681,28.622972],[106.606629,28.593024],[106.615252,28.549401],[106.567825,28.523638],[106.564745,28.485247],[106.632499,28.503655],[106.697788,28.47683],[106.708259,28.450524],[106.747063,28.467361],[106.726121,28.51838],[106.73844,28.554657],[106.77786,28.563068],[106.756918,28.607211],[106.784636,28.626649],[106.807425,28.589346],[106.830831,28.623497],[106.866556,28.624548],[106.889345,28.695966],[106.86594,28.690192],[106.824056,28.756319],[106.845614,28.780975],[106.872099,28.777304],[106.923222,28.809821],[106.951555,28.766812],[106.988512,28.776254],[106.983584,28.851239],[107.019308,28.861722],[107.016229,28.882685],[107.14188,28.887925],[107.206554,28.868535],[107.194851,28.838134],[107.227496,28.836037],[107.210866,28.817686],[107.219489,28.772582],[107.24659,28.76209],[107.261373,28.792514],[107.327894,28.810869],[107.339597,28.845997],[107.383945,28.848618],[107.41351,28.911502],[107.441227,28.943977],[107.412894,28.960211],[107.396879,28.993718],[107.364235,29.00942],[107.395647,29.041341],[107.369778,29.091558],[107.412278,29.094696],[107.427676,29.128682],[107.408582,29.138091],[107.401807,29.184603],[107.441227,29.203934],[107.486806,29.174153],[107.570574,29.218037],[107.589052,29.150113],[107.605683,29.164747],[107.659885,29.162656],[107.700537,29.141228],[107.749197,29.199754],[107.810791,29.139137],[107.784921,29.048143],[107.823725,29.034016],[107.810175,28.984295],[107.867457,28.960211],[107.882855,29.00628],[107.908725,29.007327],[107.925971,29.032446],[108.026369,29.039772],[108.070717,29.086328],[108.150173,29.053375],[108.193289,29.072207],[108.256115,29.040295],[108.277673,29.091558],[108.306622,29.079006],[108.297999,29.045527],[108.319556,28.961258],[108.345426,28.943453],[108.357745,28.893165],[108.346658,28.859625],[108.352817,28.815589],[108.386078,28.803003],[108.385462,28.772058],[108.347274,28.736381],[108.332491,28.679166],[108.439049,28.634003],[108.501258,28.626649],[108.50249,28.63768],[108.575787,28.659738],[108.636149,28.621396],[108.604736,28.590922],[108.610896,28.539412],[108.573939,28.531],[108.586874,28.463678],[108.609664,28.43579],[108.609048,28.407368],[108.576403,28.38631],[108.580099,28.343128],[108.611512,28.324691],[108.667562,28.334173],[108.656475,28.359981],[108.697127,28.401051],[108.688504,28.422106],[108.640461,28.456838],[108.657091,28.47683],[108.700207,28.48209],[108.709446,28.501026],[108.746402,28.45105],[108.780279,28.42579],[108.759953,28.389995],[108.783359,28.380518],[108.761801,28.304143],[108.726692,28.282011],[108.738395,28.228241],[108.772888,28.212949],[108.821547,28.245113],[108.855424,28.199764],[108.89546,28.219804],[108.923793,28.217167],[108.929952,28.19027],[109.005713,28.162837],[109.026655,28.220331],[109.086401,28.184467],[109.101799,28.202401],[109.081473,28.247749],[109.117198,28.277795],[109.152306,28.349975],[109.153538,28.417369],[109.191726,28.471043],[109.23361,28.474726],[109.274262,28.494714],[109.273646,28.53836],[109.319842,28.579886],[109.306907,28.62087],[109.252089,28.606685],[109.235458,28.61982],[109.201581,28.597753],[109.192958,28.636104],[109.271183,28.671816],[109.252704,28.691767],[109.294588,28.722211],[109.2989,28.7474],[109.241002,28.776779],[109.246545,28.80143],[109.235458,28.882161],[109.261328,28.952356],[109.292741,28.987436],[109.294588,29.015177],[109.319842,29.042388],[109.312451,29.066453],[109.240386,29.086328],[109.232378,29.119271],[109.215748,29.145409],[109.162777,29.180946],[109.139372,29.168927],[109.110422,29.21647],[109.141835,29.270256],[109.106727,29.288526],[109.11227,29.361053],[109.060531,29.403292],[109.034662,29.360531],[108.999553,29.36366],[108.983539,29.332883],[108.919481,29.3261],[108.934264,29.399643],[108.927488,29.435612],[108.884373,29.440824],[108.866511,29.470527],[108.888684,29.502305],[108.878213,29.539279],[108.913322,29.574679],[108.901003,29.604863],[108.870206,29.596537],[108.888068,29.628795],[108.844337,29.658443],[108.781511,29.635558],[108.797525,29.660003],[108.786438,29.691721],[108.752562,29.649082],[108.690968,29.689642],[108.676801,29.749412],[108.680497,29.800319],[108.658939,29.854833],[108.601041,29.863656],[108.556077,29.818493],[108.52528,29.770713],[108.548686,29.749412],[108.504954,29.728626],[108.504338,29.707836],[108.460606,29.741098],[108.437201,29.741098],[108.442744,29.778505],[108.422418,29.772791],[108.424266,29.815897],[108.371295,29.841337],[108.433505,29.880262],[108.467998,29.864175],[108.516041,29.885451],[108.517889,29.9394],[108.536367,29.983472],[108.532055,30.051873],[108.513577,30.057571],[108.546222,30.104178],[108.56778,30.157491],[108.551766,30.1637],[108.581947,30.255759],[108.54499,30.269716],[108.524048,30.309506],[108.501258,30.314673],[108.460606,30.35961],[108.431041,30.354446],[108.402092,30.376649],[108.430425,30.416397],[108.411331,30.438586],[108.42673,30.492233],[108.472925,30.487076],[108.512961,30.501515],[108.556077,30.487592],[108.56778,30.468508],[108.6497,30.53915],[108.642925,30.578831],[108.688504,30.58759],[108.698975,30.54482],[108.743939,30.494812],[108.789518,30.513374],[108.808612,30.491202],[108.838793,30.503062],[108.893612,30.565434],[108.971836,30.627766],[109.006329,30.626736],[109.042669,30.655571],[109.071002,30.640125],[109.111654,30.646303],[109.106111,30.61077],[109.105495,30.585529],[109.102415,30.580377],[109.101183,30.579346],[109.106111,30.570587],[109.103647,30.565949],[109.143683,30.521108],[109.191726,30.545851],[109.191726,30.545851],[109.245313,30.580892],[109.299516,30.630341],[109.314298,30.599953],[109.36111,30.551004],[109.337088,30.521623],[109.35495,30.487076],[109.418392,30.559766],[109.435638,30.595832],[109.535421,30.664837],[109.543428,30.63961],[109.574225,30.646818],[109.590855,30.69366],[109.625348,30.702923],[109.661072,30.738936],[109.656761,30.760538],[109.701724,30.783677],[109.780564,30.848437],[109.828608,30.864364],[109.894513,30.899803],[109.943788,30.878746],[110.008462,30.883369],[110.019549,30.829425],[110.048498,30.800642],[110.082375,30.799614],[110.151976,30.911613],[110.153824,30.953708],[110.172918,30.978853],[110.140889,30.987062],[110.140273,31.030661],[110.120563,31.0322],[110.119947,31.088592],[110.147048,31.116776],[110.180309,31.121899],[110.200019,31.158779],[110.180309,31.179774],[110.155671,31.279564],[110.161831,31.314338],[110.118715,31.409899],[110.054042,31.410921],[110.036795,31.436966],[109.98752,31.474744],[109.94502,31.47066],[109.969658,31.508935],[109.894513,31.519139],[109.837847,31.555354],[109.727594,31.548214],[109.745456,31.598182],[109.76455,31.602769],[109.737449,31.628761],[109.731289,31.700582],[109.683246,31.719929],[109.622268,31.711783],[109.585928,31.726546],[109.549587,31.73011],[109.502776,31.716365],[109.446109,31.722983],[109.381436,31.705165],[109.281654,31.716874],[109.282885,31.743343],[109.253936,31.759628],[109.279806,31.776418],[109.27611,31.79931],[109.195422,31.817618],[109.191111,31.85575],[109.123357,31.892851],[109.085785,31.929428],[108.986619,31.980205],[108.902235,31.984774],[108.837561,32.039072],[108.78767,32.04871],[108.75133,32.076098],[108.734084,32.106519],[108.676801,32.10297],[108.585026,32.17189],[108.543758,32.177969],[108.509882,32.201266],[108.480317,32.182527],[108.399013,32.194176],[108.370063,32.172397],[108.379918,32.154158],[108.379918,32.154158],[108.379303,32.153652],[108.379303,32.153652],[108.399628,32.147065],[108.452599,32.090296],[108.42981,32.061391],[108.372527,32.077112],[108.344194,32.067477],[108.362056,32.035521],[108.329411,32.020299],[108.370063,31.988835],[108.351585,31.971575],[108.307238,31.997463],[108.259194,31.967006],[108.343578,31.860834],[108.386078,31.854226],[108.391005,31.829822],[108.429194,31.809482],[108.455063,31.814059],[108.462454,31.780488],[108.535135,31.757592],[108.50557,31.734182],[108.514809,31.693963],[108.546838,31.665442],[108.519121,31.665952],[108.468614,31.636404],[108.442744,31.633856],[108.390389,31.591555],[108.386078,31.544134],[108.339266,31.539033],[108.344194,31.512506],[108.254883,31.49873],[108.233941,31.506894],[108.191441,31.492096],[108.193289,31.467598],[108.224086,31.464024],[108.216079,31.41041],[108.153869,31.371073],[108.185898,31.336831],[108.095354,31.268311],[108.038688,31.252964],[108.031297,31.217144],[108.07626,31.231985],[108.089811,31.204859],[108.025753,31.116263],[108.009123,31.109602],[108.026985,31.061938],[108.060246,31.052197],[108.00358,31.025533],[107.983254,30.983983],[107.942602,30.989114],[107.948145,30.918802],[107.994956,30.908533],[107.956152,30.882855],[107.851443,30.792931],[107.788001,30.81966],[107.763979,30.817091],[107.760899,30.862823],[107.739957,30.884396],[107.693146,30.875665],[107.645103,30.821202],[107.57735,30.847924],[107.515756,30.854603],[107.483111,30.838675],[107.498509,30.809381],[107.454162,30.771851],[107.454162,30.771851],[107.424597,30.74048],[107.458473,30.704981],[107.477567,30.664837],[107.516987,30.644759],[107.485575,30.598408],[107.427676,30.547397],[107.443075,30.53348],[107.408582,30.521623],[107.368546,30.468508],[107.338981,30.386459],[107.288474,30.337402],[107.257677,30.267131],[107.221337,30.213878],[107.103076,30.090198],[107.080286,30.094341],[107.084598,30.063786],[107.058113,30.043066],[107.055649,30.040476],[107.054417,30.040994],[107.053801,30.043584],[107.02054,30.036849],[106.981736,30.08502],[106.976193,30.083467],[106.94478,30.037367],[106.913367,30.025451],[106.862244,30.033223],[106.83699,30.049801],[106.825904,30.03115],[106.825904,30.03115],[106.785252,30.01716],[106.732281,30.027005],[106.724274,30.058607],[106.699636,30.074145],[106.700252,30.111944],[106.672535,30.122297],[106.677462,30.156974],[106.631883,30.186464],[106.611557,30.235596],[106.612173,30.235596],[106.611557,30.235596],[106.612173,30.235596],[106.612173,30.235596],[106.612789,30.235596],[106.612789,30.235596],[106.642354,30.246454],[106.611557,30.292455],[106.560434,30.31519],[106.545035,30.296589],[106.49884,30.295556],[106.43971,30.308473],[106.428623,30.254725],[106.401521,30.242318],[106.349167,30.24542],[106.334384,30.225772],[106.306667,30.238182],[106.296196,30.205603],[106.264167,30.20974],[106.260471,30.19681],[106.232754,30.185947],[106.180399,30.233011],[106.168696,30.303823],[106.132356,30.323972],[106.132972,30.30279],[106.07261,30.333786],[106.031958,30.373551],[105.943263,30.372002],[105.900763,30.405042],[105.84656,30.410203],[105.825618,30.436006],[105.792357,30.427234],[105.760329,30.384393],[105.754785,30.342567],[105.714749,30.322939],[105.720292,30.252657],[105.720292,30.252657],[105.670401,30.254208],[105.624822,30.275918],[105.619894,30.234045],[105.662394,30.210258],[105.642684,30.186464],[105.56138,30.183878],[105.550909,30.179222],[105.536127,30.152834],[105.596489,30.159043],[105.574315,30.130579],[105.580474,30.129544],[105.582938,30.127474],[105.582938,30.12385],[105.642068,30.101072],[105.638988,30.076216],[105.676561,30.06793],[105.687032,30.038922],[105.719677,30.042548],[105.753553,30.018196],[105.723372,29.975177],[105.730763,29.95755],[105.70243,29.924879],[105.717213,29.893753],[105.738771,29.891159],[105.707974,29.840818],[105.610655,29.837184],[105.582938,29.819013],[105.574931,29.744216],[105.529351,29.707836],[105.481924,29.718232],[105.476996,29.674564],[105.419714,29.688082],[105.38091,29.628275],[105.347649,29.621512],[105.332867,29.592374],[105.296526,29.571035],[105.305149,29.53199],[105.337794,29.459064],[105.334099,29.441345],[105.387069,29.455416],[105.387069,29.455416],[105.399388,29.43874],[105.372903,29.421018],[105.426489,29.419454],[105.441888,29.400686],[105.418482,29.352185],[105.42033,29.31149],[105.465294,29.322969],[105.459134,29.288526],[105.513337,29.283306],[105.521344,29.264513],[105.557684,29.278608],[105.631597,29.280174],[105.647612,29.253027],[105.695039,29.287482],[105.712285,29.219082],[105.703662,29.176766],[105.728916,29.134432],[105.752321,29.129727],[105.728916,29.1062],[105.757865,29.069068],[105.74185,29.039249],[105.766488,29.013607],[105.762176,28.9911],[105.801596,28.958116],[105.797285,28.936121],[105.830546,28.944501],[105.852719,28.927217],[105.910002,28.920407],[105.969132,28.965971],[106.001161,28.973824],[106.040581,28.955498],[106.049204,28.906263],[106.070762,28.919884],[106.101559,28.898928],[106.14837,28.901548],[106.173008,28.920407],[106.206885,28.904691],[106.264783,28.845997],[106.245689,28.817686],[106.267863,28.779402],[106.274022,28.739004],[106.305435,28.704365],[106.304203,28.64976],[106.346703,28.583565],[106.33192,28.55308],[106.37442,28.525742]]],[[[109.105495,30.585529],[109.106111,30.61077],[109.09256,30.578831],[109.09872,30.579346],[109.101183,30.579346],[109.102415,30.580377],[109.105495,30.585529]]],[[[105.582938,30.12385],[105.582938,30.127474],[105.580474,30.129544],[105.574315,30.130579],[105.582938,30.12385]]],[[[109.09872,30.579346],[109.09256,30.578831],[109.103647,30.565949],[109.106111,30.570587],[109.09872,30.579346]]],[[[107.058113,30.043066],[107.053801,30.043584],[107.054417,30.040994],[107.055649,30.040476],[107.058113,30.043066]]]]}},{"type":"Feature","properties":{"adcode":510000,"name":"\u56DB\u5DDD\u7701","center":[104.065735,30.659462],"centroid":[102.693453,30.674545],"childrenNum":21,"level":"province","parent":{"adcode":100000},"subFeatureIndex":22,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[101.167885,27.198311],[101.170349,27.175421],[101.145095,27.103523],[101.157414,27.094999],[101.136472,27.023584],[101.228863,26.981992],[101.227015,26.959057],[101.264587,26.955323],[101.267667,26.903034],[101.311399,26.903034],[101.365602,26.883819],[101.399478,26.841642],[101.358826,26.771669],[101.387159,26.753501],[101.389623,26.723036],[101.435819,26.740675],[101.458608,26.731054],[101.445674,26.77434],[101.466,26.786629],[101.513427,26.768463],[101.453065,26.692563],[101.481398,26.673313],[101.461072,26.640687],[101.461688,26.606447],[101.402558,26.604841],[101.395783,26.591998],[101.422884,26.53151],[101.458608,26.49563],[101.506652,26.499915],[101.530057,26.467239],[101.565782,26.454381],[101.637847,26.388995],[101.635383,26.357361],[101.660636,26.346635],[101.64031,26.318745],[101.597195,26.303187],[101.586108,26.279579],[101.630455,26.224832],[101.690202,26.241473],[101.737013,26.219463],[101.773353,26.168448],[101.807846,26.156093],[101.796759,26.114723],[101.839875,26.082477],[101.835563,26.04592],[101.857737,26.049146],[101.899621,26.099139],[101.929186,26.105588],[101.954439,26.084627],[102.020961,26.096451],[102.080091,26.065275],[102.107808,26.068501],[102.152156,26.10935],[102.174946,26.146961],[102.242699,26.190468],[102.245163,26.212483],[102.349257,26.244694],[102.392372,26.296749],[102.440416,26.300505],[102.542046,26.338591],[102.570995,26.362723],[102.629509,26.336982],[102.638748,26.307479],[102.60056,26.250598],[102.659074,26.221611],[102.709581,26.210336],[102.739762,26.268846],[102.785342,26.298895],[102.833385,26.306406],[102.878964,26.364332],[102.893131,26.338591],[102.975667,26.340736],[102.998457,26.371839],[102.988602,26.413117],[102.989833,26.482775],[103.030485,26.485989],[103.052659,26.514374],[103.052659,26.555602],[103.035413,26.556673],[103.026174,26.664221],[103.005232,26.679195],[103.008312,26.710741],[102.983674,26.76686],[102.991681,26.775409],[102.966428,26.837904],[102.949181,26.843244],[102.896211,26.91264],[102.894979,27.001724],[102.870957,27.026782],[102.913457,27.133886],[102.904218,27.227584],[102.883276,27.258444],[102.883892,27.299401],[102.899906,27.317481],[102.941174,27.405711],[102.989833,27.367983],[103.055739,27.40943],[103.080992,27.396679],[103.141355,27.420586],[103.144434,27.450331],[103.19063,27.523596],[103.232514,27.56976],[103.2861,27.561802],[103.29226,27.632872],[103.349542,27.678459],[103.369868,27.708664],[103.393274,27.709194],[103.461027,27.779638],[103.487512,27.794992],[103.509686,27.843687],[103.502295,27.910343],[103.55465,27.978543],[103.515846,27.965329],[103.486281,28.033495],[103.459179,28.021345],[103.430846,28.044587],[103.470266,28.122204],[103.533092,28.168641],[103.573128,28.230877],[103.643961,28.260401],[103.692004,28.232459],[103.701859,28.198709],[103.740048,28.23615],[103.770845,28.233514],[103.828743,28.285173],[103.877402,28.316262],[103.85338,28.356822],[103.860156,28.383677],[103.828743,28.44],[103.829975,28.459995],[103.781931,28.525216],[103.802873,28.563068],[103.838598,28.587244],[103.833054,28.605109],[103.850917,28.66709],[103.887873,28.61982],[103.910047,28.631377],[103.953779,28.600906],[104.05972,28.6277],[104.09606,28.603533],[104.117618,28.634003],[104.170589,28.642932],[104.230951,28.635579],[104.252509,28.660788],[104.277147,28.631902],[104.314719,28.615617],[104.372617,28.649235],[104.425588,28.626649],[104.417581,28.598279],[104.375697,28.5946],[104.355987,28.555183],[104.323342,28.540989],[104.260516,28.536257],[104.267908,28.499448],[104.254357,28.403683],[104.282074,28.343128],[104.314103,28.306778],[104.343052,28.334173],[104.384936,28.329959],[104.392943,28.291497],[104.420045,28.269889],[104.44961,28.269889],[104.462544,28.241422],[104.442834,28.211366],[104.402182,28.202928],[104.406494,28.173389],[104.444682,28.16231],[104.448994,28.113758],[104.40095,28.091586],[104.373233,28.051454],[104.304248,28.050926],[104.30856,28.036136],[104.362762,28.012891],[104.40095,27.952114],[104.44961,27.927794],[104.508124,27.878078],[104.52537,27.889187],[104.573413,27.840512],[104.607906,27.857974],[104.63316,27.850567],[104.676275,27.880723],[104.743413,27.901881],[104.761891,27.884426],[104.796999,27.901352],[104.842579,27.900294],[104.888158,27.914574],[104.918339,27.938897],[104.903557,27.962158],[104.975006,28.020816],[104.980549,28.063073],[105.002107,28.064129],[105.061853,28.096866],[105.119752,28.07205],[105.168411,28.071522],[105.186889,28.054623],[105.167795,28.021345],[105.186273,27.995454],[105.218302,27.990698],[105.247867,28.009193],[105.270657,27.99704],[105.284823,27.935725],[105.233084,27.895534],[105.25957,27.827811],[105.313157,27.810874],[105.273736,27.794992],[105.293447,27.770637],[105.290367,27.712373],[105.308229,27.704955],[105.353809,27.748924],[105.44004,27.775402],[105.508409,27.769048],[105.560148,27.71979],[105.605112,27.715552],[105.62359,27.666269],[105.664242,27.683759],[105.720292,27.683759],[105.722756,27.706015],[105.76772,27.7182],[105.848408,27.707074],[105.868118,27.732504],[105.922937,27.746805],[105.92848,27.729855],[105.985146,27.749983],[106.023335,27.746805],[106.063987,27.776991],[106.120653,27.779638],[106.193334,27.75422],[106.242609,27.767459],[106.306667,27.808756],[106.337464,27.859033],[106.325145,27.898708],[106.304819,27.899237],[106.307899,27.936782],[106.328225,27.952643],[106.286341,28.007079],[106.246305,28.011835],[106.266631,28.066769],[106.206885,28.134343],[106.145291,28.162837],[106.093552,28.162837],[105.975907,28.107952],[105.943878,28.143314],[105.895219,28.119565],[105.860727,28.159672],[105.889676,28.237732],[105.848408,28.255656],[105.824386,28.306251],[105.78743,28.335753],[105.76464,28.308359],[105.76464,28.308359],[105.737539,28.30309],[105.730147,28.271997],[105.68888,28.284119],[105.639604,28.324164],[105.655003,28.362615],[105.643916,28.431053],[105.612503,28.438947],[105.62359,28.517854],[105.68272,28.534154],[105.693191,28.58882],[105.712901,28.586718],[105.74493,28.616668],[105.757249,28.590397],[105.78435,28.610889],[105.808372,28.599855],[105.884748,28.595126],[105.889676,28.670765],[105.937719,28.686517],[105.966668,28.761041],[106.001161,28.743727],[106.030726,28.694917],[106.085544,28.681792],[106.103407,28.636104],[106.14837,28.642932],[106.17116,28.629275],[106.184711,28.58882],[106.254928,28.539412],[106.2925,28.537309],[106.304819,28.505233],[106.349167,28.473674],[106.379348,28.479986],[106.37442,28.525742],[106.33192,28.55308],[106.346703,28.583565],[106.304203,28.64976],[106.305435,28.704365],[106.274022,28.739004],[106.267863,28.779402],[106.245689,28.817686],[106.264783,28.845997],[106.206885,28.904691],[106.173008,28.920407],[106.14837,28.901548],[106.101559,28.898928],[106.070762,28.919884],[106.049204,28.906263],[106.040581,28.955498],[106.001161,28.973824],[105.969132,28.965971],[105.910002,28.920407],[105.852719,28.927217],[105.830546,28.944501],[105.797285,28.936121],[105.801596,28.958116],[105.762176,28.9911],[105.766488,29.013607],[105.74185,29.039249],[105.757865,29.069068],[105.728916,29.1062],[105.752321,29.129727],[105.728916,29.134432],[105.703662,29.176766],[105.712285,29.219082],[105.695039,29.287482],[105.647612,29.253027],[105.631597,29.280174],[105.557684,29.278608],[105.521344,29.264513],[105.513337,29.283306],[105.459134,29.288526],[105.465294,29.322969],[105.42033,29.31149],[105.418482,29.352185],[105.441888,29.400686],[105.426489,29.419454],[105.372903,29.421018],[105.399388,29.43874],[105.387069,29.455416],[105.387069,29.455416],[105.334099,29.441345],[105.337794,29.459064],[105.305149,29.53199],[105.296526,29.571035],[105.332867,29.592374],[105.347649,29.621512],[105.38091,29.628275],[105.419714,29.688082],[105.476996,29.674564],[105.481924,29.718232],[105.529351,29.707836],[105.574931,29.744216],[105.582938,29.819013],[105.610655,29.837184],[105.707974,29.840818],[105.738771,29.891159],[105.717213,29.893753],[105.70243,29.924879],[105.730763,29.95755],[105.723372,29.975177],[105.753553,30.018196],[105.719677,30.042548],[105.687032,30.038922],[105.676561,30.06793],[105.638988,30.076216],[105.642068,30.101072],[105.582938,30.12385],[105.574315,30.130579],[105.596489,30.159043],[105.536127,30.152834],[105.550909,30.179222],[105.556453,30.187499],[105.558916,30.18543],[105.56138,30.183878],[105.642684,30.186464],[105.662394,30.210258],[105.619894,30.234045],[105.624822,30.275918],[105.670401,30.254208],[105.720292,30.252657],[105.720292,30.252657],[105.714749,30.322939],[105.754785,30.342567],[105.760329,30.384393],[105.792357,30.427234],[105.825618,30.436006],[105.84656,30.410203],[105.900763,30.405042],[105.943263,30.372002],[106.031958,30.373551],[106.07261,30.333786],[106.132972,30.30279],[106.132356,30.323972],[106.168696,30.303823],[106.180399,30.233011],[106.232754,30.185947],[106.260471,30.19681],[106.260471,30.204051],[106.260471,30.207672],[106.264167,30.20974],[106.296196,30.205603],[106.306667,30.238182],[106.334384,30.225772],[106.349167,30.24542],[106.401521,30.242318],[106.428623,30.254725],[106.43971,30.308473],[106.49884,30.295556],[106.545035,30.296589],[106.560434,30.31519],[106.611557,30.292455],[106.642354,30.246454],[106.612789,30.235596],[106.612789,30.235596],[106.612173,30.235596],[106.612173,30.235596],[106.611557,30.235596],[106.612173,30.235596],[106.611557,30.235596],[106.631883,30.186464],[106.677462,30.156974],[106.672535,30.122297],[106.700252,30.111944],[106.699636,30.074145],[106.724274,30.058607],[106.732281,30.027005],[106.785252,30.01716],[106.825904,30.03115],[106.825904,30.03115],[106.83699,30.049801],[106.862244,30.033223],[106.913367,30.025451],[106.94478,30.037367],[106.976193,30.083467],[106.975577,30.088127],[106.976809,30.088127],[106.977425,30.087609],[106.978656,30.087609],[106.979888,30.088127],[106.980504,30.087609],[106.981736,30.08502],[107.02054,30.036849],[107.053801,30.043584],[107.058113,30.043066],[107.084598,30.063786],[107.080286,30.094341],[107.103076,30.090198],[107.221337,30.213878],[107.257677,30.267131],[107.288474,30.337402],[107.338981,30.386459],[107.368546,30.468508],[107.408582,30.521623],[107.443075,30.53348],[107.427676,30.547397],[107.485575,30.598408],[107.516987,30.644759],[107.477567,30.664837],[107.458473,30.704981],[107.424597,30.74048],[107.454162,30.771851],[107.454162,30.771851],[107.498509,30.809381],[107.483111,30.838675],[107.515756,30.854603],[107.57735,30.847924],[107.645103,30.821202],[107.693146,30.875665],[107.739957,30.884396],[107.760899,30.862823],[107.763979,30.817091],[107.788001,30.81966],[107.851443,30.792931],[107.956152,30.882855],[107.994956,30.908533],[107.948145,30.918802],[107.942602,30.989114],[107.983254,30.983983],[108.00358,31.025533],[108.060246,31.052197],[108.026985,31.061938],[108.009123,31.109602],[108.025753,31.116263],[108.089811,31.204859],[108.07626,31.231985],[108.031297,31.217144],[108.038688,31.252964],[108.095354,31.268311],[108.185898,31.336831],[108.153869,31.371073],[108.216079,31.41041],[108.224086,31.464024],[108.193289,31.467598],[108.191441,31.492096],[108.233941,31.506894],[108.254883,31.49873],[108.344194,31.512506],[108.339266,31.539033],[108.386078,31.544134],[108.390389,31.591555],[108.442744,31.633856],[108.468614,31.636404],[108.519121,31.665952],[108.546838,31.665442],[108.514809,31.693963],[108.50557,31.734182],[108.535135,31.757592],[108.462454,31.780488],[108.455063,31.814059],[108.429194,31.809482],[108.391005,31.829822],[108.386078,31.854226],[108.343578,31.860834],[108.259194,31.967006],[108.307238,31.997463],[108.351585,31.971575],[108.370063,31.988835],[108.329411,32.020299],[108.362056,32.035521],[108.344194,32.067477],[108.372527,32.077112],[108.42981,32.061391],[108.452599,32.090296],[108.399628,32.147065],[108.379303,32.153652],[108.379303,32.153652],[108.379918,32.154158],[108.379918,32.154158],[108.370063,32.172397],[108.399013,32.194176],[108.480317,32.182527],[108.509882,32.201266],[108.507418,32.245819],[108.469846,32.270618],[108.414411,32.252399],[108.389773,32.263533],[108.310933,32.232152],[108.240716,32.274666],[108.179738,32.221521],[108.156948,32.239239],[108.143398,32.219495],[108.086731,32.233165],[108.018362,32.2119],[108.024521,32.177462],[107.979558,32.146051],[107.924739,32.197215],[107.890247,32.214432],[107.864377,32.201266],[107.812022,32.247844],[107.753508,32.338399],[107.707929,32.331826],[107.680827,32.397035],[107.648183,32.413709],[107.598291,32.411688],[107.527458,32.38238],[107.489886,32.425328],[107.456625,32.41775],[107.460937,32.453612],[107.438763,32.465732],[107.436299,32.529835],[107.382097,32.54043],[107.356843,32.506622],[107.313727,32.489965],[107.287858,32.457147],[107.263836,32.403099],[107.212097,32.428864],[107.189924,32.468256],[107.127098,32.482393],[107.080286,32.542448],[107.108004,32.600951],[107.098765,32.649338],[107.05996,32.686115],[107.066736,32.708779],[107.012533,32.721367],[106.912751,32.704247],[106.903512,32.721367],[106.854853,32.724388],[106.82344,32.705254],[106.793259,32.712807],[106.783404,32.735967],[106.733513,32.739491],[106.670071,32.694678],[106.626955,32.682086],[106.585687,32.68813],[106.517934,32.668485],[106.498224,32.649338],[106.451412,32.65992],[106.421231,32.616579],[106.389203,32.62666],[106.347935,32.671003],[106.301123,32.680071],[106.267863,32.673522],[106.254928,32.693671],[106.17424,32.6977],[106.120037,32.719856],[106.071378,32.758114],[106.07261,32.76365],[106.093552,32.82402],[106.071378,32.828546],[106.044277,32.864747],[106.011632,32.829552],[105.969132,32.849162],[105.93156,32.826032],[105.893371,32.838603],[105.849024,32.817985],[105.825002,32.824523],[105.822538,32.770192],[105.779423,32.750061],[105.768952,32.767676],[105.719061,32.759624],[105.677793,32.726402],[105.596489,32.69921],[105.585402,32.728919],[105.563844,32.724891],[105.555221,32.794343],[105.534279,32.790822],[105.524424,32.847654],[105.495475,32.873292],[105.49917,32.911986],[105.467757,32.930071],[105.414171,32.922034],[105.408011,32.885857],[105.38091,32.876307],[105.396308,32.85067],[105.396308,32.85067],[105.427721,32.784281],[105.454207,32.767173],[105.448663,32.732946],[105.368591,32.712807],[105.347033,32.68259],[105.297758,32.656897],[105.263265,32.652362],[105.219534,32.666469],[105.215222,32.63674],[105.185041,32.617587],[105.111128,32.593893],[105.0791,32.637244],[105.026745,32.650346],[104.925115,32.607505],[104.881999,32.600951],[104.845659,32.653873],[104.820405,32.662943],[104.795768,32.643292],[104.739717,32.635228],[104.696601,32.673522],[104.643015,32.661935],[104.592508,32.695685],[104.582653,32.722374],[104.526602,32.728416],[104.51182,32.753585],[104.458849,32.748551],[104.363994,32.822511],[104.294393,32.835586],[104.277147,32.90244],[104.288234,32.942628],[104.345516,32.940117],[104.378161,32.953174],[104.383704,32.994343],[104.426204,33.010906],[104.391711,33.035493],[104.337509,33.038002],[104.378161,33.109214],[104.351059,33.158828],[104.32827,33.223934],[104.323958,33.26898],[104.303632,33.304499],[104.333813,33.315502],[104.386168,33.298497],[104.420045,33.327004],[104.373849,33.345004],[104.292545,33.336505],[104.272219,33.391486],[104.22048,33.404477],[104.213089,33.446932],[104.180444,33.472895],[104.155191,33.542755],[104.176749,33.5996],[104.103452,33.663381],[104.046169,33.686291],[103.980264,33.670852],[103.861388,33.682307],[103.778236,33.658898],[103.690772,33.69376],[103.667983,33.685793],[103.645809,33.708697],[103.593454,33.716164],[103.563889,33.699735],[103.552186,33.671351],[103.520157,33.678323],[103.545411,33.719649],[103.518309,33.807213],[103.464723,33.80224],[103.434542,33.752993],[103.35447,33.743539],[103.278709,33.774387],[103.284868,33.80224],[103.24976,33.814175],[103.228202,33.79478],[103.165376,33.805721],[103.153673,33.819147],[103.181391,33.900649],[103.16476,33.929454],[103.1315,33.931937],[103.120413,33.953286],[103.157369,33.998944],[103.147514,34.036644],[103.119797,34.03466],[103.129652,34.065899],[103.178927,34.079779],[103.121644,34.112487],[103.124108,34.162022],[103.100087,34.181828],[103.052043,34.195194],[103.005848,34.184798],[102.973203,34.205588],[102.977515,34.252595],[102.949181,34.292159],[102.911609,34.312923],[102.85987,34.301058],[102.856791,34.270895],[102.798276,34.272874],[102.779798,34.236764],[102.728675,34.235774],[102.694799,34.198659],[102.664002,34.192719],[102.651067,34.165983],[102.598712,34.14766],[102.655994,34.113478],[102.649219,34.080275],[102.615958,34.099604],[102.511865,34.086222],[102.471213,34.072839],[102.437336,34.087214],[102.406539,34.033172],[102.392372,33.971651],[102.345561,33.969666],[102.315996,33.993983],[102.287047,33.977607],[102.248858,33.98654],[102.226069,33.963214],[102.16817,33.983066],[102.136142,33.965199],[102.25317,33.861399],[102.261177,33.821136],[102.243315,33.786823],[102.296286,33.783838],[102.324619,33.754486],[102.284583,33.719151],[102.342481,33.725622],[102.31538,33.665374],[102.346793,33.605582],[102.440416,33.574673],[102.477988,33.543254],[102.446575,33.53228],[102.461358,33.501345],[102.462589,33.449429],[102.447807,33.454922],[102.392988,33.404477],[102.368967,33.41247],[102.310452,33.397982],[102.296286,33.413969],[102.258098,33.409472],[102.218062,33.349503],[102.192192,33.337005],[102.217446,33.247961],[102.200815,33.223434],[102.160163,33.242956],[102.144765,33.273983],[102.117047,33.288492],[102.08933,33.227439],[102.08933,33.204908],[102.054838,33.189884],[101.99386,33.1999],[101.935345,33.186879],[101.921795,33.153817],[101.887302,33.135778],[101.865744,33.103198],[101.825708,33.119239],[101.841723,33.184876],[101.83002,33.213921],[101.770274,33.248962],[101.769658,33.26898],[101.877447,33.314502],[101.887302,33.383991],[101.915635,33.425957],[101.946432,33.442937],[101.906396,33.48188],[101.907012,33.539264],[101.884222,33.578163],[101.844186,33.602591],[101.831252,33.554726],[101.783208,33.556721],[101.769042,33.538765],[101.777665,33.533776],[101.769042,33.45592],[101.695745,33.433948],[101.663716,33.383991],[101.64955,33.323004],[101.677883,33.297497],[101.735781,33.279987],[101.709912,33.21292],[101.653861,33.162835],[101.661252,33.135778],[101.633535,33.101193],[101.557775,33.167344],[101.515275,33.192889],[101.487557,33.226938],[101.403174,33.225436],[101.386543,33.207412],[101.393935,33.157826],[101.381616,33.153316],[101.297232,33.262475],[101.217776,33.256469],[101.182668,33.26948],[101.156798,33.236449],[101.124769,33.221431],[101.11553,33.194893],[101.169733,33.10019],[101.143863,33.086151],[101.146327,33.056563],[101.184515,33.041514],[101.171581,33.009902],[101.183899,32.984304],[101.129081,32.989324],[101.134624,32.95217],[101.124153,32.909976],[101.178356,32.892892],[101.223935,32.855698],[101.237486,32.825026],[101.22332,32.725898],[101.157414,32.661431],[101.124769,32.658408],[101.077342,32.68259],[101.030531,32.660424],[100.99727,32.627668],[100.956618,32.621116],[100.93198,32.600447],[100.887633,32.632708],[100.834046,32.648835],[100.77122,32.643795],[100.690532,32.678056],[100.71209,32.645307],[100.710242,32.610026],[100.673286,32.628172],[100.661583,32.616075],[100.657887,32.546484],[100.645568,32.526303],[100.603069,32.553547],[100.54517,32.569687],[100.516837,32.632204],[100.470026,32.694678],[100.450932,32.694678],[100.420135,32.73194],[100.378251,32.698707],[100.399193,32.756101],[100.339447,32.719353],[100.258759,32.742511],[100.231041,32.696189],[100.229809,32.650346],[100.208252,32.606497],[100.189773,32.630692],[100.109701,32.640268],[100.088143,32.668988],[100.139266,32.724388],[100.117093,32.802392],[100.123252,32.837095],[100.064738,32.895907],[100.029629,32.895907],[100.038252,32.929066],[99.956332,32.948152],[99.947709,32.986814],[99.877492,33.045527],[99.877492,32.993339],[99.851007,32.941623],[99.805427,32.940619],[99.788181,32.956689],[99.764159,32.924545],[99.791877,32.883344],[99.766623,32.826032],[99.760464,32.769689],[99.717964,32.732443],[99.700718,32.76667],[99.646515,32.774721],[99.640355,32.790822],[99.589233,32.789312],[99.558436,32.839106],[99.45311,32.862233],[99.376118,32.899927],[99.353944,32.885354],[99.268944,32.878318],[99.24677,32.924043],[99.235067,32.982296],[99.214741,32.991332],[99.196263,33.035493],[99.124814,33.046028],[99.090322,33.079131],[99.024416,33.094675],[99.014561,33.081137],[98.971445,33.098185],[98.967134,33.115229],[98.92217,33.118738],[98.858728,33.150811],[98.804526,33.219428],[98.802062,33.270481],[98.759562,33.276985],[98.779888,33.370497],[98.736157,33.406975],[98.742316,33.477887],[98.725686,33.503341],[98.678258,33.522801],[98.648077,33.548741],[98.652389,33.595114],[98.622824,33.610067],[98.61728,33.637476],[98.6567,33.64744],[98.610505,33.682805],[98.582788,33.731595],[98.539672,33.746525],[98.51873,33.77389],[98.494092,33.768915],[98.492861,33.796272],[98.463295,33.848477],[98.434962,33.843009],[98.407245,33.867362],[98.425723,33.913066],[98.415252,33.956761],[98.440506,33.981577],[98.428187,34.029204],[98.396774,34.053008],[98.399854,34.085231],[98.344419,34.094648],[98.258188,34.083249],[98.206449,34.08424],[98.158405,34.107037],[98.098043,34.122892],[98.028442,34.122892],[97.95453,34.190739],[97.898479,34.209548],[97.8104,34.207568],[97.796849,34.199154],[97.796849,34.199154],[97.789458,34.182818],[97.789458,34.182818],[97.766668,34.158555],[97.665654,34.126855],[97.70261,34.036644],[97.652719,33.998448],[97.660111,33.956264],[97.629314,33.919523],[97.601596,33.929951],[97.52214,33.903133],[97.503662,33.912073],[97.460546,33.887236],[97.395257,33.889224],[97.398336,33.848477],[97.371851,33.842015],[97.373083,33.817655],[97.406344,33.795278],[97.422974,33.754984],[97.418046,33.728608],[97.435293,33.682307],[97.415583,33.605582],[97.450075,33.582152],[97.523372,33.577166],[97.511669,33.520805],[97.552321,33.465906],[97.625618,33.461412],[97.674893,33.432949],[97.754349,33.409972],[97.676125,33.341004],[97.622538,33.337005],[97.607756,33.263976],[97.548626,33.203907],[97.487648,33.168346],[97.498119,33.137783],[97.487032,33.107209],[97.517213,33.097683],[97.542466,33.035995],[97.499966,33.011408],[97.523988,32.988822],[97.438372,32.976271],[97.375547,32.956689],[97.347829,32.895907],[97.376163,32.886359],[97.392793,32.828546],[97.386018,32.77925],[97.429133,32.714318],[97.42359,32.70475],[97.48272,32.654377],[97.535075,32.638252],[97.543698,32.62162],[97.607756,32.614059],[97.616995,32.586329],[97.700763,32.53488],[97.730944,32.527312],[97.795617,32.521257],[97.80732,32.50006],[97.863986,32.499051],[97.880001,32.486431],[97.940363,32.482393],[98.079565,32.415224],[98.107283,32.391476],[98.125145,32.401077],[98.218768,32.342444],[98.208913,32.318171],[98.23047,32.262521],[98.218768,32.234683],[98.260035,32.208862],[98.303151,32.121726],[98.357354,32.087253],[98.404781,32.045159],[98.402933,32.026896],[98.434962,32.007613],[98.432498,31.922825],[98.399238,31.895899],[98.426339,31.856767],[98.414636,31.832365],[98.461448,31.800327],[98.508875,31.751995],[98.516882,31.717383],[98.545831,31.717383],[98.553839,31.660349],[98.619128,31.591555],[98.651157,31.57881],[98.696736,31.538523],[98.714599,31.508935],[98.844562,31.429817],[98.84333,31.416028],[98.887062,31.37465],[98.810685,31.306668],[98.805758,31.279052],[98.773113,31.249382],[98.691809,31.333253],[98.643766,31.338876],[98.616048,31.3036],[98.60373,31.257568],[98.62344,31.221238],[98.602498,31.192062],[98.675179,31.15417],[98.710287,31.1178],[98.712135,31.082954],[98.736772,31.049121],[98.774961,31.031174],[98.806374,30.995783],[98.797135,30.948575],[98.774345,30.908019],[98.797135,30.87926],[98.850105,30.849465],[98.904924,30.782649],[98.957895,30.765166],[98.963438,30.728134],[98.907388,30.698292],[98.92217,30.609225],[98.939417,30.598923],[98.926482,30.569556],[98.932025,30.521623],[98.965286,30.449937],[98.967134,30.33482],[98.986844,30.280569],[98.970829,30.260928],[98.993003,30.215429],[98.9813,30.182843],[98.989308,30.151799],[99.044742,30.079842],[99.036735,30.053945],[99.055213,29.958587],[99.068148,29.931621],[99.0238,29.846009],[99.018873,29.792009],[98.992387,29.677163],[99.014561,29.607464],[99.052133,29.563748],[99.044742,29.520013],[99.066916,29.421018],[99.058909,29.417368],[99.075539,29.316186],[99.114343,29.243628],[99.113727,29.221171],[99.105104,29.162656],[99.118039,29.100971],[99.113727,29.07273],[99.132206,28.94869],[99.123582,28.890021],[99.103872,28.841803],[99.114343,28.765763],[99.134053,28.734806],[99.126662,28.698066],[99.147604,28.640831],[99.183944,28.58882],[99.170394,28.566221],[99.191952,28.494714],[99.187024,28.44],[99.16485,28.425264],[99.200575,28.365774],[99.229524,28.350502],[99.237531,28.317842],[99.28927,28.286227],[99.306516,28.227714],[99.374886,28.18183],[99.412458,28.295186],[99.392748,28.318369],[99.437095,28.398419],[99.404451,28.44421],[99.426625,28.454207],[99.396444,28.491032],[99.403219,28.546246],[99.463581,28.549401],[99.466045,28.579886],[99.504233,28.619294],[99.540573,28.623497],[99.53195,28.677591],[99.553508,28.710664],[99.614486,28.740054],[99.609559,28.784122],[99.625573,28.81454],[99.676696,28.810345],[99.717964,28.846521],[99.722275,28.757369],[99.755536,28.701216],[99.79434,28.699116],[99.834992,28.660788],[99.834376,28.628225],[99.873181,28.631902],[99.875644,28.611939],[99.91876,28.599329],[99.985281,28.529422],[99.990209,28.47683],[100.073977,28.426317],[100.057346,28.368934],[100.136803,28.349975],[100.176223,28.325218],[100.147274,28.288862],[100.188541,28.252493],[100.153433,28.208202],[100.102926,28.201873],[100.091223,28.181302],[100.062274,28.193962],[100.033325,28.184467],[100.021006,28.147008],[100.05673,28.097922],[100.088759,28.029269],[100.120788,28.018703],[100.196549,27.936254],[100.170063,27.907699],[100.210715,27.87702],[100.30865,27.861149],[100.30865,27.830457],[100.28586,27.80611],[100.304954,27.788639],[100.311729,27.724028],[100.327744,27.72032],[100.350534,27.755809],[100.412127,27.816167],[100.442924,27.86644],[100.504518,27.852154],[100.511294,27.827811],[100.54517,27.809286],[100.609228,27.859033],[100.634482,27.915631],[100.681293,27.923035],[100.719481,27.858503],[100.707162,27.800816],[100.757053,27.770107],[100.775532,27.743098],[100.782307,27.691708],[100.848212,27.672099],[100.827886,27.615904],[100.854988,27.623858],[100.91227,27.521473],[100.901183,27.453517],[100.936908,27.469448],[100.95169,27.426961],[101.021907,27.332899],[101.026219,27.270679],[101.042233,27.22173],[101.071798,27.194585],[101.119226,27.208957],[101.167885,27.198311],[101.167885,27.198311]]],[[[106.264167,30.20974],[106.260471,30.207672],[106.260471,30.204051],[106.260471,30.19681],[106.264167,30.20974]]],[[[106.976809,30.088127],[106.975577,30.088127],[106.976193,30.083467],[106.981736,30.08502],[106.980504,30.087609],[106.979888,30.088127],[106.978656,30.087609],[106.977425,30.087609],[106.976809,30.088127]]],[[[105.558916,30.18543],[105.556453,30.187499],[105.550909,30.179222],[105.56138,30.183878],[105.558916,30.18543]]]]}},{"type":"Feature","properties":{"adcode":520000,"name":"\u8D35\u5DDE\u7701","center":[106.713478,26.578343],"centroid":[106.880455,26.826368],"childrenNum":9,"level":"province","parent":{"adcode":100000},"subFeatureIndex":23,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[109.274262,28.494714],[109.23361,28.474726],[109.191726,28.471043],[109.153538,28.417369],[109.152306,28.349975],[109.117198,28.277795],[109.081473,28.247749],[109.101799,28.202401],[109.086401,28.184467],[109.026655,28.220331],[109.005713,28.162837],[108.929952,28.19027],[108.923793,28.217167],[108.89546,28.219804],[108.855424,28.199764],[108.821547,28.245113],[108.772888,28.212949],[108.738395,28.228241],[108.726692,28.282011],[108.761801,28.304143],[108.783359,28.380518],[108.759953,28.389995],[108.780279,28.42579],[108.746402,28.45105],[108.709446,28.501026],[108.700207,28.48209],[108.657091,28.47683],[108.640461,28.456838],[108.688504,28.422106],[108.697127,28.401051],[108.656475,28.359981],[108.667562,28.334173],[108.611512,28.324691],[108.580099,28.343128],[108.576403,28.38631],[108.609048,28.407368],[108.609664,28.43579],[108.586874,28.463678],[108.573939,28.531],[108.610896,28.539412],[108.604736,28.590922],[108.636149,28.621396],[108.575787,28.659738],[108.50249,28.63768],[108.501258,28.626649],[108.439049,28.634003],[108.332491,28.679166],[108.347274,28.736381],[108.385462,28.772058],[108.386078,28.803003],[108.352817,28.815589],[108.346658,28.859625],[108.357745,28.893165],[108.345426,28.943453],[108.319556,28.961258],[108.297999,29.045527],[108.306622,29.079006],[108.277673,29.091558],[108.256115,29.040295],[108.193289,29.072207],[108.150173,29.053375],[108.070717,29.086328],[108.026369,29.039772],[107.925971,29.032446],[107.908725,29.007327],[107.882855,29.00628],[107.867457,28.960211],[107.810175,28.984295],[107.823725,29.034016],[107.784921,29.048143],[107.810791,29.139137],[107.749197,29.199754],[107.700537,29.141228],[107.659885,29.162656],[107.605683,29.164747],[107.589052,29.150113],[107.570574,29.218037],[107.486806,29.174153],[107.441227,29.203934],[107.401807,29.184603],[107.408582,29.138091],[107.427676,29.128682],[107.412278,29.094696],[107.369778,29.091558],[107.395647,29.041341],[107.364235,29.00942],[107.396879,28.993718],[107.412894,28.960211],[107.441227,28.943977],[107.41351,28.911502],[107.383945,28.848618],[107.339597,28.845997],[107.327894,28.810869],[107.261373,28.792514],[107.24659,28.76209],[107.219489,28.772582],[107.210866,28.817686],[107.227496,28.836037],[107.194851,28.838134],[107.206554,28.868535],[107.14188,28.887925],[107.016229,28.882685],[107.019308,28.861722],[106.983584,28.851239],[106.988512,28.776254],[106.951555,28.766812],[106.923222,28.809821],[106.872099,28.777304],[106.845614,28.780975],[106.824056,28.756319],[106.86594,28.690192],[106.889345,28.695966],[106.866556,28.624548],[106.830831,28.623497],[106.807425,28.589346],[106.784636,28.626649],[106.756918,28.607211],[106.77786,28.563068],[106.73844,28.554657],[106.726121,28.51838],[106.747063,28.467361],[106.708259,28.450524],[106.697788,28.47683],[106.632499,28.503655],[106.564745,28.485247],[106.567825,28.523638],[106.615252,28.549401],[106.606629,28.593024],[106.63681,28.622972],[106.618332,28.645033],[106.651593,28.649235],[106.617716,28.66709],[106.6171,28.691242],[106.587535,28.691767],[106.56105,28.719062],[106.561666,28.756319],[106.474202,28.832891],[106.45326,28.817162],[106.461883,28.761041],[106.492064,28.742153],[106.528405,28.677591],[106.502535,28.661313],[106.49268,28.591448],[106.466811,28.586193],[106.504999,28.544669],[106.477282,28.530474],[106.403369,28.569901],[106.37442,28.525742],[106.379348,28.479986],[106.349167,28.473674],[106.304819,28.505233],[106.2925,28.537309],[106.254928,28.539412],[106.184711,28.58882],[106.17116,28.629275],[106.14837,28.642932],[106.103407,28.636104],[106.085544,28.681792],[106.030726,28.694917],[106.001161,28.743727],[105.966668,28.761041],[105.937719,28.686517],[105.889676,28.670765],[105.884748,28.595126],[105.808372,28.599855],[105.78435,28.610889],[105.757249,28.590397],[105.74493,28.616668],[105.712901,28.586718],[105.693191,28.58882],[105.68272,28.534154],[105.62359,28.517854],[105.612503,28.438947],[105.643916,28.431053],[105.655003,28.362615],[105.639604,28.324164],[105.68888,28.284119],[105.730147,28.271997],[105.737539,28.30309],[105.76464,28.308359],[105.76464,28.308359],[105.78743,28.335753],[105.824386,28.306251],[105.848408,28.255656],[105.889676,28.237732],[105.860727,28.159672],[105.895219,28.119565],[105.943878,28.143314],[105.975907,28.107952],[106.093552,28.162837],[106.145291,28.162837],[106.206885,28.134343],[106.266631,28.066769],[106.246305,28.011835],[106.286341,28.007079],[106.328225,27.952643],[106.307899,27.936782],[106.304819,27.899237],[106.325145,27.898708],[106.337464,27.859033],[106.306667,27.808756],[106.242609,27.767459],[106.193334,27.75422],[106.120653,27.779638],[106.063987,27.776991],[106.023335,27.746805],[105.985146,27.749983],[105.92848,27.729855],[105.922937,27.746805],[105.868118,27.732504],[105.848408,27.707074],[105.76772,27.7182],[105.722756,27.706015],[105.720292,27.683759],[105.664242,27.683759],[105.62359,27.666269],[105.605112,27.715552],[105.560148,27.71979],[105.508409,27.769048],[105.44004,27.775402],[105.353809,27.748924],[105.308229,27.704955],[105.29591,27.631811],[105.304533,27.611661],[105.25649,27.582491],[105.232469,27.546945],[105.260186,27.514573],[105.234316,27.489093],[105.233084,27.436522],[105.182577,27.367451],[105.184425,27.392959],[105.120984,27.418461],[105.068013,27.418461],[105.01073,27.379143],[104.913412,27.327051],[104.871528,27.290891],[104.851818,27.299401],[104.856746,27.332368],[104.824717,27.3531],[104.77113,27.317481],[104.7545,27.345658],[104.611602,27.306846],[104.570334,27.331836],[104.539537,27.327583],[104.497037,27.414743],[104.467472,27.414211],[104.363378,27.467855],[104.30856,27.407305],[104.295625,27.37436],[104.247582,27.336621],[104.248813,27.291955],[104.210625,27.297273],[104.173053,27.263232],[104.113923,27.338216],[104.084358,27.330773],[104.01722,27.383926],[104.015372,27.429086],[103.956242,27.425367],[103.932221,27.443958],[103.905119,27.38552],[103.903271,27.347785],[103.874322,27.331304],[103.865699,27.28185],[103.80041,27.26536],[103.801641,27.250464],[103.748671,27.210021],[103.696316,27.126429],[103.63349,27.12057],[103.620555,27.096598],[103.652584,27.092868],[103.659975,27.065692],[103.614396,27.079548],[103.601461,27.061962],[103.623635,27.035312],[103.623019,27.007056],[103.675374,27.051836],[103.704939,27.049171],[103.73204,27.018785],[103.753598,26.963858],[103.775156,26.951056],[103.763453,26.905702],[103.779468,26.87421],[103.722185,26.851253],[103.705555,26.794642],[103.725265,26.742812],[103.773308,26.716621],[103.759142,26.689355],[103.748671,26.623568],[103.763453,26.585041],[103.815808,26.55239],[103.819504,26.529903],[103.865699,26.512232],[103.953163,26.521336],[104.008597,26.511697],[104.067727,26.51491],[104.068343,26.573266],[104.121314,26.638012],[104.160734,26.646571],[104.222328,26.620358],[104.268524,26.617683],[104.274683,26.633733],[104.313487,26.612867],[104.353523,26.620893],[104.398487,26.686147],[104.424356,26.709137],[104.468088,26.644431],[104.459465,26.602701],[104.488414,26.579689],[104.556783,26.590393],[104.579573,26.568449],[104.57095,26.524549],[104.598667,26.520801],[104.638703,26.477954],[104.631928,26.451702],[104.665804,26.434019],[104.664572,26.397572],[104.684283,26.3772],[104.659645,26.335373],[104.592508,26.317672],[104.542616,26.253282],[104.548776,26.226979],[104.518595,26.165762],[104.52845,26.114186],[104.499501,26.070651],[104.460081,26.085702],[104.470552,26.009352],[104.438523,25.92757],[104.414501,25.909807],[104.441602,25.868889],[104.42374,25.841961],[104.397871,25.76168],[104.370769,25.730415],[104.328886,25.760602],[104.310407,25.647901],[104.332581,25.598796],[104.389248,25.595558],[104.428668,25.576126],[104.436059,25.520512],[104.418813,25.499447],[104.434827,25.472436],[104.44961,25.495126],[104.483486,25.494585],[104.524138,25.526992],[104.556783,25.524832],[104.543232,25.400556],[104.566638,25.402719],[104.615913,25.364871],[104.646094,25.356759],[104.639935,25.295632],[104.689826,25.296173],[104.736021,25.268034],[104.816094,25.262622],[104.826565,25.235558],[104.806854,25.224189],[104.822869,25.170037],[104.801927,25.163537],[104.753884,25.214443],[104.724319,25.195491],[104.732326,25.167871],[104.695369,25.122364],[104.685514,25.078466],[104.619609,25.060577],[104.684898,25.054072],[104.713232,24.996048],[104.663957,24.964584],[104.635623,24.903803],[104.586964,24.872859],[104.539537,24.813663],[104.542616,24.75607],[104.529682,24.731611],[104.595587,24.709323],[104.628848,24.660927],[104.703377,24.645698],[104.729246,24.617953],[104.771746,24.659839],[104.841963,24.676155],[104.865985,24.730524],[104.899245,24.752809],[105.03352,24.787586],[105.026745,24.815836],[105.039064,24.872859],[105.077868,24.918459],[105.09573,24.92877],[105.131454,24.959701],[105.157324,24.958616],[105.178266,24.985199],[105.212758,24.995505],[105.251563,24.967296],[105.267577,24.929313],[105.334099,24.9266],[105.365511,24.943423],[105.428337,24.930941],[105.457286,24.87123],[105.493011,24.833217],[105.497322,24.809318],[105.573083,24.797366],[105.607576,24.803885],[105.617431,24.78161],[105.70551,24.768569],[105.767104,24.719109],[105.827466,24.702799],[105.863806,24.729437],[105.942031,24.725088],[105.961741,24.677786],[106.024566,24.633186],[106.047356,24.684312],[106.113878,24.714216],[106.150218,24.762591],[106.173008,24.760417],[106.206269,24.851139],[106.197645,24.885889],[106.145291,24.954275],[106.191486,24.95319],[106.215508,24.981944],[106.253696,24.971094],[106.304819,24.973807],[106.332536,24.988454],[106.442173,25.019369],[106.450181,25.033468],[106.519782,25.054072],[106.551195,25.082802],[106.590615,25.08768],[106.63989,25.132658],[106.644817,25.164621],[106.691013,25.179245],[106.732281,25.162454],[106.764926,25.183036],[106.787715,25.17112],[106.853005,25.186827],[106.888113,25.181953],[106.904128,25.231768],[106.933077,25.250714],[106.975577,25.232851],[107.013765,25.275611],[107.012533,25.352973],[106.987896,25.358922],[106.963874,25.437852],[106.996519,25.442716],[107.015613,25.495666],[107.066736,25.50917],[107.064272,25.559391],[107.185612,25.578825],[107.205322,25.607971],[107.228728,25.604733],[107.232423,25.556691],[107.263836,25.543193],[107.336517,25.461089],[107.308184,25.432988],[107.318039,25.401637],[107.358691,25.393528],[107.375937,25.411908],[107.420901,25.392987],[107.409198,25.347024],[107.432604,25.289139],[107.481263,25.299961],[107.489886,25.276693],[107.472024,25.213902],[107.512676,25.209029],[107.576734,25.256668],[107.599523,25.250714],[107.632168,25.310241],[107.659885,25.316192],[107.661733,25.258833],[107.696226,25.219858],[107.700537,25.194408],[107.741805,25.24043],[107.762131,25.229061],[107.760283,25.188451],[107.789233,25.15487],[107.762747,25.125073],[107.839124,25.115861],[107.872384,25.141327],[107.928435,25.155954],[108.001732,25.196574],[108.080572,25.193867],[108.115065,25.210112],[108.143398,25.269658],[108.152021,25.324306],[108.142782,25.390825],[108.193289,25.405421],[108.162492,25.444878],[108.192673,25.458928],[108.251803,25.430286],[108.241332,25.46217],[108.280752,25.48],[108.308469,25.525912],[108.348506,25.536173],[108.359592,25.513491],[108.400244,25.491344],[108.418723,25.443257],[108.471693,25.458928],[108.585642,25.365952],[108.589338,25.335125],[108.625062,25.308076],[108.62999,25.335666],[108.600425,25.432448],[108.6072,25.491885],[108.634917,25.520512],[108.68912,25.533473],[108.658323,25.550212],[108.660787,25.584763],[108.68604,25.587462],[108.68912,25.623081],[108.724844,25.634952],[108.783975,25.628477],[108.799989,25.576666],[108.781511,25.554531],[108.814772,25.526992],[108.826474,25.550212],[108.890532,25.556151],[108.8893,25.543193],[108.949046,25.557231],[109.024807,25.51241],[109.088249,25.550752],[109.051908,25.566949],[109.030966,25.629556],[109.075314,25.693749],[109.07901,25.72071],[109.043285,25.738502],[109.007561,25.734728],[108.953974,25.686738],[108.953974,25.686738],[108.900387,25.682423],[108.896076,25.71424],[108.940423,25.740119],[108.963829,25.732572],[108.999553,25.765453],[108.989698,25.778926],[109.048213,25.790781],[109.077778,25.776771],[109.095024,25.80533],[109.143683,25.795092],[109.13198,25.762758],[109.147995,25.741736],[109.206509,25.788087],[109.207125,25.740119],[109.296436,25.71424],[109.340168,25.731493],[109.327849,25.76168],[109.339552,25.83442],[109.359262,25.836036],[109.396834,25.900117],[109.435022,25.93349],[109.408537,25.967392],[109.473211,26.006663],[109.48245,26.029788],[109.452885,26.055598],[109.449805,26.101826],[109.502776,26.096451],[109.513863,26.128157],[109.47629,26.148035],[109.439334,26.238789],[109.467051,26.313917],[109.442414,26.289774],[109.369733,26.277432],[109.351255,26.264016],[109.325385,26.29031],[109.285965,26.295676],[109.271183,26.327863],[109.29582,26.350389],[109.319842,26.418477],[109.38082,26.454381],[109.362342,26.472061],[109.385747,26.493487],[109.381436,26.518659],[109.407305,26.533116],[109.390675,26.598955],[109.35495,26.658873],[109.334008,26.646036],[109.306291,26.661012],[109.283501,26.698445],[109.35495,26.693098],[109.407305,26.719829],[109.447957,26.759913],[109.486761,26.759913],[109.47629,26.829894],[109.467051,26.83203],[109.452885,26.861932],[109.436254,26.892359],[109.555131,26.946788],[109.520022,27.058764],[109.497848,27.079548],[109.486761,27.053968],[109.454733,27.069423],[109.472595,27.134951],[109.441182,27.117907],[109.415312,27.154123],[109.358646,27.153058],[109.33524,27.139212],[109.264407,27.131755],[109.239154,27.14933],[109.21698,27.114711],[109.165857,27.066758],[109.101183,27.06889],[109.128901,27.122701],[109.032814,27.104056],[109.007561,27.08008],[108.940423,27.044907],[108.942887,27.017186],[108.942887,27.017186],[108.877597,27.01612],[108.79075,27.084343],[108.878829,27.106187],[108.926873,27.160512],[108.907778,27.204699],[108.963213,27.235565],[108.983539,27.26802],[109.053756,27.293551],[109.044517,27.331304],[109.103647,27.336621],[109.142451,27.418461],[109.141835,27.448207],[109.167089,27.41793],[109.202197,27.450331],[109.245313,27.41793],[109.300132,27.423774],[109.303211,27.47582],[109.404841,27.55066],[109.461508,27.567637],[109.451037,27.586204],[109.470131,27.62863],[109.45658,27.673689],[109.470747,27.680049],[109.414081,27.725087],[109.366653,27.721909],[109.37774,27.736741],[109.332777,27.782815],[109.346943,27.838396],[109.32169,27.868027],[109.30198,27.956343],[109.319842,27.988585],[109.362342,28.007608],[109.378972,28.034551],[109.335856,28.063073],[109.298284,28.036136],[109.314298,28.103729],[109.33832,28.141731],[109.340168,28.19027],[109.367885,28.254602],[109.388211,28.268307],[109.33524,28.293605],[109.317994,28.277795],[109.275494,28.313101],[109.268719,28.33786],[109.289045,28.373673],[109.264407,28.392628],[109.260712,28.46473],[109.274262,28.494714]]],[[[109.47629,26.829894],[109.486761,26.759913],[109.52187,26.749226],[109.522486,26.749226],[109.497232,26.815474],[109.513247,26.84004],[109.509551,26.877947],[109.486761,26.895562],[109.452885,26.861932],[109.467051,26.83203],[109.47629,26.829894]]],[[[109.528645,26.743881],[109.568065,26.726243],[109.597015,26.756173],[109.554515,26.73533],[109.528645,26.743881]]]]}},{"type":"Feature","properties":{"adcode":530000,"name":"\u4E91\u5357\u7701","center":[102.712251,25.040609],"centroid":[101.485106,25.008643],"childrenNum":16,"level":"province","parent":{"adcode":100000},"subFeatureIndex":24,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[105.308229,27.704955],[105.290367,27.712373],[105.293447,27.770637],[105.273736,27.794992],[105.313157,27.810874],[105.25957,27.827811],[105.233084,27.895534],[105.284823,27.935725],[105.270657,27.99704],[105.247867,28.009193],[105.218302,27.990698],[105.186273,27.995454],[105.167795,28.021345],[105.186889,28.054623],[105.168411,28.071522],[105.119752,28.07205],[105.061853,28.096866],[105.002107,28.064129],[104.980549,28.063073],[104.975006,28.020816],[104.903557,27.962158],[104.918339,27.938897],[104.888158,27.914574],[104.842579,27.900294],[104.796999,27.901352],[104.761891,27.884426],[104.743413,27.901881],[104.676275,27.880723],[104.63316,27.850567],[104.607906,27.857974],[104.573413,27.840512],[104.52537,27.889187],[104.508124,27.878078],[104.44961,27.927794],[104.40095,27.952114],[104.362762,28.012891],[104.30856,28.036136],[104.304248,28.050926],[104.373233,28.051454],[104.40095,28.091586],[104.448994,28.113758],[104.444682,28.16231],[104.406494,28.173389],[104.402182,28.202928],[104.442834,28.211366],[104.462544,28.241422],[104.44961,28.269889],[104.420045,28.269889],[104.392943,28.291497],[104.384936,28.329959],[104.343052,28.334173],[104.314103,28.306778],[104.282074,28.343128],[104.254357,28.403683],[104.267908,28.499448],[104.260516,28.536257],[104.323342,28.540989],[104.355987,28.555183],[104.375697,28.5946],[104.417581,28.598279],[104.425588,28.626649],[104.372617,28.649235],[104.314719,28.615617],[104.277147,28.631902],[104.252509,28.660788],[104.230951,28.635579],[104.170589,28.642932],[104.117618,28.634003],[104.09606,28.603533],[104.05972,28.6277],[103.953779,28.600906],[103.910047,28.631377],[103.887873,28.61982],[103.850917,28.66709],[103.833054,28.605109],[103.838598,28.587244],[103.802873,28.563068],[103.781931,28.525216],[103.829975,28.459995],[103.828743,28.44],[103.860156,28.383677],[103.85338,28.356822],[103.877402,28.316262],[103.828743,28.285173],[103.770845,28.233514],[103.740048,28.23615],[103.701859,28.198709],[103.692004,28.232459],[103.643961,28.260401],[103.573128,28.230877],[103.533092,28.168641],[103.470266,28.122204],[103.430846,28.044587],[103.459179,28.021345],[103.486281,28.033495],[103.515846,27.965329],[103.55465,27.978543],[103.502295,27.910343],[103.509686,27.843687],[103.487512,27.794992],[103.461027,27.779638],[103.393274,27.709194],[103.369868,27.708664],[103.349542,27.678459],[103.29226,27.632872],[103.2861,27.561802],[103.232514,27.56976],[103.19063,27.523596],[103.144434,27.450331],[103.141355,27.420586],[103.080992,27.396679],[103.055739,27.40943],[102.989833,27.367983],[102.941174,27.405711],[102.899906,27.317481],[102.883892,27.299401],[102.883276,27.258444],[102.904218,27.227584],[102.913457,27.133886],[102.870957,27.026782],[102.894979,27.001724],[102.896211,26.91264],[102.949181,26.843244],[102.966428,26.837904],[102.991681,26.775409],[102.983674,26.76686],[103.008312,26.710741],[103.005232,26.679195],[103.026174,26.664221],[103.035413,26.556673],[103.052659,26.555602],[103.052659,26.514374],[103.030485,26.485989],[102.989833,26.482775],[102.988602,26.413117],[102.998457,26.371839],[102.975667,26.340736],[102.893131,26.338591],[102.878964,26.364332],[102.833385,26.306406],[102.785342,26.298895],[102.739762,26.268846],[102.709581,26.210336],[102.659074,26.221611],[102.60056,26.250598],[102.638748,26.307479],[102.629509,26.336982],[102.570995,26.362723],[102.542046,26.338591],[102.440416,26.300505],[102.392372,26.296749],[102.349257,26.244694],[102.245163,26.212483],[102.242699,26.190468],[102.174946,26.146961],[102.152156,26.10935],[102.107808,26.068501],[102.080091,26.065275],[102.020961,26.096451],[101.954439,26.084627],[101.929186,26.105588],[101.899621,26.099139],[101.857737,26.049146],[101.835563,26.04592],[101.839875,26.082477],[101.796759,26.114723],[101.807846,26.156093],[101.773353,26.168448],[101.737013,26.219463],[101.690202,26.241473],[101.630455,26.224832],[101.586108,26.279579],[101.597195,26.303187],[101.64031,26.318745],[101.660636,26.346635],[101.635383,26.357361],[101.637847,26.388995],[101.565782,26.454381],[101.530057,26.467239],[101.506652,26.499915],[101.458608,26.49563],[101.422884,26.53151],[101.395783,26.591998],[101.402558,26.604841],[101.461688,26.606447],[101.461072,26.640687],[101.481398,26.673313],[101.453065,26.692563],[101.513427,26.768463],[101.466,26.786629],[101.445674,26.77434],[101.458608,26.731054],[101.435819,26.740675],[101.389623,26.723036],[101.387159,26.753501],[101.358826,26.771669],[101.399478,26.841642],[101.365602,26.883819],[101.311399,26.903034],[101.267667,26.903034],[101.264587,26.955323],[101.227015,26.959057],[101.228863,26.981992],[101.136472,27.023584],[101.157414,27.094999],[101.145095,27.103523],[101.170349,27.175421],[101.167885,27.198311],[101.167885,27.198311],[101.119226,27.208957],[101.071798,27.194585],[101.042233,27.22173],[101.026219,27.270679],[101.021907,27.332899],[100.95169,27.426961],[100.936908,27.469448],[100.901183,27.453517],[100.91227,27.521473],[100.854988,27.623858],[100.827886,27.615904],[100.848212,27.672099],[100.782307,27.691708],[100.775532,27.743098],[100.757053,27.770107],[100.707162,27.800816],[100.719481,27.858503],[100.681293,27.923035],[100.634482,27.915631],[100.609228,27.859033],[100.54517,27.809286],[100.511294,27.827811],[100.504518,27.852154],[100.442924,27.86644],[100.412127,27.816167],[100.350534,27.755809],[100.327744,27.72032],[100.311729,27.724028],[100.304954,27.788639],[100.28586,27.80611],[100.30865,27.830457],[100.30865,27.861149],[100.210715,27.87702],[100.170063,27.907699],[100.196549,27.936254],[100.120788,28.018703],[100.088759,28.029269],[100.05673,28.097922],[100.021006,28.147008],[100.033325,28.184467],[100.062274,28.193962],[100.091223,28.181302],[100.102926,28.201873],[100.153433,28.208202],[100.188541,28.252493],[100.147274,28.288862],[100.176223,28.325218],[100.136803,28.349975],[100.057346,28.368934],[100.073977,28.426317],[99.990209,28.47683],[99.985281,28.529422],[99.91876,28.599329],[99.875644,28.611939],[99.873181,28.631902],[99.834376,28.628225],[99.834992,28.660788],[99.79434,28.699116],[99.755536,28.701216],[99.722275,28.757369],[99.717964,28.846521],[99.676696,28.810345],[99.625573,28.81454],[99.609559,28.784122],[99.614486,28.740054],[99.553508,28.710664],[99.53195,28.677591],[99.540573,28.623497],[99.504233,28.619294],[99.466045,28.579886],[99.463581,28.549401],[99.403219,28.546246],[99.396444,28.491032],[99.426625,28.454207],[99.404451,28.44421],[99.437095,28.398419],[99.392748,28.318369],[99.412458,28.295186],[99.374886,28.18183],[99.306516,28.227714],[99.28927,28.286227],[99.237531,28.317842],[99.229524,28.350502],[99.200575,28.365774],[99.16485,28.425264],[99.187024,28.44],[99.191952,28.494714],[99.170394,28.566221],[99.183944,28.58882],[99.147604,28.640831],[99.126662,28.698066],[99.134053,28.734806],[99.114343,28.765763],[99.103872,28.841803],[99.123582,28.890021],[99.132206,28.94869],[99.113727,29.07273],[99.118039,29.100971],[99.105104,29.162656],[99.113727,29.221171],[99.037351,29.20759],[99.024416,29.188783],[98.9813,29.204978],[98.960974,29.165792],[98.967134,29.128159],[98.991771,29.105677],[99.013329,29.036632],[98.925866,28.978536],[98.917859,28.886877],[98.973909,28.864867],[98.972677,28.832367],[98.922786,28.823978],[98.912931,28.800906],[98.852569,28.798283],[98.827932,28.821356],[98.821772,28.920931],[98.786048,28.998952],[98.757714,29.004186],[98.70228,28.9644],[98.655469,28.976966],[98.624056,28.95864],[98.6567,28.910454],[98.643766,28.895261],[98.668403,28.843376],[98.652389,28.817162],[98.683802,28.740054],[98.666555,28.712239],[98.594491,28.667615],[98.637606,28.552029],[98.619128,28.50944],[98.625903,28.489455],[98.673947,28.478934],[98.693041,28.43158],[98.740468,28.348395],[98.746628,28.321003],[98.710287,28.288862],[98.712135,28.229296],[98.649925,28.200291],[98.625903,28.165475],[98.559382,28.182885],[98.494092,28.141203],[98.464527,28.151229],[98.428803,28.104785],[98.389383,28.114814],[98.389999,28.16442],[98.370289,28.18394],[98.37768,28.246167],[98.353042,28.293078],[98.317934,28.324691],[98.301303,28.384204],[98.208913,28.358401],[98.207681,28.330486],[98.231702,28.314681],[98.266811,28.242477],[98.21692,28.212949],[98.169492,28.206093],[98.17442,28.163365],[98.139311,28.142259],[98.160253,28.101089],[98.133152,27.990698],[98.143007,27.948942],[98.187355,27.939426],[98.205217,27.889716],[98.169492,27.851096],[98.215688,27.810874],[98.234166,27.690648],[98.283441,27.654608],[98.310542,27.583552],[98.317318,27.51935],[98.337644,27.508734],[98.388767,27.515104],[98.429419,27.549068],[98.430035,27.653547],[98.444201,27.665209],[98.474998,27.634462],[98.53536,27.620676],[98.554454,27.646126],[98.587099,27.587265],[98.583404,27.571351],[98.650541,27.567637],[98.662244,27.586734],[98.706591,27.553313],[98.685034,27.484315],[98.704744,27.462014],[98.686881,27.425367],[98.702896,27.412618],[98.706591,27.362136],[98.741084,27.330241],[98.734925,27.287168],[98.717062,27.271211],[98.723222,27.221198],[98.696121,27.211086],[98.713983,27.139744],[98.712751,27.075817],[98.765722,27.05077],[98.762642,27.018252],[98.732461,27.002257],[98.757098,26.877947],[98.730613,26.851253],[98.762026,26.798916],[98.746012,26.696841],[98.770033,26.690424],[98.762642,26.660478],[98.781736,26.620893],[98.773113,26.578083],[98.753403,26.559349],[98.757098,26.491881],[98.741084,26.432947],[98.750323,26.424372],[98.733693,26.350926],[98.681338,26.308016],[98.672715,26.239863],[98.713367,26.231274],[98.735541,26.185097],[98.712751,26.156093],[98.720142,26.127082],[98.661012,26.087852],[98.656084,26.139977],[98.632679,26.145887],[98.575396,26.118485],[98.602498,26.054523],[98.614201,25.968468],[98.637606,25.971696],[98.686881,25.925955],[98.705976,25.855426],[98.677642,25.816105],[98.640686,25.798864],[98.553839,25.845731],[98.529201,25.840884],[98.476846,25.77731],[98.461448,25.735267],[98.457752,25.682963],[98.409709,25.664084],[98.402317,25.593939],[98.326557,25.566409],[98.314854,25.543193],[98.247717,25.607971],[98.170724,25.620383],[98.189818,25.569108],[98.163949,25.524292],[98.131304,25.51025],[98.15779,25.457307],[98.137464,25.381633],[98.101123,25.388662],[98.099891,25.354055],[98.06971,25.311864],[98.006884,25.298338],[98.0075,25.279399],[97.940363,25.214985],[97.904023,25.216609],[97.875689,25.25721],[97.839349,25.27074],[97.796233,25.155954],[97.743262,25.078466],[97.719857,25.080634],[97.727864,25.04377],[97.716777,24.978147],[97.729712,24.908689],[97.785762,24.876117],[97.797465,24.845709],[97.765436,24.823984],[97.680437,24.827243],[97.652103,24.790846],[97.569567,24.765852],[97.547394,24.739221],[97.569567,24.708236],[97.570799,24.602719],[97.554785,24.490577],[97.530147,24.443187],[97.588662,24.435559],[97.669966,24.452993],[97.679821,24.401228],[97.716161,24.358711],[97.662574,24.339083],[97.665038,24.296544],[97.721089,24.295999],[97.767284,24.258357],[97.729712,24.227252],[97.72848,24.183585],[97.754349,24.163929],[97.748806,24.160653],[97.743262,24.159561],[97.730944,24.113685],[97.700763,24.093473],[97.697067,24.092927],[97.637321,24.04812],[97.628698,24.004938],[97.572647,23.983068],[97.529531,23.943146],[97.5283,23.926736],[97.618227,23.888438],[97.640401,23.866001],[97.647176,23.840823],[97.684132,23.876946],[97.718009,23.867643],[97.72848,23.895551],[97.763588,23.907041],[97.795617,23.951897],[97.8104,23.943146],[97.863371,23.978693],[97.896015,23.974319],[97.902175,24.014231],[97.984095,24.031177],[97.995182,24.04648],[98.091268,24.085824],[98.096196,24.08637],[98.123297,24.092927],[98.125761,24.092927],[98.132536,24.09238],[98.19721,24.09839],[98.219999,24.113685],[98.343187,24.098936],[98.37768,24.114232],[98.48239,24.122425],[98.487933,24.123517],[98.547063,24.128433],[98.593875,24.08036],[98.646229,24.106038],[98.681954,24.100029],[98.71891,24.127887],[98.818692,24.133348],[98.841482,24.126794],[98.876591,24.15137],[98.895069,24.098936],[98.807606,24.025164],[98.773729,24.022431],[98.727533,23.970491],[98.701048,23.981427],[98.673331,23.960647],[98.701048,23.946427],[98.68565,23.90157],[98.701664,23.834254],[98.669019,23.800857],[98.696121,23.784429],[98.784816,23.781691],[98.824236,23.727462],[98.811917,23.703354],[98.835939,23.683625],[98.847026,23.632097],[98.882134,23.620035],[98.882134,23.595358],[98.844562,23.578904],[98.80391,23.540504],[98.826084,23.470257],[98.874743,23.483431],[98.912315,23.426333],[98.920938,23.360971],[98.872895,23.329651],[98.906772,23.331849],[98.936953,23.309866],[98.928946,23.26589],[98.889525,23.209249],[98.906772,23.185595],[99.002242,23.160287],[99.057677,23.164689],[99.048438,23.11461],[99.106336,23.086536],[99.187024,23.100299],[99.255393,23.077727],[99.281879,23.101399],[99.3484,23.12892],[99.380429,23.099748],[99.440791,23.079379],[99.477747,23.083233],[99.528255,23.065614],[99.517168,23.006685],[99.533798,22.961507],[99.563363,22.925684],[99.531334,22.897019],[99.446951,22.934503],[99.43648,22.913557],[99.462965,22.844635],[99.401371,22.826434],[99.385357,22.761882],[99.326842,22.751396],[99.31514,22.737598],[99.339777,22.708894],[99.385973,22.57136],[99.359487,22.535435],[99.382277,22.493418],[99.297277,22.41156],[99.251698,22.393301],[99.278183,22.34626],[99.233836,22.296434],[99.235683,22.250468],[99.207966,22.232188],[99.175321,22.185647],[99.188256,22.162924],[99.156227,22.159599],[99.219669,22.110816],[99.294814,22.109152],[99.35456,22.095845],[99.400139,22.100281],[99.486987,22.128557],[99.516552,22.099726],[99.562747,22.113034],[99.578762,22.098617],[99.581841,22.103053],[99.648979,22.100835],[99.696406,22.067562],[99.762927,22.068117],[99.870101,22.029288],[99.871333,22.067007],[99.972347,22.053141],[99.965571,22.014309],[100.000064,21.973245],[99.982202,21.919401],[99.960028,21.907186],[99.944014,21.821097],[99.991441,21.703821],[100.049339,21.669899],[100.094303,21.702709],[100.131875,21.699929],[100.169447,21.663225],[100.107853,21.585337],[100.123252,21.565302],[100.131259,21.504066],[100.168831,21.482906],[100.184846,21.516315],[100.206404,21.509634],[100.235353,21.466756],[100.298795,21.477894],[100.349302,21.528564],[100.437381,21.533017],[100.48296,21.458958],[100.526692,21.471211],[100.579047,21.451717],[100.691764,21.510748],[100.730568,21.518542],[100.753358,21.555283],[100.789082,21.570867],[100.804481,21.609821],[100.847597,21.634856],[100.870386,21.67268],[100.896872,21.68269],[100.899335,21.684915],[100.936292,21.694368],[100.937524,21.693812],[101.015132,21.707157],[101.089661,21.773865],[101.123537,21.771642],[101.111835,21.746074],[101.116762,21.691032],[101.153102,21.669343],[101.169117,21.590345],[101.146943,21.560293],[101.209153,21.55751],[101.210385,21.509077],[101.225167,21.499055],[101.193138,21.473996],[101.194986,21.424979],[101.142631,21.409379],[101.183899,21.334699],[101.244877,21.302364],[101.246725,21.275598],[101.222088,21.234324],[101.290457,21.17853],[101.387775,21.225956],[101.439514,21.227072],[101.532521,21.252174],[101.601506,21.233208],[101.588572,21.191365],[101.605818,21.172392],[101.672339,21.194713],[101.703136,21.14616],[101.76473,21.147835],[101.794911,21.208104],[101.834331,21.204756],[101.833715,21.252731],[101.791832,21.285636],[101.745636,21.297345],[101.730238,21.336929],[101.749948,21.409379],[101.741324,21.482906],[101.772737,21.512975],[101.755491,21.538027],[101.754875,21.58478],[101.804766,21.577546],[101.828788,21.617054],[101.807846,21.644313],[101.780129,21.640975],[101.76781,21.716054],[101.747484,21.729953],[101.771506,21.833319],[101.740093,21.845541],[101.735165,21.875534],[101.700057,21.897191],[101.701288,21.938832],[101.666796,21.934391],[101.606434,21.967695],[101.626144,22.005986],[101.573789,22.115251],[101.602738,22.131883],[101.596579,22.161262],[101.547304,22.238282],[101.56455,22.269299],[101.625528,22.28259],[101.671723,22.372826],[101.648318,22.400494],[101.672339,22.47517],[101.715455,22.477935],[101.774585,22.506135],[101.824476,22.45692],[101.823244,22.42705],[101.862665,22.389427],[101.901469,22.384447],[101.907628,22.437007],[101.978461,22.427603],[102.046214,22.458026],[102.131214,22.430922],[102.145381,22.397727],[102.179257,22.430369],[102.270416,22.419858],[102.25625,22.457473],[102.322771,22.554227],[102.356648,22.563623],[102.404691,22.629925],[102.384365,22.679631],[102.43672,22.699508],[102.45951,22.762986],[102.510633,22.774574],[102.551285,22.743669],[102.569763,22.701164],[102.607335,22.730975],[102.657226,22.687913],[102.688639,22.70006],[102.80074,22.620534],[102.82353,22.623296],[102.880196,22.586832],[102.892515,22.533223],[102.930703,22.482359],[102.986754,22.477935],[103.030485,22.441432],[103.081608,22.454154],[103.071753,22.488441],[103.183238,22.558649],[103.161065,22.590147],[103.195557,22.648153],[103.220195,22.643734],[103.283021,22.678526],[103.288564,22.732078],[103.321209,22.777885],[103.323057,22.807678],[103.375411,22.794989],[103.441317,22.753052],[103.436389,22.6973],[103.457947,22.658646],[103.50907,22.601198],[103.529396,22.59291],[103.580519,22.66693],[103.567585,22.701164],[103.642113,22.794989],[103.740048,22.709446],[103.743127,22.697852],[103.766533,22.688465],[103.825047,22.615562],[103.863851,22.584069],[103.875554,22.565833],[103.894032,22.564728],[103.964865,22.502265],[104.009213,22.517745],[104.009213,22.575228],[104.022148,22.593463],[104.04309,22.67687],[104.045553,22.728215],[104.089901,22.768504],[104.117618,22.808781],[104.224176,22.826434],[104.261748,22.841877],[104.274067,22.828088],[104.256821,22.77347],[104.272835,22.73815],[104.323342,22.728767],[104.375697,22.690122],[104.422508,22.734838],[104.498885,22.774574],[104.527834,22.814298],[104.596203,22.846289],[104.674428,22.817056],[104.737869,22.825882],[104.732942,22.852356],[104.760659,22.862282],[104.772362,22.893711],[104.846275,22.926235],[104.860441,22.970874],[104.821021,23.032022],[104.804391,23.110207],[104.874608,23.123417],[104.882615,23.163589],[104.912796,23.175693],[104.949136,23.152033],[104.958991,23.188896],[105.093266,23.260942],[105.122215,23.247745],[105.181962,23.279084],[105.238012,23.26424],[105.260186,23.31811],[105.325475,23.390086],[105.353809,23.362069],[105.372903,23.317561],[105.416018,23.283482],[105.445584,23.292827],[105.50225,23.202648],[105.542902,23.184495],[105.526272,23.234548],[105.560148,23.257093],[105.593409,23.312614],[105.649459,23.346136],[105.699966,23.327453],[105.694423,23.363168],[105.637757,23.404366],[105.699966,23.40162],[105.758481,23.459826],[105.805908,23.467512],[105.815763,23.507031],[105.852103,23.526786],[105.89214,23.52514],[105.913081,23.499348],[105.935871,23.508678],[105.986378,23.489469],[105.999929,23.447748],[106.039965,23.484529],[106.071994,23.495506],[106.08616,23.524043],[106.141595,23.569579],[106.120653,23.605229],[106.149602,23.665538],[106.157609,23.724175],[106.136667,23.795381],[106.192102,23.824947],[106.173008,23.861622],[106.192718,23.879135],[106.157609,23.891174],[106.128044,23.956819],[106.091088,23.998924],[106.096631,24.018058],[106.053516,24.051399],[106.04982,24.089649],[106.011632,24.099482],[105.998081,24.120786],[105.963589,24.110954],[105.919241,24.122425],[105.901995,24.099482],[105.908154,24.069432],[105.89214,24.040468],[105.859495,24.056864],[105.841633,24.03063],[105.796669,24.023524],[105.802212,24.051945],[105.765256,24.073804],[105.739387,24.059596],[105.704278,24.0667],[105.649459,24.032816],[105.628518,24.126794],[105.594641,24.137718],[105.533663,24.130071],[105.493011,24.016965],[105.406163,24.043748],[105.395692,24.065607],[105.334099,24.094566],[105.320548,24.116416],[105.273121,24.092927],[105.292831,24.074896],[105.260186,24.061236],[105.20044,24.105491],[105.182577,24.167205],[105.229389,24.165567],[105.24294,24.208695],[105.215222,24.214699],[105.164715,24.288362],[105.196744,24.326541],[105.188121,24.347261],[105.138846,24.376701],[105.111744,24.37234],[105.106817,24.414853],[105.042759,24.442097],[104.979933,24.412673],[104.930042,24.411038],[104.914028,24.426296],[104.83642,24.446456],[104.784681,24.443732],[104.765587,24.45953],[104.74834,24.435559],[104.715695,24.441552],[104.703377,24.419757],[104.721239,24.340173],[104.70892,24.321087],[104.641783,24.367979],[104.610986,24.377246],[104.63008,24.397958],[104.616529,24.421937],[104.575877,24.424661],[104.550008,24.518894],[104.520443,24.535228],[104.489646,24.653313],[104.529682,24.731611],[104.542616,24.75607],[104.539537,24.813663],[104.586964,24.872859],[104.635623,24.903803],[104.663957,24.964584],[104.713232,24.996048],[104.684898,25.054072],[104.619609,25.060577],[104.685514,25.078466],[104.695369,25.122364],[104.732326,25.167871],[104.724319,25.195491],[104.753884,25.214443],[104.801927,25.163537],[104.822869,25.170037],[104.806854,25.224189],[104.826565,25.235558],[104.816094,25.262622],[104.736021,25.268034],[104.689826,25.296173],[104.639935,25.295632],[104.646094,25.356759],[104.615913,25.364871],[104.566638,25.402719],[104.543232,25.400556],[104.556783,25.524832],[104.524138,25.526992],[104.483486,25.494585],[104.44961,25.495126],[104.434827,25.472436],[104.418813,25.499447],[104.436059,25.520512],[104.428668,25.576126],[104.389248,25.595558],[104.332581,25.598796],[104.310407,25.647901],[104.328886,25.760602],[104.370769,25.730415],[104.397871,25.76168],[104.42374,25.841961],[104.441602,25.868889],[104.414501,25.909807],[104.438523,25.92757],[104.470552,26.009352],[104.460081,26.085702],[104.499501,26.070651],[104.52845,26.114186],[104.518595,26.165762],[104.548776,26.226979],[104.542616,26.253282],[104.592508,26.317672],[104.659645,26.335373],[104.684283,26.3772],[104.664572,26.397572],[104.665804,26.434019],[104.631928,26.451702],[104.638703,26.477954],[104.598667,26.520801],[104.57095,26.524549],[104.579573,26.568449],[104.556783,26.590393],[104.488414,26.579689],[104.459465,26.602701],[104.468088,26.644431],[104.424356,26.709137],[104.398487,26.686147],[104.353523,26.620893],[104.313487,26.612867],[104.274683,26.633733],[104.268524,26.617683],[104.222328,26.620358],[104.160734,26.646571],[104.121314,26.638012],[104.068343,26.573266],[104.067727,26.51491],[104.008597,26.511697],[103.953163,26.521336],[103.865699,26.512232],[103.819504,26.529903],[103.815808,26.55239],[103.763453,26.585041],[103.748671,26.623568],[103.759142,26.689355],[103.773308,26.716621],[103.725265,26.742812],[103.705555,26.794642],[103.722185,26.851253],[103.779468,26.87421],[103.763453,26.905702],[103.775156,26.951056],[103.753598,26.963858],[103.73204,27.018785],[103.704939,27.049171],[103.675374,27.051836],[103.623019,27.007056],[103.623635,27.035312],[103.601461,27.061962],[103.614396,27.079548],[103.659975,27.065692],[103.652584,27.092868],[103.620555,27.096598],[103.63349,27.12057],[103.696316,27.126429],[103.748671,27.210021],[103.801641,27.250464],[103.80041,27.26536],[103.865699,27.28185],[103.874322,27.331304],[103.903271,27.347785],[103.905119,27.38552],[103.932221,27.443958],[103.956242,27.425367],[104.015372,27.429086],[104.01722,27.383926],[104.084358,27.330773],[104.113923,27.338216],[104.173053,27.263232],[104.210625,27.297273],[104.248813,27.291955],[104.247582,27.336621],[104.295625,27.37436],[104.30856,27.407305],[104.363378,27.467855],[104.467472,27.414211],[104.497037,27.414743],[104.539537,27.327583],[104.570334,27.331836],[104.611602,27.306846],[104.7545,27.345658],[104.77113,27.317481],[104.824717,27.3531],[104.856746,27.332368],[104.851818,27.299401],[104.871528,27.290891],[104.913412,27.327051],[105.01073,27.379143],[105.068013,27.418461],[105.120984,27.418461],[105.184425,27.392959],[105.182577,27.367451],[105.233084,27.436522],[105.234316,27.489093],[105.260186,27.514573],[105.232469,27.546945],[105.25649,27.582491],[105.304533,27.611661],[105.29591,27.631811],[105.308229,27.704955]]]]}},{"type":"Feature","properties":{"adcode":540000,"name":"\u897F\u85CF\u81EA\u6CBB\u533A","center":[91.132212,29.660361],"centroid":[88.388277,31.56375],"childrenNum":7,"level":"province","parent":{"adcode":100000},"subFeatureIndex":25,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[89.711414,36.093272],[89.614711,36.109712],[89.594385,36.126632],[89.490291,36.151281],[89.375727,36.228078],[89.335075,36.23725],[89.292575,36.231457],[89.232213,36.295636],[89.198952,36.260417],[89.126887,36.254626],[89.10225,36.281164],[89.054822,36.291777],[89.013554,36.315409],[88.964279,36.318785],[88.926091,36.36458],[88.870657,36.348193],[88.838628,36.353496],[88.802903,36.33807],[88.783809,36.291777],[88.766563,36.292259],[88.690186,36.367954],[88.623665,36.389636],[88.618121,36.428168],[88.573158,36.461386],[88.498629,36.446463],[88.470912,36.48208],[88.41055,36.473418],[88.356963,36.477268],[88.366202,36.458016],[88.282434,36.470049],[88.241782,36.468605],[88.222688,36.447426],[88.182652,36.452721],[88.134609,36.427205],[88.092109,36.43539],[88.006494,36.430575],[87.983088,36.437797],[87.95845,36.408423],[87.919646,36.39349],[87.838342,36.383855],[87.826023,36.391563],[87.767509,36.3747],[87.731785,36.384818],[87.6203,36.360243],[87.570409,36.342409],[87.470626,36.354459],[87.460155,36.409868],[87.426895,36.42576],[87.386859,36.412757],[87.363453,36.420463],[87.348055,36.393008],[87.292004,36.358797],[87.193454,36.349158],[87.161425,36.325535],[87.149106,36.297565],[87.08628,36.310587],[87.051788,36.2966],[86.996353,36.308658],[86.943998,36.284058],[86.931064,36.265242],[86.887332,36.262829],[86.86331,36.299977],[86.836209,36.291294],[86.746282,36.291777],[86.69947,36.24449],[86.599072,36.222285],[86.531935,36.227113],[86.515305,36.205385],[86.454943,36.221319],[86.392733,36.206834],[86.35824,36.168676],[86.2794,36.170608],[86.248603,36.141616],[86.187625,36.130983],[86.182081,36.064734],[86.199944,36.047801],[86.173458,36.008113],[86.150668,36.00424],[86.129111,35.941761],[86.093386,35.906868],[86.090306,35.876809],[86.05335,35.842857],[86.035488,35.846738],[85.949256,35.778794],[85.903677,35.78462],[85.835308,35.771996],[85.811286,35.778794],[85.691178,35.751114],[85.65299,35.731199],[85.612953,35.651486],[85.566142,35.6403],[85.518715,35.680658],[85.373969,35.700101],[85.341324,35.753543],[85.271107,35.788989],[85.146071,35.742371],[85.053065,35.752086],[84.99455,35.737028],[84.973608,35.709334],[84.920022,35.696213],[84.798066,35.647595],[84.729081,35.613546],[84.704443,35.616951],[84.628067,35.595055],[84.570168,35.588242],[84.513502,35.564391],[84.448828,35.550272],[84.475929,35.516181],[84.45314,35.473303],[84.424191,35.466479],[84.333032,35.413821],[84.274517,35.404065],[84.200605,35.381135],[84.160569,35.359663],[84.140859,35.379184],[84.095895,35.362592],[84.077417,35.400163],[84.005968,35.422599],[83.906186,35.40309],[83.885244,35.367472],[83.79778,35.354783],[83.785462,35.36308],[83.677672,35.361128],[83.622238,35.335256],[83.599448,35.351366],[83.54155,35.341603],[83.540318,35.364056],[83.502745,35.360639],[83.449159,35.382111],[83.405427,35.380648],[83.333978,35.397236],[83.280391,35.401138],[83.251442,35.417722],[83.178145,35.38943],[83.127022,35.398699],[83.088834,35.425526],[83.067892,35.46258],[82.998907,35.484512],[82.971806,35.548324],[82.981661,35.599922],[82.956407,35.636409],[82.967494,35.667532],[82.894813,35.673852],[82.873871,35.688922],[82.795031,35.688436],[82.780249,35.666073],[82.731589,35.637868],[82.652133,35.67288],[82.628727,35.692324],[82.546192,35.708362],[82.501844,35.701073],[82.468583,35.717595],[82.424852,35.712736],[82.392823,35.656349],[82.336156,35.651486],[82.350323,35.611113],[82.328149,35.559523],[82.2992,35.544916],[82.263475,35.547837],[82.234526,35.520565],[82.189563,35.513258],[82.164925,35.495719],[82.086701,35.467454],[82.071302,35.450393],[82.034346,35.451855],[82.029419,35.426013],[82.05344,35.35039],[82.030034,35.321585],[81.99123,35.30547],[81.955506,35.307423],[81.927789,35.271275],[81.853876,35.25857],[81.804601,35.270786],[81.736847,35.26248],[81.68634,35.235599],[81.513261,35.23511],[81.504638,35.279092],[81.447972,35.318167],[81.441196,35.333303],[81.385762,35.335256],[81.363588,35.354783],[81.314313,35.337209],[81.285364,35.345508],[81.26627,35.322562],[81.219458,35.319144],[81.191741,35.36552],[81.142466,35.365032],[81.103662,35.386015],[81.09935,35.40748],[81.054387,35.402602],[81.031597,35.380648],[81.030981,35.337209],[81.002648,35.334768],[81.026053,35.31133],[80.963844,35.310842],[80.924423,35.330862],[80.894242,35.324027],[80.844351,35.345508],[80.759968,35.334768],[80.689135,35.339162],[80.690982,35.364544],[80.65649,35.393821],[80.599823,35.409431],[80.56841,35.391381],[80.532686,35.404553],[80.514824,35.391869],[80.444607,35.417235],[80.432904,35.449418],[80.375006,35.387966],[80.321419,35.38699],[80.286926,35.35283],[80.267832,35.295701],[80.362687,35.20871],[80.257977,35.203331],[80.223484,35.177409],[80.23026,35.147565],[80.118159,35.066293],[80.078123,35.076578],[80.031311,35.034447],[80.04363,35.022196],[80.02392,34.971209],[80.041782,34.943252],[80.034391,34.902033],[80.003594,34.895162],[79.996819,34.856375],[79.961094,34.862759],[79.926602,34.849499],[79.947544,34.821008],[79.898268,34.732035],[79.906892,34.683821],[79.866856,34.671517],[79.88595,34.642965],[79.84345,34.55725],[79.861312,34.528166],[79.801566,34.478847],[79.735661,34.471447],[79.699936,34.477861],[79.675914,34.451216],[79.58106,34.456151],[79.545335,34.476381],[79.504683,34.45467],[79.435082,34.447761],[79.363017,34.428018],[79.326677,34.44332],[79.274322,34.435916],[79.241677,34.415183],[79.179467,34.422588],[79.161605,34.441345],[79.072294,34.412714],[79.039033,34.421601],[79.0107,34.399877],[79.048888,34.348506],[79.039649,34.33467],[79.019939,34.313417],[78.981751,34.31836],[78.958345,34.230827],[78.941099,34.212022],[78.9257,34.155584],[78.910302,34.143202],[78.878273,34.163012],[78.828998,34.125369],[78.801897,34.137258],[78.737223,34.089692],[78.661462,34.086718],[78.656535,34.030196],[78.736607,33.999937],[78.744614,33.980585],[78.734143,33.918529],[78.762476,33.90959],[78.756317,33.8773],[78.766172,33.823124],[78.758165,33.790802],[78.779723,33.73259],[78.692259,33.676331],[78.684868,33.654415],[78.713201,33.623025],[78.755085,33.623025],[78.74215,33.55323],[78.816679,33.480882],[78.84994,33.419963],[78.896751,33.41247],[78.949722,33.376495],[78.9682,33.334505],[79.022403,33.323504],[79.041497,33.268479],[79.083997,33.245459],[79.072294,33.22844],[79.10925,33.200401],[79.152366,33.184375],[79.162221,33.165841],[79.139431,33.117735],[79.162837,33.01191],[79.204721,32.964724],[79.255844,32.942628],[79.227511,32.89038],[79.237982,32.846145],[79.225047,32.784281],[79.275554,32.778746],[79.301423,32.728919],[79.27309,32.678056],[79.299575,32.637244],[79.308199,32.596918],[79.272474,32.561113],[79.252148,32.516715],[79.190554,32.511669],[79.180083,32.492994],[79.135736,32.472295],[79.124649,32.416235],[79.103091,32.369744],[79.067982,32.380863],[79.005772,32.375304],[78.970664,32.331826],[78.904142,32.374798],[78.87273,32.40512],[78.81052,32.436441],[78.782186,32.480373],[78.760629,32.563635],[78.781571,32.608009],[78.74215,32.654881],[78.741534,32.703743],[78.6861,32.680071],[78.675013,32.658408],[78.628202,32.630188],[78.588782,32.637748],[78.577695,32.615067],[78.518564,32.605993],[78.500086,32.580782],[78.424942,32.565652],[78.395377,32.530339],[78.426174,32.502584],[78.472985,32.435431],[78.458818,32.379853],[78.483456,32.357106],[78.480992,32.329297],[78.508709,32.297939],[78.475449,32.236708],[78.430485,32.212407],[78.429869,32.194683],[78.469905,32.127808],[78.509941,32.147065],[78.527188,32.11463],[78.609107,32.052768],[78.60726,32.023851],[78.705194,31.988835],[78.762476,31.947203],[78.768636,31.92638],[78.739687,31.885228],[78.665158,31.851684],[78.654687,31.819144],[78.706426,31.778453],[78.763092,31.668499],[78.798817,31.675629],[78.806824,31.64099],[78.845628,31.609905],[78.833925,31.584927],[78.779723,31.545154],[78.740303,31.532912],[78.729832,31.478316],[78.755701,31.478316],[78.792041,31.435944],[78.760013,31.392531],[78.755085,31.355742],[78.795121,31.301043],[78.859179,31.289281],[78.865338,31.312804],[78.884432,31.277006],[78.923852,31.246824],[78.930628,31.220726],[78.997765,31.158779],[78.97436,31.115751],[79.010084,31.043994],[79.059359,31.028097],[79.096931,30.992192],[79.181931,31.015788],[79.205953,31.0004],[79.227511,30.949088],[79.33222,30.969103],[79.316206,31.01784],[79.35809,31.031174],[79.404901,31.071678],[79.424611,31.061425],[79.427075,31.018353],[79.505915,31.027584],[79.550879,30.957813],[79.59769,30.925989],[79.660516,30.956787],[79.668523,30.980392],[79.729501,30.941389],[79.75845,30.936769],[79.835443,30.851006],[79.890877,30.855116],[79.913051,30.833022],[79.900732,30.7991],[79.961094,30.771337],[79.955551,30.738422],[79.970333,30.685941],[80.014065,30.661748],[80.04363,30.603559],[80.143412,30.55822],[80.214245,30.586044],[80.261673,30.566465],[80.322035,30.564403],[80.357759,30.520592],[80.43044,30.515952],[80.446454,30.495327],[80.504969,30.483466],[80.549316,30.448905],[80.585041,30.463866],[80.633084,30.458707],[80.692214,30.416913],[80.719316,30.414848],[80.81725,30.321389],[80.910873,30.30279],[80.933662,30.266614],[80.996488,30.267648],[81.034677,30.246971],[81.038372,30.205086],[81.082104,30.151281],[81.085799,30.100554],[81.110437,30.085538],[81.09627,30.052909],[81.131995,30.016124],[81.225618,30.005759],[81.256415,30.011978],[81.247792,30.032705],[81.2829,30.061197],[81.293371,30.094859],[81.269349,30.153351],[81.335871,30.149729],[81.393769,30.199396],[81.397465,30.240767],[81.419023,30.270232],[81.406088,30.291938],[81.427646,30.305373],[81.399929,30.319323],[81.406088,30.369421],[81.432573,30.379231],[81.406704,30.40401],[81.418407,30.420525],[81.454131,30.412268],[81.494783,30.381296],[81.555761,30.369421],[81.566232,30.428782],[81.613044,30.412784],[81.63029,30.446842],[81.723913,30.407623],[81.759021,30.385426],[81.872354,30.373035],[81.939491,30.344633],[81.954274,30.355995],[81.99123,30.322939],[82.022027,30.339468],[82.060215,30.332237],[82.104563,30.346182],[82.132896,30.30434],[82.11873,30.279019],[82.114418,30.226806],[82.142135,30.200948],[82.188947,30.18543],[82.207425,30.143519],[82.183403,30.12178],[82.17786,30.06793],[82.246845,30.071555],[82.311519,30.035813],[82.333693,30.045138],[82.368185,30.014051],[82.412533,30.011978],[82.431011,29.989692],[82.474743,29.973622],[82.498148,29.947698],[82.560974,29.955476],[82.609017,29.886489],[82.64351,29.868846],[82.6238,29.834588],[82.703872,29.847566],[82.737749,29.80655],[82.691553,29.766037],[82.757459,29.761881],[82.774089,29.726548],[82.816589,29.717192],[82.830756,29.687562],[82.885574,29.689122],[82.9484,29.704718],[82.966878,29.658963],[83.011226,29.667804],[83.088834,29.604863],[83.12887,29.623593],[83.159667,29.61735],[83.164595,29.595496],[83.217565,29.60018],[83.266841,29.571035],[83.27608,29.505951],[83.325355,29.502826],[83.383253,29.42206],[83.415898,29.420496],[83.423289,29.361053],[83.450391,29.332883],[83.463941,29.285916],[83.492274,29.280174],[83.548941,29.201322],[83.57789,29.203934],[83.596368,29.174153],[83.656114,29.16736],[83.667201,29.200277],[83.727563,29.244672],[83.800244,29.249372],[83.82057,29.294267],[83.851367,29.294789],[83.911729,29.323491],[83.949301,29.312533],[83.986874,29.325057],[84.002272,29.291658],[84.052163,29.296877],[84.116837,29.286438],[84.130388,29.239972],[84.203068,29.239972],[84.197525,29.210202],[84.17104,29.19453],[84.176583,29.133909],[84.20738,29.118749],[84.192597,29.084236],[84.194445,29.045004],[84.224626,29.049189],[84.248648,29.030353],[84.228322,28.949738],[84.234481,28.889497],[84.268358,28.895261],[84.330568,28.859101],[84.340423,28.866963],[84.408176,28.85386],[84.404481,28.828173],[84.434046,28.823978],[84.445133,28.764189],[84.483321,28.735331],[84.557233,28.74635],[84.620059,28.732182],[84.650856,28.714338],[84.669334,28.680742],[84.699515,28.671816],[84.698284,28.633478],[84.773428,28.610363],[84.857196,28.567798],[84.896616,28.587244],[84.981616,28.586193],[84.995782,28.611414],[85.05676,28.674441],[85.126361,28.676016],[85.155926,28.643983],[85.195963,28.624022],[85.18426,28.587244],[85.189803,28.544669],[85.160238,28.49261],[85.108499,28.461047],[85.129441,28.377885],[85.113427,28.344708],[85.179948,28.324164],[85.209513,28.338914],[85.272339,28.282538],[85.349947,28.298347],[85.379512,28.274105],[85.415853,28.321003],[85.458969,28.332593],[85.520563,28.326798],[85.602483,28.295712],[85.601251,28.254075],[85.650526,28.283592],[85.682555,28.375779],[85.720743,28.372093],[85.753388,28.227714],[85.791576,28.195544],[85.854402,28.172334],[85.871648,28.124843],[85.898749,28.101617],[85.901213,28.053566],[85.980053,27.984357],[85.949256,27.937311],[86.002227,27.90717],[86.053966,27.900823],[86.125415,27.923035],[86.082915,28.018175],[86.086611,28.090002],[86.128495,28.086835],[86.140198,28.114814],[86.19132,28.167058],[86.223965,28.092642],[86.206103,28.084195],[86.231972,27.974315],[86.27324,27.976958],[86.308965,27.950528],[86.393349,27.926736],[86.414906,27.904526],[86.450015,27.908757],[86.475884,27.944713],[86.514689,27.954757],[86.513457,27.996511],[86.537478,28.044587],[86.55842,28.047757],[86.568891,28.103201],[86.60092,28.097922],[86.611391,28.069938],[86.647732,28.06941],[86.662514,28.092114],[86.700086,28.101617],[86.74813,28.089474],[86.768456,28.06941],[86.756753,28.032967],[86.827586,28.012363],[86.864542,28.022401],[86.885484,27.995983],[86.926752,27.985942],[86.935375,27.955286],[87.035157,27.946299],[87.080737,27.910872],[87.118309,27.840512],[87.173744,27.818284],[87.227946,27.812991],[87.249504,27.839454],[87.280917,27.845275],[87.317258,27.826753],[87.364069,27.824106],[87.421967,27.856916],[87.418272,27.825694],[87.45954,27.820931],[87.58088,27.859562],[87.598126,27.814579],[87.670191,27.832045],[87.668343,27.809815],[87.727473,27.802933],[87.77798,27.860091],[87.782292,27.890774],[87.826639,27.927794],[87.930733,27.909285],[87.982472,27.884426],[88.037291,27.901881],[88.090877,27.885484],[88.111819,27.864852],[88.137689,27.878607],[88.120442,27.915103],[88.156783,27.957929],[88.203594,27.943127],[88.242398,27.967444],[88.254101,27.939426],[88.357579,27.986471],[88.401311,27.976958],[88.43334,28.002852],[88.469064,28.009721],[88.498013,28.04089],[88.554064,28.027684],[88.565151,28.083139],[88.620585,28.091586],[88.645223,28.111119],[88.67602,28.068353],[88.764099,28.068353],[88.812142,28.018175],[88.842939,28.006023],[88.846635,27.921448],[88.864497,27.921448],[88.888519,27.846863],[88.863265,27.811932],[88.870657,27.743098],[88.850331,27.710783],[88.852178,27.671039],[88.816454,27.641354],[88.813374,27.606889],[88.770874,27.563924],[88.797976,27.521473],[88.783193,27.467324],[88.809063,27.405711],[88.838012,27.37808],[88.867577,27.3818],[88.901453,27.327583],[88.920548,27.325456],[88.911924,27.272807],[88.942105,27.261636],[88.984605,27.208957],[89.067757,27.240354],[89.077612,27.287168],[89.152757,27.319076],[89.182938,27.373829],[89.132431,27.441302],[89.095474,27.471572],[89.109025,27.537925],[89.163228,27.574534],[89.128735,27.611131],[89.131815,27.633402],[89.184786,27.673689],[89.238988,27.796581],[89.295655,27.84845],[89.375727,27.875962],[89.44348,27.968501],[89.461958,28.03191],[89.511233,28.086307],[89.541414,28.088418],[89.605472,28.161782],[89.720037,28.170224],[89.779167,28.197127],[89.789638,28.240895],[89.869094,28.221386],[89.901739,28.18183],[89.976268,28.189215],[90.017536,28.162837],[90.03355,28.136981],[90.07297,28.155451],[90.103151,28.141731],[90.124709,28.190797],[90.166593,28.187632],[90.189999,28.161782],[90.231882,28.144897],[90.297172,28.153868],[90.367389,28.088946],[90.384019,28.06096],[90.43699,28.063073],[90.47949,28.044587],[90.513983,28.062016],[90.569417,28.044059],[90.591591,28.021345],[90.701844,28.076274],[90.741264,28.053038],[90.802242,28.040362],[90.806554,28.015005],[90.853365,27.969029],[90.896481,27.946299],[90.96177,27.9537],[90.976553,27.935725],[90.96485,27.900294],[91.025828,27.857445],[91.113292,27.846333],[91.155175,27.894476],[91.147784,27.927794],[91.162567,27.968501],[91.216153,27.989113],[91.251878,27.970615],[91.309776,28.057791],[91.464993,28.002852],[91.490246,27.971672],[91.486551,27.937311],[91.552456,27.90717],[91.611586,27.891303],[91.618978,27.856916],[91.561079,27.855329],[91.544449,27.820401],[91.610355,27.819343],[91.642383,27.7664],[91.622673,27.692238],[91.570934,27.650897],[91.562311,27.627569],[91.582637,27.598933],[91.564775,27.58196],[91.585101,27.540578],[91.626985,27.509265],[91.663325,27.507142],[91.71876,27.467324],[91.753868,27.462545],[91.839484,27.489624],[91.946657,27.464138],[92.010715,27.474758],[92.021802,27.444489],[92.064918,27.391365],[92.125896,27.273339],[92.091403,27.264296],[92.071077,27.237694],[92.061222,27.190327],[92.032273,27.167967],[92.02673,27.108318],[92.043976,27.052902],[92.076005,27.041175],[92.124664,26.960124],[92.109265,26.854991],[92.197961,26.86994],[92.28604,26.892359],[92.404916,26.9025],[92.496691,26.921711],[92.549046,26.941453],[92.64698,26.952656],[92.682089,26.947855],[92.802813,26.895028],[92.909371,26.914241],[93.050421,26.883819],[93.111399,26.880082],[93.232739,26.906769],[93.56781,26.938252],[93.625092,26.955323],[93.747048,27.015587],[93.817265,27.025183],[93.841903,27.045973],[93.849294,27.168499],[93.970634,27.30525],[94.056866,27.375423],[94.147409,27.458297],[94.220705,27.536333],[94.277372,27.58143],[94.353132,27.578778],[94.399944,27.589386],[94.443675,27.585143],[94.478168,27.602116],[94.524979,27.596282],[94.660486,27.650367],[94.722696,27.683759],[94.78121,27.699127],[94.836645,27.728796],[94.88592,27.743098],[94.947514,27.792345],[95.015267,27.82887],[95.067006,27.840512],[95.28628,27.939955],[95.32878,28.017646],[95.352802,28.04089],[95.371896,28.110063],[95.39715,28.142259],[95.437802,28.161782],[95.528345,28.182885],[95.674322,28.254075],[95.740228,28.275159],[95.787655,28.270416],[95.832003,28.295186],[95.874502,28.29782],[95.899756,28.278322],[95.907763,28.241422],[95.936096,28.240368],[95.989067,28.198181],[96.074683,28.193434],[96.098088,28.212421],[96.194175,28.212949],[96.275479,28.228241],[96.298269,28.140148],[96.367254,28.118509],[96.398667,28.118509],[96.395587,28.143842],[96.426384,28.161782],[96.46334,28.143314],[96.499681,28.067297],[96.538485,28.075218],[96.623485,28.024514],[96.635188,27.994926],[96.690622,27.948942],[96.711564,27.9574],[96.784245,27.931495],[96.810114,27.890245],[96.849534,27.874375],[96.908049,27.884426],[96.972722,27.861149],[97.008447,27.807698],[97.049099,27.81405],[97.062649,27.742568],[97.097758,27.740979],[97.103301,27.780697],[97.167975,27.811932],[97.253591,27.891832],[97.303482,27.913516],[97.324424,27.880723],[97.386634,27.882839],[97.372467,27.907699],[97.379242,27.970087],[97.413119,28.01342],[97.378626,28.031382],[97.375547,28.062545],[97.320728,28.054095],[97.305945,28.071522],[97.340438,28.104785],[97.326887,28.132759],[97.352757,28.149646],[97.362612,28.199236],[97.349677,28.235623],[97.398336,28.238786],[97.402032,28.279903],[97.422358,28.297293],[97.461162,28.26778],[97.469169,28.30309],[97.518445,28.327852],[97.488879,28.347341],[97.485184,28.38631],[97.499966,28.428948],[97.521524,28.444736],[97.507974,28.46473],[97.521524,28.495766],[97.569567,28.541515],[97.60406,28.515225],[97.634857,28.532051],[97.68598,28.519958],[97.737103,28.465782],[97.738335,28.396313],[97.769748,28.3742],[97.801161,28.326798],[97.842429,28.326798],[97.871378,28.361561],[97.907718,28.363141],[98.020435,28.253548],[98.008116,28.214003],[98.03337,28.187105],[98.056775,28.202401],[98.090036,28.195544],[98.097427,28.166531],[98.139311,28.142259],[98.17442,28.163365],[98.169492,28.206093],[98.21692,28.212949],[98.266811,28.242477],[98.231702,28.314681],[98.207681,28.330486],[98.208913,28.358401],[98.301303,28.384204],[98.317934,28.324691],[98.353042,28.293078],[98.37768,28.246167],[98.370289,28.18394],[98.389999,28.16442],[98.389383,28.114814],[98.428803,28.104785],[98.464527,28.151229],[98.494092,28.141203],[98.559382,28.182885],[98.625903,28.165475],[98.649925,28.200291],[98.712135,28.229296],[98.710287,28.288862],[98.746628,28.321003],[98.740468,28.348395],[98.693041,28.43158],[98.673947,28.478934],[98.625903,28.489455],[98.619128,28.50944],[98.637606,28.552029],[98.594491,28.667615],[98.666555,28.712239],[98.683802,28.740054],[98.652389,28.817162],[98.668403,28.843376],[98.643766,28.895261],[98.6567,28.910454],[98.624056,28.95864],[98.655469,28.976966],[98.70228,28.9644],[98.757714,29.004186],[98.786048,28.998952],[98.821772,28.920931],[98.827932,28.821356],[98.852569,28.798283],[98.912931,28.800906],[98.922786,28.823978],[98.972677,28.832367],[98.973909,28.864867],[98.917859,28.886877],[98.925866,28.978536],[99.013329,29.036632],[98.991771,29.105677],[98.967134,29.128159],[98.960974,29.165792],[98.9813,29.204978],[99.024416,29.188783],[99.037351,29.20759],[99.113727,29.221171],[99.114343,29.243628],[99.075539,29.316186],[99.058909,29.417368],[99.066916,29.421018],[99.044742,29.520013],[99.052133,29.563748],[99.014561,29.607464],[98.992387,29.677163],[99.018873,29.792009],[99.0238,29.846009],[99.068148,29.931621],[99.055213,29.958587],[99.036735,30.053945],[99.044742,30.079842],[98.989308,30.151799],[98.9813,30.182843],[98.993003,30.215429],[98.970829,30.260928],[98.986844,30.280569],[98.967134,30.33482],[98.965286,30.449937],[98.932025,30.521623],[98.926482,30.569556],[98.939417,30.598923],[98.92217,30.609225],[98.907388,30.698292],[98.963438,30.728134],[98.957895,30.765166],[98.904924,30.782649],[98.850105,30.849465],[98.797135,30.87926],[98.774345,30.908019],[98.797135,30.948575],[98.806374,30.995783],[98.774961,31.031174],[98.736772,31.049121],[98.712135,31.082954],[98.710287,31.1178],[98.675179,31.15417],[98.602498,31.192062],[98.62344,31.221238],[98.60373,31.257568],[98.616048,31.3036],[98.643766,31.338876],[98.691809,31.333253],[98.773113,31.249382],[98.805758,31.279052],[98.810685,31.306668],[98.887062,31.37465],[98.84333,31.416028],[98.844562,31.429817],[98.714599,31.508935],[98.696736,31.538523],[98.651157,31.57881],[98.619128,31.591555],[98.553839,31.660349],[98.545831,31.717383],[98.516882,31.717383],[98.508875,31.751995],[98.461448,31.800327],[98.414636,31.832365],[98.426339,31.856767],[98.399238,31.895899],[98.432498,31.922825],[98.434962,32.007613],[98.402933,32.026896],[98.404781,32.045159],[98.357354,32.087253],[98.303151,32.121726],[98.260035,32.208862],[98.218768,32.234683],[98.23047,32.262521],[98.208913,32.318171],[98.218768,32.342444],[98.125145,32.401077],[98.107283,32.391476],[98.079565,32.415224],[97.940363,32.482393],[97.880001,32.486431],[97.863986,32.499051],[97.80732,32.50006],[97.795617,32.521257],[97.730944,32.527312],[97.684132,32.530339],[97.670582,32.51722],[97.540618,32.536899],[97.50243,32.530844],[97.463626,32.55506],[97.448843,32.586833],[97.411887,32.575235],[97.374315,32.546484],[97.3583,32.563635],[97.332431,32.542448],[97.334895,32.514192],[97.388481,32.501575],[97.341054,32.440987],[97.387865,32.427349],[97.424822,32.322723],[97.415583,32.296421],[97.371235,32.273148],[97.32196,32.303503],[97.299786,32.294904],[97.264062,32.182527],[97.271453,32.139971],[97.313953,32.130342],[97.293011,32.096887],[97.308409,32.076605],[97.258518,32.072041],[97.219714,32.109054],[97.201852,32.090296],[97.233881,32.063927],[97.214786,32.042623],[97.188301,32.055304],[97.169823,32.032984],[97.127323,32.044145],[97.028773,32.04871],[97.006599,32.067984],[96.935766,32.048203],[96.965947,32.008628],[96.941925,31.986297],[96.894498,32.013703],[96.863085,31.996448],[96.868629,31.964975],[96.824281,32.007613],[96.722651,32.013195],[96.742977,32.001016],[96.753448,31.944156],[96.776238,31.935015],[96.81073,31.894375],[96.794716,31.869474],[96.760223,31.860325],[96.765767,31.819144],[96.799027,31.792188],[96.840295,31.720438],[96.790404,31.698545],[96.778701,31.675629],[96.722651,31.686833],[96.691854,31.722474],[96.661057,31.705674],[96.615477,31.737236],[96.56805,31.711783],[96.519391,31.74945],[96.468884,31.769804],[96.435623,31.796258],[96.407906,31.845583],[96.389428,31.919777],[96.288414,31.919777],[96.253305,31.929936],[96.220044,31.905553],[96.188632,31.904028],[96.214501,31.876589],[96.202798,31.841008],[96.183088,31.835924],[96.178161,31.775401],[96.231131,31.749959],[96.222508,31.733164],[96.252073,31.697527],[96.245298,31.657802],[96.221892,31.647613],[96.207726,31.598691],[96.156603,31.602769],[96.148595,31.686324],[96.135661,31.70211],[96.064828,31.720438],[95.989067,31.78761],[95.983524,31.816601],[95.89914,31.81711],[95.846169,31.736218],[95.853561,31.714329],[95.823995,31.68225],[95.779648,31.748941],[95.634286,31.782523],[95.580083,31.76726],[95.546823,31.73978],[95.511714,31.750468],[95.480301,31.795749],[95.456896,31.801853],[95.406389,31.896915],[95.408852,31.918761],[95.3682,31.92892],[95.360809,31.95939],[95.395918,32.001523],[95.454432,32.007613],[95.421171,32.033999],[95.454432,32.061898],[95.440265,32.157705],[95.406389,32.182021],[95.367584,32.178982],[95.366968,32.151118],[95.31523,32.148585],[95.270266,32.194683],[95.270266,32.194683],[95.239469,32.287315],[95.241317,32.3207],[95.214216,32.321712],[95.20744,32.297433],[95.10581,32.258979],[95.079325,32.279726],[95.096571,32.322217],[95.193274,32.332331],[95.261643,32.348006],[95.228382,32.363678],[95.218527,32.397035],[95.153853,32.386423],[95.081789,32.384907],[95.075013,32.376315],[95.075013,32.376315],[95.057151,32.395014],[94.988166,32.422802],[94.944434,32.404109],[94.912405,32.41573],[94.889616,32.472295],[94.852043,32.463712],[94.80708,32.486431],[94.78737,32.522266],[94.762116,32.526303],[94.737479,32.587338],[94.638312,32.645307],[94.614291,32.673522],[94.591501,32.640772],[94.522516,32.595909],[94.459074,32.599439],[94.463386,32.572209],[94.435052,32.562626],[94.395016,32.594397],[94.371611,32.524789],[94.350053,32.533871],[94.294002,32.519743],[94.292154,32.502584],[94.250886,32.51722],[94.196684,32.51621],[94.176974,32.454117],[94.137554,32.433915],[94.091974,32.463207],[94.049474,32.469771],[94.03038,32.448057],[93.978641,32.459672],[93.960163,32.484917],[93.90904,32.463207],[93.861613,32.466237],[93.851142,32.50965],[93.820345,32.549511],[93.75136,32.56313],[93.721795,32.578261],[93.651577,32.571705],[93.618933,32.522771],[93.516687,32.47583],[93.501904,32.503593],[93.476651,32.504603],[93.4631,32.556069],[93.411977,32.558086],[93.385492,32.525294],[93.33868,32.5712],[93.308499,32.580278],[93.300492,32.619604],[93.260456,32.62666],[93.239514,32.662439],[93.210565,32.655385],[93.176688,32.6705],[93.159442,32.644803],[93.087993,32.63674],[93.069515,32.626156],[93.023935,32.703239],[93.019624,32.737477],[93.00053,32.741001],[92.964189,32.714821],[92.933392,32.719353],[92.866871,32.698203],[92.822523,32.729926],[92.789262,32.719856],[92.756618,32.743014],[92.686401,32.76516],[92.667922,32.73194],[92.634662,32.720863],[92.574916,32.741001],[92.56814,32.73194],[92.484372,32.745028],[92.459119,32.76365],[92.411076,32.748048],[92.355641,32.764657],[92.343938,32.738484],[92.310062,32.751571],[92.255243,32.720863],[92.198577,32.754591],[92.211511,32.788306],[92.193649,32.801889],[92.227526,32.821003],[92.205352,32.866255],[92.145606,32.885857],[92.101874,32.860222],[92.038432,32.860725],[92.018722,32.829552],[91.955897,32.8205],[91.896766,32.907967],[91.857962,32.90244],[91.839484,32.948152],[91.799448,32.942126],[91.752637,32.969242],[91.685499,32.989324],[91.664557,33.012913],[91.583253,33.0375],[91.55492,33.060074],[91.535826,33.10019],[91.49579,33.109214],[91.436044,33.066092],[91.370138,33.100691],[91.311624,33.108211],[91.261733,33.141291],[91.226624,33.141792],[91.18782,33.106206],[91.161335,33.108712],[91.147784,33.07211],[91.072024,33.113224],[91.037531,33.098686],[91.001807,33.11573],[90.927894,33.120241],[90.902024,33.083143],[90.88293,33.120241],[90.803474,33.114227],[90.740032,33.142293],[90.704308,33.135778],[90.627315,33.180368],[90.562642,33.229441],[90.490577,33.264977],[90.405577,33.260473],[90.363077,33.279487],[90.332896,33.310501],[90.246665,33.423959],[90.22018,33.437943],[90.107463,33.460913],[90.088984,33.478885],[90.083441,33.525295],[90.01076,33.553728],[89.984275,33.612061],[90.008296,33.687785],[89.981195,33.70322],[89.983659,33.725622],[89.907282,33.741051],[89.902355,33.758467],[89.942391,33.801246],[89.899891,33.80771],[89.837065,33.868853],[89.795181,33.865374],[89.73174,33.921509],[89.718805,33.946832],[89.688008,33.959739],[89.684928,33.990013],[89.635037,34.049537],[89.656595,34.057966],[89.655979,34.097126],[89.71203,34.131809],[89.756993,34.124874],[89.760073,34.152613],[89.789638,34.150632],[89.816739,34.16945],[89.838297,34.263477],[89.825362,34.293642],[89.86663,34.324785],[89.858623,34.359375],[89.820435,34.369255],[89.799493,34.39642],[89.819819,34.420614],[89.823515,34.455657],[89.814891,34.548871],[89.777935,34.574499],[89.798877,34.628686],[89.74837,34.641981],[89.72558,34.660689],[89.732356,34.732035],[89.799493,34.743838],[89.825978,34.796931],[89.867862,34.81069],[89.838913,34.865705],[89.814891,34.86816],[89.821051,34.902033],[89.78779,34.921664],[89.747138,34.903506],[89.707102,34.919701],[89.670146,34.887798],[89.578987,34.895162],[89.560509,34.938836],[89.59069,35.057965],[89.593153,35.104491],[89.579603,35.118688],[89.519241,35.133862],[89.46935,35.214577],[89.450255,35.223867],[89.48598,35.256616],[89.531559,35.276161],[89.494603,35.298632],[89.516161,35.330862],[89.497067,35.361128],[89.58761,35.383575],[89.619639,35.412357],[89.658443,35.425526],[89.685544,35.416259],[89.739131,35.468429],[89.765,35.482563],[89.740979,35.507412],[89.720037,35.501566],[89.699711,35.544916],[89.71203,35.581915],[89.75145,35.580942],[89.765616,35.599922],[89.726196,35.648082],[89.748986,35.66267],[89.747138,35.7516],[89.782863,35.773453],[89.767464,35.799183],[89.801957,35.848193],[89.778551,35.861775],[89.707718,35.849163],[89.654747,35.848193],[89.62395,35.859349],[89.550654,35.856924],[89.554965,35.873414],[89.489676,35.903475],[89.428082,35.917531],[89.434857,35.992136],[89.404676,36.016827],[89.417611,36.044897],[89.474893,36.022151],[89.605472,36.038123],[89.688624,36.091337],[89.711414,36.093272]]]]}},{"type":"Feature","properties":{"adcode":610000,"name":"\u9655\u897F\u7701","center":[108.948024,34.263161],"centroid":[108.887114,35.263661],"childrenNum":10,"level":"province","parent":{"adcode":100000},"subFeatureIndex":26,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[110.379257,34.600612],[110.29549,34.610956],[110.269004,34.629671],[110.229584,34.692679],[110.243135,34.725641],[110.246831,34.789068],[110.230816,34.880925],[110.262229,34.944233],[110.320743,35.00504],[110.373714,35.134351],[110.364475,35.197952],[110.378642,35.210666],[110.374946,35.251728],[110.45009,35.327933],[110.477808,35.413821],[110.531394,35.511309],[110.567735,35.539559],[110.589293,35.602355],[110.609619,35.632031],[110.57759,35.701559],[110.571431,35.800639],[110.550489,35.838005],[110.549257,35.877778],[110.511684,35.879718],[110.516612,35.918501],[110.502445,35.947575],[110.516612,35.971796],[110.49259,35.994073],[110.491974,36.034735],[110.467953,36.074893],[110.447011,36.164328],[110.45625,36.22663],[110.474112,36.248352],[110.474112,36.306729],[110.459946,36.327946],[110.487047,36.393972],[110.489511,36.430094],[110.47288,36.453203],[110.503677,36.488335],[110.488895,36.556628],[110.496902,36.582102],[110.447627,36.621018],[110.426685,36.657514],[110.394656,36.676716],[110.402663,36.697352],[110.438388,36.685835],[110.447011,36.737649],[110.407591,36.776007],[110.423605,36.818179],[110.406975,36.824886],[110.424221,36.855539],[110.376178,36.882351],[110.408823,36.892403],[110.424221,36.963685],[110.381721,37.002408],[110.382953,37.022001],[110.426685,37.008621],[110.417446,37.027257],[110.460561,37.044932],[110.49567,37.086956],[110.535706,37.115118],[110.53509,37.138021],[110.590525,37.187145],[110.651503,37.256722],[110.661974,37.281963],[110.690307,37.287201],[110.678604,37.317668],[110.695234,37.34955],[110.641648,37.360015],[110.630561,37.372858],[110.644111,37.435135],[110.740198,37.44939],[110.759292,37.474567],[110.770995,37.538184],[110.795017,37.558586],[110.771611,37.594634],[110.763604,37.639668],[110.793169,37.650567],[110.775306,37.680886],[110.706321,37.705511],[110.716792,37.728708],[110.750669,37.736281],[110.735886,37.77035],[110.680452,37.790216],[110.59422,37.922049],[110.522771,37.955088],[110.528315,37.990471],[110.507989,38.013107],[110.501829,38.097929],[110.519692,38.130889],[110.509221,38.192061],[110.528315,38.211814],[110.565887,38.215105],[110.57759,38.297345],[110.601612,38.308147],[110.661358,38.308617],[110.701394,38.353215],[110.746973,38.366355],[110.77777,38.440924],[110.796864,38.453579],[110.840596,38.439986],[110.874473,38.453579],[110.870777,38.510265],[110.907733,38.521035],[110.920052,38.581878],[110.898494,38.587024],[110.880632,38.626776],[110.916357,38.673981],[110.915125,38.704345],[110.965016,38.755699],[111.009363,38.847579],[110.995813,38.868084],[111.016755,38.889981],[111.009979,38.932823],[110.980414,38.970056],[110.998276,38.998433],[111.038313,39.020289],[111.094363,39.030053],[111.138095,39.064447],[111.147334,39.100681],[111.173819,39.135041],[111.163348,39.152678],[111.219399,39.244044],[111.213239,39.257021],[111.247732,39.302419],[111.202152,39.305197],[111.179363,39.326959],[111.186138,39.35149],[111.155341,39.338531],[111.159037,39.362596],[111.125776,39.366297],[111.087588,39.376013],[111.098059,39.401914],[111.064182,39.400989],[111.058639,39.447681],[111.10545,39.472631],[111.10545,39.497573],[111.148566,39.531277],[111.154725,39.569116],[111.136863,39.587106],[111.101138,39.559428],[111.017371,39.552045],[110.958856,39.519275],[110.891103,39.509118],[110.869545,39.494341],[110.782698,39.38804],[110.73835,39.348713],[110.731575,39.30705],[110.702626,39.273701],[110.626249,39.266751],[110.596684,39.282966],[110.566503,39.320014],[110.559728,39.351027],[110.524003,39.382952],[110.482735,39.360745],[110.434692,39.381101],[110.429764,39.341308],[110.385417,39.310291],[110.257917,39.407001],[110.243751,39.423645],[110.152592,39.45415],[110.12549,39.432891],[110.136577,39.39174],[110.161831,39.387115],[110.184005,39.355192],[110.217881,39.281113],[110.109476,39.249606],[110.041107,39.21623],[109.962267,39.212056],[109.90252,39.271848],[109.871723,39.243581],[109.961035,39.191651],[109.893897,39.141075],[109.92223,39.107183],[109.890818,39.103932],[109.851397,39.122971],[109.793499,39.074204],[109.762086,39.057476],[109.72513,39.018429],[109.665384,38.981687],[109.685094,38.968195],[109.672159,38.928167],[109.624116,38.85457],[109.549587,38.805618],[109.511399,38.833595],[109.444262,38.782763],[109.404226,38.720689],[109.338936,38.701542],[109.329081,38.66043],[109.367269,38.627711],[109.331545,38.597783],[109.276726,38.623035],[109.196654,38.552867],[109.175712,38.518694],[109.128901,38.480288],[109.054372,38.433892],[109.051292,38.385122],[109.007561,38.359316],[108.961981,38.26493],[108.976148,38.245192],[108.938575,38.207582],[108.964445,38.154894],[109.069155,38.091336],[109.050676,38.055059],[109.06977,38.023008],[109.037742,38.021593],[109.018648,37.971602],[108.982923,37.964053],[108.9743,37.931962],[108.93488,37.922521],[108.893612,37.978207],[108.883141,38.01405],[108.830786,38.049875],[108.797525,38.04799],[108.82709,37.989056],[108.798141,37.93385],[108.791982,37.872934],[108.799989,37.784068],[108.784591,37.764673],[108.791982,37.700303],[108.777815,37.683728],[108.720533,37.683728],[108.699591,37.669518],[108.628142,37.651988],[108.532671,37.690832],[108.485244,37.678044],[108.422418,37.648672],[108.301078,37.640616],[108.293071,37.656726],[108.24626,37.665728],[108.205608,37.655779],[108.193905,37.638246],[108.134159,37.622131],[108.055318,37.652462],[108.025137,37.649619],[108.012819,37.66857],[108.025753,37.696041],[107.993109,37.735335],[107.982022,37.787378],[107.884703,37.808186],[107.842819,37.828987],[107.732566,37.84931],[107.684523,37.888522],[107.65003,37.86443],[107.659269,37.844112],[107.646335,37.805349],[107.620465,37.776026],[107.599523,37.791162],[107.57119,37.776499],[107.499125,37.765619],[107.484959,37.706458],[107.425828,37.684201],[107.387024,37.691305],[107.389488,37.671413],[107.422133,37.665254],[107.361155,37.613125],[107.311264,37.609806],[107.330358,37.584201],[107.369162,37.58752],[107.345756,37.518725],[107.284162,37.481691],[107.282931,37.437036],[107.257677,37.337179],[107.273075,37.29101],[107.309416,37.239095],[107.270612,37.229089],[107.317423,37.200017],[107.336517,37.165687],[107.334669,37.138975],[107.306952,37.100799],[107.281083,37.127047],[107.268764,37.099367],[107.28601,37.054963],[107.288474,37.008143],[107.288474,37.008143],[107.291554,36.979463],[107.291554,36.979463],[107.310032,36.912502],[107.336517,36.925899],[107.365466,36.905324],[107.478183,36.908196],[107.533618,36.867031],[107.540393,36.828718],[107.5909,36.836382],[107.642023,36.819137],[107.670356,36.83303],[107.722095,36.802367],[107.742421,36.811951],[107.768291,36.792783],[107.866841,36.766899],[107.907493,36.750118],[107.914268,36.720861],[107.940754,36.694953],[107.938906,36.655594],[108.006659,36.683435],[108.02329,36.647912],[108.001732,36.639269],[108.060862,36.592194],[108.079956,36.614294],[108.092891,36.587388],[108.163724,36.563839],[108.1976,36.630144],[108.222854,36.631105],[108.204992,36.606607],[108.204992,36.606607],[108.210535,36.577296],[108.245644,36.571048],[108.262274,36.549417],[108.340498,36.559032],[108.365136,36.519603],[108.391621,36.505654],[108.408252,36.45946],[108.460606,36.422871],[108.495099,36.422389],[108.514809,36.445501],[108.510498,36.47438],[108.562852,36.43876],[108.618903,36.433946],[108.651548,36.384818],[108.641693,36.359279],[108.646004,36.254143],[108.712526,36.138716],[108.682345,36.062316],[108.688504,36.021183],[108.659555,35.990683],[108.652164,35.94806],[108.593649,35.950967],[108.562852,35.921409],[108.518505,35.905414],[108.499411,35.872444],[108.527744,35.82442],[108.533903,35.746257],[108.517889,35.699615],[108.539447,35.605761],[108.618287,35.557088],[108.625678,35.537124],[108.605968,35.503028],[108.631222,35.418698],[108.61028,35.355271],[108.614591,35.328909],[108.583178,35.294724],[108.547454,35.304981],[108.48894,35.275184],[108.36144,35.279581],[108.345426,35.300586],[108.296767,35.267855],[108.239484,35.256127],[108.221622,35.296678],[108.174811,35.304981],[108.094739,35.280069],[108.049159,35.253683],[107.949993,35.245375],[107.960464,35.263457],[107.867457,35.256127],[107.841587,35.276649],[107.745501,35.311819],[107.737494,35.267366],[107.667277,35.257104],[107.652494,35.244886],[107.686371,35.218],[107.715936,35.168114],[107.727639,35.120157],[107.769523,35.064333],[107.769523,35.064333],[107.773218,35.060904],[107.773218,35.060904],[107.814486,35.024646],[107.846515,35.024646],[107.863145,34.999158],[107.842203,34.979056],[107.741805,34.953553],[107.675284,34.9511],[107.638943,34.935402],[107.619849,34.964834],[107.564415,34.968757],[107.523763,34.909886],[107.455394,34.916757],[107.400575,34.932949],[107.369162,34.917738],[107.350068,34.93393],[107.286626,34.931968],[107.252749,34.880925],[107.189308,34.893198],[107.162206,34.944233],[107.119707,34.950119],[107.089526,34.976604],[107.08275,35.024156],[107.012533,35.029547],[106.990975,35.068252],[106.950323,35.066782],[106.901664,35.094698],[106.838222,35.080007],[106.710723,35.100574],[106.706411,35.081966],[106.615252,35.071191],[106.577064,35.089312],[106.541956,35.083925],[106.52163,35.027587],[106.494528,35.006021],[106.494528,35.006021],[106.484673,34.983959],[106.493296,34.941289],[106.527789,34.876507],[106.556122,34.861285],[106.550579,34.82936],[106.575216,34.769897],[106.539492,34.745805],[106.505615,34.746789],[106.487137,34.715311],[106.456956,34.703996],[106.442173,34.675455],[106.471122,34.634102],[106.419384,34.643458],[106.314058,34.578934],[106.341159,34.568093],[106.334384,34.517811],[106.455108,34.531617],[106.514238,34.511894],[106.513622,34.498085],[106.558586,34.48822],[106.610941,34.454177],[106.638042,34.391481],[106.717498,34.369255],[106.691013,34.337635],[106.705179,34.299575],[106.68239,34.256057],[106.652825,34.24369],[106.63373,34.260014],[106.589383,34.253584],[106.577064,34.280786],[106.526557,34.292159],[106.496376,34.238248],[106.5321,34.254079],[106.55797,34.229837],[106.585071,34.149641],[106.560434,34.109514],[106.501919,34.105055],[106.505615,34.056479],[106.471738,34.024244],[106.474202,33.970659],[106.41076,33.909093],[106.428007,33.866368],[106.475434,33.875809],[106.491448,33.834559],[106.461883,33.789807],[106.488369,33.757969],[106.482825,33.707203],[106.534564,33.695254],[106.575832,33.631497],[106.58076,33.576169],[106.540108,33.512822],[106.456956,33.532779],[106.447101,33.613058],[106.384891,33.612061],[106.35163,33.587137],[106.303587,33.604585],[106.237681,33.564201],[106.187174,33.546746],[106.108334,33.569686],[106.117573,33.602591],[106.086776,33.617045],[106.047356,33.610067],[105.971596,33.613058],[105.940183,33.570684],[105.902611,33.556222],[105.871198,33.511325],[105.842248,33.489866],[105.831162,33.451926],[105.837937,33.410971],[105.827466,33.379993],[105.709822,33.382991],[105.755401,33.329004],[105.752937,33.291994],[105.791741,33.278486],[105.799133,33.258471],[105.862574,33.234447],[105.917393,33.237951],[105.965436,33.204407],[105.968516,33.154318],[105.93156,33.178365],[105.897067,33.146803],[105.923552,33.147805],[105.934639,33.112221],[105.914929,33.066092],[105.926632,33.042517],[105.917393,32.993841],[105.861959,32.939112],[105.82685,32.950663],[105.735691,32.905454],[105.656851,32.895405],[105.638373,32.879323],[105.590329,32.87681],[105.565692,32.906962],[105.528119,32.919019],[105.49917,32.911986],[105.495475,32.873292],[105.524424,32.847654],[105.534279,32.790822],[105.555221,32.794343],[105.563844,32.724891],[105.585402,32.728919],[105.596489,32.69921],[105.677793,32.726402],[105.719061,32.759624],[105.768952,32.767676],[105.779423,32.750061],[105.822538,32.770192],[105.825002,32.824523],[105.849024,32.817985],[105.893371,32.838603],[105.93156,32.826032],[105.969132,32.849162],[106.011632,32.829552],[106.044277,32.864747],[106.071378,32.828546],[106.093552,32.82402],[106.07261,32.76365],[106.076921,32.76365],[106.076305,32.759121],[106.071378,32.758114],[106.120037,32.719856],[106.17424,32.6977],[106.254928,32.693671],[106.267863,32.673522],[106.301123,32.680071],[106.347935,32.671003],[106.389203,32.62666],[106.421231,32.616579],[106.451412,32.65992],[106.498224,32.649338],[106.517934,32.668485],[106.585687,32.68813],[106.626955,32.682086],[106.670071,32.694678],[106.733513,32.739491],[106.783404,32.735967],[106.793259,32.712807],[106.82344,32.705254],[106.854853,32.724388],[106.903512,32.721367],[106.912751,32.704247],[107.012533,32.721367],[107.066736,32.708779],[107.05996,32.686115],[107.098765,32.649338],[107.108004,32.600951],[107.080286,32.542448],[107.127098,32.482393],[107.189924,32.468256],[107.212097,32.428864],[107.263836,32.403099],[107.287858,32.457147],[107.313727,32.489965],[107.356843,32.506622],[107.382097,32.54043],[107.436299,32.529835],[107.438763,32.465732],[107.460937,32.453612],[107.456625,32.41775],[107.489886,32.425328],[107.527458,32.38238],[107.598291,32.411688],[107.648183,32.413709],[107.680827,32.397035],[107.707929,32.331826],[107.753508,32.338399],[107.812022,32.247844],[107.864377,32.201266],[107.890247,32.214432],[107.924739,32.197215],[107.979558,32.146051],[108.024521,32.177462],[108.018362,32.2119],[108.086731,32.233165],[108.143398,32.219495],[108.156948,32.239239],[108.179738,32.221521],[108.240716,32.274666],[108.310933,32.232152],[108.389773,32.263533],[108.414411,32.252399],[108.469846,32.270618],[108.507418,32.245819],[108.509882,32.201266],[108.543758,32.177969],[108.585026,32.17189],[108.676801,32.10297],[108.734084,32.106519],[108.75133,32.076098],[108.78767,32.04871],[108.837561,32.039072],[108.902235,31.984774],[108.986619,31.980205],[109.085785,31.929428],[109.123357,31.892851],[109.191111,31.85575],[109.195422,31.817618],[109.27611,31.79931],[109.279806,31.776418],[109.253936,31.759628],[109.282885,31.743343],[109.281654,31.716874],[109.381436,31.705165],[109.446109,31.722983],[109.502776,31.716365],[109.549587,31.73011],[109.585928,31.726546],[109.592087,31.789136],[109.633971,31.804396],[109.633971,31.824738],[109.60379,31.885737],[109.584696,31.900472],[109.62042,31.928412],[109.631507,31.962436],[109.590855,32.012688],[109.590855,32.047696],[109.621652,32.106519],[109.58716,32.161251],[109.604406,32.199241],[109.592703,32.219495],[109.550203,32.225065],[109.528645,32.270112],[109.495385,32.300468],[109.513247,32.342444],[109.502776,32.38895],[109.529877,32.405625],[109.526797,32.43341],[109.575457,32.506622],[109.637051,32.540935],[109.619804,32.56767],[109.631507,32.599943],[109.726978,32.608513],[109.746072,32.594901],[109.816905,32.577252],[109.910528,32.592884],[109.97089,32.577756],[110.017701,32.546989],[110.084223,32.580782],[110.090382,32.617083],[110.124259,32.616579],[110.153824,32.593388],[110.206179,32.633212],[110.156903,32.683093],[110.159367,32.767173],[110.127338,32.77774],[110.142121,32.802895],[110.105164,32.832569],[110.051578,32.851676],[109.988752,32.886359],[109.927158,32.887364],[109.907448,32.903947],[109.856941,32.910479],[109.847702,32.893395],[109.789804,32.882339],[109.76455,32.909474],[109.785492,32.987316],[109.794731,33.067095],[109.704188,33.101694],[109.688174,33.116733],[109.576073,33.110216],[109.522486,33.138785],[109.468283,33.140288],[109.438718,33.152314],[109.498464,33.207412],[109.514479,33.237951],[109.60687,33.235949],[109.619804,33.275484],[109.649985,33.251465],[109.693101,33.254468],[109.732521,33.231443],[109.813209,33.236449],[109.852013,33.247961],[109.916687,33.229942],[109.973353,33.203907],[109.999223,33.212419],[110.031252,33.191888],[110.164911,33.209415],[110.218497,33.163336],[110.285635,33.171352],[110.33799,33.160331],[110.372482,33.186379],[110.398352,33.176862],[110.398352,33.176862],[110.471032,33.171352],[110.54125,33.255469],[110.57759,33.250464],[110.59422,33.168346],[110.623785,33.143796],[110.650887,33.157324],[110.702626,33.097182],[110.753133,33.15031],[110.824582,33.158327],[110.828893,33.201403],[110.865234,33.213921],[110.9219,33.203907],[110.960704,33.253967],[110.984726,33.255469],[111.025994,33.330504],[111.025994,33.375495],[110.996429,33.435946],[111.02661,33.467903],[111.021066,33.471397],[111.021682,33.476389],[111.02661,33.478386],[111.002588,33.535772],[111.00382,33.578662],[110.966864,33.609071],[110.878784,33.634486],[110.823966,33.685793],[110.831973,33.713675],[110.81719,33.751003],[110.782082,33.796272],[110.74143,33.798759],[110.712481,33.833564],[110.66259,33.85295],[110.612083,33.852453],[110.587445,33.887733],[110.628713,33.910086],[110.627481,33.925482],[110.665669,33.937895],[110.671213,33.966192],[110.620706,34.035652],[110.587445,34.023252],[110.591757,34.101586],[110.61393,34.113478],[110.642264,34.161032],[110.621938,34.177372],[110.55788,34.193214],[110.55172,34.213012],[110.507989,34.217466],[110.43962,34.243196],[110.428533,34.288203],[110.451938,34.292653],[110.503677,34.33714],[110.473496,34.393457],[110.403279,34.433448],[110.403279,34.433448],[110.360779,34.516825],[110.372482,34.544435],[110.404511,34.557743],[110.366939,34.566614],[110.379257,34.600612]]],[[[111.02661,33.478386],[111.021682,33.476389],[111.021066,33.471397],[111.02661,33.467903],[111.02661,33.478386]]],[[[106.076921,32.76365],[106.07261,32.76365],[106.071378,32.758114],[106.076305,32.759121],[106.076921,32.76365]]]]}},{"type":"Feature","properties":{"adcode":620000,"name":"\u7518\u8083\u7701","center":[103.823557,36.058039],"childrenNum":14,"level":"province","parent":{"adcode":100000},"subFeatureIndex":27,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[106.506231,35.737514],[106.504383,35.736057],[106.498224,35.732656],[106.49268,35.732656],[106.434782,35.688436],[106.460036,35.643705],[106.47913,35.575101],[106.460036,35.578995],[106.440941,35.52641],[106.465579,35.481101],[106.490217,35.480613],[106.483441,35.450393],[106.503767,35.415284],[106.501304,35.364056],[106.472354,35.310842],[106.415688,35.276161],[106.368261,35.273718],[106.363333,35.238532],[106.319601,35.265411],[106.241377,35.358687],[106.237681,35.409431],[106.196414,35.409919],[106.173008,35.437716],[106.129892,35.393333],[106.113262,35.361616],[106.083081,35.421624],[106.073226,35.420649],[106.067682,35.436254],[106.073226,35.447468],[106.071378,35.449418],[106.06953,35.458193],[106.071994,35.463555],[106.054132,35.45478],[106.034422,35.469404],[106.002393,35.438692],[105.894603,35.413821],[105.897683,35.451368],[106.048588,35.488898],[106.047356,35.498155],[106.023335,35.49377],[106.017175,35.519103],[105.900147,35.54735],[105.868734,35.540046],[105.847176,35.490359],[105.816379,35.575101],[105.800365,35.564878],[105.762176,35.602841],[105.759097,35.634464],[105.713517,35.650513],[105.722756,35.673366],[105.690727,35.698643],[105.723988,35.725854],[105.740618,35.698643],[105.759097,35.724883],[105.70243,35.733142],[105.667322,35.749657],[105.595873,35.715651],[105.481924,35.727312],[105.457286,35.771511],[105.432033,35.787533],[105.428953,35.819082],[105.408627,35.822479],[105.38091,35.792873],[105.371055,35.844312],[105.39754,35.857409],[105.350113,35.875839],[105.324859,35.941761],[105.343954,36.033767],[105.406163,36.074409],[105.430801,36.10391],[105.491163,36.101009],[105.515185,36.147415],[105.478844,36.213111],[105.460366,36.223733],[105.45975,36.268137],[105.476381,36.293224],[105.455439,36.321678],[105.425873,36.330357],[105.401236,36.369881],[105.398156,36.430575],[105.363048,36.443093],[105.362432,36.496514],[105.322396,36.535954],[105.281744,36.522489],[105.252179,36.553263],[105.2762,36.563358],[105.261418,36.602764],[105.22015,36.631105],[105.225693,36.664716],[105.201056,36.700711],[105.218302,36.730455],[105.272505,36.739567],[105.275584,36.752515],[105.319932,36.742924],[105.340874,36.764502],[105.334714,36.80093],[105.303302,36.820575],[105.279896,36.86751],[105.244787,36.894796],[105.178882,36.892403],[105.185657,36.942164],[105.165331,36.99476],[105.128991,36.996194],[105.05939,37.022956],[105.03968,37.007187],[105.004571,37.035378],[104.95468,37.040156],[104.954064,37.077407],[104.914644,37.097935],[104.888158,37.15901],[104.864753,37.17284],[104.85613,37.211933],[104.776673,37.246718],[104.717543,37.208597],[104.638087,37.201923],[104.600515,37.242907],[104.624536,37.298627],[104.651022,37.290534],[104.673812,37.317668],[104.713848,37.329566],[104.662109,37.367626],[104.679971,37.408044],[104.521059,37.43466],[104.499501,37.421353],[104.448994,37.42468],[104.437907,37.445589],[104.365226,37.418026],[104.298705,37.414223],[104.287002,37.428007],[104.237727,37.411847],[104.183524,37.406618],[104.089285,37.465067],[103.935916,37.572818],[103.874938,37.604117],[103.841062,37.64725],[103.683381,37.777919],[103.627947,37.797783],[103.40744,37.860651],[103.362477,38.037621],[103.368636,38.08898],[103.53494,38.156776],[103.507838,38.280905],[103.465339,38.353215],[103.416063,38.404821],[103.85954,38.64454],[104.011677,38.85923],[104.044322,38.895105],[104.173053,38.94446],[104.196459,38.9882],[104.190915,39.042139],[104.207546,39.083495],[104.171205,39.160567],[104.047401,39.297788],[104.073271,39.351953],[104.089901,39.419947],[103.955626,39.456923],[103.85338,39.461543],[103.728961,39.430117],[103.595302,39.386652],[103.428998,39.353341],[103.344615,39.331588],[103.259615,39.263971],[103.188166,39.215302],[103.133347,39.192579],[103.007696,39.099753],[102.883892,39.120649],[102.616574,39.171703],[102.579002,39.183301],[102.45335,39.255167],[102.3548,39.231993],[102.276576,39.188868],[102.050526,39.141075],[102.012338,39.127149],[101.902701,39.111827],[101.833715,39.08907],[101.926106,39.000758],[101.955055,38.985874],[102.045599,38.904885],[102.075164,38.891378],[101.941505,38.808883],[101.873751,38.733761],[101.777049,38.66043],[101.672955,38.6908],[101.601506,38.65529],[101.562702,38.713218],[101.412413,38.764099],[101.331109,38.777164],[101.307087,38.80282],[101.34158,38.822406],[101.33542,38.847113],[101.24303,38.860628],[101.237486,38.907214],[101.198682,38.943064],[101.228863,39.020754],[101.117378,38.975174],[100.969553,38.946788],[100.961545,39.005874],[100.901799,39.030053],[100.875314,39.002619],[100.835278,39.025869],[100.829118,39.075133],[100.864227,39.106719],[100.842669,39.199999],[100.842053,39.405614],[100.707778,39.404689],[100.606764,39.387577],[100.498975,39.400527],[100.500823,39.481408],[100.44354,39.485565],[100.326512,39.509118],[100.301258,39.572345],[100.314193,39.606935],[100.250135,39.685274],[100.128179,39.702312],[100.040716,39.757083],[99.958796,39.769504],[99.904593,39.785601],[99.822058,39.860063],[99.672384,39.888079],[99.469124,39.875221],[99.440791,39.885783],[99.459885,39.898181],[99.491298,39.884406],[99.533182,39.891753],[99.714268,39.972061],[99.751225,40.006909],[99.841152,40.013326],[99.927383,40.063727],[99.955716,40.150695],[100.007455,40.20008],[100.169447,40.277743],[100.169447,40.541131],[100.242744,40.618855],[100.237201,40.716905],[100.224882,40.727337],[100.107853,40.875475],[100.057346,40.908049],[99.985897,40.909858],[99.673,40.93292],[99.565827,40.846961],[99.174705,40.858278],[99.172858,40.747289],[99.12543,40.715091],[99.102025,40.676522],[99.041662,40.693767],[98.984996,40.782644],[98.790975,40.705564],[98.80699,40.660181],[98.802678,40.607043],[98.762642,40.639748],[98.72199,40.657911],[98.689345,40.691952],[98.668403,40.773128],[98.569853,40.746836],[98.627751,40.677884],[98.344419,40.568413],[98.333332,40.918903],[98.25018,40.93925],[98.184891,40.988056],[98.142391,41.001607],[97.971776,41.09774],[97.903407,41.168057],[97.629314,41.440498],[97.613915,41.477276],[97.84674,41.656379],[97.653335,41.986856],[97.500582,42.243894],[97.371235,42.457076],[97.172903,42.795257],[96.968411,42.756161],[96.742361,42.75704],[96.386348,42.727592],[96.166458,42.623314],[96.103632,42.604375],[96.072219,42.569566],[96.02356,42.542675],[96.0174,42.482239],[95.978596,42.436762],[96.06606,42.414674],[96.042038,42.352787],[96.040806,42.326688],[96.178161,42.21775],[96.077147,42.149457],[96.13874,42.05399],[96.137509,42.019765],[96.117183,41.985966],[96.054973,41.936124],[95.998306,41.906289],[95.855408,41.849699],[95.801206,41.848361],[95.759322,41.835878],[95.65646,41.826067],[95.57146,41.796181],[95.445193,41.719841],[95.39407,41.693481],[95.335556,41.644305],[95.299831,41.565994],[95.247476,41.61344],[95.194505,41.694821],[95.199433,41.719395],[95.16494,41.735474],[95.135991,41.772976],[95.110738,41.768513],[95.011572,41.726541],[94.969072,41.718948],[94.861898,41.668451],[94.809543,41.619256],[94.750413,41.538227],[94.534219,41.505966],[94.184365,41.268444],[94.01067,41.114875],[93.908424,40.983539],[93.809874,40.879548],[93.820961,40.793519],[93.760599,40.664721],[93.506216,40.648376],[92.928465,40.572504],[92.920458,40.391792],[92.906907,40.310609],[92.796654,40.153897],[92.745531,39.868331],[92.687632,39.657174],[92.639589,39.514196],[92.52564,39.368611],[92.378431,39.258411],[92.339011,39.236628],[92.343938,39.146181],[92.366112,39.096037],[92.366728,39.059335],[92.41046,39.03842],[92.459119,39.042604],[92.459119,39.063982],[92.489916,39.099753],[92.545966,39.111362],[92.659299,39.109969],[92.765857,39.136898],[92.866871,39.138754],[92.889045,39.160103],[92.938936,39.169848],[92.978356,39.143396],[93.043029,39.146645],[93.115094,39.17959],[93.142196,39.160567],[93.131725,39.108112],[93.165601,39.090928],[93.198246,39.045857],[93.179152,38.923977],[93.237666,38.916062],[93.274007,38.896036],[93.453245,38.915596],[93.729186,38.924443],[93.834511,38.867618],[93.884403,38.867618],[93.884403,38.826136],[93.769838,38.821007],[93.756287,38.807484],[93.773533,38.771099],[93.800019,38.750566],[93.885018,38.720689],[93.95154,38.715086],[93.973098,38.724891],[94.281067,38.7599],[94.370379,38.7627],[94.511429,38.445142],[94.527443,38.425922],[94.527443,38.365416],[94.56132,38.351807],[94.582878,38.36917],[94.672805,38.386998],[94.812623,38.385591],[94.861282,38.393565],[94.884072,38.414669],[94.973999,38.430142],[95.045448,38.418889],[95.072549,38.402476],[95.122441,38.417014],[95.140919,38.392158],[95.185266,38.379492],[95.209904,38.327868],[95.229614,38.330685],[95.259179,38.302981],[95.315846,38.318947],[95.408236,38.300163],[95.440881,38.310965],[95.455664,38.291709],[95.487693,38.314721],[95.51849,38.294997],[95.585011,38.343359],[95.608417,38.339134],[95.671858,38.388405],[95.703887,38.400131],[95.723597,38.378554],[95.775952,38.356031],[95.83693,38.344298],[95.852945,38.287481],[95.89606,38.2903],[95.932401,38.259291],[95.93856,38.237202],[96.006929,38.207582],[96.06606,38.173245],[96.109175,38.187358],[96.221892,38.149246],[96.252689,38.167599],[96.264392,38.145952],[96.313051,38.161952],[96.301964,38.183124],[96.335841,38.246132],[96.378341,38.277146],[96.46334,38.277616],[96.665369,38.23015],[96.655514,38.295936],[96.638883,38.307208],[96.626564,38.356031],[96.698013,38.422172],[96.707868,38.459203],[96.6666,38.483567],[96.706637,38.505582],[96.780549,38.504177],[96.800259,38.52759],[96.767614,38.552399],[96.808882,38.582346],[96.7941,38.608072],[96.847071,38.599186],[96.876636,38.580475],[96.961019,38.558015],[97.055874,38.594508],[97.047251,38.653888],[97.057722,38.67258],[97.009063,38.702477],[97.023229,38.755699],[97.00044,38.7613],[96.987505,38.793025],[96.993664,38.834993],[96.983809,38.869016],[96.940693,38.90768],[96.938846,38.95563],[96.965331,39.017034],[96.95794,39.041674],[96.969643,39.097895],[97.012142,39.142004],[96.962251,39.198144],[97.017686,39.208347],[97.060186,39.19768],[97.14149,39.199999],[97.220946,39.193042],[97.315185,39.164744],[97.347213,39.167528],[97.371235,39.140611],[97.401416,39.146645],[97.458698,39.117863],[97.504894,39.076527],[97.58127,39.052364],[97.679205,39.010524],[97.701379,38.963076],[97.828878,38.93003],[97.875689,38.898365],[98.009348,38.85923],[98.029058,38.834061],[98.068478,38.816344],[98.091884,38.786495],[98.167645,38.840121],[98.242173,38.880664],[98.235398,38.918855],[98.276666,38.963541],[98.287753,38.992386],[98.280977,39.027263],[98.316702,39.040744],[98.383839,39.029588],[98.401086,39.001688],[98.432498,38.996107],[98.428187,38.976104],[98.457752,38.952838],[98.526737,38.95563],[98.584635,38.93003],[98.624056,38.959353],[98.612353,38.977035],[98.661628,38.993782],[98.70536,39.043533],[98.730613,39.057011],[98.743548,39.086747],[98.816845,39.085818],[98.818076,39.064911],[98.886446,39.040744],[98.903076,39.012384],[98.951735,38.987735],[99.054597,38.97657],[99.107568,38.951907],[99.071843,38.921184],[99.068764,38.896968],[99.141445,38.852706],[99.222133,38.788827],[99.291118,38.765966],[99.361951,38.718354],[99.375502,38.684727],[99.412458,38.665571],[99.450646,38.60433],[99.501769,38.612281],[99.52887,38.546314],[99.585537,38.498556],[99.63974,38.474666],[99.65945,38.449361],[99.727203,38.415607],[99.758,38.410449],[99.826985,38.370109],[99.960028,38.320825],[100.001912,38.315191],[100.049955,38.283254],[100.071513,38.284663],[100.117093,38.253652],[100.126332,38.231561],[100.182998,38.222158],[100.159592,38.291239],[100.163904,38.328337],[100.136803,38.33444],[100.093071,38.407166],[100.022238,38.432017],[100.001296,38.467169],[100.025933,38.507923],[100.064122,38.518694],[100.086911,38.492936],[100.113397,38.497151],[100.163288,38.461546],[100.24028,38.441861],[100.259374,38.366355],[100.301874,38.388405],[100.331439,38.337257],[100.318505,38.329276],[100.396729,38.293118],[100.424446,38.307208],[100.432453,38.275267],[100.459555,38.2654],[100.474953,38.288891],[100.516837,38.272448],[100.545786,38.247072],[100.595061,38.242372],[100.619083,38.26587],[100.71517,38.253652],[100.752126,38.238612],[100.825423,38.158658],[100.860531,38.148305],[100.913502,38.17889],[100.93814,38.16007],[100.91843,38.129006],[100.922125,38.084741],[100.888864,38.056001],[100.895024,38.013107],[100.91843,37.999432],[100.964009,38.011221],[101.077342,37.941874],[101.103211,37.946593],[101.114298,37.92016],[101.152486,37.891356],[101.159262,37.86821],[101.202994,37.84742],[101.276906,37.83655],[101.362522,37.791162],[101.382848,37.822369],[101.459224,37.86632],[101.551615,37.835604],[101.598427,37.827569],[101.670491,37.754264],[101.659405,37.733441],[101.791832,37.696041],[101.815853,37.654357],[101.854657,37.664781],[101.873135,37.686569],[101.946432,37.728235],[101.998787,37.724921],[102.036359,37.685149],[102.048678,37.651515],[102.035128,37.627819],[102.102265,37.582304],[102.131214,37.54625],[102.103497,37.482641],[102.125055,37.48549],[102.176794,37.458892],[102.19712,37.420403],[102.299981,37.391404],[102.29875,37.370004],[102.368351,37.327662],[102.428097,37.308624],[102.419474,37.294343],[102.45335,37.271487],[102.457662,37.248147],[102.490307,37.223371],[102.533422,37.217176],[102.578386,37.17284],[102.599944,37.174748],[102.642444,37.099845],[102.583314,37.104618],[102.488459,37.078362],[102.506321,37.019134],[102.450271,36.968467],[102.499546,36.954599],[102.526031,36.928291],[102.56114,36.91968],[102.587009,36.869904],[102.639364,36.852666],[102.720052,36.767858],[102.692335,36.775528],[102.639364,36.732853],[102.612879,36.738129],[102.601176,36.710307],[102.630741,36.650793],[102.684328,36.619097],[102.724364,36.613813],[102.714509,36.599401],[102.761936,36.568645],[102.734219,36.562396],[102.753313,36.525855],[102.793349,36.497957],[102.771791,36.47438],[102.829689,36.365544],[102.831537,36.365544],[102.838928,36.345783],[102.836465,36.344819],[102.845704,36.331803],[102.896827,36.331803],[102.922696,36.298047],[103.024942,36.256556],[103.021246,36.232906],[103.066826,36.216974],[103.048964,36.199107],[102.986754,36.193312],[102.965812,36.151765],[102.948566,36.150798],[102.941174,36.104877],[102.882044,36.082632],[102.932551,36.048285],[102.968276,36.044414],[102.951645,36.021667],[102.971971,35.995525],[102.942406,35.92674],[102.954725,35.858864],[102.94487,35.829757],[102.914073,35.845282],[102.81737,35.850133],[102.787189,35.862745],[102.739146,35.821023],[102.715125,35.815685],[102.686175,35.771996],[102.707733,35.70496],[102.744074,35.657807],[102.7644,35.653431],[102.763168,35.612086],[102.808747,35.560496],[102.746537,35.545403],[102.729291,35.523487],[102.782878,35.527871],[102.743458,35.494745],[102.695414,35.528358],[102.570995,35.548324],[102.531575,35.580455],[102.503241,35.585322],[102.49893,35.545403],[102.437952,35.455268],[102.447807,35.437229],[102.408387,35.409431],[102.314764,35.434303],[102.293822,35.424063],[102.287663,35.36552],[102.317844,35.343067],[102.311684,35.31426],[102.280887,35.303028],[102.3123,35.282512],[102.370199,35.263946],[102.365887,35.235599],[102.404075,35.179366],[102.346793,35.164201],[102.310452,35.128967],[102.29567,35.071681],[102.252554,35.048657],[102.218062,35.057475],[102.211286,35.034937],[102.176178,35.032977],[102.157699,35.010923],[102.133678,35.014844],[102.094874,34.986901],[102.048062,34.910868],[102.068388,34.887798],[101.985852,34.90007],[101.916867,34.873561],[101.923027,34.835746],[101.917483,34.705964],[101.919947,34.621791],[101.934729,34.58731],[101.956287,34.582876],[101.97415,34.548871],[102.001867,34.538519],[102.093026,34.536547],[102.139837,34.50351],[102.155852,34.507456],[102.169402,34.457631],[102.205743,34.407777],[102.259329,34.355917],[102.237156,34.34307],[102.237156,34.34307],[102.186649,34.352952],[102.149692,34.271885],[102.067772,34.293642],[102.062229,34.227858],[102.01357,34.218456],[102.030816,34.190739],[102.003099,34.162022],[101.965526,34.167469],[101.955055,34.109514],[101.897773,34.133791],[101.874367,34.130323],[101.851578,34.153108],[101.836795,34.124378],[101.788136,34.131809],[101.764114,34.122892],[101.736397,34.080275],[101.718535,34.083249],[101.703136,34.119424],[101.674187,34.110506],[101.6206,34.178857],[101.53868,34.212022],[101.492485,34.195689],[101.482014,34.218951],[101.417956,34.227858],[101.369913,34.248143],[101.327413,34.24468],[101.325565,34.268423],[101.268899,34.278808],[101.228863,34.298586],[101.235022,34.325279],[101.193754,34.336646],[101.178356,34.320831],[101.098284,34.329233],[101.054552,34.322808],[100.986799,34.374689],[100.951074,34.38358],[100.895024,34.375183],[100.868538,34.332693],[100.821727,34.317371],[100.798321,34.260014],[100.809408,34.247153],[100.764445,34.178857],[100.806329,34.155584],[100.848828,34.089692],[100.870386,34.083744],[100.880857,34.036644],[100.93506,33.990013],[100.927669,33.975126],[100.965857,33.946832],[100.994806,33.891707],[101.023139,33.896178],[101.054552,33.863386],[101.153718,33.8445],[101.153102,33.823124],[101.190675,33.791796],[101.186363,33.741051],[101.162957,33.719649],[101.177124,33.685295],[101.166653,33.659894],[101.217776,33.669856],[101.23687,33.685793],[101.302776,33.657902],[101.385312,33.644949],[101.424732,33.655411],[101.428427,33.680315],[101.501724,33.702723],[101.58426,33.674339],[101.585492,33.645448],[101.616905,33.598603],[101.611977,33.565199],[101.622448,33.502343],[101.718535,33.494857],[101.748716,33.505337],[101.769042,33.538765],[101.783208,33.556721],[101.831252,33.554726],[101.844186,33.602591],[101.884222,33.578163],[101.907012,33.539264],[101.906396,33.48188],[101.946432,33.442937],[101.915635,33.425957],[101.887302,33.383991],[101.877447,33.314502],[101.769658,33.26898],[101.770274,33.248962],[101.83002,33.213921],[101.841723,33.184876],[101.825708,33.119239],[101.865744,33.103198],[101.887302,33.135778],[101.921795,33.153817],[101.935345,33.186879],[101.99386,33.1999],[102.054838,33.189884],[102.08933,33.204908],[102.08933,33.227439],[102.117047,33.288492],[102.144765,33.273983],[102.160163,33.242956],[102.200815,33.223434],[102.217446,33.247961],[102.192192,33.337005],[102.218062,33.349503],[102.258098,33.409472],[102.296286,33.413969],[102.310452,33.397982],[102.368967,33.41247],[102.392988,33.404477],[102.447807,33.454922],[102.462589,33.449429],[102.461358,33.501345],[102.446575,33.53228],[102.477988,33.543254],[102.440416,33.574673],[102.346793,33.605582],[102.31538,33.665374],[102.342481,33.725622],[102.284583,33.719151],[102.324619,33.754486],[102.296286,33.783838],[102.243315,33.786823],[102.261177,33.821136],[102.25317,33.861399],[102.136142,33.965199],[102.16817,33.983066],[102.226069,33.963214],[102.248858,33.98654],[102.287047,33.977607],[102.315996,33.993983],[102.345561,33.969666],[102.392372,33.971651],[102.406539,34.033172],[102.437336,34.087214],[102.471213,34.072839],[102.511865,34.086222],[102.615958,34.099604],[102.649219,34.080275],[102.655994,34.113478],[102.598712,34.14766],[102.651067,34.165983],[102.664002,34.192719],[102.694799,34.198659],[102.728675,34.235774],[102.779798,34.236764],[102.798276,34.272874],[102.856791,34.270895],[102.85987,34.301058],[102.911609,34.312923],[102.949181,34.292159],[102.977515,34.252595],[102.973203,34.205588],[103.005848,34.184798],[103.052043,34.195194],[103.100087,34.181828],[103.124108,34.162022],[103.121644,34.112487],[103.178927,34.079779],[103.129652,34.065899],[103.119797,34.03466],[103.147514,34.036644],[103.157369,33.998944],[103.120413,33.953286],[103.1315,33.931937],[103.16476,33.929454],[103.181391,33.900649],[103.153673,33.819147],[103.165376,33.805721],[103.228202,33.79478],[103.24976,33.814175],[103.284868,33.80224],[103.278709,33.774387],[103.35447,33.743539],[103.434542,33.752993],[103.464723,33.80224],[103.518309,33.807213],[103.545411,33.719649],[103.520157,33.678323],[103.552186,33.671351],[103.563889,33.699735],[103.593454,33.716164],[103.645809,33.708697],[103.667983,33.685793],[103.690772,33.69376],[103.778236,33.658898],[103.861388,33.682307],[103.980264,33.670852],[104.046169,33.686291],[104.103452,33.663381],[104.176749,33.5996],[104.155191,33.542755],[104.180444,33.472895],[104.213089,33.446932],[104.22048,33.404477],[104.272219,33.391486],[104.292545,33.336505],[104.373849,33.345004],[104.420045,33.327004],[104.386168,33.298497],[104.333813,33.315502],[104.303632,33.304499],[104.323958,33.26898],[104.32827,33.223934],[104.351059,33.158828],[104.378161,33.109214],[104.337509,33.038002],[104.391711,33.035493],[104.426204,33.010906],[104.383704,32.994343],[104.378161,32.953174],[104.345516,32.940117],[104.288234,32.942628],[104.277147,32.90244],[104.294393,32.835586],[104.363994,32.822511],[104.458849,32.748551],[104.51182,32.753585],[104.526602,32.728416],[104.582653,32.722374],[104.592508,32.695685],[104.643015,32.661935],[104.696601,32.673522],[104.739717,32.635228],[104.795768,32.643292],[104.820405,32.662943],[104.845659,32.653873],[104.881999,32.600951],[104.925115,32.607505],[105.026745,32.650346],[105.0791,32.637244],[105.111128,32.593893],[105.185041,32.617587],[105.215222,32.63674],[105.219534,32.666469],[105.263265,32.652362],[105.297758,32.656897],[105.347033,32.68259],[105.368591,32.712807],[105.448663,32.732946],[105.454207,32.767173],[105.427721,32.784281],[105.396308,32.85067],[105.396308,32.85067],[105.38091,32.876307],[105.408011,32.885857],[105.414171,32.922034],[105.467757,32.930071],[105.49917,32.911986],[105.528119,32.919019],[105.565692,32.906962],[105.590329,32.87681],[105.638373,32.879323],[105.656851,32.895405],[105.735691,32.905454],[105.82685,32.950663],[105.861959,32.939112],[105.917393,32.993841],[105.926632,33.042517],[105.914929,33.066092],[105.934639,33.112221],[105.923552,33.147805],[105.897067,33.146803],[105.93156,33.178365],[105.968516,33.154318],[105.965436,33.204407],[105.917393,33.237951],[105.862574,33.234447],[105.799133,33.258471],[105.791741,33.278486],[105.752937,33.291994],[105.755401,33.329004],[105.709822,33.382991],[105.827466,33.379993],[105.837937,33.410971],[105.831162,33.451926],[105.842248,33.489866],[105.871198,33.511325],[105.902611,33.556222],[105.940183,33.570684],[105.971596,33.613058],[106.047356,33.610067],[106.086776,33.617045],[106.117573,33.602591],[106.108334,33.569686],[106.187174,33.546746],[106.237681,33.564201],[106.303587,33.604585],[106.35163,33.587137],[106.384891,33.612061],[106.447101,33.613058],[106.456956,33.532779],[106.540108,33.512822],[106.58076,33.576169],[106.575832,33.631497],[106.534564,33.695254],[106.482825,33.707203],[106.488369,33.757969],[106.461883,33.789807],[106.491448,33.834559],[106.475434,33.875809],[106.428007,33.866368],[106.41076,33.909093],[106.474202,33.970659],[106.471738,34.024244],[106.505615,34.056479],[106.501919,34.105055],[106.560434,34.109514],[106.585071,34.149641],[106.55797,34.229837],[106.5321,34.254079],[106.496376,34.238248],[106.526557,34.292159],[106.577064,34.280786],[106.589383,34.253584],[106.63373,34.260014],[106.652825,34.24369],[106.68239,34.256057],[106.705179,34.299575],[106.691013,34.337635],[106.717498,34.369255],[106.638042,34.391481],[106.610941,34.454177],[106.558586,34.48822],[106.513622,34.498085],[106.514238,34.511894],[106.455108,34.531617],[106.334384,34.517811],[106.341159,34.568093],[106.314058,34.578934],[106.419384,34.643458],[106.471122,34.634102],[106.442173,34.675455],[106.456956,34.703996],[106.487137,34.715311],[106.505615,34.746789],[106.539492,34.745805],[106.575216,34.769897],[106.550579,34.82936],[106.556122,34.861285],[106.527789,34.876507],[106.493296,34.941289],[106.484673,34.983959],[106.494528,35.006021],[106.494528,35.006021],[106.52163,35.027587],[106.541956,35.083925],[106.577064,35.089312],[106.615252,35.071191],[106.706411,35.081966],[106.710723,35.100574],[106.838222,35.080007],[106.901664,35.094698],[106.950323,35.066782],[106.990975,35.068252],[107.012533,35.029547],[107.08275,35.024156],[107.089526,34.976604],[107.119707,34.950119],[107.162206,34.944233],[107.189308,34.893198],[107.252749,34.880925],[107.286626,34.931968],[107.350068,34.93393],[107.369162,34.917738],[107.400575,34.932949],[107.455394,34.916757],[107.523763,34.909886],[107.564415,34.968757],[107.619849,34.964834],[107.638943,34.935402],[107.675284,34.9511],[107.741805,34.953553],[107.842203,34.979056],[107.863145,34.999158],[107.846515,35.024646],[107.814486,35.024646],[107.773218,35.060904],[107.773218,35.060904],[107.769523,35.064333],[107.769523,35.064333],[107.727639,35.120157],[107.715936,35.168114],[107.686371,35.218],[107.652494,35.244886],[107.667277,35.257104],[107.737494,35.267366],[107.745501,35.311819],[107.841587,35.276649],[107.867457,35.256127],[107.960464,35.263457],[107.949993,35.245375],[108.049159,35.253683],[108.094739,35.280069],[108.174811,35.304981],[108.221622,35.296678],[108.239484,35.256127],[108.296767,35.267855],[108.345426,35.300586],[108.36144,35.279581],[108.48894,35.275184],[108.547454,35.304981],[108.583178,35.294724],[108.614591,35.328909],[108.61028,35.355271],[108.631222,35.418698],[108.605968,35.503028],[108.625678,35.537124],[108.618287,35.557088],[108.539447,35.605761],[108.517889,35.699615],[108.533903,35.746257],[108.527744,35.82442],[108.499411,35.872444],[108.518505,35.905414],[108.562852,35.921409],[108.593649,35.950967],[108.652164,35.94806],[108.659555,35.990683],[108.688504,36.021183],[108.682345,36.062316],[108.712526,36.138716],[108.646004,36.254143],[108.641693,36.359279],[108.651548,36.384818],[108.618903,36.433946],[108.562852,36.43876],[108.510498,36.47438],[108.514809,36.445501],[108.495099,36.422389],[108.460606,36.422871],[108.408252,36.45946],[108.391621,36.505654],[108.365136,36.519603],[108.340498,36.559032],[108.262274,36.549417],[108.245644,36.571048],[108.210535,36.577296],[108.204992,36.606607],[108.204992,36.606607],[108.222854,36.631105],[108.1976,36.630144],[108.163724,36.563839],[108.092891,36.587388],[108.079956,36.614294],[108.060862,36.592194],[108.001732,36.639269],[108.02329,36.647912],[108.006659,36.683435],[107.938906,36.655594],[107.940754,36.694953],[107.914268,36.720861],[107.907493,36.750118],[107.866841,36.766899],[107.768291,36.792783],[107.742421,36.811951],[107.722095,36.802367],[107.670356,36.83303],[107.642023,36.819137],[107.5909,36.836382],[107.540393,36.828718],[107.533618,36.867031],[107.478183,36.908196],[107.365466,36.905324],[107.336517,36.925899],[107.310032,36.912502],[107.291554,36.979463],[107.291554,36.979463],[107.288474,37.008143],[107.288474,37.008143],[107.28601,37.054963],[107.268764,37.099367],[107.234887,37.096503],[107.181916,37.143269],[107.133873,37.134681],[107.095685,37.115595],[107.030395,37.140883],[107.031011,37.108436],[106.998367,37.106527],[106.905976,37.151378],[106.912135,37.110345],[106.891193,37.098413],[106.818512,37.141838],[106.776012,37.158056],[106.772933,37.120367],[106.750143,37.09889],[106.728585,37.121321],[106.687933,37.12991],[106.673151,37.1113],[106.6171,37.135158],[106.605397,37.127524],[106.645433,37.064992],[106.666991,37.016745],[106.646665,37.000496],[106.64297,36.962729],[106.594926,36.967988],[106.595542,36.94025],[106.540108,36.984244],[106.549347,36.941685],[106.601702,36.918244],[106.609709,36.878521],[106.609709,36.878521],[106.626955,36.892403],[106.637426,36.867031],[106.637426,36.867031],[106.657752,36.820575],[106.627571,36.752995],[106.644817,36.72278],[106.59431,36.750118],[106.514238,36.715584],[106.519782,36.708868],[106.519782,36.708868],[106.530869,36.690154],[106.490833,36.685835],[106.491448,36.628703],[106.444637,36.624861],[106.465579,36.583063],[106.444637,36.557109],[106.397826,36.576816],[106.392282,36.556628],[106.363949,36.577296],[106.37134,36.549417],[106.39721,36.548455],[106.455724,36.496995],[106.494528,36.494589],[106.523477,36.468605],[106.492064,36.422389],[106.510543,36.379037],[106.497608,36.31348],[106.470507,36.306246],[106.504383,36.266207],[106.54134,36.25366],[106.559202,36.292259],[106.647897,36.259451],[106.685469,36.273445],[106.698404,36.244008],[106.735976,36.23725],[106.772933,36.212628],[106.808657,36.21118],[106.833295,36.229044],[106.858548,36.206834],[106.858548,36.206834],[106.873947,36.178338],[106.873947,36.178338],[106.930613,36.138716],[106.925686,36.115997],[106.957715,36.091337],[106.940468,36.064734],[106.928149,36.011502],[106.94786,35.988262],[106.90228,35.943699],[106.93862,35.952905],[106.940468,35.931101],[106.912751,35.93207],[106.849925,35.887476],[106.927534,35.810346],[106.897353,35.759856],[106.868403,35.771996],[106.867171,35.738485],[106.819128,35.7448],[106.806193,35.70982],[106.750759,35.725369],[106.750759,35.689408],[106.674998,35.728284],[106.66268,35.70739],[106.633115,35.714679],[106.620796,35.743829],[106.595542,35.727312],[106.566593,35.738971],[106.506231,35.737514]]],[[[106.047356,35.498155],[106.048588,35.488898],[106.054132,35.45478],[106.071994,35.463555],[106.078769,35.509848],[106.047356,35.498155]]],[[[102.831537,36.365544],[102.829689,36.365544],[102.836465,36.344819],[102.838928,36.345783],[102.831537,36.365544]]],[[[106.073226,35.447468],[106.067682,35.436254],[106.073226,35.420649],[106.083081,35.421624],[106.073226,35.447468]]],[[[106.504383,35.736057],[106.506231,35.737514],[106.49268,35.732656],[106.498224,35.732656],[106.504383,35.736057]]]]}},{"type":"Feature","properties":{"adcode":630000,"name":"\u9752\u6D77\u7701","center":[101.778916,36.623178],"centroid":[96.043533,35.726403],"childrenNum":8,"level":"province","parent":{"adcode":100000},"subFeatureIndex":28,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[102.829689,36.365544],[102.771791,36.47438],[102.793349,36.497957],[102.753313,36.525855],[102.734219,36.562396],[102.761936,36.568645],[102.714509,36.599401],[102.724364,36.613813],[102.684328,36.619097],[102.630741,36.650793],[102.601176,36.710307],[102.612879,36.738129],[102.639364,36.732853],[102.692335,36.775528],[102.720052,36.767858],[102.639364,36.852666],[102.587009,36.869904],[102.56114,36.91968],[102.526031,36.928291],[102.499546,36.954599],[102.450271,36.968467],[102.506321,37.019134],[102.488459,37.078362],[102.583314,37.104618],[102.642444,37.099845],[102.599944,37.174748],[102.578386,37.17284],[102.533422,37.217176],[102.490307,37.223371],[102.457662,37.248147],[102.45335,37.271487],[102.419474,37.294343],[102.428097,37.308624],[102.368351,37.327662],[102.29875,37.370004],[102.299981,37.391404],[102.19712,37.420403],[102.176794,37.458892],[102.125055,37.48549],[102.103497,37.482641],[102.131214,37.54625],[102.102265,37.582304],[102.035128,37.627819],[102.048678,37.651515],[102.036359,37.685149],[101.998787,37.724921],[101.946432,37.728235],[101.873135,37.686569],[101.854657,37.664781],[101.815853,37.654357],[101.791832,37.696041],[101.659405,37.733441],[101.670491,37.754264],[101.598427,37.827569],[101.551615,37.835604],[101.459224,37.86632],[101.382848,37.822369],[101.362522,37.791162],[101.276906,37.83655],[101.202994,37.84742],[101.159262,37.86821],[101.152486,37.891356],[101.114298,37.92016],[101.103211,37.946593],[101.077342,37.941874],[100.964009,38.011221],[100.91843,37.999432],[100.895024,38.013107],[100.888864,38.056001],[100.922125,38.084741],[100.91843,38.129006],[100.93814,38.16007],[100.913502,38.17889],[100.860531,38.148305],[100.825423,38.158658],[100.752126,38.238612],[100.71517,38.253652],[100.619083,38.26587],[100.595061,38.242372],[100.545786,38.247072],[100.516837,38.272448],[100.474953,38.288891],[100.459555,38.2654],[100.432453,38.275267],[100.424446,38.307208],[100.396729,38.293118],[100.318505,38.329276],[100.331439,38.337257],[100.301874,38.388405],[100.259374,38.366355],[100.24028,38.441861],[100.163288,38.461546],[100.113397,38.497151],[100.086911,38.492936],[100.064122,38.518694],[100.025933,38.507923],[100.001296,38.467169],[100.022238,38.432017],[100.093071,38.407166],[100.136803,38.33444],[100.163904,38.328337],[100.159592,38.291239],[100.182998,38.222158],[100.126332,38.231561],[100.117093,38.253652],[100.071513,38.284663],[100.049955,38.283254],[100.001912,38.315191],[99.960028,38.320825],[99.826985,38.370109],[99.758,38.410449],[99.727203,38.415607],[99.65945,38.449361],[99.63974,38.474666],[99.585537,38.498556],[99.52887,38.546314],[99.501769,38.612281],[99.450646,38.60433],[99.412458,38.665571],[99.375502,38.684727],[99.361951,38.718354],[99.291118,38.765966],[99.222133,38.788827],[99.141445,38.852706],[99.068764,38.896968],[99.071843,38.921184],[99.107568,38.951907],[99.054597,38.97657],[98.951735,38.987735],[98.903076,39.012384],[98.886446,39.040744],[98.818076,39.064911],[98.816845,39.085818],[98.743548,39.086747],[98.730613,39.057011],[98.70536,39.043533],[98.661628,38.993782],[98.612353,38.977035],[98.624056,38.959353],[98.584635,38.93003],[98.526737,38.95563],[98.457752,38.952838],[98.428187,38.976104],[98.432498,38.996107],[98.401086,39.001688],[98.383839,39.029588],[98.316702,39.040744],[98.280977,39.027263],[98.287753,38.992386],[98.276666,38.963541],[98.235398,38.918855],[98.242173,38.880664],[98.167645,38.840121],[98.091884,38.786495],[98.068478,38.816344],[98.029058,38.834061],[98.009348,38.85923],[97.875689,38.898365],[97.828878,38.93003],[97.701379,38.963076],[97.679205,39.010524],[97.58127,39.052364],[97.504894,39.076527],[97.458698,39.117863],[97.401416,39.146645],[97.371235,39.140611],[97.347213,39.167528],[97.315185,39.164744],[97.220946,39.193042],[97.14149,39.199999],[97.060186,39.19768],[97.017686,39.208347],[96.962251,39.198144],[97.012142,39.142004],[96.969643,39.097895],[96.95794,39.041674],[96.965331,39.017034],[96.938846,38.95563],[96.940693,38.90768],[96.983809,38.869016],[96.993664,38.834993],[96.987505,38.793025],[97.00044,38.7613],[97.023229,38.755699],[97.009063,38.702477],[97.057722,38.67258],[97.047251,38.653888],[97.055874,38.594508],[96.961019,38.558015],[96.876636,38.580475],[96.847071,38.599186],[96.7941,38.608072],[96.808882,38.582346],[96.767614,38.552399],[96.800259,38.52759],[96.780549,38.504177],[96.706637,38.505582],[96.6666,38.483567],[96.707868,38.459203],[96.698013,38.422172],[96.626564,38.356031],[96.638883,38.307208],[96.655514,38.295936],[96.665369,38.23015],[96.46334,38.277616],[96.378341,38.277146],[96.335841,38.246132],[96.301964,38.183124],[96.313051,38.161952],[96.264392,38.145952],[96.252689,38.167599],[96.221892,38.149246],[96.109175,38.187358],[96.06606,38.173245],[96.006929,38.207582],[95.93856,38.237202],[95.932401,38.259291],[95.89606,38.2903],[95.852945,38.287481],[95.83693,38.344298],[95.775952,38.356031],[95.723597,38.378554],[95.703887,38.400131],[95.671858,38.388405],[95.608417,38.339134],[95.585011,38.343359],[95.51849,38.294997],[95.487693,38.314721],[95.455664,38.291709],[95.440881,38.310965],[95.408236,38.300163],[95.315846,38.318947],[95.259179,38.302981],[95.229614,38.330685],[95.209904,38.327868],[95.185266,38.379492],[95.140919,38.392158],[95.122441,38.417014],[95.072549,38.402476],[95.045448,38.418889],[94.973999,38.430142],[94.884072,38.414669],[94.861282,38.393565],[94.812623,38.385591],[94.672805,38.386998],[94.582878,38.36917],[94.56132,38.351807],[94.527443,38.365416],[94.527443,38.425922],[94.511429,38.445142],[94.370379,38.7627],[94.281067,38.7599],[93.973098,38.724891],[93.95154,38.715086],[93.885018,38.720689],[93.800019,38.750566],[93.773533,38.771099],[93.756287,38.807484],[93.769838,38.821007],[93.884403,38.826136],[93.884403,38.867618],[93.834511,38.867618],[93.729186,38.924443],[93.453245,38.915596],[93.274007,38.896036],[93.237666,38.916062],[93.179152,38.923977],[93.198246,39.045857],[93.165601,39.090928],[93.131725,39.108112],[93.142196,39.160567],[93.115094,39.17959],[93.043029,39.146645],[92.978356,39.143396],[92.938936,39.169848],[92.889045,39.160103],[92.866871,39.138754],[92.765857,39.136898],[92.659299,39.109969],[92.545966,39.111362],[92.489916,39.099753],[92.459119,39.063982],[92.459119,39.042604],[92.41046,39.03842],[92.416003,39.010524],[92.380279,38.999828],[92.263866,39.002153],[92.197961,38.983548],[92.173323,38.960749],[92.10865,38.963541],[91.966368,38.930961],[91.880752,38.899297],[91.87952,38.884391],[91.806223,38.872744],[91.694738,38.86622],[91.681188,38.852706],[91.501333,38.815411],[91.446515,38.813546],[91.298689,38.746365],[91.242639,38.752433],[91.188436,38.73096],[90.992567,38.695003],[90.970394,38.697806],[90.899561,38.679588],[90.724634,38.658094],[90.65996,38.674449],[90.619308,38.664636],[90.645794,38.635191],[90.606374,38.610878],[90.608837,38.594508],[90.560794,38.593573],[90.525685,38.561291],[90.463476,38.556611],[90.465323,38.521971],[90.427135,38.493873],[90.353222,38.482162],[90.315034,38.501835],[90.248513,38.491531],[90.130868,38.494341],[90.111774,38.477945],[90.111774,38.418889],[90.129636,38.400131],[90.179528,38.396848],[90.137644,38.340543],[90.280542,38.238142],[90.352607,38.233441],[90.361846,38.300163],[90.401882,38.311434],[90.531229,38.319886],[90.516446,38.207111],[90.519526,37.730601],[90.579272,37.720661],[90.586663,37.703144],[90.643946,37.696988],[90.777605,37.648672],[90.820104,37.613599],[90.854597,37.604117],[90.882314,37.575664],[90.865684,37.53059],[90.911879,37.519674],[90.958075,37.477891],[91.019669,37.493088],[91.073256,37.475992],[91.099741,37.447965],[91.113292,37.387124],[91.136081,37.355734],[91.134849,37.324331],[91.194596,37.273868],[91.1909,37.205737],[91.280211,37.163779],[91.286371,37.105095],[91.303617,37.083136],[91.291298,37.042544],[91.303617,37.012444],[91.216153,37.010054],[91.181045,37.025345],[91.133618,37.007665],[91.126842,36.978507],[91.051698,36.96751],[91.036915,36.929727],[90.983944,36.913459],[90.924198,36.921115],[90.853981,36.915373],[90.758511,36.825844],[90.732025,36.825844],[90.727098,36.755872],[90.754815,36.721341],[90.720938,36.708868],[90.706156,36.658955],[90.730793,36.655594],[90.72217,36.620058],[90.741264,36.585947],[90.810865,36.585466],[90.831191,36.55807],[90.905104,36.560474],[91.011662,36.539801],[91.035683,36.529703],[91.039995,36.474861],[91.028292,36.443093],[91.051698,36.433946],[91.026444,36.323607],[91.07264,36.299012],[91.051698,36.238215],[91.096045,36.219871],[91.09235,36.163844],[91.124994,36.115514],[91.081263,36.088436],[90.979017,36.106811],[90.922966,36.028927],[90.850285,36.016827],[90.815793,36.035703],[90.776373,36.086501],[90.659344,36.13485],[90.613149,36.126632],[90.534925,36.147899],[90.478258,36.13195],[90.424055,36.133883],[90.325505,36.159496],[90.23681,36.160462],[90.198006,36.187516],[90.130252,36.2078],[90.145651,36.239181],[90.058188,36.255591],[90.043405,36.276822],[90.003369,36.278752],[90.028006,36.258486],[90.019999,36.213594],[89.997825,36.168193],[89.944855,36.140649],[89.941159,36.067637],[89.914058,36.079246],[89.819819,36.080697],[89.766848,36.073925],[89.711414,36.093272],[89.688624,36.091337],[89.605472,36.038123],[89.474893,36.022151],[89.417611,36.044897],[89.404676,36.016827],[89.434857,35.992136],[89.428082,35.917531],[89.489676,35.903475],[89.554965,35.873414],[89.550654,35.856924],[89.62395,35.859349],[89.654747,35.848193],[89.707718,35.849163],[89.778551,35.861775],[89.801957,35.848193],[89.767464,35.799183],[89.782863,35.773453],[89.747138,35.7516],[89.748986,35.66267],[89.726196,35.648082],[89.765616,35.599922],[89.75145,35.580942],[89.71203,35.581915],[89.699711,35.544916],[89.720037,35.501566],[89.740979,35.507412],[89.765,35.482563],[89.739131,35.468429],[89.685544,35.416259],[89.658443,35.425526],[89.619639,35.412357],[89.58761,35.383575],[89.497067,35.361128],[89.516161,35.330862],[89.494603,35.298632],[89.531559,35.276161],[89.48598,35.256616],[89.450255,35.223867],[89.46935,35.214577],[89.519241,35.133862],[89.579603,35.118688],[89.593153,35.104491],[89.59069,35.057965],[89.560509,34.938836],[89.578987,34.895162],[89.670146,34.887798],[89.707102,34.919701],[89.747138,34.903506],[89.78779,34.921664],[89.821051,34.902033],[89.814891,34.86816],[89.838913,34.865705],[89.867862,34.81069],[89.825978,34.796931],[89.799493,34.743838],[89.732356,34.732035],[89.72558,34.660689],[89.74837,34.641981],[89.798877,34.628686],[89.777935,34.574499],[89.814891,34.548871],[89.823515,34.455657],[89.819819,34.420614],[89.799493,34.39642],[89.820435,34.369255],[89.858623,34.359375],[89.86663,34.324785],[89.825362,34.293642],[89.838297,34.263477],[89.816739,34.16945],[89.789638,34.150632],[89.760073,34.152613],[89.756993,34.124874],[89.71203,34.131809],[89.655979,34.097126],[89.656595,34.057966],[89.635037,34.049537],[89.684928,33.990013],[89.688008,33.959739],[89.718805,33.946832],[89.73174,33.921509],[89.795181,33.865374],[89.837065,33.868853],[89.899891,33.80771],[89.942391,33.801246],[89.902355,33.758467],[89.907282,33.741051],[89.983659,33.725622],[89.981195,33.70322],[90.008296,33.687785],[89.984275,33.612061],[90.01076,33.553728],[90.083441,33.525295],[90.088984,33.478885],[90.107463,33.460913],[90.22018,33.437943],[90.246665,33.423959],[90.332896,33.310501],[90.363077,33.279487],[90.405577,33.260473],[90.490577,33.264977],[90.562642,33.229441],[90.627315,33.180368],[90.704308,33.135778],[90.740032,33.142293],[90.803474,33.114227],[90.88293,33.120241],[90.902024,33.083143],[90.927894,33.120241],[91.001807,33.11573],[91.037531,33.098686],[91.072024,33.113224],[91.147784,33.07211],[91.161335,33.108712],[91.18782,33.106206],[91.226624,33.141792],[91.261733,33.141291],[91.311624,33.108211],[91.370138,33.100691],[91.436044,33.066092],[91.49579,33.109214],[91.535826,33.10019],[91.55492,33.060074],[91.583253,33.0375],[91.664557,33.012913],[91.685499,32.989324],[91.752637,32.969242],[91.799448,32.942126],[91.839484,32.948152],[91.857962,32.90244],[91.896766,32.907967],[91.955897,32.8205],[92.018722,32.829552],[92.038432,32.860725],[92.101874,32.860222],[92.145606,32.885857],[92.205352,32.866255],[92.227526,32.821003],[92.193649,32.801889],[92.211511,32.788306],[92.198577,32.754591],[92.255243,32.720863],[92.310062,32.751571],[92.343938,32.738484],[92.355641,32.764657],[92.411076,32.748048],[92.459119,32.76365],[92.484372,32.745028],[92.56814,32.73194],[92.574916,32.741001],[92.634662,32.720863],[92.667922,32.73194],[92.686401,32.76516],[92.756618,32.743014],[92.789262,32.719856],[92.822523,32.729926],[92.866871,32.698203],[92.933392,32.719353],[92.964189,32.714821],[93.00053,32.741001],[93.019624,32.737477],[93.023935,32.703239],[93.069515,32.626156],[93.087993,32.63674],[93.159442,32.644803],[93.176688,32.6705],[93.210565,32.655385],[93.239514,32.662439],[93.260456,32.62666],[93.300492,32.619604],[93.308499,32.580278],[93.33868,32.5712],[93.385492,32.525294],[93.411977,32.558086],[93.4631,32.556069],[93.476651,32.504603],[93.501904,32.503593],[93.516687,32.47583],[93.618933,32.522771],[93.651577,32.571705],[93.721795,32.578261],[93.75136,32.56313],[93.820345,32.549511],[93.851142,32.50965],[93.861613,32.466237],[93.90904,32.463207],[93.960163,32.484917],[93.978641,32.459672],[94.03038,32.448057],[94.049474,32.469771],[94.091974,32.463207],[94.137554,32.433915],[94.176974,32.454117],[94.196684,32.51621],[94.250886,32.51722],[94.292154,32.502584],[94.294002,32.519743],[94.350053,32.533871],[94.371611,32.524789],[94.395016,32.594397],[94.435052,32.562626],[94.463386,32.572209],[94.459074,32.599439],[94.522516,32.595909],[94.591501,32.640772],[94.614291,32.673522],[94.638312,32.645307],[94.737479,32.587338],[94.762116,32.526303],[94.78737,32.522266],[94.80708,32.486431],[94.852043,32.463712],[94.889616,32.472295],[94.912405,32.41573],[94.944434,32.404109],[94.988166,32.422802],[95.057151,32.395014],[95.075013,32.376315],[95.075013,32.376315],[95.081789,32.384907],[95.153853,32.386423],[95.218527,32.397035],[95.228382,32.363678],[95.261643,32.348006],[95.193274,32.332331],[95.096571,32.322217],[95.079325,32.279726],[95.10581,32.258979],[95.20744,32.297433],[95.214216,32.321712],[95.241317,32.3207],[95.239469,32.287315],[95.270266,32.194683],[95.270266,32.194683],[95.31523,32.148585],[95.366968,32.151118],[95.367584,32.178982],[95.406389,32.182021],[95.440265,32.157705],[95.454432,32.061898],[95.421171,32.033999],[95.454432,32.007613],[95.395918,32.001523],[95.360809,31.95939],[95.3682,31.92892],[95.408852,31.918761],[95.406389,31.896915],[95.456896,31.801853],[95.480301,31.795749],[95.511714,31.750468],[95.546823,31.73978],[95.580083,31.76726],[95.634286,31.782523],[95.779648,31.748941],[95.823995,31.68225],[95.853561,31.714329],[95.846169,31.736218],[95.89914,31.81711],[95.983524,31.816601],[95.989067,31.78761],[96.064828,31.720438],[96.135661,31.70211],[96.148595,31.686324],[96.156603,31.602769],[96.207726,31.598691],[96.221892,31.647613],[96.245298,31.657802],[96.252073,31.697527],[96.222508,31.733164],[96.231131,31.749959],[96.178161,31.775401],[96.183088,31.835924],[96.202798,31.841008],[96.214501,31.876589],[96.188632,31.904028],[96.220044,31.905553],[96.253305,31.929936],[96.288414,31.919777],[96.389428,31.919777],[96.407906,31.845583],[96.435623,31.796258],[96.468884,31.769804],[96.519391,31.74945],[96.56805,31.711783],[96.615477,31.737236],[96.661057,31.705674],[96.691854,31.722474],[96.722651,31.686833],[96.778701,31.675629],[96.790404,31.698545],[96.840295,31.720438],[96.799027,31.792188],[96.765767,31.819144],[96.760223,31.860325],[96.794716,31.869474],[96.81073,31.894375],[96.776238,31.935015],[96.753448,31.944156],[96.742977,32.001016],[96.722651,32.013195],[96.824281,32.007613],[96.868629,31.964975],[96.863085,31.996448],[96.894498,32.013703],[96.941925,31.986297],[96.965947,32.008628],[96.935766,32.048203],[97.006599,32.067984],[97.028773,32.04871],[97.127323,32.044145],[97.169823,32.032984],[97.188301,32.055304],[97.214786,32.042623],[97.233881,32.063927],[97.201852,32.090296],[97.219714,32.109054],[97.258518,32.072041],[97.308409,32.076605],[97.293011,32.096887],[97.313953,32.130342],[97.271453,32.139971],[97.264062,32.182527],[97.299786,32.294904],[97.32196,32.303503],[97.371235,32.273148],[97.415583,32.296421],[97.424822,32.322723],[97.387865,32.427349],[97.341054,32.440987],[97.388481,32.501575],[97.334895,32.514192],[97.332431,32.542448],[97.3583,32.563635],[97.374315,32.546484],[97.411887,32.575235],[97.448843,32.586833],[97.463626,32.55506],[97.50243,32.530844],[97.540618,32.536899],[97.670582,32.51722],[97.684132,32.530339],[97.730944,32.527312],[97.700763,32.53488],[97.616995,32.586329],[97.607756,32.614059],[97.543698,32.62162],[97.535075,32.638252],[97.48272,32.654377],[97.42359,32.70475],[97.429133,32.714318],[97.386018,32.77925],[97.392793,32.828546],[97.376163,32.886359],[97.347829,32.895907],[97.375547,32.956689],[97.438372,32.976271],[97.523988,32.988822],[97.499966,33.011408],[97.542466,33.035995],[97.517213,33.097683],[97.487032,33.107209],[97.498119,33.137783],[97.487648,33.168346],[97.548626,33.203907],[97.607756,33.263976],[97.622538,33.337005],[97.676125,33.341004],[97.754349,33.409972],[97.674893,33.432949],[97.625618,33.461412],[97.552321,33.465906],[97.511669,33.520805],[97.523372,33.577166],[97.450075,33.582152],[97.415583,33.605582],[97.435293,33.682307],[97.418046,33.728608],[97.422974,33.754984],[97.406344,33.795278],[97.373083,33.817655],[97.371851,33.842015],[97.398336,33.848477],[97.395257,33.889224],[97.460546,33.887236],[97.503662,33.912073],[97.52214,33.903133],[97.601596,33.929951],[97.629314,33.919523],[97.660111,33.956264],[97.652719,33.998448],[97.70261,34.036644],[97.665654,34.126855],[97.766668,34.158555],[97.789458,34.182818],[97.789458,34.182818],[97.796849,34.199154],[97.796849,34.199154],[97.8104,34.207568],[97.898479,34.209548],[97.95453,34.190739],[98.028442,34.122892],[98.098043,34.122892],[98.158405,34.107037],[98.206449,34.08424],[98.258188,34.083249],[98.344419,34.094648],[98.399854,34.085231],[98.396774,34.053008],[98.428187,34.029204],[98.440506,33.981577],[98.415252,33.956761],[98.425723,33.913066],[98.407245,33.867362],[98.434962,33.843009],[98.463295,33.848477],[98.492861,33.796272],[98.494092,33.768915],[98.51873,33.77389],[98.539672,33.746525],[98.582788,33.731595],[98.610505,33.682805],[98.6567,33.64744],[98.61728,33.637476],[98.622824,33.610067],[98.652389,33.595114],[98.648077,33.548741],[98.678258,33.522801],[98.725686,33.503341],[98.742316,33.477887],[98.736157,33.406975],[98.779888,33.370497],[98.759562,33.276985],[98.802062,33.270481],[98.804526,33.219428],[98.858728,33.150811],[98.92217,33.118738],[98.967134,33.115229],[98.971445,33.098185],[99.014561,33.081137],[99.024416,33.094675],[99.090322,33.079131],[99.124814,33.046028],[99.196263,33.035493],[99.214741,32.991332],[99.235067,32.982296],[99.24677,32.924043],[99.268944,32.878318],[99.353944,32.885354],[99.376118,32.899927],[99.45311,32.862233],[99.558436,32.839106],[99.589233,32.789312],[99.640355,32.790822],[99.646515,32.774721],[99.700718,32.76667],[99.717964,32.732443],[99.760464,32.769689],[99.766623,32.826032],[99.791877,32.883344],[99.764159,32.924545],[99.788181,32.956689],[99.805427,32.940619],[99.851007,32.941623],[99.877492,32.993339],[99.877492,33.045527],[99.947709,32.986814],[99.956332,32.948152],[100.038252,32.929066],[100.029629,32.895907],[100.064738,32.895907],[100.123252,32.837095],[100.117093,32.802392],[100.139266,32.724388],[100.088143,32.668988],[100.109701,32.640268],[100.189773,32.630692],[100.208252,32.606497],[100.229809,32.650346],[100.231041,32.696189],[100.258759,32.742511],[100.339447,32.719353],[100.399193,32.756101],[100.378251,32.698707],[100.420135,32.73194],[100.450932,32.694678],[100.470026,32.694678],[100.516837,32.632204],[100.54517,32.569687],[100.603069,32.553547],[100.645568,32.526303],[100.657887,32.546484],[100.661583,32.616075],[100.673286,32.628172],[100.710242,32.610026],[100.71209,32.645307],[100.690532,32.678056],[100.77122,32.643795],[100.834046,32.648835],[100.887633,32.632708],[100.93198,32.600447],[100.956618,32.621116],[100.99727,32.627668],[101.030531,32.660424],[101.077342,32.68259],[101.124769,32.658408],[101.157414,32.661431],[101.22332,32.725898],[101.237486,32.825026],[101.223935,32.855698],[101.178356,32.892892],[101.124153,32.909976],[101.134624,32.95217],[101.129081,32.989324],[101.183899,32.984304],[101.171581,33.009902],[101.184515,33.041514],[101.146327,33.056563],[101.143863,33.086151],[101.169733,33.10019],[101.11553,33.194893],[101.124769,33.221431],[101.156798,33.236449],[101.182668,33.26948],[101.217776,33.256469],[101.297232,33.262475],[101.381616,33.153316],[101.393935,33.157826],[101.386543,33.207412],[101.403174,33.225436],[101.487557,33.226938],[101.515275,33.192889],[101.557775,33.167344],[101.633535,33.101193],[101.661252,33.135778],[101.653861,33.162835],[101.709912,33.21292],[101.735781,33.279987],[101.677883,33.297497],[101.64955,33.323004],[101.663716,33.383991],[101.695745,33.433948],[101.769042,33.45592],[101.777665,33.533776],[101.769042,33.538765],[101.748716,33.505337],[101.718535,33.494857],[101.622448,33.502343],[101.611977,33.565199],[101.616905,33.598603],[101.585492,33.645448],[101.58426,33.674339],[101.501724,33.702723],[101.428427,33.680315],[101.424732,33.655411],[101.385312,33.644949],[101.302776,33.657902],[101.23687,33.685793],[101.217776,33.669856],[101.166653,33.659894],[101.177124,33.685295],[101.162957,33.719649],[101.186363,33.741051],[101.190675,33.791796],[101.153102,33.823124],[101.153718,33.8445],[101.054552,33.863386],[101.023139,33.896178],[100.994806,33.891707],[100.965857,33.946832],[100.927669,33.975126],[100.93506,33.990013],[100.880857,34.036644],[100.870386,34.083744],[100.848828,34.089692],[100.806329,34.155584],[100.764445,34.178857],[100.809408,34.247153],[100.798321,34.260014],[100.821727,34.317371],[100.868538,34.332693],[100.895024,34.375183],[100.951074,34.38358],[100.986799,34.374689],[101.054552,34.322808],[101.098284,34.329233],[101.178356,34.320831],[101.193754,34.336646],[101.235022,34.325279],[101.228863,34.298586],[101.268899,34.278808],[101.325565,34.268423],[101.327413,34.24468],[101.369913,34.248143],[101.417956,34.227858],[101.482014,34.218951],[101.492485,34.195689],[101.53868,34.212022],[101.6206,34.178857],[101.674187,34.110506],[101.703136,34.119424],[101.718535,34.083249],[101.736397,34.080275],[101.764114,34.122892],[101.788136,34.131809],[101.836795,34.124378],[101.851578,34.153108],[101.874367,34.130323],[101.897773,34.133791],[101.955055,34.109514],[101.965526,34.167469],[102.003099,34.162022],[102.030816,34.190739],[102.01357,34.218456],[102.062229,34.227858],[102.067772,34.293642],[102.149692,34.271885],[102.186649,34.352952],[102.237156,34.34307],[102.237156,34.34307],[102.259329,34.355917],[102.205743,34.407777],[102.169402,34.457631],[102.155852,34.507456],[102.139837,34.50351],[102.093026,34.536547],[102.001867,34.538519],[101.97415,34.548871],[101.956287,34.582876],[101.934729,34.58731],[101.919947,34.621791],[101.917483,34.705964],[101.923027,34.835746],[101.916867,34.873561],[101.985852,34.90007],[102.068388,34.887798],[102.048062,34.910868],[102.094874,34.986901],[102.133678,35.014844],[102.157699,35.010923],[102.176178,35.032977],[102.211286,35.034937],[102.218062,35.057475],[102.252554,35.048657],[102.29567,35.071681],[102.310452,35.128967],[102.346793,35.164201],[102.404075,35.179366],[102.365887,35.235599],[102.370199,35.263946],[102.3123,35.282512],[102.280887,35.303028],[102.311684,35.31426],[102.317844,35.343067],[102.287663,35.36552],[102.293822,35.424063],[102.314764,35.434303],[102.408387,35.409431],[102.447807,35.437229],[102.437952,35.455268],[102.49893,35.545403],[102.503241,35.585322],[102.531575,35.580455],[102.570995,35.548324],[102.695414,35.528358],[102.743458,35.494745],[102.782878,35.527871],[102.729291,35.523487],[102.746537,35.545403],[102.808747,35.560496],[102.763168,35.612086],[102.7644,35.653431],[102.744074,35.657807],[102.707733,35.70496],[102.686175,35.771996],[102.715125,35.815685],[102.739146,35.821023],[102.787189,35.862745],[102.81737,35.850133],[102.914073,35.845282],[102.94487,35.829757],[102.954725,35.858864],[102.942406,35.92674],[102.971971,35.995525],[102.951645,36.021667],[102.968276,36.044414],[102.932551,36.048285],[102.882044,36.082632],[102.941174,36.104877],[102.948566,36.150798],[102.965812,36.151765],[102.986754,36.193312],[103.048964,36.199107],[103.066826,36.216974],[103.021246,36.232906],[103.024942,36.256556],[102.922696,36.298047],[102.896827,36.331803],[102.845704,36.331803],[102.836465,36.344819],[102.829689,36.365544]]]]}},{"type":"Feature","properties":{"adcode":640000,"name":"\u5B81\u590F\u56DE\u65CF\u81EA\u6CBB\u533A","center":[106.278179,38.46637],"centroid":[106.169866,37.291332],"childrenNum":5,"level":"province","parent":{"adcode":100000},"subFeatureIndex":29,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[107.268764,37.099367],[107.281083,37.127047],[107.306952,37.100799],[107.334669,37.138975],[107.336517,37.165687],[107.317423,37.200017],[107.270612,37.229089],[107.309416,37.239095],[107.273075,37.29101],[107.257677,37.337179],[107.282931,37.437036],[107.284162,37.481691],[107.345756,37.518725],[107.369162,37.58752],[107.330358,37.584201],[107.311264,37.609806],[107.361155,37.613125],[107.422133,37.665254],[107.389488,37.671413],[107.387024,37.691305],[107.425828,37.684201],[107.484959,37.706458],[107.499125,37.765619],[107.57119,37.776499],[107.599523,37.791162],[107.620465,37.776026],[107.646335,37.805349],[107.659269,37.844112],[107.65003,37.86443],[107.560719,37.893717],[107.49235,37.944706],[107.448618,37.933378],[107.411662,37.948009],[107.440611,37.995659],[107.3938,38.014993],[107.33159,38.086625],[107.240431,38.111586],[107.19054,38.153953],[107.138801,38.161011],[107.119091,38.134185],[107.071047,38.138892],[107.051337,38.122886],[107.010069,38.120532],[106.942316,38.132302],[106.858548,38.156306],[106.779092,38.171833],[106.737824,38.197706],[106.654672,38.22921],[106.627571,38.232501],[106.555506,38.263521],[106.482209,38.319417],[106.599854,38.389812],[106.647897,38.470917],[106.66268,38.601524],[106.709491,38.718821],[106.756302,38.748699],[106.837606,38.847579],[106.954019,38.941202],[106.971881,39.026333],[106.96757,39.054688],[106.933693,39.076527],[106.878874,39.091392],[106.859164,39.107648],[106.825288,39.19397],[106.795723,39.214375],[106.790795,39.241263],[106.806193,39.277407],[106.806809,39.318625],[106.781556,39.371849],[106.751375,39.381564],[106.683622,39.357506],[106.643586,39.357969],[106.602318,39.37555],[106.556122,39.322329],[106.525325,39.308439],[106.511774,39.272311],[106.402753,39.291767],[106.280181,39.262118],[106.29558,39.167992],[106.285109,39.146181],[106.251232,39.131327],[106.192718,39.142932],[106.170544,39.163352],[106.145907,39.153142],[106.096631,39.084889],[106.078153,39.026333],[106.087392,39.006339],[106.060907,38.96866],[106.021487,38.953769],[105.97098,38.909077],[105.992538,38.857366],[105.909386,38.791159],[105.908154,38.737496],[105.88598,38.716953],[105.894603,38.696405],[105.852719,38.641735],[105.874277,38.593105],[105.856415,38.569714],[105.863806,38.53508],[105.836705,38.476071],[105.850872,38.443736],[105.827466,38.432486],[105.835473,38.387467],[105.821307,38.366824],[105.86627,38.296406],[105.842248,38.240962],[105.802828,38.220277],[105.775111,38.186887],[105.76772,38.121474],[105.780655,38.084741],[105.840401,38.004147],[105.799749,37.939986],[105.80406,37.862068],[105.760944,37.799674],[105.677177,37.771769],[105.622358,37.777919],[105.616199,37.722555],[105.598952,37.699356],[105.467141,37.695094],[105.4037,37.710246],[105.315004,37.702197],[105.221998,37.677097],[105.187505,37.657674],[105.111128,37.633981],[105.027977,37.580881],[104.866601,37.566651],[104.805007,37.539133],[104.623305,37.522522],[104.433595,37.515402],[104.419429,37.511604],[104.407726,37.464592],[104.322726,37.44844],[104.287002,37.428007],[104.298705,37.414223],[104.365226,37.418026],[104.437907,37.445589],[104.448994,37.42468],[104.499501,37.421353],[104.521059,37.43466],[104.679971,37.408044],[104.662109,37.367626],[104.713848,37.329566],[104.673812,37.317668],[104.651022,37.290534],[104.624536,37.298627],[104.600515,37.242907],[104.638087,37.201923],[104.717543,37.208597],[104.776673,37.246718],[104.85613,37.211933],[104.864753,37.17284],[104.888158,37.15901],[104.914644,37.097935],[104.954064,37.077407],[104.95468,37.040156],[105.004571,37.035378],[105.03968,37.007187],[105.05939,37.022956],[105.128991,36.996194],[105.165331,36.99476],[105.185657,36.942164],[105.178882,36.892403],[105.244787,36.894796],[105.279896,36.86751],[105.303302,36.820575],[105.334714,36.80093],[105.340874,36.764502],[105.319932,36.742924],[105.275584,36.752515],[105.272505,36.739567],[105.218302,36.730455],[105.201056,36.700711],[105.225693,36.664716],[105.22015,36.631105],[105.261418,36.602764],[105.2762,36.563358],[105.252179,36.553263],[105.281744,36.522489],[105.322396,36.535954],[105.362432,36.496514],[105.363048,36.443093],[105.398156,36.430575],[105.401236,36.369881],[105.425873,36.330357],[105.455439,36.321678],[105.476381,36.293224],[105.45975,36.268137],[105.460366,36.223733],[105.478844,36.213111],[105.515185,36.147415],[105.491163,36.101009],[105.430801,36.10391],[105.406163,36.074409],[105.343954,36.033767],[105.324859,35.941761],[105.350113,35.875839],[105.39754,35.857409],[105.371055,35.844312],[105.38091,35.792873],[105.408627,35.822479],[105.428953,35.819082],[105.432033,35.787533],[105.457286,35.771511],[105.481924,35.727312],[105.595873,35.715651],[105.667322,35.749657],[105.70243,35.733142],[105.759097,35.724883],[105.740618,35.698643],[105.723988,35.725854],[105.690727,35.698643],[105.722756,35.673366],[105.713517,35.650513],[105.759097,35.634464],[105.762176,35.602841],[105.800365,35.564878],[105.816379,35.575101],[105.847176,35.490359],[105.868734,35.540046],[105.900147,35.54735],[106.017175,35.519103],[106.023335,35.49377],[106.047356,35.498155],[106.078769,35.509848],[106.071994,35.463555],[106.06953,35.458193],[106.073842,35.45478],[106.073226,35.450393],[106.071378,35.449418],[106.073226,35.447468],[106.083081,35.421624],[106.113262,35.361616],[106.129892,35.393333],[106.173008,35.437716],[106.196414,35.409919],[106.237681,35.409431],[106.241377,35.358687],[106.319601,35.265411],[106.363333,35.238532],[106.368261,35.273718],[106.415688,35.276161],[106.472354,35.310842],[106.501304,35.364056],[106.503767,35.415284],[106.483441,35.450393],[106.490217,35.480613],[106.465579,35.481101],[106.440941,35.52641],[106.460036,35.578995],[106.47913,35.575101],[106.460036,35.643705],[106.434782,35.688436],[106.49268,35.732656],[106.506231,35.737514],[106.566593,35.738971],[106.595542,35.727312],[106.620796,35.743829],[106.633115,35.714679],[106.66268,35.70739],[106.674998,35.728284],[106.750759,35.689408],[106.750759,35.725369],[106.806193,35.70982],[106.819128,35.7448],[106.867171,35.738485],[106.868403,35.771996],[106.897353,35.759856],[106.927534,35.810346],[106.849925,35.887476],[106.912751,35.93207],[106.940468,35.931101],[106.93862,35.952905],[106.90228,35.943699],[106.94786,35.988262],[106.928149,36.011502],[106.940468,36.064734],[106.957715,36.091337],[106.925686,36.115997],[106.930613,36.138716],[106.873947,36.178338],[106.873947,36.178338],[106.858548,36.206834],[106.858548,36.206834],[106.833295,36.229044],[106.808657,36.21118],[106.772933,36.212628],[106.735976,36.23725],[106.698404,36.244008],[106.685469,36.273445],[106.647897,36.259451],[106.559202,36.292259],[106.54134,36.25366],[106.504383,36.266207],[106.470507,36.306246],[106.497608,36.31348],[106.510543,36.379037],[106.492064,36.422389],[106.523477,36.468605],[106.494528,36.494589],[106.455724,36.496995],[106.39721,36.548455],[106.37134,36.549417],[106.363949,36.577296],[106.392282,36.556628],[106.397826,36.576816],[106.444637,36.557109],[106.465579,36.583063],[106.444637,36.624861],[106.491448,36.628703],[106.490833,36.685835],[106.530869,36.690154],[106.519782,36.708868],[106.519782,36.708868],[106.514238,36.715584],[106.59431,36.750118],[106.644817,36.72278],[106.627571,36.752995],[106.657752,36.820575],[106.637426,36.867031],[106.637426,36.867031],[106.626955,36.892403],[106.609709,36.878521],[106.609709,36.878521],[106.601702,36.918244],[106.549347,36.941685],[106.540108,36.984244],[106.595542,36.94025],[106.594926,36.967988],[106.64297,36.962729],[106.646665,37.000496],[106.666991,37.016745],[106.645433,37.064992],[106.605397,37.127524],[106.6171,37.135158],[106.673151,37.1113],[106.687933,37.12991],[106.728585,37.121321],[106.750143,37.09889],[106.772933,37.120367],[106.776012,37.158056],[106.818512,37.141838],[106.891193,37.098413],[106.912135,37.110345],[106.905976,37.151378],[106.998367,37.106527],[107.031011,37.108436],[107.030395,37.140883],[107.095685,37.115595],[107.133873,37.134681],[107.181916,37.143269],[107.234887,37.096503],[107.268764,37.099367]]],[[[106.048588,35.488898],[105.897683,35.451368],[105.894603,35.413821],[106.002393,35.438692],[106.034422,35.469404],[106.054132,35.45478],[106.048588,35.488898]]],[[[106.073842,35.45478],[106.06953,35.458193],[106.071378,35.449418],[106.073226,35.450393],[106.073842,35.45478]]]]}},{"type":"Feature","properties":{"adcode":650000,"name":"\u65B0\u7586\u7EF4\u543E\u5C14\u81EA\u6CBB\u533A","center":[87.617733,43.792818],"centroid":[85.294711,41.371801],"childrenNum":24,"level":"province","parent":{"adcode":100000},"subFeatureIndex":30,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[96.386348,42.727592],[96.363558,42.900562],[95.921314,43.229789],[95.880046,43.28035],[95.857872,43.417436],[95.735916,43.597569],[95.705735,43.67077],[95.645373,43.787966],[95.623199,43.855756],[95.527113,44.007466],[95.426099,44.009618],[95.377439,44.025972],[95.326932,44.028554],[95.35157,44.090054],[95.355882,44.166087],[95.376208,44.227444],[95.4107,44.245024],[95.43041,44.281882],[95.41378,44.298589],[95.238853,44.277169],[95.1286,44.269884],[94.998637,44.253169],[94.945666,44.292592],[94.826174,44.320001],[94.768275,44.34055],[94.722696,44.34055],[94.673421,44.397021],[94.606283,44.448311],[94.557008,44.462408],[94.470777,44.509373],[94.390705,44.521749],[94.359292,44.515775],[94.329727,44.582734],[94.279836,44.603617],[94.227481,44.645785],[94.215162,44.667921],[94.152336,44.684944],[94.066105,44.732154],[93.723642,44.865498],[93.716251,44.894334],[93.613389,44.926546],[93.509296,44.968055],[93.434767,44.955351],[93.376869,44.985412],[93.314659,44.995147],[93.314043,44.980333],[93.252449,44.991761],[93.174225,45.015458],[93.100312,45.007419],[93.062124,45.018419],[93.002377,45.009958],[92.932776,45.017573],[92.922921,45.03703],[92.884117,45.046756],[92.847777,45.038721],[92.779407,45.050561],[92.683937,45.02561],[92.547814,45.018419],[92.501003,45.001072],[92.414155,45.018419],[92.348866,45.014188],[92.315605,45.028994],[92.240461,45.015881],[92.100026,45.081417],[92.056911,45.086911],[91.885679,45.078882],[91.803144,45.082685],[91.694738,45.065357],[91.561695,45.075501],[91.500101,45.103809],[91.448978,45.156586],[91.429268,45.156586],[91.37753,45.11099],[91.33503,45.129571],[91.242023,45.13717],[91.230936,45.153632],[91.195827,45.159118],[91.17119,45.199616],[91.129922,45.21606],[91.050466,45.208892],[91.007966,45.218589],[90.96177,45.201303],[90.881698,45.192025],[90.866916,45.209314],[90.897713,45.249776],[90.877387,45.280946],[90.831807,45.300313],[90.804706,45.29484],[90.813329,45.32851],[90.773909,45.405874],[90.772677,45.432338],[90.723402,45.464667],[90.671047,45.487747],[90.676591,45.582488],[90.714779,45.728895],[90.799778,45.834905],[90.890937,45.921566],[91.028292,46.023054],[91.014741,46.06667],[91.021517,46.121038],[90.98456,46.160431],[90.94822,46.219262],[90.955611,46.233752],[90.900177,46.31235],[90.983328,46.374734],[90.996263,46.419309],[91.025828,46.444057],[91.038147,46.500936],[91.060937,46.516999],[91.079415,46.558989],[91.068328,46.579149],[91.017821,46.58244],[91.036299,46.670393],[91.054161,46.717598],[91.019053,46.766402],[90.992567,46.769682],[90.992567,46.790583],[90.942676,46.82581],[90.958075,46.879425],[90.929742,46.893331],[90.92235,46.938707],[90.901408,46.960768],[90.830575,46.995883],[90.767134,46.992617],[90.691989,47.080717],[90.653801,47.111681],[90.579888,47.198364],[90.56141,47.206903],[90.521374,47.2845],[90.488113,47.317374],[90.526301,47.379007],[90.507823,47.400076],[90.468403,47.404937],[90.459164,47.43895],[90.474562,47.462422],[90.468403,47.497611],[90.398186,47.547724],[90.376012,47.603036],[90.346447,47.637324],[90.384635,47.644179],[90.331665,47.681663],[90.216484,47.70543],[90.180144,47.72516],[90.13518,47.723147],[90.07605,47.777469],[90.070506,47.820483],[90.086521,47.86547],[90.066195,47.883534],[90.040941,47.874704],[89.960253,47.885942],[89.957789,47.842982],[89.86971,47.834144],[89.761921,47.835751],[89.735435,47.89758],[89.651052,47.913627],[89.645508,47.947711],[89.595617,47.973359],[89.599313,48.015811],[89.569132,48.037825],[89.498299,48.02822],[89.38127,48.046227],[89.359712,48.026219],[89.308589,48.021816],[89.282104,47.994189],[89.231597,47.98017],[89.156452,47.996992],[89.078228,47.98698],[89.044967,48.009806],[89.027105,48.051028],[88.953808,48.090618],[88.939026,48.115396],[88.824461,48.107005],[88.79736,48.133772],[88.721599,48.160526],[88.700657,48.180881],[88.668628,48.171303],[88.638447,48.183674],[88.601491,48.221567],[88.594716,48.259831],[88.575006,48.277757],[88.605803,48.337863],[88.573774,48.351785],[88.573158,48.369679],[88.535586,48.368884],[88.523267,48.403461],[88.503557,48.412996],[88.462289,48.392335],[88.438267,48.393528],[88.360659,48.433251],[88.363123,48.460641],[88.318159,48.478497],[88.229464,48.498329],[88.196819,48.493967],[88.151855,48.526478],[88.130297,48.521721],[88.10874,48.545895],[88.041602,48.548272],[87.973233,48.575997],[87.96153,48.599353],[88.010805,48.618742],[88.02682,48.65315],[88.089645,48.69504],[88.090877,48.71992],[88.064392,48.712813],[88.029283,48.750313],[87.96153,48.773588],[87.93874,48.757809],[87.872219,48.799612],[87.826639,48.800795],[87.803234,48.824835],[87.829103,48.825623],[87.792147,48.849258],[87.78106,48.872094],[87.742256,48.881146],[87.760118,48.925992],[87.793995,48.927565],[87.814321,48.945256],[87.87653,48.949186],[87.871603,48.963726],[87.911639,48.979833],[87.883922,48.993971],[87.883306,49.023806],[87.835263,49.054406],[87.858052,49.07362],[87.844502,49.090084],[87.867291,49.108892],[87.845733,49.146096],[87.82048,49.148445],[87.821096,49.173883],[87.793379,49.18249],[87.762582,49.172709],[87.700372,49.175839],[87.67635,49.15549],[87.602437,49.152359],[87.563017,49.142572],[87.517438,49.145704],[87.49588,49.132001],[87.511894,49.10184],[87.43675,49.075188],[87.388707,49.097921],[87.304939,49.112418],[87.239033,49.114376],[87.211932,49.140615],[87.112766,49.15549],[87.088128,49.133567],[87.000049,49.142572],[86.953853,49.131218],[86.887948,49.132001],[86.854071,49.109284],[86.84976,49.066563],[86.836209,49.051269],[86.772151,49.02773],[86.732115,48.994757],[86.730267,48.959797],[86.757985,48.894919],[86.782006,48.887049],[86.821426,48.850439],[86.818963,48.831139],[86.770303,48.810255],[86.754289,48.78463],[86.780774,48.731369],[86.771535,48.717156],[86.70255,48.666195],[86.693311,48.64366],[86.640956,48.629027],[86.635413,48.612016],[86.594761,48.576789],[86.579978,48.538763],[86.416138,48.481671],[86.38103,48.49357],[86.305269,48.491984],[86.270161,48.452307],[86.225813,48.432456],[86.053966,48.441192],[85.916612,48.438015],[85.791576,48.418954],[85.758315,48.403064],[85.695489,48.335078],[85.695489,48.302445],[85.678243,48.266205],[85.633895,48.232731],[85.622193,48.202824],[85.587084,48.191654],[85.576613,48.15853],[85.55136,48.127781],[85.551975,48.081423],[85.531649,48.046227],[85.547048,48.008205],[85.617881,47.550552],[85.614801,47.498015],[85.685018,47.428829],[85.701649,47.384275],[85.675779,47.321837],[85.701033,47.28856],[85.682555,47.249982],[85.682555,47.222757],[85.641903,47.18413],[85.582772,47.142626],[85.547048,47.096609],[85.545816,47.057891],[85.441106,47.063191],[85.355491,47.054629],[85.325926,47.044842],[85.276651,47.068898],[85.213825,47.041172],[85.175637,46.997924],[85.102956,46.968936],[85.082014,46.939933],[84.987159,46.918272],[84.979768,46.883106],[84.95513,46.861013],[84.934188,46.863878],[84.867051,46.927673],[84.849189,46.957092],[84.781435,46.979962],[84.748175,47.009759],[84.699515,47.008535],[84.668718,46.995067],[84.563393,46.991801],[84.506726,46.97302],[84.425422,47.008943],[84.37122,46.993434],[84.336727,47.00527],[84.2893,46.994658],[84.195061,47.003638],[84.150098,46.977512],[84.086656,46.965261],[84.038613,46.973428],[84.002888,46.990576],[83.951765,46.98731],[83.932671,46.970161],[83.88586,46.982003],[83.766367,47.026896],[83.69923,47.015472],[83.700462,47.032199],[83.576042,47.059114],[83.566803,47.080717],[83.53847,47.083977],[83.463325,47.132042],[83.418978,47.119012],[83.370318,47.178436],[83.324739,47.167858],[83.306261,47.179656],[83.257602,47.173147],[83.221877,47.186977],[83.207094,47.213814],[83.17445,47.218286],[83.15474,47.236168],[83.108544,47.221944],[83.02724,47.21544],[83.031552,47.168265],[82.993364,47.065229],[82.937929,47.014248],[82.923762,46.932169],[82.876335,46.823762],[82.878183,46.797138],[82.829524,46.772551],[82.788872,46.677784],[82.774089,46.600124],[82.726662,46.494756],[82.609017,46.294985],[82.518474,46.153798],[82.461808,45.97982],[82.401446,45.972333],[82.342932,45.935303],[82.336156,45.882418],[82.349707,45.822811],[82.340468,45.772742],[82.289961,45.71636],[82.288729,45.655321],[82.266555,45.620172],[82.281954,45.53891],[82.448257,45.461309],[82.546808,45.426038],[82.60101,45.346178],[82.58746,45.224069],[82.562822,45.204676],[82.487061,45.181058],[82.344779,45.219011],[82.294272,45.247669],[82.206809,45.236713],[82.109491,45.211422],[82.091012,45.222383],[82.09594,45.249776],[82.052824,45.255674],[81.993078,45.237978],[81.921013,45.233342],[81.879745,45.284314],[81.832318,45.319673],[81.78797,45.3836],[81.677101,45.35459],[81.645072,45.359216],[81.582863,45.336503],[81.575471,45.30789],[81.536667,45.304101],[81.52866,45.285999],[81.462754,45.264099],[81.437501,45.28263],[81.398697,45.275471],[81.382066,45.257781],[81.327864,45.260729],[81.284748,45.23882],[81.236705,45.247248],[81.175111,45.227863],[81.170183,45.211001],[81.111669,45.218168],[81.080872,45.182745],[81.024821,45.162916],[80.966307,45.168402],[80.93551,45.160384],[80.897938,45.127459],[80.862214,45.127037],[80.816634,45.152788],[80.731634,45.156164],[80.686055,45.129148],[80.599207,45.105921],[80.519135,45.108878],[80.493882,45.127037],[80.445839,45.097895],[80.443991,45.077614],[80.404571,45.049293],[80.358375,45.040836],[80.328194,45.070007],[80.291854,45.06578],[80.24381,45.031532],[80.195767,45.030686],[80.144644,45.059017],[80.136021,45.041259],[80.111999,45.052675],[80.060876,45.026033],[80.056565,45.011227],[79.98142,44.964244],[79.951855,44.957892],[79.944464,44.937985],[79.887798,44.90917],[79.969102,44.877797],[79.953703,44.849377],[79.991891,44.830281],[79.999283,44.793768],[80.087978,44.817122],[80.115695,44.815424],[80.169898,44.84471],[80.18776,44.825612],[80.178521,44.796741],[80.200695,44.756808],[80.238883,44.7228],[80.313412,44.704938],[80.400259,44.628751],[80.411962,44.605321],[80.350368,44.484615],[80.383013,44.401297],[80.399027,44.30587],[80.413194,44.264741],[80.400875,44.198704],[80.407034,44.149772],[80.3941,44.127009],[80.449534,44.078017],[80.458773,44.047054],[80.457541,43.981203],[80.485259,43.95579],[80.475404,43.938124],[80.511128,43.906657],[80.522215,43.816473],[80.75504,43.494329],[80.761199,43.446554],[80.746417,43.439167],[80.735946,43.389609],[80.686055,43.333916],[80.69283,43.32042],[80.777214,43.308227],[80.769207,43.265535],[80.788917,43.242433],[80.789533,43.201876],[80.804315,43.178314],[80.79446,43.137277],[80.752576,43.148194],[80.73225,43.131163],[80.706997,43.143828],[80.650946,43.147321],[80.593048,43.133347],[80.556092,43.104515],[80.482795,43.06955],[80.416889,43.05687],[80.378701,43.031502],[80.397795,42.996933],[80.487106,42.948766],[80.5912,42.923354],[80.602903,42.894424],[80.503737,42.882146],[80.450766,42.861971],[80.407034,42.834767],[80.338049,42.831695],[80.280151,42.838278],[80.262289,42.828623],[80.259209,42.790865],[80.225948,42.713083],[80.228412,42.692852],[80.179753,42.670415],[80.163738,42.629919],[80.180985,42.590718],[80.221637,42.533415],[80.265368,42.502097],[80.225948,42.485769],[80.206238,42.431462],[80.239499,42.389927],[80.229028,42.358536],[80.283847,42.320493],[80.272144,42.281984],[80.29247,42.259842],[80.28631,42.233261],[80.233339,42.210215],[80.168666,42.200462],[80.163738,42.152563],[80.139717,42.151232],[80.16805,42.096635],[80.193303,42.081535],[80.14218,42.03488],[80.089826,42.047325],[79.923522,42.042436],[79.852689,42.015319],[79.854537,41.984186],[79.822508,41.963275],[79.776313,41.89248],[79.724574,41.896935],[79.640806,41.884907],[79.616784,41.856385],[79.550879,41.834094],[79.500988,41.835432],[79.457256,41.847915],[79.415372,41.836769],[79.356242,41.795735],[79.326061,41.809565],[79.276786,41.78101],[79.271858,41.767174],[79.21704,41.725648],[79.138199,41.722968],[79.10925,41.697503],[79.043345,41.681414],[79.021787,41.657273],[78.99407,41.664427],[78.957729,41.65146],[78.891824,41.597777],[78.86657,41.593749],[78.825302,41.560173],[78.739071,41.555695],[78.696571,41.54181],[78.707042,41.522098],[78.675629,41.50238],[78.650375,41.467411],[78.580774,41.481759],[78.527188,41.440947],[78.454507,41.412228],[78.391681,41.408189],[78.385522,41.394721],[78.338094,41.397415],[78.324544,41.384395],[78.235232,41.399211],[78.163783,41.383497],[78.149617,41.368228],[78.165015,41.340825],[78.136682,41.279239],[78.129291,41.228398],[78.094798,41.224347],[77.972842,41.173013],[77.905089,41.185174],[77.836104,41.153189],[77.814546,41.13426],[77.807155,41.091876],[77.829328,41.059394],[77.796068,41.049014],[77.780669,41.022832],[77.737553,41.032313],[77.684583,41.00793],[77.654402,41.016059],[77.597119,41.005221],[77.591576,40.992122],[77.540453,41.006575],[77.476395,40.999349],[77.473931,41.022832],[77.415417,41.038633],[77.363062,41.04089],[77.296541,41.004769],[77.236795,41.027798],[77.169041,41.009285],[77.108063,41.038181],[77.091433,41.062553],[77.023064,41.059394],[77.002122,41.073381],[76.940528,41.028701],[76.885709,41.027347],[76.85368,40.97631],[76.817956,40.975406],[76.761905,40.954167],[76.741579,40.912119],[76.731724,40.818887],[76.693536,40.779472],[76.646725,40.759983],[76.646725,40.73686],[76.676906,40.696036],[76.654732,40.652917],[76.657196,40.620218],[76.611,40.601591],[76.601145,40.578868],[76.556798,40.542495],[76.543247,40.513837],[76.539551,40.464226],[76.508754,40.429613],[76.470566,40.422779],[76.442233,40.391336],[76.390494,40.37766],[76.381871,40.39088],[76.333212,40.343459],[76.327668,40.391336],[76.283321,40.415034],[76.279625,40.439179],[76.22419,40.401819],[76.176147,40.381307],[76.144118,40.393615],[76.081293,40.39635],[76.048648,40.388601],[76.048648,40.357141],[76.026474,40.355317],[75.986438,40.381763],[75.932235,40.339353],[75.921764,40.291439],[75.890351,40.30924],[75.84046,40.312434],[75.831221,40.327492],[75.785642,40.301025],[75.739446,40.299199],[75.709265,40.280939],[75.688323,40.343915],[75.669845,40.363982],[75.686475,40.418223],[75.717272,40.443278],[75.733287,40.474242],[75.646439,40.516567],[75.631041,40.548862],[75.627345,40.605226],[75.636584,40.624306],[75.599628,40.659727],[75.550353,40.64883],[75.467817,40.599773],[75.432093,40.563412],[75.355716,40.537947],[75.292274,40.483802],[75.268869,40.483802],[75.242383,40.448743],[75.206659,40.447833],[75.13521,40.463315],[75.102565,40.44009],[75.051442,40.449654],[75.021877,40.466958],[74.995392,40.455119],[74.963363,40.464681],[74.891914,40.507467],[74.844486,40.521117],[74.819233,40.505647],[74.814921,40.461039],[74.795211,40.443278],[74.908544,40.338897],[74.862965,40.32658],[74.824776,40.344371],[74.700357,40.346195],[74.697893,40.310153],[74.673255,40.278656],[74.618437,40.27957],[74.577169,40.260391],[74.534669,40.207851],[74.485394,40.182251],[74.433039,40.13148],[74.356662,40.089371],[74.316626,40.106767],[74.280902,40.09807],[74.26304,40.125074],[74.126301,40.104479],[74.113366,40.086624],[74.023439,40.085251],[74.008041,40.050901],[73.943367,40.016076],[73.980324,40.004617],[73.910722,39.934443],[73.907027,39.873843],[73.845433,39.831115],[73.841737,39.756163],[73.905795,39.741899],[73.924273,39.722108],[73.953838,39.600018],[73.916266,39.586644],[73.914418,39.564041],[73.883621,39.540969],[73.893476,39.528046],[73.868223,39.482794],[73.836194,39.472169],[73.745651,39.462005],[73.6471,39.474479],[73.61076,39.465702],[73.592898,39.412087],[73.502355,39.383877],[73.554094,39.350102],[73.554709,39.295935],[73.542391,39.269531],[73.564564,39.266288],[73.580579,39.237555],[73.623079,39.235237],[73.639709,39.220402],[73.657571,39.166136],[73.688368,39.154999],[73.719781,39.108112],[73.720397,39.071881],[73.743187,39.029588],[73.780143,39.026798],[73.820179,39.041674],[73.839889,39.008199],[73.846665,38.962145],[73.826339,38.916993],[73.767824,38.941202],[73.742571,38.933754],[73.70931,38.893241],[73.699455,38.857832],[73.729636,38.837324],[73.769056,38.775765],[73.757353,38.719755],[73.809092,38.634256],[73.799237,38.610878],[73.852208,38.584217],[73.89902,38.579071],[73.926121,38.536016],[74.011736,38.52478],[74.034526,38.541634],[74.090577,38.542102],[74.068403,38.585621],[74.088113,38.610878],[74.11275,38.611345],[74.147859,38.676785],[74.229779,38.656224],[74.353583,38.655757],[74.421952,38.647812],[74.455829,38.632853],[74.506336,38.637528],[74.546988,38.607604],[74.613509,38.593105],[74.639995,38.599653],[74.717603,38.542102],[74.78474,38.538357],[74.821697,38.491062],[74.862965,38.484035],[74.868508,38.403883],[74.834015,38.361193],[74.789668,38.324581],[74.806914,38.285602],[74.793363,38.271039],[74.816769,38.215576],[74.80445,38.167128],[74.821697,38.10311],[74.879595,38.021122],[74.92579,38.01735],[74.911008,37.966884],[74.919015,37.908357],[74.936877,37.876241],[74.917167,37.845057],[74.989848,37.797783],[75.006478,37.770823],[74.949196,37.725395],[74.923327,37.717347],[74.920863,37.684675],[74.891914,37.668097],[74.940573,37.559061],[75.000935,37.53059],[75.002167,37.511604],[75.035428,37.500685],[75.078543,37.511129],[75.090862,37.486915],[75.129666,37.459367],[75.153072,37.414223],[75.125971,37.388075],[75.140137,37.355258],[75.125971,37.322427],[75.078543,37.318144],[75.018181,37.293867],[74.927022,37.277678],[74.911008,37.233378],[74.816153,37.216699],[74.800139,37.248147],[74.753943,37.281011],[74.727458,37.282916],[74.665864,37.23576],[74.642458,37.261485],[74.598727,37.258151],[74.578401,37.231472],[74.54514,37.2491],[74.511263,37.240048],[74.477387,37.19954],[74.487858,37.161871],[74.465068,37.147085],[74.496481,37.116072],[74.498944,37.072155],[74.530357,37.082182],[74.56793,37.032512],[74.617205,37.043499],[74.632603,37.066425],[74.70898,37.084569],[74.739161,37.028212],[74.792747,37.027257],[74.806914,37.054485],[74.84695,37.056873],[74.84387,37.0134],[74.86974,36.990458],[74.893762,36.939772],[74.938725,36.94312],[74.927638,36.978029],[75.005862,36.99476],[75.032348,37.016745],[75.063145,37.006231],[75.172166,37.013877],[75.16847,36.991892],[75.244847,36.963207],[75.288579,36.974682],[75.345861,36.960816],[75.413614,36.954599],[75.396368,36.904367],[75.430245,36.873255],[75.434556,36.83303],[75.425933,36.778883],[75.458578,36.720861],[75.504773,36.743404],[75.536802,36.729975],[75.537418,36.773131],[75.588541,36.762584],[75.634121,36.771693],[75.724048,36.750597],[75.8072,36.707908],[75.871257,36.666636],[75.947018,36.590752],[75.924228,36.566242],[75.991981,36.505654],[76.035097,36.409386],[75.991365,36.35205],[75.998757,36.312034],[76.055423,36.252695],[76.060967,36.225182],[76.011691,36.229044],[76.016619,36.165294],[75.96796,36.159013],[75.936547,36.13485],[75.949482,36.070056],[75.982742,36.031347],[76.028322,36.016827],[76.044336,36.026991],[76.097307,36.022635],[76.117017,35.975186],[76.16506,35.908807],[76.146582,35.839946],[76.160133,35.82442],[76.221727,35.823449],[76.228502,35.837035],[76.298719,35.841401],[76.365857,35.82442],[76.369552,35.86323],[76.431762,35.851589],[76.471798,35.886021],[76.51553,35.881173],[76.55803,35.923347],[76.59745,35.895718],[76.579587,35.866625],[76.587595,35.840431],[76.566037,35.819082],[76.593754,35.771996],[76.69292,35.747714],[76.769297,35.653917],[76.848753,35.668018],[76.906651,35.615005],[76.967013,35.591649],[76.99781,35.611113],[77.072339,35.591162],[77.093281,35.569746],[77.195527,35.519103],[77.307628,35.540533],[77.331649,35.530793],[77.355055,35.494257],[77.396939,35.467942],[77.451758,35.46063],[77.518895,35.482075],[77.578025,35.47574],[77.590344,35.460143],[77.639619,35.45478],[77.657481,35.477689],[77.690742,35.448443],[77.735706,35.461605],[77.757879,35.497181],[77.797299,35.491334],[77.816394,35.518616],[77.85643,35.487436],[77.870596,35.495232],[77.914944,35.465017],[77.917408,35.490847],[77.951284,35.478664],[78.009799,35.491821],[78.029509,35.469404],[78.048603,35.491334],[78.140378,35.494745],[78.113892,35.466967],[78.107117,35.437229],[78.046755,35.384063],[78.013494,35.366008],[78.020885,35.315237],[78.01719,35.228267],[78.060306,35.180344],[78.062769,35.114772],[78.078784,35.100084],[78.124979,35.108407],[78.150849,35.069721],[78.123131,35.036897],[78.160704,34.990823],[78.201972,34.974642],[78.182262,34.936874],[78.206283,34.891726],[78.237696,34.882398],[78.230921,34.776288],[78.21429,34.760556],[78.213059,34.717771],[78.267261,34.705472],[78.265413,34.651335],[78.280812,34.623269],[78.346101,34.60406],[78.397224,34.605538],[78.427405,34.594207],[78.436029,34.543942],[78.492695,34.578441],[78.542586,34.574499],[78.559832,34.55725],[78.562912,34.51288],[78.58139,34.505483],[78.634977,34.538026],[78.708274,34.522249],[78.715049,34.502031],[78.758781,34.481807],[78.742766,34.45467],[78.809288,34.432955],[78.878273,34.391481],[78.899831,34.354929],[78.958961,34.386049],[78.973128,34.362833],[79.039649,34.33467],[79.048888,34.348506],[79.0107,34.399877],[79.039033,34.421601],[79.072294,34.412714],[79.161605,34.441345],[79.179467,34.422588],[79.241677,34.415183],[79.274322,34.435916],[79.326677,34.44332],[79.363017,34.428018],[79.435082,34.447761],[79.504683,34.45467],[79.545335,34.476381],[79.58106,34.456151],[79.675914,34.451216],[79.699936,34.477861],[79.735661,34.471447],[79.801566,34.478847],[79.861312,34.528166],[79.84345,34.55725],[79.88595,34.642965],[79.866856,34.671517],[79.906892,34.683821],[79.898268,34.732035],[79.947544,34.821008],[79.926602,34.849499],[79.961094,34.862759],[79.996819,34.856375],[80.003594,34.895162],[80.034391,34.902033],[80.041782,34.943252],[80.02392,34.971209],[80.04363,35.022196],[80.031311,35.034447],[80.078123,35.076578],[80.118159,35.066293],[80.23026,35.147565],[80.223484,35.177409],[80.257977,35.203331],[80.362687,35.20871],[80.267832,35.295701],[80.286926,35.35283],[80.321419,35.38699],[80.375006,35.387966],[80.432904,35.449418],[80.444607,35.417235],[80.514824,35.391869],[80.532686,35.404553],[80.56841,35.391381],[80.599823,35.409431],[80.65649,35.393821],[80.690982,35.364544],[80.689135,35.339162],[80.759968,35.334768],[80.844351,35.345508],[80.894242,35.324027],[80.924423,35.330862],[80.963844,35.310842],[81.026053,35.31133],[81.002648,35.334768],[81.030981,35.337209],[81.031597,35.380648],[81.054387,35.402602],[81.09935,35.40748],[81.103662,35.386015],[81.142466,35.365032],[81.191741,35.36552],[81.219458,35.319144],[81.26627,35.322562],[81.285364,35.345508],[81.314313,35.337209],[81.363588,35.354783],[81.385762,35.335256],[81.441196,35.333303],[81.447972,35.318167],[81.504638,35.279092],[81.513261,35.23511],[81.68634,35.235599],[81.736847,35.26248],[81.804601,35.270786],[81.853876,35.25857],[81.927789,35.271275],[81.955506,35.307423],[81.99123,35.30547],[82.030034,35.321585],[82.05344,35.35039],[82.029419,35.426013],[82.034346,35.451855],[82.071302,35.450393],[82.086701,35.467454],[82.164925,35.495719],[82.189563,35.513258],[82.234526,35.520565],[82.263475,35.547837],[82.2992,35.544916],[82.328149,35.559523],[82.350323,35.611113],[82.336156,35.651486],[82.392823,35.656349],[82.424852,35.712736],[82.468583,35.717595],[82.501844,35.701073],[82.546192,35.708362],[82.628727,35.692324],[82.652133,35.67288],[82.731589,35.637868],[82.780249,35.666073],[82.795031,35.688436],[82.873871,35.688922],[82.894813,35.673852],[82.967494,35.667532],[82.956407,35.636409],[82.981661,35.599922],[82.971806,35.548324],[82.998907,35.484512],[83.067892,35.46258],[83.088834,35.425526],[83.127022,35.398699],[83.178145,35.38943],[83.251442,35.417722],[83.280391,35.401138],[83.333978,35.397236],[83.405427,35.380648],[83.449159,35.382111],[83.502745,35.360639],[83.540318,35.364056],[83.54155,35.341603],[83.599448,35.351366],[83.622238,35.335256],[83.677672,35.361128],[83.785462,35.36308],[83.79778,35.354783],[83.885244,35.367472],[83.906186,35.40309],[84.005968,35.422599],[84.077417,35.400163],[84.095895,35.362592],[84.140859,35.379184],[84.160569,35.359663],[84.200605,35.381135],[84.274517,35.404065],[84.333032,35.413821],[84.424191,35.466479],[84.45314,35.473303],[84.475929,35.516181],[84.448828,35.550272],[84.513502,35.564391],[84.570168,35.588242],[84.628067,35.595055],[84.704443,35.616951],[84.729081,35.613546],[84.798066,35.647595],[84.920022,35.696213],[84.973608,35.709334],[84.99455,35.737028],[85.053065,35.752086],[85.146071,35.742371],[85.271107,35.788989],[85.341324,35.753543],[85.373969,35.700101],[85.518715,35.680658],[85.566142,35.6403],[85.612953,35.651486],[85.65299,35.731199],[85.691178,35.751114],[85.811286,35.778794],[85.835308,35.771996],[85.903677,35.78462],[85.949256,35.778794],[86.035488,35.846738],[86.05335,35.842857],[86.090306,35.876809],[86.093386,35.906868],[86.129111,35.941761],[86.150668,36.00424],[86.173458,36.008113],[86.199944,36.047801],[86.182081,36.064734],[86.187625,36.130983],[86.248603,36.141616],[86.2794,36.170608],[86.35824,36.168676],[86.392733,36.206834],[86.454943,36.221319],[86.515305,36.205385],[86.531935,36.227113],[86.599072,36.222285],[86.69947,36.24449],[86.746282,36.291777],[86.836209,36.291294],[86.86331,36.299977],[86.887332,36.262829],[86.931064,36.265242],[86.943998,36.284058],[86.996353,36.308658],[87.051788,36.2966],[87.08628,36.310587],[87.149106,36.297565],[87.161425,36.325535],[87.193454,36.349158],[87.292004,36.358797],[87.348055,36.393008],[87.363453,36.420463],[87.386859,36.412757],[87.426895,36.42576],[87.460155,36.409868],[87.470626,36.354459],[87.570409,36.342409],[87.6203,36.360243],[87.731785,36.384818],[87.767509,36.3747],[87.826023,36.391563],[87.838342,36.383855],[87.919646,36.39349],[87.95845,36.408423],[87.983088,36.437797],[88.006494,36.430575],[88.092109,36.43539],[88.134609,36.427205],[88.182652,36.452721],[88.222688,36.447426],[88.241782,36.468605],[88.282434,36.470049],[88.366202,36.458016],[88.356963,36.477268],[88.41055,36.473418],[88.470912,36.48208],[88.498629,36.446463],[88.573158,36.461386],[88.618121,36.428168],[88.623665,36.389636],[88.690186,36.367954],[88.766563,36.292259],[88.783809,36.291777],[88.802903,36.33807],[88.838628,36.353496],[88.870657,36.348193],[88.926091,36.36458],[88.964279,36.318785],[89.013554,36.315409],[89.054822,36.291777],[89.10225,36.281164],[89.126887,36.254626],[89.198952,36.260417],[89.232213,36.295636],[89.292575,36.231457],[89.335075,36.23725],[89.375727,36.228078],[89.490291,36.151281],[89.594385,36.126632],[89.614711,36.109712],[89.711414,36.093272],[89.766848,36.073925],[89.819819,36.080697],[89.914058,36.079246],[89.941159,36.067637],[89.944855,36.140649],[89.997825,36.168193],[90.019999,36.213594],[90.028006,36.258486],[90.003369,36.278752],[90.043405,36.276822],[90.058188,36.255591],[90.145651,36.239181],[90.130252,36.2078],[90.198006,36.187516],[90.23681,36.160462],[90.325505,36.159496],[90.424055,36.133883],[90.478258,36.13195],[90.534925,36.147899],[90.613149,36.126632],[90.659344,36.13485],[90.776373,36.086501],[90.815793,36.035703],[90.850285,36.016827],[90.922966,36.028927],[90.979017,36.106811],[91.081263,36.088436],[91.124994,36.115514],[91.09235,36.163844],[91.096045,36.219871],[91.051698,36.238215],[91.07264,36.299012],[91.026444,36.323607],[91.051698,36.433946],[91.028292,36.443093],[91.039995,36.474861],[91.035683,36.529703],[91.011662,36.539801],[90.905104,36.560474],[90.831191,36.55807],[90.810865,36.585466],[90.741264,36.585947],[90.72217,36.620058],[90.730793,36.655594],[90.706156,36.658955],[90.720938,36.708868],[90.754815,36.721341],[90.727098,36.755872],[90.732025,36.825844],[90.758511,36.825844],[90.853981,36.915373],[90.924198,36.921115],[90.983944,36.913459],[91.036915,36.929727],[91.051698,36.96751],[91.126842,36.978507],[91.133618,37.007665],[91.181045,37.025345],[91.216153,37.010054],[91.303617,37.012444],[91.291298,37.042544],[91.303617,37.083136],[91.286371,37.105095],[91.280211,37.163779],[91.1909,37.205737],[91.194596,37.273868],[91.134849,37.324331],[91.136081,37.355734],[91.113292,37.387124],[91.099741,37.447965],[91.073256,37.475992],[91.019669,37.493088],[90.958075,37.477891],[90.911879,37.519674],[90.865684,37.53059],[90.882314,37.575664],[90.854597,37.604117],[90.820104,37.613599],[90.777605,37.648672],[90.643946,37.696988],[90.586663,37.703144],[90.579272,37.720661],[90.519526,37.730601],[90.516446,38.207111],[90.531229,38.319886],[90.401882,38.311434],[90.361846,38.300163],[90.352607,38.233441],[90.280542,38.238142],[90.137644,38.340543],[90.179528,38.396848],[90.129636,38.400131],[90.111774,38.418889],[90.111774,38.477945],[90.130868,38.494341],[90.248513,38.491531],[90.315034,38.501835],[90.353222,38.482162],[90.427135,38.493873],[90.465323,38.521971],[90.463476,38.556611],[90.525685,38.561291],[90.560794,38.593573],[90.608837,38.594508],[90.606374,38.610878],[90.645794,38.635191],[90.619308,38.664636],[90.65996,38.674449],[90.724634,38.658094],[90.899561,38.679588],[90.970394,38.697806],[90.992567,38.695003],[91.188436,38.73096],[91.242639,38.752433],[91.298689,38.746365],[91.446515,38.813546],[91.501333,38.815411],[91.681188,38.852706],[91.694738,38.86622],[91.806223,38.872744],[91.87952,38.884391],[91.880752,38.899297],[91.966368,38.930961],[92.10865,38.963541],[92.173323,38.960749],[92.197961,38.983548],[92.263866,39.002153],[92.380279,38.999828],[92.416003,39.010524],[92.41046,39.03842],[92.366728,39.059335],[92.366112,39.096037],[92.343938,39.146181],[92.339011,39.236628],[92.378431,39.258411],[92.52564,39.368611],[92.639589,39.514196],[92.687632,39.657174],[92.745531,39.868331],[92.796654,40.153897],[92.906907,40.310609],[92.920458,40.391792],[92.928465,40.572504],[93.506216,40.648376],[93.760599,40.664721],[93.820961,40.793519],[93.809874,40.879548],[93.908424,40.983539],[94.01067,41.114875],[94.184365,41.268444],[94.534219,41.505966],[94.750413,41.538227],[94.809543,41.619256],[94.861898,41.668451],[94.969072,41.718948],[95.011572,41.726541],[95.110738,41.768513],[95.135991,41.772976],[95.16494,41.735474],[95.199433,41.719395],[95.194505,41.694821],[95.247476,41.61344],[95.299831,41.565994],[95.335556,41.644305],[95.39407,41.693481],[95.445193,41.719841],[95.57146,41.796181],[95.65646,41.826067],[95.759322,41.835878],[95.801206,41.848361],[95.855408,41.849699],[95.998306,41.906289],[96.054973,41.936124],[96.117183,41.985966],[96.137509,42.019765],[96.13874,42.05399],[96.077147,42.149457],[96.178161,42.21775],[96.040806,42.326688],[96.042038,42.352787],[96.06606,42.414674],[95.978596,42.436762],[96.0174,42.482239],[96.02356,42.542675],[96.072219,42.569566],[96.103632,42.604375],[96.166458,42.623314],[96.386348,42.727592]]]]}},{"type":"Feature","properties":{"adcode":710000,"name":"\u53F0\u6E7E\u7701","center":[121.509062,25.044332],"centroid":[120.971485,23.749452],"childrenNum":0,"level":"province","parent":{"adcode":100000},"subFeatureIndex":31,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[120.443706,22.441432],[120.517619,22.408793],[120.569973,22.361757],[120.640806,22.241605],[120.659285,22.154056],[120.661748,22.067007],[120.651277,22.033171],[120.667908,21.983235],[120.701784,21.927174],[120.743052,21.915515],[120.781857,21.923843],[120.854537,21.883309],[120.873016,21.897191],[120.86624,21.984345],[120.907508,22.033171],[120.912436,22.086418],[120.903197,22.12634],[120.914899,22.302525],[120.981421,22.528248],[121.014682,22.584069],[121.03316,22.650914],[121.078739,22.669691],[121.170514,22.723247],[121.21055,22.770711],[121.237652,22.836362],[121.276456,22.877171],[121.324499,22.945526],[121.35468,23.00999],[121.370695,23.084334],[121.409499,23.1025],[121.430441,23.137175],[121.415042,23.196047],[121.440296,23.271937],[121.479716,23.322507],[121.497578,23.419744],[121.5216,23.483431],[121.522832,23.538858],[121.587505,23.760878],[121.621382,23.920718],[121.65957,24.007125],[121.63986,24.064514],[121.643556,24.097843],[121.678048,24.133895],[121.689135,24.174303],[121.809243,24.339083],[121.82649,24.423572],[121.867758,24.47914],[121.88562,24.529784],[121.892395,24.617953],[121.86283,24.671261],[121.841272,24.734329],[121.844968,24.836476],[121.933047,24.938539],[122.012503,25.001471],[121.98109,25.030757],[121.947214,25.031841],[121.917033,25.138076],[121.841888,25.135367],[121.782142,25.160287],[121.745186,25.161912],[121.707613,25.191701],[121.700222,25.226896],[121.655259,25.242054],[121.62323,25.29455],[121.585041,25.309159],[121.53515,25.307535],[121.444607,25.27074],[121.413194,25.238806],[121.371926,25.159746],[121.319572,25.140785],[121.209318,25.12724],[121.132942,25.078466],[121.102145,25.075214],[121.024537,25.040517],[121.009754,24.993878],[120.961095,24.940167],[120.914899,24.864715],[120.89211,24.767482],[120.82374,24.688118],[120.762147,24.658208],[120.68885,24.600542],[120.642654,24.490033],[120.589068,24.43229],[120.546568,24.370159],[120.520698,24.311816],[120.470807,24.242533],[120.451713,24.182493],[120.391967,24.118055],[120.316206,23.984708],[120.278018,23.92783],[120.245989,23.840276],[120.175156,23.807427],[120.102476,23.701162],[120.095084,23.58768],[120.12157,23.504836],[120.108019,23.341191],[120.081534,23.291728],[120.018708,23.073322],[120.029795,23.048544],[120.133272,23.000625],[120.149287,22.896468],[120.20041,22.721039],[120.274323,22.560307],[120.297112,22.531565],[120.443706,22.441432]]],[[[124.542782,25.903886],[124.584666,25.908731],[124.566804,25.941563],[124.542782,25.903886]]],[[[123.445178,25.726102],[123.469816,25.712623],[123.50862,25.722867],[123.512316,25.755212],[123.479055,25.768687],[123.445794,25.749822],[123.445178,25.726102]]],[[[119.646064,23.550928],[119.691028,23.547087],[119.678093,23.600294],[119.61034,23.604132],[119.601717,23.575613],[119.566608,23.584937],[119.562297,23.530627],[119.578927,23.502641],[119.609108,23.503738],[119.646064,23.550928]]],[[[123.666916,25.914114],[123.706952,25.91519],[123.689706,25.939949],[123.666916,25.914114]]],[[[119.506246,23.625518],[119.506246,23.577259],[119.47237,23.556962],[119.519181,23.559705],[119.52534,23.62497],[119.506246,23.625518]]],[[[119.497623,23.38679],[119.495159,23.349982],[119.516717,23.349982],[119.497623,23.38679]]],[[[119.557369,23.666634],[119.608492,23.620035],[119.615268,23.661153],[119.586318,23.675952],[119.557369,23.666634]]],[[[122.066706,25.6247],[122.087032,25.61067],[122.092575,25.639268],[122.066706,25.6247]]],[[[121.468013,22.67687],[121.474788,22.643734],[121.513592,22.631582],[121.514824,22.676318],[121.468013,22.67687]]],[[[121.510513,22.086972],[121.507433,22.048704],[121.533918,22.022076],[121.594281,21.995443],[121.604752,22.022631],[121.575186,22.037055],[121.575802,22.0842],[121.510513,22.086972]]],[[[122.097503,25.499987],[122.110438,25.465952],[122.122141,25.495666],[122.097503,25.499987]]],[[[119.421247,23.216949],[119.436029,23.186146],[119.453275,23.216399],[119.421247,23.216949]]],[[[120.355011,22.327439],[120.395663,22.342385],[120.383344,22.355669],[120.355011,22.327439]]]]}},{"type":"Feature","properties":{"adcode":810000,"name":"\u9999\u6E2F\u7279\u522B\u884C\u653F\u533A","center":[114.173355,22.320048],"centroid":[114.134357,22.377366],"childrenNum":18,"level":"province","parent":{"adcode":100000},"subFeatureIndex":32,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[114.031778,22.503923],[114.000981,22.491206],[113.977575,22.45692],[113.918445,22.418199],[113.920293,22.367845],[113.951706,22.355116],[113.956633,22.359543],[113.980039,22.366185],[114.026234,22.34792],[113.955401,22.298649],[113.969568,22.321349],[113.898119,22.308615],[113.889496,22.271514],[113.8433,22.229418],[113.84946,22.191188],[113.899351,22.215568],[113.935691,22.205041],[113.981271,22.229972],[113.996669,22.206149],[114.026234,22.229418],[114.004676,22.239389],[114.02993,22.263207],[114.034857,22.300864],[114.069966,22.326885],[114.121089,22.320795],[114.145726,22.300864],[114.120473,22.272068],[114.164821,22.226648],[114.200545,22.232188],[114.203009,22.206703],[114.265835,22.200608],[114.248588,22.274837],[114.262139,22.294773],[114.284929,22.263761],[114.313262,22.264315],[114.315726,22.299203],[114.315726,22.299756],[114.278153,22.328546],[114.283081,22.386661],[114.322501,22.385554],[114.323117,22.385554],[114.323733,22.385001],[114.323733,22.384447],[114.356994,22.340171],[114.394566,22.361757],[114.385327,22.41156],[114.406269,22.432582],[114.406269,22.433688],[114.376088,22.436454],[114.325581,22.479041],[114.278769,22.435901],[114.220255,22.427603],[114.205473,22.449729],[114.23319,22.466875],[114.2529,22.445304],[114.340979,22.50337],[114.309566,22.497288],[114.28924,22.52272],[114.263987,22.541515],[114.263371,22.541515],[114.260291,22.547595],[114.232574,22.528801],[114.232574,22.539857],[114.222719,22.553122],[114.166052,22.559201],[114.156813,22.543726],[114.095219,22.534329],[114.082285,22.512216],[114.031778,22.503923]]],[[[114.142647,22.213906],[114.123553,22.238836],[114.120473,22.177888],[114.154965,22.177888],[114.166668,22.205041],[114.142647,22.213906]]],[[[114.305871,22.372273],[114.313878,22.340724],[114.332972,22.353455],[114.305255,22.372826],[114.305871,22.372273]]],[[[114.320037,22.381127],[114.323733,22.384447],[114.323733,22.385001],[114.323117,22.385554],[114.322501,22.385554],[114.319421,22.382234],[114.320037,22.38168],[114.320037,22.381127]]],[[[114.305871,22.369506],[114.305871,22.372273],[114.305255,22.372826],[114.305871,22.369506]]],[[[114.315726,22.299203],[114.316958,22.298649],[114.316342,22.30031],[114.315726,22.299756],[114.315726,22.299203]]],[[[114.319421,22.382234],[114.320037,22.381127],[114.320037,22.38168],[114.319421,22.382234]]],[[[114.372392,22.32301],[114.373008,22.323564],[114.372392,22.323564],[114.372392,22.32301]]],[[[114.323733,22.297541],[114.324349,22.297541],[114.323733,22.298095],[114.323733,22.297541]]]]}},{"type":"Feature","properties":{"adcode":820000,"name":"\u6FB3\u95E8\u7279\u522B\u884C\u653F\u533A","center":[113.54909,22.198951],"centroid":[113.566988,22.159307],"childrenNum":8,"level":"province","parent":{"adcode":100000},"subFeatureIndex":33,"acroutes":[100000]},"geometry":{"type":"MultiPolygon","coordinates":[[[[113.554425,22.107489],[113.6037,22.132438],[113.575983,22.194513],[113.558736,22.212244],[113.53841,22.209473],[113.534715,22.174009],[113.554425,22.142416],[113.554425,22.107489]]],[[[113.586453,22.201162],[113.575983,22.201162],[113.575983,22.194513],[113.586453,22.201162]]]]}},{"type":"Feature","properties":{"name":"","adchar":"JD","adcode":"100000_JD"},"geometry":{"type":"MultiPolygon","coordinates":[[[[122.51865306,23.46078502],[122.79861399,24.57367379],[122.79889322,24.57678999],[122.79819583,24.57983997],[122.79659008,24.58252516],[122.79423315,24.58458272],[122.79135575,24.58581125],[122.78823955,24.58609049],[122.78518957,24.5853931],[122.78250438,24.58378734],[122.78044682,24.58143041],[122.77921829,24.57855302],[122.49925737,23.46566424],[122.49897813,23.46254804],[122.49967552,23.45949807],[122.50128127,23.45681287],[122.5036382,23.45475531],[122.5065156,23.45352678],[122.50963181,23.45324755],[122.51268178,23.45394494],[122.51536697,23.45555069],[122.51742454,23.45790762],[122.51865306,23.46078502]]],[[[121.17202617,20.8054593],[121.90938804,21.68743347],[121.9109946,21.69011818],[121.91169291,21.69316794],[121.91141462,21.69628423],[121.91018696,21.699162],[121.9081301,21.70151955],[121.9054454,21.70312611],[121.90239563,21.70382443],[121.89927934,21.70354613],[121.89640158,21.70231847],[121.89404403,21.70026162],[121.15668216,20.81828744],[121.1550756,20.81560273],[121.15437729,20.81255297],[121.15465558,20.80943668],[121.15588324,20.80655891],[121.1579401,20.80420136],[121.1606248,20.8025948],[121.16367457,20.80189649],[121.16679085,20.80217478],[121.16966862,20.80340244],[121.17202617,20.8054593]]],[[[119.47366172,18.00707291],[120.02569734,19.02403788],[120.02674143,19.02698721],[120.02682302,19.03011484],[120.02593412,19.0331146],[120.02416175,19.03569286],[120.02167941,19.03759723],[120.01873007,19.03864132],[120.01560245,19.03872291],[120.01260269,19.03783401],[120.01002443,19.03606165],[120.00812005,19.0335793],[119.45608443,18.01661433],[119.45504035,18.01366499],[119.45495876,18.01053737],[119.45584765,18.00753761],[119.45762002,18.00495935],[119.46010237,18.00305497],[119.4630517,18.00201089],[119.46617933,18.0019293],[119.46917909,18.0028182],[119.47175735,18.00459056],[119.47366172,18.00707291]]],[[[119.0726757,15.04098494],[119.0726757,16.04388528],[119.07218626,16.04697545],[119.07076587,16.04976313],[119.06855355,16.05197545],[119.06576587,16.05339584],[119.0626757,16.05388528],[119.05958553,16.05339584],[119.05679784,16.05197545],[119.05458553,16.04976313],[119.05316513,16.04697545],[119.0526757,16.04388528],[119.0526757,15.04105889],[119.0521839,15.00781004],[119.05262758,15.00471297],[119.05400659,15.00190458],[119.05618595,14.99965979],[119.05895232,14.99819832],[119.06203491,14.99766324],[119.06513198,14.99810691],[119.06794036,14.99948592],[119.07018516,15.00166528],[119.07164663,15.00443165],[119.07218171,15.00751424],[119.0726746,15.04083704],[119.0726757,15.04098494]]],[[[118.68646749,11.18959191],[118.52518702,10.91547751],[118.52404181,10.91256595],[118.52385237,10.909443],[118.52463726,10.90641436],[118.52631962,10.9037765],[118.5287348,10.90178762],[118.53164636,10.90064241],[118.53476931,10.90045298],[118.53779795,10.90123786],[118.54043581,10.90292022],[118.54242469,10.9053354],[118.70409227,11.18010771],[118.70476212,11.18147468],[118.87431591,11.606662],[118.87459939,11.60747236],[118.98894963,11.98573108],[118.98937534,11.98883067],[118.9888224,11.99191011],[118.98734492,11.99466796],[118.98508753,11.99683427],[118.98227119,11.99819697],[118.9791716,11.99862269],[118.97609216,11.99806975],[118.97333431,11.99659227],[118.97116801,11.99433487],[118.9698053,11.99151854],[118.85557939,11.6136711],[118.68646749,11.18959191]]],[[[115.54466883,7.14672265],[116.2504858,7.979279],[116.25211077,7.98195261],[116.25283001,7.9849975],[116.25257312,7.98811563],[116.25136525,7.99100176],[116.24932463,7.99337338],[116.24665102,7.99499834],[116.24360613,7.99571758],[116.240488,7.99546069],[116.23760187,7.99425282],[116.23523025,7.99221221],[115.52941328,7.15965587],[115.52778832,7.15698226],[115.52706908,7.15393736],[115.52732596,7.15081924],[115.52853383,7.1479331],[115.53057445,7.14556148],[115.53324806,7.14393652],[115.53629295,7.14321728],[115.53941108,7.14347417],[115.54229721,7.14468204],[115.54466883,7.14672265]]],[[[112.30705249,3.53487257],[111.78690114,3.41687263],[111.78399583,3.41571167],[111.78159146,3.41370973],[111.77992341,3.41106279],[111.77915495,3.40802995],[111.77936129,3.40490807],[111.78052226,3.40200275],[111.78252419,3.39959839],[111.78517113,3.39793033],[111.78820398,3.39716187],[111.79132585,3.39736822],[112.31181658,3.51544515],[112.31248917,3.51562254],[112.52147408,3.5785908],[112.52281386,3.57910186],[112.85206367,3.73256867],[112.85465776,3.7343178],[112.85658437,3.73678292],[112.85765492,3.73972276],[112.85776462,3.74284952],[112.85690272,3.74585715],[112.8551536,3.74845124],[112.85268847,3.75037785],[112.84974864,3.7514484],[112.84662187,3.75155809],[112.84361424,3.7506962],[112.51501594,3.59753306],[112.30705249,3.53487257]]],[[[108.26055972,6.08912451],[108.29013305,6.01266273],[108.29170425,6.00995718],[108.29403462,6.00786957],[108.29689603,6.00660426],[108.3000084,6.00628511],[108.30306706,6.00694335],[108.30577262,6.00851455],[108.30786022,6.01084492],[108.30912553,6.01370633],[108.30944469,6.0168187],[108.30878645,6.01987736],[108.279563,6.09543449],[108.25611734,6.22752625],[108.21679964,6.53816468],[108.21876335,6.94964057],[108.24419535,7.07390742],[108.24433543,7.07703297],[108.24350281,7.08004883],[108.24177899,7.0826598],[108.2393327,7.08461028],[108.23640341,7.08570936],[108.23327786,7.08584944],[108.230262,7.08501682],[108.22765103,7.083293],[108.22570055,7.08084671],[108.22460147,7.07791743],[108.19897125,6.95268198],[108.1987683,6.95072469],[108.19679674,6.53760583],[108.19687578,6.53630242],[108.23630689,6.22476797],[108.23638164,6.22427602],[108.26004031,6.09098419],[108.26055972,6.08912451]]],[[[110.12822847,11.36894451],[110.05553696,11.25335394],[110.05430621,11.25047749],[110.05402458,11.2473615],[110.05471962,11.24431099],[110.05632331,11.24162456],[110.05867865,11.23956519],[110.0615551,11.23833444],[110.06467109,11.23805281],[110.0677216,11.23874785],[110.07040803,11.24035153],[110.07246741,11.24270688],[110.14541497,11.35870461],[110.14588682,11.35954163],[110.20700505,11.48128846],[110.20728377,11.48189306],[110.25854422,11.60358735],[110.25901765,11.60499559],[110.30436343,11.7826124],[110.30456934,11.78364161],[110.32822801,11.94571326],[110.32832827,11.94685414],[110.33424294,12.14159753],[110.33424553,12.14210167],[110.33227398,12.24038351],[110.33172267,12.24346324],[110.33024665,12.24622187],[110.3279904,12.24838938],[110.32517479,12.24975358],[110.32207543,12.25018094],[110.3189957,12.24962962],[110.31623706,12.2481536],[110.31406956,12.24589736],[110.31270536,12.24308175],[110.312278,12.23998238],[110.3142445,12.14195265],[110.3083549,11.94803461],[110.28485499,11.78705054],[110.23982347,11.61066468],[110.18898148,11.48996382],[110.12822847,11.36894451]]],[[[109.82951587,15.22896754],[109.84522534,15.15316562],[109.84633168,15.15023907],[109.84828823,15.14779763],[109.85090347,15.14608029],[109.85392139,15.14525516],[109.85704658,15.145403],[109.85997314,15.14650935],[109.86241457,15.1484659],[109.86413191,15.15108113],[109.86495704,15.15409906],[109.8648092,15.15722425],[109.84903675,15.23333003],[109.84889209,15.23393326],[109.78974541,15.45068337],[109.7892391,15.45210582],[109.69066131,15.67432448],[109.6900529,15.67548445],[109.59147511,15.83677407],[109.59116145,15.8372556],[109.53201478,15.92259221],[109.53166592,15.92306523],[109.30888011,16.20725797],[109.30658844,16.20938798],[109.30375073,16.21070558],[109.30064474,16.21108179],[109.29757451,16.21047978],[109.29484059,16.20895848],[109.29271057,16.20666681],[109.29139298,16.2038291],[109.29101677,16.20072311],[109.29161878,16.19765288],[109.29314007,16.19491896],[109.51574449,15.91095759],[109.57455994,15.82609887],[109.67264555,15.66561455],[109.77065019,15.44468789],[109.82951587,15.22896754]]]]}}]}'),F1=r(91511),S1=function(){var n=(0,f.useState)(!1),t=F()(n,2),a=t[0],c=t[1],o=(0,f.useState)({type:"FeatureCollection",features:[]}),i=F()(o,2),s=i[0],h=i[1],x=(0,f.useState)(),d=F()(x,2),u=d[0],j=d[1];(0,b.Z)(Z()(y()().mark(function m(){var p,l;return y()().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:u&&(c(!0),p=u.startTime,l=u.endTime,console.log(p,l),Q.features.forEach(function(N){N.properties.count=Math.round(Math.random()*100)}),h(Q),setTimeout(function(){c(!1)},90));case 1:case"end":return C.stop()}},m)})),[u]);var T={map:{type:"mapbox",style:"blank",minZoom:1.6,pitch:0,dragPan:!1,scrollZoom:!1,doubleClickZoom:!1},source:{data:s,parser:{type:"geojson"}},autoFit:!0,color:{field:"count",value:["#6296FE","#7EA6F9","#98B7F7","#BDD0F8","#DDE6F7","#F2F5FC"],scale:{type:"quantile"}},style:{opacity:1,stroke:"#fff",lineWidth:.6,lineOpacity:1},state:{active:!0},label:{visible:!0,field:"name",style:{fill:"#000",opacity:1,fontSize:10,stroke:"#fff",strokeWidth:1.5,textAllowOverlap:!1,padding:[3,3]}},legend:!1,tooltip:{items:["name","name_zh","pop_est"]}};return(0,e.jsx)(k.Z,{title:"\u767B\u5F55\u4F4D\u7F6E\u5206\u5E03",headerBordered:!0,extra:(0,e.jsx)(D,{type:"today",onChange:function(p,l){j({startTime:p,endTime:l})}}),children:(0,e.jsx)(V.Z,{loading:a,active:!0,paragraph:{rows:7},children:(0,e.jsx)("div",{style:{height:280},children:!a&&(0,e.jsx)(F1.Z,v()({},T))})})})},j1=r(79611),P1=function(){var n=(0,f.useState)(!1),t=F()(n,2),a=t[0],c=t[1],o=(0,f.useState)([]),i=F()(o,2),s=i[0],h=i[1],x=(0,f.useState)(),d=F()(x,2),u=d[0],j=d[1];(0,b.Z)(Z()(y()().mark(function m(){var p,l,P,C,N;return y()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(!u){g.next=10;break}return p=u.startTime,l=u.endTime,c(!0),g.next=5,s1(p,l);case 5:P=g.sent,C=P.result,N=P.success,N&&h(C),setTimeout(function(){c(!1)},90);case 10:case"end":return g.stop()}},m)})),[u]);var T={height:300,minBarWidth:25,maxBarWidth:35,data:s,xField:"count",yField:"name",label:{position:"middle",style:{fill:"#FFFFFF",opacity:.6}},xAxis:{label:{autoHide:!0,autoRotate:!1}},barWidthRatio:.8,meta:{name:{alias:"\u5E94\u7528\u540D\u79F0"},count:{alias:"\u8BBF\u95EE\u6B21\u6570"}}};return(0,e.jsx)(k.Z,{title:"\u5E94\u7528\u8BBF\u95EE\u6392\u540D\uFF08\u524D\u5341\uFF09",headerBordered:!0,extra:(0,e.jsx)(D,{type:"today",onChange:function(p,l){j({startTime:p,endTime:l})}}),children:(0,e.jsx)(V.Z,{loading:a,active:!0,paragraph:{rows:7},children:(0,e.jsx)(j1.Z,v()({},T))})})},C1=r(78677),Z1=function(){var n=(0,f.useState)(!1),t=F()(n,2),a=t[0],c=t[1],o=(0,f.useState)([]),i=F()(o,2),s=i[0],h=i[1],x=(0,f.useState)(),d=F()(x,2),u=d[0],j=d[1];(0,b.Z)(Z()(y()().mark(function m(){var p,l,P,C,N;return y()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(!u){g.next=10;break}return p=u.startTime,l=u.endTime,c(!0),g.next=5,o1(p,l);case 5:P=g.sent,C=P.result,N=P.success,N&&h(C),setTimeout(function(){c(!1)},90);case 10:case"end":return g.stop()}},m)})),[u]);var T={height:300,data:s,isGroup:!0,xField:"name",yField:"count",seriesField:"status",marginRatio:.1,color:function(p){var l=p.status;return l==="\u6210\u529F"?"#5B8FF9":"#F4664A"},label:{position:"middle",layout:[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"}]},minColumnWidth:25,maxColumnWidth:35};return(0,e.jsx)(k.Z,{title:"\u8BA4\u8BC1\u91CF",headerBordered:!0,extra:(0,e.jsx)(D,{type:"today",onChange:function(p,l){j({startTime:p,endTime:l})}}),children:(0,e.jsx)(V.Z,{loading:a,active:!0,paragraph:{rows:7},children:(0,e.jsx)(C1.Z,v()({},T))})})},$={xs:24,sm:24,md:12,lg:12,xl:12,style:{marginBottom:24}},M1=function(){return(0,e.jsxs)(K.f,{style:{height:"100%"},children:[(0,e.jsx)(l1,{}),(0,e.jsxs)(O.Z,{gutter:[24,24],children:[(0,e.jsx)(I.Z,v()(v()({},$),{},{children:(0,e.jsx)(Z1,{})})),(0,e.jsx)(I.Z,v()(v()({},$),{},{children:(0,e.jsx)(P1,{})}))]}),(0,e.jsxs)(O.Z,{gutter:[24,24],children:[(0,e.jsx)(I.Z,v()(v()({},$),{},{children:(0,e.jsx)(x1,{})})),(0,e.jsx)(I.Z,v()(v()({},$),{},{children:(0,e.jsx)(S1,{})}))]})]})}}}]); diff --git a/eiam-console/src/main/resources/fe/p__other__SessionList__index.2df68fa1.async.js b/eiam-console/src/main/resources/fe/p__other__SessionList__index.2df68fa1.async.js new file mode 100644 index 00000000..a5e368da --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__other__SessionList__index.2df68fa1.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[1391],{96664:function(O,E,r){r.r(E),r.d(E,{default:function(){return $}});var T=r(11281),D=r.n(T),R=r(97983),l=r.n(R),S=r(40794),f=r.n(S),g=r(35811);function I(i){return p.apply(this,arguments)}function p(){return p=f()(l()().mark(function i(d){return l()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,g.WY)("/api/session/list",{method:"GET",params:d}).then(function(n){var e={data:n!=null&&n.result?n==null?void 0:n.result:[],success:n==null?void 0:n.success};return Promise.resolve(e)}));case 1:case"end":return t.stop()}},i)})),p.apply(this,arguments)}function F(i){return m.apply(this,arguments)}function m(){return m=f()(l()().mark(function i(d){return l()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,g.WY)("/api/session/remove",{method:"DELETE",params:{sessionIds:d}}));case 1:case"end":return t.stop()}},i)})),m.apply(this,arguments)}var y=r(25035),L=r(14459),w=r(1914),C=r(76521),x=r(86738),B=r(2453),A=r(27414),j=r(26713),Z=r(67294),u=r(85893),P=function(){var i=(0,Z.useRef)(),d=[{title:"\u4F1A\u8BDD ID",dataIndex:"sessionId",ellipsis:!0,copyable:!0,align:"center",width:150,fixed:"left",search:!1},{title:"\u7528\u6237\u540D",dataIndex:"username",ellipsis:!0,width:120,fieldProps:{autoComplete:"off"}},{title:"\u6D3B\u52A8IP\u5730\u5740",width:130,dataIndex:"ip",ellipsis:!0,search:!1,render:function(t,n){var e=n.geoLocation;return e!=null&&e.ip?(0,u.jsx)(C.Z,{status:"success",text:e.ip}):(0,u.jsx)(C.Z,{status:"error",text:"\u672A\u77E5"})}},{title:"\u6D3B\u52A8\u5730\u70B9",width:120,ellipsis:!0,search:!1,render:function(t,n){var e=n.geoLocation;return e&&(e==null?void 0:e.country)&&(e==null?void 0:e.province)&&(e==null?void 0:e.city)&&(e==null?void 0:e.country)+"."+(e==null?void 0:e.province)+"."+(e==null?void 0:e.city)||"-"}},{title:"\u8BBE\u5907\u7C7B\u578B",ellipsis:!0,width:110,search:!1,render:function(t,n){var e=n.userAgent;return(e==null?void 0:e.deviceType)||"-"}},{title:"\u64CD\u4F5C\u7CFB\u7EDF",ellipsis:!0,width:110,search:!1,render:function(t,n){var e=n.userAgent;return(e==null?void 0:e.platform)+" "+(e==null?void 0:e.platformVersion)||"-"}},{title:"\u6D4F\u89C8\u5668",ellipsis:!0,width:110,search:!1,render:function(t,n){var e=n.userAgent;return(e==null?void 0:e.browser)+" "+(e==null?void 0:e.browserMajorVersion)||"-"}},{title:"\u767B\u5F55\u65F6\u95F4",ellipsis:!0,dataIndex:"loginTime",align:"center",width:200,valueType:"dateTime",search:!1},{title:"\u6700\u540E\u64CD\u4F5C\u65F6\u95F4",ellipsis:!0,dataIndex:"lastRequest",width:170,valueType:"dateTime",search:!1},{title:"\u64CD\u4F5C",valueType:"option",width:60,align:"center",fixed:"right",render:function(t,n){return[(0,u.jsx)(x.Z,{title:"\u60A8\u786E\u5B9A\u8981\u4E0B\u7EBF\u8BE5\u7528\u6237\u5417\uFF1F",placement:"bottomRight",icon:(0,u.jsx)(y.Z,{style:{color:"red"}}),onConfirm:f()(l()().mark(function e(){var c,o,h;return l()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,F(n.sessionId);case 2:c=v.sent,o=c.success,o&&(B.ZP.success("\u64CD\u4F5C\u6210\u529F"),(h=i.current)===null||h===void 0||h.reload());case 5:case"end":return v.stop()}},e)})),okText:"\u662F",cancelText:"\u5426",children:(0,u.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u4E0B\u7EBF"},"remove")},"offline")]}}];return(0,u.jsx)(L._z,{content:(0,u.jsx)(u.Fragment,{children:(0,u.jsx)("span",{children:"\u4F1A\u8BDD\u7BA1\u7406\u53EF\u4EE5\u67E5\u770B\u6240\u6709\u5F53\u524D\u4ECD\u7136\u6709\u6548\u7684\u4F1A\u8BDD\u5217\u8868\uFF0C\u5E76\u4E14\u53EF\u4EE5\u5F3A\u5236\u6CE8\u9500\u67D0\u4E2A\u7528\u6237\u7684\u4F1A\u8BDD\u3002\u6CE8\u9500\u540E\uFF0C\u8BE5\u7528\u6237\u51ED\u8BC1\u5373\u523B\u5931\u6548\uFF0C\u4E4B\u540E\u7684\u6240\u6709\u64CD\u4F5C\u90FD\u9700\u8981\u91CD\u65B0\u8BA4\u8BC1\u3002"})}),children:(0,u.jsx)(w.Z,{options:{density:!1,setting:!0,reload:!0},cardProps:{style:{overflow:"auto"}},scroll:{x:700},search:{},columns:d,rowSelection:{selections:[A.Z.SELECTION_ALL,A.Z.SELECTION_INVERT]},tableAlertRender:function(t){var n=t.selectedRowKeys,e=t.onCleanSelected;return(0,u.jsx)(j.Z,{size:24,children:(0,u.jsxs)("span",{children:["\u5DF2\u9009 ",n.length," \u9879",(0,u.jsx)("a",{style:{marginLeft:8},onClick:e,children:"\u53D6\u6D88\u9009\u62E9"})]})})},tableAlertOptionRender:function(t){return(0,u.jsx)(j.Z,{size:16,children:(0,u.jsx)(x.Z,{title:"\u60A8\u786E\u5B9A\u8981\u6279\u91CF\u4E0B\u7EBF\u9009\u4E2D\u7528\u6237\u5417\uFF1F",placement:"bottomRight",icon:(0,u.jsx)(y.Z,{style:{color:"red"}}),onConfirm:f()(l()().mark(function n(){var e,c,o;return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,F(t.selectedRowKeys.join(","));case 2:e=a.sent,c=e.success,c&&(B.ZP.success("\u64CD\u4F5C\u6210\u529F"),t.onCleanSelected(),(o=i.current)===null||o===void 0||o.reload());case 5:case"end":return a.stop()}},n)})),okText:"\u662F",cancelText:"\u5426",children:(0,u.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u6279\u91CF\u4E0B\u7EBF"},"remove")},"offline")})},actionRef:i,pagination:{defaultPageSize:10},form:{syncToUrl:function(t,n){return n==="get"?D()({},t):t}},request:I,rowKey:"sessionId",dateFormatter:"string"})})},$=P}}]); diff --git a/eiam-console/src/main/resources/fe/p__setting__Administrator__index.20ad7016.async.js b/eiam-console/src/main/resources/fe/p__setting__Administrator__index.20ad7016.async.js new file mode 100644 index 00000000..4f5b9e98 --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__setting__Administrator__index.20ad7016.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[625],{28058:function(ee,J,n){n.d(J,{Z:function(){return g}});var P=n(1413),x=n(67294),R={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"},l=R,z=n(84089),d=function(c,m){return x.createElement(z.Z,(0,P.Z)((0,P.Z)({},c),{},{ref:m,icon:l}))};d.displayName="WarningOutlined";var g=x.forwardRef(d)},5966:function(ee,J,n){var P=n(1413),x=n(91),R=n(85893),l=n(7772),z=["fieldProps","proFieldProps"],d=["fieldProps","proFieldProps"],g="text",a=function(y){var A=y.fieldProps,G=y.proFieldProps,o=(0,x.Z)(y,z);return(0,R.jsx)(l.Z,(0,P.Z)({valueType:g,fieldProps:A,filedConfig:{valueType:g},proFieldProps:G},o))},c=function(y){var A=y.fieldProps,G=y.proFieldProps,o=(0,x.Z)(y,d);return(0,R.jsx)(l.Z,(0,P.Z)({valueType:"password",fieldProps:A,proFieldProps:G,filedConfig:{valueType:g}},o))},m=a;m.Password=c,m.displayName="ProFormComponent",J.Z=m},90672:function(ee,J,n){var P=n(1413),x=n(91),R=n(85893),l=n(67294),z=n(7772),d=["fieldProps","proFieldProps"],g=function(c,m){var i=c.fieldProps,y=c.proFieldProps,A=(0,x.Z)(c,d);return(0,R.jsx)(z.Z,(0,P.Z)({ref:m,valueType:"textarea",fieldProps:i,proFieldProps:y},A))};J.Z=l.forwardRef(g)},21084:function(ee,J,n){n.d(J,{Z:function(){return z}});var P=n(98293),x=n(78613),R=n(85893),l=function(d){var g=d.avatar,a=d.username;return(0,R.jsx)(R.Fragment,{children:g?(0,R.jsx)(P.C,{size:"small",src:(0,R.jsx)(x.Z,{src:g,fallback:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="})}):(0,R.jsx)(P.C,{style:{color:"#f56a00",backgroundColor:"#fde3cf",verticalAlign:"middle"},size:"small",gap:1,children:a.substring(0,1).toLocaleUpperCase()})})},z=l},55309:function(ee,J,n){n.r(J),n.d(J,{default:function(){return ye}});var P=n(11281),x=n.n(P),R=n(97983),l=n.n(R),z=n(40794),d=n.n(z),g=n(12741),a=n.n(g),c=n(62387),m=n(28058),i=n(25035),y=n(24969),A=n(14459),G=n(1914),o=n(69400),D=n(26713),W=n(76521),ie=n(72269),H=n(2453),ae=n(86738),Ae=n(27414),be=n(71577),T=n(67294),se=n(37476),S=n(5966),ue=n(90672),le=n(57953),t=n(85893),ve={labelCol:{span:4},wrapperCol:{span:19}},me=function(e){var r=(0,T.useRef)(),p=(0,T.useState)(!1),E=a()(p,2),Q=E[0],F=E[1],Y=e.visible,N=e.onCancel,X=e.onFinish;return(0,t.jsx)(se.Y,x()(x()({title:"\u6DFB\u52A0\u7BA1\u7406\u5458",width:"500px"},ve),{},{preserve:!1,layout:"horizontal",autoFocusFirstInput:!0,formRef:r,open:Y,modalProps:{destroyOnClose:!0,onCancel:N},onFinish:function(){var k=d()(l()().mark(function w(C){var U,j,b;return l()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(F(!0),f.prev=1,U=C.phone,j=C.email,!(!U&&!j)){f.next=6;break}return H.ZP.warning("\u624B\u673A\u53F7\u6216\u90AE\u7BB1\u81F3\u5C11\u586B\u5199\u4E00\u4E2A"),f.abrupt("return",Promise.resolve(!1));case 6:return f.next=8,X(C);case 8:if(b=f.sent,!b){f.next=11;break}return f.abrupt("return",Promise.resolve(!0));case 11:return f.abrupt("return",Promise.resolve(!1));case 12:return f.prev=12,F(!1),f.finish(12);case 15:case"end":return f.stop()}},w,null,[[1,,12,15]])}));return function(w){return k.apply(this,arguments)}}(),children:(0,t.jsxs)(le.Z,{spinning:Q,children:[(0,t.jsx)(S.Z,{name:"username",label:"\u7528\u6237\u540D",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D",rules:[{required:!0,message:"\u7528\u6237\u540D\u4E3A\u5FC5\u586B\u9879"},{pattern:new RegExp("^[a-zA-Z][a-zA-Z0-9_]{3,15}$"),message:"\u7528\u6237\u540D\u683C\u5F0F\u4E0D\u5408\u6CD5"},{validator:function(){var k=d()(l()().mark(function C(U,j){var b,Z,f;return l()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(j){s.next=2;break}return s.abrupt("return",Promise.resolve());case 2:return s.next=4,(0,c.NK)("USERNAME",j);case 4:if(b=s.sent,Z=b.success,f=b.result,Z){s.next=9;break}return s.abrupt("return",Promise.reject());case 9:if(f){s.next=11;break}return s.abrupt("return",Promise.reject(new Error("\u7528\u6237\u540D\u5DF2\u5B58\u5728")));case 11:case"end":return s.stop()}},C)}));function w(C,U){return k.apply(this,arguments)}return w}(),validateTrigger:["onBlur"]}],extra:"\u8D26\u6237\u540D\u79F0\u4E0D\u80FD\u4EE5\u7279\u6B8A\u5B57\u7B26\u5F00\u59CB\uFF0C\u53EF\u5305\u542B\u5927\u5199\u5B57\u6BCD\u3001\u5C0F\u5199\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u4E2D\u5212\u7EBF(-)\u3001\u4E0B\u5212\u7EBF(_)\u3001\u957F\u5EA6\u81F3\u5C11 4 \u4F4D"}),(0,t.jsx)(S.Z.Password,{name:"password",label:"\u767B\u5F55\u5BC6\u7801",placeholder:"\u8BF7\u8F93\u5165\u767B\u5F55\u5BC6\u7801",fieldProps:{autoComplete:"new-password"},rules:[{required:!0,message:"\u767B\u5F55\u5BC6\u7801\u4E3A\u5FC5\u586B\u9879"}]}),(0,t.jsx)(S.Z,{name:"phone",label:"\u624B\u673A\u53F7",placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7",rules:[{pattern:new RegExp(/^1[3-9]\d{9}$/),message:"\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u6B63\u786E"},{validator:function(){var k=d()(l()().mark(function C(U,j){var b,Z,f;return l()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(j){s.next=2;break}return s.abrupt("return",Promise.resolve());case 2:return s.next=4,(0,c.NK)("PHONE",j);case 4:if(b=s.sent,Z=b.success,f=b.result,Z){s.next=9;break}return s.abrupt("return",Promise.reject());case 9:if(f){s.next=11;break}return s.abrupt("return",Promise.reject(new Error("\u624B\u673A\u53F7\u5DF2\u5B58\u5728")));case 11:case"end":return s.stop()}},C)}));function w(C,U){return k.apply(this,arguments)}return w}(),validateTrigger:["onBlur"]}],extra:"\u624B\u673A\u53F7\u6216\u90AE\u7BB1\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u3002"}),(0,t.jsx)(S.Z,{name:"email",label:"\u90AE\u7BB1",placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1",rules:[{type:"email",message:"\u90AE\u7BB1\u683C\u5F0F\u4E0D\u6B63\u786E"},{validator:function(){var k=d()(l()().mark(function C(U,j){var b,Z,f;return l()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(j){s.next=2;break}return s.abrupt("return",Promise.resolve());case 2:return s.next=4,(0,c.NK)("EMAIL",j);case 4:if(b=s.sent,Z=b.success,f=b.result,!(Z&&!f)){s.next=9;break}return s.abrupt("return",Promise.reject(new Error("\u90AE\u7BB1\u5DF2\u5B58\u5728")));case 9:case"end":return s.stop()}},C)}));function w(C,U){return k.apply(this,arguments)}return w}(),validateTrigger:["onBlur"]}],extra:"\u624B\u673A\u53F7\u6216\u90AE\u7BB1\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u3002"}),(0,t.jsx)(ue.Z,{name:"remark",fieldProps:{rows:2},placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8",label:"\u5907\u6CE8"})]})}))},oe=n(71975),de=n(2093),ce=n(21687),Be={labelCol:{span:4},wrapperCol:{span:19}},he=function(e){var r=e.visible,p=e.onCancel,E=e.id,Q=(0,T.useState)(!1),F=a()(Q,2),Y=F[0],N=F[1],X=(0,T.useRef)();return(0,de.Z)(d()(l()().mark(function k(){return l()().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:r&&E&&(N(!0),(0,c.QB)(E).then(function(U){var j;U.success&&U.result&&((j=X.current)===null||j===void 0||j.setFieldsValue(U.result)),N(!1)}));case 1:case"end":return C.stop()}},k)})),[r,E]),(0,t.jsx)(oe.a,x()(x()({title:"\u7BA1\u7406\u5458\u8BE6\u60C5",width:"600px"},Be),{},{formRef:X,preserve:!1,layout:"horizontal",labelAlign:"left",autoFocusFirstInput:!0,open:r,submitter:!1,drawerProps:{destroyOnClose:!0,onClose:p},children:(0,t.jsxs)(ce.Z,{loading:Y,paragraph:{rows:5},children:[(0,t.jsx)(S.Z,{name:"id",label:"\u7528\u6237ID",readonly:!0}),(0,t.jsx)(S.Z,{name:"username",label:"\u7528\u6237\u540D",readonly:!0}),(0,t.jsx)(S.Z,{name:"phone",label:"\u624B\u673A\u53F7",readonly:!0}),(0,t.jsx)(S.Z,{name:"email",label:"\u90AE\u7BB1",readonly:!0}),(0,t.jsx)(ue.Z,{name:"remark",readonly:!0,fieldProps:{rows:2},label:"\u5907\u6CE8"})]})}))},fe={labelCol:{span:4},wrapperCol:{span:19}},Ce=function(e){var r=e.visible,p=e.onCancel,E=e.onFinish,Q=e.id,F=(0,T.useRef)(),Y=(0,T.useState)(!1),N=a()(Y,2),X=N[0],k=N[1],w=(0,T.useState)(!1),C=a()(w,2),U=C[0],j=C[1];return(0,de.Z)(d()(l()().mark(function b(){return l()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:r&&Q&&(j(!0),(0,c.QB)(Q).then(function(M){var s;M.success&&M.result&&((s=F.current)===null||s===void 0||s.setFieldsValue(M.result)),j(!1)}));case 1:case"end":return f.stop()}},b)})),[r,Q]),(0,t.jsx)(se.Y,x()(x()({title:"\u4FEE\u6539\u7BA1\u7406\u5458",width:"500px"},fe),{},{formRef:F,preserve:!1,layout:"horizontal",autoFocusFirstInput:!0,open:r,modalProps:{destroyOnClose:!0,onCancel:p},onFinish:function(){var b=d()(l()().mark(function Z(f){var M,s;return l()().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(k(!0),B.prev=1,M=f.phone,s=f.email,!(!M&&!s)){B.next=7;break}return B.next=6,H.ZP.warning("\u624B\u673A\u53F7\u6216\u90AE\u7BB1\u81F3\u5C11\u586B\u5199\u4E00\u4E2A");case 6:return B.abrupt("return",!1);case 7:return B.next=9,E(f);case 9:return B.abrupt("return",B.sent);case 10:return B.prev=10,k(!1),B.finish(10);case 13:case"end":return B.stop()}},Z,null,[[1,,10,13]])}));return function(Z){return b.apply(this,arguments)}}(),children:(0,t.jsx)(ce.Z,{loading:U,active:!0,children:(0,t.jsxs)(le.Z,{spinning:X,children:[(0,t.jsx)(S.Z,{name:"id",hidden:!0}),(0,t.jsx)(S.Z,{name:"username",label:"\u7528\u6237\u540D",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D",readonly:!0}),(0,t.jsx)(S.Z,{name:"phone",label:"\u624B\u673A\u53F7",placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7",rules:[{pattern:new RegExp(/^1[3-9]\d{9}$/),message:"\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u6B63\u786E"},{validator:function(){var b=d()(l()().mark(function f(M,s){var $,B,re;return l()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(s){u.next=2;break}return u.abrupt("return",Promise.resolve());case 2:return u.next=4,(0,c.NK)("PHONE",s,Q);case 4:if($=u.sent,B=$.success,re=$.result,B){u.next=9;break}return u.abrupt("return",Promise.reject());case 9:if(re){u.next=11;break}return u.abrupt("return",Promise.reject(new Error("\u624B\u673A\u53F7\u5DF2\u5B58\u5728")));case 11:case"end":return u.stop()}},f)}));function Z(f,M){return b.apply(this,arguments)}return Z}(),validateTrigger:["onBlur"]}],extra:"\u624B\u673A\u53F7\u6216\u90AE\u7BB1\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u3002"}),(0,t.jsx)(S.Z,{name:"email",label:"\u90AE\u7BB1",placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1",rules:[{type:"email",message:"\u90AE\u7BB1\u683C\u5F0F\u4E0D\u6B63\u786E"},{validator:function(){var b=d()(l()().mark(function f(M,s){var $,B,re;return l()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(s){u.next=2;break}return u.abrupt("return",Promise.resolve());case 2:return u.next=4,(0,c.NK)("EMAIL",s,Q);case 4:if($=u.sent,B=$.success,re=$.result,B){u.next=9;break}return u.abrupt("return",Promise.reject());case 9:if(re){u.next=11;break}return u.abrupt("return",Promise.reject(new Error("\u90AE\u7BB1\u5DF2\u5B58\u5728")));case 11:case"end":return u.stop()}},f)}));function Z(f,M){return b.apply(this,arguments)}return Z}(),validateTrigger:["onBlur"]}],extra:"\u624B\u673A\u53F7\u6216\u90AE\u7BB1\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u3002"}),(0,t.jsx)(ue.Z,{name:"remark",fieldProps:{rows:2},placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8",label:"\u5907\u6CE8"})]})})}))},pe=n(52300),ge=function(e){var r=e.visible,p=e.onCancel,E=e.onFinish,Q=e.id,F=(0,T.useState)(!1),Y=a()(F,2),N=Y[0],X=Y[1],k=(0,T.useRef)();return(0,T.useEffect)(function(){var w;X(!0),(w=k.current)===null||w===void 0||w.setFieldsValue({id:Q}),X(!1)},[r,Q]),(0,t.jsx)(se.Y,{title:"\u91CD\u7F6E\u7BA1\u7406\u5458\u5BC6\u7801",width:"460px",formRef:k,labelAlign:"right",preserve:!1,layout:"vertical",autoFocusFirstInput:!0,open:r,modalProps:{destroyOnClose:!0,onCancel:p},onFinish:function(C){var U=pe.DS.encode(C.password,!0);return E({id:Q,password:U})},children:(0,t.jsxs)(le.Z,{spinning:N,children:[(0,t.jsx)(S.Z.Password,{name:"password",label:"\u65B0\u5BC6\u7801",placeholder:"\u8BF7\u8F93\u5165\u65B0\u5BC6\u7801",fieldProps:{autoComplete:"off"},rules:[{required:!0,message:"\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A"}]}),(0,t.jsx)(S.Z.Password,{label:"\u786E\u8BA4\u65B0\u5BC6\u7801",placeholder:"\u8BF7\u8F93\u5165\u786E\u8BA4\u5BC6\u7801",fieldProps:{autoComplete:"off"},rules:[{required:!0,message:"\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A"},function(w){var C=w.getFieldValue;return{validator:function(j,b){return!b||C("password")===b?Promise.resolve():Promise.reject(new Error("\u4E24\u6B21\u5BC6\u7801\u4E0D\u5339\u914D"))}}}]})]})})},Ee=n(21084),Pe=o.Z.confirm,ye=function(){var e=(0,T.useState)(!1),r=a()(e,2),p=r[0],E=r[1],Q=(0,T.useState)(!1),F=a()(Q,2),Y=F[0],N=F[1],X=(0,T.useState)(!1),k=a()(X,2),w=k[0],C=k[1],U=(0,T.useState)(!1),j=a()(U,2),b=j[0],Z=j[1],f=(0,T.useState)(),M=a()(f,2),s=M[0],$=M[1],B=(0,T.useRef)(),re=[{title:"\u7528\u6237\u540D",dataIndex:"username",ellipsis:!0,width:130,fixed:"left",renderText:function(u,h){return(0,t.jsxs)(D.Z,{children:[(0,t.jsx)(Ee.Z,{avatar:h.avatar,username:h.username}),(0,t.jsx)("a",{onClick:function(){C(!0),$(h.id)},children:h.username})]})}},{title:"\u624B\u673A\u53F7\u7801",dataIndex:"phone",align:"left",ellipsis:!0,renderText:function(u,h){return u&&(0,t.jsxs)(D.Z,{children:[u&&h.phoneVerified?(0,t.jsx)(W.Z,{status:"success"}):(0,t.jsx)(W.Z,{status:"error"}),u]})}},{title:"\u90AE\u7BB1\u5730\u5740",dataIndex:"email",align:"left",ellipsis:!0,renderText:function(u,h){return u&&(0,t.jsxs)(D.Z,{children:[h.emailVerified?(0,t.jsx)(W.Z,{status:"success"}):(0,t.jsx)(W.Z,{status:"error"}),u]})}},{title:"\u767B\u5F55\u6B21\u6570",dataIndex:"authTotal",search:!1,render:function(u,h){return(0,t.jsx)("span",{children:h.authTotal?h.authTotal:0})}},{title:"\u4E0A\u6B21\u767B\u5F55IP",dataIndex:"lastAuthIp",ellipsis:!0,search:!1,render:function(u,h){return h.lastAuthIp?(0,t.jsx)(W.Z,{status:"success",text:h.lastAuthIp}):(0,t.jsx)(W.Z,{status:"error",text:"\u672A\u77E5"})}},{title:"\u4E0A\u6B21\u767B\u5F55\u65F6\u95F4",dataIndex:"lastAuthTime",ellipsis:!0,align:"center",search:!1},{title:"\u72B6\u6001",dataIndex:"status",search:!1,align:"center",render:function(u,h){return(0,t.jsx)(ie.Z,{checked:u==="enabled",onChange:function(){var K=d()(l()().mark(function L(V){var O,q,v;return l()().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(!V){_.next=9;break}return _.next=3,(0,c.tS)(h.id);case 3:if(O=_.sent,q=O.success,!q){_.next=9;break}return H.ZP.success("\u64CD\u4F5C\u6210\u529F"),(v=B.current)===null||v===void 0||v.reload(),_.abrupt("return");case 9:Pe({title:"\u8B66\u544A",icon:(0,t.jsx)(m.Z,{}),content:"\u786E\u5B9A\u7981\u7528\u6B64\u7BA1\u7406\u5458\u7528\u6237\uFF1F",okText:"\u786E\u5B9A",okType:"danger",cancelText:"\u53D6\u6D88",centered:!0,onOk:function(){var Qe=d()(l()().mark(function Ze(){var Fe,je,xe;return l()().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return te.next=2,(0,c.Ym)(h.id);case 2:if(Fe=te.sent,je=Fe.success,!je){te.next=8;break}return H.ZP.success("\u64CD\u4F5C\u6210\u529F"),(xe=B.current)===null||xe===void 0||xe.reload(),te.abrupt("return");case 8:case"end":return te.stop()}},Ze)}));function Se(){return Qe.apply(this,arguments)}return Se}(),onCancel:function(){}});case 10:case"end":return _.stop()}},L)}));return function(L){return K.apply(this,arguments)}}()})}},{title:"\u64CD\u4F5C",align:"center",valueType:"option",width:180,fixed:"right",render:function(u,h){return[(0,t.jsx)("a",{target:"_blank",onClick:function(){$(h.id),Z(!0)},children:"\u91CD\u7F6E\u5BC6\u7801"},"reset-password"),(0,t.jsx)("a",{target:"_blank",onClick:function(){$(h.id),N(!0)},children:"\u4FEE\u6539"},"update"),(0,t.jsx)(ae.Z,{title:"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",placement:"bottomRight",icon:(0,t.jsx)(i.Z,{style:{color:"red"}}),onConfirm:d()(l()().mark(function K(){var L,V,O;return l()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(0,c.Uc)(h.id);case 2:if(L=v.sent,V=L.success,!V){v.next=8;break}return H.ZP.success("\u64CD\u4F5C\u6210\u529F"),(O=B.current)===null||O===void 0||O.reload(),v.abrupt("return");case 8:case"end":return v.stop()}},K)})),okText:"\u662F",cancelText:"\u5426",children:(0,t.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u5220\u9664"},"remove")},"delete")]}}];return(0,t.jsxs)(A._z,{children:[(0,t.jsx)(G.Z,{actionRef:B,columns:re,rowKey:"id",scroll:{x:1e3},request:c.Fw,rowSelection:{selections:[Ae.Z.SELECTION_ALL,Ae.Z.SELECTION_INVERT]},form:{syncToUrl:function(u,h){return h==="get"?x()({},u):u}},search:{},toolbar:{actions:[(0,t.jsxs)(be.Z,{type:"primary",onClick:function(){E(!0)},children:[(0,t.jsx)(y.Z,{}),"\u6DFB\u52A0\u7BA1\u7406\u5458"]},"add")]}}),(0,t.jsx)(me,{visible:p,onCancel:function(){E(!1)},onFinish:function(){var I=d()(l()().mark(function u(h){var K,L,V,O,q;return l()().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return ne.next=2,(0,c.VP)(h);case 2:return L=ne.sent,V=L.success,O=L.result,V&&O&&(H.ZP.success("\u65B0\u589E\u6210\u529F"),(q=B.current)===null||q===void 0||q.reload()),(K=B.current)===null||K===void 0||K.reload(),E(!1),ne.abrupt("return",!0);case 9:case"end":return ne.stop()}},u)}));return function(u){return I.apply(this,arguments)}}()}),s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Ce,{visible:Y,id:s,onCancel:function(){N(!1)},onFinish:function(){var I=d()(l()().mark(function u(h){var K,L,V,O;return l()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(0,c.Fq)(h);case 2:return K=v.sent,L=K.success,V=K.result,L&&V&&(H.ZP.success("\u4FEE\u6539\u6210\u529F"),(O=B.current)===null||O===void 0||O.reload()),N(!1),v.abrupt("return",!0);case 8:case"end":return v.stop()}},u)}));return function(u){return I.apply(this,arguments)}}()}),(0,t.jsx)(ge,{id:s,visible:b,onCancel:function(){Z(!1)},onFinish:function(){var I=d()(l()().mark(function u(h){var K,L,V,O;return l()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return Z(!0),v.prev=1,v.next=4,(0,c.Kw)(h.id,h.password);case 4:if(K=v.sent,L=K.success,V=K.result,!(L&&V)){v.next=11;break}return H.ZP.success("\u4FEE\u6539\u6210\u529F"),(O=B.current)===null||O===void 0||O.reload(),v.abrupt("return",!0);case 11:return H.ZP.error("\u4FEE\u6539\u5931\u8D25"),v.abrupt("return",!1);case 15:return v.prev=15,v.t0=v.catch(1),v.abrupt("return",!1);case 18:case"end":return v.stop()}},u,null,[[1,15]])}));return function(u){return I.apply(this,arguments)}}()}),(0,t.jsx)(he,{visible:w,id:s,onCancel:function(){C(!1)}})]})]})}},2093:function(ee,J,n){var P=n(67294),x=n(92770),R=function(d,g,a,c){function m(i){return i instanceof a?i:new a(function(y){y(i)})}return new(a||(a=Promise))(function(i,y){function A(D){try{o(c.next(D))}catch(W){y(W)}}function G(D){try{o(c.throw(D))}catch(W){y(W)}}function o(D){D.done?i(D.value):m(D.value).then(A,G)}o((c=c.apply(d,g||[])).next())})},l=function(d,g){var a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,m,i,y;return y={next:A(0),throw:A(1),return:A(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function A(o){return function(D){return G([o,D])}}function G(o){if(c)throw new TypeError("Generator is already executing.");for(;a;)try{if(c=1,m&&(i=o[0]&2?m.return:o[0]?m.throw||((i=m.return)&&i.call(m),0):m.next)&&!(i=i.call(m,o[1])).done)return i;switch(m=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,m=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]{let r={};return e.forEach((p,E)=>r[p]=E),r})(m),y=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,A=String.fromCharCode.bind(String),G=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):(e,r=p=>p)=>new Uint8Array(Array.prototype.slice.call(e,0).map(r)),o=e=>e.replace(/=/g,"").replace(/[+\/]/g,r=>r=="+"?"-":"_"),D=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),W=e=>{let r,p,E,Q,F="";const Y=e.length%3;for(let N=0;N255||(E=e.charCodeAt(N++))>255||(Q=e.charCodeAt(N++))>255)throw new TypeError("invalid character found");r=p<<16|E<<8|Q,F+=m[r>>18&63]+m[r>>12&63]+m[r>>6&63]+m[r&63]}return Y?F.slice(0,Y-3)+"===".substring(Y):F},ie=z?e=>btoa(e):d?e=>P.from(e,"binary").toString("base64"):W,H=d?e=>P.from(e).toString("base64"):e=>{let p=[];for(let E=0,Q=e.length;Er?o(H(e)):H(e),Ae=e=>{if(e.length<2){var r=e.charCodeAt(0);return r<128?e:r<2048?A(192|r>>>6)+A(128|r&63):A(224|r>>>12&15)+A(128|r>>>6&63)+A(128|r&63)}else{var r=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return A(240|r>>>18&7)+A(128|r>>>12&63)+A(128|r>>>6&63)+A(128|r&63)}},be=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,T=e=>e.replace(be,Ae),se=d?e=>P.from(e,"utf8").toString("base64"):a?e=>H(a.encode(e)):e=>ie(T(e)),S=(e,r=!1)=>r?o(se(e)):se(e),ue=e=>S(e,!0),le=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,t=e=>{switch(e.length){case 4:var r=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),p=r-65536;return A((p>>>10)+55296)+A((p&1023)+56320);case 3:return A((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return A((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},ve=e=>e.replace(le,t),me=e=>{if(e=e.replace(/\s+/g,""),!y.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let r,p="",E,Q;for(let F=0;F>16&255):Q===64?A(r>>16&255,r>>8&255):A(r>>16&255,r>>8&255,r&255);return p},oe=l?e=>atob(D(e)):d?e=>P.from(e,"base64").toString("binary"):me,de=d?e=>G(P.from(e,"base64")):e=>G(oe(e),r=>r.charCodeAt(0)),ce=e=>de(he(e)),Be=d?e=>P.from(e,"base64").toString("utf8"):g?e=>g.decode(de(e)):e=>ve(oe(e)),he=e=>D(e.replace(/[-_]/g,r=>r=="-"?"+":"/")),fe=e=>Be(he(e)),Ce=e=>{if(typeof e!="string")return!1;const r=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(r)||!/[^\s0-9a-zA-Z\-_]/.test(r)},pe=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),ge=function(){const e=(r,p)=>Object.defineProperty(String.prototype,r,pe(p));e("fromBase64",function(){return fe(this)}),e("toBase64",function(r){return S(this,r)}),e("toBase64URI",function(){return S(this,!0)}),e("toBase64URL",function(){return S(this,!0)}),e("toUint8Array",function(){return ce(this)})},Ee=function(){const e=(r,p)=>Object.defineProperty(Uint8Array.prototype,r,pe(p));e("toBase64",function(r){return ae(this,r)}),e("toBase64URI",function(){return ae(this,!0)}),e("toBase64URL",function(){return ae(this,!0)})},ye={version:x,VERSION:R,atob:oe,atobPolyfill:me,btoa:ie,btoaPolyfill:W,fromBase64:fe,toBase64:S,encode:S,encodeURI:ue,encodeURL:ue,utob:T,btou:ve,decode:fe,isValid:Ce,fromUint8Array:ae,toUint8Array:ce,extendString:ge,extendUint8Array:Ee,extendBuiltins:()=>{ge(),Ee()}}}}]); diff --git a/eiam-console/src/main/resources/fe/p__setting__Basic__index.7c7fbc98.chunk.css b/eiam-console/src/main/resources/fe/p__setting__Basic__index.7c7fbc98.chunk.css new file mode 100644 index 00000000..b2c6b12d --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__setting__Basic__index.7c7fbc98.chunk.css @@ -0,0 +1,18 @@ +/** + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error,.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-feature-settings:"calt";font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors,.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.cm-s-material.CodeMirror{background-color:#263238;color:#eff}.cm-s-material .CodeMirror-gutters{background:#263238;color:#546e7a;border:none}.cm-s-material .CodeMirror-guttermarker,.cm-s-material .CodeMirror-guttermarker-subtle,.cm-s-material .CodeMirror-linenumber{color:#546e7a}.cm-s-material .CodeMirror-cursor{border-left:1px solid #FFCC00}.cm-s-material.cm-fat-cursor .CodeMirror-cursor,.cm-s-material .cm-animate-fat-cursor{background-color:#5d6d5c80!important}.cm-s-material div.CodeMirror-selected,.cm-s-material.CodeMirror-focused div.CodeMirror-selected{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-line::selection,.cm-s-material .CodeMirror-line>span::selection,.cm-s-material .CodeMirror-line>span>span::selection{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-line::-moz-selection,.cm-s-material .CodeMirror-line>span::-moz-selection,.cm-s-material .CodeMirror-line>span>span::-moz-selection{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-activeline-background{background:rgba(0,0,0,.5)}.cm-s-material .cm-keyword{color:#c792ea}.cm-s-material .cm-operator{color:#89ddff}.cm-s-material .cm-variable-2{color:#eff}.cm-s-material .cm-variable-3,.cm-s-material .cm-type{color:#f07178}.cm-s-material .cm-builtin{color:#ffcb6b}.cm-s-material .cm-atom{color:#f78c6c}.cm-s-material .cm-number{color:#ff5370}.cm-s-material .cm-def{color:#82aaff}.cm-s-material .cm-string{color:#c3e88d}.cm-s-material .cm-string-2{color:#f07178}.cm-s-material .cm-comment{color:#546e7a}.cm-s-material .cm-variable{color:#f07178}.cm-s-material .cm-tag{color:#ff5370}.cm-s-material .cm-meta{color:#ffcb6b}.cm-s-material .cm-attribute,.cm-s-material .cm-property{color:#c792ea}.cm-s-material .cm-qualifier,.cm-s-material .cm-variable-3,.cm-s-material .cm-type{color:#decb6b}.cm-s-material .cm-error{color:#fff;background-color:#ff5370}.cm-s-material .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important} diff --git a/eiam-console/src/main/resources/fe/p__setting__Basic__index.7fc2a2e3.async.js b/eiam-console/src/main/resources/fe/p__setting__Basic__index.7fc2a2e3.async.js new file mode 100644 index 00000000..fcc77211 --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__setting__Basic__index.7fc2a2e3.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[8083],{76593:function(Ue,Ae,s){s.d(Ae,{W:function(){return Pe}});var ye=s(94184),f=s.n(ye),ge=s(11281),Ce=s.n(ge),m=s(12812),Ee=s.n(m),a=s(14855),v=s(46986),I=s(67294),Me=v.ZP.ConfigContext,Z=function(ie){var oe=ie.prefixCls;return Ee()({},"".concat(oe),{margin:"0 auto"})};function Be(ve){var ie=(0,I.useContext)(Me),oe=ie.getPrefixCls,he=".".concat(oe());return(0,a.Xj)("ContainerComponent",function(ce){var Fe=Ce()(Ce()({},ce),{},{prefixCls:".".concat(ve),antCls:he});return[Z(Fe)]})}var ae=s(85893),$="topiam-container",Pe=function(ie){var oe=ie.children,he=oe===void 0?null:oe,ce=ie.maxWidth,Fe=ce===void 0?1e3:ce,z=Be($),Se=z.wrapSSR,le=z.hashId;return Se((0,ae.jsx)("div",{className:f()("".concat($),le),style:{maxWidth:Fe},children:he}))}},11911:function(Ue,Ae,s){s.d(Ae,{Gh:function(){return Ee},SC:function(){return a},Zw:function(){return f},b$:function(){return m},n6:function(){return ge},pR:function(){return Ce},rD:function(){return ye}});var ye;(function(v){v.EX900005="EX900005",v.EX000102="EX000102",v.EX000202="EX000202",v.SUCCESS="200"})(ye||(ye={}));var f;(function(v){v.ALIYUN="aliyun",v.QI_NIU="qiniu",v.TENCENT="tencent",v.NET_EASE="netease",v.MAXMIND="maxmind"})(f||(f={}));var ge;(function(v){v.ALIYUN="aliyun",v.TENCENT="tencent",v.GEE_TEST="geetest",v.HCAPTCHA="hcaptcha",v.RECAPTCHA="recaptcha"})(ge||(ge={}));var Ce;(function(v){v.STANDARD="standard",v.CUSTOM_MADE="custom_made"})(Ce||(Ce={}));var m;(function(v){v.SAML2="saml2",v.OIDC="oidc",v.CAS="cas",v.JWT="jwt",v.FORM="form",v.OAUTH2="oauth2"})(m||(m={}));var Ee;(function(v){v.ALLOW="ALLOW",v.DENY="DENY"})(Ee||(Ee={}));var a;(function(v){v.ROLE="ROLE",v.RESOURCE="RESOURCE",v.USER="USER",v.ORGANIZATION="ORGANIZATION",v.USER_GROUP="USER_GROUP"})(a||(a={}))},18980:function(Ue,Ae,s){s.r(Ae),s.d(Ae,{default:function(){return Lr}});var ye=s(12741),f=s.n(ye),ge=s(84865),Ce=s(14459),m=s(67294),Ee=s(97983),a=s.n(Ee),v=s(11281),I=s.n(v),Me=s(40794),Z=s.n(Me),Be=s(76593),ae=s(11911),$=s(62387),Pe=s(28058),ve=s(38345),ie=s(52688),oe=s(97269),he=s(64317),ce=s(2093),Fe=s(69400),z=s(43825),Se=s(57953),le=s(2453),De=s(26713),F=s(5966),e=s(85893),He=function(){return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(F.Z.Password,{name:["config","sessionKey"],label:"\u6CE8\u518C\u7801",placeholder:"\u8BF7\u8F93\u5165MaxMind\u6CE8\u518C\u7801",rules:[{required:!0,message:"MaxMind\u6CE8\u518C\u7801\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"new-password"}})})},Ye=Fe.Z.confirm,We={labelCol:{xs:{span:24},sm:{span:7},md:{span:6}},wrapperCol:{xs:{span:24},sm:{span:13},md:{span:14}}},Xe={wrapperCol:{xs:{span:24,offset:0},sm:{span:17,offset:7},md:{span:18,offset:6}}},$e=ae.Zw.MAXMIND,Qe=function(l){var g=l.visible,p=z.Z.useForm(),i=f()(p,1),o=i[0],L=(0,m.useState)(!1),E=f()(L,2),B=E[0],C=E[1],H=(0,m.useState)(!1),Y=f()(H,2),K=Y[0],w=Y[1],fe=(0,m.useState)($e),J=f()(fe,2),N=J[0],M=J[1];return(0,ce.Z)(Z()(a()().mark(function S(){var d,c,t;return a()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!g){n.next=11;break}return o.resetFields(),C(!0),n.next=5,(0,$.t9)();case 5:return d=n.sent,c=d.success,t=d.result,c&&t&&t.enabled?(w(t.enabled),M(t.provider),o.setFieldsValue(I()({},t))):o.setFieldsValue({provider:N}),C(!1),n.abrupt("return");case 11:w(!1);case 12:case"end":return n.stop()}},S)})),[g]),(0,e.jsx)(Se.Z,{spinning:B,children:(0,e.jsx)(ve.Z,{title:"IP\u5730\u7406\u4F4D\u7F6E",headerBordered:!0,bordered:!1,collapsed:!K,style:{marginBottom:"24px"},extra:(0,e.jsx)(ie.Z,{noStyle:!0,labelAlign:"right",fieldProps:{checked:K,onChange:function(){var S=Z()(a()().mark(function c(t){return a()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:t?w(t):Ye({title:"\u8B66\u544A",icon:(0,e.jsx)(Pe.Z,{}),content:"\u5173\u95ED\u6B64\u529F\u80FD\u5C06\u65E0\u6CD5\u4F7F\u7528\u5730\u7406\u4F4D\u7F6E\u670D\u52A1\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5173\u95ED\u3002",okText:"\u786E\u5B9A",okType:"danger",cancelText:"\u53D6\u6D88",centered:!0,onOk:function(){var r=Z()(a()().mark(function A(){var X,q;return a()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return C(!0),j.next=3,(0,$.Y7)().finally(function(){C(!1)});case 3:if(X=j.sent,q=X.success,!q){j.next=12;break}return w(t),le.ZP.success("\u64CD\u4F5C\u6210\u529F"),M($e),o.resetFields(),o.setFieldsValue({provider:$e}),j.abrupt("return");case 12:case"end":return j.stop()}},A)}));function W(){return r.apply(this,arguments)}return W}()});case 1:case"end":return n.stop()}},c)}));function d(c){return S.apply(this,arguments)}return d}()}}),children:(0,e.jsx)(Be.W,{children:(0,e.jsx)(oe.A,I()(I()({form:o,scrollToFirstError:!0,layout:"horizontal",labelAlign:"right"},We),{},{initialValues:{provider:$e},onReset:function(){o.resetFields(),o.setFieldsValue({enabled:K,provider:N})},submitter:{render:function(d,c){return(0,e.jsx)(z.Z.Item,I()(I()({},Xe),{},{children:(0,e.jsx)(De.Z,{children:c})}))},submitButtonProps:{style:{display:K?"":"none"}},resetButtonProps:{style:{display:K?"":"none"}}},onFinish:function(){var S=Z()(a()().mark(function d(c){var t,b;return a()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return C(!0),r.prev=1,r.next=4,(0,$.S4)({provider:c.provider,config:c.config});case 4:if(t=r.sent,b=t.success,!b){r.next=9;break}return le.ZP.success("\u4FDD\u5B58\u6210\u529F"),r.abrupt("return",Promise.resolve(!0));case 9:r.next=14;break;case 11:return r.prev=11,r.t0=r.catch(1),r.abrupt("return",Promise.reject());case 14:return r.prev=14,C(!1),r.finish(14);case 17:case"end":return r.stop()}},d,null,[[1,11,14,17]])}));return function(d){return S.apply(this,arguments)}}(),children:K&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(he.Z,{name:"provider",label:"\u670D\u52A1\u5546",rules:[{required:!0}],fieldProps:{onChange:function(){var S=Z()(a()().mark(function c(t){var b,n,r;return a()().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return C(!0),M(t),o.resetFields(),o.setFieldsValue({provider:t}),A.next=6,(0,$.t9)();case 6:b=A.sent,n=b.success,r=b.result,n&&r&&r.enabled&&t===r.provider&&(w(r.enabled),o.setFieldsValue(I()({},r))),C(!1);case 11:case"end":return A.stop()}},c)}));function d(c){return S.apply(this,arguments)}return d}()},options:[{value:ae.Zw.MAXMIND,label:"MaxMind"}]}),N===ae.Zw.MAXMIND&&(0,e.jsx)(He,{})]})}))})})})},be=s(51444),je=s(90420),Je=s(31199),qe=s(86615),_e=Fe.Z.confirm,er={labelCol:{xs:{span:24},sm:{span:7},md:{span:6}},wrapperCol:{xs:{span:24},sm:{span:13},md:{span:14}}},rr={wrapperCol:{xs:{span:24,offset:0},sm:{span:17,offset:7},md:{span:18,offset:6}}},xe="customize",sr=function(l){var g=z.Z.useForm(),p=f()(g,1),i=p[0],o=l.visible,L=(0,m.useState)(xe),E=f()(L,2),B=E[0],C=E[1],H=(0,m.useState)(!1),Y=f()(H,2),K=Y[0],w=Y[1],fe=(0,m.useState)(!1),J=f()(fe,2),N=J[0],M=J[1];return(0,ce.Z)(Z()(a()().mark(function S(){var d,c,t;return a()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!o){n.next=11;break}return i.resetFields(),w(!0),n.next=5,(0,$.cB)();case 5:return d=n.sent,c=d.success,t=d.result,c&&t&&t.enabled?(M(t.enabled),C(t.provider),i.setFieldsValue(I()({},t))):i.setFieldsValue({provider:B}),w(!1),n.abrupt("return");case 11:M(!1);case 12:case"end":return n.stop()}},S)})),[o]),(0,e.jsx)(Se.Z,{spinning:K,children:(0,e.jsx)(ve.Z,{title:"\u90AE\u4EF6\u63D0\u4F9B\u5546",headerBordered:!0,bordered:!1,collapsed:!N,style:{marginBottom:"24px"},extra:(0,e.jsx)(ie.Z,{labelAlign:"right",noStyle:!0,fieldProps:{checked:N,onChange:function(){var S=Z()(a()().mark(function c(t){return a()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:t?M(t):_e({title:"\u8B66\u544A",icon:(0,e.jsx)(Pe.Z,{}),content:"\u5173\u95ED\u6B64\u529F\u80FD\u5C06\u65E0\u6CD5\u4F7F\u7528\u90AE\u4EF6\u670D\u52A1\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5173\u95ED\u3002",okText:"\u786E\u5B9A",okType:"danger",centered:!0,cancelText:"\u53D6\u6D88",onOk:function(){var r=Z()(a()().mark(function A(){var X,q;return a()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return w(!0),j.next=3,(0,$.iV)().finally(function(){w(!1)});case 3:if(X=j.sent,q=X.success,!q){j.next=12;break}return M(t),le.ZP.success("\u64CD\u4F5C\u6210\u529F"),C(xe),i.resetFields(),i.setFieldsValue({provider:xe}),j.abrupt("return");case 12:case"end":return j.stop()}},A)}));function W(){return r.apply(this,arguments)}return W}()});case 1:case"end":return n.stop()}},c)}));function d(c){return S.apply(this,arguments)}return d}()},label:"\u5F00\u542F\u90AE\u4EF6\u670D\u52A1"}),children:(0,e.jsx)(Be.W,{children:(0,e.jsxs)(oe.A,I()(I()({form:i,scrollToFirstError:!0,initialValues:{safetyType:"ssl",provider:xe},onReset:function(){i.resetFields(),i.setFieldsValue({provider:B})}},er),{},{layout:"horizontal",labelAlign:"right",submitter:{render:function(d,c){return(0,e.jsx)(z.Z.Item,I()(I()({},rr),{},{children:(0,e.jsx)(De.Z,{children:c})}))},submitButtonProps:{style:{display:N?"inline":"none"}},resetButtonProps:{style:{display:N?"inline":"none"}}},onFinish:function(){var S=Z()(a()().mark(function d(c){var t,b;return a()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return w(!0),r.prev=1,r.next=4,(0,$.$N)(c);case 4:return t=r.sent,b=t.success,b&&le.ZP.success("\u4FDD\u5B58\u6210\u529F"),w(!1),r.abrupt("return",Promise.reject());case 11:return r.prev=11,r.t0=r.catch(1),r.abrupt("return",Promise.reject());case 14:return r.prev=14,w(!1),r.finish(14);case 17:case"end":return r.stop()}},d,null,[[1,11,14,17]])}));return function(d){return S.apply(this,arguments)}}(),children:[(0,e.jsx)(he.Z,{name:"provider",label:"\u670D\u52A1\u63D0\u4F9B\u5546",rules:[{required:!0}],fieldProps:{onChange:function(){var S=Z()(a()().mark(function c(t){var b,n,r;return a()().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return w(!0),C(t),i.resetFields(),i.setFieldsValue({provider:t}),A.next=6,(0,$.cB)();case 6:b=A.sent,n=b.success,r=b.result,n&&r&&r.enabled&&t===r.provider&&(M(r.enabled),i.setFieldsValue(I()({},r))),w(!1);case 11:case"end":return A.stop()}},c)}));function d(c){return S.apply(this,arguments)}return d}()},options:[{value:"customize",label:"\u81EA\u5B9A\u4E49"},{value:ae.Zw.ALIYUN,label:"\u963F\u91CC\u4E91\u4F01\u4E1A\u90AE"},{value:ae.Zw.TENCENT,label:"\u817E\u8BAF\u4E91\u4F01\u4E1A\u90AE"},{value:ae.Zw.NET_EASE,label:"\u7F51\u6613\u4F01\u4E1A\u90AE"}]}),B==="customize"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(F.Z,{name:"smtpUrl",label:"SMTP\u5730\u5740",placeholder:"\u8BF7\u8F93\u5165SMTP\u5730\u5740",rules:[{required:!0,message:"\u8BF7\u8F93\u5165SMTP\u5730\u5740"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(Je.Z,{label:"\u7AEF\u53E3\u53F7",name:"port",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7AEF\u53E3\u53F7"}],fieldProps:{autoComplete:"off"},min:0,placeholder:"\u8BF7\u8F93\u5165\u7AEF\u53E3\u53F7"}),(0,e.jsx)(qe.Z.Group,{name:"safetyType",label:"\u5B89\u5168\u9A8C\u8BC1",rules:[{required:!0}],options:[{label:"None",value:"none"},{label:"SSL",value:"ssl"}]})]}),(0,e.jsx)(F.Z,{name:"username",label:B===xe?"\u7528\u6237\u540D":"\u53D1\u4EF6\u4EBA\u90AE\u7BB1",placeholder:B===xe?"\u8BF7\u8F93\u5165\u7528\u6237\u540D":"\u8BF7\u8F93\u5165\u53D1\u4EF6\u4EBA\u90AE\u7BB1",rules:B===xe?[{required:!0,message:"\u8BF7\u8F93\u5165\u7528\u6237\u540D"}]:[{required:!0,message:"\u8BF7\u8F93\u5165\u53D1\u4EF6\u4EBA\u90AE\u7BB1"},{type:"email",message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u53D1\u4EF6\u4EBA\u90AE\u7BB1"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z.Password,{name:"secret",label:"\u5BC6\u7801",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BC6\u7801"}],placeholder:"\u8BF7\u8F93\u5165\u5BC6\u7801",fieldProps:{autoComplete:"new-password",iconRender:function(d){return d?(0,e.jsx)(be.Z,{}):(0,e.jsx)(je.Z,{})}}})]}))})})})},ar=s(96495),nr=s(51904),Ge=function(l){var g=l.title,p=l.visible,i=l.onCancel,o=l.content;return(0,e.jsx)(Fe.Z,{title:g,open:p,closable:!0,destroyOnClose:!0,width:"800px",onCancel:i,onOk:i,children:(0,e.jsx)("div",{dangerouslySetInnerHTML:{__html:o}})})},tr=s(58455),ze=s(71577),ur=s(72269),Ke=s(69677),Vr=s(58177),Ur=s(99762),Gr=s(33160),zr=s(79820),Hr=s(96876),Yr=s(3814),lr=s(29656),ir=function(l){var g=l.visible,p=l.type,i=l.title,o=l.onClose,L=l.onSubmit,E=z.Z.useForm(),B=f()(E,1),C=B[0],H=(0,m.useState)(!1),Y=f()(H,2),K=Y[0],w=Y[1],fe=(0,m.useState)(!1),J=f()(fe,2),N=J[0],M=J[1],S=(0,m.useState)(!1),d=f()(S,2),c=d[0],t=d[1],b=(0,m.useState)(""),n=f()(b,2),r=n[0],W=n[1],A=(0,m.useState)(!1),X=f()(A,2),q=X[0],pe=X[1];(0,ce.Z)(Z()(a()().mark(function _(){var ne,ee,Q;return a()().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(!g){te.next=9;break}return M(!0),te.next=4,(0,$.Up)({type:p});case 4:ne=te.sent,ee=ne.success,Q=ne.result,ee&&(C.setFieldsValue(I()({},Q)),pe(Q.custom),W(Q.content)),M(!1);case 9:case"end":return te.stop()}},_)})),[p,g]);function j(){o(),t(!1),C.resetFields()}return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(tr.Z,{onClose:j,destroyOnClose:!0,width:"600px",title:i,placement:"right",closable:!0,open:g,footer:(0,e.jsxs)("div",{style:{textAlign:"right"},children:[(0,e.jsx)(ze.Z,{onClick:function(){W(r),w(!0)},style:{marginRight:8},children:"\u9884\u89C8"}),q&&(0,e.jsx)(ze.Z,{loading:c,onClick:function(){C.submit()},type:"primary",children:"\u4FDD\u5B58"})]}),children:(0,e.jsx)(z.Z,{form:C,scrollToFirstError:!0,requiredMark:!0,onFinish:function(){var _=Z()(a()().mark(function ne(ee){return a()().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return t(!0),V.prev=1,V.next=4,(0,$.P0)(I()(I()({type:p},ee),{},{content:r})).then(function(te){te.success&&te.result===!0&&(le.ZP.success("\u4FDD\u5B58\u6210\u529F"),j(),L&&L())});case 4:V.next=8;break;case 6:V.prev=6,V.t0=V.catch(1);case 8:return V.prev=8,t(!1),V.finish(8);case 11:case"end":return V.stop()}},ne,null,[[1,6,8,11]])}));return function(ne){return _.apply(this,arguments)}}(),layout:"vertical",children:(0,e.jsxs)(Se.Z,{spinning:N,size:"large",children:[(0,e.jsx)(z.Z.Item,{label:"\u81EA\u5B9A\u4E49\u90AE\u4EF6",name:"custom",valuePropName:"checked",extra:"\u5F00\u5173\u5F00\u542F\u65F6\uFF0C\u4F60\u53EF\u4EE5\u81EA\u5B9A\u4E49\u6B22\u8FCE\u90AE\u4EF6\uFF0C\u5BC6\u7801\u9A8C\u8BC1\u548C\u8D26\u6237\u6CE8\u518C\u9A8C\u8BC1\u7684\u5177\u4F53\u5185\u5BB9\uFF0C\u4FDD\u5B58\u540E\u751F\u6548\uFF0C\u5F00\u5173\u5173\u95ED\u65F6\uFF0C\u7CFB\u7EDF\u5C06\u542F\u7528\u9ED8\u8BA4\u6A21\u7248\u3002",children:(0,e.jsx)(ur.Z,{onChange:function(){var _=Z()(a()().mark(function ne(ee){var Q,V;return a()().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(M(!0),ee){ue.next=9;break}return ue.next=4,(0,$.ms)(p).finally(function(){M(!1)});case 4:Q=ue.sent,V=Q.success,V&&pe(ee),ue.next=10;break;case 9:pe(ee);case 10:case"end":return ue.stop()}},ne)}));return function(ne){return _.apply(this,arguments)}}()})}),q&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(z.Z.Item,{label:"\u53D1\u9001\u4EBA",name:"sender",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90AE\u4EF6\u53D1\u9001\u4EBA"}],extra:"\u4F60\u53EF\u4EE5\u5305\u62EC\u4EE5\u4E0B\u53D8\u91CF\uFF1A${client_name}\uFF0C${time}\uFF0C${user_email}\uFF0C${client_description}\uFF0C${password}\u3002 \u4F8B\u5982\uFF1A${client_name} \u3002${password} \u662F\u7528\u6237\u6CE8\u518C\u6210\u529F\u540E\u7684\u5BC6\u7801\uFF0C\u7531\u4E8E\u5B89\u5168\u539F\u56E0\uFF0C\u6B64\u5BC6\u7801\u4E0D\u4F1A\u660E\u6587\u6570\u636E\u5E93\u4E2D\u7559\u5B58\uFF0C\u4EC5\u4EC5\u4F1A\u5728\u521D\u6B21\u6CE8\u518C\u65F6\u901A\u8FC7\u90AE\u4EF6\u4F20\u8F93\u4E00\u6B21\u3002",children:(0,e.jsx)(Ke.Z,{autoComplete:"off",placeholder:"\u8BF7\u8F93\u5165\u90AE\u4EF6\u53D1\u9001\u4EBA"})}),(0,e.jsx)(z.Z.Item,{label:"\u4E3B\u9898",name:"subject",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90AE\u4EF6\u4E3B\u9898"}],extra:"\u4F60\u53EF\u4EE5\u5305\u62EC\u4EE5\u4E0B\u53D8\u91CF\uFF1A${client_name}\uFF0C${time}\uFF0C${client_description}\uFF0C${user_email}\u3002 \u4F8B\u5982\uFF1A\u6B22\u8FCE\u6765\u5230 ${client_name}\uFF01",children:(0,e.jsx)(Ke.Z,{autoComplete:"off",placeholder:"\u8BF7\u8F93\u5165\u90AE\u4EF6\u4E3B\u9898"})}),(0,e.jsx)(z.Z.Item,{hidden:!0,name:"content",children:(0,e.jsx)(Ke.Z,{hidden:!0,value:r})}),!N&&(0,e.jsx)(z.Z.Item,{label:"\u5185\u5BB9",children:(0,e.jsx)(lr.Rt,{options:{mode:"htmlembedded",theme:"material",lineNumbers:!1,smartIndent:!1,fullScreen:!1},onChange:function(ne,ee,Q){W(Q)},value:r})})]})]})})}),(0,e.jsx)(Ge,{content:r,title:i,visible:K,onCancel:function(){w(!1)}})]})},or=s(12812),T=s.n(or),cr=s(38755),dr=s(46986),fr=dr.ZP.ConfigContext;function pr(l){var g=(0,m.useContext)(fr),p=g.getPrefixCls,i=".".concat(p()),o=(0,cr.l)(function(L){var E,B,C=L.token;return B={},T()(B,".".concat(l),(E={},T()(E,"&-title",{marginTop:0,marginBottom:"0",fontSize:"16px"}),T()(E,"".concat(i,"-avatar > img"),{objectFit:"fill"}),T()(E,"".concat(i,"-card-head"),{borderBottom:"none"}),T()(E,"".concat(i,"-card-head-title"),{padding:"24px 0",lineHeight:"32px"}),T()(E,"".concat(i,"-card-extra"),{padding:"24px 0"}),T()(E,"".concat(i,"-list-pagination"),{marginTop:"24px"}),T()(E,"".concat(i,"-avatar-lg"),{width:"48px",height:"48px",lineHeight:"48px"}),T()(E,"".concat(i,"-list-item-action"),{marginInlineStart:"15px"}),E)),T()(B,"@media (max-width: ".concat(C.screenXS,"px)"),T()({},".".concat(l,"-list"),{})),T()(B,"@media (max-width: ".concat(C.screenSM,"px)"),T()({},".".concat(l,"-list"),{})),T()(B,"@media (max-width: ".concat(C.screenMD,"px)"),T()({},".".concat(l,"-list"),{})),T()(B,"@media (max-width: ".concat(C.screenLG,"px) and @media (min-width: ").concat(C.screenMD,"px)"),T()({},".".concat(l,"-list"),{})),T()(B,"@media (max-width: ".concat(C.screenXL,"px)"),T()({},".".concat(l,"-list"),{})),T()(B,"@media (max-width: 1400px)",T()({},".".concat(l,"-list"),{})),B});return{className:o}}var mr=s(94184),vr=s.n(mr),Re="setting-mail-template",hr=function(l){var g=l.visible,p=(0,m.useState)(!1),i=f()(p,2),o=i[0],L=i[1],E=(0,m.useState)(),B=f()(E,2),C=B[0],H=B[1],Y=(0,m.useState)(""),K=f()(Y,2),w=K[0],fe=K[1],J=(0,m.useState)(""),N=f()(J,2),M=N[0],S=N[1],d=(0,m.useState)(!1),c=f()(d,2),t=c[0],b=c[1],n=(0,m.useState)([]),r=f()(n,2),W=r[0],A=r[1],X=(0,m.useState)(!1),q=f()(X,2),pe=q[0],j=q[1],_=(0,m.useState)(!0),ne=f()(_,2),ee=ne[0],Q=ne[1],V=pr(Re),te=V.className;function ue(){return we.apply(this,arguments)}function we(){return we=Z()(a()().mark(function k(){var O,u,P;return a()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return b(!0),x.next=3,(0,$._4)();case 3:O=x.sent,u=O.success,P=O.result,u&&A(P),b(!1);case 8:case"end":return x.stop()}},k)})),we.apply(this,arguments)}(0,ce.Z)(Z()(a()().mark(function k(){return a()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!g){u.next=3;break}return u.next=3,ue();case 3:case"end":return u.stop()}},k)})),[g]);var Ne=function(O,u){H((0,e.jsx)("span",{children:"".concat(O)})),L(!0),S(u)},Ve=function(O,u){H((0,e.jsx)("span",{children:"".concat(O)})),j(!0),fe(u)};return(0,e.jsx)("div",{className:te,children:(0,e.jsx)(Se.Z,{spinning:t,children:(0,e.jsxs)(ve.Z,{title:"\u90AE\u4EF6\u6A21\u677F",headerBordered:!0,className:"".concat(Re),bordered:!1,collapsed:ee,extra:(0,e.jsx)("a",{onClick:function(){Q(!ee)},children:ee?"\u5C55\u5F00":"\u6536\u8D77"}),children:[(0,e.jsx)(ar.Rs,{rowKey:"type",split:!0,cardProps:{bodyStyle:{padding:0}},showActions:"always",dataSource:W,metas:{title:{render:function(O,u){return[(0,e.jsx)("p",{onClick:function(){Ne(u.name,u.code)},className:vr()("".concat(Re,"-title")),children:u.name},u.name)]}},description:{},subTitle:{render:function(O,u){return(0,e.jsx)(De.Z,{size:0,children:u.custom&&(0,e.jsx)(nr.Z,{color:"#108ee9",children:"\u81EA\u5B9A\u4E49"},"customize")})}},actions:{render:function(O,u){return[(0,e.jsx)("a",{onClick:function(){Ne(u.name,u.code)},children:"\u914D\u7F6E"},"config"),(0,e.jsx)("a",{onClick:function(){Ve(u.name,u.content)},children:"\u6D4F\u89C8"},"browse")]}}}}),(0,e.jsx)(ir,{visible:o,type:M,onClose:Z()(a()().mark(function k(){return a()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return L(!1),u.next=3,ue();case 3:case"end":return u.stop()}},k)})),onSubmit:Z()(a()().mark(function k(){return a()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,ue();case 2:case"end":return u.stop()}},k)})),title:C}),(0,e.jsx)(Ge,{content:w,title:C,visible:pe,onCancel:function(){j(!1)}})]})})})},Fr=hr,G;(function(l){l.MAIL="mail",l.SMS="sms",l.STORAGE="storage",l.LOCATION="location"})(G||(G={}));var de;(function(l){l.ALIYUN_OSS="aliyun_oss",l.TENCENT_COS="tencent_cos",l.QINIU_KODO="qiniu_kodo",l.LOCAL="local",l.MINIO="minio"})(de||(de={}));var Ze;(function(l){l.ZH="zh",l.EN="en"})(Ze||(Ze={}));var Ie;(function(l){l.BEIJING="ap-beijing",l.GUANGZHOU="ap-guangzhou",l.NANJING="ap-nanjing"})(Ie||(Ie={}));var gr=s(37476),Cr=s(2236),Sr=s(50727),yr=s(92783),Er=function(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(F.Z,{name:"accessKeyId",label:"AccessKey ID",placeholder:"\u8BF7\u8F93\u5165\u963F\u91CC\u4E91AccessKey ID",rules:[{required:!0,message:"\u963F\u91CC\u4E91AccessKey ID \u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z.Password,{name:"accessKeySecret",label:"AccessKey Secret",rules:[{required:!0,message:"\u963F\u91CC\u4E91AccessKey Secret\u4E3A\u5FC5\u586B\u9879"}],placeholder:"\u8BF7\u8F93\u5165\u963F\u91CC\u4E91AccessKey Secret",fieldProps:{autoComplete:"new-password",iconRender:function(p){return p?(0,e.jsx)(be.Z,{}):(0,e.jsx)(je.Z,{})}}}),(0,e.jsx)(F.Z,{name:"signName",label:"\u77ED\u4FE1\u7B7E\u540D",placeholder:"\u8BF7\u8F93\u5165\u963F\u91CC\u4E91\u77ED\u4FE1\u7B7E\u540D",rules:[{required:!0,message:"\u963F\u91CC\u4E91\u77ED\u4FE1\u7B7E\u540D\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}})]})},br=Er,jr=function(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(F.Z,{name:"accessKey",label:"AccessKey",placeholder:"\u8BF7\u8F93\u5165\u4E03\u725B\u4E91 AccessKey",rules:[{required:!0,message:"\u4E03\u725B\u4E91AccessKey\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z.Password,{name:"secretKey",label:"SecretKey",rules:[{required:!0,message:"\u4E03\u725B\u4E91SecretKey\u4E3A\u5FC5\u586B\u9879"}],placeholder:"\u8BF7\u8F93\u5165\u4E03\u725B\u4E91SecretKey",fieldProps:{autoComplete:"new-password",iconRender:function(p){return p?(0,e.jsx)(be.Z,{}):(0,e.jsx)(je.Z,{})}}})]})},xr=jr,Zr=function(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(he.Z,{name:"region",label:"\u5730\u57DF",placeholder:"\u8BF7\u9009\u62E9\u5730\u57DF\u914D\u7F6E",initialValue:Ie.GUANGZHOU,rules:[{required:!0,message:"\u817E\u8BAF\u4E91\u5730\u57DF\u4E3A\u5FC5\u586B\u9879"}],options:[{label:"\u534E\u5317\u5730\u533A\uFF08\u5317\u4EAC\uFF09",value:Ie.BEIJING},{label:"\u534E\u5357\u5730\u533A\uFF08\u5E7F\u5DDE\uFF09 ",value:Ie.GUANGZHOU},{label:"\u534E\u4E1C\u5730\u533A\uFF08\u5357\u4EAC\uFF09",value:Ie.NANJING}]}),(0,e.jsx)(F.Z,{name:"secretId",label:"SecretId",placeholder:"\u8BF7\u8F93\u5165\u817E\u8BAF\u4E91SecretId",rules:[{required:!0,message:"\u817E\u8BAF\u4E91SecretId\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z.Password,{name:"secretKey",label:"SecretKey",rules:[{required:!0,message:"\u817E\u8BAF\u4E91SecretKey\u4E3A\u5FC5\u586B\u9879"}],placeholder:"\u8BF7\u8F93\u5165\u817E\u8BAF\u4E91SecretKey",fieldProps:{iconRender:function(p){return p?(0,e.jsx)(be.Z,{}):(0,e.jsx)(je.Z,{})}}}),(0,e.jsx)(F.Z,{name:"sdkAppId",label:"\u77ED\u4FE1\u5E94\u7528ID",placeholder:"\u8BF7\u8F93\u5165\u77ED\u4FE1\u5E94\u7528ID",rules:[{required:!0,message:"\u817E\u8BAF\u4E91\u77ED\u4FE1\u5E94\u7528ID\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z,{name:"signName",label:"\u77ED\u4FE1\u7B7E\u540D",placeholder:"\u8BF7\u8F93\u5165\u817E\u8BAF\u4E91\u77ED\u4FE1\u7B7E\u540D",rules:[{required:!0,message:"\u817E\u8BAF\u4E91\u77ED\u4FE1\u7B7E\u540D\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}})]})},Ar=Zr,Br=Fe.Z.confirm,Pr={labelCol:{xs:{span:24},sm:{span:7},md:{span:6}},wrapperCol:{xs:{span:24},sm:{span:13},md:{span:14}}},ke=ae.Zw.ALIYUN,Ir=function(g){var p=g.data,i=g.visible,o=g.onCancel;return(0,e.jsxs)(gr.Y,{preserve:!1,width:600,open:i,layout:"horizontal",modalProps:{onCancel:o,destroyOnClose:!0},labelAlign:"left",labelCol:{span:4},wrapperCol:{span:19},title:"\u6D4B\u8BD5\u77ED\u4FE1\u53D1\u9001",initialValues:{type:p.type,name:p.name,content:p.content},onFinish:function(E){return console.log(p),alert("\u53D1\u9001\u77ED\u4FE1"+E.phone),Promise.reject(!1)},children:[(0,e.jsx)(F.Z,{name:"type",hidden:!0}),(0,e.jsx)(F.Z,{label:"\u624B\u673A\u53F7",name:"phone",rules:[{required:!0}]}),(0,e.jsx)(F.Z,{label:"\u573A\u666F",name:"name",readonly:!0}),(0,e.jsx)(F.Z,{label:"\u6A21\u677F\u5185\u5BB9",name:"content",readonly:!0})]},p.type)},wr=function(l){var g=z.Z.useForm(),p=f()(g,1),i=p[0],o=(0,m.useRef)(),L=(0,m.useRef)(),E=l.visible,B=(0,m.useState)(ke),C=f()(B,2),H=C[0],Y=C[1],K=(0,m.useState)(!1),w=f()(K,2),fe=w[0],J=w[1],N=(0,m.useState)({}),M=f()(N,2),S=M[0],d=M[1],c=(0,m.useState)(!1),t=f()(c,2),b=t[0],n=t[1],r=(0,m.useState)(!1),W=f()(r,2),A=W[0],X=W[1],q=(0,m.useState)(Ze.ZH),pe=f()(q,2),j=pe[0],_=pe[1],ne=(0,m.useState)(),ee=f()(ne,2),Q=ee[0],V=ee[1],te=(0,m.useState)(),ue=f()(te,2),we=ue[0],Ne=ue[1],Ve=[{dataIndex:"name",title:"\u6A21\u677F\u7C7B\u578B",fixed:"left",width:150,editable:!1},{dataIndex:"content",title:"\u6A21\u677F\u5185\u5BB9",copyable:!0,editable:!1},{dataIndex:"code",title:"\u6A21\u677FID/CODE",width:130,fixed:"right"},{title:"\u64CD\u4F5C",fixed:"right",align:"center",width:90,editable:!1,render:function(u,P){return[(0,e.jsx)("a",{onClick:Z()(a()().mark(function y(){var x,R;return a()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,i==null?void 0:i.validateFields();case 2:if(h.sent){h.next=4;break}return h.abrupt("return");case 4:if((x=o.current)!==null&&x!==void 0&&(R=x.getFieldValue(P.type))!==null&&R!==void 0&&R.code){h.next=8;break}return h.next=7,le.ZP.warning("\u8BF7\u914D\u7F6E\u77ED\u4FE1ID/CODE");case 7:return h.abrupt("return");case 8:J(!0),d(I()(I()({},P),{},{config:i.getFieldsValue()}));case 10:case"end":return h.stop()}},y)})),children:"\u6D4B\u8BD5"},P.type)]}}],k=function(){var O=Z()(a()().mark(function u(P){var y,x,R;return a()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,(0,$.F8)({language:P});case 2:y=h.sent,x=y.result,R=y.success,R&&x&&(Ne(x),V(x.map(function(re){return re.type})));case 6:case"end":return h.stop()}},u)}));return function(P){return O.apply(this,arguments)}}();return(0,ce.Z)(Z()(a()().mark(function O(){var u,P,y,x;return a()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(!E){D.next=24;break}return n(!0),D.next=4,(0,$.di)();case 4:if(u=D.sent,P=u.success,y=u.result,X(y.enabled),!(P&&y&&y.enabled)){D.next=18;break}return i.setFieldsValue(I()({},y.config)),Y(y.provider),_(y.language),D.next=14,k(y.language);case 14:(x=y.templates)===null||x===void 0||x.forEach(function(h){var re;(re=o.current)===null||re===void 0||re.setFieldsValue(T()({},h.type,{code:h.code}))}),n(!1),D.next=23;break;case 18:return D.next=20,k(j);case 20:return i.setFieldsValue({provider:H}),n(!1),D.abrupt("return");case 23:return D.abrupt("return");case 24:case"end":return D.stop()}},O)})),[E]),(0,e.jsxs)(Se.Z,{spinning:b,children:[S&&(0,e.jsx)(Ir,{data:S,visible:fe,onCancel:function(){J(!1)}}),(0,e.jsx)(ve.Z,{title:"\u77ED\u4FE1\u670D\u52A1",headerBordered:!0,bordered:!1,collapsed:!A,style:{marginBottom:"24px"},extra:(0,e.jsx)(ie.Z,{noStyle:!0,fieldProps:{checked:A,onChange:function(){var O=Z()(a()().mark(function P(y){return a()().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:y?X(y):Br({title:"\u8B66\u544A",icon:(0,e.jsx)(Pe.Z,{}),content:"\u5173\u95ED\u6B64\u529F\u80FD\u5C06\u65E0\u6CD5\u4F7F\u7528\u77ED\u4FE1\u670D\u52A1\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5173\u95ED\u3002",okText:"\u786E\u5B9A",okType:"danger",cancelText:"\u53D6\u6D88",centered:!0,onOk:function(){var D=Z()(a()().mark(function re(){var U,se;return a()().wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return n(!0),me.next=3,(0,$.zS)().finally(function(){n(!1)});case 3:if(U=me.sent,se=U.success,!se){me.next=12;break}return X(y),le.ZP.success("\u64CD\u4F5C\u6210\u529F"),Y(ke),i.resetFields(),i.setFieldsValue({provider:ke}),me.abrupt("return");case 12:case"end":return me.stop()}},re)}));function h(){return D.apply(this,arguments)}return h}(),onCancel:function(){}});case 1:case"end":return R.stop()}},P)}));function u(P){return O.apply(this,arguments)}return u}()}}),children:(0,e.jsxs)(Be.W,{children:[(0,e.jsxs)(oe.A,I()(I()({form:i,scrollToFirstError:!0,layout:"horizontal"},Pr),{},{labelAlign:"right",onReset:Z()(a()().mark(function O(){var u;return a()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:i.resetFields(),i.setFieldsValue({provider:H}),(u=o.current)===null||u===void 0||u.resetFields();case 3:case"end":return y.stop()}},O)})),submitter:{render:function(u,P){return(0,e.jsx)(Cr.S,{children:P})},submitButtonProps:{style:{display:A?"":"none"}},resetButtonProps:{style:{display:A?"":"none"}}},onFinish:function(){var O=Z()(a()().mark(function u(P){var y,x,R,D,h;return a()().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return x=(y=o.current)===null||y===void 0?void 0:y.getFieldsValue(),R=[],Q==null||Q.forEach(function(se){if(x[se].code!==void 0){var Oe={type:"".concat(se),code:x[se].code};R.push(Oe)}}),n(!0),U.prev=4,U.next=7,(0,$.sO)({provider:P.provider,config:P,templates:R,language:j});case 7:if(D=U.sent,h=D.success,!h){U.next=12;break}return le.ZP.success("\u4FDD\u5B58\u6210\u529F"),U.abrupt("return",Promise.resolve(!0));case 12:return U.abrupt("return",Promise.reject());case 15:return U.prev=15,U.t0=U.catch(4),U.abrupt("return",Promise.reject());case 18:return U.prev=18,n(!1),U.finish(18);case 21:case"end":return U.stop()}},u,null,[[4,15,18,21]])}));return function(u){return O.apply(this,arguments)}}(),children:[(0,e.jsx)(he.Z,{name:"provider",label:"\u670D\u52A1\u63D0\u4F9B\u5546",rules:[{required:!0}],fieldProps:{onChange:function(){var O=Z()(a()().mark(function P(y){var x,R,D,h,re;return a()().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return n(!0),Y(y),i.resetFields(),i.setFieldsValue({provider:y}),(x=o.current)===null||x===void 0||x.resetFields(),se.next=7,(0,$.di)();case 7:if(R=se.sent,D=R.success,h=R.result,!(D&&h&&h.enabled&&h.provider===y)){se.next=16;break}return i.setFieldsValue(I()({},h.config)),_(h.language),se.next=15,k(h.language);case 15:(re=h.templates)===null||re===void 0||re.forEach(function(Oe){var me;(me=o.current)===null||me===void 0||me.setFieldsValue(T()({},Oe.type,{code:Oe.code}))});case 16:if(!(D&&h&&h.provider!==y)){se.next=20;break}return _(Ze.ZH),se.next=20,k(Ze.ZH);case 20:n(!1);case 21:case"end":return se.stop()}},P)}));function u(P){return O.apply(this,arguments)}return u}()},options:[{value:ae.Zw.ALIYUN,label:"\u963F\u91CC\u4E91"},{value:ae.Zw.TENCENT,label:"\u817E\u8BAF\u4E91"},{value:ae.Zw.QI_NIU,label:"\u4E03\u725B\u4E91"}]}),H===ae.Zw.ALIYUN&&(0,e.jsx)(br,{}),H===ae.Zw.TENCENT&&(0,e.jsx)(Ar,{}),H===ae.Zw.QI_NIU&&(0,e.jsx)(xr,{})]})),(0,e.jsx)("br",{}),(0,e.jsx)(ve.Z,{title:"\u53D1\u9001\u573A\u666F",bordered:!0,extra:(0,e.jsx)(yr.Z,{value:j,onChange:function(u){var P;_(u),n(!0),(P=o.current)===null||P===void 0||P.resetFields(),k(u).then(function(){(0,$.di)().then(function(y){var x=y.result,R=y.success;if(R&&x&&x.enabled&&x.provider===H&&x.language===u){var D;(D=x.templates)===null||D===void 0||D.forEach(function(h){var re;(re=o.current)===null||re===void 0||re.setFieldsValue(T()({},h.type,{code:h.code}))})}n(!1)})})},options:[{value:Ze.ZH,label:"\u4E2D\u6587"},{value:Ze.EN,label:"English"}]},"radio"),children:(0,e.jsx)(Sr.Z,{actionRef:L,columns:Ve,editableFormRef:o,scroll:{x:1200},cardProps:{bodyStyle:{padding:0}},value:we,rowKey:"type",pagination:!1,options:!1,editable:{type:"multiple",editableKeys:Q},recordCreatorProps:!1,search:!1})})]})})]})},Or=function(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(F.Z,{name:["config","domain"],label:"\u7ED1\u5B9A\u57DF\u540D",placeholder:"\u8BF7\u8F93\u5165\u963F\u91CC\u4E91OSS\u7ED1\u5B9A\u57DF\u540D",rules:[{required:!0,message:"\u963F\u91CC\u4E91OSS\u7ED1\u5B9A\u57DF\u540D\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z,{name:["config","accessKeyId"],label:"AccessKeyId",placeholder:"\u8BF7\u8F93\u5165\u963F\u91CC\u4E91OSS AccessKeyId",rules:[{required:!0,message:"\u963F\u91CC\u4E91OSS AccessKeyId\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z.Password,{name:["config","accessKeySecret"],label:"AccessKeySecret",rules:[{required:!0,message:"\u963F\u91CC\u4E91OSS AccessKeySecret\u4E3A\u5FC5\u586B\u9879"}],placeholder:"\u8BF7\u8F93\u5165\u963F\u91CC\u4E91OSS AccessKeySecret",fieldProps:{autoComplete:"new-password",iconRender:function(g){return g?(0,e.jsx)(be.Z,{}):(0,e.jsx)(je.Z,{})}}}),(0,e.jsx)(F.Z,{name:["config","endpoint"],label:"Endpoint",placeholder:"\u8BF7\u8F93\u5165\u963F\u91CC\u4E91OSS Endpoint",rules:[{required:!0,message:"\u963F\u91CC\u4E91OSS Endpoint\u4E3A\u5FC5\u586B\u9879"}]}),(0,e.jsx)(F.Z,{name:["config","bucket"],label:"Bucket",placeholder:"\u8BF7\u8F93\u5165\u963F\u91CC\u4E91OSS Bucket",rules:[{required:!0,message:"\u963F\u91CC\u4E91OSS Bucket\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}})]})},Dr=function(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(F.Z,{name:["config","accessKey"],label:"AccessKey",placeholder:"\u8BF7\u8F93\u5165MinIO AccessKey",rules:[{required:!0,message:"MinIO AccessKey\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z.Password,{name:["config","secretKey"],label:"SecretKey",rules:[{required:!0,message:"MinIO SecretKey\u4E3A\u5FC5\u586B\u9879"}],placeholder:"\u8BF7\u8F93\u5165MinIO SecretKey",fieldProps:{autoComplete:"new-password",iconRender:function(g){return g?(0,e.jsx)(be.Z,{}):(0,e.jsx)(je.Z,{})}}}),(0,e.jsx)(F.Z,{name:["config","domain"],label:"Domain",placeholder:"\u8BF7\u8F93\u5165MinIO Domain",rules:[{required:!0,message:"MinIO Domain\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z,{name:["config","endpoint"],label:"Endpoint",placeholder:"\u8BF7\u8F93\u5165MinIO Endpoint",rules:[{required:!0,message:"MinIO Endpoint\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z,{name:["config","bucket"],label:"Bucket",placeholder:"\u8BF7\u8F93\u5165MinIO Bucket",rules:[{required:!0,message:"MinIO Bucket\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}})]})},$r=function(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(F.Z,{name:["config","domain"],label:"\u7ED1\u5B9A\u57DF\u540D",placeholder:"\u8BF7\u8F93\u5165\u4E03\u725B\u4E91Kodo\u7ED1\u5B9A\u57DF\u540D",rules:[{required:!0,message:"\u4E03\u725B\u4E91Kodo\u7ED1\u5B9A\u57DF\u540D\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z,{name:["config","accessKey"],label:"AccessKey",placeholder:"\u8BF7\u8F93\u5165\u4E03\u725B\u4E91Kodo AccessKey",rules:[{required:!0,message:"\u4E03\u725B\u4E91Kodo AccessKey\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z.Password,{name:["config","secretKey"],label:"SecretKey",rules:[{required:!0,message:"\u4E03\u725B\u4E91Kodo SecretKey\u4E3A\u5FC5\u586B\u9879"}],placeholder:"\u8BF7\u8F93\u5165\u4E03\u725B\u4E91Kodo SecretKey",fieldProps:{autoComplete:"new-password",iconRender:function(g){return g?(0,e.jsx)(be.Z,{}):(0,e.jsx)(je.Z,{})}}}),(0,e.jsx)(F.Z,{name:["config","bucket"],label:"Bucket",placeholder:"\u8BF7\u8F93\u5165\u4E03\u725B\u4E91Kodo Bucket",rules:[{required:!0,message:"\u4E03\u725B\u4E91Kodo Bucket\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}})]})},Tr=function(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(F.Z,{name:["config","domain"],label:"\u7ED1\u5B9A\u57DF\u540D",placeholder:"\u8BF7\u8F93\u5165\u817E\u8BAF\u4E91COS\u7ED1\u5B9A\u57DF\u540D",rules:[{required:!0,message:"\u817E\u8BAF\u4E91COS\u7ED1\u5B9A\u57DF\u540D\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z,{name:["config","appId"],label:"AppId",placeholder:"\u8BF7\u8F93\u5165\u817E\u8BAF\u4E91COS AppId",rules:[{required:!0,message:"\u817E\u8BAF\u4E91COS AppId\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z,{name:["config","secretId"],label:"SecretId",placeholder:"\u8BF7\u8F93\u5165\u817E\u8BAF\u4E91COS SecretId",rules:[{required:!0,message:"\u817E\u8BAF\u4E91COS SecretId\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"new-password"}}),(0,e.jsx)(F.Z.Password,{name:["config","secretKey"],label:"SecretKey",placeholder:"\u8BF7\u8F93\u5165\u817E\u8BAF\u4E91COS SecretKey",rules:[{required:!0,message:"\u817E\u8BAF\u4E91COS SecretKey\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z,{name:["config","region"],label:"Region",placeholder:"\u8BF7\u8F93\u5165\u817E\u8BAF\u4E91COS Region",rules:[{required:!0,message:"\u817E\u8BAF\u4E91COS Region\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}}),(0,e.jsx)(F.Z,{name:["config","bucket"],label:"Bucket",placeholder:"\u8BF7\u8F93\u5165\u817E\u8BAF\u4E91COS Bucket",rules:[{required:!0,message:"\u817E\u8BAF\u4E91COS Bucket\u4E3A\u5FC5\u586B\u9879"}],fieldProps:{autoComplete:"off"}})]})},Nr=Fe.Z.confirm,Mr={labelCol:{xs:{span:24},sm:{span:7},md:{span:6}},wrapperCol:{xs:{span:24},sm:{span:13},md:{span:14}}},Kr={wrapperCol:{xs:{span:24,offset:0},sm:{span:17,offset:7},md:{span:18,offset:6}}},Te=de.ALIYUN_OSS,Rr=function(l){var g=l.visible,p=z.Z.useForm(),i=f()(p,1),o=i[0],L=(0,m.useState)(!1),E=f()(L,2),B=E[0],C=E[1],H=(0,m.useState)(!1),Y=f()(H,2),K=Y[0],w=Y[1],fe=(0,m.useState)(Te),J=f()(fe,2),N=J[0],M=J[1];return(0,ce.Z)(Z()(a()().mark(function S(){var d,c,t;return a()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!g){n.next=11;break}return o.resetFields(),C(!0),n.next=5,(0,$.QH)();case 5:return d=n.sent,c=d.success,t=d.result,c&&t&&t.enabled?(w(t.enabled),M(t.provider),o.setFieldsValue(I()({},t))):o.setFieldsValue({provider:N}),C(!1),n.abrupt("return");case 11:w(!1);case 12:case"end":return n.stop()}},S)})),[g]),(0,e.jsx)(Se.Z,{spinning:B,children:g&&(0,e.jsx)(ve.Z,{title:"\u5B58\u50A8\u63D0\u4F9B\u5546",headerBordered:!0,bordered:!1,collapsed:!K,style:{marginBottom:"24px"},extra:(0,e.jsx)(ie.Z,{noStyle:!0,preserve:!1,labelAlign:"right",fieldProps:{checked:K,onChange:function(){var S=Z()(a()().mark(function c(t){return a()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:t?w(t):Nr({title:"\u8B66\u544A",icon:(0,e.jsx)(Pe.Z,{}),content:"\u5173\u95ED\u6B64\u529F\u80FD\u5C06\u65E0\u6CD5\u4F7F\u7528\u5B58\u50A8\u670D\u52A1\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5173\u95ED\u3002",okText:"\u786E\u5B9A",okType:"danger",cancelText:"\u53D6\u6D88",centered:!0,onOk:function(){var r=Z()(a()().mark(function A(){var X,q;return a()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return C(!0),j.next=3,(0,$.wi)().finally(function(){C(!1)});case 3:if(X=j.sent,q=X.success,!q){j.next=12;break}return w(t),le.ZP.success("\u64CD\u4F5C\u6210\u529F"),M(Te),o.resetFields(),o.setFieldsValue({provider:Te}),j.abrupt("return");case 12:case"end":return j.stop()}},A)}));function W(){return r.apply(this,arguments)}return W}(),onCancel:function(){}});case 1:case"end":return n.stop()}},c)}));function d(c){return S.apply(this,arguments)}return d}()}}),children:(0,e.jsx)(Be.W,{children:(0,e.jsx)(oe.A,I()(I()({form:o,scrollToFirstError:!0,layout:"horizontal",labelAlign:"right"},Mr),{},{initialValues:{provider:Te},onReset:function(){o.resetFields(),o.setFieldsValue({enabled:K,provider:N})},submitter:{render:function(d,c){return(0,e.jsx)(z.Z.Item,I()(I()({},Kr),{},{children:(0,e.jsx)(De.Z,{children:c})}))},submitButtonProps:{style:{display:K?"":"none"}},resetButtonProps:{style:{display:K?"":"none"}}},onFinish:function(){var S=Z()(a()().mark(function d(c){var t,b;return a()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,$.tF)(c);case 2:if(t=r.sent,b=t.success,!b){r.next=7;break}return le.ZP.success("\u4FDD\u5B58\u6210\u529F"),r.abrupt("return",Promise.resolve(!0));case 7:return r.abrupt("return",Promise.reject());case 8:case"end":return r.stop()}},d)}));return function(d){return S.apply(this,arguments)}}(),children:K&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(he.Z,{name:"provider",label:"\u5B58\u50A8\u670D\u52A1\u5546",rules:[{required:!0}],fieldProps:{onChange:function(){var S=Z()(a()().mark(function c(t){var b,n,r;return a()().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return C(!0),M(t),o.resetFields(),o.setFieldsValue({provider:t}),A.next=6,(0,$.QH)();case 6:b=A.sent,n=b.success,r=b.result,n&&r&&r.enabled&&t===r.provider&&(w(r.enabled),o.setFieldsValue(I()({},r))),C(!1);case 11:case"end":return A.stop()}},c)}));function d(c){return S.apply(this,arguments)}return d}()},options:[{value:de.ALIYUN_OSS,label:"\u963F\u91CC\u4E91OSS"},{value:de.TENCENT_COS,label:"\u817E\u8BAF\u4E91COS"},{value:de.QINIU_KODO,label:"\u4E03\u725B\u4E91Kodo"},{value:de.MINIO,label:"MinIO"}]}),N===de.ALIYUN_OSS&&(0,e.jsx)(Or,{}),N===de.TENCENT_COS&&(0,e.jsx)(Tr,{}),N===de.QINIU_KODO&&(0,e.jsx)($r,{}),N===de.MINIO&&(0,e.jsx)(Dr,{})]})}))})})})},Le=s(67038),kr=s(98971),Lr=function(){var l=(0,m.useState)(),g=f()(l,2),p=g[0],i=g[1],o=(0,kr.useLocation)();return(0,m.useEffect)(function(){var L=(0,Le.parse)(o.search),E=L,B=E.tab;if(!B||!(B.toUpperCase()in G)){i(G.STORAGE),ge.m.replace({pathname:o.pathname,search:(0,Le.stringify)({tab:G.STORAGE})});return}i(B)},[p]),(0,e.jsxs)(Ce._z,{content:"\u7CFB\u7EDF\u57FA\u672C\u914D\u7F6E\uFF0C\u5982\u6587\u4EF6\u5B58\u50A8\u3001\u5730\u7406\u4F4D\u7F6E\u3001\u6D88\u606F\u670D\u52A1\u7B49\u3002",tabActiveKey:p,onTabChange:function(E){i(E),ge.m.replace({pathname:o.pathname,search:(0,Le.stringify)({tab:E})})},tabList:[{tab:"\u6587\u4EF6\u5B58\u50A8",key:G.STORAGE},{tab:"\u5730\u7406\u4F4D\u7F6E",key:G.LOCATION},{tab:"\u90AE\u4EF6\u670D\u52A1",key:G.MAIL},{tab:"\u77ED\u4FE1\u670D\u52A1",key:G.SMS}],children:[p===G.STORAGE&&(0,e.jsx)(Rr,{visible:p===G.STORAGE}),p===G.LOCATION&&(0,e.jsx)(Qe,{visible:p===G.LOCATION}),p===G.MAIL&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(sr,{visible:p===G.MAIL}),(0,e.jsx)(Fr,{visible:p===G.MAIL})]}),p===G.SMS&&(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(wr,{visible:p===G.SMS})})]})}}}]); diff --git a/eiam-console/src/main/resources/fe/p__setting__Security__index.4e05945a.async.js b/eiam-console/src/main/resources/fe/p__setting__Security__index.4e05945a.async.js new file mode 100644 index 00000000..8d6b8641 --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__setting__Security__index.4e05945a.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[2666],{28058:function(X,I,r){r.d(I,{Z:function(){return h}});var i=r(1413),t=r(67294),B={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"},f=B,A=r(84089),l=function(u,m){return t.createElement(A.Z,(0,i.Z)((0,i.Z)({},u),{},{ref:m,icon:f}))};l.displayName="WarningOutlined";var h=t.forwardRef(l)},63434:function(X,I,r){var i=r(1413),t=r(91),B=r(85893),f=r(22270),A=r(32808),l=r(67294),h=r(90789),n=r(7772),u=["options","fieldProps","proFieldProps","valueEnum"],m=l.forwardRef(function(d,a){var E=d.options,F=d.fieldProps,P=d.proFieldProps,H=d.valueEnum,j=(0,t.Z)(d,u);return(0,B.jsx)(n.Z,(0,i.Z)({ref:a,valueType:"checkbox",valueEnum:(0,f.h)(H,void 0),fieldProps:(0,i.Z)({options:E},F),lightProps:(0,i.Z)({labelFormatter:function(){return(0,B.jsx)(n.Z,(0,i.Z)({ref:a,valueType:"checkbox",mode:"read",valueEnum:(0,f.h)(H,void 0),filedConfig:{customLightMode:!0},fieldProps:(0,i.Z)({options:E},F),proFieldProps:P},j))}},j.lightProps),proFieldProps:P},j))}),s=l.forwardRef(function(d,a){var E=d.fieldProps,F=d.children;return(0,B.jsx)(A.Z,(0,i.Z)((0,i.Z)({ref:a},E),{},{children:F}))}),C=(0,h.G)(s,{valuePropName:"checked"}),o=C;o.Group=m,I.Z=o},86615:function(X,I,r){var i=r(1413),t=r(91),B=r(85893),f=r(22270),A=r(78045),l=r(67294),h=r(90789),n=r(7772),u=["fieldProps","options","radioType","layout","proFieldProps","valueEnum"],m=l.forwardRef(function(d,a){var E=d.fieldProps,F=d.options,P=d.radioType,H=d.layout,j=d.proFieldProps,e=d.valueEnum,J=(0,t.Z)(d,u);return(0,B.jsx)(n.Z,(0,i.Z)((0,i.Z)({valueType:P==="button"?"radioButton":"radio",ref:a,valueEnum:(0,f.h)(e,void 0)},J),{},{fieldProps:(0,i.Z)({options:F,layout:H},E),proFieldProps:j,filedConfig:{customLightMode:!0}}))}),s=l.forwardRef(function(d,a){var E=d.fieldProps,F=d.children;return(0,B.jsx)(A.ZP,(0,i.Z)((0,i.Z)({},E),{},{ref:a,children:F}))}),C=(0,h.G)(s,{valuePropName:"checked",ignoreWidth:!0}),o=C;o.Group=m,o.Button=A.ZP.Button,o.displayName="ProFormComponent",I.Z=o},64317:function(X,I,r){var i=r(1413),t=r(91),B=r(85893),f=r(22270),A=r(67294),l=r(66758),h=r(7772),n=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],u=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],m=A.forwardRef(function(a,E){var F=a.fieldProps,P=a.children,H=a.params,j=a.proFieldProps,e=a.mode,J=a.valueEnum,_=a.request,q=a.showSearch,ue=a.options,ee=(0,t.Z)(a,n),Q=(0,A.useContext)(l.Z);return(0,B.jsx)(h.Z,(0,i.Z)((0,i.Z)({valueEnum:(0,f.h)(J),request:_,params:H,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,i.Z)({options:ue,mode:e,showSearch:q,getPopupContainer:Q.getPopupContainer},F),ref:E,proFieldProps:j},ee),{},{children:P}))}),s=A.forwardRef(function(a,E){var F=a.fieldProps,P=a.children,H=a.params,j=a.proFieldProps,e=a.mode,J=a.valueEnum,_=a.request,q=a.options,ue=(0,t.Z)(a,u),ee=(0,i.Z)({options:q,mode:e||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},F),Q=(0,A.useContext)(l.Z);return(0,B.jsx)(h.Z,(0,i.Z)((0,i.Z)({valueEnum:(0,f.h)(J),request:_,params:H,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,i.Z)({getPopupContainer:Q.getPopupContainer},ee),ref:E,proFieldProps:j},ue),{},{children:P}))}),C=m,o=s,d=C;d.SearchSelect=o,d.displayName="ProFormComponent",I.Z=d},52688:function(X,I,r){var i=r(1413),t=r(91),B=r(85893),f=r(67294),A=r(7772),l=["fieldProps","unCheckedChildren","checkedChildren","proFieldProps"],h=f.forwardRef(function(n,u){var m=n.fieldProps,s=n.unCheckedChildren,C=n.checkedChildren,o=n.proFieldProps,d=(0,t.Z)(n,l);return(0,B.jsx)(A.Z,(0,i.Z)({valueType:"switch",fieldProps:(0,i.Z)({unCheckedChildren:s,checkedChildren:C},m),ref:u,valuePropName:"checked",proFieldProps:o,filedConfig:{valuePropName:"checked",ignoreWidth:!0}},d))});I.Z=h},5966:function(X,I,r){var i=r(1413),t=r(91),B=r(85893),f=r(7772),A=["fieldProps","proFieldProps"],l=["fieldProps","proFieldProps"],h="text",n=function(C){var o=C.fieldProps,d=C.proFieldProps,a=(0,t.Z)(C,A);return(0,B.jsx)(f.Z,(0,i.Z)({valueType:h,fieldProps:o,filedConfig:{valueType:h},proFieldProps:d},a))},u=function(C){var o=C.fieldProps,d=C.proFieldProps,a=(0,t.Z)(C,l);return(0,B.jsx)(f.Z,(0,i.Z)({valueType:"password",fieldProps:o,proFieldProps:d,filedConfig:{valueType:h}},a))},m=n;m.Password=u,m.displayName="ProFormComponent",I.Z=m},76593:function(X,I,r){r.d(I,{W:function(){return a}});var i=r(94184),t=r.n(i),B=r(11281),f=r.n(B),A=r(12812),l=r.n(A),h=r(14855),n=r(46986),u=r(67294),m=n.ZP.ConfigContext,s=function(F){var P=F.prefixCls;return l()({},"".concat(P),{margin:"0 auto"})};function C(E){var F=(0,u.useContext)(m),P=F.getPrefixCls,H=".".concat(P());return(0,h.Xj)("ContainerComponent",function(j){var e=f()(f()({},j),{},{prefixCls:".".concat(E),antCls:H});return[s(e)]})}var o=r(85893),d="topiam-container",a=function(F){var P=F.children,H=P===void 0?null:P,j=F.maxWidth,e=j===void 0?1e3:j,J=C(d),_=J.wrapSSR,q=J.hashId;return _((0,o.jsx)("div",{className:t()("".concat(d),q),style:{maxWidth:e},children:H}))}},11911:function(X,I,r){r.d(I,{Gh:function(){return l},SC:function(){return h},Zw:function(){return t},b$:function(){return A},n6:function(){return B},pR:function(){return f},rD:function(){return i}});var i;(function(n){n.EX900005="EX900005",n.EX000102="EX000102",n.EX000202="EX000202",n.SUCCESS="200"})(i||(i={}));var t;(function(n){n.ALIYUN="aliyun",n.QI_NIU="qiniu",n.TENCENT="tencent",n.NET_EASE="netease",n.MAXMIND="maxmind"})(t||(t={}));var B;(function(n){n.ALIYUN="aliyun",n.TENCENT="tencent",n.GEE_TEST="geetest",n.HCAPTCHA="hcaptcha",n.RECAPTCHA="recaptcha"})(B||(B={}));var f;(function(n){n.STANDARD="standard",n.CUSTOM_MADE="custom_made"})(f||(f={}));var A;(function(n){n.SAML2="saml2",n.OIDC="oidc",n.CAS="cas",n.JWT="jwt",n.FORM="form",n.OAUTH2="oauth2"})(A||(A={}));var l;(function(n){n.ALLOW="ALLOW",n.DENY="DENY"})(l||(l={}));var h;(function(n){n.ROLE="ROLE",n.RESOURCE="RESOURCE",n.USER="USER",n.ORGANIZATION="ORGANIZATION",n.USER_GROUP="USER_GROUP"})(h||(h={}))},4560:function(X,I,r){r.r(I),r.d(I,{default:function(){return sr}});var i=r(97983),t=r.n(i),B=r(40794),f=r.n(B),A=r(12741),l=r.n(A),h=r(14459),n=r(11281),u=r.n(n),m=r(76593),s=r(62387),C=r(38345),o=r(97269),d=r(2236),a=r(43825),E=r(2453),F=r(57953),P=r(43262),H=r(96074),j=r(67294),e=r(85893),J={labelCol:{span:6},wrapperCol:{span:18}},_=function(g){var O=a.Z.useForm(),Z=l()(O,1),c=Z[0],W=(0,j.useState)(!0),K=l()(W,2),$=K[0],S=K[1],R=(0,j.useState)(!1),k=l()(R,2),L=k[0],G=k[1];return(0,j.useEffect)(function(){g.visible&&(S(!0),(0,s.EA)().then(function(x){x.success&&(c.setFieldsValue(x.result),S(!1))}))},[c,g.visible]),(0,e.jsx)(C.Z,{title:"\u57FA\u7840\u8BBE\u7F6E",headerBordered:!0,children:(0,e.jsx)(m.W,{children:(0,e.jsx)(o.A,u()(u()({form:c,scrollToFirstError:!0},J),{},{layout:"horizontal",requiredMark:!1,labelAlign:"left",onFinish:function(){var x=f()(t()().mark(function M(y){var b,v,p;return t()().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return b=y,S(!0),G(!0),Math.sign(y.sessionMaximum)===0&&(b=u()(u()({},b),{},{sessionMaximum:1}),c.setFieldValue("sessionMaximum",1)),T.next=6,(0,s.r3)(b).finally(function(){S(!1),G(!1)});case 6:v=T.sent,p=v.success,p&&E.ZP.success("\u64CD\u4F5C\u6210\u529F");case 9:case"end":return T.stop()}},M)}));return function(M){return x.apply(this,arguments)}}(),submitter:{render:function(M,y){return(0,e.jsx)(d.S,{children:y})},submitButtonProps:{loading:L},resetButtonProps:{style:{display:"none"}}},children:(0,e.jsxs)(F.Z,{spinning:$,children:[(0,e.jsx)(o.A.Item,{name:"sessionMaximum",extra:"\u540C\u4E00\u7528\u6237\u540C\u65F6\u5728\u7EBF\u6570\u91CF\uFF0C-1\u4E3A\u4E0D\u9650\u5236\u3002",label:"\u7528\u6237\u5E76\u53D1\u6570",children:(0,e.jsx)(P.Z,{min:-1,max:100})}),(0,e.jsx)(o.A.Item,{label:"\u4F1A\u8BDD\u6709\u6548\u65F6\u95F4",name:"sessionValidTime",addonAfter:"\u79D2\uFF08\u6682\u672A\u652F\u6301\uFF09",children:(0,e.jsx)(P.Z,{min:18e3,readOnly:!0})}),(0,e.jsx)(o.A.Item,{label:"\u8BB0\u4F4F\u6211\u6709\u6548\u65F6\u95F4",name:"rememberMeValidTime",addonAfter:"\u79D2",children:(0,e.jsx)(P.Z,{min:43200})}),(0,e.jsx)(o.A.Item,{label:"\u9A8C\u8BC1\u7801\u6709\u6548\u65F6\u95F4",name:"verifyCodeValidTime",extra:"\u9A8C\u8BC1\u573A\u666F\u4E0B\uFF0C\u9A8C\u8BC1\u7801\u9A8C\u8BC1\u6709\u6548\u65F6\u95F4\u3002",addonAfter:"\u5206",children:(0,e.jsx)(P.Z,{min:1,max:30})}),(0,e.jsx)(H.Z,{}),(0,e.jsx)(o.A.Item,{label:"\u8FDE\u7EED\u767B\u5F55\u5931\u8D25\u6301\u7EED\u65F6\u95F4",name:"loginFailureDuration",addonAfter:"\u5206\u949F",children:(0,e.jsx)(P.Z,{})}),(0,e.jsx)(o.A.Item,{label:"\u8FDE\u7EED\u767B\u5F55\u5931\u8D25\u6B21\u6570",name:"loginFailureCount",extra:'\u7BA1\u7406\u5458\u8BBE\u7F6E\u7528\u6237\u8FDE\u7EED\u767B\u5F55\u5931\u8D25\u6B21\u6570\uFF0C\u5728"\u5141\u8BB8\u6301\u7EED\u65F6\u95F4" \u8FBE\u5230\u8BBE\u7F6E\u503C\uFF0C\u5F53\u524D\u8D26\u6237\u88AB\u9501\u5B9A\u3002',addonAfter:"\u81EA\u52A8\u9501\u5B9A",children:(0,e.jsx)(P.Z,{})}),(0,e.jsx)(o.A.Item,{label:"\u81EA\u52A8\u89E3\u9501\u65F6\u95F4",name:"autoUnlockTime",extra:"\u7BA1\u7406\u5458\u8BBE\u7F6E\u81EA\u52A8\u89E3\u9501\u65F6\u95F4\uFF0C\u7528\u6237\u8FDE\u7EED\u767B\u5F55\u5931\u8D25\u88AB\u9501\u5B9A\u540E\uFF0C\u8FBE\u5230\u5BF9\u5E94\u65F6\u95F4\uFF0C\u5C06\u81EA\u52A8\u89E3\u9501\u3002",addonAfter:"\u5206\u949F",children:(0,e.jsx)(P.Z,{min:0})})]})}))})})},q=r(69677),ue=r(99138),ee=r(71230),Q=r(15746),re=r(83062),ve=r(72269),ne=r(25035),pe=r(86615),de=r(52688),ie=r(97462),te=r(2093),he=r(69400),Ce=r(51158),be=function(g){var O=g.visible,Z=g.onCancel,c=(0,j.useState)(),W=l()(c,2),K=W[0],$=W[1],S=(0,j.useState)(!0),R=l()(S,2),k=R[0],L=R[1];return(0,te.Z)(f()(t()().mark(function G(){var x,M,y,b;return t()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(!O){p.next=9;break}return L(!0),p.next=4,(0,s.uE)();case 4:x=p.sent,M=x.success,y=x.result,M&&y&&(b=y==null?void 0:y.map(function(D){return D.value}),$(b)),L(!1);case 9:case"end":return p.stop()}},G)})),[O]),(0,e.jsx)(he.Z,{open:O,title:"\u5185\u7F6E\u5F31\u5BC6\u7801\u5E93",footer:!1,onCancel:Z,destroyOnClose:!0,children:(0,e.jsx)(F.Z,{spinning:k,children:(0,e.jsx)(Ce.ZP,{size:"small",bordered:!1,dataSource:K,pagination:{simple:!0},renderItem:function(x){return(0,e.jsx)(Ce.ZP.Item,{children:x})}})})})},De=r(94184),Ee=r.n(De),Se=r(12812),oe=r.n(Se),Te=r(14855),xe=r(46986),Ie=xe.ZP.ConfigContext,Oe=function(O){var Z=O.prefixCls,c=O.antCls;return oe()({},"".concat(Z),oe()({},".ant-pro-field-radio-vertical ".concat(c,"-radio-wrapper"),{display:"block",height:"30px","margin-bottom":" 5px","line-height":"30px"}))};function Me(g){var O=(0,j.useContext)(Ie),Z=O.getPrefixCls,c=".".concat(Z());return(0,Te.Xj)("SettingPasswordPolicy",function(W){var K=u()(u()({},W),{},{prefixCls:".".concat(g),antCls:c});return[Oe(K)]})}var We=q.Z.TextArea,Fe="password-policy",Re={labelCol:{span:6},wrapperCol:{span:18}},Le=function(g){var O=a.Z.useForm(),Z=l()(O,1),c=Z[0],W=Me(Fe),K=W.wrapSSR,$=W.hashId,S=(0,j.useState)(!1),R=l()(S,2),k=R[0],L=R[1],G=(0,j.useState)(!0),x=l()(G,2),M=x[0],y=x[1];return(0,te.Z)(f()(t()().mark(function b(){var v;return t()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(!g.visible){D.next=7;break}return y(!0),D.next=4,(0,s.Tz)();case 4:v=D.sent,v!=null&&v.success&&c.setFieldsValue(u()({},v==null?void 0:v.result)),y(!1);case 7:case"end":return D.stop()}},b)})),[c,g.visible]),K((0,e.jsxs)(C.Z,{title:"\u5BC6\u7801\u7B56\u7565",headerBordered:!0,className:Ee()("".concat(Fe),$),children:[(0,e.jsx)(ue.Z,{style:{backgroundColor:"#f1f1f2",border:"1px solid #f1f1f2"},message:"\u914D\u7F6E\u5BC6\u7801\u76F8\u5173\u7B56\u7565\u3002\u4FDD\u5B58\u540E\uFF0C\u6240\u6709\u5BC6\u7801\u65B0\u589E\u6216\u53D8\u66F4\u5747\u4F1A\u8FDB\u884C\u6821\u9A8C\u3002"}),(0,e.jsx)("br",{}),(0,e.jsxs)(m.W,{children:[(0,e.jsx)(o.A,u()(u()({form:c,scrollToFirstError:!0},Re),{},{layout:"horizontal",labelAlign:"left",onFinish:function(){var b=f()(t()().mark(function v(p){var D,T;return t()().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return y(!0),Y.next=3,(0,s.RJ)(p).finally(function(){y(!1)});case 3:D=Y.sent,T=D.success,T&&E.ZP.success("\u4FDD\u5B58\u6210\u529F");case 6:case"end":return Y.stop()}},v)}));return function(v){return b.apply(this,arguments)}}(),submitter:{render:function(v,p){return(0,e.jsx)(d.S,{children:p})},resetButtonProps:{style:{display:"none"}}},children:(0,e.jsxs)(F.Z,{spinning:M,children:[(0,e.jsx)(a.Z.Item,{label:"\u5BC6\u7801\u957F\u5EA6\u9650\u5236",style:{marginBottom:0},children:(0,e.jsxs)(ee.Z,{gutter:[8,8],children:[(0,e.jsx)(Q.Z,{xs:10,sm:10,md:8,lg:8,xl:6,children:(0,e.jsx)(a.Z.Item,{label:"\u6700\u5C0F\u957F\u5EA6",name:"passwordLeastLength",children:(0,e.jsx)(P.Z,{min:8,max:10})})}),(0,e.jsx)(Q.Z,{xs:10,sm:10,md:8,lg:8,xl:6,children:(0,e.jsx)(a.Z.Item,{label:"\u6700\u5927\u957F\u5EA6",name:"passwordBiggestLength",style:{float:"right"},children:(0,e.jsx)(P.Z,{min:1,max:30})})})]})}),(0,e.jsx)(pe.Z.Group,{layout:"vertical",label:"\u5BC6\u7801\u590D\u6742\u5EA6",name:"passwordComplexity",options:[{value:"0",label:"\u4EFB\u610F\u5BC6\u7801"},{value:"1",label:"\u5FC5\u987B\u5305\u542B\u6570\u5B57\u548C\u5B57\u6BCD"},{value:"2",label:"\u5FC5\u987B\u5305\u542B\u6570\u5B57\u548C\u5927\u5199\u5B57\u6BCD"},{value:"3",label:"\u5FC5\u987B\u5305\u542B\u6570\u5B57\u3001\u5927\u5199\u5B57\u6BCD\u3001\u5C0F\u5199\u5B57\u6BCD\u3001\u548C\u7279\u6B8A\u5B57\u7B26"},{value:"4",label:"\u81F3\u5C11\u5305\u542B\u6570\u5B57\u3001\u5B57\u6BCD\u3001\u548C\u7279\u6B8A\u5B57\u7B26\u4E2D\u7684\u4E24\u79CD"},{value:"5",label:"\u81F3\u5C11\u5305\u542B\u6570\u5B57\u3001\u5927\u5199\u5B57\u6BCD\u3001\u5C0F\u5199\u5B57\u6BCD\u3001\u548C\u7279\u6B8A\u5B57\u7B26\u4E2D\u7684\u4E09\u79CD"}]}),(0,e.jsx)(a.Z.Item,{style:{marginBottom:0},label:(0,e.jsxs)("span",{children:["\u5BC6\u7801\u8FC7\u671F\u68C0\u67E5\xA0",(0,e.jsx)(re.Z,{title:"\u5F00\u542F\u540E\uFF0C\u7CFB\u7EDF\u4F1A\u8BA1\u7B97\u5BC6\u7801\u8BBE\u7F6E\u65F6\u95F4",children:(0,e.jsx)(ne.Z,{})})]}),children:(0,e.jsxs)(ee.Z,{gutter:[8,8],children:[(0,e.jsx)(Q.Z,{xs:10,sm:11,md:9,lg:8,xl:6,children:(0,e.jsxs)(a.Z.Item,{label:"\u6709\u6548\u671F",children:[(0,e.jsx)(a.Z.Item,{name:"passwordValidDays",noStyle:!0,children:(0,e.jsx)(P.Z,{min:7,max:365})}),(0,e.jsx)("span",{children:"\xA0\u5929"})]})}),(0,e.jsx)(Q.Z,{xs:12,sm:13,md:12,lg:9,xl:8,children:(0,e.jsxs)(a.Z.Item,{label:"\u8FC7\u671F\u524D",children:[(0,e.jsx)(a.Z.Item,{name:"passwordValidWarnBeforeDays",noStyle:!0,children:(0,e.jsx)(P.Z,{min:7,max:30})}),(0,e.jsx)("span",{children:"\xA0\u5929\u63D0\u9192"})]})})]})}),(0,e.jsx)(a.Z.Item,{name:"notSameChars",label:(0,e.jsxs)("span",{children:["\u5BC6\u7801\u76F8\u540C\u5B57\u7B26\xA0",(0,e.jsx)(re.Z,{title:"\u5BC6\u7801\u4E0D\u80FD\u8FDE\u7EED\u5B58\u5728\u76F8\u540C\u5B57\u7B26\u4E2A\u6570",children:(0,e.jsx)(ne.Z,{})})]}),children:(0,e.jsx)(P.Z,{min:1,max:10})}),(0,e.jsx)(de.Z,{name:"includeAccountCheck",valuePropName:"checked",label:(0,e.jsxs)("span",{children:["\u7528\u6237\u4FE1\u606F\u68C0\u67E5\xA0",(0,e.jsx)(re.Z,{title:"\u5F00\u542F\u540E\uFF0C\u5BC6\u7801\u4E2D\u5C06\u4E0D\u80FD\u5305\u542B\u7528\u6237\u540D\u3001\u624B\u673A\u53F7\u3001\u90AE\u7BB1\u524D\u7F00\u548C\u59D3\u540D\u62FC\u97F3",children:(0,e.jsx)(ne.Z,{})})]})}),(0,e.jsx)(de.Z,{name:"historyPasswordCheck",label:(0,e.jsxs)("span",{children:["\u5386\u53F2\u5BC6\u7801\u68C0\u67E5\xA0",(0,e.jsx)(re.Z,{title:"\u68C0\u67E5\u8BBE\u7F6E\u7684\u5BC6\u7801\u662F\u5426\u4E3A\u5386\u53F2\u5BC6\u7801\u3002",children:(0,e.jsx)(ne.Z,{})})]})}),(0,e.jsx)(ie.Z,{name:["historyPasswordCheck"],children:function(v){var p=v.historyPasswordCheck;return p?(0,e.jsx)(a.Z.Item,{label:(0,e.jsxs)("span",{children:["\u5386\u53F2\u5BC6\u7801\u6B21\u6570\u8303\u56F4\xA0",(0,e.jsx)(re.Z,{title:"\u68C0\u67E5\u5386\u53F2\u5BC6\u7801\u6B21\u6570\u8303\u56F4\uFF0C\u8BE5\u503C\u5FC5\u987B\u4ECB\u4E8E1\u523010\u6B21\u5BC6\u7801\u4E4B\u95F4\u3002",children:(0,e.jsx)(ne.Z,{})})]}),children:(0,e.jsx)(a.Z.Item,{name:"historyPasswordCheckCount",noStyle:!0,children:(0,e.jsx)(P.Z,{min:1,max:10})})}):(0,e.jsx)(e.Fragment,{})}}),(0,e.jsx)(a.Z.Item,{label:(0,e.jsxs)("span",{children:["\u975E\u6CD5\u5B57\u7B26\u5E8F\u5217\xA0",(0,e.jsx)(re.Z,{title:"\u9632\u6B62\u975E\u6CD5\u5B57\u7B26\u5E8F\u5217\uFF0C\u4F8B\u5982\u952E\u76D8\u3001\u5B57\u6BCD\u3001\u6570\u5B57\u3002",children:(0,e.jsx)(ne.Z,{})})]}),name:"illegalSequenceCheck",valuePropName:"checked",children:(0,e.jsx)(ve.Z,{})}),(0,e.jsxs)(a.Z.Item,{label:(0,e.jsxs)("span",{children:["\u5F31\u5BC6\u7801\u68C0\u67E5\xA0",(0,e.jsx)(re.Z,{title:"\u5F31\u5BC6\u7801\u901A\u5E38\u662F\u6307\u5BB9\u6613\u88AB\u522B\u4EBA\u731C\u6D4B\u5230\u6216\u88AB\u7834\u89E3\u5DE5\u5177\u7834\u89E3\u7684\u5BC6\u7801\u3002\u5728\u8BBE\u7F6E\u6216\u4FEE\u6539\u5BC6\u7801\u65F6\uFF0C\u5982\u679C\u5BC6\u7801\u662F\u5F31\u5BC6\u7801\u5B57\u5178\u4E2D\u7684\u5BC6\u7801\uFF0C\u5219\u7CFB\u7EDF\u4F1A\u5F3A\u5236\u7528\u6237\u91CD\u65B0\u8BBE\u7F6E\uFF0C\u4EE5\u63D0\u5347\u7528\u6237\u5BC6\u7801\u7684\u5B89\u5168\u6027\u3002",children:(0,e.jsx)(ne.Z,{})})]}),children:[(0,e.jsx)(a.Z.Item,{noStyle:!0,name:"weakPasswordCheck",valuePropName:"checked",children:(0,e.jsx)(ve.Z,{})}),(0,e.jsx)(ie.Z,{name:["weakPasswordCheck"],children:function(v){var p=v.weakPasswordCheck;return p&&(0,e.jsx)("span",{children:(0,e.jsx)("a",{onClick:function(){L(!0)},children:"\xA0\u5185\u7F6E\u5F31\u5BC6\u7801\u5E93"})})}})]}),(0,e.jsx)(ie.Z,{name:["weakPasswordCheck"],children:function(v){var p=v.weakPasswordCheck;return p&&(0,e.jsx)(a.Z.Item,{label:"\u5176\u4ED6\u5F31\u5BC6\u7801",extra:(0,e.jsx)("span",{children:"\u6BCF\u884C\u4EE3\u8868\u4E00\u6761\u5F31\u5BC6\u7801"}),children:(0,e.jsx)(ee.Z,{children:(0,e.jsx)(Q.Z,{span:10,children:(0,e.jsx)(a.Z.Item,{name:"customWeakPassword",style:{marginBottom:5},children:(0,e.jsx)(We,{rows:3})})})})})}})]})})),(0,e.jsx)(be,{visible:k,onCancel:function(){L(!1)}})]})]}))},Ue=Le,Pe=r(84865),z=r(11911),we=r(28058),je=r(64317),Be=r(26713),le=r(5966),Ne=function(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(le.Z,{name:["config","regionId"],label:"RegionId",rules:[{required:!0,message:" RegionId \u4E3A\u5FC5\u586B\u9879"}]}),(0,e.jsx)(le.Z,{name:["config","accessKeyId"],label:"accessKeyId",rules:[{required:!0,message:"AccessKeyId \u4E3A\u5FC5\u586B\u9879"}]}),(0,e.jsx)(le.Z,{name:["config","accessKeySecret"],label:"accessKeySecret",rules:[{required:!0,message:"AccessKeySecret \u4E3A\u5FC5\u586B\u9879"}]}),(0,e.jsx)(je.Z,{name:["config","mode"],label:"\u9A8C\u8BC1\u65B9\u5F0F",options:[{value:"slide",label:"\u6ED1\u52A8\u9A8C\u8BC1"},{value:"traceless",label:"\u65E0\u75D5\u9A8C\u8BC1"},{value:"smart",label:"\u667A\u80FD\u9A8C\u8BC1"}],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u9A8C\u8BC1\u65B9\u5F0F"}]})]})},Ke=Ne,$e=function(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(le.Z,{name:["config","captchaId"],label:"\u9A8C\u8BC1 ID",rules:[{required:!0,message:"\u9A8C\u8BC1 ID \u4E3A\u5FC5\u586B\u9879"}]}),(0,e.jsx)(le.Z.Password,{name:["config","captchaKey"],label:"\u9A8C\u8BC1 KEY",rules:[{required:!0,message:"\u9A8C\u8BC1 KEY \u4E3A\u5FC5\u586B\u9879"}]})]})},ce=$e,Ge=function(){return(0,e.jsx)(e.Fragment,{})},Ve=Ge,He=he.Z.confirm,Ye={labelCol:{xs:{span:24},sm:{span:7},md:{span:6}},wrapperCol:{xs:{span:24},sm:{span:13},md:{span:14}}},ze={wrapperCol:{xs:{span:24,offset:0},sm:{span:17,offset:7},md:{span:18,offset:6}}},fe=z.n6.GEE_TEST,ke=function(g){var O=a.Z.useForm(),Z=l()(O,1),c=Z[0],W=g.visible,K=(0,j.useState)(fe),$=l()(K,2),S=$[0],R=$[1],k=(0,j.useState)(!1),L=l()(k,2),G=L[0],x=L[1],M=(0,j.useState)(!1),y=l()(M,2),b=y[0],v=y[1];return(0,te.Z)(f()(t()().mark(function p(){var D,T,U;return t()().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(!W){V.next=11;break}return c.resetFields(),x(!0),V.next=5,(0,s.mg)();case 5:return D=V.sent,T=D.success,U=D.result,T&&U&&U.enabled?(v(U.enabled),R(U.provider),c.setFieldsValue(u()({},U))):c.setFieldsValue({provider:S}),x(!1),V.abrupt("return");case 11:v(!1);case 12:case"end":return V.stop()}},p)})),[W]),(0,e.jsx)(F.Z,{spinning:G,children:(0,e.jsx)(C.Z,{title:"\u884C\u4E3A\u9A8C\u8BC1\u7801",headerBordered:!0,bordered:!1,collapsed:!b,style:{marginBottom:"24px"},extra:(0,e.jsx)(de.Z,{noStyle:!0,fieldProps:{checked:b,onChange:function(){var p=f()(t()().mark(function T(U){return t()().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:U?v(U):He({title:"\u8B66\u544A",icon:(0,e.jsx)(we.Z,{}),content:"\u5173\u95ED\u6B64\u529F\u80FD\u5C06\u65E0\u6CD5\u4F7F\u7528\u884C\u4E3A\u9A8C\u8BC1\u7801\u9A8C\u8BC1\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5173\u95ED\u3002",okText:"\u786E\u5B9A",okType:"danger",cancelText:"\u53D6\u6D88",centered:!0,onOk:function(){var w=f()(t()().mark(function ae(){var Ze,ye;return t()().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return x(!0),se.next=3,(0,s.$g)().finally(function(){x(!1)});case 3:if(Ze=se.sent,ye=Ze.success,!ye){se.next=12;break}return v(U),E.ZP.success("\u64CD\u4F5C\u6210\u529F"),R(fe),c.resetFields(),c.setFieldsValue({provider:fe}),se.abrupt("return");case 12:case"end":return se.stop()}},ae)}));function Ae(){return w.apply(this,arguments)}return Ae}(),onCancel:function(){}});case 1:case"end":return V.stop()}},T)}));function D(T){return p.apply(this,arguments)}return D}()}}),children:(0,e.jsx)(m.W,{children:(0,e.jsxs)(o.A,u()(u()({form:c,scrollToFirstError:!0,layout:"horizontal",initialValues:{provider:"aliyun"}},Ye),{},{labelAlign:"right",onReset:function(){c.resetFields(),c.setFieldsValue({provider:S})},submitter:{render:function(D,T){return(0,e.jsx)(a.Z.Item,u()(u()({},ze),{},{children:(0,e.jsx)(Be.Z,{children:T})}))},submitButtonProps:{style:{display:b?"":"none"}},resetButtonProps:{style:{display:b?"":"none"}}},onFinish:function(){var p=f()(t()().mark(function D(T){var U,Y;return t()().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,(0,s.oE)({provider:T.provider,config:u()(u()({},T.config),{},{provider:T.provider})});case 2:if(U=w.sent,Y=U.success,!Y){w.next=7;break}return E.ZP.success("\u4FDD\u5B58\u6210\u529F"),w.abrupt("return",Promise.resolve(!0));case 7:return w.abrupt("return",Promise.reject());case 8:case"end":return w.stop()}},D)}));return function(D){return p.apply(this,arguments)}}(),children:[(0,e.jsx)(je.Z,{name:"provider",label:"\u670D\u52A1\u63D0\u4F9B\u5546",rules:[{required:!0}],fieldProps:{onChange:function(){var p=f()(t()().mark(function T(U){var Y,V,w;return t()().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return x(!0),R(U),c.resetFields(),c.setFieldsValue({provider:U}),ae.next=6,(0,s.mg)();case 6:Y=ae.sent,V=Y.success,w=Y.result,V&&w&&w.enabled&&U===w.provider&&(v(w.enabled),c.setFieldsValue(u()({},w))),x(!1);case 11:case"end":return ae.stop()}},T)}));function D(T){return p.apply(this,arguments)}return D}()},options:[{value:z.n6.GEE_TEST,label:"\u6781\u9A8C\uFF08\u6682\u672A\u5B9E\u73B0\uFF0C\u6B22\u8FCEPR\uFF09",disabled:!0},{value:z.n6.ALIYUN,label:"\u963F\u91CC\u4E91\uFF08\u6682\u672A\u5B9E\u73B0\uFF0C\u6B22\u8FCEPR\uFF09",disabled:!0},{value:z.n6.TENCENT,label:"\u817E\u8BAF\u4E91\uFF08\u6682\u672A\u5B9E\u73B0\uFF0C\u6B22\u8FCEPR\uFF09",disabled:!0},{value:z.n6.RECAPTCHA,label:"reCaptcha\uFF08\u6682\u672A\u5B9E\u73B0\uFF0C\u6B22\u8FCEPR\uFF09",disabled:!0},{value:z.n6.HCAPTCHA,label:"hCaptcha\uFF08\u6682\u672A\u5B9E\u73B0\uFF0C\u6B22\u8FCEPR\uFF09",disabled:!0}]}),S===z.n6.ALIYUN&&(0,e.jsx)(Ke,{}),S===z.n6.TENCENT&&(0,e.jsx)(Ve,{}),S===z.n6.GEE_TEST&&(0,e.jsx)(ce,{}),S===z.n6.RECAPTCHA&&(0,e.jsx)(ce,{}),S===z.n6.HCAPTCHA&&(0,e.jsx)(ce,{})]}))})})})},Xe=r(63434),Je=r(38755),Qe=xe.ZP.ConfigContext;function _e(g){var O=(0,j.useContext)(Qe),Z=O.getPrefixCls,c=".".concat(Z()),W=(0,Je.l)(function(){return oe()({},".".concat(g),oe()({marginBottom:"24px"},".ant-pro-field-checkbox-vertical ".concat(c,"-checkbox-group-item"),{height:"30px"}))});return{className:W}}var ge="setting-mfa",qe={labelCol:{xs:{span:24},sm:{span:7},md:{span:6}},wrapperCol:{xs:{span:24},sm:{span:13},md:{span:14}}},er={wrapperCol:{xs:{span:24,offset:0},sm:{span:17,offset:7},md:{span:18,offset:6}}},rr=function(g){var O=a.Z.useForm(),Z=l()(O,1),c=Z[0],W=(0,j.useState)(!1),K=l()(W,2),$=K[0],S=K[1],R=g.visible,k=_e(ge),L=k.className;return(0,te.Z)(f()(t()().mark(function G(){var x,M,y;return t()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(!R){v.next=11;break}return c.resetFields(),S(!0),v.next=5,(0,s.Vr)();case 5:return x=v.sent,M=x.success,y=x.result,M&&y&&c.setFieldsValue(u()({},y)),S(!1),v.abrupt("return");case 11:case"end":return v.stop()}},G)})),[R]),(0,e.jsx)("div",{className:L,children:(0,e.jsxs)(C.Z,{title:"\u591A\u56E0\u7D20\u8BA4\u8BC1",headerBordered:!0,bordered:!1,className:Ee()("".concat(ge)),children:[(0,e.jsx)(ue.Z,{style:{backgroundColor:"#f1f1f2",border:"1px solid #f1f1f2"},message:"\u652F\u6301\u5728\u8D26\u5BC6\u767B\u5F55\u540E\uFF0C\u5F00\u542F\u4E8C\u6B21\u8BA4\u8BC1\u3002"}),(0,e.jsx)("br",{}),(0,e.jsx)(m.W,{children:(0,e.jsx)(o.A,u()(u()({form:c,scrollToFirstError:!0,layout:"horizontal",labelAlign:"right"},qe),{},{onReset:function(){c.resetFields()},submitter:{render:function(x,M){return(0,e.jsx)(a.Z.Item,u()(u()({},er),{},{children:(0,e.jsx)(Be.Z,{children:M})}))},resetButtonProps:{style:{display:"none"}}},onFinish:function(){var G=f()(t()().mark(function x(M){var y,b;return t()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return S(!0),p.next=3,(0,s.nW)(u()({},M)).finally(function(){S(!1)});case 3:y=p.sent,b=y.success,b&&(E.ZP.success("\u4FDD\u5B58\u6210\u529F"),M.mode==="none"&&c.resetFields(["manner"]));case 6:case"end":return p.stop()}},x)}));return function(x){return G.apply(this,arguments)}}(),children:(0,e.jsx)(F.Z,{spinning:$,children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(pe.Z.Group,{label:"MFA\u6A21\u5F0F",name:"mode",initialValue:"none",options:[{label:"\u5173\u95ED",value:"none"},{label:"\u5E38\u5F00\u6A21\u5F0F",value:"always"},{label:"\u667A\u80FD\u6A21\u5F0F\uFF08\u6682\u4E0D\u652F\u6301\uFF09",value:"smart",disabled:!0}],extra:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{children:"\u5E38\u5F00\u6A21\u5F0F\u4E0B\u6BCF\u6B21\u767B\u5F55\u90FD\u9700\u8981\u4E8C\u6B21\u8BA4\u8BC1\u3002"}),(0,e.jsx)("br",{}),(0,e.jsx)("span",{children:"\u667A\u80FD\u6A21\u5F0F\u4E0B\u4E0D\u5FC5\u6BCF\u6B21\u767B\u5F55\u90FD\u4E8C\u6B21\u8BA4\u8BC1\uFF0C\u7CFB\u7EDF\u4F1A\u7075\u6D3B\u8FDB\u884C\u5224\u65AD\u3002"})]})}),(0,e.jsx)(ie.Z,{name:["mode"],children:function(x){var M=x.mode;return M&&M!=="none"&&(0,e.jsx)(Xe.Z.Group,{label:"\u4E8C\u6B21\u8BA4\u8BC1\u65B9\u5F0F",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E8C\u6B21\u8BA4\u8BC1\u65B9\u5F0F"}],name:"factors",layout:"vertical",options:[{label:"\u77ED\u4FE1\u9A8C\u8BC1\u7801",value:"sms_otp"},{label:"\u90AE\u4EF6\u9A8C\u8BC1\u7801",value:"email_otp"},{label:"\u8F6F\u4EF6\u52A8\u6001\u7801",value:"app_totp"}]})}})]})})}))})]})})},nr=rr,N;(function(g){g.BASIC_SETTING="basic_setting",g.PASSWORD_POLICY="password_policy",g.MFA="mfa",g.CAPTCHA="captcha"})(N||(N={}));var me=r(67038),ar=r(98971),sr=function(){var g=(0,j.useState)(),O=l()(g,2),Z=O[0],c=O[1],W=(0,ar.useLocation)();return(0,te.Z)(f()(t()().mark(function K(){var $,S,R;return t()().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if($=(0,me.parse)(W.search),S=$,R=S.tab,!(!R||!(R.toUpperCase()in N))){L.next=6;break}return c(N.BASIC_SETTING),Pe.m.replace({pathname:W.pathname,search:(0,me.stringify)({tab:N.BASIC_SETTING})}),L.abrupt("return");case 6:c(R);case 7:case"end":return L.stop()}},K)})),[Z]),(0,e.jsxs)(h._z,{content:"\u7CFB\u7EDF\u5168\u5C40\u5B89\u5168\u914D\u7F6E\u3001\u5982\u5BC6\u7801\u7B56\u7565\u3001\u4F1A\u8BDD\u7B56\u7565\u3002 \u5728\u5BC6\u7801\u7B56\u7565\u4E2D\u53EF\u4EE5\u8BBE\u7F6E\u76F8\u5E94\u7684\u5BC6\u7801\u590D\u6742\u5EA6\u3001\u76F8\u5E94\u7684\u9501\u5B9A\u89E3\u9501\u7B56\u7565\uFF0C\u8FD8\u53EF\u4EE5\u8BBE\u7F6E\u662F\u5426\u5141\u8BB8\u4E0E\u5386\u53F2\u5BC6\u7801\u91CD\u590D\u7B49\u9AD8\u7EA7\u7B56\u7565\u3002\u540C\u65F6\uFF0C\u53EF\u4EE5\u901A\u8FC7\u201C\u5F00\u542F\u5F31\u5BC6\u7801\u5B57\u5178\u5E93\u201D\u6765\u68C0\u67E5\u5BC6\u7801\u7684\u5B89\u5168\u5F3A\u5EA6\u3002",tabActiveKey:Z,onTabChange:function($){c($),Pe.m.replace({pathname:W.pathname,search:(0,me.stringify)({tab:$})})},tabList:[{tab:"\u57FA\u7840\u8BBE\u7F6E",key:N.BASIC_SETTING},{tab:"\u591A\u56E0\u7D20\u8BA4\u8BC1",key:N.MFA},{tab:"\u884C\u4E3A\u9A8C\u8BC1\u7801",key:N.CAPTCHA},{tab:"\u5BC6\u7801\u7B56\u7565",key:N.PASSWORD_POLICY}],children:[Z===N.BASIC_SETTING&&(0,e.jsx)(_,{visible:Z===N.BASIC_SETTING}),Z===N.PASSWORD_POLICY&&(0,e.jsx)(Ue,{visible:Z===N.PASSWORD_POLICY}),Z===N.CAPTCHA&&(0,e.jsx)(ke,{visible:Z===N.CAPTCHA}),Z===N.MFA&&(0,e.jsx)(nr,{visible:Z===N.MFA})]})}},2093:function(X,I,r){var i=r(67294),t=r(92770),B=function(l,h,n,u){function m(s){return s instanceof n?s:new n(function(C){C(s)})}return new(n||(n=Promise))(function(s,C){function o(E){try{a(u.next(E))}catch(F){C(F)}}function d(E){try{a(u.throw(E))}catch(F){C(F)}}function a(E){E.done?s(E.value):m(E.value).then(o,d)}a((u=u.apply(l,h||[])).next())})},f=function(l,h){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},u,m,s,C;return C={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function o(a){return function(E){return d([a,E])}}function d(a){if(u)throw new TypeError("Generator is already executing.");for(;n;)try{if(u=1,m&&(s=a[0]&2?m.return:a[0]?m.throw||((s=m.return)&&s.call(m),0):m.next)&&!(s=s.call(m,a[1])).done)return s;switch(m=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,m=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]. + */ +(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[2051],{11911:function(z,L,e){"use strict";e.d(L,{Gh:function(){return y},SC:function(){return N},Zw:function(){return s},b$:function(){return j},n6:function(){return F},pR:function(){return B},rD:function(){return A}});var A;(function(r){r.EX900005="EX900005",r.EX000102="EX000102",r.EX000202="EX000202",r.SUCCESS="200"})(A||(A={}));var s;(function(r){r.ALIYUN="aliyun",r.QI_NIU="qiniu",r.TENCENT="tencent",r.NET_EASE="netease",r.MAXMIND="maxmind"})(s||(s={}));var F;(function(r){r.ALIYUN="aliyun",r.TENCENT="tencent",r.GEE_TEST="geetest",r.HCAPTCHA="hcaptcha",r.RECAPTCHA="recaptcha"})(F||(F={}));var B;(function(r){r.STANDARD="standard",r.CUSTOM_MADE="custom_made"})(B||(B={}));var j;(function(r){r.SAML2="saml2",r.OIDC="oidc",r.CAS="cas",r.JWT="jwt",r.FORM="form",r.OAUTH2="oauth2"})(j||(j={}));var y;(function(r){r.ALLOW="ALLOW",r.DENY="DENY"})(y||(y={}));var N;(function(r){r.ROLE="ROLE",r.RESOURCE="RESOURCE",r.USER="USER",r.ORGANIZATION="ORGANIZATION",r.USER_GROUP="USER_GROUP"})(N||(N={}))},19882:function(z,L,e){"use strict";e.r(L),e.d(L,{default:function(){return ge}});var A=e(97983),s=e.n(A),F=e(11281),B=e.n(F),j=e(40794),y=e.n(j),N=e(12741),r=e.n(N),D=e(11911),O=e(64348),W=e(81354),U=e.n(W),K=function(i,f){var t=U().enc.Base64.parse(f),o=U().enc.Utf8.parse(i),g=U().AES.encrypt(o,t,{mode:U().mode.ECB,padding:U().pad.Pkcs7});return g.toString()};function Be(h,i){var f=CryptoJS.enc.Base64.parse(i),t=CryptoJS.AES.decrypt(h,f,{mode:CryptoJS.mode.ECB,padding:CryptoJS.pad.Pkcs7});return CryptoJS.enc.Utf8.stringify(t)}function Ae(h){var i=h.text,f=h.secretKey,t=CryptoJS.enc.Base64.parse(f),o=t.clone();o.sigBytes=16,o.words.splice(4);var g=CryptoJS.enc.Utf8.parse(i),p=CryptoJS.AES.encrypt(g,t,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return p.toString()}function Fe(h){var i=h.textBase64,f=h.secretKey,t=CryptoJS.enc.Base64.parse(f),o=t.clone();o.sigBytes=16,o.words.splice(4);var g=CryptoJS.AES.decrypt(i,t,{iv:o,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return CryptoJS.enc.Utf8.stringify(g)}var Y=e(87547),Q=e(94149),k=e(26),P=e(5966),V=e(63434),q=e(78234),_=e(2093),ee=e(49807),re=e(99138),ne=e(43825),J=e(2453),ae=e(67294),E=e(98971),T=e(67038),te=e(73935),se=e(94184),I=e.n(se),oe=e(12812),C=e.n(oe),ue=e(38755);function ie(h){var i=".".concat(h),f=(0,ue.l)(function(t){var o,g,p,M=t.token;return p={},C()(p,"".concat(i),(o={padding:"24px"},C()(o,"".concat(i,"-form-prefix-icon"),{color:M.colorPrimary,fontSize:M.fontSize}),C()(o,".ant-pro-form-login-page-logo",{width:"200px",height:"50px",marginRight:0,fontSize:"18px",lineHeight:"50px",textAlign:"center",verticalAlign:"top"}),C()(o,".ant-pro-form-login-page-desc",{marginTop:"30px",marginBottom:"25px",color:"rgba(0, 0, 0, 0.45)",fontSize:"14px"}),o)),C()(p,"@media screen and (max-width: ".concat(M.screenLG,"px)"),C()({},"".concat(i),(g={},C()(g,".ant-pro-form-login-page",{backgroundImage:"none !important"}),C()(g,".ant-pro-form-login-page-notice ",{display:"none"}),C()(g,".ant-pro-form-login-page-container",{maxWidth:"none"}),g))),p});return{className:f}}var le=e(34441),a=e(85893),Z="login",G=!0,ce=function(i){var f=i.content;return(0,a.jsx)(re.Z,{message:f,type:"error",showIcon:!0})},de=function(){var i=(0,ae.useState)(),f=r()(i,2),t=f[0],o=f[1],g=(0,E.useModel)("@@initialState"),p=g.initialState,M=g.setInitialState,me=ne.Z.useForm(),pe=r()(me,1),b=pe[0],w=(0,E.useIntl)(),ve=ie(Z),he=ve.className,ye=function(){var l=y()(s()().mark(function u(){var n,m;return s()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,p==null||(n=p.fetchUserInfo)===null||n===void 0?void 0:n.call(p);case 2:m=x.sent,m&&(0,te.flushSync)(function(){M(function(c){return B()(B()({},c),{},{currentUser:m})})});case 4:case"end":return x.stop()}},u)}));return function(){return l.apply(this,arguments)}}(),H=function(){if(!!E.history){var u=(0,T.parse)(E.history.location.search),n=u,m=n.redirect_uri;window.location.replace(m||"/")}},Se=function(){var l=y()(s()().mark(function u(){var n,m,v;return s()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,O.qX)();case 2:if(n=c.sent,m=n.success,v=n.result,!(m&&v)){c.next=7;break}return c.abrupt("return",Promise.resolve(v.secret));case 7:return c.abrupt("return",Promise.resolve(void 0));case 8:case"end":return c.stop()}},u)}));return function(){return l.apply(this,arguments)}}();(0,q.Z)(y()(s()().mark(function l(){return s()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!(p&&p.currentUser)){n.next=4;break}return n.next=3,H();case 3:return n.abrupt("return");case 4:case"end":return n.stop()}},l)}))),(0,_.Z)(y()(s()().mark(function l(){return s()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:G&&b.setFieldsValue({username:"admin",password:"NI7k1FxahAPv2oy4"});case 1:case"end":return n.stop()}},l)})),[]);var R=function(){var l=y()(s()().mark(function u(n){var m,v,x,c,S;return s()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return m=n.password,d.next=3,Se().then(function(X){X&&(m=K(m,X))});case 3:return v=(0,T.parse)(E.history.location.search),x=v,c=x.redirect_uri,c||(c=window.location.href),d.next=8,(0,O.vq)(B()(B()({},n),{},{password:m,redirect_uri:c}));case 8:if(S=d.sent,o({message:"",status:""}),!(S!=null&&S.success)){d.next=18;break}return d.next=13,ye();case 13:return J.ZP.loading({content:"\u767B\u5F55\u6210\u529F\uFF01\u6B63\u5728\u8DF3\u8F6C...",key:"loading",duration:0}),d.next=16,H();case 16:return J.ZP.destroy("loading"),d.abrupt("return",Promise.resolve(!0));case 18:if(!(!S.success&&S.status===D.rD.EX900005)){d.next=22;break}return d.next=21,R(n);case 21:return d.abrupt("return",d.sent);case 22:return o({message:S.message,status:S==null?void 0:S.result}),d.abrupt("return",Promise.resolve(!1));case 24:case"end":return d.stop()}},u)}));return function(n){return l.apply(this,arguments)}}(),$=(0,ee.Z)(R,{debounceWait:0,manual:!0}),Ee=$.data,Ce=$.loading,xe=$.run;return(0,a.jsxs)("div",{className:he,children:[G&&(0,a.jsx)(le.Z,{}),(0,a.jsx)("div",{className:I()("".concat(Z)),children:(0,a.jsx)("div",{style:{backgroundColor:"white",height:"calc(100vh - 48px)",border:"1px solid rgb(240, 240, 240)"},children:(0,a.jsxs)(k.B,{backgroundImageUrl:"/login-background.png",logo:"/full-logo.svg",subTitle:"\u4F01\u4E1A\u7EA7\u8EAB\u4EFD\u7BA1\u7406\u548C\u8BBF\u95EE\u7BA1\u7406\u7A0B\u5E8F\uFF0C\u4E3A\u6570\u5B57\u8EAB\u4EFD\u5B89\u5168\u8D4B\u80FD\uFF01",initialValues:{"remember-me":!1},form:b,scrollToFirstError:!0,submitter:{searchConfig:{submitText:w.formatMessage({id:"pages.login.submit",defaultMessage:"\u767B\u5F55"})},render:function(u,n){return n.pop()},submitButtonProps:{loading:Ce,size:"large",style:{width:"100%"}}},onFinish:function(){var l=y()(s()().mark(function u(n){return s()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,xe(n);case 2:return v.abrupt("return",Ee);case 3:case"end":return v.stop()}},u)}));return function(u){return l.apply(this,arguments)}}(),children:[(t==null?void 0:t.status)!==D.rD.SUCCESS&&(t==null?void 0:t.message)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ce,{content:t==null?void 0:t.message}),(0,a.jsx)("br",{})]}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(P.Z,{name:"username",fieldProps:{size:"large",prefix:(0,a.jsx)(Y.Z,{className:I()("".concat(Z,"-form-prefix-icon"))}),autoComplete:"off"},placeholder:w.formatMessage({id:"pages.login.username.placeholder",defaultMessage:"\u8BF7\u8F93\u5165\u7528\u6237\u540D / \u624B\u673A\u53F7 / \u90AE\u7BB1"}),rules:[{required:!0,message:(0,a.jsx)(E.FormattedMessage,{id:"pages.login.username.required",defaultMessage:"\u8D26\u53F7\u672A\u586B\u5199"})}]}),(0,a.jsx)(P.Z.Password,{name:"password",fieldProps:{size:"large",autoComplete:"new-password",prefix:(0,a.jsx)(Q.Z,{className:I()("".concat(Z,"-form-prefix-icon"))})},placeholder:w.formatMessage({id:"pages.login.password.placeholder",defaultMessage:"\u8BF7\u8F93\u5165\u767B\u5F55\u5BC6\u7801"}),rules:[{required:!0,message:(0,a.jsx)(E.FormattedMessage,{id:"pages.login.password.required",defaultMessage:"\u5BC6\u7801\u672A\u586B\u5199"})}]})]}),(0,a.jsxs)("div",{style:{marginBottom:24},children:[(0,a.jsx)(V.Z,{noStyle:!0,name:"remember-me",children:(0,a.jsx)(E.FormattedMessage,{id:"pages.login.rememberMe",defaultMessage:"\u81EA\u52A8\u767B\u5F55"})}),(0,a.jsx)("a",{style:{float:"right"},onClick:y()(s()().mark(function l(){return s()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:J.ZP.info("\u6682\u672A\u5B9E\u73B0");case 1:case"end":return n.stop()}},l)})),children:(0,a.jsx)(E.FormattedMessage,{id:"pages.login.forgotPassword",defaultMessage:"\u5FD8\u8BB0\u5BC6\u7801"})})]})]})})})]})},fe=de,ge=fe},42480:function(){}}]); diff --git a/eiam-console/src/main/resources/fe/p__user__SessionExpired__index.6638a85c.async.js b/eiam-console/src/main/resources/fe/p__user__SessionExpired__index.6638a85c.async.js new file mode 100644 index 00000000..3b7e3071 --- /dev/null +++ b/eiam-console/src/main/resources/fe/p__user__SessionExpired__index.6638a85c.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[8648],{34270:function(E,o,t){t.r(o),t.d(o,{default:function(){return M}});var s=t(97983),a=t.n(s),f=t(11281),e=t.n(f),m=t(40794),r=t.n(m),i=t(25191),n=t(84865),d=t(98971),P=t(78234),C=t(69400),u=t(67038),c=t(85893),x=function(){var p=(0,d.useModel)("@@initialState"),h=p.initialState,l=p.setInitialState,F=(0,d.useLocation)();return(0,P.Z)(r()(a()().mark(function T(){return a()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:C.Z.warning({title:"\u4F1A\u8BDD\u8FC7\u671F",content:"\u60A8\u7684\u767B\u5F55\u4FE1\u606F\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u3002",okText:"\u786E\u8BA4",okType:"danger",centered:!1,maskClosable:!1,okCancel:!1,onOk:function(){var U=r()(a()().mark(function j(){var g,R,v,I,D,S;return a()().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,l(e()(e()({},h),{},{currentUser:void 0}));case 2:g=(0,u.parse)(F.search),R=g,v=R.redirect_uri,I={pathname:i.wm},D=v&&v.split("/"),v&&v!==D[0]+"//"+D[2]+"/"&&(I=e()(e()({},I),{},{search:(0,u.stringify)({redirect_uri:v})})),S=n.m.createHref(I),window.location.replace(S);case 9:case"end":return O.stop()}},j)}));function B(){return U.apply(this,arguments)}return B}()});case 1:case"end":return y.stop()}},T)}))),(0,c.jsx)(c.Fragment,{})},M=function(){return(0,c.jsx)(x,{})}},78234:function(E,o,t){var s=t(67294),a=t(92770),f=t(31663),e=function(r){f.Z&&((0,a.mf)(r)||console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof r,'".'))),(0,s.useEffect)(function(){r==null||r()},[])};o.Z=e},92770:function(E,o,t){t.d(o,{mf:function(){return a}});var s=function(n){return n!==null&&typeof n=="object"},a=function(n){return typeof n=="function"},f=function(n){return typeof n=="string"},e=function(n){return typeof n=="boolean"},m=function(n){return typeof n=="number"},r=function(n){return typeof n=="undefined"}},31663:function(E,o){var t=!1;o.Z=t},65223:function(E,o,t){t.d(o,{RV:function(){return i},Rk:function(){return n},Ux:function(){return P},aM:function(){return d},q3:function(){return m},qI:function(){return r}});var s=t(87462),a=t(71990),f=t(98423),e=t(67294),m=e.createContext({labelAlign:"right",vertical:!1,itemRef:function(){}}),r=e.createContext(null),i=function(u){var c=(0,f.Z)(u,["prefixCls"]);return e.createElement(a.RV,(0,s.Z)({},c))},n=e.createContext({prefixCls:""}),d=e.createContext({}),P=function(u){var c=u.children,x=u.status,M=u.override,p=(0,e.useContext)(d),h=(0,e.useMemo)(function(){var l=(0,s.Z)({},p);return M&&delete l.isFormItemInput,x&&(delete l.status,delete l.hasFeedback,delete l.feedbackIcon),l},[x,M,p]);return e.createElement(d.Provider,{value:h},c)}}}]); diff --git a/eiam-console/src/main/resources/fe/t__plugin-layout__Layout.331cc1dd.async.js b/eiam-console/src/main/resources/fe/t__plugin-layout__Layout.331cc1dd.async.js new file mode 100644 index 00000000..4e931681 --- /dev/null +++ b/eiam-console/src/main/resources/fe/t__plugin-layout__Layout.331cc1dd.async.js @@ -0,0 +1,18 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[6301],{86817:function(nt,y,i){i.r(y),i.d(y,{default:function(){return Q}});var F=i(12741),S=i.n(F),M=i(64129),L=i.n(M),G=i(11281),f=i.n(G),N=i(99399),$=i.n(N),c=i(98971),E=i(67294),I=i(28395),t=i(85893),Z=function(){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 200 200",children:[(0,t.jsxs)("defs",{children:[(0,t.jsxs)("linearGradient",{id:"linearGradient-1",x1:"62.102%",x2:"108.197%",y1:"0%",y2:"37.864%",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:"#4285EB"}),(0,t.jsx)("stop",{offset:"100%",stopColor:"#2EC7FF"})]}),(0,t.jsxs)("linearGradient",{id:"linearGradient-2",x1:"69.644%",x2:"54.043%",y1:"0%",y2:"108.457%",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:"#29CDFF"}),(0,t.jsx)("stop",{offset:"37.86%",stopColor:"#148EFF"}),(0,t.jsx)("stop",{offset:"100%",stopColor:"#0A60FF"})]}),(0,t.jsxs)("linearGradient",{id:"linearGradient-3",x1:"69.691%",x2:"16.723%",y1:"-12.974%",y2:"117.391%",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:"#FA816E"}),(0,t.jsx)("stop",{offset:"41.473%",stopColor:"#F74A5C"}),(0,t.jsx)("stop",{offset:"100%",stopColor:"#F51D2C"})]}),(0,t.jsxs)("linearGradient",{id:"linearGradient-4",x1:"68.128%",x2:"30.44%",y1:"-35.691%",y2:"114.943%",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:"#FA8E7D"}),(0,t.jsx)("stop",{offset:"51.264%",stopColor:"#F74A5C"}),(0,t.jsx)("stop",{offset:"100%",stopColor:"#F51D2C"})]})]}),(0,t.jsx)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:(0,t.jsx)("g",{transform:"translate(-20 -20)",children:(0,t.jsx)("g",{transform:"translate(20 20)",children:(0,t.jsxs)("g",{children:[(0,t.jsxs)("g",{fillRule:"nonzero",children:[(0,t.jsxs)("g",{children:[(0,t.jsx)("path",{fill:"url(#linearGradient-1)",d:"M91.588 4.177L4.18 91.513a11.981 11.981 0 000 16.974l87.408 87.336a12.005 12.005 0 0016.989 0l36.648-36.618c4.209-4.205 4.209-11.023 0-15.228-4.208-4.205-11.031-4.205-15.24 0l-27.783 27.76c-1.17 1.169-2.945 1.169-4.114 0l-69.802-69.744c-1.17-1.169-1.17-2.942 0-4.11l69.802-69.745c1.17-1.169 2.944-1.169 4.114 0l27.783 27.76c4.209 4.205 11.032 4.205 15.24 0 4.209-4.205 4.209-11.022 0-15.227L108.581 4.056c-4.719-4.594-12.312-4.557-16.993.12z"}),(0,t.jsx)("path",{fill:"url(#linearGradient-2)",d:"M91.588 4.177L4.18 91.513a11.981 11.981 0 000 16.974l87.408 87.336a12.005 12.005 0 0016.989 0l36.648-36.618c4.209-4.205 4.209-11.023 0-15.228-4.208-4.205-11.031-4.205-15.24 0l-27.783 27.76c-1.17 1.169-2.945 1.169-4.114 0l-69.802-69.744c-1.17-1.169-1.17-2.942 0-4.11l69.802-69.745c2.912-2.51 7.664-7.596 14.642-8.786 5.186-.883 10.855 1.062 17.009 5.837L108.58 4.056c-4.719-4.594-12.312-4.557-16.993.12z"})]}),(0,t.jsx)("path",{fill:"url(#linearGradient-3)",d:"M153.686 135.855c4.208 4.205 11.031 4.205 15.24 0l27.034-27.012c4.7-4.696 4.7-12.28 0-16.974l-27.27-27.15c-4.218-4.2-11.043-4.195-15.254.013-4.209 4.205-4.209 11.022 0 15.227l18.418 18.403c1.17 1.169 1.17 2.943 0 4.111l-18.168 18.154c-4.209 4.205-4.209 11.023 0 15.228z"})]}),(0,t.jsx)("ellipse",{cx:"100.519",cy:"100.437",fill:"url(#linearGradient-4)",rx:"23.6",ry:"23.581"})]})})})})]})},z=Z,D=i(22181),W=i(71577),H=function(n){var e,l;return!n.route&&(n.noFound||n.notFound)||((e=n.route)===null||e===void 0?void 0:e.unaccessible)&&(n.unAccessible||n.noAccessible)||(!n.route||((l=n.route)===null||l===void 0?void 0:l.unaccessible))&&(0,t.jsx)(D.ZP,{status:n.route?"403":"404",title:n.route?"403":"404",subTitle:n.route?"\u62B1\u6B49\uFF0C\u4F60\u65E0\u6743\u8BBF\u95EE\u8BE5\u9875\u9762":"\u62B1\u6B49\uFF0C\u4F60\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728",extra:(0,t.jsx)(W.Z,{type:"primary",onClick:function(){return c.history.push("/")},children:"\u8FD4\u56DE\u9996\u9875"})})||n.children},B=H,O=i(98293),T=i(57953),p=i(67159),P=i(68508),U=i(13013),V=i(92443),j=i(86891);function X(a){var n,e;if(a.runtimeConfig.rightRender)return a.runtimeConfig.rightRender(a.initialState,a.setInitialState,a.runtimeConfig);var l=(0,t.jsxs)("span",{className:"umi-plugin-layout-action",children:[(0,t.jsx)(O.C,{size:"small",className:"umi-plugin-layout-avatar",src:((n=a.initialState)===null||n===void 0?void 0:n.avatar)||"https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png",alt:"avatar"}),(0,t.jsx)("span",{className:"umi-plugin-layout-name",children:(e=a.initialState)===null||e===void 0?void 0:e.name})]});if(a.loading)return(0,t.jsx)("div",{className:"umi-plugin-layout-right",children:(0,t.jsx)(T.Z,{size:"small",style:{marginLeft:8,marginRight:8}})});var d={className:"umi-plugin-layout-menu",selectedKeys:[],items:[{key:"logout",label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(V.Z,{}),"\u9000\u51FA\u767B\u5F55"]}),onClick:function(){var o,g;a==null||(o=a.runtimeConfig)===null||o===void 0||(g=o.logout)===null||g===void 0||g.call(o,a.initialState)}}]},x=p.Z.startsWith("5.")||p.Z.startsWith("4.24.")?{menu:d}:{overlay:(0,t.jsx)(P.Z,f()({},d))};return(0,t.jsxs)("div",{className:"umi-plugin-layout-right anticon",children:[a.runtimeConfig.logout?(0,t.jsx)(U.Z,f()(f()({},x),{},{overlayClassName:"umi-plugin-layout-container",children:l})):l,(0,t.jsx)(j.pD,{})]})}var C=i(61854),K=i(31167),Y=function a(n,e){if(n.length===0)return[];var l=[],d=$()(n),x;try{for(d.s();!(x=d.n()).done;){var v=x.value,o=f()({},v);e(v)?Array.isArray(o.routes)&&l.push.apply(l,L()(a(o.routes,e))):(Array.isArray(o.children)&&(o.children=a(o.children,e),o.routes=o.children),l.push(o))}}catch(g){d.e(g)}finally{d.f()}return l},J=function a(n){return n.length===0?[]:n.map(function(e){var l=f()({},e);return e.originPath&&(l.path=e.originPath),Array.isArray(e.routes)&&(l.routes=a(e.routes)),Array.isArray(e.children)&&(l.children=a(e.children)),l})},Q=function(a){var n=(0,c.useLocation)(),e=(0,c.useNavigate)(),l=(0,c.useAppData)(),d=l.clientRoutes,x=l.pluginManager,v=C.t&&(0,C.t)("@@initialState")||{initialState:void 0,loading:!1,setInitialState:null},o=v.initialState,g=v.loading,A=v.setInitialState,m={navTheme:"light",colorPrimary:"#1677FF",layout:"mix",contentWidth:"Fluid",fixedHeader:!0,fixSiderbar:!0,splitMenus:!1,colorWeak:!1,title:"\u4F01\u4E1A\u6570\u5B57\u8EAB\u4EFD\u7BA1\u63A7\u5E73\u53F0",pwa:!1,logo:"/full-logo.svg",iconfontUrl:"",siderWidth:190,locale:!0},b=(0,j.YB)(),k=b.formatMessage,u=x.applyPlugins({key:"layout",type:"modify",initialValue:f()({},v)}),w=Y(d.filter(function(s){return s.id==="ant-design-pro-layout"}),function(s){return!!s.isLayout&&s.id!=="ant-design-pro-layout"||!!s.isWrapper}),q=(0,K.Mf)(J(w)),_=S()(q,1),R=_[0],tt=(0,E.useMemo)(function(){var s,r,h;return(s=(0,c.matchRoutes)(R.children,n.pathname))===null||s===void 0||(r=s.pop)===null||r===void 0||(h=r.call(s))===null||h===void 0?void 0:h.route},[n.pathname]);return(0,t.jsx)(I.f,f()(f()({route:R,location:n,title:m.title||"plugin-layout",navTheme:"dark",siderWidth:256,onMenuHeaderClick:function(r){r.stopPropagation(),r.preventDefault(),e("/")},formatMessage:m.formatMessage||k,menu:{locale:m.locale},logo:z,menuItemRender:function(r,h){return r.isUrl||r.children?h:r.path&&n.pathname!==r.path?(0,t.jsx)(c.Link,{to:r.path.replace("/*",""),target:r.target,children:h}):h},itemRender:function(r){return(0,t.jsx)(c.Link,{to:r.path,children:r.breadcrumbName})},disableContentMargin:!0,fixSiderbar:!0,fixedHeader:!0},u),{},{rightContentRender:u.rightContentRender!==!1&&function(s){var r=X({runtimeConfig:u,loading:g,initialState:o,setInitialState:A});return u.rightContentRender?u.rightContentRender(s,r,{userConfig:m,runtimeConfig:u,loading:g,initialState:o,setInitialState:A}):r},children:(0,t.jsx)(B,{route:tt,notFound:u==null?void 0:u.notFound,noAccessible:u==null?void 0:u.noAccessible,children:u.childrenRender?u.childrenRender((0,t.jsx)(c.Outlet,{}),a):(0,t.jsx)(c.Outlet,{})})}))}}}]); diff --git a/eiam-console/src/main/resources/fe/t__plugin-layout__Layout.74b4118c.chunk.css b/eiam-console/src/main/resources/fe/t__plugin-layout__Layout.74b4118c.chunk.css new file mode 100644 index 00000000..7f67747d --- /dev/null +++ b/eiam-console/src/main/resources/fe/t__plugin-layout__Layout.74b4118c.chunk.css @@ -0,0 +1,18 @@ +/** + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +@media screen and (max-width: 480px){.umi-plugin-layout-container{width:100%!important}.umi-plugin-layout-container>*{border-radius:0!important}}.umi-plugin-layout-menu .anticon{margin-right:8px}.umi-plugin-layout-menu .ant-dropdown-menu-item{min-width:160px}.umi-plugin-layout-right{display:flex!important;float:right;height:100%;margin-left:auto;overflow:hidden}.umi-plugin-layout-right .umi-plugin-layout-action{display:flex;align-items:center;height:100%;padding:0 12px;cursor:pointer;transition:all .3s}.umi-plugin-layout-right .umi-plugin-layout-action>i{color:#ffffffd9;vertical-align:middle}.umi-plugin-layout-right .umi-plugin-layout-action:hover{background:rgba(0,0,0,.025)}.umi-plugin-layout-right .umi-plugin-layout-action:global(.opened){background:rgba(0,0,0,.025)}.umi-plugin-layout-right .umi-plugin-layout-search{padding:0 12px}.umi-plugin-layout-right .umi-plugin-layout-search:hover{background:transparent}.umi-plugin-layout-name{margin-left:8px} diff --git a/eiam-console/src/main/resources/fe/umi.8f1943c2.js b/eiam-console/src/main/resources/fe/umi.8f1943c2.js new file mode 100644 index 00000000..2dc809e3 --- /dev/null +++ b/eiam-console/src/main/resources/fe/umi.8f1943c2.js @@ -0,0 +1,477 @@ +/* + * eiam-console - Employee Identity and Access Management Program + * Copyright © 2020-2022 TopIAM (support@topiam.cn) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +(function(){var Sl={92138:function(f,v,e){"use strict";e.r(v),e.d(v,{blue:function(){return xe},cyan:function(){return ce},geekblue:function(){return Q},generate:function(){return O},gold:function(){return U},green:function(){return ve},grey:function(){return L},lime:function(){return he},magenta:function(){return W},orange:function(){return ee},presetDarkPalettes:function(){return J},presetPalettes:function(){return F},presetPrimaryColors:function(){return j},purple:function(){return V},red:function(){return D},volcano:function(){return R},yellow:function(){return de}});var r=e(86500),t=e(1350),a=2,i=.16,o=.05,u=.05,c=.15,l=5,d=4,p=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function M(k){var re=k.r,K=k.g,ie=k.b,me=(0,r.py)(re,K,ie);return{h:me.h*360,s:me.s,v:me.v}}function _(k){var re=k.r,K=k.g,ie=k.b;return"#".concat((0,r.vq)(re,K,ie,!1))}function y(k,re,K){var ie=K/100,me={r:(re.r-k.r)*ie+k.r,g:(re.g-k.g)*ie+k.g,b:(re.b-k.b)*ie+k.b};return me}function I(k,re,K){var ie;return Math.round(k.h)>=60&&Math.round(k.h)<=240?ie=K?Math.round(k.h)-a*re:Math.round(k.h)+a*re:ie=K?Math.round(k.h)+a*re:Math.round(k.h)-a*re,ie<0?ie+=360:ie>=360&&(ie-=360),ie}function S(k,re,K){if(k.h===0&&k.s===0)return k.s;var ie;return K?ie=k.s-i*re:re===d?ie=k.s+i:ie=k.s+o*re,ie>1&&(ie=1),K&&re===l&&ie>.1&&(ie=.1),ie<.06&&(ie=.06),Number(ie.toFixed(2))}function A(k,re,K){var ie;return K?ie=k.v+u*re:ie=k.v-c*re,ie>1&&(ie=1),Number(ie.toFixed(2))}function O(k){for(var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=[],ie=(0,t.uA)(k),me=l;me>0;me-=1){var Ze=M(ie),De=_((0,t.uA)({h:I(Ze,me,!0),s:S(Ze,me,!0),v:A(Ze,me,!0)}));K.push(De)}K.push(_(ie));for(var Fe=1;Fe<=d;Fe+=1){var mt=M(ie),ht=_((0,t.uA)({h:I(mt,Fe),s:S(mt,Fe),v:A(mt,Fe)}));K.push(ht)}return re.theme==="dark"?p.map(function(xt){var Et=xt.index,ct=xt.opacity,jt=_(y((0,t.uA)(re.backgroundColor||"#141414"),(0,t.uA)(K[Et]),ct*100));return jt}):K}var j={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},F={},J={};Object.keys(j).forEach(function(k){F[k]=O(j[k]),F[k].primary=F[k][5],J[k]=O(j[k],{theme:"dark",backgroundColor:"#141414"}),J[k].primary=J[k][5]});var D=F.red,R=F.volcano,U=F.gold,ee=F.orange,de=F.yellow,he=F.lime,ve=F.green,ce=F.cyan,xe=F.blue,Q=F.geekblue,V=F.purple,W=F.magenta,L=F.grey},66981:function(f,v,e){"use strict";e.d(v,{E4:function(){return He},jG:function(){return Le},fp:function(){return X},xy:function(){return T}});var r=e(4942),t=e(1413),a=e(97685),i=e(74902),o=e(71002),u=e(67294),c=e(44958),l=e(98924);function d(ze){for(var _e=0,ue,Ye=0,Ve=ze.length;Ve>=4;++Ye,Ve-=4)ue=ze.charCodeAt(Ye)&255|(ze.charCodeAt(++Ye)&255)<<8|(ze.charCodeAt(++Ye)&255)<<16|(ze.charCodeAt(++Ye)&255)<<24,ue=(ue&65535)*1540483477+((ue>>>16)*59797<<16),ue^=ue>>>24,_e=(ue&65535)*1540483477+((ue>>>16)*59797<<16)^(_e&65535)*1540483477+((_e>>>16)*59797<<16);switch(Ve){case 3:_e^=(ze.charCodeAt(Ye+2)&255)<<16;case 2:_e^=(ze.charCodeAt(Ye+1)&255)<<8;case 1:_e^=ze.charCodeAt(Ye)&255,_e=(_e&65535)*1540483477+((_e>>>16)*59797<<16)}return _e^=_e>>>13,_e=(_e&65535)*1540483477+((_e>>>16)*59797<<16),((_e^_e>>>15)>>>0).toString(36)}var p=d,M={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_=M,y=e(20211),I=e(92190),S=e(15671),A=e(43144),O=function(){function ze(){(0,S.Z)(this,ze),this.cache=new Map}return(0,A.Z)(ze,[{key:"get",value:function(ue){return this.cache.get(ue.join("%"))||null}},{key:"update",value:function(ue,Ye){var Ve=ue.join("%"),Je=this.cache.get(Ve),it=Ye(Je);it===null?this.cache.delete(Ve):this.cache.set(Ve,it)}}]),ze}(),j=O,F="data-token-hash",J="data-css-hash",D="data-dev-cache-path",R="__cssinjs_instance__",U=Math.random().toString(12).slice(2);function ee(){if(typeof document!="undefined"&&document.head&&document.body){var ze=document.body.querySelectorAll("style[".concat(J,"]"))||[],_e=document.head.firstChild;Array.from(ze).forEach(function(Ye){Ye[R]=Ye[R]||U,document.head.insertBefore(Ye,_e)});var ue={};Array.from(document.querySelectorAll("style[".concat(J,"]"))).forEach(function(Ye){var Ve=Ye.getAttribute(J);if(ue[Ve]){if(Ye[R]===U){var Je;(Je=Ye.parentNode)===null||Je===void 0||Je.removeChild(Ye)}}else ue[Ve]=!0})}return new j}var de=u.createContext({hashPriority:"low",cache:ee(),defaultCache:!0}),he=function(_e){var ue=_e.autoClear,Ye=_e.mock,Ve=_e.cache,Je=_e.hashPriority,it=_e.container,Te=_e.children,Pe=React.useContext(de),nt=Pe.cache,pt=Pe.autoClear,yt=Pe.mock,wt=Pe.defaultCache,ot=Pe.hashPriority,St=Pe.container,dt=React.useMemo(function(){return{autoClear:ue!=null?ue:pt,mock:Ye!=null?Ye:yt,cache:Ve||nt||ee(),defaultCache:!Ve&&wt,hashPriority:Je!=null?Je:ot,container:it||St}},[ue,pt,yt,nt,Ye,Ve,wt,Je,ot,it,St]);return React.createElement(de.Provider,{value:dt},Te)},ve=de;function ce(){return!1}var xe=!1;function Q(){return xe}var V=ce;if(!1)var W,L;function k(ze,_e,ue,Ye){var Ve=u.useContext(ve),Je=Ve.cache,it=[ze].concat((0,i.Z)(_e)),Te=V();return u.useMemo(function(){Je.update(it,function(Pe){var nt=Pe||[],pt=(0,a.Z)(nt,2),yt=pt[0],wt=yt===void 0?0:yt,ot=pt[1],St=ot,dt=St||ue();return[wt+1,dt]})},[it.join("_")]),u.useEffect(function(){return function(){Je.update(it,function(Pe){var nt=Pe||[],pt=(0,a.Z)(nt,2),yt=pt[0],wt=yt===void 0?0:yt,ot=pt[1],St=wt-1;return St===0?(Ye==null||Ye(ot,!1),null):[wt-1,ot]})}},it),Je.get(it)[1]}var re=e(80334);function K(ze){var _e="";return Object.keys(ze).forEach(function(ue){var Ye=ze[ue];_e+=ue,Ye&&(0,o.Z)(Ye)==="object"?_e+=K(Ye):_e+=Ye}),_e}function ie(ze,_e){return p("".concat(_e,"_").concat(K(ze)))}function me(ze,_e){devWarning(!1,"[Ant Design CSS-in-JS] ".concat(_e?"Error in '".concat(_e,"': "):"").concat(ze))}var Ze=function(_e,ue){var Ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ve=Ye.path,Je=Ye.hashId;switch(_e){case"content":var it=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,Te=["normal","none","initial","inherit","unset"];(typeof ue!="string"||Te.indexOf(ue)===-1&&!it.test(ue)&&(ue.charAt(0)!==ue.charAt(ue.length-1)||ue.charAt(0)!=='"'&&ue.charAt(0)!=="'"))&&me("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(ue,"\"'`"),Ve);return;case"marginLeft":case"marginRight":case"paddingLeft":case"paddingRight":case"left":case"right":case"borderLeft":case"borderLeftWidth":case"borderLeftStyle":case"borderLeftColor":case"borderRight":case"borderRightWidth":case"borderRightStyle":case"borderRightColor":case"borderTopLeftRadius":case"borderTopRightRadius":case"borderBottomLeftRadius":case"borderBottomRightRadius":me("You seem to be using non-logical property '".concat(_e,"' which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."),Ve);return;case"margin":case"padding":case"borderWidth":case"borderStyle":if(typeof ue=="string"){var Pe=ue.split(" ").map(function(yt){return yt.trim()});Pe.length===4&&Pe[1]!==Pe[3]&&me("You seem to be using '".concat(_e,"' property with different left ").concat(_e," and right ").concat(_e,", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."),Ve)}return;case"clear":case"textAlign":(ue==="left"||ue==="right")&&me("You seem to be using non-logical value '".concat(ue,"' of ").concat(_e,", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."),Ve);return;case"borderRadius":if(typeof ue=="string"){var nt=ue.split("/").map(function(yt){return yt.trim()}),pt=nt.reduce(function(yt,wt){if(yt)return yt;var ot=wt.split(" ").map(function(St){return St.trim()});return ot.length>=2&&ot[0]!==ot[1]||ot.length===3&&ot[1]!==ot[2]||ot.length===4&&ot[2]!==ot[3]?!0:yt},!1);pt&&me("You seem to be using non-logical value '".concat(ue,"' of ").concat(_e,", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."),Ve)}return;case"animation":Je&&ue!=="none"&&me("You seem to be using hashed animation '".concat(ue,"', in which case 'animationName' with Keyframe as value is recommended."),Ve);default:return}},De="layer-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,""),Fe="903px";function mt(ze,_e){if((0,l.Z)()){var ue;(0,c.hq)(ze,De);var Ye=document.createElement("div");Ye.style.position="fixed",Ye.style.left="0",Ye.style.top="0",_e==null||_e(Ye),document.body.appendChild(Ye);var Ve=getComputedStyle(Ye).width===Fe;return(ue=Ye.parentNode)===null||ue===void 0||ue.removeChild(Ye),(0,c.jL)(De),Ve}return!1}var ht=void 0;function xt(){return ht===void 0&&(ht=mt("@layer ".concat(De," { .").concat(De," { width: ").concat(Fe,"!important; } }"),function(ze){ze.className=De})),ht}var Et=(0,l.Z)(),ct="_skip_check_";function jt(ze){var _e=(0,y.q)((0,I.MY)(ze),y.P);return _e.replace(/\{%%%\:[^;];}/g,";")}function Tt(ze){return(0,o.Z)(ze)==="object"&&ze&&ct in ze}var Wt={};function Bt(ze,_e,ue){if(!_e)return ze;var Ye=".".concat(_e),Ve=ue==="low"?":where(".concat(Ye,")"):Ye,Je=ze.split(",").map(function(it){var Te,Pe=it.trim().split(/\s+/),nt=Pe[0]||"",pt=((Te=nt.match(/^\w+/))===null||Te===void 0?void 0:Te[0])||"";return nt="".concat(pt).concat(Ve).concat(nt.slice(pt.length)),[nt].concat((0,i.Z)(Pe.slice(1))).join(" ")});return Je.join(",")}var Ht=new Set,rr=null,Sr=function ze(_e){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0},Ve=Ye.root,Je=Ye.injectHash,it=ue.hashId,Te=ue.layer,Pe=ue.path,nt=ue.hashPriority,pt="",yt={};function wt(Ct){var Ut=Ct.getName(it);if(!yt[Ut]){var cr=ze(Ct.style,ue,{root:!1}),ir=(0,a.Z)(cr,1),Rr=ir[0];yt[Ut]="@keyframes ".concat(Ct.getName(it)).concat(Rr)}}function ot(Ct){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Ct.forEach(function(cr){Array.isArray(cr)?ot(cr,Ut):cr&&Ut.push(cr)}),Ut}var St=ot(Array.isArray(_e)?_e:[_e]);if(St.forEach(function(Ct){var Ut=typeof Ct=="string"&&!Ve?{}:Ct;typeof Ut=="string"?pt+="".concat(Ut,` +`):Ut._keyframe?wt(Ut):Object.keys(Ut).forEach(function(cr){var ir=Ut[cr];if((0,o.Z)(ir)==="object"&&ir&&(cr!=="animationName"||!ir._keyframe)&&!Tt(ir)){var Rr=!1,dr=cr.trim(),wr=!1;(Ve||Je)&&it?dr.startsWith("@")?Rr=!0:dr=Bt(cr,it,nt):Ve&&!it&&(dr==="&"||dr==="")&&(dr="",wr=!0);var Vr=ze(ir,(0,t.Z)((0,t.Z)({},ue),{},{path:"".concat(Pe," -> ").concat(dr)}),{root:wr,injectHash:Rr}),Qr=(0,a.Z)(Vr,2),Pr=Qr[0],nn=Qr[1];yt=(0,t.Z)((0,t.Z)({},yt),nn),pt+="".concat(dr).concat(Pr)}else{var qr,fn=(qr=ir==null?void 0:ir.value)!==null&&qr!==void 0?qr:ir,Zn=cr.replace(/[A-Z]/g,function(Rn){return"-".concat(Rn.toLowerCase())}),Gn=fn;!_[cr]&&typeof Gn=="number"&&Gn!==0&&(Gn="".concat(Gn,"px")),cr==="animationName"&&(ir==null?void 0:ir._keyframe)&&(wt(ir),Gn=ir.getName(it)),pt+="".concat(Zn,":").concat(Gn,";")}})}),!Ve)pt="{".concat(pt,"}");else if(Te&&xt()){var dt=Te.split(","),Rt=dt[dt.length-1].trim();pt="@layer ".concat(Rt," {").concat(pt,"}"),dt.length>1&&(pt="@layer ".concat(Te,"{%%%:%}").concat(pt))}return[pt,yt]};function Ar(ze,_e){return p("".concat(ze.join("%")).concat(_e))}function ye(){return null}function T(ze,_e){var ue=ze.token,Ye=ze.path,Ve=ze.hashId,Je=ze.layer,it=u.useContext(ve),Te=it.autoClear,Pe=it.mock,nt=it.defaultCache,pt=it.hashPriority,yt=it.container,wt=ue._tokenKey,ot=[wt].concat((0,i.Z)(Ye)),St=Et,dt=k("style",ot,function(){var ir=_e(),Rr=Sr(ir,{hashId:Ve,hashPriority:pt,layer:Je,path:Ye.join("-")}),dr=(0,a.Z)(Rr,2),wr=dr[0],Vr=dr[1],Qr=jt(wr),Pr=Ar(ot,Qr);if(Wt={},St){var nn=(0,c.hq)(Qr,Pr,{mark:J,prepend:"queue",attachTo:yt});nn[R]=U,nn.setAttribute(F,wt),Object.keys(Vr).forEach(function(qr){Ht.has(qr)||(Ht.add(qr),(0,c.hq)(jt(Vr[qr]),"_effect-".concat(qr),{mark:J,prepend:"queue",attachTo:yt}))})}return[Qr,wt,Pr]},function(ir,Rr){var dr=(0,a.Z)(ir,3),wr=dr[2];(Rr||Te)&&Et&&(0,c.jL)(wr,{mark:J})}),Rt=(0,a.Z)(dt,3),Ct=Rt[0],Ut=Rt[1],cr=Rt[2];return function(ir){var Rr;if(St||!nt)Rr=u.createElement(ye,null);else{var dr;Rr=u.createElement("style",(0,t.Z)((0,t.Z)({},(dr={},(0,r.Z)(dr,F,Ut),(0,r.Z)(dr,J,cr),dr)),{},{dangerouslySetInnerHTML:{__html:Ct}}))}return u.createElement(u.Fragment,null,Rr,ir)}}function b(ze){var _e=Array.from(ze.cache.keys()).filter(function(Ye){return Ye.startsWith("style%")}),ue="";return _e.forEach(function(Ye){var Ve=_slicedToArray(ze.cache.get(Ye)[1],3),Je=Ve[0],it=Ve[1],Te=Ve[2];ue+="")}),ue}var q={},Ce="css",le=new Map;function fe(ze){le.set(ze,(le.get(ze)||0)+1)}function pe(ze){if(typeof document!="undefined"){var _e=document.querySelectorAll("style[".concat(F,'="').concat(ze,'"]'));_e.forEach(function(ue){if(ue[R]===U){var Ye;(Ye=ue.parentNode)===null||Ye===void 0||Ye.removeChild(ue)}})}}function Re(ze){le.set(ze,(le.get(ze)||0)-1);var _e=Array.from(le.keys()),ue=_e.filter(function(Ye){var Ve=le.get(Ye)||0;return Ve<=0});ue.length<_e.length&&ue.forEach(function(Ye){pe(Ye),le.delete(Ye)})}function X(ze,_e){var ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ye=ue.salt,Ve=Ye===void 0?"":Ye,Je=ue.override,it=Je===void 0?q:Je,Te=ue.formatToken,Pe=u.useMemo(function(){return Object.assign.apply(Object,[{}].concat((0,i.Z)(_e)))},[_e]),nt=u.useMemo(function(){return K(Pe)},[Pe]),pt=u.useMemo(function(){return K(it)},[it]),yt=k("token",[Ve,ze.id,nt,pt],function(){var wt=ze.getDerivativeToken(Pe),ot=(0,t.Z)((0,t.Z)({},wt),it);Te&&(ot=Te(ot));var St=ie(ot,Ve);ot._tokenKey=St,fe(St);var dt="".concat(Ce,"-").concat(p(St));return ot._hashId=dt,[ot,dt]},function(wt){Re(wt[0]._tokenKey)});return yt}var je=function(){function ze(_e,ue){(0,S.Z)(this,ze),this.name=void 0,this.style=void 0,this._keyframe=!0,this.name=_e,this.style=ue}return(0,A.Z)(ze,[{key:"getName",value:function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return ue?"".concat(ue,"-").concat(this.name):this.name}}]),ze}(),He=je;function tt(ze,_e){if(ze.length!==_e.length)return!1;for(var ue=0;ue1&&arguments[1]!==void 0?arguments[1]:!1,it={map:this.cache};return ue.forEach(function(Te){if(!it)it=void 0;else{var Pe,nt;it=(Pe=it)===null||Pe===void 0||(nt=Pe.map)===null||nt===void 0?void 0:nt.get(Te)}}),((Ye=it)===null||Ye===void 0?void 0:Ye.value)&&Je&&(it.value[1]=this.cacheCallTimes++),(Ve=it)===null||Ve===void 0?void 0:Ve.value}},{key:"get",value:function(ue){var Ye;return(Ye=this.internalGet(ue,!0))===null||Ye===void 0?void 0:Ye[0]}},{key:"has",value:function(ue){return!!this.internalGet(ue)}},{key:"set",value:function(ue,Ye){var Ve=this;if(!this.has(ue)){if(this.size()+1>ze.MAX_CACHE_SIZE+ze.MAX_CACHE_OFFSET){var Je=this.keys.reduce(function(nt,pt){var yt=(0,a.Z)(nt,2),wt=yt[1];return Ve.internalGet(pt)[1]0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Ue+=1}return(0,A.Z)(ze,[{key:"getDerivativeToken",value:function(ue){return this.derivatives.reduce(function(Ye,Ve){return Ve(ue,Ye)},void 0)}}]),ze}(),$e=new We;function Le(ze){var _e=Array.isArray(ze)?ze:[ze];return $e.has(_e)||$e.set(_e,new Ie(_e)),$e.get(_e)}},84089:function(f,v,e){"use strict";e.d(v,{Z:function(){return J}});var r=e(1413),t=e(97685),a=e(4942),i=e(91),o=e(67294),u=e(94184),c=e.n(u),l=e(63017),d=e(41755),p=["icon","className","onClick","style","primaryColor","secondaryColor"],M={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function _(D){var R=D.primaryColor,U=D.secondaryColor;M.primaryColor=R,M.secondaryColor=U||(0,d.pw)(R),M.calculated=!!U}function y(){return(0,r.Z)({},M)}var I=function(R){var U=R.icon,ee=R.className,de=R.onClick,he=R.style,ve=R.primaryColor,ce=R.secondaryColor,xe=(0,i.Z)(R,p),Q=M;if(ve&&(Q={primaryColor:ve,secondaryColor:ce||(0,d.pw)(ve)}),(0,d.C3)(),(0,d.Kp)((0,d.r)(U),"icon should be icon definiton, but got ".concat(U)),!(0,d.r)(U))return null;var V=U;return V&&typeof V.icon=="function"&&(V=(0,r.Z)((0,r.Z)({},V),{},{icon:V.icon(Q.primaryColor,Q.secondaryColor)})),(0,d.R_)(V.icon,"svg-".concat(V.name),(0,r.Z)({className:ee,onClick:de,style:he,"data-icon":V.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},xe))};I.displayName="IconReact",I.getTwoToneColors=y,I.setTwoToneColors=_;var S=I;function A(D){var R=(0,d.H9)(D),U=(0,t.Z)(R,2),ee=U[0],de=U[1];return S.setTwoToneColors({primaryColor:ee,secondaryColor:de})}function O(){var D=S.getTwoToneColors();return D.calculated?[D.primaryColor,D.secondaryColor]:D.primaryColor}var j=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];A("#1890ff");var F=o.forwardRef(function(D,R){var U,ee=D.className,de=D.icon,he=D.spin,ve=D.rotate,ce=D.tabIndex,xe=D.onClick,Q=D.twoToneColor,V=(0,i.Z)(D,j),W=o.useContext(l.Z),L=W.prefixCls,k=L===void 0?"anticon":L,re=W.rootClassName,K=c()(re,k,(U={},(0,a.Z)(U,"".concat(k,"-").concat(de.name),!!de.name),(0,a.Z)(U,"".concat(k,"-spin"),!!he||de.name==="loading"),U),ee),ie=ce;ie===void 0&&xe&&(ie=-1);var me=ve?{msTransform:"rotate(".concat(ve,"deg)"),transform:"rotate(".concat(ve,"deg)")}:void 0,Ze=(0,d.H9)(Q),De=(0,t.Z)(Ze,2),Fe=De[0],mt=De[1];return o.createElement("span",(0,r.Z)((0,r.Z)({role:"img","aria-label":de.name},V),{},{ref:R,tabIndex:ie,onClick:xe,className:K}),o.createElement(S,{icon:de,primaryColor:Fe,secondaryColor:mt,style:me}))});F.displayName="AntdIcon",F.getTwoToneColor=O,F.setTwoToneColor=A;var J=F},63017:function(f,v,e){"use strict";var r=e(67294),t=(0,r.createContext)({});v.Z=t},41156:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="AppstoreOutlined";var c=t.forwardRef(u)},89739:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="CheckCircleFilled";var c=t.forwardRef(u)},4340:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="CloseCircleFilled";var c=t.forwardRef(u)},97937:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="CloseOutlined";var c=t.forwardRef(u)},89705:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="EllipsisOutlined";var c=t.forwardRef(u)},21640:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="ExclamationCircleFilled";var c=t.forwardRef(u)},78860:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="InfoCircleFilled";var c=t.forwardRef(u)},6171:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="LeftOutlined";var c=t.forwardRef(u)},50888:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="LoadingOutlined";var c=t.forwardRef(u)},92443:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="LogoutOutlined";var c=t.forwardRef(u)},25035:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="QuestionCircleOutlined";var c=t.forwardRef(u)},18073:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="RightOutlined";var c=t.forwardRef(u)},56034:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="SafetyCertificateOutlined";var c=t.forwardRef(u)},42952:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="SettingOutlined";var c=t.forwardRef(u)},55355:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="TeamOutlined";var c=t.forwardRef(u)},87547:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(1413),t=e(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},i=a,o=e(84089),u=function(d,p){return t.createElement(o.Z,(0,r.Z)((0,r.Z)({},d),{},{ref:p,icon:i}))};u.displayName="UserOutlined";var c=t.forwardRef(u)},41755:function(f,v,e){"use strict";e.d(v,{C3:function(){return A},H9:function(){return y},Kp:function(){return l},R_:function(){return M},pw:function(){return _},r:function(){return d},vD:function(){return I}});var r=e(1413),t=e(71002),a=e(92138),i=e(67294),o=e(80334),u=e(44958),c=e(63017);function l(O,j){(0,o.ZP)(O,"[@ant-design/icons] ".concat(j))}function d(O){return(0,t.Z)(O)==="object"&&typeof O.name=="string"&&typeof O.theme=="string"&&((0,t.Z)(O.icon)==="object"||typeof O.icon=="function")}function p(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(O).reduce(function(j,F){var J=O[F];switch(F){case"class":j.className=J,delete j.class;break;default:j[F]=J}return j},{})}function M(O,j,F){return F?i.createElement(O.tag,(0,r.Z)((0,r.Z)({key:j},p(O.attrs)),F),(O.children||[]).map(function(J,D){return M(J,"".concat(j,"-").concat(O.tag,"-").concat(D))})):i.createElement(O.tag,(0,r.Z)({key:j},p(O.attrs)),(O.children||[]).map(function(J,D){return M(J,"".concat(j,"-").concat(O.tag,"-").concat(D))}))}function _(O){return(0,a.generate)(O)[0]}function y(O){return O?Array.isArray(O)?O:[O]:[]}var I={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},S=` +.anticon { + display: inline-block; + color: inherit; + font-style: normal; + line-height: 0; + text-align: center; + text-transform: none; + vertical-align: -0.125em; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.anticon > * { + line-height: 1; +} + +.anticon svg { + display: inline-block; +} + +.anticon::before { + display: none; +} + +.anticon .anticon-icon { + display: block; +} + +.anticon[tabindex] { + cursor: pointer; +} + +.anticon-spin::before, +.anticon-spin { + display: inline-block; + -webkit-animation: loadingCircle 1s infinite linear; + animation: loadingCircle 1s infinite linear; +} + +@-webkit-keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +`,A=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:S,F=(0,i.useContext)(c.Z),J=F.csp;(0,i.useEffect)(function(){(0,u.hq)(j,"@ant-design-icons",{prepend:!0,csp:J})},[])}},83832:function(f,v,e){"use strict";e.d(v,{S:function(){return u}});var r=e(1413),t=e(91),a=e(85893),i=e(57953),o=["isLoading","pastDelay","timedOut","error","retry"],u=function(l){var d=l.isLoading,p=l.pastDelay,M=l.timedOut,_=l.error,y=l.retry,I=(0,t.Z)(l,o);return(0,a.jsx)("div",{style:{paddingBlockStart:100,textAlign:"center"},children:(0,a.jsx)(i.Z,(0,r.Z)({size:"large"},I))})}},73964:function(f,v,e){"use strict";e.d(v,{_Y:function(){return _e},L_:function(){return Ye},ZP:function(){return Ve},Go:function(){return tt},YB:function(){return ue}});var r=e(74902),t=e(97685),a=e(91),i=e(1413),o=e(37762),u=e(85893),c=e(66981),l=e(46986),d=e(37029),p=e(67294),M=e(8100),_={moneySymbol:"$",form:{lightFilter:{more:"\u0627\u0644\u0645\u0632\u064A\u062F",clear:"\u0646\u0638\u0641",confirm:"\u062A\u0623\u0643\u064A\u062F",itemUnit:"\u0639\u0646\u0627\u0635\u0631"}},tableForm:{search:"\u0627\u0628\u062D\u062B",reset:"\u0625\u0639\u0627\u062F\u0629 \u062A\u0639\u064A\u064A\u0646",submit:"\u0627\u0631\u0633\u0627\u0644",collapsed:"\u0645\u064F\u0642\u0644\u0635",expand:"\u0645\u064F\u0648\u0633\u0639",inputPlaceholder:"\u0627\u0644\u0631\u062C\u0627\u0621 \u0627\u0644\u0625\u062F\u062E\u0627\u0644",selectPlaceholder:"\u0627\u0644\u0631\u062C\u0627\u0621 \u0627\u0644\u0625\u062E\u062A\u064A\u0627\u0631"},alert:{clear:"\u0646\u0638\u0641",selected:"\u0645\u062D\u062F\u062F",item:"\u0639\u0646\u0635\u0631"},pagination:{total:{range:" ",total:"\u0645\u0646",item:"\u0639\u0646\u0627\u0635\u0631"}},tableToolBar:{leftPin:"\u062B\u0628\u062A \u0639\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631",rightPin:"\u062B\u0628\u062A \u0639\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646",noPin:"\u0627\u0644\u063A\u0627\u0621 \u0627\u0644\u062A\u062B\u0628\u064A\u062A",leftFixedTitle:"\u0644\u0635\u0642 \u0639\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631",rightFixedTitle:"\u0644\u0635\u0642 \u0639\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646",noFixedTitle:"\u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u0625\u0644\u0635\u0627\u0642",reset:"\u0625\u0639\u0627\u062F\u0629 \u062A\u0639\u064A\u064A\u0646",columnDisplay:"\u0627\u0644\u0623\u0639\u0645\u062F\u0629 \u0627\u0644\u0645\u0639\u0631\u0648\u0636\u0629",columnSetting:"\u0627\u0644\u0625\u0639\u062F\u0627\u062F\u0627\u062A",fullScreen:"\u0648\u0636\u0639 \u0643\u0627\u0645\u0644 \u0627\u0644\u0634\u0627\u0634\u0629",exitFullScreen:"\u0627\u0644\u062E\u0631\u0648\u062C \u0645\u0646 \u0648\u0636\u0639 \u0643\u0627\u0645\u0644 \u0627\u0644\u0634\u0627\u0634\u0629",reload:"\u062A\u062D\u062F\u064A\u062B",density:"\u0627\u0644\u0643\u062B\u0627\u0641\u0629",densityDefault:"\u0627\u0641\u062A\u0631\u0627\u0636\u064A",densityLarger:"\u0623\u0643\u0628\u0631",densityMiddle:"\u0648\u0633\u0637",densitySmall:"\u0645\u062F\u0645\u062C"},stepsForm:{next:"\u0627\u0644\u062A\u0627\u0644\u064A",prev:"\u0627\u0644\u0633\u0627\u0628\u0642",submit:"\u0623\u0646\u0647\u0649"},loginForm:{submitText:"\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644"},editableTable:{action:{save:"\u0623\u0646\u0642\u0630",cancel:"\u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u0623\u0645\u0631",delete:"\u062D\u0630\u0641",add:"\u0625\u0636\u0627\u0641\u0629 \u0635\u0641 \u0645\u0646 \u0627\u0644\u0628\u064A\u0627\u0646\u0627\u062A"}},switch:{open:"\u0645\u0641\u062A\u0648\u062D",close:"\u063A\u0644\u0642"}},y={moneySymbol:"\u20AC",form:{lightFilter:{more:"M\xE9s",clear:"Netejar",confirm:"Confirmar",itemUnit:"Elements"}},tableForm:{search:"Cercar",reset:"Netejar",submit:"Enviar",collapsed:"Expandir",expand:"Col\xB7lapsar",inputPlaceholder:"Introdu\xEFu valor",selectPlaceholder:"Seleccioneu valor"},alert:{clear:"Netejar",selected:"Seleccionat",item:"Article"},pagination:{total:{range:" ",total:"de",item:"articles"}},tableToolBar:{leftPin:"Pin a l'esquerra",rightPin:"Pin a la dreta",noPin:"Sense Pin",leftFixedTitle:"Fixat a l'esquerra",rightFixedTitle:"Fixat a la dreta",noFixedTitle:"Sense fixar",reset:"Reiniciar",columnDisplay:"Mostrar Columna",columnSetting:"Configuraci\xF3",fullScreen:"Pantalla Completa",exitFullScreen:"Sortir Pantalla Completa",reload:"Refrescar",density:"Densitat",densityDefault:"Per Defecte",densityLarger:"Llarg",densityMiddle:"Mitj\xE0",densitySmall:"Compacte"},stepsForm:{next:"Seg\xFCent",prev:"Anterior",submit:"Finalizar"},loginForm:{submitText:"Entrar"},editableTable:{action:{save:"Guardar",cancel:"Cancel\xB7lar",delete:"Eliminar",add:"afegir una fila de dades"}},switch:{open:"obert",close:"tancat"}},I={moneySymbol:"\u20AC",form:{lightFilter:{more:"Mehr",clear:"Zur\xFCcksetzen",confirm:"Best\xE4tigen",itemUnit:"Eintr\xE4ge"}},tableForm:{search:"Suchen",reset:"Zur\xFCcksetzen",submit:"Absenden",collapsed:"Zeige mehr",expand:"Zeige weniger",inputPlaceholder:"Bitte eingeben",selectPlaceholder:"Bitte ausw\xE4hlen"},alert:{clear:"Zur\xFCcksetzen",selected:"Ausgew\xE4hlt",item:"Eintrag"},pagination:{total:{range:" ",total:"von",item:"Eintr\xE4gen"}},tableToolBar:{leftPin:"Links anheften",rightPin:"Rechts anheften",noPin:"Nicht angeheftet",leftFixedTitle:"Links fixiert",rightFixedTitle:"Rechts fixiert",noFixedTitle:"Nicht fixiert",reset:"Zur\xFCcksetzen",columnDisplay:"Angezeigte Reihen",columnSetting:"Einstellungen",fullScreen:"Vollbild",exitFullScreen:"Vollbild verlassen",reload:"Aktualisieren",density:"Abstand",densityDefault:"Standard",densityLarger:"Gr\xF6\xDFer",densityMiddle:"Mittel",densitySmall:"Kompakt"},stepsForm:{next:"Weiter",prev:"Zur\xFCck",submit:"Abschlie\xDFen"},loginForm:{submitText:"Anmelden"},editableTable:{action:{save:"Retten",cancel:"Abbrechen",delete:"L\xF6schen",add:"Hinzuf\xFCgen einer Datenzeile"}},switch:{open:"offen",close:"schlie\xDFen"}},S={moneySymbol:"\xA3",form:{lightFilter:{more:"More",clear:"Clear",confirm:"Confirm",itemUnit:"Items"}},tableForm:{search:"Query",reset:"Reset",submit:"Submit",collapsed:"Expand",expand:"Collapse",inputPlaceholder:"Please enter",selectPlaceholder:"Please select"},alert:{clear:"Clear",selected:"Selected",item:"Item"},pagination:{total:{range:" ",total:"of",item:"items"}},tableToolBar:{leftPin:"Pin to left",rightPin:"Pin to right",noPin:"Unpinned",leftFixedTitle:"Fixed the left",rightFixedTitle:"Fixed the right",noFixedTitle:"Not Fixed",reset:"Reset",columnDisplay:"Column Display",columnSetting:"Settings",fullScreen:"Full Screen",exitFullScreen:"Exit Full Screen",reload:"Refresh",density:"Density",densityDefault:"Default",densityLarger:"Larger",densityMiddle:"Middle",densitySmall:"Compact"},stepsForm:{next:"Next",prev:"Previous",submit:"Finish"},loginForm:{submitText:"Login"},editableTable:{action:{save:"Save",cancel:"Cancel",delete:"Delete",add:"add a row of data"}},switch:{open:"open",close:"close"}},A={moneySymbol:"$",deleteThisLine:"Delete this line",copyThisLine:"Copy this line",form:{lightFilter:{more:"More",clear:"Clear",confirm:"Confirm",itemUnit:"Items"}},tableForm:{search:"Query",reset:"Reset",submit:"Submit",collapsed:"Expand",expand:"Collapse",inputPlaceholder:"Please enter",selectPlaceholder:"Please select"},alert:{clear:"Clear",selected:"Selected",item:"Item"},pagination:{total:{range:" ",total:"of",item:"items"}},tableToolBar:{leftPin:"Pin to left",rightPin:"Pin to right",noPin:"Unpinned",leftFixedTitle:"Fixed the left",rightFixedTitle:"Fixed the right",noFixedTitle:"Not Fixed",reset:"Reset",columnDisplay:"Column Display",columnSetting:"Settings",fullScreen:"Full Screen",exitFullScreen:"Exit Full Screen",reload:"Refresh",density:"Density",densityDefault:"Default",densityLarger:"Larger",densityMiddle:"Middle",densitySmall:"Compact"},stepsForm:{next:"Next",prev:"Previous",submit:"Finish"},loginForm:{submitText:"Login"},editableTable:{onlyOneLineEditor:"Only one line can be edited",action:{save:"Save",cancel:"Cancel",delete:"Delete",add:"add a row of data"}},switch:{open:"open",close:"close"}},O={moneySymbol:"\u20AC",form:{lightFilter:{more:"M\xE1s",clear:"Limpiar",confirm:"Confirmar",itemUnit:"art\xEDculos"}},tableForm:{search:"Buscar",reset:"Limpiar",submit:"Submit",collapsed:"Expandir",expand:"Colapsar",inputPlaceholder:"Ingrese valor",selectPlaceholder:"Seleccione valor"},alert:{clear:"Limpiar",selected:"Seleccionado",item:"Articulo"},pagination:{total:{range:" ",total:"de",item:"art\xEDculos"}},tableToolBar:{leftPin:"Pin a la izquierda",rightPin:"Pin a la derecha",noPin:"Sin Pin",leftFixedTitle:"Fijado a la izquierda",rightFixedTitle:"Fijado a la derecha",noFixedTitle:"Sin Fijar",reset:"Reiniciar",columnDisplay:"Mostrar Columna",columnSetting:"Configuraci\xF3n",fullScreen:"Pantalla Completa",exitFullScreen:"Salir Pantalla Completa",reload:"Refrescar",density:"Densidad",densityDefault:"Por Defecto",densityLarger:"Largo",densityMiddle:"Medio",densitySmall:"Compacto"},stepsForm:{next:"Siguiente",prev:"Anterior",submit:"Finalizar"},loginForm:{submitText:"Entrar"},editableTable:{action:{save:"Guardar",cancel:"Descartar",delete:"Borrar",add:"a\xF1adir una fila de datos"}},switch:{open:"abrir",close:"cerrar"}},j={moneySymbol:"\u062A\u0648\u0645\u0627\u0646",form:{lightFilter:{more:"\u0628\u06CC\u0634\u062A\u0631",clear:"\u067E\u0627\u06A9 \u06A9\u0631\u062F\u0646",confirm:"\u062A\u0627\u06CC\u06CC\u062F",itemUnit:"\u0645\u0648\u0631\u062F"}},tableForm:{search:"\u062C\u0633\u062A\u062C\u0648",reset:"\u0628\u0627\u0632\u0646\u0634\u0627\u0646\u06CC",submit:"\u062A\u0627\u06CC\u06CC\u062F",collapsed:"\u0646\u0645\u0627\u06CC\u0634 \u0628\u06CC\u0634\u062A\u0631",expand:"\u0646\u0645\u0627\u06CC\u0634 \u06A9\u0645\u062A\u0631",inputPlaceholder:"\u067E\u06CC\u062F\u0627 \u06A9\u0646\u06CC\u062F",selectPlaceholder:"\u0627\u0646\u062A\u062E\u0627\u0628 \u06A9\u0646\u06CC\u062F"},alert:{clear:"\u067E\u0627\u06A9 \u0633\u0627\u0632\u06CC",selected:"\u0627\u0646\u062A\u062E\u0627\u0628",item:"\u0645\u0648\u0631\u062F"},pagination:{total:{range:" ",total:"\u0627\u0632",item:"\u0645\u0648\u0631\u062F"}},tableToolBar:{leftPin:"\u0633\u0646\u062C\u0627\u0642 \u0628\u0647 \u0686\u067E",rightPin:"\u0633\u0646\u062C\u0627\u0642 \u0628\u0647 \u0631\u0627\u0633\u062A",noPin:"\u0633\u0646\u062C\u0627\u0642 \u0646\u0634\u062F\u0647",leftFixedTitle:"\u062B\u0627\u0628\u062A \u0634\u062F\u0647 \u062F\u0631 \u0686\u067E",rightFixedTitle:"\u062B\u0627\u0628\u062A \u0634\u062F\u0647 \u062F\u0631 \u0631\u0627\u0633\u062A",noFixedTitle:"\u0634\u0646\u0627\u0648\u0631",reset:"\u0628\u0627\u0632\u0646\u0634\u0627\u0646\u06CC",columnDisplay:"\u0646\u0645\u0627\u06CC\u0634 \u0647\u0645\u0647",columnSetting:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A",fullScreen:"\u062A\u0645\u0627\u0645 \u0635\u0641\u062D\u0647",exitFullScreen:"\u062E\u0631\u0648\u062C \u0627\u0632 \u062D\u0627\u0644\u062A \u062A\u0645\u0627\u0645 \u0635\u0641\u062D\u0647",reload:"\u062A\u0627\u0632\u0647 \u0633\u0627\u0632\u06CC",density:"\u062A\u0631\u0627\u06A9\u0645",densityDefault:"\u067E\u06CC\u0634 \u0641\u0631\u0636",densityLarger:"\u0628\u0632\u0631\u06AF",densityMiddle:"\u0645\u062A\u0648\u0633\u0637",densitySmall:"\u06A9\u0648\u0686\u06A9"},stepsForm:{next:"\u0628\u0639\u062F\u06CC",prev:"\u0642\u0628\u0644\u06CC",submit:"\u0627\u062A\u0645\u0627\u0645"},loginForm:{submitText:"\u0648\u0631\u0648\u062F"},editableTable:{action:{save:"\u0630\u062E\u06CC\u0631\u0647",cancel:"\u0644\u063A\u0648",delete:"\u062D\u0630\u0641",add:"\u06CC\u06A9 \u0631\u062F\u06CC\u0641 \u062F\u0627\u062F\u0647 \u0627\u0636\u0627\u0641\u0647 \u06A9\u0646\u06CC\u062F"}},switch:{open:"\u0628\u0627\u0632",close:"\u0646\u0632\u062F\u06CC\u06A9"}},F={moneySymbol:"\u20AC",form:{lightFilter:{more:"Plus",clear:"Effacer",confirm:"Confirmer",itemUnit:"Items"}},tableForm:{search:"Rechercher",reset:"R\xE9initialiser",submit:"Envoyer",collapsed:"Agrandir",expand:"R\xE9duire",inputPlaceholder:"Entrer une valeur",selectPlaceholder:"S\xE9lectionner une valeur"},alert:{clear:"R\xE9initialiser",selected:"S\xE9lectionn\xE9",item:"Item"},pagination:{total:{range:" ",total:"sur",item:"\xE9l\xE9ments"}},tableToolBar:{leftPin:"\xC9pingler \xE0 gauche",rightPin:"\xC9pingler \xE0 gauche",noPin:"Sans \xE9pingle",leftFixedTitle:"Fixer \xE0 gauche",rightFixedTitle:"Fixer \xE0 droite",noFixedTitle:"Non fix\xE9",reset:"R\xE9initialiser",columnDisplay:"Affichage colonne",columnSetting:"R\xE9glages",fullScreen:"Plein \xE9cran",exitFullScreen:"Quitter Plein \xE9cran",reload:"Rafraichir",density:"Densit\xE9",densityDefault:"Par d\xE9faut",densityLarger:"Larger",densityMiddle:"Moyenne",densitySmall:"Compacte"},stepsForm:{next:"Suivante",prev:"Pr\xE9c\xE9dente",submit:"Finaliser"},loginForm:{submitText:"Se connecter"},editableTable:{action:{save:"Sauvegarder",cancel:"Annuler",delete:"Supprimer",add:"ajouter une ligne de donn\xE9es"}},switch:{open:"ouvert",close:"pr\xE8s"}},J={moneySymbol:"kn",form:{lightFilter:{more:"Vi\u0161e",clear:"O\u010Disti",confirm:"Potvrdi",itemUnit:"Stavke"}},tableForm:{search:"Pretra\u017Ei",reset:"Poni\u0161ti",submit:"Potvrdi",collapsed:"Ra\u0161iri",expand:"Skupi",inputPlaceholder:"Unesite",selectPlaceholder:"Odaberite"},alert:{clear:"O\u010Disti",selected:"Odaberi",item:"stavke"},pagination:{total:{range:" ",total:"od",item:"stavke"}},tableToolBar:{leftPin:"Prika\u010Di lijevo",rightPin:"Prika\u010Di desno",noPin:"Bez prika\u010Denja",leftFixedTitle:"Fiksiraj lijevo",rightFixedTitle:"Fiksiraj desno",noFixedTitle:"Bez fiksiranja",reset:"Resetiraj",columnDisplay:"Prikaz stupaca",columnSetting:"Postavke",fullScreen:"Puni zaslon",exitFullScreen:"Iza\u0111i iz punog zaslona",reload:"Ponovno u\u010Ditaj",density:"Veli\u010Dina",densityDefault:"Zadano",densityLarger:"Veliko",densityMiddle:"Srednje",densitySmall:"Malo"},stepsForm:{next:"Sljede\u0107i",prev:"Prethodni",submit:"Kraj"},loginForm:{submitText:"Prijava"},editableTable:{action:{save:"Spremi",cancel:"Odustani",delete:"Obri\u0161i",add:"dodajte red podataka"}},switch:{open:"otvori",close:"zatvori"}},D={moneySymbol:"RP",form:{lightFilter:{more:"Lebih",clear:"Hapus",confirm:"Konfirmasi",itemUnit:"Unit"}},tableForm:{search:"Cari",reset:"Atur ulang",submit:"Kirim",collapsed:"Lebih sedikit",expand:"Lebih banyak",inputPlaceholder:"Masukkan pencarian",selectPlaceholder:"Pilih"},alert:{clear:"Hapus",selected:"Dipilih",item:"Butir"},pagination:{total:{range:" ",total:"Dari",item:"Butir"}},tableToolBar:{leftPin:"Pin kiri",rightPin:"Pin kanan",noPin:"Tidak ada pin",leftFixedTitle:"Rata kiri",rightFixedTitle:"Rata kanan",noFixedTitle:"Tidak tetap",reset:"Atur ulang",columnDisplay:"Tampilan kolom",columnSetting:"Pengaturan",fullScreen:"Layar penuh",exitFullScreen:"Keluar layar penuh",reload:"Atur ulang",density:"Kerapatan",densityDefault:"Standar",densityLarger:"Lebih besar",densityMiddle:"Sedang",densitySmall:"Rapat"},stepsForm:{next:"Selanjutnya",prev:"Sebelumnya",submit:"Selesai"},loginForm:{submitText:"Login"},editableTable:{action:{save:"simpan",cancel:"batal",delete:"hapus",add:"Tambahkan baris data"}},switch:{open:"buka",close:"tutup"}},R={moneySymbol:"\u20AC",form:{lightFilter:{more:"pi\xF9",clear:"pulisci",confirm:"conferma",itemUnit:"elementi"}},tableForm:{search:"Filtra",reset:"Pulisci",submit:"Invia",collapsed:"Espandi",expand:"Contrai",inputPlaceholder:"Digita",selectPlaceholder:"Seleziona"},alert:{clear:"Rimuovi",selected:"Selezionati",item:"elementi"},pagination:{total:{range:" ",total:"di",item:"elementi"}},tableToolBar:{leftPin:"Fissa a sinistra",rightPin:"Fissa a destra",noPin:"Ripristina posizione",leftFixedTitle:"Fissato a sinistra",rightFixedTitle:"Fissato a destra",noFixedTitle:"Non fissato",reset:"Ripristina",columnDisplay:"Disposizione colonne",columnSetting:"Impostazioni",fullScreen:"Modalit\xE0 schermo intero",exitFullScreen:"Esci da modalit\xE0 schermo intero",reload:"Ricarica",density:"Grandezza tabella",densityDefault:"predefinito",densityLarger:"Grande",densityMiddle:"Media",densitySmall:"Compatta"},stepsForm:{next:"successivo",prev:"precedente",submit:"finisci"},loginForm:{submitText:"Accedi"},editableTable:{action:{save:"salva",cancel:"annulla",delete:"Delete",add:"add a row of data"}},switch:{open:"open",close:"chiudi"}},U={moneySymbol:"\xA5",form:{lightFilter:{more:"\u3082\u3063\u3068",clear:"\u660E\u78BA",confirm:"\u78BA\u8A8D",itemUnit:"\u9805\u76EE"}},tableForm:{search:"\u691C\u7D22",reset:"\u30EA\u30BB\u30C3\u30C8",submit:"\u63D0\u4EA4",collapsed:"\u5C55\u958B",expand:"\u53CE\u7D0D",inputPlaceholder:"\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",selectPlaceholder:"\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044"},alert:{clear:"\u30AF\u30EA\u30A2",selected:"\u9078\u629E\u3057\u305F",item:"\u9805\u76EE"},pagination:{total:{range:"\u8A18\u4E8B",total:"/\u5408\u8A08",item:" "}},tableToolBar:{leftPin:"\u5DE6\u306B\u56FA\u5B9A",rightPin:"\u53F3\u306B\u56FA\u5B9A",noPin:"\u30AD\u30E3\u30F3\u30BB\u30EB",leftFixedTitle:"\u5DE6\u306B\u56FA\u5B9A\u3055\u308C\u305F\u9805\u76EE",rightFixedTitle:"\u53F3\u306B\u56FA\u5B9A\u3055\u308C\u305F\u9805\u76EE",noFixedTitle:"\u56FA\u5B9A\u3055\u308C\u3066\u306A\u3044\u9805\u76EE",reset:"\u30EA\u30BB\u30C3\u30C8",columnDisplay:"\u8868\u793A\u5217",columnSetting:"\u5217\u8868\u793A\u8A2D\u5B9A",fullScreen:"\u30D5\u30EB\u30B9\u30AF\u30EA\u30FC\u30F3",exitFullScreen:"\u7D42\u4E86",reload:"\u66F4\u65B0",density:"\u884C\u9AD8",densityDefault:"\u30C7\u30D5\u30A9\u30EB\u30C8",densityLarger:"\u9ED8\u8BA4",densityMiddle:"\u4E2D",densitySmall:"\u5C0F"},stepsForm:{next:"\u6B21\u306E\u30B9\u30C6\u30C3\u30D7",prev:"\u524D",submit:"\u9001\u4FE1"},loginForm:{submitText:"\u30ED\u30B0\u30A4\u30F3"},editableTable:{action:{save:"\u6551\u3046",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",delete:"\u524A\u9664",add:"1\u884C\u306E\u30C7\u30FC\u30BF\u3092\u8FFD\u52A0\u3057\u307E\u3059"}},switch:{open:"\u30AA\u30FC\u30D7\u30F3",close:"\u8FD1\u3044"}},ee={moneySymbol:"\u20A9",form:{lightFilter:{more:"\uB354\uBCF4\uAE30",clear:"\uCDE8\uC18C",confirm:"\uD655\uC778",itemUnit:"\uAC74\uC218"}},tableForm:{search:"\uC870\uD68C",reset:"\uCD08\uAE30\uD654",submit:"\uC81C\uCD9C",collapsed:"\uD655\uC7A5",expand:"\uB2EB\uAE30",inputPlaceholder:"\uC785\uB825\uD574 \uC8FC\uC138\uC694",selectPlaceholder:"\uC120\uD0DD\uD574 \uC8FC\uC138\uC694"},alert:{clear:"\uCDE8\uC18C",selected:"\uC120\uD0DD",item:"\uAC74"},pagination:{total:{range:" ",total:"/ \uCD1D",item:"\uAC74"}},tableToolBar:{leftPin:"\uC67C\uCABD\uC73C\uB85C \uD540",rightPin:"\uC624\uB978\uCABD\uC73C\uB85C \uD540",noPin:"\uD540 \uC81C\uAC70",leftFixedTitle:"\uC67C\uCABD\uC73C\uB85C \uACE0\uC815",rightFixedTitle:"\uC624\uB978\uCABD\uC73C\uB85C \uACE0\uC815",noFixedTitle:"\uBE44\uACE0\uC815",reset:"\uCD08\uAE30\uD654",columnDisplay:"\uCEEC\uB7FC \uD45C\uC2DC",columnSetting:"\uC124\uC815",fullScreen:"\uC804\uCCB4 \uD654\uBA74",exitFullScreen:"\uC804\uCCB4 \uD654\uBA74 \uCDE8\uC18C",reload:"\uB2E4\uC2DC \uC77D\uAE30",density:"\uC5EC\uBC31",densityDefault:"\uAE30\uBCF8",densityLarger:"\uB9CE\uC740 \uC5EC\uBC31",densityMiddle:"\uC911\uAC04 \uC5EC\uBC31",densitySmall:"\uC881\uC740 \uC5EC\uBC31"},stepsForm:{next:"\uB2E4\uC74C",prev:"\uC774\uC804",submit:"\uC885\uB8CC"},loginForm:{submitText:"\uB85C\uADF8\uC778"},editableTable:{action:{save:"\uC800\uC7A5",cancel:"\uCDE8\uC18C",delete:"\uC0AD\uC81C",add:"\uB370\uC774\uD130 \uD589 \uCD94\uAC00"}},switch:{open:"\uC5F4",close:"\uAC00\uAE4C \uC6B4"}},de={moneySymbol:"\u20AE",form:{lightFilter:{more:"\u0418\u043B\u04AF\u04AF",clear:"\u0426\u044D\u0432\u044D\u0440\u043B\u044D\u0445",confirm:"\u0411\u0430\u0442\u0430\u043B\u0433\u0430\u0430\u0436\u0443\u0443\u043B\u0430\u0445",itemUnit:"\u041D\u044D\u0433\u0436\u04AF\u04AF\u0434"}},tableForm:{search:"\u0425\u0430\u0439\u0445",reset:"\u0428\u0438\u043D\u044D\u0447\u043B\u044D\u0445",submit:"\u0418\u043B\u0433\u044D\u044D\u0445",collapsed:"\u04E8\u0440\u0433\u04E9\u0442\u0433\u04E9\u0445",expand:"\u0425\u0443\u0440\u0430\u0430\u0445",inputPlaceholder:"\u0423\u0442\u0433\u0430 \u043E\u0440\u0443\u0443\u043B\u043D\u0430 \u0443\u0443",selectPlaceholder:"\u0423\u0442\u0433\u0430 \u0441\u043E\u043D\u0433\u043E\u043D\u043E \u0443\u0443"},alert:{clear:"\u0426\u044D\u0432\u044D\u0440\u043B\u044D\u0445",selected:"\u0421\u043E\u043D\u0433\u043E\u0433\u0434\u0441\u043E\u043D",item:"\u041D\u044D\u0433\u0436"},pagination:{total:{range:" ",total:"\u041D\u0438\u0439\u0442",item:"\u043C\u04E9\u0440"}},tableToolBar:{leftPin:"\u0417\u04AF\u04AF\u043D \u0442\u0438\u0439\u0448 \u0431\u044D\u0445\u043B\u044D\u0445",rightPin:"\u0411\u0430\u0440\u0443\u0443\u043D \u0442\u0438\u0439\u0448 \u0431\u044D\u0445\u043B\u044D\u0445",noPin:"\u0411\u044D\u0445\u043B\u044D\u0445\u0433\u04AF\u0439",leftFixedTitle:"\u0417\u04AF\u04AF\u043D \u0437\u044D\u0440\u044D\u0433\u0446\u04AF\u04AF\u043B\u044D\u0445",rightFixedTitle:"\u0411\u0430\u0440\u0443\u0443\u043D \u0437\u044D\u0440\u044D\u0433\u0446\u04AF\u04AF\u043B\u044D\u0445",noFixedTitle:"\u0417\u044D\u0440\u044D\u0433\u0446\u04AF\u04AF\u043B\u044D\u0445\u0433\u04AF\u0439",reset:"\u0428\u0438\u043D\u044D\u0447\u043B\u044D\u0445",columnDisplay:"\u0411\u0430\u0433\u0430\u043D\u0430\u0430\u0440 \u0445\u0430\u0440\u0443\u0443\u043B\u0430\u0445",columnSetting:"\u0422\u043E\u0445\u0438\u0440\u0433\u043E\u043E",fullScreen:"\u0411\u04AF\u0442\u044D\u043D \u0434\u044D\u043B\u0433\u044D\u0446\u044D\u044D\u0440",exitFullScreen:"\u0411\u04AF\u0442\u044D\u043D \u0434\u044D\u043B\u0433\u044D\u0446 \u0446\u0443\u0446\u043B\u0430\u0445",reload:"\u0428\u0438\u043D\u044D\u0447\u043B\u044D\u0445",density:"\u0425\u044D\u043C\u0436\u044D\u044D",densityDefault:"\u0425\u044D\u0432\u0438\u0439\u043D",densityLarger:"\u0422\u043E\u043C",densityMiddle:"\u0414\u0443\u043D\u0434",densitySmall:"\u0416\u0438\u0436\u0438\u0433"},stepsForm:{next:"\u0414\u0430\u0440\u0430\u0430\u0445",prev:"\u04E8\u043C\u043D\u04E9\u0445",submit:"\u0414\u0443\u0443\u0441\u0433\u0430\u0445"},loginForm:{submitText:"\u041D\u044D\u0432\u0442\u0440\u044D\u0445"},editableTable:{action:{save:"\u0425\u0430\u0434\u0433\u0430\u043B\u0430\u0445",cancel:"\u0426\u0443\u0446\u043B\u0430\u0445",delete:"\u0423\u0441\u0442\u0433\u0430\u0445",add:"\u041C\u04E9\u0440 \u043D\u044D\u043C\u044D\u0445"}},switch:{open:"\u041D\u044D\u044D\u0445",close:"\u0425\u0430\u0430\u0445"}},he={moneySymbol:"RM",form:{lightFilter:{more:"Lebih banyak",clear:"Jelas",confirm:"Mengesahkan",itemUnit:"Item"}},tableForm:{search:"Cari",reset:"Menetapkan semula",submit:"Hantar",collapsed:"Kembang",expand:"Kuncup",inputPlaceholder:"Sila masuk",selectPlaceholder:"Sila pilih"},alert:{clear:"Padam",selected:"Dipilih",item:"Item"},pagination:{total:{range:" ",total:"daripada",item:"item"}},tableToolBar:{leftPin:"Pin ke kiri",rightPin:"Pin ke kanan",noPin:"Tidak pin",leftFixedTitle:"Tetap ke kiri",rightFixedTitle:"Tetap ke kanan",noFixedTitle:"Tidak Tetap",reset:"Menetapkan semula",columnDisplay:"Lajur",columnSetting:"Settings",fullScreen:"Full Screen",exitFullScreen:"Keluar Full Screen",reload:"Muat Semula",density:"Densiti",densityDefault:"Biasa",densityLarger:"Besar",densityMiddle:"Tengah",densitySmall:"Kecil"},stepsForm:{next:"Seterusnya",prev:"Sebelumnya",submit:"Selesai"},loginForm:{submitText:"Log Masuk"},editableTable:{action:{save:"Simpan",cancel:"Membatalkan",delete:"Menghapuskan",add:"tambah baris data"}},switch:{open:"Terbuka",close:"Tutup"}},ve={moneySymbol:"z\u0142",form:{lightFilter:{more:"Wi\u0119cej",clear:"Wyczy\u015B\u0107",confirm:"Potwierd\u017A",itemUnit:"Ilo\u015B\u0107"}},tableForm:{search:"Szukaj",reset:"Reset",submit:"Zatwierd\u017A",collapsed:"Poka\u017C wiecej",expand:"Poka\u017C mniej",inputPlaceholder:"Prosz\u0119 poda\u0107",selectPlaceholder:"Prosz\u0119 wybra\u0107"},alert:{clear:"Wyczy\u015B\u0107",selected:"Wybrane",item:"Wpis"},pagination:{total:{range:" ",total:"z",item:"Wpis\xF3w"}},tableToolBar:{leftPin:"Przypnij do lewej",rightPin:"Przypnij do prawej",noPin:"Odepnij",leftFixedTitle:"Przypi\u0119te do lewej",rightFixedTitle:"Przypi\u0119te do prawej",noFixedTitle:"Nieprzypi\u0119te",reset:"Reset",columnDisplay:"Wy\u015Bwietlane wiersze",columnSetting:"Ustawienia",fullScreen:"Pe\u0142en ekran",exitFullScreen:"Zamknij pe\u0142en ekran",reload:"Od\u015Bwie\u017C",density:"Odst\u0119p",densityDefault:"Standard",densityLarger:"Wiekszy",densityMiddle:"Sredni",densitySmall:"Kompaktowy"},stepsForm:{next:"Weiter",prev:"Zur\xFCck",submit:"Abschlie\xDFen"},loginForm:{submitText:"Zaloguj si\u0119"},editableTable:{action:{save:"Zapisa\u0107",cancel:"Anuluj",delete:"Usun\u0105\u0107",add:"dodawanie wiersza danych"}},switch:{open:"otwiera\u0107",close:"zamyka\u0107"}},ce={moneySymbol:"R$",form:{lightFilter:{more:"Mais",clear:"Limpar",confirm:"Confirmar",itemUnit:"Itens"}},tableForm:{search:"Filtrar",reset:"Limpar",submit:"Confirmar",collapsed:"Expandir",expand:"Colapsar",inputPlaceholder:"Por favor insira",selectPlaceholder:"Por favor selecione"},alert:{clear:"Limpar",selected:"Selecionado(s)",item:"Item(s)"},pagination:{total:{range:" ",total:"de",item:"itens"}},tableToolBar:{leftPin:"Fixar \xE0 esquerda",rightPin:"Fixar \xE0 direita",noPin:"Desfixado",leftFixedTitle:"Fixado \xE0 esquerda",rightFixedTitle:"Fixado \xE0 direita",noFixedTitle:"N\xE3o fixado",reset:"Limpar",columnDisplay:"Mostrar Coluna",columnSetting:"Configura\xE7\xF5es",fullScreen:"Tela Cheia",exitFullScreen:"Sair da Tela Cheia",reload:"Atualizar",density:"Densidade",densityDefault:"Padr\xE3o",densityLarger:"Largo",densityMiddle:"M\xE9dio",densitySmall:"Compacto"},stepsForm:{next:"Pr\xF3ximo",prev:"Anterior",submit:"Enviar"},loginForm:{submitText:"Entrar"},editableTable:{action:{save:"Salvar",cancel:"Cancelar",delete:"Apagar",add:"adicionar uma linha de dados"}},switch:{open:"abrir",close:"fechar"}},xe={moneySymbol:"\u20BD",form:{lightFilter:{more:"\u0415\u0449\u0435",clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",confirm:"\u041E\u041A",itemUnit:"\u041F\u043E\u0437\u0438\u0446\u0438\u0438"}},tableForm:{search:"\u041D\u0430\u0439\u0442\u0438",reset:"\u0421\u0431\u0440\u043E\u0441",submit:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C",collapsed:"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C",expand:"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C",inputPlaceholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435",selectPlaceholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"},alert:{clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",selected:"\u0412\u044B\u0431\u0440\u0430\u043D\u043E",item:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},pagination:{total:{range:" ",total:"\u0438\u0437",item:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"}},tableToolBar:{leftPin:"\u0417\u0430\u043A\u0440\u0435\u043F\u0438\u0442\u044C \u0441\u043B\u0435\u0432\u0430",rightPin:"\u0417\u0430\u043A\u0440\u0435\u043F\u0438\u0442\u044C \u0441\u043F\u0440\u0430\u0432\u0430",noPin:"\u041E\u0442\u043A\u0440\u0435\u043F\u0438\u0442\u044C",leftFixedTitle:"\u0417\u0430\u043A\u0440\u0435\u043F\u043B\u0435\u043D\u043E \u0441\u043B\u0435\u0432\u0430",rightFixedTitle:"\u0417\u0430\u043A\u0440\u0435\u043F\u043B\u0435\u043D\u043E \u0441\u043F\u0440\u0430\u0432\u0430",noFixedTitle:"\u041D\u0435 \u0437\u0430\u043A\u0440\u0435\u043F\u043B\u0435\u043D\u043E",reset:"\u0421\u0431\u0440\u043E\u0441",columnDisplay:"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0441\u0442\u043E\u043B\u0431\u0446\u0430",columnSetting:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438",fullScreen:"\u041F\u043E\u043B\u043D\u044B\u0439 \u044D\u043A\u0440\u0430\u043D",exitFullScreen:"\u0412\u044B\u0439\u0442\u0438 \u0438\u0437 \u043F\u043E\u043B\u043D\u043E\u044D\u043A\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0440\u0435\u0436\u0438\u043C\u0430",reload:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C",density:"\u0420\u0430\u0437\u043C\u0435\u0440",densityDefault:"\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E",densityLarger:"\u0411\u043E\u043B\u044C\u0448\u043E\u0439",densityMiddle:"\u0421\u0440\u0435\u0434\u043D\u0438\u0439",densitySmall:"\u0421\u0436\u0430\u0442\u044B\u0439"},stepsForm:{next:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439",prev:"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439",submit:"\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C"},loginForm:{submitText:"\u0412\u0445\u043E\u0434"},editableTable:{action:{save:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",delete:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",add:"\u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u044F\u0434 \u0434\u0430\u043D\u043D\u044B\u0445"}},switch:{open:"\u041E\u0442\u043A\u0440\u044B\u0442\u044B\u0439 \u0447\u0435\u043C\u043F\u0438\u043E\u043D\u0430\u0442 \u043C\u0438\u0440\u0430 \u043F\u043E \u0442\u0435\u043D\u043D\u0438\u0441\u0443",close:"\u041F\u043E \u0430\u0434\u0440\u0435\u0441\u0443:"}},Q={moneySymbol:"RSD",form:{lightFilter:{more:"Vi\u0161e",clear:"O\u010Disti",confirm:"Potvrdi",itemUnit:"Stavke"}},tableForm:{search:"Prona\u0111i",reset:"Resetuj",submit:"Po\u0161alji",collapsed:"Pro\u0161iri",expand:"Skupi",inputPlaceholder:"Molimo unesite",selectPlaceholder:"Molimo odaberite"},alert:{clear:"O\u010Disti",selected:"Odabrano",item:"Stavka"},pagination:{total:{range:" ",total:"od",item:"stavki"}},tableToolBar:{leftPin:"Zaka\u010Di levo",rightPin:"Zaka\u010Di desno",noPin:"Nije zaka\u010Deno",leftFixedTitle:"Fiksirano levo",rightFixedTitle:"Fiksirano desno",noFixedTitle:"Nije fiksirano",reset:"Resetuj",columnDisplay:"Prikaz kolona",columnSetting:"Pode\u0161avanja",fullScreen:"Pun ekran",exitFullScreen:"Zatvori pun ekran",reload:"Osve\u017Ei",density:"Veli\u010Dina",densityDefault:"Podrazumevana",densityLarger:"Ve\u0107a",densityMiddle:"Srednja",densitySmall:"Kompaktna"},stepsForm:{next:"Dalje",prev:"Nazad",submit:"Gotovo"},loginForm:{submitText:"Prijavi se"},editableTable:{action:{save:"Sa\u010Duvaj",cancel:"Poni\u0161ti",delete:"Obri\u0161i",add:"dodajte red podataka"}},switch:{open:"\u041E\u0442\u0432\u043E\u0440\u0438\u0442\u0435",close:"\u0417\u0430\u0442\u0432\u043E\u0440\u0438\u0442\u0435"}},V={moneySymbol:"\u20BA",form:{lightFilter:{more:"Daha Fazla",clear:"Temizle",confirm:"Onayla",itemUnit:"\xD6\u011Feler"}},tableForm:{search:"Filtrele",reset:"S\u0131f\u0131rla",submit:"G\xF6nder",collapsed:"Daha fazla",expand:"Daha az",inputPlaceholder:"Filtrelemek i\xE7in bir de\u011Fer girin",selectPlaceholder:"Filtrelemek i\xE7in bir de\u011Fer se\xE7in"},alert:{clear:"Temizle",selected:"Se\xE7ili",item:"\xD6\u011Fe"},pagination:{total:{range:" ",total:"Toplam",item:"\xD6\u011Fe"}},tableToolBar:{leftPin:"Sola sabitle",rightPin:"Sa\u011Fa sabitle",noPin:"Sabitlemeyi kald\u0131r",leftFixedTitle:"Sola sabitlendi",rightFixedTitle:"Sa\u011Fa sabitlendi",noFixedTitle:"Sabitlenmedi",reset:"S\u0131f\u0131rla",columnDisplay:"Kolon G\xF6r\xFCn\xFCm\xFC",columnSetting:"Ayarlar",fullScreen:"Tam Ekran",exitFullScreen:"Tam Ekrandan \xC7\u0131k",reload:"Yenile",density:"Kal\u0131nl\u0131k",densityDefault:"Varsay\u0131lan",densityLarger:"B\xFCy\xFCk",densityMiddle:"Orta",densitySmall:"K\xFC\xE7\xFCk"},stepsForm:{next:"S\u0131radaki",prev:"\xD6nceki",submit:"G\xF6nder"},loginForm:{submitText:"Giri\u015F Yap"},editableTable:{action:{save:"Kaydet",cancel:"Vazge\xE7",delete:"Sil",add:"foegje in rige gegevens ta"}},switch:{open:"a\xE7\u0131k",close:"kapatmak"}},W={moneySymbol:"\u20AB",form:{lightFilter:{more:"Nhi\u1EC1u h\u01A1n",clear:"Trong",confirm:"X\xE1c nh\u1EADn",itemUnit:"M\u1EE5c"}},tableForm:{search:"T\xECm ki\u1EBFm",reset:"L\xE0m l\u1EA1i",submit:"G\u1EEDi \u0111i",collapsed:"M\u1EDF r\u1ED9ng",expand:"Thu g\u1ECDn",inputPlaceholder:"nh\u1EADp d\u1EEF li\u1EC7u",selectPlaceholder:"Vui l\xF2ng ch\u1ECDn"},alert:{clear:"X\xF3a",selected:"\u0111\xE3 ch\u1ECDn",item:"m\u1EE5c"},pagination:{total:{range:" ",total:"tr\xEAn",item:"m\u1EB7t h\xE0ng"}},tableToolBar:{leftPin:"Ghim tr\xE1i",rightPin:"Ghim ph\u1EA3i",noPin:"B\u1ECF ghim",leftFixedTitle:"C\u1ED1 \u0111\u1ECBnh tr\xE1i",rightFixedTitle:"C\u1ED1 \u0111\u1ECBnh ph\u1EA3i",noFixedTitle:"Ch\u01B0a c\u1ED1 \u0111\u1ECBnh",reset:"L\xE0m l\u1EA1i",columnDisplay:"C\u1ED9t hi\u1EC3n th\u1ECB",columnSetting:"C\u1EA5u h\xECnh",fullScreen:"Ch\u1EBF \u0111\u1ED9 to\xE0n m\xE0n h\xECnh",exitFullScreen:"Tho\xE1t ch\u1EBF \u0111\u1ED9 to\xE0n m\xE0n h\xECnh",reload:"L\xE0m m\u1EDBi",density:"M\u1EADt \u0111\u1ED9 hi\u1EC3n th\u1ECB",densityDefault:"M\u1EB7c \u0111\u1ECBnh",densityLarger:"M\u1EB7c \u0111\u1ECBnh",densityMiddle:"Trung b\xECnh",densitySmall:"Ch\u1EADt"},stepsForm:{next:"Sau",prev:"Tr\u01B0\u1EDBc",submit:"K\u1EBFt th\xFAc"},loginForm:{submitText:"\u0110\u0103ng nh\u1EADp"},editableTable:{action:{save:"C\u1EE9u",cancel:"H\u1EE7y",delete:"X\xF3a",add:"th\xEAm m\u1ED9t h\xE0ng d\u1EEF li\u1EC7u"}},switch:{open:"m\u1EDF",close:"\u0111\xF3ng"}},L={moneySymbol:"\uFFE5",deleteThisLine:"\u5220\u9664\u6B64\u884C",copyThisLine:"\u590D\u5236\u6B64\u884C",form:{lightFilter:{more:"\u66F4\u591A\u7B5B\u9009",clear:"\u6E05\u9664",confirm:"\u786E\u8BA4",itemUnit:"\u9879"}},tableForm:{search:"\u67E5\u8BE2",reset:"\u91CD\u7F6E",submit:"\u63D0\u4EA4",collapsed:"\u5C55\u5F00",expand:"\u6536\u8D77",inputPlaceholder:"\u8BF7\u8F93\u5165",selectPlaceholder:"\u8BF7\u9009\u62E9"},alert:{clear:"\u53D6\u6D88\u9009\u62E9",selected:"\u5DF2\u9009\u62E9",item:"\u9879"},pagination:{total:{range:"\u7B2C",total:"\u6761/\u603B\u5171",item:"\u6761"}},tableToolBar:{leftPin:"\u56FA\u5B9A\u5728\u5217\u9996",rightPin:"\u56FA\u5B9A\u5728\u5217\u5C3E",noPin:"\u4E0D\u56FA\u5B9A",leftFixedTitle:"\u56FA\u5B9A\u5728\u5DE6\u4FA7",rightFixedTitle:"\u56FA\u5B9A\u5728\u53F3\u4FA7",noFixedTitle:"\u4E0D\u56FA\u5B9A",reset:"\u91CD\u7F6E",columnDisplay:"\u5217\u5C55\u793A",columnSetting:"\u5217\u8BBE\u7F6E",fullScreen:"\u5168\u5C4F",exitFullScreen:"\u9000\u51FA\u5168\u5C4F",reload:"\u5237\u65B0",density:"\u5BC6\u5EA6",densityDefault:"\u6B63\u5E38",densityLarger:"\u9ED8\u8BA4",densityMiddle:"\u4E2D\u7B49",densitySmall:"\u7D27\u51D1"},stepsForm:{next:"\u4E0B\u4E00\u6B65",prev:"\u4E0A\u4E00\u6B65",submit:"\u63D0\u4EA4"},loginForm:{submitText:"\u767B\u5F55"},editableTable:{onlyOneLineEditor:"\u53EA\u80FD\u540C\u65F6\u7F16\u8F91\u4E00\u884C",action:{save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",add:"\u6DFB\u52A0\u4E00\u884C\u6570\u636E"}},switch:{open:"\u6253\u5F00",close:"\u5173\u95ED"}},k={moneySymbol:"NT$",form:{lightFilter:{more:"\u66F4\u591A\u7BE9\u9078",clear:"\u6E05\u9664",confirm:"\u78BA\u8A8D",itemUnit:"\u9805"}},tableForm:{search:"\u67E5\u8A62",reset:"\u91CD\u7F6E",submit:"\u63D0\u4EA4",collapsed:"\u5C55\u958B",expand:"\u6536\u8D77",inputPlaceholder:"\u8ACB\u8F38\u5165",selectPlaceholder:"\u8ACB\u9078\u64C7"},alert:{clear:"\u53D6\u6D88\u9078\u64C7",selected:"\u5DF2\u9078\u64C7",item:"\u9805"},pagination:{total:{range:"\u7B2C",total:"\u689D/\u7E3D\u5171",item:"\u689D"}},tableToolBar:{leftPin:"\u56FA\u5B9A\u5230\u5DE6\u908A",rightPin:"\u56FA\u5B9A\u5230\u53F3\u908A",noPin:"\u4E0D\u56FA\u5B9A",leftFixedTitle:"\u56FA\u5B9A\u5728\u5DE6\u5074",rightFixedTitle:"\u56FA\u5B9A\u5728\u53F3\u5074",noFixedTitle:"\u4E0D\u56FA\u5B9A",reset:"\u91CD\u7F6E",columnDisplay:"\u5217\u5C55\u793A",columnSetting:"\u5217\u8A2D\u7F6E",fullScreen:"\u5168\u5C4F",exitFullScreen:"\u9000\u51FA\u5168\u5C4F",reload:"\u5237\u65B0",density:"\u5BC6\u5EA6",densityDefault:"\u6B63\u5E38",densityLarger:"\u9ED8\u8A8D",densityMiddle:"\u4E2D\u7B49",densitySmall:"\u7DCA\u6E4A"},stepsForm:{next:"\u4E0B\u4E00\u500B",prev:"\u4EE5\u524D\u7684",submit:"\u5B8C\u6210"},loginForm:{submitText:"\u767B\u5165"},editableTable:{action:{save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u522A\u9664",add:"\u6DFB\u52A0\u4E00\u884C\u6578\u64DA"}},switch:{open:"\u6253\u958B",close:"\u95DC\u9589"}},re=e(14855),K=function(it,Te){var Pe,nt,pt,yt=(0,i.Z)({},it);return(0,i.Z)((0,i.Z)({bgLayout:"linear-gradient(".concat(Te.colorBgContainer,", ").concat(Te.colorBgLayout," 28%)"),colorTextAppListIcon:Te.colorTextSecondary,appListIconHoverBgColor:yt==null||(Pe=yt.sider)===null||Pe===void 0?void 0:Pe.colorBgMenuItemSelected,colorBgAppListIconHover:(0,re.uK)(Te.colorTextBase,.04),colorTextAppListIconHover:Te.colorTextBase},yt),{},{header:(0,i.Z)({colorBgHeader:(0,re.uK)(Te.colorBgElevated,.6),colorHeaderTitle:Te.colorText,colorBgMenuItemHover:(0,re.uK)(Te.colorTextBase,.03),colorBgMenuItemSelected:"transparent",colorTextMenuSelected:(0,re.uK)(Te.colorTextBase,.95),colorBgRightActionsItemHover:(0,re.uK)(Te.colorTextBase,.03),colorTextRightActionsItem:Te.colorTextTertiary,heightLayoutHeader:56,colorTextMenu:Te.colorTextSecondary,colorTextMenuSecondary:Te.colorTextTertiary,colorTextMenuTitle:Te.colorText,colorTextMenuActive:Te.colorText},yt.header),sider:(0,i.Z)({paddingInlineLayoutMenu:8,paddingBlockLayoutMenu:0,colorBgCollapsedButton:Te.colorBgElevated,colorTextCollapsedButtonHover:Te.colorTextSecondary,colorTextCollapsedButton:(0,re.uK)(Te.colorTextBase,.25),colorMenuBackground:"transparent",colorBgMenuItemCollapsedHover:"rgba(90, 75, 75, 0.03)",colorBgMenuItemCollapsedSelected:(0,re.uK)(Te.colorTextBase,.04),colorMenuItemDivider:(0,re.uK)(Te.colorTextBase,.06),colorBgMenuItemHover:(0,re.uK)(Te.colorTextBase,.03),colorBgMenuItemSelected:(0,re.uK)(Te.colorTextBase,.04),colorTextMenuItemHover:Te.colorText,colorTextMenuSelected:(0,re.uK)(Te.colorTextBase,.95),colorTextMenuActive:Te.colorText,colorTextMenu:Te.colorTextSecondary,colorTextMenuSecondary:Te.colorTextTertiary,colorTextMenuTitle:Te.colorText,colorTextSubMenuSelected:(0,re.uK)(Te.colorTextBase,.95)},yt.sider),pageContainer:(0,i.Z)({colorBgPageContainer:"transparent",paddingInlinePageContainerContent:((nt=yt.pageContainer)===null||nt===void 0?void 0:nt.marginInlinePageContainerContent)||40,paddingBlockPageContainerContent:((pt=yt.pageContainer)===null||pt===void 0?void 0:pt.marginBlockPageContainerContent)||24,colorBgPageContainerFixed:"#fff"},yt.pageContainer)})},ie=e(67804),me=e(71002),Ze=function(){for(var it={},Te=arguments.length,Pe=new Array(Te),nt=0;nt1&&arguments[1]!==void 0?arguments[1]:1,A=3735928559^S,O=1103547991^S,j=0,F;j>>16,2246822507)^Math.imul(O^O>>>13,3266489909),O=Math.imul(O^O>>>16,2246822507)^Math.imul(A^A>>>13,3266489909),4294967296*(2097151&O)+(A>>>0)},c=(0,t.jG)(function(y){return y}),l={theme:c,token:(0,r.Z)((0,r.Z)({},o),a.Z===null||a.Z===void 0||(i=a.Z.defaultAlgorithm)===null||i===void 0?void 0:i.call(a.Z,a.Z===null||a.Z===void 0?void 0:a.Z.defaultSeed)),hashId:"pro-".concat(u(JSON.stringify(o)))},d=function(){return l},p=function(){var I;return(0,r.Z)((0,r.Z)({},o),a.Z===null||a.Z===void 0||(I=a.Z.defaultAlgorithm)===null||I===void 0?void 0:I.call(a.Z,a.Z===null||a.Z===void 0?void 0:a.Z.defaultSeed))},M=function(){var I;return(0,r.Z)((0,r.Z)({},o),a.Z===null||a.Z===void 0||(I=a.Z.defaultAlgorithm)===null||I===void 0?void 0:I.call(a.Z,a.Z===null||a.Z===void 0?void 0:a.Z.defaultSeed))},_=function(){var I;return(0,r.Z)((0,r.Z)({},o),a.Z===null||a.Z===void 0||(I=a.Z.defaultAlgorithm)===null||I===void 0?void 0:I.call(a.Z,a.Z===null||a.Z===void 0?void 0:a.Z.defaultSeed))}},38755:function(f,v,e){"use strict";e.d(v,{l:function(){return it}});function r(Te){if(Te.sheet)return Te.sheet;for(var Pe=0;Pe-1&&!Te.return)switch(Te.type){case DECLARATION:Te.return=prefix(Te.value,Te.length,nt);return;case KEYFRAMES:return serialize([copy(Te,{value:replace(Te.value,"@","@"+WEBKIT)})],pt);case RULESET:if(Te.length)return combine(Te.props,function(yt){switch(match(yt,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy(Te,{props:[replace(yt,/:(read-\w+)/,":"+MOZ+"$1")]})],pt);case"::placeholder":return serialize([copy(Te,{props:[replace(yt,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(Te,{props:[replace(yt,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(Te,{props:[replace(yt,/:(plac\w+)/,MS+"input-$1")]})],pt)}return""})}}function M(Te){switch(Te.type){case RULESET:Te.props=Te.props.map(function(Pe){return combine(tokenize(Pe),function(nt,pt,yt){switch(charat(nt,0)){case 12:return substr(nt,1,strlen(nt));case 0:case 40:case 43:case 62:case 126:return nt;case 58:yt[++pt]==="global"&&(yt[pt]="",yt[++pt]="\f"+substr(yt[pt],pt=1,-1));case 32:return pt===1?"":nt;default:switch(pt){case 0:return Te=nt,sizeof(yt)>1?"":nt;case(pt=sizeof(yt)-1):case 2:return pt===2?nt+Te+Te:nt+Te;default:return nt}}})})}}var _=e(92190),y=function(Pe,nt,pt){for(var yt=0,wt=0;yt=wt,wt=(0,i.fj)(),yt===38&&wt===12&&(nt[pt]=1),!(0,i.r)(wt);)(0,i.lp)();return(0,i.tP)(Pe,i.FK)},I=function(Pe,nt){var pt=-1,yt=44;do switch((0,i.r)(yt)){case 0:yt===38&&(0,i.fj)()===12&&(nt[pt]=1),Pe[pt]+=y(i.FK-1,nt,pt);break;case 2:Pe[pt]+=(0,i.iF)(yt);break;case 4:if(yt===44){Pe[++pt]=(0,i.fj)()===58?"&\f":"",nt[pt]=Pe[pt].length;break}default:Pe[pt]+=(0,o.Dp)(yt)}while(yt=(0,i.lp)());return Pe},S=function(Pe,nt){return(0,i.cE)(I((0,i.un)(Pe),nt))},A=new WeakMap,O=function(Pe){if(!(Pe.type!=="rule"||!Pe.parent||Pe.length<1)){for(var nt=Pe.value,pt=Pe.parent,yt=Pe.column===pt.column&&Pe.line===pt.line;pt.type!=="rule";)if(pt=pt.parent,!pt)return;if(!(Pe.props.length===1&&nt.charCodeAt(0)!==58&&!A.get(pt))&&!yt){A.set(Pe,!0);for(var wt=[],ot=S(nt,wt),St=pt.props,dt=0,Rt=0;dt-1},D=function(Pe){return function(nt,pt,yt){if(!(nt.type!=="rule"||Pe.compat)){var wt=nt.value.match(/(:first|:nth|:nth-last)-child/g);if(wt){for(var ot=nt.parent===yt[0],St=ot?yt[0].children:yt,dt=St.length-1;dt>=0;dt--){var Rt=St[dt];if(Rt.line=0;pt--)if(!R(nt[pt]))return!0;return!1},ee=function(Pe){Pe.type="",Pe.value="",Pe.return="",Pe.children="",Pe.props=""},de=function(Pe,nt,pt){!R(Pe)||(Pe.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),ee(Pe)):U(nt,pt)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),ee(Pe)))};function he(Te,Pe){switch((0,o.vp)(Te,Pe)){case 5103:return u.G$+"print-"+Te+Te;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return u.G$+Te+Te;case 5349:case 4246:case 4810:case 6968:case 2756:return u.G$+Te+u.uj+Te+u.MS+Te+Te;case 6828:case 4268:return u.G$+Te+u.MS+Te+Te;case 6165:return u.G$+Te+u.MS+"flex-"+Te+Te;case 5187:return u.G$+Te+(0,o.gx)(Te,/(\w+).+(:[^]+)/,u.G$+"box-$1$2"+u.MS+"flex-$1$2")+Te;case 5443:return u.G$+Te+u.MS+"flex-item-"+(0,o.gx)(Te,/flex-|-self/,"")+Te;case 4675:return u.G$+Te+u.MS+"flex-line-pack"+(0,o.gx)(Te,/align-content|flex-|-self/,"")+Te;case 5548:return u.G$+Te+u.MS+(0,o.gx)(Te,"shrink","negative")+Te;case 5292:return u.G$+Te+u.MS+(0,o.gx)(Te,"basis","preferred-size")+Te;case 6060:return u.G$+"box-"+(0,o.gx)(Te,"-grow","")+u.G$+Te+u.MS+(0,o.gx)(Te,"grow","positive")+Te;case 4554:return u.G$+(0,o.gx)(Te,/([^-])(transform)/g,"$1"+u.G$+"$2")+Te;case 6187:return(0,o.gx)((0,o.gx)((0,o.gx)(Te,/(zoom-|grab)/,u.G$+"$1"),/(image-set)/,u.G$+"$1"),Te,"")+Te;case 5495:case 3959:return(0,o.gx)(Te,/(image-set\([^]*)/,u.G$+"$1$`$1");case 4968:return(0,o.gx)((0,o.gx)(Te,/(.+:)(flex-)?(.*)/,u.G$+"box-pack:$3"+u.MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+u.G$+Te+Te;case 4095:case 3583:case 4068:case 2532:return(0,o.gx)(Te,/(.+)-inline(.+)/,u.G$+"$1$2")+Te;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if((0,o.to)(Te)-1-Pe>6)switch((0,o.uO)(Te,Pe+1)){case 109:if((0,o.uO)(Te,Pe+4)!==45)break;case 102:return(0,o.gx)(Te,/(.+:)(.+)-([^]+)/,"$1"+u.G$+"$2-$3$1"+u.uj+((0,o.uO)(Te,Pe+3)==108?"$3":"$2-$3"))+Te;case 115:return~(0,o.Cw)(Te,"stretch")?he((0,o.gx)(Te,"stretch","fill-available"),Pe)+Te:Te}break;case 4949:if((0,o.uO)(Te,Pe+1)!==115)break;case 6444:switch((0,o.uO)(Te,(0,o.to)(Te)-3-(~(0,o.Cw)(Te,"!important")&&10))){case 107:return(0,o.gx)(Te,":",":"+u.G$)+Te;case 101:return(0,o.gx)(Te,/(.+:)([^;!]+)(;|!.+)?/,"$1"+u.G$+((0,o.uO)(Te,14)===45?"inline-":"")+"box$3$1"+u.G$+"$2$3$1"+u.MS+"$2box$3")+Te}break;case 5936:switch((0,o.uO)(Te,Pe+11)){case 114:return u.G$+Te+u.MS+(0,o.gx)(Te,/[svh]\w+-[tblr]{2}/,"tb")+Te;case 108:return u.G$+Te+u.MS+(0,o.gx)(Te,/[svh]\w+-[tblr]{2}/,"tb-rl")+Te;case 45:return u.G$+Te+u.MS+(0,o.gx)(Te,/[svh]\w+-[tblr]{2}/,"lr")+Te}return u.G$+Te+u.MS+Te+Te}return Te}var ve=function(Pe,nt,pt,yt){if(Pe.length>-1&&!Pe.return)switch(Pe.type){case u.h5:Pe.return=he(Pe.value,Pe.length);break;case u.lK:return(0,c.q)([(0,i.JG)(Pe,{value:(0,o.gx)(Pe.value,"@","@"+u.G$)})],yt);case u.Fr:if(Pe.length)return(0,o.$e)(Pe.props,function(wt){switch((0,o.EQ)(wt,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return(0,c.q)([(0,i.JG)(Pe,{props:[(0,o.gx)(wt,/:(read-\w+)/,":"+u.uj+"$1")]})],yt);case"::placeholder":return(0,c.q)([(0,i.JG)(Pe,{props:[(0,o.gx)(wt,/:(plac\w+)/,":"+u.G$+"input-$1")]}),(0,i.JG)(Pe,{props:[(0,o.gx)(wt,/:(plac\w+)/,":"+u.uj+"$1")]}),(0,i.JG)(Pe,{props:[(0,o.gx)(wt,/:(plac\w+)/,u.MS+"input-$1")]})],yt)}return""})}},ce=[ve],xe=function(Pe){var nt=Pe.key;if(nt==="css"){var pt=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(pt,function(dr){var wr=dr.getAttribute("data-emotion");wr.indexOf(" ")!==-1&&(document.head.appendChild(dr),dr.setAttribute("data-s",""))})}var yt=Pe.stylisPlugins||ce,wt={},ot,St=[];ot=Pe.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+nt+' "]'),function(dr){for(var wr=dr.getAttribute("data-emotion").split(" "),Vr=1;Vr=4;++pt,yt-=4)nt=Te.charCodeAt(pt)&255|(Te.charCodeAt(++pt)&255)<<8|(Te.charCodeAt(++pt)&255)<<16|(Te.charCodeAt(++pt)&255)<<24,nt=(nt&65535)*1540483477+((nt>>>16)*59797<<16),nt^=nt>>>24,Pe=(nt&65535)*1540483477+((nt>>>16)*59797<<16)^(Pe&65535)*1540483477+((Pe>>>16)*59797<<16);switch(yt){case 3:Pe^=(Te.charCodeAt(pt+2)&255)<<16;case 2:Pe^=(Te.charCodeAt(pt+1)&255)<<8;case 1:Pe^=Te.charCodeAt(pt)&255,Pe=(Pe&65535)*1540483477+((Pe>>>16)*59797<<16)}return Pe^=Pe>>>13,Pe=(Pe&65535)*1540483477+((Pe>>>16)*59797<<16),((Pe^Pe>>>15)>>>0).toString(36)}var W=V,L={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},k=L;function re(Te){var Pe=Object.create(null);return function(nt){return Pe[nt]===void 0&&(Pe[nt]=Te(nt)),Pe[nt]}}var K=re,ie=`You have illegal escape sequence in your template literal, most likely inside content's property value. +Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';". +You can read more about this here: +https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,me="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",Ze=/[A-Z]|^ms/g,De=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Fe=function(Pe){return Pe.charCodeAt(1)===45},mt=function(Pe){return Pe!=null&&typeof Pe!="boolean"},ht=K(function(Te){return Fe(Te)?Te:Te.replace(Ze,"-$&").toLowerCase()}),xt=function(Pe,nt){switch(Pe){case"animation":case"animationName":if(typeof nt=="string")return nt.replace(De,function(pt,yt,wt){return T={name:yt,styles:wt,next:T},yt})}return k[Pe]!==1&&!Fe(Pe)&&typeof nt=="number"&&nt!==0?nt+"px":nt};if(!1)var Et,ct,jt,Tt,Wt,Bt;var Ht=null;function rr(Te,Pe,nt){if(nt==null)return"";if(nt.__emotion_styles!==void 0)return nt;switch(typeof nt){case"boolean":return"";case"object":{if(nt.anim===1)return T={name:nt.name,styles:nt.styles,next:T},nt.name;if(nt.styles!==void 0){var pt=nt.next;if(pt!==void 0)for(;pt!==void 0;)T={name:pt.name,styles:pt.styles,next:T},pt=pt.next;var yt=nt.styles+";";return yt}return Sr(Te,Pe,nt)}case"function":{if(Te!==void 0){var wt=T,ot=nt(Te);return T=wt,rr(Te,Pe,ot)}break}case"string":if(!1)var St,dt;break}if(Pe==null)return nt;var Rt=Pe[nt];return Rt!==void 0?Rt:nt}function Sr(Te,Pe,nt){var pt="";if(Array.isArray(nt))for(var yt=0;yt.5?U/(2-j-F):U/(j+F),j){case S:J=(A-O)/U+(A1&&(O-=1),O<.16666666666666666?S+(A-S)*(6*O):O<.5?A:O<.6666666666666666?S+(A-S)*(.6666666666666666-O)*6:S}function o(S,A,O){var j,F,J;if(S=(0,r.sh)(S,360),A=(0,r.sh)(A,100),O=(0,r.sh)(O,100),A===0)F=O,J=O,j=O;else{var D=O<.5?O*(1+A):O+A-O*A,R=2*O-D;j=i(R,D,S+.3333333333333333),F=i(R,D,S),J=i(R,D,S-.3333333333333333)}return{r:j*255,g:F*255,b:J*255}}function u(S,A,O){S=(0,r.sh)(S,255),A=(0,r.sh)(A,255),O=(0,r.sh)(O,255);var j=Math.max(S,A,O),F=Math.min(S,A,O),J=0,D=j,R=j-F,U=j===0?0:R/j;if(j===F)J=0;else{switch(j){case S:J=(A-O)/R+(A>16,g:(S&65280)>>8,b:S&255}}},48701:function(f,v,e){"use strict";e.d(v,{R:function(){return r}});var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},1350:function(f,v,e){"use strict";e.d(v,{uA:function(){return i}});var r=e(86500),t=e(48701),a=e(90279);function i(y){var I={r:0,g:0,b:0},S=1,A=null,O=null,j=null,F=!1,J=!1;return typeof y=="string"&&(y=M(y)),typeof y=="object"&&(_(y.r)&&_(y.g)&&_(y.b)?(I=(0,r.rW)(y.r,y.g,y.b),F=!0,J=String(y.r).substr(-1)==="%"?"prgb":"rgb"):_(y.h)&&_(y.s)&&_(y.v)?(A=(0,a.JX)(y.s),O=(0,a.JX)(y.v),I=(0,r.WE)(y.h,A,O),F=!0,J="hsv"):_(y.h)&&_(y.s)&&_(y.l)&&(A=(0,a.JX)(y.s),j=(0,a.JX)(y.l),I=(0,r.ve)(y.h,A,j),F=!0,J="hsl"),Object.prototype.hasOwnProperty.call(y,"a")&&(S=y.a)),S=(0,a.Yq)(S),{ok:F,format:y.format||J,r:Math.min(255,Math.max(I.r,0)),g:Math.min(255,Math.max(I.g,0)),b:Math.min(255,Math.max(I.b,0)),a:S}}var o="[-\\+]?\\d+%?",u="[-\\+]?\\d*\\.\\d+%?",c="(?:".concat(u,")|(?:").concat(o,")"),l="[\\s|\\(]+(".concat(c,")[,|\\s]+(").concat(c,")[,|\\s]+(").concat(c,")\\s*\\)?"),d="[\\s|\\(]+(".concat(c,")[,|\\s]+(").concat(c,")[,|\\s]+(").concat(c,")[,|\\s]+(").concat(c,")\\s*\\)?"),p={CSS_UNIT:new RegExp(c),rgb:new RegExp("rgb"+l),rgba:new RegExp("rgba"+d),hsl:new RegExp("hsl"+l),hsla:new RegExp("hsla"+d),hsv:new RegExp("hsv"+l),hsva:new RegExp("hsva"+d),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function M(y){if(y=y.trim().toLowerCase(),y.length===0)return!1;var I=!1;if(t.R[y])y=t.R[y],I=!0;else if(y==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var S=p.rgb.exec(y);return S?{r:S[1],g:S[2],b:S[3]}:(S=p.rgba.exec(y),S?{r:S[1],g:S[2],b:S[3],a:S[4]}:(S=p.hsl.exec(y),S?{h:S[1],s:S[2],l:S[3]}:(S=p.hsla.exec(y),S?{h:S[1],s:S[2],l:S[3],a:S[4]}:(S=p.hsv.exec(y),S?{h:S[1],s:S[2],v:S[3]}:(S=p.hsva.exec(y),S?{h:S[1],s:S[2],v:S[3],a:S[4]}:(S=p.hex8.exec(y),S?{r:(0,r.VD)(S[1]),g:(0,r.VD)(S[2]),b:(0,r.VD)(S[3]),a:(0,r.T6)(S[4]),format:I?"name":"hex8"}:(S=p.hex6.exec(y),S?{r:(0,r.VD)(S[1]),g:(0,r.VD)(S[2]),b:(0,r.VD)(S[3]),format:I?"name":"hex"}:(S=p.hex4.exec(y),S?{r:(0,r.VD)(S[1]+S[1]),g:(0,r.VD)(S[2]+S[2]),b:(0,r.VD)(S[3]+S[3]),a:(0,r.T6)(S[4]+S[4]),format:I?"name":"hex8"}:(S=p.hex3.exec(y),S?{r:(0,r.VD)(S[1]+S[1]),g:(0,r.VD)(S[2]+S[2]),b:(0,r.VD)(S[3]+S[3]),format:I?"name":"hex"}:!1)))))))))}function _(y){return Boolean(p.CSS_UNIT.exec(String(y)))}},10274:function(f,v,e){"use strict";e.d(v,{C:function(){return o}});var r=e(86500),t=e(48701),a=e(1350),i=e(90279),o=function(){function c(l,d){l===void 0&&(l=""),d===void 0&&(d={});var p;if(l instanceof c)return l;typeof l=="number"&&(l=(0,r.Yt)(l)),this.originalInput=l;var M=(0,a.uA)(l);this.originalInput=l,this.r=M.r,this.g=M.g,this.b=M.b,this.a=M.a,this.roundA=Math.round(100*this.a)/100,this.format=(p=d.format)!==null&&p!==void 0?p:M.format,this.gradientType=d.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=M.ok}return c.prototype.isDark=function(){return this.getBrightness()<128},c.prototype.isLight=function(){return!this.isDark()},c.prototype.getBrightness=function(){var l=this.toRgb();return(l.r*299+l.g*587+l.b*114)/1e3},c.prototype.getLuminance=function(){var l=this.toRgb(),d,p,M,_=l.r/255,y=l.g/255,I=l.b/255;return _<=.03928?d=_/12.92:d=Math.pow((_+.055)/1.055,2.4),y<=.03928?p=y/12.92:p=Math.pow((y+.055)/1.055,2.4),I<=.03928?M=I/12.92:M=Math.pow((I+.055)/1.055,2.4),.2126*d+.7152*p+.0722*M},c.prototype.getAlpha=function(){return this.a},c.prototype.setAlpha=function(l){return this.a=(0,i.Yq)(l),this.roundA=Math.round(100*this.a)/100,this},c.prototype.isMonochrome=function(){var l=this.toHsl().s;return l===0},c.prototype.toHsv=function(){var l=(0,r.py)(this.r,this.g,this.b);return{h:l.h*360,s:l.s,v:l.v,a:this.a}},c.prototype.toHsvString=function(){var l=(0,r.py)(this.r,this.g,this.b),d=Math.round(l.h*360),p=Math.round(l.s*100),M=Math.round(l.v*100);return this.a===1?"hsv(".concat(d,", ").concat(p,"%, ").concat(M,"%)"):"hsva(".concat(d,", ").concat(p,"%, ").concat(M,"%, ").concat(this.roundA,")")},c.prototype.toHsl=function(){var l=(0,r.lC)(this.r,this.g,this.b);return{h:l.h*360,s:l.s,l:l.l,a:this.a}},c.prototype.toHslString=function(){var l=(0,r.lC)(this.r,this.g,this.b),d=Math.round(l.h*360),p=Math.round(l.s*100),M=Math.round(l.l*100);return this.a===1?"hsl(".concat(d,", ").concat(p,"%, ").concat(M,"%)"):"hsla(".concat(d,", ").concat(p,"%, ").concat(M,"%, ").concat(this.roundA,")")},c.prototype.toHex=function(l){return l===void 0&&(l=!1),(0,r.vq)(this.r,this.g,this.b,l)},c.prototype.toHexString=function(l){return l===void 0&&(l=!1),"#"+this.toHex(l)},c.prototype.toHex8=function(l){return l===void 0&&(l=!1),(0,r.s)(this.r,this.g,this.b,this.a,l)},c.prototype.toHex8String=function(l){return l===void 0&&(l=!1),"#"+this.toHex8(l)},c.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},c.prototype.toRgbString=function(){var l=Math.round(this.r),d=Math.round(this.g),p=Math.round(this.b);return this.a===1?"rgb(".concat(l,", ").concat(d,", ").concat(p,")"):"rgba(".concat(l,", ").concat(d,", ").concat(p,", ").concat(this.roundA,")")},c.prototype.toPercentageRgb=function(){var l=function(d){return"".concat(Math.round((0,i.sh)(d,255)*100),"%")};return{r:l(this.r),g:l(this.g),b:l(this.b),a:this.a}},c.prototype.toPercentageRgbString=function(){var l=function(d){return Math.round((0,i.sh)(d,255)*100)};return this.a===1?"rgb(".concat(l(this.r),"%, ").concat(l(this.g),"%, ").concat(l(this.b),"%)"):"rgba(".concat(l(this.r),"%, ").concat(l(this.g),"%, ").concat(l(this.b),"%, ").concat(this.roundA,")")},c.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var l="#"+(0,r.vq)(this.r,this.g,this.b,!1),d=0,p=Object.entries(t.R);d=0,_=!d&&M&&(l.startsWith("hex")||l==="name");return _?l==="name"&&this.a===0?this.toName():this.toRgbString():(l==="rgb"&&(p=this.toRgbString()),l==="prgb"&&(p=this.toPercentageRgbString()),(l==="hex"||l==="hex6")&&(p=this.toHexString()),l==="hex3"&&(p=this.toHexString(!0)),l==="hex4"&&(p=this.toHex8String(!0)),l==="hex8"&&(p=this.toHex8String()),l==="name"&&(p=this.toName()),l==="hsl"&&(p=this.toHslString()),l==="hsv"&&(p=this.toHsvString()),p||this.toHexString())},c.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},c.prototype.clone=function(){return new c(this.toString())},c.prototype.lighten=function(l){l===void 0&&(l=10);var d=this.toHsl();return d.l+=l/100,d.l=(0,i.V2)(d.l),new c(d)},c.prototype.brighten=function(l){l===void 0&&(l=10);var d=this.toRgb();return d.r=Math.max(0,Math.min(255,d.r-Math.round(255*-(l/100)))),d.g=Math.max(0,Math.min(255,d.g-Math.round(255*-(l/100)))),d.b=Math.max(0,Math.min(255,d.b-Math.round(255*-(l/100)))),new c(d)},c.prototype.darken=function(l){l===void 0&&(l=10);var d=this.toHsl();return d.l-=l/100,d.l=(0,i.V2)(d.l),new c(d)},c.prototype.tint=function(l){return l===void 0&&(l=10),this.mix("white",l)},c.prototype.shade=function(l){return l===void 0&&(l=10),this.mix("black",l)},c.prototype.desaturate=function(l){l===void 0&&(l=10);var d=this.toHsl();return d.s-=l/100,d.s=(0,i.V2)(d.s),new c(d)},c.prototype.saturate=function(l){l===void 0&&(l=10);var d=this.toHsl();return d.s+=l/100,d.s=(0,i.V2)(d.s),new c(d)},c.prototype.greyscale=function(){return this.desaturate(100)},c.prototype.spin=function(l){var d=this.toHsl(),p=(d.h+l)%360;return d.h=p<0?360+p:p,new c(d)},c.prototype.mix=function(l,d){d===void 0&&(d=50);var p=this.toRgb(),M=new c(l).toRgb(),_=d/100,y={r:(M.r-p.r)*_+p.r,g:(M.g-p.g)*_+p.g,b:(M.b-p.b)*_+p.b,a:(M.a-p.a)*_+p.a};return new c(y)},c.prototype.analogous=function(l,d){l===void 0&&(l=6),d===void 0&&(d=30);var p=this.toHsl(),M=360/d,_=[this];for(p.h=(p.h-(M*l>>1)+720)%360;--l;)p.h=(p.h+M)%360,_.push(new c(p));return _},c.prototype.complement=function(){var l=this.toHsl();return l.h=(l.h+180)%360,new c(l)},c.prototype.monochromatic=function(l){l===void 0&&(l=6);for(var d=this.toHsv(),p=d.h,M=d.s,_=d.v,y=[],I=1/l;l--;)y.push(new c({h:p,s:M,v:_})),_=(_+I)%1;return y},c.prototype.splitcomplement=function(){var l=this.toHsl(),d=l.h;return[this,new c({h:(d+72)%360,s:l.s,l:l.l}),new c({h:(d+216)%360,s:l.s,l:l.l})]},c.prototype.onBackground=function(l){var d=this.toRgb(),p=new c(l).toRgb();return new c({r:p.r+(d.r-p.r)*d.a,g:p.g+(d.g-p.g)*d.a,b:p.b+(d.b-p.b)*d.a})},c.prototype.triad=function(){return this.polyad(3)},c.prototype.tetrad=function(){return this.polyad(4)},c.prototype.polyad=function(l){for(var d=this.toHsl(),p=d.h,M=[this],_=360/l,y=1;y1)&&(l=1),l}function u(l){return l<=1?"".concat(Number(l)*100,"%"):l}function c(l){return l.length===1?"0"+l:String(l)}},15393:function(f){"use strict";var v=!1,e=function(){};if(v){var r=function(a,i){var o=arguments.length;i=new Array(o>1?o-1:0);for(var u=1;u2?o-2:0);for(var u=2;u=0)&&(pe[X]=le[X]);return pe}const l=["onClick","reloadDocument","replace","state","target","to"],d=null;function p(le,fe){if(!le){typeof console!="undefined"&&console.warn(fe);try{throw new Error(fe)}catch(pe){}}}function M(le){let{basename:fe,children:pe,window:Re}=le,X=useRef();X.current==null&&(X.current=createBrowserHistory({window:Re}));let je=X.current,[He,tt]=useState({action:je.action,location:je.location});return useLayoutEffect(()=>je.listen(tt),[je]),createElement(Router,{basename:fe,children:pe,location:He.location,navigationType:He.action,navigator:je})}function _(le){let{basename:fe,children:pe,window:Re}=le,X=useRef();X.current==null&&(X.current=createHashHistory({window:Re}));let je=X.current,[He,tt]=useState({action:je.action,location:je.location});return useLayoutEffect(()=>je.listen(tt),[je]),createElement(Router,{basename:fe,children:pe,location:He.location,navigationType:He.action,navigator:je})}function y(le){let{basename:fe,children:pe,history:Re}=le;const[X,je]=useState({action:Re.action,location:Re.location});return useLayoutEffect(()=>Re.listen(je),[Re]),createElement(Router,{basename:fe,children:pe,location:X.location,navigationType:X.action,navigator:Re})}function I(le){return!!(le.metaKey||le.altKey||le.ctrlKey||le.shiftKey)}const S=(0,a.forwardRef)(function(fe,pe){let{onClick:Re,reloadDocument:X,replace:je=!1,state:He,target:tt,to:We}=fe,Ue=c(fe,l),Ie=(0,i.oQ)(We),$e=O(We,{replace:je,state:He,target:tt});function Le(ze){Re&&Re(ze),!ze.defaultPrevented&&!X&&$e(ze)}return(0,a.createElement)("a",u({},Ue,{href:Ie,onClick:Le,ref:pe,target:tt}))}),A=null;function O(le,fe){let{target:pe,replace:Re,state:X}=fe===void 0?{}:fe,je=(0,i.s0)(),He=(0,i.TH)(),tt=(0,i.WU)(le);return(0,a.useCallback)(We=>{if(We.button===0&&(!pe||pe==="_self")&&!I(We)){We.preventDefault();let Ue=!!Re||(0,o.Ep)(He)===(0,o.Ep)(tt);je(le,{replace:Ue,state:X})}},[He,je,tt,Re,X,pe,le])}function j(le){let fe=useRef(F(le)),pe=useLocation(),Re=useMemo(()=>{let He=F(pe.search);for(let tt of fe.current.keys())He.has(tt)||fe.current.getAll(tt).forEach(We=>{He.append(tt,We)});return He},[pe.search]),X=useNavigate(),je=useCallback((He,tt)=>{X("?"+F(He),tt)},[X]);return[Re,je]}function F(le){return le===void 0&&(le=""),new URLSearchParams(typeof le=="string"||Array.isArray(le)||le instanceof URLSearchParams?le:Object.keys(le).reduce((fe,pe)=>{let Re=le[pe];return fe.concat(Array.isArray(Re)?Re.map(X=>[pe,X]):[[pe,Re]])},[]))}var J=e(34897),D=["prefetch"];function R(le){var fe=le.prefetch,pe=(0,t.Z)(le,D),Re=(0,J.Ov)(),X=typeof le.to=="string"?le.to:le.to.pathname;return a.createElement(S,(0,r.Z)({onMouseEnter:function(){var He;return fe&&X&&((He=Re.preloadRoute)===null||He===void 0?void 0:He.call(Re,X))}},pe),le.children)}function U(le){return U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(fe){return typeof fe}:function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe},U(le)}function ee(){"use strict";ee=function(){return le};var le={},fe=Object.prototype,pe=fe.hasOwnProperty,Re=typeof Symbol=="function"?Symbol:{},X=Re.iterator||"@@iterator",je=Re.asyncIterator||"@@asyncIterator",He=Re.toStringTag||"@@toStringTag";function tt(ot,St,dt){return Object.defineProperty(ot,St,{value:dt,enumerable:!0,configurable:!0,writable:!0}),ot[St]}try{tt({},"")}catch(ot){tt=function(dt,Rt,Ct){return dt[Rt]=Ct}}function We(ot,St,dt,Rt){var Ct=St&&St.prototype instanceof $e?St:$e,Ut=Object.create(Ct.prototype),cr=new pt(Rt||[]);return Ut._invoke=function(ir,Rr,dr){var wr="suspendedStart";return function(Vr,Qr){if(wr==="executing")throw new Error("Generator is already running");if(wr==="completed"){if(Vr==="throw")throw Qr;return wt()}for(dr.method=Vr,dr.arg=Qr;;){var Pr=dr.delegate;if(Pr){var nn=Te(Pr,dr);if(nn){if(nn===Ie)continue;return nn}}if(dr.method==="next")dr.sent=dr._sent=dr.arg;else if(dr.method==="throw"){if(wr==="suspendedStart")throw wr="completed",dr.arg;dr.dispatchException(dr.arg)}else dr.method==="return"&&dr.abrupt("return",dr.arg);wr="executing";var qr=Ue(ir,Rr,dr);if(qr.type==="normal"){if(wr=dr.done?"completed":"suspendedYield",qr.arg===Ie)continue;return{value:qr.arg,done:dr.done}}qr.type==="throw"&&(wr="completed",dr.method="throw",dr.arg=qr.arg)}}}(ot,dt,cr),Ut}function Ue(ot,St,dt){try{return{type:"normal",arg:ot.call(St,dt)}}catch(Rt){return{type:"throw",arg:Rt}}}le.wrap=We;var Ie={};function $e(){}function Le(){}function ze(){}var _e={};tt(_e,X,function(){return this});var ue=Object.getPrototypeOf,Ye=ue&&ue(ue(yt([])));Ye&&Ye!==fe&&pe.call(Ye,X)&&(_e=Ye);var Ve=ze.prototype=$e.prototype=Object.create(_e);function Je(ot){["next","throw","return"].forEach(function(St){tt(ot,St,function(dt){return this._invoke(St,dt)})})}function it(ot,St){function dt(Ct,Ut,cr,ir){var Rr=Ue(ot[Ct],ot,Ut);if(Rr.type!=="throw"){var dr=Rr.arg,wr=dr.value;return wr&&U(wr)=="object"&&pe.call(wr,"__await")?St.resolve(wr.__await).then(function(Vr){dt("next",Vr,cr,ir)},function(Vr){dt("throw",Vr,cr,ir)}):St.resolve(wr).then(function(Vr){dr.value=Vr,cr(dr)},function(Vr){return dt("throw",Vr,cr,ir)})}ir(Rr.arg)}var Rt;this._invoke=function(Ct,Ut){function cr(){return new St(function(ir,Rr){dt(Ct,Ut,ir,Rr)})}return Rt=Rt?Rt.then(cr,cr):cr()}}function Te(ot,St){var dt=ot.iterator[St.method];if(dt===void 0){if(St.delegate=null,St.method==="throw"){if(ot.iterator.return&&(St.method="return",St.arg=void 0,Te(ot,St),St.method==="throw"))return Ie;St.method="throw",St.arg=new TypeError("The iterator does not provide a 'throw' method")}return Ie}var Rt=Ue(dt,ot.iterator,St.arg);if(Rt.type==="throw")return St.method="throw",St.arg=Rt.arg,St.delegate=null,Ie;var Ct=Rt.arg;return Ct?Ct.done?(St[ot.resultName]=Ct.value,St.next=ot.nextLoc,St.method!=="return"&&(St.method="next",St.arg=void 0),St.delegate=null,Ie):Ct:(St.method="throw",St.arg=new TypeError("iterator result is not an object"),St.delegate=null,Ie)}function Pe(ot){var St={tryLoc:ot[0]};1 in ot&&(St.catchLoc=ot[1]),2 in ot&&(St.finallyLoc=ot[2],St.afterLoc=ot[3]),this.tryEntries.push(St)}function nt(ot){var St=ot.completion||{};St.type="normal",delete St.arg,ot.completion=St}function pt(ot){this.tryEntries=[{tryLoc:"root"}],ot.forEach(Pe,this),this.reset(!0)}function yt(ot){if(ot){var St=ot[X];if(St)return St.call(ot);if(typeof ot.next=="function")return ot;if(!isNaN(ot.length)){var dt=-1,Rt=function Ct(){for(;++dt=0;--Ct){var Ut=this.tryEntries[Ct],cr=Ut.completion;if(Ut.tryLoc==="root")return Rt("end");if(Ut.tryLoc<=this.prev){var ir=pe.call(Ut,"catchLoc"),Rr=pe.call(Ut,"finallyLoc");if(ir&&Rr){if(this.prev=0;--Rt){var Ct=this.tryEntries[Rt];if(Ct.tryLoc<=this.prev&&pe.call(Ct,"finallyLoc")&&this.prev=0;--dt){var Rt=this.tryEntries[dt];if(Rt.finallyLoc===St)return this.complete(Rt.completion,Rt.afterLoc),nt(Rt),Ie}},catch:function(St){for(var dt=this.tryEntries.length-1;dt>=0;--dt){var Rt=this.tryEntries[dt];if(Rt.tryLoc===St){var Ct=Rt.completion;if(Ct.type==="throw"){var Ut=Ct.arg;nt(Rt)}return Ut}}throw new Error("illegal catch attempt")},delegateYield:function(St,dt,Rt){return this.delegate={iterator:yt(St),resultName:dt,nextLoc:Rt},this.method==="next"&&(this.arg=void 0),Ie}},le}function de(le,fe,pe){return fe in le?Object.defineProperty(le,fe,{value:pe,enumerable:!0,configurable:!0,writable:!0}):le[fe]=pe,le}function he(le,fe){var pe=Object.keys(le);if(Object.getOwnPropertySymbols){var Re=Object.getOwnPropertySymbols(le);fe&&(Re=Re.filter(function(X){return Object.getOwnPropertyDescriptor(le,X).enumerable})),pe.push.apply(pe,Re)}return pe}function ve(le){for(var fe=1;fele.length)&&(fe=le.length);for(var pe=0,Re=new Array(fe);pe=le.length?{done:!0}:{done:!1,value:le[Re++]}},e:function(Ue){throw Ue},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je=!0,He=!1,tt;return{s:function(){pe=pe.call(le)},n:function(){var Ue=pe.next();return je=Ue.done,Ue},e:function(Ue){He=!0,tt=Ue},f:function(){try{!je&&pe.return!=null&&pe.return()}finally{if(He)throw tt}}}}function L(le){if(Array.isArray(le))return le}function k(le){if(typeof Symbol!="undefined"&&le[Symbol.iterator]!=null||le["@@iterator"]!=null)return Array.from(le)}function re(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K(le){return L(le)||k(le)||V(le)||re()}function ie(le,fe){if(!(le instanceof fe))throw new TypeError("Cannot call a class as a function")}function me(le,fe){for(var pe=0;pe-1,"register failed, invalid key ".concat(X," ").concat(pe.path?"from plugin ".concat(pe.path):"",".")),Re.hooks[X]=(Re.hooks[X]||[]).concat(pe.apply[X])})}},{key:"getHooks",value:function(pe){var Re=pe.split("."),X=K(Re),je=X[0],He=X.slice(1),tt=this.hooks[je]||[];return He.length&&(tt=tt.map(function(We){try{var Ue=We,Ie=W(He),$e;try{for(Ie.s();!($e=Ie.n()).done;){var Le=$e.value;Ue=Ue[Le]}}catch(ze){Ie.e(ze)}finally{Ie.f()}return Ue}catch(ze){return null}}).filter(Boolean)),tt}},{key:"applyPlugins",value:function(pe){var Re=pe.key,X=pe.type,je=pe.initialValue,He=pe.args,tt=pe.async,We=this.getHooks(Re)||[];switch(He&&De(U(He)==="object","applyPlugins failed, args must be plain object."),tt&&De(X===ht.modify||X===ht.event,"async only works with modify and event type."),X){case ht.modify:return tt?We.reduce(function(){var Ue=xe(ee().mark(function Ie($e,Le){var ze;return ee().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(De(typeof Le=="function"||U(Le)==="object"||mt(Le),"applyPlugins failed, all hooks for key ".concat(Re," must be function, plain object or Promise.")),!mt($e)){ue.next=5;break}return ue.next=4,$e;case 4:$e=ue.sent;case 5:if(typeof Le!="function"){ue.next=16;break}if(ze=Le($e,He),!mt(ze)){ue.next=13;break}return ue.next=10,ze;case 10:return ue.abrupt("return",ue.sent);case 13:return ue.abrupt("return",ze);case 14:ue.next=21;break;case 16:if(!mt(Le)){ue.next=20;break}return ue.next=19,Le;case 19:Le=ue.sent;case 20:return ue.abrupt("return",ve(ve({},$e),Le));case 21:case"end":return ue.stop()}},Ie)}));return function(Ie,$e){return Ue.apply(this,arguments)}}(),mt(je)?je:Promise.resolve(je)):We.reduce(function(Ue,Ie){return De(typeof Ie=="function"||U(Ie)==="object","applyPlugins failed, all hooks for key ".concat(Re," must be function or plain object.")),typeof Ie=="function"?Ie(Ue,He):ve(ve({},Ue),Ie)},je);case ht.event:return xe(ee().mark(function Ue(){var Ie,$e,Le,ze;return ee().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:Ie=W(We),ue.prev=1,Ie.s();case 3:if(($e=Ie.n()).done){ue.next=12;break}if(Le=$e.value,De(typeof Le=="function","applyPlugins failed, all hooks for key ".concat(Re," must be function.")),ze=Le(He),!(tt&&mt(ze))){ue.next=10;break}return ue.next=10,ze;case 10:ue.next=3;break;case 12:ue.next=17;break;case 14:ue.prev=14,ue.t0=ue.catch(1),Ie.e(ue.t0);case 17:return ue.prev=17,Ie.f(),ue.finish(17);case 20:case"end":return ue.stop()}},Ue,null,[[1,14,17,20]])}))();case ht.compose:return function(){return Fe({fns:We.concat(je),args:He})()}}}}],[{key:"create",value:function(pe){var Re=new le({validKeys:pe.validKeys});return pe.plugins.forEach(function(X){Re.register(X)}),Re}}]),le}(),Et=e(84865),ct=e(77190),jt=e.n(ct),Tt=globalThis.console,Wt=0,Bt=0;function Ht(le,fe){if(!1)var pe}function rr(le){return JSON.stringify(le,null,2)}function Sr(le){var fe=le.length>1?le.map(Ar).join(" "):le[0];return jt()(fe)==="object"?"".concat(rr(fe)):fe.toString()}function Ar(le){return jt()(le)==="object"?"".concat(JSON.stringify(le)):le.toString()}var ye={log:function(){for(var fe=arguments.length,pe=new Array(fe),Re=0;Re0){for(zr=1,un=1;zrXn&&(Xn=Ae,ga=[]),ga.push(Me))}function qa(Me,st){return new Ze(Me,[],"",st)}function Da(Me,st,Xt){return new Ze(Ze.buildMessage(Me,st),Me,st,Xt)}function ei(){var Me;return Me=_i(),Me}function _i(){var Me,st;for(Me=[],st=Ni();st!==z;)Me.push(st),st=Ni();return Me}function Ni(){var Me;return Me=Ki(),Me===z&&(Me=jo(),Me===z&&(Me=bo(),Me===z&&(Me=fo(),Me===z&&(Me=Jo(),Me===z&&(Me=Oo()))))),Me}function Di(){var Me,st,Xt;if(Me=Ae,st=[],Xt=Ja(),Xt===z&&(Xt=Mi(),Xt===z&&(Xt=vo())),Xt!==z)for(;Xt!==z;)st.push(Xt),Xt=Ja(),Xt===z&&(Xt=Mi(),Xt===z&&(Xt=vo()));else st=z;return st!==z&&(on=Me,st=or(st)),Me=st,Me}function Ki(){var Me,st;return Me=Ae,st=Di(),st!==z&&(on=Me,st=vr(st)),Me=st,Me}function Oo(){var Me,st;return Me=Ae,we.charCodeAt(Ae)===35?(st=xr,Ae++):(st=z,Ke===0&&jr(Br)),st!==z&&(on=Me,st=On()),Me=st,Me}function jo(){var Me,st,Xt,It,$r,zn;return Ke++,Me=Ae,we.charCodeAt(Ae)===123?(st=Cr,Ae++):(st=z,Ke===0&&jr(zr)),st!==z?(Xt=Hn(),Xt!==z?(It=li(),It!==z?($r=Hn(),$r!==z?(we.charCodeAt(Ae)===125?(zn=un,Ae++):(zn=z,Ke===0&&jr(kn)),zn!==z?(on=Me,st=sa(It),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z),Ke--,Me===z&&(st=z,Ke===0&&jr(Dr)),Me}function rs(){var Me,st,Xt,It,$r;if(Ke++,Me=Ae,st=[],Xt=Ae,It=Ae,Ke++,$r=Ei(),$r===z&&(za.test(we.charAt(Ae))?($r=we.charAt(Ae),Ae++):($r=z,Ke===0&&jr(Ka))),Ke--,$r===z?It=void 0:(Ae=It,It=z),It!==z?(we.length>Ae?($r=we.charAt(Ae),Ae++):($r=z,Ke===0&&jr(Ba)),$r!==z?(It=[It,$r],Xt=It):(Ae=Xt,Xt=z)):(Ae=Xt,Xt=z),Xt!==z)for(;Xt!==z;)st.push(Xt),Xt=Ae,It=Ae,Ke++,$r=Ei(),$r===z&&(za.test(we.charAt(Ae))?($r=we.charAt(Ae),Ae++):($r=z,Ke===0&&jr(Ka))),Ke--,$r===z?It=void 0:(Ae=It,It=z),It!==z?(we.length>Ae?($r=we.charAt(Ae),Ae++):($r=z,Ke===0&&jr(Ba)),$r!==z?(It=[It,$r],Xt=It):(Ae=Xt,Xt=z)):(Ae=Xt,Xt=z);else st=z;return st!==z?Me=we.substring(Me,Ae):Me=st,Ke--,Me===z&&(st=z,Ke===0&&jr(ba)),Me}function ji(){var Me,st,Xt;return Ke++,Me=Ae,we.charCodeAt(Ae)===47?(st=hi,Ae++):(st=z,Ke===0&&jr(Gr)),st!==z?(Xt=rs(),Xt!==z?(on=Me,st=Xa(Xt),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z),Ke--,Me===z&&(st=z,Ke===0&&jr(Fa)),Me}function So(){var Me,st,Xt,It,$r;if(Ke++,Me=Ae,st=Hn(),st!==z)if(Xt=rs(),Xt!==z){for(It=[],$r=ji();$r!==z;)It.push($r),$r=ji();It!==z?(on=Me,st=wa(Xt,It),Me=st):(Ae=Me,Me=z)}else Ae=Me,Me=z;else Ae=Me,Me=z;return Ke--,Me===z&&(st=z,Ke===0&&jr($n)),Me}function Fi(){var Me,st,Xt;if(Me=Ae,st=[],Xt=So(),Xt!==z)for(;Xt!==z;)st.push(Xt),Xt=So();else st=z;return st!==z&&(on=Me,st=Wa(st)),Me=st,Me}function Fo(){var Me,st,Xt;return Me=Ae,we.substr(Ae,2)===Ua?(st=Ua,Ae+=2):(st=z,Ke===0&&jr(Ra)),st!==z?(Xt=Fi(),Xt!==z?(on=Me,st=Oi(Xt),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z),Me===z&&(Me=Ae,on=Ae,st=Ga(),st?st=void 0:st=z,st!==z?(Xt=Di(),Xt!==z?(on=Me,st=Ta(Xt),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z)),Me}function lo(){var Me,st,Xt,It,$r,zn,La,Sn,oi,ra,pa,ma,xa;return Me=Ae,we.charCodeAt(Ae)===123?(st=Cr,Ae++):(st=z,Ke===0&&jr(zr)),st!==z?(Xt=Hn(),Xt!==z?(It=li(),It!==z?($r=Hn(),$r!==z?(we.charCodeAt(Ae)===44?(zn=$,Ae++):(zn=z,Ke===0&&jr(Y)),zn!==z?(La=Hn(),La!==z?(we.substr(Ae,6)===w?(Sn=w,Ae+=6):(Sn=z,Ke===0&&jr(N)),Sn!==z?(oi=Hn(),oi!==z?(ra=Ae,we.charCodeAt(Ae)===44?(pa=$,Ae++):(pa=z,Ke===0&&jr(Y)),pa!==z?(ma=Hn(),ma!==z?(xa=Fo(),xa!==z?(pa=[pa,ma,xa],ra=pa):(Ae=ra,ra=z)):(Ae=ra,ra=z)):(Ae=ra,ra=z),ra===z&&(ra=null),ra!==z?(pa=Hn(),pa!==z?(we.charCodeAt(Ae)===125?(ma=un,Ae++):(ma=z,Ke===0&&jr(kn)),ma!==z?(on=Me,st=P(It,Sn,ra),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z),Me}function wi(){var Me,st,Xt,It;if(Me=Ae,we.charCodeAt(Ae)===39?(st=Z,Ae++):(st=z,Ke===0&&jr(ne)),st!==z){if(Xt=[],It=Ja(),It===z&&(se.test(we.charAt(Ae))?(It=we.charAt(Ae),Ae++):(It=z,Ke===0&&jr(Ne))),It!==z)for(;It!==z;)Xt.push(It),It=Ja(),It===z&&(se.test(we.charAt(Ae))?(It=we.charAt(Ae),Ae++):(It=z,Ke===0&&jr(Ne)));else Xt=z;Xt!==z?(we.charCodeAt(Ae)===39?(It=Z,Ae++):(It=z,Ke===0&&jr(ne)),It!==z?(st=[st,Xt,It],Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z)}else Ae=Me,Me=z;if(Me===z)if(Me=[],st=Ja(),st===z&&(et.test(we.charAt(Ae))?(st=we.charAt(Ae),Ae++):(st=z,Ke===0&&jr(at))),st!==z)for(;st!==z;)Me.push(st),st=Ja(),st===z&&(et.test(we.charAt(Ae))?(st=we.charAt(Ae),Ae++):(st=z,Ke===0&&jr(at)));else Me=z;return Me}function xo(){var Me,st;if(Me=[],ut.test(we.charAt(Ae))?(st=we.charAt(Ae),Ae++):(st=z,Ke===0&&jr(Yt)),st!==z)for(;st!==z;)Me.push(st),ut.test(we.charAt(Ae))?(st=we.charAt(Ae),Ae++):(st=z,Ke===0&&jr(Yt));else Me=z;return Me}function Hi(){var Me,st,Xt,It;if(Me=Ae,st=Ae,Xt=[],It=wi(),It===z&&(It=xo()),It!==z)for(;It!==z;)Xt.push(It),It=wi(),It===z&&(It=xo());else Xt=z;return Xt!==z?st=we.substring(st,Ae):st=Xt,st!==z&&(on=Me,st=fr(st)),Me=st,Me}function mi(){var Me,st,Xt;return Me=Ae,we.substr(Ae,2)===Ua?(st=Ua,Ae+=2):(st=z,Ke===0&&jr(Ra)),st!==z?(Xt=Hi(),Xt!==z?(on=Me,st=Oi(Xt),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z),Me===z&&(Me=Ae,on=Ae,st=Tr(),st?st=void 0:st=z,st!==z?(Xt=Di(),Xt!==z?(on=Me,st=Ta(Xt),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z)),Me}function co(){var Me,st,Xt,It,$r,zn,La,Sn,oi,ra,pa,ma,xa;return Me=Ae,we.charCodeAt(Ae)===123?(st=Cr,Ae++):(st=z,Ke===0&&jr(zr)),st!==z?(Xt=Hn(),Xt!==z?(It=li(),It!==z?($r=Hn(),$r!==z?(we.charCodeAt(Ae)===44?(zn=$,Ae++):(zn=z,Ke===0&&jr(Y)),zn!==z?(La=Hn(),La!==z?(we.substr(Ae,4)===Ir?(Sn=Ir,Ae+=4):(Sn=z,Ke===0&&jr(pn)),Sn===z&&(we.substr(Ae,4)===Jr?(Sn=Jr,Ae+=4):(Sn=z,Ke===0&&jr(hn))),Sn!==z?(oi=Hn(),oi!==z?(ra=Ae,we.charCodeAt(Ae)===44?(pa=$,Ae++):(pa=z,Ke===0&&jr(Y)),pa!==z?(ma=Hn(),ma!==z?(xa=mi(),xa!==z?(pa=[pa,ma,xa],ra=pa):(Ae=ra,ra=z)):(Ae=ra,ra=z)):(Ae=ra,ra=z),ra===z&&(ra=null),ra!==z?(pa=Hn(),pa!==z?(we.charCodeAt(Ae)===125?(ma=un,Ae++):(ma=z,Ke===0&&jr(kn)),ma!==z?(on=Me,st=P(It,Sn,ra),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z),Me}function bo(){var Me;return Me=lo(),Me===z&&(Me=co()),Me}function fo(){var Me,st,Xt,It,$r,zn,La,Sn,oi,ra,pa,ma,xa,ti,vi,is;if(Me=Ae,we.charCodeAt(Ae)===123?(st=Cr,Ae++):(st=z,Ke===0&&jr(zr)),st!==z)if(Xt=Hn(),Xt!==z)if(It=li(),It!==z)if($r=Hn(),$r!==z)if(we.charCodeAt(Ae)===44?(zn=$,Ae++):(zn=z,Ke===0&&jr(Y)),zn!==z)if(La=Hn(),La!==z)if(we.substr(Ae,6)===An?(Sn=An,Ae+=6):(Sn=z,Ke===0&&jr(ha)),Sn===z&&(we.substr(Ae,13)===oa?(Sn=oa,Ae+=13):(Sn=z,Ke===0&&jr(Fn))),Sn!==z)if(oi=Hn(),oi!==z)if(we.charCodeAt(Ae)===44?(ra=$,Ae++):(ra=z,Ke===0&&jr(Y)),ra!==z)if(pa=Hn(),pa!==z)if(ma=Ae,we.substr(Ae,7)===ya?(xa=ya,Ae+=7):(xa=z,Ke===0&&jr(_a)),xa!==z?(ti=Hn(),ti!==z?(vi=Ya(),vi!==z?(xa=[xa,ti,vi],ma=xa):(Ae=ma,ma=z)):(Ae=ma,ma=z)):(Ae=ma,ma=z),ma===z&&(ma=null),ma!==z)if(xa=Hn(),xa!==z){if(ti=[],vi=Zo(),vi!==z)for(;vi!==z;)ti.push(vi),vi=Zo();else ti=z;ti!==z?(vi=Hn(),vi!==z?(we.charCodeAt(Ae)===125?(is=un,Ae++):(is=z,Ke===0&&jr(kn)),is!==z?(on=Me,st=ua(It,Sn,ma,ti),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)}else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;return Me}function Jo(){var Me,st,Xt,It,$r,zn,La,Sn,oi,ra,pa,ma,xa,ti;if(Me=Ae,we.charCodeAt(Ae)===123?(st=Cr,Ae++):(st=z,Ke===0&&jr(zr)),st!==z)if(Xt=Hn(),Xt!==z)if(It=li(),It!==z)if($r=Hn(),$r!==z)if(we.charCodeAt(Ae)===44?(zn=$,Ae++):(zn=z,Ke===0&&jr(Y)),zn!==z)if(La=Hn(),La!==z)if(we.substr(Ae,6)===Na?(Sn=Na,Ae+=6):(Sn=z,Ke===0&&jr(ja)),Sn!==z)if(oi=Hn(),oi!==z)if(we.charCodeAt(Ae)===44?(ra=$,Ae++):(ra=z,Ke===0&&jr(Y)),ra!==z)if(pa=Hn(),pa!==z){if(ma=[],xa=Xo(),xa!==z)for(;xa!==z;)ma.push(xa),xa=Xo();else ma=z;ma!==z?(xa=Hn(),xa!==z?(we.charCodeAt(Ae)===125?(ti=un,Ae++):(ti=z,Ke===0&&jr(kn)),ti!==z?(on=Me,st=fi(It,ma),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)}else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;else Ae=Me,Me=z;return Me}function Ho(){var Me,st,Xt,It;return Me=Ae,st=Ae,we.charCodeAt(Ae)===61?(Xt=gi,Ae++):(Xt=z,Ke===0&&jr(bi)),Xt!==z?(It=Ya(),It!==z?(Xt=[Xt,It],st=Xt):(Ae=st,st=z)):(Ae=st,st=z),st!==z?Me=we.substring(Me,Ae):Me=st,Me===z&&(Me=ns()),Me}function Xo(){var Me,st,Xt,It,$r,zn,La,Sn;return Me=Ae,st=Hn(),st!==z?(Xt=ns(),Xt!==z?(It=Hn(),It!==z?(we.charCodeAt(Ae)===123?($r=Cr,Ae++):($r=z,Ke===0&&jr(zr)),$r!==z?(on=Ae,zn=Ri(Xt),zn?zn=void 0:zn=z,zn!==z?(La=_i(),La!==z?(we.charCodeAt(Ae)===125?(Sn=un,Ae++):(Sn=z,Ke===0&&jr(kn)),Sn!==z?(on=Me,st=yi(Xt,La),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z),Me}function Zo(){var Me,st,Xt,It,$r,zn,La,Sn;return Me=Ae,st=Hn(),st!==z?(Xt=Ho(),Xt!==z?(It=Hn(),It!==z?(we.charCodeAt(Ae)===123?($r=Cr,Ae++):($r=z,Ke===0&&jr(zr)),$r!==z?(on=Ae,zn=Ha(Xt),zn?zn=void 0:zn=z,zn!==z?(La=_i(),La!==z?(we.charCodeAt(Ae)===125?(Sn=un,Ae++):(Sn=z,Ke===0&&jr(kn)),Sn!==z?(on=Me,st=Pa(Xt,La),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z)):(Ae=Me,Me=z),Me}function Ei(){var Me,st;return Ke++,va.test(we.charAt(Ae))?(Me=we.charAt(Ae),Ae++):(Me=z,Ke===0&&jr(aa)),Ke--,Me===z&&(st=z,Ke===0&&jr(Pi)),Me}function mo(){var Me,st;return Ke++,ri.test(we.charAt(Ae))?(Me=we.charAt(Ae),Ae++):(Me=z,Ke===0&&jr(Ea)),Ke--,Me===z&&(st=z,Ke===0&&jr(Sa)),Me}function Hn(){var Me,st,Xt;for(Ke++,Me=Ae,st=[],Xt=Ei();Xt!==z;)st.push(Xt),Xt=Ei();return st!==z?Me=we.substring(Me,Ae):Me=st,Ke--,Me===z&&(st=z,Ke===0&&jr(ni)),Me}function Ya(){var Me,st,Xt;return Ke++,Me=Ae,we.charCodeAt(Ae)===45?(st=Qa,Ae++):(st=z,Ke===0&&jr($i)),st===z&&(st=null),st!==z?(Xt=zo(),Xt!==z?(on=Me,st=Co(st,Xt),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z),Ke--,Me===z&&(st=z,Ke===0&&jr(ai)),Me}function Po(){var Me,st;return Ke++,we.charCodeAt(Ae)===39?(Me=Z,Ae++):(Me=z,Ke===0&&jr(ne)),Ke--,Me===z&&(st=z,Ke===0&&jr(yo)),Me}function Ja(){var Me,st;return Ke++,Me=Ae,we.substr(Ae,2)===eo?(st=eo,Ae+=2):(st=z,Ke===0&&jr(Yi)),st!==z&&(on=Me,st=ko()),Me=st,Ke--,Me===z&&(st=z,Ke===0&&jr(Go)),Me}function Mi(){var Me,st,Xt,It,$r,zn;if(Me=Ae,we.charCodeAt(Ae)===39?(st=Z,Ae++):(st=z,Ke===0&&jr(ne)),st!==z)if(Xt=Bo(),Xt!==z){for(It=Ae,$r=[],we.substr(Ae,2)===eo?(zn=eo,Ae+=2):(zn=z,Ke===0&&jr(Yi)),zn===z&&(se.test(we.charAt(Ae))?(zn=we.charAt(Ae),Ae++):(zn=z,Ke===0&&jr(Ne)));zn!==z;)$r.push(zn),we.substr(Ae,2)===eo?(zn=eo,Ae+=2):(zn=z,Ke===0&&jr(Yi)),zn===z&&(se.test(we.charAt(Ae))?(zn=we.charAt(Ae),Ae++):(zn=z,Ke===0&&jr(Ne)));$r!==z?It=we.substring(It,Ae):It=$r,It!==z?(we.charCodeAt(Ae)===39?($r=Z,Ae++):($r=z,Ke===0&&jr(ne)),$r===z&&($r=null),$r!==z?(on=Me,st=Vi(Xt,It),Me=st):(Ae=Me,Me=z)):(Ae=Me,Me=z)}else Ae=Me,Me=z;else Ae=Me,Me=z;return Me}function vo(){var Me,st,Xt,It;return Me=Ae,st=Ae,we.length>Ae?(Xt=we.charAt(Ae),Ae++):(Xt=z,Ke===0&&jr(Ba)),Xt!==z?(on=Ae,It=_o(Xt),It?It=void 0:It=z,It!==z?(Xt=[Xt,It],st=Xt):(Ae=st,st=z)):(Ae=st,st=z),st===z&&(we.charCodeAt(Ae)===10?(st=No,Ae++):(st=z,Ke===0&&jr(Mo))),st!==z?Me=we.substring(Me,Ae):Me=st,Me}function Bo(){var Me,st,Xt,It;return Me=Ae,st=Ae,we.length>Ae?(Xt=we.charAt(Ae),Ae++):(Xt=z,Ke===0&&jr(Ba)),Xt!==z?(on=Ae,It=ki(Xt),It?It=void 0:It=z,It!==z?(Xt=[Xt,It],st=Xt):(Ae=st,st=z)):(Ae=st,st=z),st!==z?Me=we.substring(Me,Ae):Me=st,Me}function li(){var Me,st;return Ke++,Me=Ae,st=zo(),st===z&&(st=ns()),st!==z?Me=we.substring(Me,Ae):Me=st,Ke--,Me===z&&(st=z,Ke===0&&jr(g)),Me}function zo(){var Me,st,Xt,It,$r;if(Ke++,Me=Ae,we.charCodeAt(Ae)===48?(st=Xe,Ae++):(st=z,Ke===0&&jr(vt)),st!==z&&(on=Me,st=lt()),Me=st,Me===z){if(Me=Ae,st=Ae,zt.test(we.charAt(Ae))?(Xt=we.charAt(Ae),Ae++):(Xt=z,Ke===0&&jr(Pt)),Xt!==z){for(It=[],er.test(we.charAt(Ae))?($r=we.charAt(Ae),Ae++):($r=z,Ke===0&&jr(yr));$r!==z;)It.push($r),er.test(we.charAt(Ae))?($r=we.charAt(Ae),Ae++):($r=z,Ke===0&&jr(yr));It!==z?(Xt=[Xt,It],st=Xt):(Ae=st,st=z)}else Ae=st,st=z;st!==z&&(on=Me,st=Kr(st)),Me=st}return Ke--,Me===z&&(st=z,Ke===0&&jr(Ee)),Me}function ns(){var Me,st,Xt,It,$r;if(Ke++,Me=Ae,st=[],Xt=Ae,It=Ae,Ke++,$r=Ei(),$r===z&&($r=mo()),Ke--,$r===z?It=void 0:(Ae=It,It=z),It!==z?(we.length>Ae?($r=we.charAt(Ae),Ae++):($r=z,Ke===0&&jr(Ba)),$r!==z?(It=[It,$r],Xt=It):(Ae=Xt,Xt=z)):(Ae=Xt,Xt=z),Xt!==z)for(;Xt!==z;)st.push(Xt),Xt=Ae,It=Ae,Ke++,$r=Ei(),$r===z&&($r=mo()),Ke--,$r===z?It=void 0:(Ae=It,It=z),It!==z?(we.length>Ae?($r=we.charAt(Ae),Ae++):($r=z,Ke===0&&jr(Ba)),$r!==z?(It=[It,$r],Xt=It):(Ae=Xt,Xt=z)):(Ae=Xt,Xt=z);else st=z;return st!==z?Me=we.substring(Me,Ae):Me=st,Ke--,Me===z&&(st=z,Ke===0&&jr(Tn)),Me}var Gi=["root"];function as(){return Gi.length>1}function to(){return Gi[Gi.length-1]==="plural"}function ii(){return qe&&qe.captureLocation?{location:Gt()}:{}}if(kt=Ot(),kt!==z&&Ae===we.length)return kt;throw kt!==z&&Ae1)throw new RangeError("Fraction-precision stems only accept a single optional option");Ot.stem.replace(ye,function(vr,xr,Br){return vr==="."?qe.maximumFractionDigits=0:Br==="+"?qe.minimumFractionDigits=Br.length:xr[0]==="#"?qe.maximumFractionDigits=xr.length:(qe.minimumFractionDigits=xr.length,qe.maximumFractionDigits=xr.length+(typeof Br=="string"?Br.length:0)),""}),Ot.options.length&&(qe=Ht(Ht({},qe),b(Ot.options[0])));continue}if(T.test(Ot.stem)){qe=Ht(Ht({},qe),b(Ot.stem));continue}var or=q(Ot.stem);or&&(qe=Ht(Ht({},qe),or))}return qe}var fe=function(){var we=function(qe,z){return we=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Mt,Ot){Mt.__proto__=Ot}||function(Mt,Ot){for(var or in Ot)Ot.hasOwnProperty(or)&&(Mt[or]=Ot[or])},we(qe,z)};return function(qe,z){we(qe,z);function Mt(){this.constructor=qe}qe.prototype=z===null?Object.create(z):(Mt.prototype=z.prototype,new Mt)}}(),pe=function(){for(var we=0,qe=0,z=arguments.length;qe(.*?)<\/([0-9a-zA-Z-_]*?)>)|(<[0-9a-zA-Z-_]*?\/>)/,_e=Date.now()+"@@",ue=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"];function Ye(we,qe,z){var Mt=we.tagName,Ot=we.outerHTML,or=we.textContent,vr=we.childNodes;if(!Mt)return Le(or||"",qe);Mt=Mt.toLowerCase();var xr=~ue.indexOf(Mt),Br=z[Mt];if(Br&&xr)throw new Re(Mt+" is a self-closing tag and can not be used, please use another tag name.");if(!vr.length)return[Ot];var On=Array.prototype.slice.call(vr).reduce(function(Dr,Cr){return Dr.concat(Ye(Cr,qe,z))},[]);return Br?typeof Br=="function"?[Br.apply(void 0,On)]:[Br]:pe(["<"+Mt+">"],On,[""])}function Ve(we,qe,z,Mt,Ot,or){var vr=je(we,qe,z,Mt,Ot,void 0,or),xr={},Br=vr.reduce(function(zr,un){if(un.type===0)return zr+=un.value;var kn=$e();return xr[kn]=un.value,zr+=""+We+kn+We},"");if(!ze.test(Br))return Le(Br,xr);if(!Ot)throw new Re("Message has placeholders but no values was given");if(typeof DOMParser=="undefined")throw new Re("Cannot format XML message without DOMParser");tt||(tt=new DOMParser);var On=tt.parseFromString(''+Br+"","text/html").getElementById(_e);if(!On)throw new Re("Malformed HTML message "+Br);var Dr=Object.keys(Ot).filter(function(zr){return!!On.getElementsByTagName(zr).length});if(!Dr.length)return Le(Br,xr);var Cr=Dr.filter(function(zr){return zr!==zr.toLowerCase()});if(Cr.length)throw new Re("HTML tag must be lowercased but the following tags are not: "+Cr.join(", "));return Array.prototype.slice.call(On.childNodes).reduce(function(zr,un){return zr.concat(Ye(un,xr,Ot))},[])}var Je=function(){return Je=Object.assign||function(we){for(var qe,z=1,Mt=arguments.length;z<"']/g;function dt(we){return(""+we).replace(St,function(qe){return ot[qe.charCodeAt(0)]})}function Rt(we,qe){var z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return qe.reduce(function(Mt,Ot){return Ot in we?Mt[Ot]=we[Ot]:Ot in z&&(Mt[Ot]=z[Ot]),Mt},{})}function Ct(we){wt(we,"[React Intl] Could not find required `intl` object. needs to exist in the component ancestry.")}function Ut(we,qe){var z=qe?` +`.concat(qe.stack):"";return"[React Intl] ".concat(we).concat(z)}function cr(we){}var ir={formats:{},messages:{},timeZone:void 0,textComponent:M.Fragment,defaultLocale:"en",defaultFormats:{},onError:cr};function Rr(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function dr(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rr(),qe=Intl.RelativeTimeFormat,z=Intl.ListFormat,Mt=Intl.DisplayNames;return{getDateTimeFormat:Bt(Intl.DateTimeFormat,we.dateTime),getNumberFormat:Bt(Intl.NumberFormat,we.number),getMessageFormat:Bt(yt,we.message),getRelativeTimeFormat:Bt(qe,we.relativeTime),getPluralRules:Bt(Intl.PluralRules,we.pluralRules),getListFormat:Bt(z,we.list),getDisplayNames:Bt(Mt,we.displayNames)}}function wr(we,qe,z,Mt){var Ot=we&&we[qe],or;if(Ot&&(or=Ot[z]),or)return or;Mt(Ut("No ".concat(qe," format named: ").concat(z)))}var Vr=["localeMatcher","style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay"];function Qr(we,qe){var z=we.locale,Mt=we.formats,Ot=we.onError,or=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},vr=or.format,xr=vr&&wr(Mt,"number",vr,Ot)||{},Br=Rt(or,Vr,xr);return qe(z,Br)}function Pr(we,qe,z){var Mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};try{return Qr(we,qe,Mt).format(z)}catch(Ot){we.onError(Ut("Error formatting number.",Ot))}return String(z)}function nn(we,qe,z){var Mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};try{return Qr(we,qe,Mt).formatToParts(z)}catch(Ot){we.onError(Ut("Error formatting number.",Ot))}return[]}var qr=["numeric","style"];function fn(we,qe){var z=we.locale,Mt=we.formats,Ot=we.onError,or=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},vr=or.format,xr=!!vr&&wr(Mt,"relative",vr,Ot)||{},Br=Rt(or,qr,xr);return qe(z,Br)}function Zn(we,qe,z,Mt){var Ot=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};Mt||(Mt="second");var or=Intl.RelativeTimeFormat;or||we.onError(Ut(`Intl.RelativeTimeFormat is not available in this environment. +Try polyfilling it using "@formatjs/intl-relativetimeformat" +`));try{return fn(we,qe,Ot).format(z,Mt)}catch(vr){we.onError(Ut("Error formatting relative time.",vr))}return String(z)}var Gn=["localeMatcher","formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function Rn(we,qe,z){var Mt=we.locale,Ot=we.formats,or=we.onError,vr=we.timeZone,xr=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Br=xr.format,On=Object.assign(Object.assign({},vr&&{timeZone:vr}),Br&&wr(Ot,qe,Br,or)),Dr=Rt(xr,Gn,On);return qe==="time"&&!Dr.hour&&!Dr.minute&&!Dr.second&&(Dr=Object.assign(Object.assign({},Dr),{hour:"numeric",minute:"numeric"})),z(Mt,Dr)}function mn(we,qe,z){var Mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Ot=typeof z=="string"?new Date(z||0):z;try{return Rn(we,"date",qe,Mt).format(Ot)}catch(or){we.onError(Ut("Error formatting date.",or))}return String(Ot)}function xn(we,qe,z){var Mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Ot=typeof z=="string"?new Date(z||0):z;try{return Rn(we,"time",qe,Mt).format(Ot)}catch(or){we.onError(Ut("Error formatting time.",or))}return String(Ot)}function en(we,qe,z){var Mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Ot=typeof z=="string"?new Date(z||0):z;try{return Rn(we,"date",qe,Mt).formatToParts(Ot)}catch(or){we.onError(Ut("Error formatting date.",or))}return[]}function Wn(we,qe,z){var Mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Ot=typeof z=="string"?new Date(z||0):z;try{return Rn(we,"time",qe,Mt).formatToParts(Ot)}catch(or){we.onError(Ut("Error formatting time.",or))}return[]}var Un=["localeMatcher","type"];function Kn(we,qe,z){var Mt=we.locale,Ot=we.onError,or=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};Intl.PluralRules||Ot(Ut(`Intl.PluralRules is not available in this environment. +Try polyfilling it using "@formatjs/intl-pluralrules" +`));var vr=Rt(or,Un);try{return qe(Mt,vr).select(z)}catch(xr){Ot(Ut("Error formatting plural.",xr))}return"other"}var mr=e(64129),Kt=e.n(mr);function sr(we,qe){return Object.keys(we).reduce(function(z,Mt){return z[Mt]=Object.assign({timeZone:qe},we[Mt]),z},{})}function Mr(we,qe){var z=Object.keys(Object.assign(Object.assign({},we),qe));return z.reduce(function(Mt,Ot){return Mt[Ot]=Object.assign(Object.assign({},we[Ot]||{}),qe[Ot]||{}),Mt},{})}function _t(we,qe){if(!qe)return we;var z=yt.formats;return Object.assign(Object.assign(Object.assign({},z),we),{date:Mr(sr(z.date,qe),sr(we.date||{},qe)),time:Mr(sr(z.time,qe),sr(we.time||{},qe))})}var Zt=function(qe){return M.createElement.apply(_,[M.Fragment,null].concat(Kt()(qe)))};function Dt(we,qe){var z=we.locale,Mt=we.formats,Ot=we.messages,or=we.defaultLocale,vr=we.defaultFormats,xr=we.onError,Br=we.timeZone,On=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{id:""},Dr=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Cr=On.id,zr=On.defaultMessage;wt(!!Cr,"[React Intl] An `id` must be provided to format a message.");var un=Ot&&Ot[String(Cr)];Mt=_t(Mt,Br),vr=_t(vr,Br);var kn=[];if(un)try{var sa=qe.getMessageFormat(un,z,Mt,{formatters:qe});kn=sa.formatHTMLMessage(Dr)}catch(za){xr(Ut('Error formatting message: "'.concat(Cr,'" for locale: "').concat(z,'"')+(zr?", using default message as fallback.":""),za))}else(!zr||z&&z.toLowerCase()!==or.toLowerCase())&&xr(Ut('Missing message: "'.concat(Cr,'" for locale: "').concat(z,'"')+(zr?", using default message as fallback.":"")));if(!kn.length&&zr)try{var ba=qe.getMessageFormat(zr,or,vr);kn=ba.formatHTMLMessage(Dr)}catch(za){xr(Ut('Error formatting the default message for: "'.concat(Cr,'"'),za))}return kn.length?kn.length===1&&typeof kn[0]=="string"?kn[0]||zr||String(Cr):Zt(kn):(xr(Ut('Cannot format message: "'.concat(Cr,'", ')+"using message ".concat(un||zr?"source":"id"," as fallback."))),typeof un=="string"?un||zr||String(Cr):zr||String(Cr))}function ur(we,qe){var z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{id:""},Mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Ot=Object.keys(Mt).reduce(function(or,vr){var xr=Mt[vr];return or[vr]=typeof xr=="string"?dt(xr):xr,or},{});return Dt(we,qe,z,Ot)}var $t=e(38138),_r=e.n($t),pr=e(77190),Fr=e.n(pr),gn=["localeMatcher","type","style"],cn=Date.now();function yn(we){return"".concat(cn,"_").concat(we,"_").concat(cn)}function dn(we,qe,z){var Mt=we.locale,Ot=we.onError,or=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},vr=Intl.ListFormat;vr||Ot(Ut(`Intl.ListFormat is not available in this environment. +Try polyfilling it using "@formatjs/intl-listformat" +`));var xr=Rt(or,gn);try{var Br={},On=z.map(function(Cr,zr){if(Fr()(Cr)==="object"){var un=yn(zr);return Br[un]=Cr,un}return String(Cr)});if(!Object.keys(Br).length)return qe(Mt,xr).format(On);var Dr=qe(Mt,xr).formatToParts(On);return Dr.reduce(function(Cr,zr){var un=zr.value;return Br[un]?Cr.push(Br[un]):typeof Cr[Cr.length-1]=="string"?Cr[Cr.length-1]+=un:Cr.push(un),Cr},[])}catch(Cr){Ot(Ut("Error formatting list.",Cr))}return z}var Yn=["localeMatcher","style","type","fallback"];function Dn(we,qe,z){var Mt=we.locale,Ot=we.onError,or=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},vr=Intl.DisplayNames;vr||Ot(Ut(`Intl.DisplayNames is not available in this environment. +Try polyfilling it using "@formatjs/intl-displaynames" +`));var xr=Rt(or,Yn);try{return qe(Mt,xr).of(z)}catch(Br){Ot(Ut("Error formatting display name.",Br))}}var sn=_r()||$t;function ln(we){return{locale:we.locale,timeZone:we.timeZone,formats:we.formats,textComponent:we.textComponent,messages:we.messages,defaultLocale:we.defaultLocale,defaultFormats:we.defaultFormats,onError:we.onError}}function _n(we,qe){var z=dr(qe),Mt=Object.assign(Object.assign({},ir),we),Ot=Mt.locale,or=Mt.defaultLocale,vr=Mt.onError;return Ot?!Intl.NumberFormat.supportedLocalesOf(Ot).length&&vr?vr(Ut('Missing locale data for locale: "'.concat(Ot,'" in Intl.NumberFormat. Using default locale: "').concat(or,'" as fallback. See https://github.com/formatjs/react-intl/blob/master/docs/Getting-Started.md#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(Ot).length&&vr&&vr(Ut('Missing locale data for locale: "'.concat(Ot,'" in Intl.DateTimeFormat. Using default locale: "').concat(or,'" as fallback. See https://github.com/formatjs/react-intl/blob/master/docs/Getting-Started.md#runtime-requirements for more details'))):(vr&&vr(Ut('"locale" was not configured, using "'.concat(or,'" as fallback. See https://github.com/formatjs/react-intl/blob/master/docs/API.md#intlshape for more details'))),Mt.locale=Mt.defaultLocale||"en"),Object.assign(Object.assign({},Mt),{formatters:z,formatNumber:Pr.bind(null,Mt,z.getNumberFormat),formatNumberToParts:nn.bind(null,Mt,z.getNumberFormat),formatRelativeTime:Zn.bind(null,Mt,z.getRelativeTimeFormat),formatDate:mn.bind(null,Mt,z.getDateTimeFormat),formatDateToParts:en.bind(null,Mt,z.getDateTimeFormat),formatTime:xn.bind(null,Mt,z.getDateTimeFormat),formatTimeToParts:Wn.bind(null,Mt,z.getDateTimeFormat),formatPlural:Kn.bind(null,Mt,z.getPluralRules),formatMessage:Dt.bind(null,Mt,z),formatHTMLMessage:ur.bind(null,Mt,z),formatList:dn.bind(null,Mt,z.getListFormat),formatDisplayName:Dn.bind(null,Mt,z.getDisplayNames)})}var Mn=function(we){l()(z,we);var qe=p()(z);function z(){var Mt;return i()(this,z),Mt=qe.apply(this,arguments),Mt.cache=Rr(),Mt.state={cache:Mt.cache,intl:_n(ln(Mt.props),Mt.cache),prevConfig:ln(Mt.props)},Mt}return u()(z,[{key:"render",value:function(){return Ct(this.state.intl),M.createElement(D,{value:this.state.intl},this.props.children)}}],[{key:"getDerivedStateFromProps",value:function(Ot,or){var vr=or.prevConfig,xr=or.cache,Br=ln(Ot);return sn(vr,Br)?null:{intl:_n(Br,xr),prevConfig:Br}}}]),z}(M.PureComponent);Mn.displayName="IntlProvider",Mn.defaultProps=ir;var Ur=e(84377),ea=e(48370),ca=e.n(ea),da=e(15393),Ia=e.n(da),ka=function(we,qe){var z={};for(var Mt in we)Object.prototype.hasOwnProperty.call(we,Mt)&&qe.indexOf(Mt)<0&&(z[Mt]=we[Mt]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ot=0,Mt=Object.getOwnPropertySymbols(we);Ot1&&arguments[1]!==void 0?arguments[1]:!0,Mt=function(){if(Hr()!==qe){if(navigator.cookieEnabled&&typeof window.localStorage!="undefined"&&Lr&&window.localStorage.setItem("umi_locale",qe||""),Yr(qe),z)window.location.reload();else if(hr.emit(Qt,qe),window.dispatchEvent){var or=new Event("languagechange");window.dispatchEvent(or)}}};Mt()},bn=!0,vn=function(qe,z){return bn&&(warning(!1,`Using this API will cause automatic refresh when switching languages, please use useIntl or injectIntl. + +\u4F7F\u7528\u6B64 api \u4F1A\u9020\u6210\u5207\u6362\u8BED\u8A00\u7684\u65F6\u5019\u65E0\u6CD5\u81EA\u52A8\u5237\u65B0\uFF0C\u8BF7\u4F7F\u7528 useIntl \u6216 injectIntl\u3002 + +http://j.mp/37Fkd5Q + `),bn=!1),qt||Yr(Hr()),qt.formatMessage(qe,z)},Ln=function(){return Object.keys(Jt)}},61854:function(f,v,e){"use strict";e.d(v,{t:function(){return j},z:function(){return O}});var r=e(12741),t=e.n(r),a=e(38265),i=e.n(a),o=e(2837),u=e.n(o),c=e(12812),l=e.n(c),d=e(64063),p=e.n(d),M=e(67294),_=e(85893),y=M.createContext(null),I=i()(function F(){var J=this;u()(this,F),l()(this,"callbacks",{}),l()(this,"data",{}),l()(this,"update",function(D){J.callbacks[D]&&J.callbacks[D].forEach(function(R){try{var U=J.data[D];R(U)}catch(ee){R(void 0)}})})});function S(F){var J=F.hook,D=F.onUpdate,R=F.namespace,U=(0,M.useRef)(D),ee=(0,M.useRef)(!1),de;try{de=J()}catch(he){console.error("plugin-model: Invoking '".concat(R||"unknown","' model failed:"),he)}return(0,M.useMemo)(function(){U.current(de)},[]),(0,M.useEffect)(function(){ee.current?U.current(de):ee.current=!0}),null}var A=new I;function O(F){return(0,_.jsxs)(y.Provider,{value:{dispatcher:A},children:[Object.keys(F.models).map(function(J){return(0,_.jsx)(S,{hook:F.models[J],namespace:J,onUpdate:function(R){A.data[J]=R,A.update(J)}},J)}),F.children]})}function j(F,J){var D=(0,M.useContext)(y),R=D.dispatcher,U=(0,M.useRef)(J);U.current=J;var ee=(0,M.useState)(function(){return U.current?U.current(R.data[F]):R.data[F]}),de=t()(ee,2),he=de[0],ve=de[1],ce=(0,M.useRef)(he);ce.current=he;var xe=(0,M.useRef)(!1);return(0,M.useEffect)(function(){return xe.current=!0,function(){xe.current=!1}},[]),(0,M.useEffect)(function(){var Q,V=function(L){if(!xe.current)setTimeout(function(){R.data[F]=L,R.update(F)});else{var k=U.current?U.current(L):L,re=ce.current;p()(k,re)||ve(k)}};return(Q=R.callbacks)[F]||(Q[F]=new Set),R.callbacks[F].add(V),R.update(F),function(){R.callbacks[F].delete(V)}},[F]),he}},35811:function(f,v,e){"use strict";e.d(v,{WY:function(){return ze}});var r=e(97548),t=e(77190),a=e(11281),i=e.n(a),o=e(9669),u=e.n(o),c=e(67294),l=e(91296),d=e.n(l),p=e(93096),M=e.n(p);function _(){return typeof document!="undefined"&&typeof document.visibilityState!="undefined"?document.visibilityState!=="hidden":!0}function y(){return typeof navigator.onLine!="undefined"?navigator.onLine:!0}var I=new Map,S=function(ue,Ye,Ve){var Je=I.get(ue);Je!=null&&Je.timer&&clearTimeout(Je.timer);var it=void 0;Ye>-1&&(it=setTimeout(function(){I.delete(ue)},Ye)),I.set(ue,{data:Ve,timer:it,startTime:new Date().getTime()})},A=function(ue){var Ye=I.get(ue);return{data:Ye==null?void 0:Ye.data,startTime:Ye==null?void 0:Ye.startTime}},O=function(_e,ue){var Ye=typeof Symbol=="function"&&_e[Symbol.iterator];if(!Ye)return _e;var Ve=Ye.call(_e),Je,it=[],Te;try{for(;(ue===void 0||ue-- >0)&&!(Je=Ve.next()).done;)it.push(Je.value)}catch(Pe){Te={error:Pe}}finally{try{Je&&!Je.done&&(Ye=Ve.return)&&Ye.call(Ve)}finally{if(Te)throw Te.error}}return it},j=function(){for(var _e=[],ue=0;ue0)&&!(Je=Ve.next()).done;)it.push(Je.value)}catch(Pe){Te={error:Pe}}finally{try{Je&&!Je.done&&(Ye=Ve.return)&&Ye.call(Ve)}finally{if(Te)throw Te.error}}return it},D=function(){for(var _e=[],ue=0;ue0)&&!(Je=Ve.next()).done;)it.push(Je.value)}catch(Pe){Te={error:Pe}}finally{try{Je&&!Je.done&&(Ye=Ve.return)&&Ye.call(Ve)}finally{if(Te)throw Te.error}}return it},me=function(){for(var _e=[],ue=0;ue0){var ln=Pr&&((sn=getCache(Pr))===null||sn===void 0?void 0:sn.startTime)||0;Zn===-1||new Date().getTime()-ln<=Zn||Object.values(_r).forEach(function(_n){_n.refresh()})}else yn.current.apply(yn,me(ir))},[]);var Yn=useCallback(function(){Object.values(Fr.current).forEach(function(sn){sn.unmount()}),Kn.current=Ze,pr({}),Fr.current={}},[pr]);useUpdateEffect(function(){Te||Object.values(Fr.current).forEach(function(sn){sn.refresh()})},me(Je)),useEffect(function(){return function(){Object.values(Fr.current).forEach(function(sn){sn.unmount()})}},[]);var Dn=useCallback(function(sn){return function(){console.warn("You should't call "+sn+" when service not executed once.")}},[]);return K(K({loading:en&&!Te||ot,data:mn,error:void 0,params:[],cancel:Dn("cancel"),refresh:Dn("refresh"),mutate:Dn("mutate")},_r[Kn.current]||{}),{run:cn,fetches:_r,reset:Yn})}var mt=null,ht=function(){return ht=Object.assign||function(_e){for(var ue,Ye=1,Ve=arguments.length;Ye0)&&!(Je=Ve.next()).done;)it.push(Je.value)}catch(Pe){Te={error:Pe}}finally{try{Je&&!Je.done&&(Ye=Ve.return)&&Ye.call(Ve)}finally{if(Te)throw Te.error}}return it},ct=function(){for(var _e=[],ue=0;ue0)&&!(Je=Ve.next()).done;)it.push(Je.value)}catch(Pe){Te={error:Pe}}finally{try{Je&&!Je.done&&(Ye=Ve.return)&&Ye.call(Ve)}finally{if(Te)throw Te.error}}return it},rr=function(){for(var _e=[],ue=0;ueUn&&(en=Math.max(1,Un)),Qr({current:en,pageSize:Wn})},[Pr,Qr]),fn=useCallback(function(mn){qr(mn,ir)},[qr,ir]),Zn=useCallback(function(mn){qr(Ut,mn)},[qr,Ut]),Gn=useRef(fn);Gn.current=fn,useUpdateEffect(function(){ue.manual||Gn.current(1)},rr(Te));var Rn=useCallback(function(mn,xn,en){Qr({current:mn.current,pageSize:mn.pageSize||Je,filters:xn,sorter:en})},[Vr,dr,Qr]);return Wt({loading:St,data:yt,params:wt,run:ot,pagination:{current:Ut,pageSize:ir,total:Pr,totalPage:nn,onChange:qr,changeCurrent:fn,changePageSize:Zn},tableProps:{dataSource:(yt==null?void 0:yt.list)||[],loading:St,onChange:Rn,pagination:{current:Ut,pageSize:ir,total:Pr}},sorter:dr,filters:Vr},dt)}var Ar=null,ye=c.createContext({});ye.displayName="UseRequestConfigContext";var T=ye,b=function(){return b=Object.assign||function(_e){for(var ue,Ye=1,Ve=arguments.length;Ye0)&&!(Je=Ve.next()).done;)it.push(Je.value)}catch(Pe){Te={error:Pe}}finally{try{Je&&!Je.done&&(Ye=Ve.return)&&Ye.call(Ve)}finally{if(Te)throw Te.error}}return it},le=function(){for(var _e=[],ue=0;ue1&&arguments[1]!==void 0?arguments[1]:{};return useUmiRequest(_e,_objectSpread({formatResult:function(Ve){return Ve==null?void 0:Ve.data},requestMethod:function(Ve){if(typeof Ve=="string")return ze(Ve);if(_typeof(Ve)==="object"){var Je=Ve.url,it=_objectWithoutProperties(Ve,tt);return ze(Je,it)}throw new Error("request options error")}},ue))}var Ue,Ie,$e=function(){return Ie||(Ie=(0,He.We)().applyPlugins({key:"request",type:je.ApplyPluginsType.modify,initialValue:{}}),Ie)},Le=function(){var ue,Ye;if(Ue)return Ue;var Ve=$e();return Ue=u().create(Ve),Ve==null||(ue=Ve.requestInterceptors)===null||ue===void 0||ue.forEach(function(Je){Je instanceof Array?Ue.interceptors.request.use(function(it){var Te=it.url;if(Je[0].length===2){var Pe=Je[0](Te,it),nt=Pe.url,pt=Pe.options;return i()(i()({},pt),{},{url:nt})}return Je[0](it)},Je[1]):Ue.interceptors.request.use(function(it){var Te=it.url;if(Je.length===2){var Pe=Je(Te,it),nt=Pe.url,pt=Pe.options;return i()(i()({},pt),{},{url:nt})}return Je(it)})}),Ve==null||(Ye=Ve.responseInterceptors)===null||Ye===void 0||Ye.forEach(function(Je){Je instanceof Array?Ue.interceptors.response.use(Je[0],Je[1]):Ue.interceptors.response.use(Je)}),Ue.interceptors.response.use(function(Je){var it,Te=Je.data;return(Te==null?void 0:Te.success)===!1&&Ve!==null&&Ve!==void 0&&(it=Ve.errorConfig)!==null&&it!==void 0&&it.errorThrower&&Ve.errorConfig.errorThrower(Te),Je}),Ue},ze=function(ue){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{method:"GET"},Ve=Le(),Je=$e(),it=Ye.getResponse,Te=it===void 0?!1:it,Pe=Ye.requestInterceptors,nt=Ye.responseInterceptors,pt=Pe==null?void 0:Pe.map(function(wt){return wt instanceof Array?Ve.interceptors.request.use(function(ot){var St=ot.url;if(wt[0].length===2){var dt=wt[0](St,ot),Rt=dt.url,Ct=dt.options;return i()(i()({},Ct),{},{url:Rt})}return wt[0](ot)},wt[1]):Ve.interceptors.request.use(function(ot){var St=ot.url;if(wt.length===2){var dt=wt(St,ot),Rt=dt.url,Ct=dt.options;return i()(i()({},Ct),{},{url:Rt})}return wt(ot)})}),yt=nt==null?void 0:nt.map(function(wt){return wt instanceof Array?Ve.interceptors.response.use(wt[0],wt[1]):Ve.interceptors.response.use(wt)});return new Promise(function(wt,ot){Ve.request(i()(i()({},Ye),{},{url:ue})).then(function(St){pt==null||pt.forEach(function(dt){Ve.interceptors.request.eject(dt)}),yt==null||yt.forEach(function(dt){Ve.interceptors.response.eject(dt)}),wt(Te?St:St.data)}).catch(function(St){pt==null||pt.forEach(function(Ct){Ve.interceptors.request.eject(Ct)}),yt==null||yt.forEach(function(Ct){Ve.interceptors.response.eject(Ct)});try{var dt,Rt=Je==null||(dt=Je.errorConfig)===null||dt===void 0?void 0:dt.errorHandler;Rt&&Rt(St,Ye,Je)}catch(Ct){ot(Ct)}ot(St)})})}},34441:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(99138),t=e(67294),a=e(97005),i=e(85893),o=function(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:"\u2B50\uFE0F \u5982\u679C\u4F60\u559C\u6B22 TopIAM\uFF0C\u8BF7\u7ED9\u5B83\u4E00\u4E2A Star "}),(0,i.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/topiam/eiam",children:"GitHub"}),(0,i.jsx)("span",{children:" && "}),(0,i.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://gitee.com/topiam/eiam",children:"Gitee"}),(0,i.jsx)("span",{children:"\uFF0C \u4F60\u7684\u652F\u6301\u5C06\u662F\u6211\u4EEC\u524D\u884C\u7684\u52A8\u529B\uFF0C\u9879\u76EE\u6B63\u5728\u79EF\u6781\u5F00\u53D1\uFF0C \u6B22\u8FCE PR\u3001\u63D0\u4F9B\u5EFA\u8BAE\uFF0C\u5171\u5EFA\u793E\u533A\u751F\u6001\u3002\u{1F44F}\u{1F3FB}"})]})},u=function(l){var d=l.play;return(0,i.jsx)(r.Z,{style:{padding:0,background:"repeating-linear-gradient(35deg, hsl(196 120% 85%), hsl(196 120% 85%) 20px, hsl(196 120% 95%) 10px, hsl(196 120% 95%) 40px)"},message:(0,i.jsx)("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",color:"black"},children:d?(0,i.jsx)(a.Z,{pauseOnHover:!0,gradient:!1,children:o()}):o()}),showIcon:!1,banner:!0,type:"info"})},c=u},28343:function(f,v,e){"use strict";var r=e(83832);v.Z=r.S},64348:function(f,v,e){"use strict";e.d(v,{jS:function(){return M},qX:function(){return c},vq:function(){return d}});var r=e(97983),t=e.n(r),a=e(40794),i=e.n(a),o=e(54689),u=e(98971);function c(){return l.apply(this,arguments)}function l(){return l=i()(t()().mark(function y(){return t()().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.abrupt("return",(0,u.request)("/api/public_secret?type=login"));case 1:case"end":return S.stop()}},y)})),l.apply(this,arguments)}function d(y){return p.apply(this,arguments)}function p(){return p=i()(t()().mark(function y(I){return t()().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",(0,u.request)("/api/login",{method:"POST",params:I,requestType:"form",skipErrorHandler:!0}).catch(function(O){var j=O.response,F=j.status,J=j.data;return F===400||o.Z.error({description:J==null?void 0:J.message,message:J==null?void 0:J.status}),J}));case 1:case"end":return A.stop()}},y)})),p.apply(this,arguments)}function M(){return _.apply(this,arguments)}function _(){return _=i()(t()().mark(function y(){return t()().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.abrupt("return",(0,u.request)("/api/logout",{method:"POST"}));case 1:case"end":return S.stop()}},y)})),_.apply(this,arguments)}},25191:function(f,v,e){"use strict";e.d(v,{wm:function(){return Vi},a2:function(){return _o},JG:function(){return ki},LR:function(){return ai},oH:function(){return yo},Ib:function(){return Mo},Cs:function(){return No},MX:function(){return Qa},YE:function(){return Co}});var r=e(97983),t=e.n(r),a=e(40794),i=e.n(a),o=e(12741),u=e.n(o);function c(g){return typeof g=="undefined"||g===null}function l(g){return typeof g=="object"&&g!==null}function d(g){return Array.isArray(g)?g:c(g)?[]:[g]}function p(g,Ee){var Xe,vt,lt,zt;if(Ee)for(zt=Object.keys(Ee),Xe=0,vt=zt.length;Xeer&&(zt=" ... ",Ee=vt-er+zt.length),Xe-vt>er&&(Pt=" ...",Xe=vt+er-Pt.length),{str:zt+g.slice(Ee,Xe).replace(/\t/g,"\u2192")+Pt,pos:vt-Ee+zt.length}}function ee(g,Ee){return F.repeat(" ",Ee-g.length)+g}function de(g,Ee){if(Ee=Object.create(Ee||null),!g.buffer)return null;Ee.maxLength||(Ee.maxLength=79),typeof Ee.indent!="number"&&(Ee.indent=1),typeof Ee.linesBefore!="number"&&(Ee.linesBefore=3),typeof Ee.linesAfter!="number"&&(Ee.linesAfter=2);for(var Xe=/\r?\n|\r|\0/g,vt=[0],lt=[],zt,Pt=-1;zt=Xe.exec(g.buffer);)lt.push(zt.index),vt.push(zt.index+zt[0].length),g.position<=zt.index&&Pt<0&&(Pt=vt.length-2);Pt<0&&(Pt=vt.length-1);var er="",yr,Kr,Tn=Math.min(g.line+Ee.linesAfter,lt.length).toString().length,Ae=Ee.maxLength-(Ee.indent+Tn+3);for(yr=1;yr<=Ee.linesBefore&&!(Pt-yr<0);yr++)Kr=U(g.buffer,vt[Pt-yr],lt[Pt-yr],g.position-(vt[Pt]-vt[Pt-yr]),Ae),er=F.repeat(" ",Ee.indent)+ee((g.line-yr+1).toString(),Tn)+" | "+Kr.str+` +`+er;for(Kr=U(g.buffer,vt[Pt],lt[Pt],g.position,Ae),er+=F.repeat(" ",Ee.indent)+ee((g.line+1).toString(),Tn)+" | "+Kr.str+` +`,er+=F.repeat("-",Ee.indent+Tn+3+Kr.pos)+`^ +`,yr=1;yr<=Ee.linesAfter&&!(Pt+yr>=lt.length);yr++)Kr=U(g.buffer,vt[Pt+yr],lt[Pt+yr],g.position-(vt[Pt]-vt[Pt+yr]),Ae),er+=F.repeat(" ",Ee.indent)+ee((g.line+yr+1).toString(),Tn)+" | "+Kr.str+` +`;return er.replace(/\n$/,"")}var he=de,ve=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ce=["scalar","sequence","mapping"];function xe(g){var Ee={};return g!==null&&Object.keys(g).forEach(function(Xe){g[Xe].forEach(function(vt){Ee[String(vt)]=Xe})}),Ee}function Q(g,Ee){if(Ee=Ee||{},Object.keys(Ee).forEach(function(Xe){if(ve.indexOf(Xe)===-1)throw new R('Unknown option "'+Xe+'" is met in definition of "'+g+'" YAML type.')}),this.options=Ee,this.tag=g,this.kind=Ee.kind||null,this.resolve=Ee.resolve||function(){return!0},this.construct=Ee.construct||function(Xe){return Xe},this.instanceOf=Ee.instanceOf||null,this.predicate=Ee.predicate||null,this.represent=Ee.represent||null,this.representName=Ee.representName||null,this.defaultStyle=Ee.defaultStyle||null,this.multi=Ee.multi||!1,this.styleAliases=xe(Ee.styleAliases||null),ce.indexOf(this.kind)===-1)throw new R('Unknown kind "'+this.kind+'" is specified for "'+g+'" YAML type.')}var V=Q;function W(g,Ee){var Xe=[];return g[Ee].forEach(function(vt){var lt=Xe.length;Xe.forEach(function(zt,Pt){zt.tag===vt.tag&&zt.kind===vt.kind&&zt.multi===vt.multi&&(lt=Pt)}),Xe[lt]=vt}),Xe}function L(){var g={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},Ee,Xe;function vt(lt){lt.multi?(g.multi[lt.kind].push(lt),g.multi.fallback.push(lt)):g[lt.kind][lt.tag]=g.fallback[lt.tag]=lt}for(Ee=0,Xe=arguments.length;Ee=0?"0b"+g.toString(2):"-0b"+g.toString(2).slice(1)},octal:function(g){return g>=0?"0o"+g.toString(8):"-0o"+g.toString(8).slice(1)},decimal:function(g){return g.toString(10)},hexadecimal:function(g){return g>=0?"0x"+g.toString(16).toUpperCase():"-0x"+g.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ye=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function T(g){return!(g===null||!ye.test(g)||g[g.length-1]==="_")}function b(g){var Ee,Xe;return Ee=g.replace(/_/g,"").toLowerCase(),Xe=Ee[0]==="-"?-1:1,"+-".indexOf(Ee[0])>=0&&(Ee=Ee.slice(1)),Ee===".inf"?Xe===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:Ee===".nan"?NaN:Xe*parseFloat(Ee,10)}var q=/^[-+]?[0-9]+e/;function Ce(g,Ee){var Xe;if(isNaN(g))switch(Ee){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===g)switch(Ee){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===g)switch(Ee){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(F.isNegativeZero(g))return"-0.0";return Xe=g.toString(10),q.test(Xe)?Xe.replace("e",".e"):Xe}function le(g){return Object.prototype.toString.call(g)==="[object Number]"&&(g%1!==0||F.isNegativeZero(g))}var fe=new V("tag:yaml.org,2002:float",{kind:"scalar",resolve:T,construct:b,predicate:le,represent:Ce,defaultStyle:"lowercase"}),pe=Ze.extend({implicit:[ht,jt,Ar,fe]}),Re=pe,X=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),je=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function He(g){return g===null?!1:X.exec(g)!==null||je.exec(g)!==null}function tt(g){var Ee,Xe,vt,lt,zt,Pt,er,yr=0,Kr=null,Tn,Ae,on;if(Ee=X.exec(g),Ee===null&&(Ee=je.exec(g)),Ee===null)throw new Error("Date resolve error");if(Xe=+Ee[1],vt=+Ee[2]-1,lt=+Ee[3],!Ee[4])return new Date(Date.UTC(Xe,vt,lt));if(zt=+Ee[4],Pt=+Ee[5],er=+Ee[6],Ee[7]){for(yr=Ee[7].slice(0,3);yr.length<3;)yr+="0";yr=+yr}return Ee[9]&&(Tn=+Ee[10],Ae=+(Ee[11]||0),Kr=(Tn*60+Ae)*6e4,Ee[9]==="-"&&(Kr=-Kr)),on=new Date(Date.UTC(Xe,vt,lt,zt,Pt,er,yr)),Kr&&on.setTime(on.getTime()-Kr),on}function We(g){return g.toISOString()}var Ue=new V("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:He,construct:tt,instanceOf:Date,represent:We});function Ie(g){return g==="<<"||g===null}var $e=new V("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ie}),Le=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function ze(g){if(g===null)return!1;var Ee,Xe,vt=0,lt=g.length,zt=Le;for(Xe=0;Xe64)){if(Ee<0)return!1;vt+=6}return vt%8===0}function _e(g){var Ee,Xe,vt=g.replace(/[\r\n=]/g,""),lt=vt.length,zt=Le,Pt=0,er=[];for(Ee=0;Ee>16&255),er.push(Pt>>8&255),er.push(Pt&255)),Pt=Pt<<6|zt.indexOf(vt.charAt(Ee));return Xe=lt%4*6,Xe===0?(er.push(Pt>>16&255),er.push(Pt>>8&255),er.push(Pt&255)):Xe===18?(er.push(Pt>>10&255),er.push(Pt>>2&255)):Xe===12&&er.push(Pt>>4&255),new Uint8Array(er)}function ue(g){var Ee="",Xe=0,vt,lt,zt=g.length,Pt=Le;for(vt=0;vt>18&63],Ee+=Pt[Xe>>12&63],Ee+=Pt[Xe>>6&63],Ee+=Pt[Xe&63]),Xe=(Xe<<8)+g[vt];return lt=zt%3,lt===0?(Ee+=Pt[Xe>>18&63],Ee+=Pt[Xe>>12&63],Ee+=Pt[Xe>>6&63],Ee+=Pt[Xe&63]):lt===2?(Ee+=Pt[Xe>>10&63],Ee+=Pt[Xe>>4&63],Ee+=Pt[Xe<<2&63],Ee+=Pt[64]):lt===1&&(Ee+=Pt[Xe>>2&63],Ee+=Pt[Xe<<4&63],Ee+=Pt[64],Ee+=Pt[64]),Ee}function Ye(g){return Object.prototype.toString.call(g)==="[object Uint8Array]"}var Ve=new V("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ze,construct:_e,predicate:Ye,represent:ue}),Je=Object.prototype.hasOwnProperty,it=Object.prototype.toString;function Te(g){if(g===null)return!0;var Ee=[],Xe,vt,lt,zt,Pt,er=g;for(Xe=0,vt=er.length;Xe>10)+55296,(g-65536&1023)+56320)}for(var Mr=new Array(256),_t=new Array(256),Zt=0;Zt<256;Zt++)Mr[Zt]=Kt(Zt)?1:0,_t[Zt]=Kt(Zt);function Dt(g,Ee){this.input=g,this.filename=Ee.filename||null,this.schema=Ee.schema||Ut,this.onWarning=Ee.onWarning||null,this.legacy=Ee.legacy||!1,this.json=Ee.json||!1,this.listener=Ee.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=g.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ur(g,Ee){var Xe={name:g.filename,buffer:g.input.slice(0,-1),position:g.position,line:g.line,column:g.position-g.lineStart};return Xe.snippet=he(Xe),new R(Ee,Xe)}function $t(g,Ee){throw ur(g,Ee)}function _r(g,Ee){g.onWarning&&g.onWarning.call(null,ur(g,Ee))}var pr={YAML:function(Ee,Xe,vt){var lt,zt,Pt;Ee.version!==null&&$t(Ee,"duplication of %YAML directive"),vt.length!==1&&$t(Ee,"YAML directive accepts exactly one argument"),lt=/^([0-9]+)\.([0-9]+)$/.exec(vt[0]),lt===null&&$t(Ee,"ill-formed argument of the YAML directive"),zt=parseInt(lt[1],10),Pt=parseInt(lt[2],10),zt!==1&&$t(Ee,"unacceptable YAML version of the document"),Ee.version=vt[0],Ee.checkLineBreaks=Pt<2,Pt!==1&&Pt!==2&&_r(Ee,"unsupported YAML version of the document")},TAG:function(Ee,Xe,vt){var lt,zt;vt.length!==2&&$t(Ee,"TAG directive accepts exactly two arguments"),lt=vt[0],zt=vt[1],Zn.test(lt)||$t(Ee,"ill-formed tag handle (first argument) of the TAG directive"),cr.call(Ee.tagMap,lt)&&$t(Ee,'there is a previously declared suffix for "'+lt+'" tag handle'),Gn.test(zt)||$t(Ee,"ill-formed tag prefix (second argument) of the TAG directive");try{zt=decodeURIComponent(zt)}catch(Pt){$t(Ee,"tag prefix is malformed: "+zt)}Ee.tagMap[lt]=zt}};function Fr(g,Ee,Xe,vt){var lt,zt,Pt,er;if(Ee1&&(g.result+=F.repeat(` +`,Ee-1))}function sn(g,Ee,Xe){var vt,lt,zt,Pt,er,yr,Kr,Tn,Ae=g.kind,on=g.result,Vn;if(Vn=g.input.charCodeAt(g.position),en(Vn)||Wn(Vn)||Vn===35||Vn===38||Vn===42||Vn===33||Vn===124||Vn===62||Vn===39||Vn===34||Vn===37||Vn===64||Vn===96||(Vn===63||Vn===45)&&(lt=g.input.charCodeAt(g.position+1),en(lt)||Xe&&Wn(lt)))return!1;for(g.kind="scalar",g.result="",zt=Pt=g.position,er=!1;Vn!==0;){if(Vn===58){if(lt=g.input.charCodeAt(g.position+1),en(lt)||Xe&&Wn(lt))break}else if(Vn===35){if(vt=g.input.charCodeAt(g.position-1),en(vt))break}else{if(g.position===g.lineStart&&Yn(g)||Xe&&Wn(Vn))break;if(mn(Vn))if(yr=g.line,Kr=g.lineStart,Tn=g.lineIndent,dn(g,!1,-1),g.lineIndent>=Ee){er=!0,Vn=g.input.charCodeAt(g.position);continue}else{g.position=Pt,g.line=yr,g.lineStart=Kr,g.lineIndent=Tn;break}}er&&(Fr(g,zt,Pt,!1),Dn(g,g.line-yr),zt=Pt=g.position,er=!1),xn(Vn)||(Pt=g.position+1),Vn=g.input.charCodeAt(++g.position)}return Fr(g,zt,Pt,!1),g.result?!0:(g.kind=Ae,g.result=on,!1)}function ln(g,Ee){var Xe,vt,lt;if(Xe=g.input.charCodeAt(g.position),Xe!==39)return!1;for(g.kind="scalar",g.result="",g.position++,vt=lt=g.position;(Xe=g.input.charCodeAt(g.position))!==0;)if(Xe===39)if(Fr(g,vt,g.position,!0),Xe=g.input.charCodeAt(++g.position),Xe===39)vt=g.position,g.position++,lt=g.position;else return!0;else mn(Xe)?(Fr(g,vt,lt,!0),Dn(g,dn(g,!1,Ee)),vt=lt=g.position):g.position===g.lineStart&&Yn(g)?$t(g,"unexpected end of the document within a single quoted scalar"):(g.position++,lt=g.position);$t(g,"unexpected end of the stream within a single quoted scalar")}function _n(g,Ee){var Xe,vt,lt,zt,Pt,er;if(er=g.input.charCodeAt(g.position),er!==34)return!1;for(g.kind="scalar",g.result="",g.position++,Xe=vt=g.position;(er=g.input.charCodeAt(g.position))!==0;){if(er===34)return Fr(g,Xe,g.position,!0),g.position++,!0;if(er===92){if(Fr(g,Xe,g.position,!0),er=g.input.charCodeAt(++g.position),mn(er))dn(g,!1,Ee);else if(er<256&&Mr[er])g.result+=_t[er],g.position++;else if((Pt=Kn(er))>0){for(lt=Pt,zt=0;lt>0;lt--)er=g.input.charCodeAt(++g.position),(Pt=Un(er))>=0?zt=(zt<<4)+Pt:$t(g,"expected hexadecimal character");g.result+=sr(zt),g.position++}else $t(g,"unknown escape sequence");Xe=vt=g.position}else mn(er)?(Fr(g,Xe,vt,!0),Dn(g,dn(g,!1,Ee)),Xe=vt=g.position):g.position===g.lineStart&&Yn(g)?$t(g,"unexpected end of the document within a double quoted scalar"):(g.position++,vt=g.position)}$t(g,"unexpected end of the stream within a double quoted scalar")}function Mn(g,Ee){var Xe=!0,vt,lt,zt,Pt=g.tag,er,yr=g.anchor,Kr,Tn,Ae,on,Vn,Xn=Object.create(null),ga,Ke,kt,Lt;if(Lt=g.input.charCodeAt(g.position),Lt===91)Tn=93,Vn=!1,er=[];else if(Lt===123)Tn=125,Vn=!0,er={};else return!1;for(g.anchor!==null&&(g.anchorMap[g.anchor]=er),Lt=g.input.charCodeAt(++g.position);Lt!==0;){if(dn(g,!0,Ee),Lt=g.input.charCodeAt(g.position),Lt===Tn)return g.position++,g.tag=Pt,g.anchor=yr,g.kind=Vn?"mapping":"sequence",g.result=er,!0;Xe?Lt===44&&$t(g,"expected the node content, but found ','"):$t(g,"missed comma between flow collection entries"),Ke=ga=kt=null,Ae=on=!1,Lt===63&&(Kr=g.input.charCodeAt(g.position+1),en(Kr)&&(Ae=on=!0,g.position++,dn(g,!0,Ee))),vt=g.line,lt=g.lineStart,zt=g.position,na(g,Ee,ir,!1,!0),Ke=g.tag,ga=g.result,dn(g,!0,Ee),Lt=g.input.charCodeAt(g.position),(on||g.line===vt)&&Lt===58&&(Ae=!0,Lt=g.input.charCodeAt(++g.position),dn(g,!0,Ee),na(g,Ee,ir,!1,!0),kt=g.result),Vn?cn(g,er,Xn,Ke,ga,kt,vt,lt,zt):Ae?er.push(cn(g,null,Xn,Ke,ga,kt,vt,lt,zt)):er.push(ga),dn(g,!0,Ee),Lt=g.input.charCodeAt(g.position),Lt===44?(Xe=!0,Lt=g.input.charCodeAt(++g.position)):Xe=!1}$t(g,"unexpected end of the stream within a flow collection")}function Ur(g,Ee){var Xe,vt,lt=Vr,zt=!1,Pt=!1,er=Ee,yr=0,Kr=!1,Tn,Ae;if(Ae=g.input.charCodeAt(g.position),Ae===124)vt=!1;else if(Ae===62)vt=!0;else return!1;for(g.kind="scalar",g.result="";Ae!==0;)if(Ae=g.input.charCodeAt(++g.position),Ae===43||Ae===45)Vr===lt?lt=Ae===43?Pr:Qr:$t(g,"repeat of a chomping mode identifier");else if((Tn=mr(Ae))>=0)Tn===0?$t(g,"bad explicit indentation width of a block scalar; it cannot be less than one"):Pt?$t(g,"repeat of an indentation width identifier"):(er=Ee+Tn-1,Pt=!0);else break;if(xn(Ae)){do Ae=g.input.charCodeAt(++g.position);while(xn(Ae));if(Ae===35)do Ae=g.input.charCodeAt(++g.position);while(!mn(Ae)&&Ae!==0)}for(;Ae!==0;){for(yn(g),g.lineIndent=0,Ae=g.input.charCodeAt(g.position);(!Pt||g.lineIndenter&&(er=g.lineIndent),mn(Ae)){yr++;continue}if(g.lineIndentEe)&&yr!==0)$t(g,"bad indentation of a sequence entry");else if(g.lineIndentEe)&&(Ke&&(Pt=g.line,er=g.lineStart,yr=g.position),na(g,Ee,wr,!0,lt)&&(Ke?Xn=g.result:ga=g.result),Ke||(cn(g,Ae,on,Vn,Xn,ga,Pt,er,yr),Vn=Xn=ga=null),dn(g,!0,-1),Lt=g.input.charCodeAt(g.position)),(g.line===zt||g.lineIndent>Ee)&&Lt!==0)$t(g,"bad indentation of a mapping entry");else if(g.lineIndentEe?yr=1:g.lineIndent===Ee?yr=0:g.lineIndentEe?yr=1:g.lineIndent===Ee?yr=0:g.lineIndent tag; it should be "scalar", not "'+g.kind+'"'),Ae=0,on=g.implicitTypes.length;Ae"),g.result!==null&&Xn.kind!==g.kind&&$t(g,"unacceptable node kind for !<"+g.tag+'> tag; it should be "'+Xn.kind+'", not "'+g.kind+'"'),Xn.resolve(g.result,g.tag)?(g.result=Xn.construct(g.result,g.tag),g.anchor!==null&&(g.anchorMap[g.anchor]=g.result)):$t(g,"cannot resolve a node with !<"+g.tag+"> explicit tag")}return g.listener!==null&&g.listener("close",g),g.tag!==null||g.anchor!==null||Tn}function Za(g){var Ee=g.position,Xe,vt,lt,zt=!1,Pt;for(g.version=null,g.checkLineBreaks=g.legacy,g.tagMap=Object.create(null),g.anchorMap=Object.create(null);(Pt=g.input.charCodeAt(g.position))!==0&&(dn(g,!0,-1),Pt=g.input.charCodeAt(g.position),!(g.lineIndent>0||Pt!==37));){for(zt=!0,Pt=g.input.charCodeAt(++g.position),Xe=g.position;Pt!==0&&!en(Pt);)Pt=g.input.charCodeAt(++g.position);for(vt=g.input.slice(Xe,g.position),lt=[],vt.length<1&&$t(g,"directive name must not be less than one character in length");Pt!==0;){for(;xn(Pt);)Pt=g.input.charCodeAt(++g.position);if(Pt===35){do Pt=g.input.charCodeAt(++g.position);while(Pt!==0&&!mn(Pt));break}if(mn(Pt))break;for(Xe=g.position;Pt!==0&&!en(Pt);)Pt=g.input.charCodeAt(++g.position);lt.push(g.input.slice(Xe,g.position))}Pt!==0&&yn(g),cr.call(pr,vt)?pr[vt](g,vt,lt):_r(g,'unknown document directive "'+vt+'"')}if(dn(g,!0,-1),g.lineIndent===0&&g.input.charCodeAt(g.position)===45&&g.input.charCodeAt(g.position+1)===45&&g.input.charCodeAt(g.position+2)===45?(g.position+=3,dn(g,!0,-1)):zt&&$t(g,"directives end mark is expected"),na(g,g.lineIndent-1,wr,!1,!0),dn(g,!0,-1),g.checkLineBreaks&&qr.test(g.input.slice(Ee,g.position))&&_r(g,"non-ASCII line breaks are interpreted as content"),g.documents.push(g.result),g.position===g.lineStart&&Yn(g)){g.input.charCodeAt(g.position)===46&&(g.position+=3,dn(g,!0,-1));return}if(g.position=55296&&Xe<=56319&&Ee+1=56320&&vt<=57343)?(Xe-55296)*1024+vt-56320+65536:Xe}function wa(g){var Ee=/^\n* /;return Ee.test(g)}var Wa=1,Ua=2,Ra=3,Oi=4,Ga=5;function Ta(g,Ee,Xe,vt,lt,zt,Pt,er){var yr,Kr=0,Tn=null,Ae=!1,on=!1,Vn=vt!==-1,Xn=-1,ga=Gr($n(g,0))&&Xa($n(g,g.length-1));if(Ee||Pt)for(yr=0;yr=65536?yr+=2:yr++){if(Kr=$n(g,yr),!Ba(Kr))return Ga;ga=ga&&hi(Kr,Tn,er),Tn=Kr}else{for(yr=0;yr=65536?yr+=2:yr++){if(Kr=$n(g,yr),Kr===rt)Ae=!0,Vn&&(on=on||yr-Xn-1>vt&&g[Xn+1]!==" ",Xn=yr);else if(!Ba(Kr))return Ga;ga=ga&&hi(Kr,Tn,er),Tn=Kr}on=on||Vn&&yr-Xn-1>vt&&g[Xn+1]!==" "}return!Ae&&!on?ga&&!Pt&&!lt(g)?Wa:zt===un?Ga:Ua:Xe>9&&wa(g)?Ga:Pt?zt===un?Ga:Ua:on?Oi:Ra}function $(g,Ee,Xe,vt,lt){g.dump=function(){if(Ee.length===0)return g.quotingType===un?'""':"''";if(!g.noCompatMode&&(Br.indexOf(Ee)!==-1||On.test(Ee)))return g.quotingType===un?'"'+Ee+'"':"'"+Ee+"'";var zt=g.indent*Math.max(1,Xe),Pt=g.lineWidth===-1?-1:Math.max(Math.min(g.lineWidth,40),g.lineWidth-zt),er=vt||g.flowLevel>-1&&Xe>=g.flowLevel;function yr(Kr){return za(g,Kr)}switch(Ta(Ee,er,g.indent,Pt,yr,g.quotingType,g.forceQuotes&&!vt,lt)){case Wa:return Ee;case Ua:return"'"+Ee.replace(/'/g,"''")+"'";case Ra:return"|"+Y(Ee,g.indent)+w(sa(Ee,zt));case Oi:return">"+Y(Ee,g.indent)+w(sa(N(Ee,Pt),zt));case Ga:return'"'+Z(Ee)+'"';default:throw new R("impossible error: invalid scalar style")}}()}function Y(g,Ee){var Xe=wa(g)?String(Ee):"",vt=g[g.length-1]===` +`,lt=vt&&(g[g.length-2]===` +`||g===` +`),zt=lt?"+":vt?"":"-";return Xe+zt+` +`}function w(g){return g[g.length-1]===` +`?g.slice(0,-1):g}function N(g,Ee){for(var Xe=/(\n+)([^\n]*)/g,vt=function(){var Kr=g.indexOf(` +`);return Kr=Kr!==-1?Kr:g.length,Xe.lastIndex=Kr,P(g.slice(0,Kr),Ee)}(),lt=g[0]===` +`||g[0]===" ",zt,Pt;Pt=Xe.exec(g);){var er=Pt[1],yr=Pt[2];zt=yr[0]===" ",vt+=er+(!lt&&!zt&&yr!==""?` +`:"")+P(yr,Ee),lt=zt}return vt}function P(g,Ee){if(g===""||g[0]===" ")return g;for(var Xe=/ [^ ]/g,vt,lt=0,zt,Pt=0,er=0,yr="";vt=Xe.exec(g);)er=vt.index,er-lt>Ee&&(zt=Pt>lt?Pt:er,yr+=` +`+g.slice(lt,zt),lt=zt+1),Pt=er;return yr+=` +`,g.length-lt>Ee&&Pt>lt?yr+=g.slice(lt,Pt)+` +`+g.slice(Pt+1):yr+=g.slice(lt),yr.slice(1)}function Z(g){for(var Ee="",Xe=0,vt,lt=0;lt=65536?lt+=2:lt++)Xe=$n(g,lt),vt=xr[Xe],!vt&&Ba(Xe)?(Ee+=g[lt],Xe>=65536&&(Ee+=g[lt+1])):Ee+=vt||Cr(Xe);return Ee}function ne(g,Ee,Xe){var vt="",lt=g.tag,zt,Pt,er;for(zt=0,Pt=Xe.length;zt1024&&(Tn+="? "),Tn+=g.dump+(g.condenseFlow?'"':"")+":"+(g.condenseFlow?"":" "),ut(g,Ee,Kr,!1,!1)&&(Tn+=g.dump,vt+=Tn));g.tag=lt,g.dump="{"+vt+"}"}function et(g,Ee,Xe,vt){var lt="",zt=g.tag,Pt=Object.keys(Xe),er,yr,Kr,Tn,Ae,on;if(g.sortKeys===!0)Pt.sort();else if(typeof g.sortKeys=="function")Pt.sort(g.sortKeys);else if(g.sortKeys)throw new R("sortKeys must be a boolean or a function");for(er=0,yr=Pt.length;er1024,Ae&&(g.dump&&rt===g.dump.charCodeAt(0)?on+="?":on+="? "),on+=g.dump,Ae&&(on+=ba(g,Ee)),ut(g,Ee+1,Tn,!0,Ae)&&(g.dump&&rt===g.dump.charCodeAt(0)?on+=":":on+=": ",on+=g.dump,lt+=on));g.tag=zt,g.dump=lt||"{}"}function at(g,Ee,Xe){var vt,lt,zt,Pt,er,yr;for(lt=Xe?g.explicitTypes:g.implicitTypes,zt=0,Pt=lt.length;zt tag resolver accepts not "'+yr+'" style');g.dump=vt}return!0}return!1}function ut(g,Ee,Xe,vt,lt,zt,Pt){g.tag=null,g.dump=Xe,at(g,Xe,!1)||at(g,Xe,!0);var er=ke.call(g.dump),yr=vt,Kr;vt&&(vt=g.flowLevel<0||g.flowLevel>Ee);var Tn=er==="[object Object]"||er==="[object Array]",Ae,on;if(Tn&&(Ae=g.duplicates.indexOf(Xe),on=Ae!==-1),(g.tag!==null&&g.tag!=="?"||on||g.indent!==2&&Ee>0)&&(lt=!1),on&&g.usedDuplicates[Ae])g.dump="*ref_"+Ae;else{if(Tn&&on&&!g.usedDuplicates[Ae]&&(g.usedDuplicates[Ae]=!0),er==="[object Object]")vt&&Object.keys(g.dump).length!==0?(et(g,Ee,g.dump,lt),on&&(g.dump="&ref_"+Ae+g.dump)):(Ne(g,Ee,g.dump),on&&(g.dump="&ref_"+Ae+" "+g.dump));else if(er==="[object Array]")vt&&g.dump.length!==0?(g.noArrayIndent&&!Pt&&Ee>0?se(g,Ee-1,g.dump,lt):se(g,Ee,g.dump,lt),on&&(g.dump="&ref_"+Ae+g.dump)):(ne(g,Ee,g.dump),on&&(g.dump="&ref_"+Ae+" "+g.dump));else if(er==="[object String]")g.tag!=="?"&&$(g,g.dump,Ee,zt,yr);else{if(er==="[object Undefined]")return!1;if(g.skipInvalid)return!1;throw new R("unacceptable kind of an object to dump "+er)}g.tag!==null&&g.tag!=="?"&&(Kr=encodeURI(g.tag[0]==="!"?g.tag.slice(1):g.tag).replace(/!/g,"%21"),g.tag[0]==="!"?Kr="!"+Kr:Kr.slice(0,18)==="tag:yaml.org,2002:"?Kr="!!"+Kr.slice(18):Kr="!<"+Kr+">",g.dump=Kr+" "+g.dump)}return!0}function Yt(g,Ee){var Xe=[],vt=[],lt,zt;for(fr(g,Xe,vt),lt=0,zt=vt.length;ltvt?parse(Ee.split("?")[1]):parse(Ee.slice(Xe+1,vt)):{}},ni=function(Ee){var Xe=document.cookie.match(new RegExp("(^|;\\s*)(".concat(Ee,")=([^;]*)")));return Xe?decodeURIComponent(Xe[3]):null},ai=function(Ee,Xe){var vt=document.createElement("a");document.body.appendChild(vt),vt.style.display="none",vt.href=window.URL.createObjectURL(Ee);var lt=Xe.split("filename=")[1].split(".");console.log(lt),vt.setAttribute("download","".concat(decodeURI(lt[0]),".").concat(lt[1])),vt.click(),document.body.removeChild(vt)},Qa=function(Ee){for(var Xe=Math.ceil(Number(Ee)/10)+1,vt="",lt=0;lt0}).join("&")},v.parseUrl=function(D,R){R=Object.assign({decode:!0},R);var U=c(D,"#"),ee=r(U,2),de=ee[0],he=ee[1];return Object.assign({url:de.split("?")[0]||"",query:J(j(D),R)},R&&R.parseFragmentIdentifier&&he?{fragmentIdentifier:I(he,R)}:{})},v.stringifyUrl=function(D,R){R=Object.assign({encode:!0,strict:!0},R);var U=A(D.url).split("?")[0]||"",ee=v.extract(D.url),de=v.parse(ee,{sort:!1}),he=Object.assign(de,D.query),ve=v.stringify(he,R);ve&&(ve="?".concat(ve));var ce=O(D.url);return D.fragmentIdentifier&&(ce="#".concat(y(D.fragmentIdentifier,R))),"".concat(U).concat(ve).concat(ce)},v.pick=function(D,R,U){U=Object.assign({parseFragmentIdentifier:!0},U);var ee=v.parseUrl(D,U),de=ee.url,he=ee.query,ve=ee.fragmentIdentifier;return v.stringifyUrl({url:de,query:l(he,R),fragmentIdentifier:ve},U)},v.exclude=function(D,R,U){var ee=Array.isArray(R)?function(de){return!R.includes(de)}:function(de,he){return!R(de,he)};return v.pick(D,ee,U)}},16806:function(f){"use strict";f.exports=function(v,e){if(!(typeof v=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[v];var r=v.indexOf(e);return r===-1?[v]:[v.slice(0,r),v.slice(r+e.length)]}},18184:function(f){"use strict";f.exports=function(v){return encodeURIComponent(v).replace(/[!'()*]/g,function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())})}},34897:function(f,v,e){"use strict";e.d(v,{Il:function(){return t},Ov:function(){return a}});var r=e(67294),t=r.createContext({});function a(){return r.useContext(t)}function i(){var c=useLocation(),l=a(),d=l.clientRoutes,p=matchRoutes(d,c.pathname);return p||[]}function o(){var c=useRouteData(),l=a();return{data:l.serverLoaderData[c.route.id]}}function u(){var c=useRouteData(),l=a();return{data:l.clientLoaderData[c.route.id]}}},13399:function(f){var v=function(e){"use strict";var r=Object.prototype,t=r.hasOwnProperty,a,i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(W,L,k){return Object.defineProperty(W,L,{value:k,enumerable:!0,configurable:!0,writable:!0}),W[L]}try{l({},"")}catch(W){l=function(L,k,re){return L[k]=re}}function d(W,L,k,re){var K=L&&L.prototype instanceof A?L:A,ie=Object.create(K.prototype),me=new xe(re||[]);return ie._invoke=de(W,k,me),ie}e.wrap=d;function p(W,L,k){try{return{type:"normal",arg:W.call(L,k)}}catch(re){return{type:"throw",arg:re}}}var M="suspendedStart",_="suspendedYield",y="executing",I="completed",S={};function A(){}function O(){}function j(){}var F={};l(F,o,function(){return this});var J=Object.getPrototypeOf,D=J&&J(J(Q([])));D&&D!==r&&t.call(D,o)&&(F=D);var R=j.prototype=A.prototype=Object.create(F);O.prototype=j,l(R,"constructor",j),l(j,"constructor",O),O.displayName=l(j,c,"GeneratorFunction");function U(W){["next","throw","return"].forEach(function(L){l(W,L,function(k){return this._invoke(L,k)})})}e.isGeneratorFunction=function(W){var L=typeof W=="function"&&W.constructor;return L?L===O||(L.displayName||L.name)==="GeneratorFunction":!1},e.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,j):(W.__proto__=j,l(W,c,"GeneratorFunction")),W.prototype=Object.create(R),W},e.awrap=function(W){return{__await:W}};function ee(W,L){function k(ie,me,Ze,De){var Fe=p(W[ie],W,me);if(Fe.type==="throw")De(Fe.arg);else{var mt=Fe.arg,ht=mt.value;return ht&&typeof ht=="object"&&t.call(ht,"__await")?L.resolve(ht.__await).then(function(xt){k("next",xt,Ze,De)},function(xt){k("throw",xt,Ze,De)}):L.resolve(ht).then(function(xt){mt.value=xt,Ze(mt)},function(xt){return k("throw",xt,Ze,De)})}}var re;function K(ie,me){function Ze(){return new L(function(De,Fe){k(ie,me,De,Fe)})}return re=re?re.then(Ze,Ze):Ze()}this._invoke=K}U(ee.prototype),l(ee.prototype,u,function(){return this}),e.AsyncIterator=ee,e.async=function(W,L,k,re,K){K===void 0&&(K=Promise);var ie=new ee(d(W,L,k,re),K);return e.isGeneratorFunction(L)?ie:ie.next().then(function(me){return me.done?me.value:ie.next()})};function de(W,L,k){var re=M;return function(ie,me){if(re===y)throw new Error("Generator is already running");if(re===I){if(ie==="throw")throw me;return V()}for(k.method=ie,k.arg=me;;){var Ze=k.delegate;if(Ze){var De=he(Ze,k);if(De){if(De===S)continue;return De}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(re===M)throw re=I,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);re=y;var Fe=p(W,L,k);if(Fe.type==="normal"){if(re=k.done?I:_,Fe.arg===S)continue;return{value:Fe.arg,done:k.done}}else Fe.type==="throw"&&(re=I,k.method="throw",k.arg=Fe.arg)}}}function he(W,L){var k=W.iterator[L.method];if(k===a){if(L.delegate=null,L.method==="throw"){if(W.iterator.return&&(L.method="return",L.arg=a,he(W,L),L.method==="throw"))return S;L.method="throw",L.arg=new TypeError("The iterator does not provide a 'throw' method")}return S}var re=p(k,W.iterator,L.arg);if(re.type==="throw")return L.method="throw",L.arg=re.arg,L.delegate=null,S;var K=re.arg;if(!K)return L.method="throw",L.arg=new TypeError("iterator result is not an object"),L.delegate=null,S;if(K.done)L[W.resultName]=K.value,L.next=W.nextLoc,L.method!=="return"&&(L.method="next",L.arg=a);else return K;return L.delegate=null,S}U(R),l(R,c,"Generator"),l(R,o,function(){return this}),l(R,"toString",function(){return"[object Generator]"});function ve(W){var L={tryLoc:W[0]};1 in W&&(L.catchLoc=W[1]),2 in W&&(L.finallyLoc=W[2],L.afterLoc=W[3]),this.tryEntries.push(L)}function ce(W){var L=W.completion||{};L.type="normal",delete L.arg,W.completion=L}function xe(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(ve,this),this.reset(!0)}e.keys=function(W){var L=[];for(var k in W)L.push(k);return L.reverse(),function re(){for(;L.length;){var K=L.pop();if(K in W)return re.value=K,re.done=!1,re}return re.done=!0,re}};function Q(W){if(W){var L=W[o];if(L)return L.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var k=-1,re=function K(){for(;++k=0;--re){var K=this.tryEntries[re],ie=K.completion;if(K.tryLoc==="root")return k("end");if(K.tryLoc<=this.prev){var me=t.call(K,"catchLoc"),Ze=t.call(K,"finallyLoc");if(me&&Ze){if(this.prev=0;--k){var re=this.tryEntries[k];if(re.tryLoc<=this.prev&&t.call(re,"finallyLoc")&&this.prev=0;--L){var k=this.tryEntries[L];if(k.finallyLoc===W)return this.complete(k.completion,k.afterLoc),ce(k),S}},catch:function(W){for(var L=this.tryEntries.length-1;L>=0;--L){var k=this.tryEntries[L];if(k.tryLoc===W){var re=k.completion;if(re.type==="throw"){var K=re.arg;ce(k)}return K}}throw new Error("illegal catch attempt")},delegateYield:function(W,L,k){return this.delegate={iterator:Q(W),resultName:L,nextLoc:k},this.method==="next"&&(this.arg=a),S}},e}(f.exports);try{regeneratorRuntime=v}catch(e){typeof globalThis=="object"?globalThis.regeneratorRuntime=v:Function("r","regeneratorRuntime = r")(v)}},8745:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(87462),t=e(97685),a=e(21770),i=e(67294),o=e(53124),u=e(46986);function c(l,d,p){return function(_){var y=_.prefixCls,I=_.style,S=i.useRef(null),A=i.useState(0),O=(0,t.Z)(A,2),j=O[0],F=O[1],J=i.useState(0),D=(0,t.Z)(J,2),R=D[0],U=D[1],ee=(0,a.Z)(!1,{value:_.open}),de=(0,t.Z)(ee,2),he=de[0],ve=de[1],ce=i.useContext(o.E_),xe=ce.getPrefixCls,Q=xe(d||"select",y);return i.useEffect(function(){if(ve(!0),typeof ResizeObserver!="undefined"){var V=new ResizeObserver(function(L){var k=L[0].target;F(k.offsetHeight+8),U(k.offsetWidth)}),W=setInterval(function(){var L,k=p?"."+p(Q):"."+Q+"-dropdown",re=(L=S.current)===null||L===void 0?void 0:L.querySelector(k);re&&(clearInterval(W),V.observe(re))},10);return function(){clearInterval(W),V.disconnect()}}},[]),i.createElement(u.ZP,{theme:{token:{motionDurationFast:"0.01s",motionDurationMid:"0.01s",motionDurationSlow:"0.01s"}}},i.createElement("div",{ref:S,style:{paddingBottom:j,position:"relative",width:"fit-content",minWidth:R}},i.createElement(l,(0,r.Z)({},_,{style:(0,r.Z)((0,r.Z)({},I),{margin:0}),open:he,visible:he,getPopupContainer:function(){return S.current}}))))}}},98787:function(f,v,e){"use strict";e.d(v,{E:function(){return t},Y:function(){return a}});var r=e(93355),t=(0,r.b)("success","processing","error","default","warning"),a=(0,r.b)("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime")},5467:function(f,v,e){"use strict";e.d(v,{Z:function(){return r}});function r(t){return Object.keys(t).reduce(function(a,i){return(i.startsWith("data-")||i.startsWith("aria-")||i==="role")&&!i.startsWith("data-__")&&(a[i]=t[i]),a},{})}},81643:function(f,v,e){"use strict";e.d(v,{Z:function(){return r}});var r=function(a){return a?typeof a=="function"?a():a:null}},98082:function(f,v,e){"use strict";var r=e(97685),t=e(67294),a=e(31808);v.Z=function(){var i=t.useState(!1),o=(0,r.Z)(i,2),u=o[0],c=o[1];return t.useEffect(function(){c((0,a.fk)())},[]),u}},57838:function(f,v,e){"use strict";e.d(v,{Z:function(){return a}});var r=e(97685),t=e(67294);function a(){var i=t.useReducer(function(c){return c+1},0),o=(0,r.Z)(i,2),u=o[1];return u}},33603:function(f,v,e){"use strict";e.d(v,{mL:function(){return d},q0:function(){return l}});var r=e(93355),t=function(){return{height:0,opacity:0}},a=function(M){var _=M.scrollHeight;return{height:_,opacity:1}},i=function(M){return{height:M?M.offsetHeight:0}},o=function(M,_){return(_==null?void 0:_.deadline)===!0||_.propertyName==="height"},u=function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"ant";return{motionName:M+"-motion-collapse",onAppearStart:t,onEnterStart:t,onAppearActive:a,onEnterActive:a,onLeaveStart:i,onLeaveActive:t,onAppearEnd:o,onEnterEnd:o,onLeaveEnd:o,motionDeadline:500}},c=(0,r.b)("bottomLeft","bottomRight","topLeft","topRight"),l=function(M){return M!==void 0&&(M==="topLeft"||M==="topRight")?"slide-down":"slide-up"},d=function(M,_,y){return y!==void 0?y:M+"-"+_};v.ZP=u},80636:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(87462),t=e(43159),a={adjustX:1,adjustY:1},i={adjustX:0,adjustY:0},o=[0,0];function u(l){return typeof l=="boolean"?l?a:i:(0,r.Z)((0,r.Z)({},i),l)}function c(l){var d=l.arrowWidth,p=d===void 0?4:d,M=l.horizontalArrowShift,_=M===void 0?16:M,y=l.verticalArrowShift,I=y===void 0?8:y,S=l.autoAdjustOverflow,A=l.arrowPointAtCenter,O={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(_+p),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(I+p)]},topRight:{points:["br","tc"],offset:[_+p,-4]},rightTop:{points:["tl","cr"],offset:[4,-(I+p)]},bottomRight:{points:["tr","bc"],offset:[_+p,4]},rightBottom:{points:["bl","cr"],offset:[4,I+p]},bottomLeft:{points:["tl","bc"],offset:[-(_+p),4]},leftBottom:{points:["br","cl"],offset:[-4,I+p]}};return Object.keys(O).forEach(function(j){O[j]=A?(0,r.Z)((0,r.Z)({},O[j]),{overflow:u(S),targetOffset:o}):(0,r.Z)((0,r.Z)({},t.C[j]),{overflow:u(S)}),O[j].ignoreShake=!0}),O}},96159:function(f,v,e){"use strict";e.d(v,{M2:function(){return a},Tm:function(){return o},l$:function(){return t},wm:function(){return i}});var r=e(67294),t=r.isValidElement;function a(u){return u&&t(u)&&u.type===r.Fragment}function i(u,c,l){return t(u)?r.cloneElement(u,typeof l=="function"?l(u.props||{}):l):c}function o(u,c){return i(u,u,c)}},24308:function(f,v,e){"use strict";e.d(v,{c4:function(){return a}});var r=e(4942),t=e(87462),a=["xxl","xl","lg","md","sm","xs"],i={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},o=new Map,u=-1,c={},l={matchHandlers:{},dispatch:function(p){return c=p,o.forEach(function(M){return M(c)}),o.size>=1},subscribe:function(p){return o.size||this.register(),u+=1,o.set(u,p),p(c),u},unsubscribe:function(p){o.delete(p),o.size||this.unregister()},unregister:function(){var p=this;Object.keys(i).forEach(function(M){var _=i[M],y=p.matchHandlers[_];y==null||y.mql.removeListener(y==null?void 0:y.listener)}),o.clear()},register:function(){var p=this;Object.keys(i).forEach(function(M){var _=i[M],y=function(A){var O=A.matches;p.dispatch((0,t.Z)((0,t.Z)({},c),(0,r.Z)({},M,O)))},I=window.matchMedia(_);I.addListener(y),p.matchHandlers[_]={mql:I,listener:y},y(I)})}};v.ZP=l},31808:function(f,v,e){"use strict";e.d(v,{fk:function(){return i},jD:function(){return t}});var r=e(98924),t=function(){return(0,r.Z)()&&window.document.documentElement},a,i=function(){if(!t())return!1;if(a!==void 0)return a;var u=document.createElement("div");return u.style.display="flex",u.style.flexDirection="column",u.style.rowGap="1px",u.appendChild(document.createElement("div")),u.appendChild(document.createElement("div")),document.body.appendChild(u),a=u.scrollHeight===1,document.body.removeChild(u),a}},93355:function(f,v,e){"use strict";e.d(v,{a:function(){return t},b:function(){return r}});var r=function(){for(var i=arguments.length,o=new Array(i),u=0;u1&&arguments[1]!==void 0?arguments[1]:1,L=_++,k=W;function re(){k-=1,k<=0?(V(),delete y[L]):y[L]=(0,M.Z)(re)}return y[L]=(0,M.Z)(re),L}I.cancel=function(W){W!==void 0&&(M.Z.cancel(y[W]),delete y[W])},I.ids=y;var S=e(96159),A=e(97685),O=e(4942),j=e(66981),F=e(64049),J=function(W){var L,k=new j.E4("waveEffect",{"100%":{boxShadow:"0 0 0 6px var(--antd-wave-shadow-color)"}}),re=new j.E4("fadeEffect",{"100%":{opacity:0}});return[(L={},(0,O.Z)(L,W.clickAnimatingWithoutExtraNodeTrue+`, + `+W.clickAnimatingTrue,{"--antd-wave-shadow-color":W.colorPrimary,"--scroll-bar":0,position:"relative"}),(0,O.Z)(L,W.clickAnimatingWithoutExtraNodeTrueAfter+`, + & `+W.clickAnimatingNode,{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:0,bottom:0,display:"block",borderRadius:"inherit",boxShadow:"0 0 0 0 var(--antd-wave-shadow-color)",opacity:.2,animation:{_skip_check_:!0,value:re.getName(W.hashId)+" 2s "+W.motionEaseOutCirc+", "+k.getName(W.hashId)+" 0.4s "+W.motionEaseOutCirc},animationFillMode:"forwards",content:'""',pointerEvents:"none"}),L),{},k,re]},D=function(){var V=(0,F.dQ)(),W=(0,A.Z)(V,3),L=W[0],k=W[1],re=W[2],K=(0,d.useContext)(p.E_),ie=K.getPrefixCls,me=ie(),Ze="["+me+"-click-animating='true']",De="["+me+"-click-animating-without-extra-node='true']",Fe="."+me+"-click-animating-node",mt=(0,r.Z)((0,r.Z)({},k),{hashId:re,clickAnimatingNode:Fe,clickAnimatingTrue:Ze,clickAnimatingWithoutExtraNodeTrue:De,clickAnimatingWithoutExtraNodeTrueAfter:De+"::after"});return[(0,j.xy)({theme:L,token:k,hashId:re,path:["wave"]},function(){return[J(mt)]}),re]},R;function U(V){return!V||V.offsetParent===null||V.hidden}function ee(V){return V instanceof Document?V.body:Array.from(V.childNodes).find(function(W){return(W==null?void 0:W.nodeType)===Node.ELEMENT_NODE})}function de(V){var W=(V||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return W&&W[1]&&W[2]&&W[3]?!(W[1]===W[2]&&W[2]===W[3]):!0}function he(V){return V&&V!=="#fff"&&V!=="#ffffff"&&V!=="rgb(255, 255, 255)"&&V!=="rgba(255, 255, 255, 1)"&&de(V)&&!/rgba\((?:\d*, ){3}0\)/.test(V)&&V!=="transparent"}function ve(V){var W=getComputedStyle(V),L=W.getPropertyValue("border-top-color"),k=W.getPropertyValue("border-color"),re=W.getPropertyValue("background-color");return he(L)?L:he(k)?k:re}var ce=function(V){(0,o.Z)(L,V);var W=(0,u.Z)(L);function L(){var k;return(0,t.Z)(this,L),k=W.apply(this,arguments),k.containerRef=d.createRef(),k.animationStart=!1,k.destroyed=!1,k.onClick=function(re,K){var ie,me,Ze=k.props,De=Ze.insertExtraNode,Fe=Ze.disabled;if(!(Fe||!re||U(re)||re.className.includes("-leave"))){k.extraNode=document.createElement("div");var mt=(0,i.Z)(k),ht=mt.extraNode,xt=k.context.getPrefixCls;ht.className=xt("")+"-click-animating-node";var Et=k.getAttributeName();if(re.setAttribute(Et,"true"),he(K)){ht.style.borderColor=K;var ct=((ie=re.getRootNode)===null||ie===void 0?void 0:ie.call(re))||re.ownerDocument,jt=(me=ee(ct))!==null&&me!==void 0?me:ct;R=(0,c.hq)(` + [`+xt("")+"-click-animating-without-extra-node='true']::after, ."+xt("")+`-click-animating-node { + --antd-wave-shadow-color: `+K+`; + }`,"antd-wave",{csp:k.csp,attachTo:jt})}De&&re.appendChild(ht),["transition","animation"].forEach(function(Tt){re.addEventListener(Tt+"start",k.onTransitionStart),re.addEventListener(Tt+"end",k.onTransitionEnd)})}},k.onTransitionStart=function(re){if(!k.destroyed){var K=k.containerRef.current;!re||re.target!==K||k.animationStart||k.resetEffect(K)}},k.onTransitionEnd=function(re){!re||re.animationName!=="fadeEffect"||k.resetEffect(re.target)},k.bindAnimationEvent=function(re){if(!(!re||!re.getAttribute||re.getAttribute("disabled")||re.className.includes("disabled"))){var K=function(me){if(!(me.target.tagName==="INPUT"||U(me.target))){k.resetEffect(re);var Ze=ve(re);k.clickWaveTimeoutId=window.setTimeout(function(){return k.onClick(re,Ze)},0),I.cancel(k.animationStartId),k.animationStart=!0,k.animationStartId=I(function(){k.animationStart=!1},10)}};return re.addEventListener("click",K,!0),{cancel:function(){re.removeEventListener("click",K,!0)}}}},k.renderWave=function(re){var K=re.csp,ie=k.props.children;if(k.csp=K,!d.isValidElement(ie))return ie;var me=k.containerRef;return(0,l.Yr)(ie)&&(me=(0,l.sQ)(ie.ref,k.containerRef)),(0,S.Tm)(ie,{ref:me})},k}return(0,a.Z)(L,[{key:"componentDidMount",value:function(){this.destroyed=!1;var re=this.containerRef.current;!re||re.nodeType!==1||(this.instance=this.bindAnimationEvent(re))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroyed=!0}},{key:"getAttributeName",value:function(){var re=this.context.getPrefixCls,K=this.props.insertExtraNode;return K?re("")+"-click-animating":re("")+"-click-animating-without-extra-node"}},{key:"resetEffect",value:function(re){var K=this;if(!(!re||re===this.extraNode||!(re instanceof Element))){var ie=this.props.insertExtraNode,me=this.getAttributeName();re.setAttribute(me,"false"),R&&(R.innerHTML=""),ie&&this.extraNode&&re.contains(this.extraNode)&&re.removeChild(this.extraNode),["transition","animation"].forEach(function(Ze){re.removeEventListener(Ze+"start",K.onTransitionStart),re.removeEventListener(Ze+"end",K.onTransitionEnd)})}}},{key:"render",value:function(){return d.createElement(p.C,null,this.renderWave)}}]),L}(d.Component);ce.contextType=p.E_;var xe=(0,d.forwardRef)(function(V,W){return D(),d.createElement(ce,(0,r.Z)({ref:W},V))}),Q=xe},99138:function(f,v,e){"use strict";e.d(v,{Z:function(){return K}});var r=e(87462),t=e(97685),a=e(4942),i=e(89739),o=e(4340),u=e(97937),c=e(21640),l=e(78860),d=e(94184),p=e.n(d),M=e(62874),_=e(67294),y=e(53124),I=e(5467),S=e(96159),A=e(15671),O=e(43144),j=e(60136),F=e(29388),J=function(ie){(0,j.Z)(Ze,ie);var me=(0,F.Z)(Ze);function Ze(){var De;return(0,A.Z)(this,Ze),De=me.apply(this,arguments),De.state={error:void 0,info:{componentStack:""}},De}return(0,O.Z)(Ze,[{key:"componentDidCatch",value:function(Fe,mt){this.setState({error:Fe,info:mt})}},{key:"render",value:function(){var Fe=this.props,mt=Fe.message,ht=Fe.description,xt=Fe.children,Et=this.state,ct=Et.error,jt=Et.info,Tt=jt&&jt.componentStack?jt.componentStack:null,Wt=typeof mt=="undefined"?(ct||"").toString():mt,Bt=typeof ht=="undefined"?Tt:ht;return ct?_.createElement(K,{type:"error",message:Wt,description:_.createElement("pre",null,Bt)}):xt}}]),Ze}(_.Component),D=J,R=e(67968),U=e(45503),ee=e(14747),de=function(me,Ze,De,Fe,mt){return(0,a.Z)({backgroundColor:me,border:Fe.lineWidth+"px "+Fe.lineType+" "+Ze},mt+"-icon",{color:De})},he=function(me){var Ze,De,Fe,mt=me.componentCls,ht=me.motionDurationSlow,xt=me.marginXS,Et=me.marginSM,ct=me.fontSize,jt=me.fontSizeLG,Tt=me.lineHeight,Wt=me.borderRadiusLG,Bt=me.motionEaseInOutCirc,Ht=me.alertIconSizeLG,rr=me.colorText,Sr=me.paddingContentVerticalSM,Ar=me.alertPaddingHorizontal,ye=me.paddingMD,T=me.paddingContentHorizontalLG;return Fe={},(0,a.Z)(Fe,mt,(0,r.Z)((0,r.Z)({},(0,ee.Wf)(me)),(Ze={position:"relative",display:"flex",alignItems:"center",padding:Sr+"px "+Ar+"px",wordWrap:"break-word",borderRadius:Wt,"&&-rtl":{direction:"rtl"}},(0,a.Z)(Ze,mt+"-content",{flex:1,minWidth:0}),(0,a.Z)(Ze,mt+"-icon",{marginInlineEnd:xt,lineHeight:0}),(0,a.Z)(Ze,"&-description",{display:"none",fontSize:ct,lineHeight:Tt}),(0,a.Z)(Ze,"&-message",{color:rr}),(0,a.Z)(Ze,"&&-motion-leave",{overflow:"hidden",opacity:1,transition:"max-height "+ht+" "+Bt+", opacity "+ht+" "+Bt+`, + padding-top `+ht+" "+Bt+", padding-bottom "+ht+" "+Bt+`, + margin-bottom `+ht+" "+Bt}),(0,a.Z)(Ze,"&&-motion-leave-active",{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}),Ze))),(0,a.Z)(Fe,mt+"-with-description",(De={alignItems:"flex-start",paddingInline:T,paddingBlock:ye},(0,a.Z)(De,mt+"-icon",{marginInlineEnd:Et,fontSize:Ht,lineHeight:0}),(0,a.Z)(De,mt+"-message",{display:"block",marginBottom:xt,color:rr,fontSize:jt}),(0,a.Z)(De,mt+"-description",{display:"block"}),De)),(0,a.Z)(Fe,mt+"-banner",{marginBottom:0,border:"0 !important",borderRadius:0}),Fe},ve=function(me){var Ze=me.componentCls,De=me.colorSuccess,Fe=me.colorSuccessBorder,mt=me.colorSuccessBg,ht=me.colorWarning,xt=me.colorWarningBorder,Et=me.colorWarningBg,ct=me.colorError,jt=me.colorErrorBorder,Tt=me.colorErrorBg,Wt=me.colorInfo,Bt=me.colorInfoBorder,Ht=me.colorInfoBg;return(0,a.Z)({},Ze,{"&-success":de(mt,Fe,De,me,Ze),"&-info":de(Ht,Bt,Wt,me,Ze),"&-warning":de(Et,xt,ht,me,Ze),"&-error":(0,r.Z)((0,r.Z)({},de(Tt,jt,ct,me,Ze)),(0,a.Z)({},Ze+"-description > pre",{margin:0,padding:0}))})},ce=function(me){var Ze,De=me.componentCls,Fe=me.iconCls,mt=me.motionDurationMid,ht=me.marginXS,xt=me.fontSizeIcon,Et=me.colorIcon,ct=me.colorIconHover;return(0,a.Z)({},De,(Ze={},(0,a.Z)(Ze,"&-action",{marginInlineStart:ht}),(0,a.Z)(Ze,De+"-close-icon",(0,a.Z)({marginInlineStart:ht,padding:0,overflow:"hidden",fontSize:xt,lineHeight:xt+"px",backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer"},Fe+"-close",{color:Et,transition:"color "+mt,"&:hover":{color:ct}})),(0,a.Z)(Ze,"&-close-text",{color:Et,transition:"color "+mt,"&:hover":{color:ct}}),Ze))},xe=function(me){return[he(me),ve(me),ce(me)]},Q=(0,R.Z)("Alert",function(ie){var me=ie.fontSizeHeading3,Ze=(0,U.TS)(ie,{alertIconSizeLG:me,alertPaddingHorizontal:12});return[xe(Ze)]}),V=function(ie,me){var Ze={};for(var De in ie)Object.prototype.hasOwnProperty.call(ie,De)&&me.indexOf(De)<0&&(Ze[De]=ie[De]);if(ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,De=Object.getOwnPropertySymbols(ie);Fe "+Ze,{margin:0})),q};return(0,t.Z)({},me,(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},(0,j.Wf)(k)),(re={position:"relative",display:"inline-block",overflow:"hidden",color:Fe,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:De,border:Ht+"px "+rr+" transparent"},(0,t.Z)(re,"&-image",{background:"transparent"}),(0,t.Z)(re,ie+"-image-img",{display:"block"}),re)),Sr(mt,Et,Tt)),(K={},(0,t.Z)(K,"&-lg",(0,r.Z)({},Sr(ht,ct,Wt))),(0,t.Z)(K,"&-sm",(0,r.Z)({},Sr(xt,jt,Bt))),(0,t.Z)(K,"> img",{display:"block",width:"100%",height:"100%",objectFit:"cover"}),K)))},J=function(k){var re,K=k.componentCls,ie=k.avatarGroupBorderColor,me=k.avatarGroupOverlapping,Ze=k.avatarGroupSpace;return(0,t.Z)({},K+"-group",(re={display:"inline-flex"},(0,t.Z)(re,""+K,(0,t.Z)({borderColor:ie},"&:not(:first-child)",{marginInlineStart:-me})),(0,t.Z)(re,"&-popover",(0,t.Z)({},K+" + "+K,{marginInlineStart:Ze})),re))},D=(0,A.Z)("Avatar",function(L){var k=L.colorTextLightSolid,re=L.controlHeight,K=L.controlHeightLG,ie=L.controlHeightSM,me=L.fontSize,Ze=L.fontSizeLG,De=L.fontSizeXL,Fe=L.fontSizeHeading3,mt=L.marginXS,ht=L.colorBorderBg,xt=L.colorTextPlaceholder,Et=(0,O.TS)(L,{avatarBg:xt,avatarColor:k,avatarSizeBase:re,avatarSizeLG:K,avatarSizeSM:ie,avatarFontSizeBase:Math.round((Ze+De)/2),avatarFontSizeLG:Fe,avatarFontSizeSM:me,avatarGroupOverlapping:mt,avatarGroupSpace:mt,avatarGroupBorderColor:ht});return[F(Et),J(Et)]}),R=function(L,k){var re={};for(var K in L)Object.prototype.hasOwnProperty.call(L,K)&&k.indexOf(K)<0&&(re[K]=L[K]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,K=Object.getOwnPropertySymbols(L);ie span, > "+Le,{"&:not(:last-child)":(0,t.Z)({},"&, & > "+Le,{"&:not(:disabled)":{borderInlineEndColor:ze}}),"&:not(:first-child)":(0,t.Z)({},"&, & > "+Le,{"&:not(:disabled)":{borderInlineStartColor:ze}})})},Q=function(Le){var ze,_e,ue=Le.componentCls,Ye=Le.fontSize,Ve=Le.lineWidth,Je=Le.colorPrimaryHover,it=Le.colorErrorHover;return(0,t.Z)({},ue+"-group",[(_e={position:"relative",display:"inline-flex"},(0,t.Z)(_e,"> span, > "+ue,{"&:not(:last-child)":(0,t.Z)({},"&, & > "+ue,{borderStartEndRadius:0,borderEndEndRadius:0}),"&:not(:first-child)":(0,t.Z)({marginInlineStart:-Ve},"&, & > "+ue,{borderStartStartRadius:0,borderEndStartRadius:0})}),(0,t.Z)(_e,ue,(ze={position:"relative",zIndex:1},(0,t.Z)(ze,`&:hover, + &:focus, + &:active`,{zIndex:2}),(0,t.Z)(ze,"&[disabled]",{zIndex:0}),ze)),(0,t.Z)(_e,ue+"-icon-only",{fontSize:Ye}),_e),xe(ue+"-primary",Je),xe(ue+"-danger",it)])},V=Q,W=e(14747),L=e(80110);function k($e){return{"&-item:not(&-last-item)":{marginBottom:-$e.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function re($e){return{"&-item:not(&-first-item):not(&-last-item)":{borderRadius:0},"&-item&-first-item:not(&-last-item)":(0,t.Z)({},"&, &"+$e+"-sm, &"+$e+"-lg",{borderEndEndRadius:0,borderEndStartRadius:0}),"&-item&-last-item:not(&-first-item)":(0,t.Z)({},"&, &"+$e+"-sm, &"+$e+"-lg",{borderStartStartRadius:0,borderStartEndRadius:0})}}function K($e,Le){return{"&-compact-vertical":(0,r.Z)((0,r.Z)({},k($e)),re(Le))}}var ie=function(Le){var ze,_e,ue=Le.componentCls,Ye=Le.iconCls;return(0,t.Z)({},ue,(0,r.Z)((0,r.Z)((0,r.Z)((ze={outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:Le.lineWidth+"px "+Le.lineType+" transparent",cursor:"pointer",transition:"all "+Le.motionDurationMid+" "+Le.motionEaseInOut,userSelect:"none",touchAction:"manipulation",lineHeight:Le.lineHeight,color:Le.colorText,"> span":{display:"inline-block"}},(0,t.Z)(ze,"> "+Ye+" + span, > span + "+Ye,{marginInlineStart:Le.marginXS}),(0,t.Z)(ze,"&:not(:disabled)",(0,r.Z)({},(0,W.Qy)(Le))),ze),(0,L.c)(Le,ue,{focus:!1})),K(Le,ue)),(_e={"&-icon-only&-compact-item":{flex:"none"}},(0,t.Z)(_e,"&-compact-item"+ue+"-primary",{"&:not([disabled]) + &:not([disabled])":{position:"relative","&:before":{position:"absolute",top:-Le.lineWidth,insetInlineStart:-Le.lineWidth,display:"inline-block",width:Le.lineWidth,height:"calc(100% + "+Le.lineWidth*2+"px)",backgroundColor:Le.colorPrimaryHover,content:'""'}}}),(0,t.Z)(_e,"&-compact-vertical-item",(0,t.Z)({},"&"+ue+"-primary",{"&:not([disabled]) + &:not([disabled])":{position:"relative","&:before":{position:"absolute",top:-Le.lineWidth,insetInlineStart:-Le.lineWidth,display:"inline-block",width:"calc(100% + "+Le.lineWidth*2+"px)",height:Le.lineWidth,backgroundColor:Le.colorPrimaryHover,content:'""'}}})),_e)))},me=function(Le,ze){return{"&:not(:disabled)":{"&:hover":Le,"&:active":ze}}},Ze=function(Le){return{minWidth:Le.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}},De=function(Le){return{borderRadius:Le.controlHeight,paddingInlineStart:Le.controlHeight/2,paddingInlineEnd:Le.controlHeight/2,width:"auto"}},Fe=function(Le,ze,_e,ue,Ye,Ve,Je){return(0,t.Z)({},"&"+Le+"-background-ghost",(0,r.Z)((0,r.Z)({color:ze||void 0,backgroundColor:"transparent",borderColor:_e||void 0,boxShadow:"none"},me((0,r.Z)({backgroundColor:"transparent"},Ve),(0,r.Z)({backgroundColor:"transparent"},Je))),{"&:disabled":{cursor:"not-allowed",color:ue||void 0,borderColor:Ye||void 0}}))},mt=function(Le){return{"&:disabled":{cursor:"not-allowed",borderColor:Le.colorBorder,color:Le.colorTextDisabled,backgroundColor:Le.colorBgContainerDisabled,boxShadow:"none"}}},ht=function(Le){return(0,r.Z)({},mt(Le))},xt=function(Le){return{"&:disabled":{cursor:"not-allowed",color:Le.colorTextDisabled}}},Et=function(Le){return(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},ht(Le)),{backgroundColor:Le.colorBgContainer,borderColor:Le.colorBorder,boxShadow:"0 "+Le.controlOutlineWidth+"px 0 "+Le.controlTmpOutline}),me({color:Le.colorPrimaryHover,borderColor:Le.colorPrimaryHover},{color:Le.colorPrimaryActive,borderColor:Le.colorPrimaryActive})),Fe(Le.componentCls,Le.colorBgContainer,Le.colorBgContainer,Le.colorTextDisabled,Le.colorBorder)),(0,t.Z)({},"&"+Le.componentCls+"-dangerous",(0,r.Z)((0,r.Z)((0,r.Z)({color:Le.colorError,borderColor:Le.colorError},me({color:Le.colorErrorHover,borderColor:Le.colorErrorBorderHover},{color:Le.colorErrorActive,borderColor:Le.colorErrorActive})),Fe(Le.componentCls,Le.colorError,Le.colorError,Le.colorTextDisabled,Le.colorBorder)),mt(Le))))},ct=function(Le){return(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},ht(Le)),{color:Le.colorTextLightSolid,backgroundColor:Le.colorPrimary,boxShadow:"0 "+Le.controlOutlineWidth+"px 0 "+Le.controlOutline}),me({color:Le.colorTextLightSolid,backgroundColor:Le.colorPrimaryHover},{color:Le.colorTextLightSolid,backgroundColor:Le.colorPrimaryActive})),Fe(Le.componentCls,Le.colorPrimary,Le.colorPrimary,Le.colorTextDisabled,Le.colorBorder,{color:Le.colorPrimaryHover,borderColor:Le.colorPrimaryHover},{color:Le.colorPrimaryActive,borderColor:Le.colorPrimaryActive})),(0,t.Z)({},"&"+Le.componentCls+"-dangerous",(0,r.Z)((0,r.Z)((0,r.Z)({backgroundColor:Le.colorError,boxShadow:"0 "+Le.controlOutlineWidth+"px 0 "+Le.colorErrorOutline},me({backgroundColor:Le.colorErrorHover},{backgroundColor:Le.colorErrorActive})),Fe(Le.componentCls,Le.colorError,Le.colorError,Le.colorTextDisabled,Le.colorBorder,{color:Le.colorErrorHover,borderColor:Le.colorErrorHover},{color:Le.colorErrorActive,borderColor:Le.colorErrorActive})),mt(Le))))},jt=function(Le){return(0,r.Z)((0,r.Z)({},Et(Le)),{borderStyle:"dashed"})},Tt=function(Le){return(0,r.Z)((0,r.Z)((0,r.Z)({color:Le.colorLink},me({color:Le.colorLinkHover},{color:Le.colorLinkActive})),xt(Le)),(0,t.Z)({},"&"+Le.componentCls+"-dangerous",(0,r.Z)((0,r.Z)({color:Le.colorError},me({color:Le.colorErrorHover},{color:Le.colorErrorActive})),xt(Le))))},Wt=function(Le){return(0,r.Z)((0,r.Z)((0,r.Z)({},me({color:Le.colorText,backgroundColor:Le.colorBgTextHover},{color:Le.colorText,backgroundColor:Le.colorBgTextActive})),xt(Le)),(0,t.Z)({},"&"+Le.componentCls+"-dangerous",(0,r.Z)((0,r.Z)({color:Le.colorError},xt(Le)),me({color:Le.colorErrorHover,backgroundColor:Le.colorErrorBg},{color:Le.colorErrorHover,backgroundColor:Le.colorErrorBg}))))},Bt=function(Le){var ze,_e=Le.componentCls;return ze={},(0,t.Z)(ze,_e+"-default",Et(Le)),(0,t.Z)(ze,_e+"-primary",ct(Le)),(0,t.Z)(ze,_e+"-dashed",jt(Le)),(0,t.Z)(ze,_e+"-link",Tt(Le)),(0,t.Z)(ze,_e+"-text",Wt(Le)),ze},Ht=function(Le){var ze,_e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",ue=Le.componentCls,Ye=Le.iconCls,Ve=Math.max(0,(Le.controlHeight-Le.fontSize*Le.lineHeight)/2-Le.lineWidth),Je=Le.buttonPaddingHorizontal-Le.lineWidth,it=ue+"-icon-only";return[(0,t.Z)({},""+ue+_e,(ze={fontSize:Le.fontSize,height:Le.controlHeight,padding:Ve+"px "+Je+"px",borderRadius:Le.borderRadius},(0,t.Z)(ze,"&"+it,{width:Le.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,"> span":{transform:"scale(1.143)"}}),(0,t.Z)(ze,"&"+ue+"-loading",{opacity:Le.opacityLoading,cursor:"default"}),(0,t.Z)(ze,ue+"-loading-icon",{transition:"width "+Le.motionDurationSlow+" "+Le.motionEaseInOut+", opacity "+Le.motionDurationSlow+" "+Le.motionEaseInOut}),(0,t.Z)(ze,"&:not("+it+") "+ue+"-loading-icon > "+Ye,{marginInlineEnd:Le.marginXS}),ze)),(0,t.Z)({},""+ue+ue+"-circle"+_e,Ze(Le)),(0,t.Z)({},""+ue+ue+"-round"+_e,De(Le))]},rr=function(Le){return Ht(Le)},Sr=function(Le){var ze=(0,ve.TS)(Le,{controlHeight:Le.controlHeightSM,padding:Le.paddingXS,buttonPaddingHorizontal:8,borderRadius:Le.borderRadiusSM});return Ht(ze,Le.componentCls+"-sm")},Ar=function(Le){var ze=(0,ve.TS)(Le,{controlHeight:Le.controlHeightLG,fontSize:Le.fontSizeLG,borderRadius:Le.borderRadiusLG});return Ht(ze,Le.componentCls+"-lg")},ye=function(Le){var ze=Le.componentCls;return(0,t.Z)({},ze,(0,t.Z)({},"&"+ze+"-block",{width:"100%"}))},T=(0,ce.Z)("Button",function($e){var Le=$e.controlTmpOutline,ze=$e.paddingContentHorizontal,_e=(0,ve.TS)($e,{colorOutlineDefault:Le,buttonPaddingHorizontal:ze});return[ie(_e),Sr(_e),rr(_e),Ar(_e),ye(_e),Bt(_e),V(_e)]}),b=function($e,Le){var ze={};for(var _e in $e)Object.prototype.hasOwnProperty.call($e,_e)&&Le.indexOf(_e)<0&&(ze[_e]=$e[_e]);if($e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,_e=Object.getOwnPropertySymbols($e);ue<_e.length;ue++)Le.indexOf(_e[ue])<0&&Object.prototype.propertyIsEnumerable.call($e,_e[ue])&&(ze[_e[ue]]=$e[_e[ue]]);return ze},q=/^[\u4e00-\u9fa5]{2}$/,Ce=q.test.bind(q);function le($e){return typeof $e=="string"}function fe($e){return $e==="text"||$e==="link"}function pe($e,Le){if($e!=null){var ze=Le?" ":"";return typeof $e!="string"&&typeof $e!="number"&&le($e.type)&&Ce($e.props.children)?(0,y.Tm)($e,{children:$e.props.children.split("").join(ze)}):typeof $e=="string"?Ce($e)?l.createElement("span",null,$e.split("").join(ze)):l.createElement("span",null,$e):(0,y.M2)($e)?l.createElement("span",null,$e):$e}}function Re($e,Le){var ze=!1,_e=[];return l.Children.forEach($e,function(ue){var Ye=(0,i.Z)(ue),Ve=Ye==="string"||Ye==="number";if(ze&&Ve){var Je=_e.length-1,it=_e[Je];_e[Je]=""+it+ue}else _e.push(ue);ze=Ve}),l.Children.map(_e,function(ue){return pe(ue,Le)})}var X=(0,I.b)("default","primary","ghost","dashed","link","text"),je=(0,I.b)("default","circle","round"),He=(0,I.b)("submit","button","reset");function tt($e){return $e==="danger"?{danger:!0}:{type:$e}}var We=function(Le,ze){var _e,ue=Le.loading,Ye=ue===void 0?!1:ue,Ve=Le.prefixCls,Je=Le.type,it=Je===void 0?"default":Je,Te=Le.danger,Pe=Le.shape,nt=Pe===void 0?"default":Pe,pt=Le.size,yt=Le.disabled,wt=Le.className,ot=Le.children,St=Le.icon,dt=Le.ghost,Rt=dt===void 0?!1:dt,Ct=Le.block,Ut=Ct===void 0?!1:Ct,cr=Le.htmlType,ir=cr===void 0?"button":cr,Rr=b(Le,["loading","prefixCls","type","danger","shape","size","disabled","className","children","icon","ghost","block","htmlType"]),dr=l.useContext(d.E_),wr=dr.getPrefixCls,Vr=dr.autoInsertSpaceInButton,Qr=dr.direction,Pr=wr("btn",Ve),nn=T(Pr),qr=(0,a.Z)(nn,2),fn=qr[0],Zn=qr[1],Gn=l.useContext(M.Z),Rn=l.useContext(p.Z),mn=yt!=null?yt:Rn,xn=l.useContext(j),en=l.useState(!!Ye),Wn=(0,a.Z)(en,2),Un=Wn[0],Kn=Wn[1],mr=l.useState(!1),Kt=(0,a.Z)(mr,2),sr=Kt[0],Mr=Kt[1],_t=ze||l.createRef(),Zt=function(){return l.Children.count(ot)===1&&!St&&!fe(it)},Dt=function(){if(!(!_t||!_t.current||Vr===!1)){var ea=_t.current.textContent;Zt()&&Ce(ea)?sr||Mr(!0):sr&&Mr(!1)}},ur=typeof Ye=="boolean"?Ye:(Ye==null?void 0:Ye.delay)||!0;l.useEffect(function(){var Ur=null;return typeof ur=="number"?Ur=window.setTimeout(function(){Ur=null,Kn(ur)},ur):Kn(ur),function(){Ur&&(window.clearTimeout(Ur),Ur=null)}},[ur]),l.useEffect(Dt,[_t]);var $t=function(ea){var ca=Le.onClick;if(Un||mn){ea.preventDefault();return}ca==null||ca(ea)},_r=Vr!==!1,pr=(0,_.ri)(Pr,Qr),Fr=pr.compactSize,gn=pr.compactItemClassnames,cn={large:"lg",small:"sm",middle:void 0},yn=Fr||xn||pt||Gn,dn=yn&&cn[yn]||"",Yn=Un?"loading":St,Dn=(0,c.Z)(Rr,["navigate"]),sn=u()(Pr,Zn,(_e={},(0,t.Z)(_e,Pr+"-"+nt,nt!=="default"&&nt),(0,t.Z)(_e,Pr+"-"+it,it),(0,t.Z)(_e,Pr+"-"+dn,dn),(0,t.Z)(_e,Pr+"-icon-only",!ot&&ot!==0&&!!Yn),(0,t.Z)(_e,Pr+"-background-ghost",Rt&&!fe(it)),(0,t.Z)(_e,Pr+"-loading",Un),(0,t.Z)(_e,Pr+"-two-chinese-chars",sr&&_r&&!Un),(0,t.Z)(_e,Pr+"-block",Ut),(0,t.Z)(_e,Pr+"-dangerous",!!Te),(0,t.Z)(_e,Pr+"-rtl",Qr==="rtl"),(0,t.Z)(_e,Pr+"-disabled",Dn.href!==void 0&&mn),_e),gn,wt),ln=St&&!Un?St:l.createElement(he,{existIcon:!!St,prefixCls:Pr,loading:!!Un}),_n=ot||ot===0?Re(ot,Zt()&&_r):null;if(Dn.href!==void 0)return fn(l.createElement("a",(0,r.Z)({},Dn,{className:sn,onClick:$t,ref:_t}),ln,_n));var Mn=l.createElement("button",(0,r.Z)({},Rr,{type:ir,className:sn,onClick:$t,disabled:mn,ref:_t}),ln,_n);return fe(it)||(Mn=l.createElement(S.Z,{disabled:!!Un},Mn)),fn(Mn)},Ue=l.forwardRef(We);Ue.Group=J,Ue.__ANT_BUTTON=!0;var Ie=Ue},71577:function(f,v,e){"use strict";var r=e(5214);v.Z=r.Z},98866:function(f,v,e){"use strict";e.d(v,{n:function(){return a}});var r=e(67294),t=r.createContext(!1),a=function(o){var u=o.children,c=o.disabled,l=r.useContext(t);return r.createElement(t.Provider,{value:c!=null?c:l},u)};v.Z=t},97647:function(f,v,e){"use strict";e.d(v,{q:function(){return a}});var r=e(67294),t=r.createContext(void 0),a=function(o){var u=o.children,c=o.size;return r.createElement(t.Consumer,null,function(l){return r.createElement(t.Provider,{value:c||l},u)})};v.Z=t},53124:function(f,v,e){"use strict";e.d(v,{C:function(){return u},E_:function(){return o},PG:function(){return c},oR:function(){return a}});var r=e(87462),t=e(67294),a="anticon",i=function(d,p){return p||(d?"ant-"+d:"ant")},o=t.createContext({getPrefixCls:i,iconPrefixCls:a}),u=o.Consumer;function c(l){return function(p){var M=function(S){return t.createElement(u,null,function(A){var O=l.prefixCls,j=A.getPrefixCls,F=S.prefixCls,J=j(O,F);return t.createElement(p,(0,r.Z)({},A,S,{prefixCls:J}))})},_=p.constructor,y=_&&_.displayName||p.name||"Component";return M}}},46986:function(f,v,e){"use strict";e.d(v,{ZP:function(){return ct},w6:function(){return ht}});var r=e(87462),t=e(66981),a=e(63017),i=e(71990),o=e(56982),u=e(67294),c=e(83008),l=e(67178),d="internalMark",p=function(Tt){var Wt=Tt.locale,Bt=Wt===void 0?{}:Wt,Ht=Tt.children,rr=Tt._ANT_MARK__;u.useEffect(function(){return(0,c.f)(Bt&&Bt.Modal),function(){(0,c.f)()}},[Bt]);var Sr=u.useMemo(function(){return(0,r.Z)((0,r.Z)({},Bt),{exist:!0})},[Bt]);return u.createElement(l.Z.Provider,{value:Sr},Ht)},M=p,_=e(77667),y=e(24457),I=e(64049),S=e(2790),A=e(53124),O=e(92138),j=e(10274),F=e(98924),J=e(44958),D="-ant-"+Date.now()+"-"+Math.random();function R(jt,Tt){var Wt={},Bt=function(b,q){var Ce=b.clone();return Ce=(q==null?void 0:q(Ce))||Ce,Ce.toRgbString()},Ht=function(b,q){var Ce=new j.C(b),le=(0,O.generate)(Ce.toRgbString());Wt[q+"-color"]=Bt(Ce),Wt[q+"-color-disabled"]=le[1],Wt[q+"-color-hover"]=le[4],Wt[q+"-color-active"]=le[6],Wt[q+"-color-outline"]=Ce.clone().setAlpha(.2).toRgbString(),Wt[q+"-color-deprecated-bg"]=le[0],Wt[q+"-color-deprecated-border"]=le[2]};if(Tt.primaryColor){Ht(Tt.primaryColor,"primary");var rr=new j.C(Tt.primaryColor),Sr=(0,O.generate)(rr.toRgbString());Sr.forEach(function(T,b){Wt["primary-"+(b+1)]=T}),Wt["primary-color-deprecated-l-35"]=Bt(rr,function(T){return T.lighten(35)}),Wt["primary-color-deprecated-l-20"]=Bt(rr,function(T){return T.lighten(20)}),Wt["primary-color-deprecated-t-20"]=Bt(rr,function(T){return T.tint(20)}),Wt["primary-color-deprecated-t-50"]=Bt(rr,function(T){return T.tint(50)}),Wt["primary-color-deprecated-f-12"]=Bt(rr,function(T){return T.setAlpha(T.getAlpha()*.12)});var Ar=new j.C(Sr[0]);Wt["primary-color-active-deprecated-f-30"]=Bt(Ar,function(T){return T.setAlpha(T.getAlpha()*.3)}),Wt["primary-color-active-deprecated-d-02"]=Bt(Ar,function(T){return T.darken(2)})}Tt.successColor&&Ht(Tt.successColor,"success"),Tt.warningColor&&Ht(Tt.warningColor,"warning"),Tt.errorColor&&Ht(Tt.errorColor,"error"),Tt.infoColor&&Ht(Tt.infoColor,"info");var ye=Object.keys(Wt).map(function(T){return"--"+jt+"-"+T+": "+Wt[T]+";"});return(` + :root { + `+ye.join(` +`)+` + } + `).trim()}function U(jt,Tt){var Wt=R(jt,Tt);(0,F.Z)()&&(0,J.hq)(Wt,D+"-dynamic-theme")}var ee=e(98866),de=e(96774),he=e.n(de);function ve(jt,Tt){var Wt=jt||{},Bt=Wt.inherit===!1||!Tt?I.u_:Tt,Ht=(0,o.Z)(function(){if(!jt)return Tt;var rr=(0,r.Z)({},Bt.components);return Object.keys(jt.components||{}).forEach(function(Sr){rr[Sr]=(0,r.Z)((0,r.Z)({},rr[Sr]),jt.components[Sr])}),(0,r.Z)((0,r.Z)((0,r.Z)({},Bt),Wt),{token:(0,r.Z)((0,r.Z)({},Bt.token),Wt.token),components:rr})},[Wt,Bt],function(rr,Sr){return rr.some(function(Ar,ye){var T=Sr[ye];return!he()(Ar,T)})});return Ht}var ce=e(97647),xe=e(4942),Q=e(97685),V=e(14747),W=function(Tt){var Wt=(0,I.dQ)(),Bt=(0,Q.Z)(Wt,2),Ht=Bt[0],rr=Bt[1];return(0,t.xy)({theme:Ht,token:rr,hashId:"",path:["ant-design-icons",Tt]},function(){return[(0,xe.Z)({},"."+Tt,(0,V.Ro)())]})},L=W,k=function(jt,Tt){var Wt={};for(var Bt in jt)Object.prototype.hasOwnProperty.call(jt,Bt)&&Tt.indexOf(Bt)<0&&(Wt[Bt]=jt[Bt]);if(jt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ht=0,Bt=Object.getOwnPropertySymbols(jt);Ht0&&(ue=u.createElement(i.RV,{validateMessages:Ye},Ht)),ye&&(ue=u.createElement(M,{locale:ye,_ANT_MARK__:d},ue)),(tt||Ue)&&(ue=u.createElement(a.Z.Provider,{value:_e},ue)),T&&(ue=u.createElement(ce.q,{size:T},ue));var Ve=u.useMemo(function(){var Je=$e||{},it=Je.algorithm,Te=Je.token,Pe=k(Je,["algorithm","token"]),nt=it&&(!Array.isArray(it)||it.length>0)?(0,t.jG)(it):void 0;return(0,r.Z)((0,r.Z)({},Pe),{theme:nt,token:(0,r.Z)((0,r.Z)({},S.Z),Te)})},[$e]);return X&&(ue=u.createElement(I.Mj.Provider,{value:Ve},ue)),je!==void 0&&(ue=u.createElement(ee.n,{disabled:je},ue)),u.createElement(A.E_.Provider,{value:ze},ue)},Et=function(Tt){return u.createElement(_.Z,null,function(Wt,Bt,Ht){return u.createElement(A.C,null,function(rr){return u.createElement(xt,(0,r.Z)({parentContext:rr,legacyLocale:Ht},Tt))})})};Et.ConfigContext=A.E_,Et.SizeContext=ce.Z,Et.config=mt;var ct=Et},87206:function(f,v,e){"use strict";e.d(v,{Z:function(){return u}});var r=e(87462),t={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},a=t,i=e(42115),o={lang:(0,r.Z)({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},a),timePickerLocale:(0,r.Z)({},i.Z)},u=o},42409:function(f,v,e){"use strict";e.d(v,{Z:function(){return xt}});var r=e(87462),t=e(71002),a=e(4942),i=e(97685),o=e(18073),u=e(94184),c=e.n(u),l=e(60057),d=e(66680),p=e(21770),M=e(67294),_=e(68508),y=e(53124),I=e(76529),S=e(8745),A=e(80636),O=e(96159),j=e(93355),F=e(4173),J=e(89705),D=e(71577),R=e(26713),U=e(97414),ee=e(67771),de=e(33297),he=e(50438),ve=e(67968),ce=e(45503),xe=function(ct){var jt,Tt=ct.componentCls,Wt=ct.antCls,Bt=ct.paddingXS,Ht=ct.opacityLoading;return(0,a.Z)({},Tt+"-button",(0,a.Z)({whiteSpace:"nowrap"},"&"+Wt+"-btn-group > "+Wt+"-btn",(jt={},(0,a.Z)(jt,"&-loading, &-loading + "+Wt+"-btn",{cursor:"default",pointerEvents:"none",opacity:Ht}),(0,a.Z)(jt,"&:last-child:not(:first-child):not("+Wt+"-btn-icon-only)",{paddingInline:Bt}),jt)))},Q=xe,V=function(ct){var jt=ct.componentCls,Tt=ct.menuCls,Wt=ct.colorError,Bt=ct.colorTextLightSolid,Ht=Tt+"-item";return(0,a.Z)({},jt+", "+jt+"-menu-submenu",(0,a.Z)({},Tt+" "+Ht,(0,a.Z)({},"&"+Ht+"-danger",{color:Wt,"&:hover":{color:Bt,backgroundColor:Wt}})))},W=V,L=e(14747),k=e(79511),re=function(ct){var jt,Tt,Wt,Bt,Ht=ct.componentCls,rr=ct.menuCls,Sr=ct.zIndexPopup,Ar=ct.dropdownArrowDistance,ye=ct.dropdownArrowOffset,T=ct.sizePopupArrow,b=ct.antCls,q=ct.iconCls,Ce=ct.motionDurationMid,le=ct.dropdownPaddingVertical,fe=ct.fontSize,pe=ct.dropdownEdgeChildPadding,Re=ct.borderRadius,X=ct.colorTextDisabled,je=ct.fontSizeIcon,He=ct.controlPaddingHorizontal,tt=ct.colorBgElevated,We=ct.boxShadowPopoverArrow;return[(0,a.Z)({},Ht,(0,r.Z)((0,r.Z)({},(0,L.Wf)(ct)),(Tt={position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Sr,display:"block","&::before":{position:"absolute",insetBlock:-Ar+T/2,zIndex:-9999,opacity:1e-4,content:'""'}},(0,a.Z)(Tt,Ht+"-wrap",(jt={position:"relative"},(0,a.Z)(jt,b+"-btn > "+q+"-down",{fontSize:je}),(0,a.Z)(jt,q+"-down::before",{transition:"transform "+Ce}),jt)),(0,a.Z)(Tt,Ht+"-wrap-open",(0,a.Z)({},q+"-down::before",{transform:"rotate(180deg)"})),(0,a.Z)(Tt,` + &-hidden, + &-menu-hidden, + &-menu-submenu-hidden + `,{display:"none"}),(0,a.Z)(Tt,` + &-show-arrow&-placement-topLeft, + &-show-arrow&-placement-top, + &-show-arrow&-placement-topRight + `,{paddingBottom:Ar}),(0,a.Z)(Tt,` + &-show-arrow&-placement-bottomLeft, + &-show-arrow&-placement-bottom, + &-show-arrow&-placement-bottomRight + `,{paddingTop:Ar}),(0,a.Z)(Tt,Ht+"-arrow",(0,r.Z)({position:"absolute",zIndex:1,display:"block"},(0,k.r)(T,ct.borderRadiusXS,ct.borderRadiusOuter,tt,We))),(0,a.Z)(Tt,` + &-placement-top > `+Ht+`-arrow, + &-placement-topLeft > `+Ht+`-arrow, + &-placement-topRight > `+Ht+`-arrow + `,{bottom:Ar,transform:"translateY(100%) rotate(180deg)"}),(0,a.Z)(Tt,"&-placement-top > "+Ht+"-arrow",{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"}),(0,a.Z)(Tt,"&-placement-topLeft > "+Ht+"-arrow",{left:{_skip_check_:!0,value:ye}}),(0,a.Z)(Tt,"&-placement-topRight > "+Ht+"-arrow",{right:{_skip_check_:!0,value:ye}}),(0,a.Z)(Tt,` + &-placement-bottom > `+Ht+`-arrow, + &-placement-bottomLeft > `+Ht+`-arrow, + &-placement-bottomRight > `+Ht+`-arrow + `,{top:Ar,transform:"translateY(-100%)"}),(0,a.Z)(Tt,"&-placement-bottom > "+Ht+"-arrow",{left:{_skip_check_:!0,value:"50%"},transform:"translateY(-100%) translateX(-50%)"}),(0,a.Z)(Tt,"&-placement-bottomLeft > "+Ht+"-arrow",{left:{_skip_check_:!0,value:ye}}),(0,a.Z)(Tt,"&-placement-bottomRight > "+Ht+"-arrow",{right:{_skip_check_:!0,value:ye}}),(0,a.Z)(Tt,"&"+b+"-slide-down-enter"+b+`-slide-down-enter-active&-placement-bottomLeft, + &`+b+"-slide-down-appear"+b+`-slide-down-appear-active&-placement-bottomLeft + &`+b+"-slide-down-enter"+b+`-slide-down-enter-active&-placement-bottom, + &`+b+"-slide-down-appear"+b+`-slide-down-appear-active&-placement-bottom, + &`+b+"-slide-down-enter"+b+`-slide-down-enter-active&-placement-bottomRight, + &`+b+"-slide-down-appear"+b+"-slide-down-appear-active&-placement-bottomRight",{animationName:ee.fJ}),(0,a.Z)(Tt,"&"+b+"-slide-up-enter"+b+`-slide-up-enter-active&-placement-topLeft, + &`+b+"-slide-up-appear"+b+`-slide-up-appear-active&-placement-topLeft, + &`+b+"-slide-up-enter"+b+`-slide-up-enter-active&-placement-top, + &`+b+"-slide-up-appear"+b+`-slide-up-appear-active&-placement-top, + &`+b+"-slide-up-enter"+b+`-slide-up-enter-active&-placement-topRight, + &`+b+"-slide-up-appear"+b+"-slide-up-appear-active&-placement-topRight",{animationName:ee.Qt}),(0,a.Z)(Tt,"&"+b+"-slide-down-leave"+b+`-slide-down-leave-active&-placement-bottomLeft, + &`+b+"-slide-down-leave"+b+`-slide-down-leave-active&-placement-bottom, + &`+b+"-slide-down-leave"+b+"-slide-down-leave-active&-placement-bottomRight",{animationName:ee.Uw}),(0,a.Z)(Tt,"&"+b+"-slide-up-leave"+b+`-slide-up-leave-active&-placement-topLeft, + &`+b+"-slide-up-leave"+b+`-slide-up-leave-active&-placement-top, + &`+b+"-slide-up-leave"+b+"-slide-up-leave-active&-placement-topRight",{animationName:ee.ly}),Tt))),(Bt={},(0,a.Z)(Bt,Ht+" "+rr,{position:"relative",margin:0}),(0,a.Z)(Bt,rr+"-submenu-popup",{position:"absolute",zIndex:Sr,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul,li":{listStyle:"none"},ul:{marginInline:"0.3em"}}),(0,a.Z)(Bt,Ht+", "+Ht+"-menu-submenu",(0,a.Z)({},rr,(0,r.Z)((0,r.Z)({padding:pe,listStyleType:"none",backgroundColor:tt,backgroundClip:"padding-box",borderRadius:ct.borderRadiusLG,outline:"none",boxShadow:ct.boxShadowSecondary},(0,L.Qy)(ct)),(Wt={},(0,a.Z)(Wt,rr+"-item-group-title",{padding:le+"px "+He+"px",color:ct.colorTextDescription,transition:"all "+Ce}),(0,a.Z)(Wt,rr+"-item",{position:"relative",display:"flex",alignItems:"center",borderRadius:ct.borderRadiusSM}),(0,a.Z)(Wt,rr+"-item-icon",{minWidth:fe,marginInlineEnd:ct.marginXS,fontSize:ct.fontSizeSM}),(0,a.Z)(Wt,rr+"-title-content",{flex:"auto","> a":{color:"inherit",transition:"all "+Ce,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}}),(0,a.Z)(Wt,rr+"-item, "+rr+"-submenu-title",(0,r.Z)((0,r.Z)((0,a.Z)({clear:"both",margin:0,padding:le+"px "+He+"px",color:ct.colorText,fontWeight:"normal",fontSize:fe,lineHeight:ct.lineHeight,cursor:"pointer",transition:"all "+Ce,"&:first-child":pe?[]:{borderRadius:Re+"px "+Re+"px 0 0"},"&:last-child":pe?[]:{borderRadius:"0 0 "+Re+"px "+Re+"px"}},"&:hover, &-active",{backgroundColor:ct.controlItemBgHover}),(0,L.Qy)(ct)),(0,a.Z)({"&-selected":{color:ct.colorPrimary,backgroundColor:ct.controlItemBgActive,"&:hover, &-active":{backgroundColor:ct.controlItemBgActiveHover}},"&-disabled":{color:X,cursor:"not-allowed","&:hover":{color:X,backgroundColor:tt,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:ct.marginXXS+"px 0",overflow:"hidden",lineHeight:0,backgroundColor:ct.colorSplit}},Ht+"-menu-submenu-expand-icon",(0,a.Z)({position:"absolute",insetInlineEnd:ct.paddingXS},Ht+"-menu-submenu-arrow-icon",{marginInlineEnd:"0 !important",color:ct.colorTextDescription,fontSize:je,fontStyle:"normal"})))),(0,a.Z)(Wt,rr+"-item-group-list",{margin:"0 "+ct.marginXS+"px",padding:0,listStyle:"none"}),(0,a.Z)(Wt,rr+"-submenu-title",{paddingInlineEnd:He+ct.fontSizeSM}),(0,a.Z)(Wt,rr+"-submenu-vertical",{position:"relative"}),(0,a.Z)(Wt,rr+"-submenu"+rr+"-submenu-disabled "+Ht+"-menu-submenu-title",(0,a.Z)({},"&, "+Ht+"-menu-submenu-arrow-icon",{color:X,backgroundColor:tt,cursor:"not-allowed"})),(0,a.Z)(Wt,rr+"-submenu-selected "+Ht+"-menu-submenu-title",{color:ct.colorPrimary}),Wt)))),Bt),[(0,ee.oN)(ct,"slide-up"),(0,ee.oN)(ct,"slide-down"),(0,de.Fm)(ct,"move-up"),(0,de.Fm)(ct,"move-down"),(0,he._y)(ct,"zoom-big")]]},K=(0,ve.Z)("Dropdown",function(Et,ct){var jt=ct.rootPrefixCls,Tt=Et.marginXXS,Wt=Et.sizePopupArrow,Bt=Et.controlHeight,Ht=Et.fontSize,rr=Et.lineHeight,Sr=Et.paddingXXS,Ar=Et.componentCls,ye=Et.borderRadiusOuter,T=Et.borderRadiusLG,b=(Bt-Ht*rr)/2,q=(0,U.fS)({sizePopupArrow:Wt,contentRadius:T,borderRadiusOuter:ye}),Ce=q.dropdownArrowOffset,le=(0,ce.TS)(Et,{menuCls:Ar+"-menu",rootPrefixCls:jt,dropdownArrowDistance:Wt/2+Tt,dropdownArrowOffset:Ce,dropdownPaddingVertical:b,dropdownEdgeChildPadding:Sr});return[re(le),Q(le),W(le)]},function(Et){return{zIndexPopup:Et.zIndexPopupBase+50}}),ie=function(Et,ct){var jt={};for(var Tt in Et)Object.prototype.hasOwnProperty.call(Et,Tt)&&ct.indexOf(Tt)<0&&(jt[Tt]=Et[Tt]);if(Et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Wt=0,Tt=Object.getOwnPropertySymbols(Et);Wt0&&arguments[0]!==void 0?arguments[0]:!0,u=(0,r.useRef)({}),c=(0,t.Z)();return(0,r.useEffect)(function(){var l=a.ZP.subscribe(function(d){u.current=d,o&&c()});return function(){return a.ZP.unsubscribe(l)}},[]),u.current}v.Z=i},7293:function(f,v,e){"use strict";e.d(v,{D:function(){return R},Z:function(){return de}});var r=e(4942),t=e(87462),a=e(97685),i=e(1413),o=e(67294),u={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},c=u,l=e(84089),d=function(ve,ce){return o.createElement(l.Z,(0,i.Z)((0,i.Z)({},ve),{},{ref:ce,icon:c}))};d.displayName="BarsOutlined";var p=o.forwardRef(d),M=e(6171),_=e(18073),y=e(94184),I=e.n(y),S=e(98423),A=e(53124),O=function(ve){return!isNaN(parseFloat(ve))&&isFinite(ve)},j=O,F=e(84321),J=function(he,ve){var ce={};for(var xe in he)Object.prototype.hasOwnProperty.call(he,xe)&&ve.indexOf(xe)<0&&(ce[xe]=he[xe]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Q=0,xe=Object.getOwnPropertySymbols(he);Q0&&arguments[0]!==void 0?arguments[0]:"";return he+=1,""+ve+he}}(),ee=o.forwardRef(function(he,ve){var ce=he.prefixCls,xe=he.className,Q=he.trigger,V=he.children,W=he.defaultCollapsed,L=W===void 0?!1:W,k=he.theme,re=k===void 0?"dark":k,K=he.style,ie=K===void 0?{}:K,me=he.collapsible,Ze=me===void 0?!1:me,De=he.reverseArrow,Fe=De===void 0?!1:De,mt=he.width,ht=mt===void 0?200:mt,xt=he.collapsedWidth,Et=xt===void 0?80:xt,ct=he.zeroWidthTriggerStyle,jt=he.breakpoint,Tt=he.onCollapse,Wt=he.onBreakpoint,Bt=J(he,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),Ht=(0,o.useContext)(F.Gs),rr=Ht.siderHook,Sr=(0,o.useState)("collapsed"in Bt?Bt.collapsed:L),Ar=(0,a.Z)(Sr,2),ye=Ar[0],T=Ar[1],b=(0,o.useState)(!1),q=(0,a.Z)(b,2),Ce=q[0],le=q[1];(0,o.useEffect)(function(){"collapsed"in Bt&&T(Bt.collapsed)},[Bt.collapsed]);var fe=function(Ue,Ie){"collapsed"in Bt||T(Ue),Tt==null||Tt(Ue,Ie)},pe=(0,o.useRef)();pe.current=function(We){le(We.matches),Wt==null||Wt(We.matches),ye!==We.matches&&fe(We.matches,"responsive")},(0,o.useEffect)(function(){function We(Le){return pe.current(Le)}var Ue;if(typeof window!="undefined"){var Ie=window,$e=Ie.matchMedia;if($e&&jt&&jt in D){Ue=$e("(max-width: "+D[jt]+")");try{Ue.addEventListener("change",We)}catch(Le){Ue.addListener(We)}We(Ue)}}return function(){try{Ue==null||Ue.removeEventListener("change",We)}catch(Le){Ue==null||Ue.removeListener(We)}}},[jt]),(0,o.useEffect)(function(){var We=U("ant-sider-");return rr.addSider(We),function(){return rr.removeSider(We)}},[]);var Re=function(){fe(!ye,"clickTrigger")},X=(0,o.useContext)(A.E_),je=X.getPrefixCls,He=function(){var Ue,Ie=je("layout-sider",ce),$e=(0,S.Z)(Bt,["collapsed"]),Le=ye?Et:ht,ze=j(Le)?Le+"px":String(Le),_e=parseFloat(String(Et||0))===0?o.createElement("span",{onClick:Re,className:I()(Ie+"-zero-width-trigger",Ie+"-zero-width-trigger-"+(Fe?"right":"left")),style:ct},Q||o.createElement(p,null)):null,ue={expanded:Fe?o.createElement(_.Z,null):o.createElement(M.Z,null),collapsed:Fe?o.createElement(M.Z,null):o.createElement(_.Z,null)},Ye=ye?"collapsed":"expanded",Ve=ue[Ye],Je=Q!==null?_e||o.createElement("div",{className:Ie+"-trigger",onClick:Re,style:{width:ze}},Q||Ve):null,it=(0,t.Z)((0,t.Z)({},ie),{flex:"0 0 "+ze,maxWidth:ze,minWidth:ze,width:ze}),Te=I()(Ie,Ie+"-"+re,(Ue={},(0,r.Z)(Ue,Ie+"-collapsed",!!ye),(0,r.Z)(Ue,Ie+"-has-trigger",Ze&&Q!==null&&!_e),(0,r.Z)(Ue,Ie+"-below",!!Ce),(0,r.Z)(Ue,Ie+"-zero-width",parseFloat(ze)===0),Ue),xe);return o.createElement("aside",(0,t.Z)({className:Te},$e,{style:it,ref:ve}),o.createElement("div",{className:Ie+"-children"},V),Ze||Ce&&_e?Je:null)},tt=o.useMemo(function(){return{siderCollapsed:ye}},[ye]);return o.createElement(R.Provider,{value:tt},He())}),de=ee},84321:function(f,v,e){"use strict";e.d(v,{VY:function(){return U},$_:function(){return R},h4:function(){return D},Gs:function(){return A},ZP:function(){return ee}});var r=e(74902),t=e(4942),a=e(97685),i=e(87462),o=e(94184),u=e.n(o),c=e(67294),l=e(53124),d=e(67968),p=e(45503),M=function(he){var ve,ce=he.componentCls,xe=he.colorBgContainer,Q=he.colorBgBody,V=he.colorText;return(0,t.Z)({},ce+"-sider-light",(ve={background:xe},(0,t.Z)(ve,ce+"-sider-trigger",{color:V,background:xe}),(0,t.Z)(ve,ce+"-sider-zero-width-trigger",{color:V,background:xe,border:"1px solid "+Q,borderInlineStart:0}),ve))},_=M,y=function(he){var ve,ce=he.antCls,xe=he.componentCls,Q=he.colorText,V=he.colorTextLightSolid,W=he.colorBgHeader,L=he.colorBgBody,k=he.colorBgTrigger,re=he.layoutHeaderHeight,K=he.layoutHeaderPaddingInline,ie=he.layoutHeaderColor,me=he.layoutFooterPadding,Ze=he.layoutTriggerHeight,De=he.layoutZeroTriggerSize,Fe=he.motionDurationMid,mt=he.motionDurationSlow,ht=he.fontSize,xt=he.borderRadius;return(0,t.Z)({},xe,(0,i.Z)((0,i.Z)((ve={display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:L,"&, *":{boxSizing:"border-box"}},(0,t.Z)(ve,"&"+xe+"-has-sider",(0,t.Z)({flexDirection:"row"},"> "+xe+", > "+xe+"-content",{width:0})),(0,t.Z)(ve,xe+"-header, &"+xe+"-footer",{flex:"0 0 auto"}),(0,t.Z)(ve,xe+"-header",(0,t.Z)({height:re,paddingInline:K,color:ie,lineHeight:re+"px",background:W},ce+"-menu",{lineHeight:"inherit"})),(0,t.Z)(ve,xe+"-footer",{padding:me,color:Q,fontSize:ht,background:L}),(0,t.Z)(ve,xe+"-content",{flex:"auto",minHeight:0}),(0,t.Z)(ve,xe+"-sider",{position:"relative",minWidth:0,background:W,transition:"all "+Fe,"&-children":(0,t.Z)({height:"100%",marginTop:-.1,paddingTop:.1},ce+"-menu"+ce+"-menu-inline-collapsed",{width:"auto"}),"&-has-trigger":{paddingBottom:Ze},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:Ze,color:V,lineHeight:Ze+"px",textAlign:"center",background:k,cursor:"pointer",transition:"all "+Fe},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:re,insetInlineEnd:-De,zIndex:1,width:De,height:De,color:V,fontSize:he.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:W,borderStartStartRadius:0,borderStartEndRadius:xt,borderEndEndRadius:xt,borderEndStartRadius:0,cursor:"pointer",transition:"background "+mt+" ease","&::after":{position:"absolute",inset:0,background:"transparent",transition:"all "+mt,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-De,borderStartStartRadius:xt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:xt}}}}),ve),_(he)),{"&-rtl":{direction:"rtl"}}))},I=(0,d.Z)("Layout",function(de){var he=de.colorText,ve=de.controlHeightSM,ce=de.controlHeight,xe=de.controlHeightLG,Q=de.marginXXS,V=xe*1.25,W=(0,p.TS)(de,{layoutHeaderHeight:ce*2,layoutHeaderPaddingInline:V,layoutHeaderColor:he,layoutFooterPadding:ve+"px "+V+"px",layoutTriggerHeight:xe+Q*2,layoutZeroTriggerSize:xe});return[y(W)]},function(de){var he=de.colorBgLayout;return{colorBgHeader:"#001529",colorBgBody:he,colorBgTrigger:"#002140"}}),S=function(de,he){var ve={};for(var ce in de)Object.prototype.hasOwnProperty.call(de,ce)&&he.indexOf(ce)<0&&(ve[ce]=de[ce]);if(de!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xe=0,ce=Object.getOwnPropertySymbols(de);xe0),(0,t.Z)(ve,k+"-rtl",xe==="rtl"),ve),re,ht),Et=c.useMemo(function(){return{siderHook:{addSider:function(jt){L(function(Tt){return[].concat((0,r.Z)(Tt),[jt])})},removeSider:function(jt){L(function(Tt){return Tt.filter(function(Wt){return Wt!==jt})})}}}},[]);return mt(c.createElement(A.Provider,{value:Et},c.createElement(me,(0,i.Z)({ref:he,className:xt},Ze),K)))}),J=O({suffixCls:"layout",tagName:"section",displayName:"Layout"})(F),D=O({suffixCls:"layout-header",tagName:"header",displayName:"Header"})(j),R=O({suffixCls:"layout-footer",tagName:"footer",displayName:"Footer"})(j),U=O({suffixCls:"layout-content",tagName:"main",displayName:"Content"})(j),ee=J},77667:function(f,v,e){"use strict";e.d(v,{E:function(){return u}});var r=e(87462),t=e(67294),a=e(67178),i=e(24457),o=function(l){var d=l.componentName,p=d===void 0?"global":d,M=l.defaultLocale,_=l.children,y=t.useContext(a.Z),I=t.useMemo(function(){var A,O=M||i.Z[p],j=(A=y==null?void 0:y[p])!==null&&A!==void 0?A:{};return(0,r.Z)((0,r.Z)({},O instanceof Function?O():O),j||{})},[p,M,y]),S=t.useMemo(function(){var A=y&&y.locale;return y&&y.exist&&!A?i.Z.locale:A},[y]);return _(I,S,y)};v.Z=o;var u=function(l,d){var p=t.useContext(a.Z),M=t.useMemo(function(){var _,y=d||i.Z[l],I=(_=p==null?void 0:p[l])!==null&&_!==void 0?_:{};return(0,r.Z)((0,r.Z)({},typeof y=="function"?y():y),I||{})},[l,d,p]);return[M]}},67178:function(f,v,e){"use strict";var r=e(67294),t=(0,r.createContext)(void 0);v.Z=t},24457:function(f,v,e){"use strict";e.d(v,{Z:function(){return c}});var r=e(62906),t=e(87206),a=t.Z,i=e(42115),o="${label} is not a valid ${type}",u={locale:"en",Pagination:r.Z,DatePicker:t.Z,TimePicker:i.Z,Calendar:a,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"}},c=u},37029:function(f,v,e){"use strict";e.d(v,{Z:function(){return _}});var r=e(81626),t=e(87462),a={locale:"zh_CN",today:"\u4ECA\u5929",now:"\u6B64\u523B",backToToday:"\u8FD4\u56DE\u4ECA\u5929",ok:"\u786E\u5B9A",timeSelect:"\u9009\u62E9\u65F6\u95F4",dateSelect:"\u9009\u62E9\u65E5\u671F",weekSelect:"\u9009\u62E9\u5468",clear:"\u6E05\u9664",month:"\u6708",year:"\u5E74",previousMonth:"\u4E0A\u4E2A\u6708 (\u7FFB\u9875\u4E0A\u952E)",nextMonth:"\u4E0B\u4E2A\u6708 (\u7FFB\u9875\u4E0B\u952E)",monthSelect:"\u9009\u62E9\u6708\u4EFD",yearSelect:"\u9009\u62E9\u5E74\u4EFD",decadeSelect:"\u9009\u62E9\u5E74\u4EE3",yearFormat:"YYYY\u5E74",dayFormat:"D\u65E5",dateFormat:"YYYY\u5E74M\u6708D\u65E5",dateTimeFormat:"YYYY\u5E74M\u6708D\u65E5 HH\u65F6mm\u5206ss\u79D2",previousYear:"\u4E0A\u4E00\u5E74 (Control\u952E\u52A0\u5DE6\u65B9\u5411\u952E)",nextYear:"\u4E0B\u4E00\u5E74 (Control\u952E\u52A0\u53F3\u65B9\u5411\u952E)",previousDecade:"\u4E0A\u4E00\u5E74\u4EE3",nextDecade:"\u4E0B\u4E00\u5E74\u4EE3",previousCentury:"\u4E0A\u4E00\u4E16\u7EAA",nextCentury:"\u4E0B\u4E00\u4E16\u7EAA"},i=a,o={placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4",rangePlaceholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]},u=o,c={lang:(0,t.Z)({placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",yearPlaceholder:"\u8BF7\u9009\u62E9\u5E74\u4EFD",quarterPlaceholder:"\u8BF7\u9009\u62E9\u5B63\u5EA6",monthPlaceholder:"\u8BF7\u9009\u62E9\u6708\u4EFD",weekPlaceholder:"\u8BF7\u9009\u62E9\u5468",rangePlaceholder:["\u5F00\u59CB\u65E5\u671F","\u7ED3\u675F\u65E5\u671F"],rangeYearPlaceholder:["\u5F00\u59CB\u5E74\u4EFD","\u7ED3\u675F\u5E74\u4EFD"],rangeMonthPlaceholder:["\u5F00\u59CB\u6708\u4EFD","\u7ED3\u675F\u6708\u4EFD"],rangeQuarterPlaceholder:["\u5F00\u59CB\u5B63\u5EA6","\u7ED3\u675F\u5B63\u5EA6"],rangeWeekPlaceholder:["\u5F00\u59CB\u5468","\u7ED3\u675F\u5468"]},i),timePickerLocale:(0,t.Z)({},u)};c.lang.ok="\u786E\u5B9A";var l=c,d=l,p="${label}\u4E0D\u662F\u4E00\u4E2A\u6709\u6548\u7684${type}",M={locale:"zh-cn",Pagination:r.Z,DatePicker:l,TimePicker:u,Calendar:d,global:{placeholder:"\u8BF7\u9009\u62E9"},Table:{filterTitle:"\u7B5B\u9009",filterConfirm:"\u786E\u5B9A",filterReset:"\u91CD\u7F6E",filterEmptyText:"\u65E0\u7B5B\u9009\u9879",filterCheckall:"\u5168\u9009",filterSearchPlaceholder:"\u5728\u7B5B\u9009\u9879\u4E2D\u641C\u7D22",selectAll:"\u5168\u9009\u5F53\u9875",selectInvert:"\u53CD\u9009\u5F53\u9875",selectNone:"\u6E05\u7A7A\u6240\u6709",selectionAll:"\u5168\u9009\u6240\u6709",sortTitle:"\u6392\u5E8F",expand:"\u5C55\u5F00\u884C",collapse:"\u5173\u95ED\u884C",triggerDesc:"\u70B9\u51FB\u964D\u5E8F",triggerAsc:"\u70B9\u51FB\u5347\u5E8F",cancelSort:"\u53D6\u6D88\u6392\u5E8F"},Modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",justOkText:"\u77E5\u9053\u4E86"},Tour:{Next:"\u4E0B\u4E00\u6B65",Previous:"\u4E0A\u4E00\u6B65",Finish:"\u7ED3\u675F\u5BFC\u89C8"},Popconfirm:{cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A"},Transfer:{titles:["",""],searchPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",itemUnit:"\u9879",itemsUnit:"\u9879",remove:"\u5220\u9664",selectCurrent:"\u5168\u9009\u5F53\u9875",removeCurrent:"\u5220\u9664\u5F53\u9875",selectAll:"\u5168\u9009\u6240\u6709",removeAll:"\u5220\u9664\u5168\u90E8",selectInvert:"\u53CD\u9009\u5F53\u9875"},Upload:{uploading:"\u6587\u4EF6\u4E0A\u4F20\u4E2D",removeFile:"\u5220\u9664\u6587\u4EF6",uploadError:"\u4E0A\u4F20\u9519\u8BEF",previewFile:"\u9884\u89C8\u6587\u4EF6",downloadFile:"\u4E0B\u8F7D\u6587\u4EF6"},Empty:{description:"\u6682\u65E0\u6570\u636E"},Icon:{icon:"\u56FE\u6807"},Text:{edit:"\u7F16\u8F91",copy:"\u590D\u5236",copied:"\u590D\u5236\u6210\u529F",expand:"\u5C55\u5F00"},PageHeader:{back:"\u8FD4\u56DE"},Form:{optional:"\uFF08\u53EF\u9009\uFF09",defaultValidateMessages:{default:"\u5B57\u6BB5\u9A8C\u8BC1\u9519\u8BEF${label}",required:"\u8BF7\u8F93\u5165${label}",enum:"${label}\u5FC5\u987B\u662F\u5176\u4E2D\u4E00\u4E2A[${enum}]",whitespace:"${label}\u4E0D\u80FD\u4E3A\u7A7A\u5B57\u7B26",date:{format:"${label}\u65E5\u671F\u683C\u5F0F\u65E0\u6548",parse:"${label}\u4E0D\u80FD\u8F6C\u6362\u4E3A\u65E5\u671F",invalid:"${label}\u662F\u4E00\u4E2A\u65E0\u6548\u65E5\u671F"},types:{string:p,method:p,array:p,object:p,number:p,date:p,boolean:p,integer:p,float:p,regexp:p,email:p,url:p,hex:p},string:{len:"${label}\u987B\u4E3A${len}\u4E2A\u5B57\u7B26",min:"${label}\u6700\u5C11${min}\u4E2A\u5B57\u7B26",max:"${label}\u6700\u591A${max}\u4E2A\u5B57\u7B26",range:"${label}\u987B\u5728${min}-${max}\u5B57\u7B26\u4E4B\u95F4"},number:{len:"${label}\u5FC5\u987B\u7B49\u4E8E${len}",min:"${label}\u6700\u5C0F\u503C\u4E3A${min}",max:"${label}\u6700\u5927\u503C\u4E3A${max}",range:"${label}\u987B\u5728${min}-${max}\u4E4B\u95F4"},array:{len:"\u987B\u4E3A${len}\u4E2A${label}",min:"\u6700\u5C11${min}\u4E2A${label}",max:"\u6700\u591A${max}\u4E2A${label}",range:"${label}\u6570\u91CF\u987B\u5728${min}-${max}\u4E4B\u95F4"},pattern:{mismatch:"${label}\u4E0E\u6A21\u5F0F\u4E0D\u5339\u914D${pattern}"}}},Image:{preview:"\u9884\u89C8"}},_=M},76529:function(f,v,e){"use strict";e.d(v,{J:function(){return o}});var r=e(87462),t=e(67294),a=function(u,c){var l={};for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&c.indexOf(d)<0&&(l[d]=u[d]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,d=Object.getOwnPropertySymbols(u);p "+X+`-item:hover, + > `+X+`-item-active, + > `+X+"-submenu "+X+"-submenu-title:hover",{backgroundColor:"transparent"}),(0,y.Z)(Re,X+"-item, "+X+"-submenu-title",{transition:["border-color "+je,"background "+je].join(",")}),(0,y.Z)(Re,X+"-submenu-arrow",{display:"none"}),Re))},D=J,R=function(pe){var Re,X=pe.componentCls,je=pe.menuArrowOffset;return Re={},(0,y.Z)(Re,X+"-rtl",{direction:"rtl"}),(0,y.Z)(Re,X+"-submenu-rtl",{transformOrigin:"100% 0"}),(0,y.Z)(Re,X+"-rtl"+X+`-vertical, + `+X+"-submenu-rtl "+X+"-vertical",(0,y.Z)({},X+"-submenu-arrow",{"&::before":{transform:"rotate(-45deg) translateY(-"+je+")"},"&::after":{transform:"rotate(45deg) translateY("+je+")"}})),Re},U=R,ee=e(14747),de=function(pe){return(0,r.Z)({},(0,ee.oN)(pe))},he=function(pe,Re){var X,je,He,tt,We,Ue,Ie=pe.componentCls,$e=pe.colorItemText,Le=pe.colorItemTextSelected,ze=pe.colorItemTextSelectedHorizontal,_e=pe.colorGroupTitle,ue=pe.colorItemBg,Ye=pe.colorSubItemBg,Ve=pe.colorItemBgSelectedHorizontal,Je=pe.colorItemBgSelected,it=pe.colorActiveBarHeight,Te=pe.colorActiveBarWidth,Pe=pe.colorActiveBarBorderSize,nt=pe.motionDurationSlow,pt=pe.motionEaseInOut,yt=pe.motionEaseOut,wt=pe.menuItemPaddingInline,ot=pe.motionDurationMid,St=pe.colorItemTextHover,dt=pe.lineType,Rt=pe.colorSplit,Ct=pe.colorItemTextDisabled,Ut=pe.colorDangerItemText,cr=pe.colorDangerItemTextHover,ir=pe.colorDangerItemTextSelected,Rr=pe.colorDangerItemBgActive,dr=pe.colorDangerItemBgSelected,wr=pe.colorItemBgHover,Vr=pe.menuSubMenuBg;return(0,y.Z)({},Ie+"-"+Re,(Ue={color:$e,background:ue},(0,y.Z)(Ue,"&"+Ie+"-root:focus-visible",(0,r.Z)({},de(pe))),(0,y.Z)(Ue,Ie+"-item-group-title",{color:_e}),(0,y.Z)(Ue,Ie+"-submenu-selected",(0,y.Z)({},"> "+Ie+"-submenu-title",{color:Le})),(0,y.Z)(Ue,Ie+"-item-disabled, "+Ie+"-submenu-disabled",{color:Ct+" !important"}),(0,y.Z)(Ue,Ie+"-item:hover, "+Ie+"-submenu-title:hover",(0,y.Z)({},"&:not("+Ie+"-item-selected):not("+Ie+"-submenu-selected)",{color:St})),(0,y.Z)(Ue,"&:not("+Ie+"-horizontal)",(X={},(0,y.Z)(X,Ie+"-item:not("+Ie+"-item-selected)",{"&:hover":{backgroundColor:wr},"&:active":{backgroundColor:Je}}),(0,y.Z)(X,Ie+"-submenu-title",{"&:hover":{backgroundColor:wr},"&:active":{backgroundColor:Je}}),X)),(0,y.Z)(Ue,Ie+"-item-danger",(je={color:Ut},(0,y.Z)(je,"&"+Ie+"-item:hover",(0,y.Z)({},"&:not("+Ie+"-item-selected):not("+Ie+"-submenu-selected)",{color:cr})),(0,y.Z)(je,"&"+Ie+"-item:active",{background:Rr}),je)),(0,y.Z)(Ue,Ie+"-item a",{"&, &:hover":{color:"inherit"}}),(0,y.Z)(Ue,Ie+"-item-selected",(He={color:Le},(0,y.Z)(He,"&"+Ie+"-item-danger",{color:ir}),(0,y.Z)(He,"a, a:hover",{color:"inherit"}),He)),(0,y.Z)(Ue,"&:not("+Ie+"-horizontal) "+Ie+"-item-selected",(0,y.Z)({backgroundColor:Je},"&"+Ie+"-item-danger",{backgroundColor:dr})),(0,y.Z)(Ue,Ie+"-item, "+Ie+"-submenu-title",(0,y.Z)({},"&:not("+Ie+"-item-disabled):focus-visible",(0,r.Z)({},de(pe)))),(0,y.Z)(Ue,"&"+Ie+"-submenu > "+Ie,{backgroundColor:Vr}),(0,y.Z)(Ue,"&"+Ie+"-popup > "+Ie,{backgroundColor:ue}),(0,y.Z)(Ue,"&"+Ie+"-horizontal",(0,r.Z)((0,r.Z)({},Re==="dark"?{borderBottom:0}:{}),(0,y.Z)({},"> "+Ie+"-item, > "+Ie+"-submenu",(tt={top:Pe,marginTop:-Pe,marginBottom:0,borderRadius:pe.radiusItem,"&::after":{position:"absolute",insetInline:wt,bottom:0,borderBottom:it+"px solid transparent",transition:"border-color "+nt+" "+pt,content:'""'}},(0,y.Z)(tt,"&:hover, &-active, &-open",{"&::after":{borderWidth:it+"px",borderBottomColor:ze}}),(0,y.Z)(tt,"&-selected",{color:ze,backgroundColor:Ve,"&::after":{borderWidth:it+"px",borderBottomColor:ze}}),tt)))),(0,y.Z)(Ue,"&"+Ie+"-root",(0,y.Z)({},"&"+Ie+"-inline, &"+Ie+"-vertical",{borderInlineEnd:Pe+"px "+dt+" "+Rt})),(0,y.Z)(Ue,"&"+Ie+"-inline",(We={},(0,y.Z)(We,Ie+"-sub"+Ie+"-inline",{background:Ye}),(0,y.Z)(We,Ie+"-item, "+Ie+"-submenu-title",Pe&&Te?{width:"calc(100% + "+Pe+"px)"}:{}),(0,y.Z)(We,Ie+"-item",(0,y.Z)({position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:Te+"px solid "+Le,transform:"scaleY(0.0001)",opacity:0,transition:["transform "+ot+" "+yt,"opacity "+ot+" "+yt].join(","),content:'""'}},"&"+Ie+"-item-danger",{"&::after":{borderInlineEndColor:ir}})),(0,y.Z)(We,Ie+"-selected, "+Ie+"-item-selected",{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform "+ot+" "+pt,"opacity "+ot+" "+pt].join(",")}}),We)),Ue))},ve=he,ce=function(pe){var Re,X=pe.componentCls,je=pe.menuItemHeight,He=pe.itemMarginInline,tt=pe.padding,We=pe.menuArrowSize,Ue=pe.marginXS,Ie=pe.marginXXS,$e=tt+We+Ue;return Re={},(0,y.Z)(Re,X+"-item",{position:"relative"}),(0,y.Z)(Re,X+"-item, "+X+"-submenu-title",{height:je,lineHeight:je+"px",paddingInline:tt,overflow:"hidden",textOverflow:"ellipsis",marginInline:He,marginBlock:Ie,width:"calc(100% - "+He*2+"px)"}),(0,y.Z)(Re,X+"-submenu",{paddingBottom:.02}),(0,y.Z)(Re,"> "+X+`-item, + > `+X+"-submenu > "+X+"-submenu-title",{height:je,lineHeight:je+"px"}),(0,y.Z)(Re,X+"-item-group-list "+X+`-submenu-title, + `+X+"-submenu-title",{paddingInlineEnd:$e}),Re},xe=function(pe){var Re,X,je,He,tt,We,Ue,Ie=pe.componentCls,$e=pe.iconCls,Le=pe.menuItemHeight,ze=pe.colorTextLightSolid,_e=pe.dropdownWidth,ue=pe.controlHeightLG,Ye=pe.motionDurationMid,Ve=pe.motionEaseOut,Je=pe.paddingXL,it=pe.fontSizeSM,Te=pe.fontSizeLG,Pe=pe.motionDurationSlow,nt=pe.paddingXS,pt=pe.boxShadowSecondary,yt={height:Le,lineHeight:Le+"px",listStylePosition:"inside",listStyleType:"disc"};return[(Re={},(0,y.Z)(Re,Ie,(0,y.Z)({},"&-inline, &-vertical",(0,r.Z)((0,y.Z)({},"&"+Ie+"-root",{boxShadow:"none"}),ce(pe)))),(0,y.Z)(Re,Ie+"-submenu-popup",(0,y.Z)({},Ie+"-vertical",(0,r.Z)((0,r.Z)({},ce(pe)),{boxShadow:pt}))),Re),(0,y.Z)({},Ie+"-submenu-popup "+Ie+"-vertical"+Ie+"-sub",{minWidth:_e,maxHeight:"calc(100vh - "+ue*2.5+"px)",padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}),(0,y.Z)({},Ie+"-inline",(He={width:"100%"},(0,y.Z)(He,"&"+Ie+"-root",(0,y.Z)({},Ie+"-item, "+Ie+"-submenu-title",(X={display:"flex",alignItems:"center",transition:["border-color "+Pe,"background "+Pe,"padding "+Ye+" "+Ve]},(0,y.Z)(X,"> "+Ie+"-title-content",{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"}),(0,y.Z)(X,"> *",{flex:"none"}),X))),(0,y.Z)(He,Ie+"-sub"+Ie+"-inline",(je={padding:0,border:0,borderRadius:0,boxShadow:"none"},(0,y.Z)(je,"& > "+Ie+"-submenu > "+Ie+"-submenu-title",yt),(0,y.Z)(je,"& "+Ie+"-item-group-title",{paddingInlineStart:Je}),je)),(0,y.Z)(He,Ie+"-item",yt),He)),(0,y.Z)({},Ie+"-inline-collapsed",(Ue={width:Le*2},(0,y.Z)(Ue,"&"+Ie+"-root",(0,y.Z)({},Ie+"-item, "+Ie+"-submenu "+Ie+"-submenu-title",(0,y.Z)({},"> "+Ie+"-inline-collapsed-noicon",{fontSize:Te,textAlign:"center"}))),(0,y.Z)(Ue,"> "+Ie+`-item, + > `+Ie+"-item-group > "+Ie+"-item-group-list > "+Ie+`-item, + > `+Ie+"-item-group > "+Ie+"-item-group-list > "+Ie+"-submenu > "+Ie+`-submenu-title, + > `+Ie+"-submenu > "+Ie+"-submenu-title",(tt={insetInlineStart:0,paddingInline:"calc(50% - "+it+"px)",textOverflow:"clip"},(0,y.Z)(tt,Ie+"-submenu-arrow",{opacity:0}),(0,y.Z)(tt,Ie+"-item-icon, "+$e,{margin:0,fontSize:Te,lineHeight:Le+"px","+ span":{display:"inline-block",opacity:0}}),tt)),(0,y.Z)(Ue,Ie+"-item-icon, "+$e,{display:"inline-block"}),(0,y.Z)(Ue,"&-tooltip",(We={pointerEvents:"none"},(0,y.Z)(We,Ie+"-item-icon, "+$e,{display:"none"}),(0,y.Z)(We,"a, a:hover",{color:ze}),We)),(0,y.Z)(Ue,Ie+"-item-group-title",(0,r.Z)((0,r.Z)({},ee.vS),{paddingInline:nt})),Ue))]},Q=xe,V=function(pe){var Re,X,je=pe.componentCls,He=pe.fontSize,tt=pe.motionDurationSlow,We=pe.motionDurationMid,Ue=pe.motionEaseInOut,Ie=pe.motionEaseOut,$e=pe.iconCls,Le=pe.controlHeightSM;return X={},(0,y.Z)(X,je+"-item, "+je+"-submenu-title",(Re={position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:["border-color "+tt,"background "+tt,"padding "+tt+" "+Ue].join(",")},(0,y.Z)(Re,je+"-item-icon, "+$e,{minWidth:He,fontSize:He,transition:["font-size "+We+" "+Ie,"margin "+tt+" "+Ue,"color "+tt].join(","),"+ span":{marginInlineStart:Le-He,opacity:1,transition:["opacity "+tt+" "+Ue,"margin "+tt,"color "+tt].join(",")}}),(0,y.Z)(Re,je+"-item-icon",(0,r.Z)({},(0,ee.Ro)())),(0,y.Z)(Re,"&"+je+"-item-only-child",(0,y.Z)({},"> "+$e+", > "+je+"-item-icon",{marginInlineEnd:0})),Re)),(0,y.Z)(X,je+"-item-disabled, "+je+"-submenu-disabled",(0,y.Z)({background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"}},"> "+je+"-submenu-title",{color:"inherit !important",cursor:"not-allowed"})),X},W=function(pe){var Re,X=pe.componentCls,je=pe.motionDurationSlow,He=pe.motionEaseInOut,tt=pe.borderRadius,We=pe.menuArrowSize,Ue=pe.menuArrowOffset;return(0,y.Z)({},X+"-submenu",(Re={},(0,y.Z)(Re,"&-expand-icon, &-arrow",{position:"absolute",top:"50%",insetInlineEnd:pe.margin,width:We,color:"currentcolor",transform:"translateY(-50%)",transition:"transform "+je+" "+He}),(0,y.Z)(Re,"&-arrow",{"&::before, &::after":{position:"absolute",width:We*.6,height:We*.15,backgroundColor:"currentcolor",borderRadius:tt,transition:["background "+je+" "+He,"transform "+je+" "+He,"top "+je+" "+He,"color "+je+" "+He].join(","),content:'""'},"&::before":{transform:"rotate(45deg) translateY(-"+Ue+")"},"&::after":{transform:"rotate(-45deg) translateY("+Ue+")"}}),Re))},L=function(pe){var Re,X,je,He,tt=pe.antCls,We=pe.componentCls,Ue=pe.fontSize,Ie=pe.motionDurationSlow,$e=pe.motionDurationMid,Le=pe.motionEaseInOut,ze=pe.lineHeight,_e=pe.paddingXS,ue=pe.padding,Ye=pe.colorSplit,Ve=pe.lineWidth,Je=pe.zIndexPopup,it=pe.borderRadiusLG,Te=pe.radiusSubMenuItem,Pe=pe.menuArrowSize,nt=pe.menuArrowOffset,pt=pe.lineType,yt=pe.menuPanelMaskInset;return[(0,y.Z)({"":(0,y.Z)({},""+We,(0,r.Z)((0,r.Z)({},(0,ee.dF)()),(0,y.Z)({},"&-hidden",{display:"none"})))},We+"-submenu-hidden",{display:"none"}),(0,y.Z)({},We,(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},(0,ee.Wf)(pe)),(0,ee.dF)()),(Re={marginBottom:0,paddingInlineStart:0,fontSize:Ue,lineHeight:0,listStyle:"none",outline:"none",transition:["background "+Ie,"width "+Ie+" cubic-bezier(0.2, 0, 0, 1) 0s"].join(",")},(0,y.Z)(Re,"ul, ol",{margin:0,padding:0,listStyle:"none"}),(0,y.Z)(Re,"&-overflow",(0,y.Z)({display:"flex"},We+"-item",{flex:"none"})),(0,y.Z)(Re,We+"-item, "+We+"-submenu, "+We+"-submenu-title",{borderRadius:pe.radiusItem}),(0,y.Z)(Re,We+"-item-group-title",{padding:_e+"px "+ue+"px",fontSize:Ue,lineHeight:ze,transition:"all "+Ie}),(0,y.Z)(Re,"&-horizontal "+We+"-submenu",{transition:["border-color "+Ie+" "+Le,"background "+Ie+" "+Le].join(",")}),(0,y.Z)(Re,We+"-submenu, "+We+"-submenu-inline",{transition:["border-color "+Ie+" "+Le,"background "+Ie+" "+Le,"padding "+$e+" "+Le].join(",")}),(0,y.Z)(Re,We+"-submenu "+We+"-sub",{cursor:"initial",transition:["background "+Ie+" "+Le,"padding "+Ie+" "+Le]}),(0,y.Z)(Re,We+"-title-content",{transition:"color "+Ie}),(0,y.Z)(Re,We+"-item a",{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}}),(0,y.Z)(Re,We+"-item-divider",{overflow:"hidden",lineHeight:0,borderColor:Ye,borderStyle:pt,borderTopWidth:Ve,marginBlock:Ve,padding:0,"&-dashed":{borderStyle:"dashed"}}),Re)),V(pe)),(je={},(0,y.Z)(je,We+"-item-group",(0,y.Z)({},We+"-item-group-list",(0,y.Z)({margin:0,padding:0},We+"-item, "+We+"-submenu-title",{paddingInline:Ue*2+"px "+ue+"px"}))),(0,y.Z)(je,"&-submenu",(0,y.Z)({"&-popup":{position:"absolute",zIndex:Je,background:"transparent",borderRadius:it,boxShadow:"none",transformOrigin:"0 0","&::before":{position:"absolute",inset:yt+"px 0 0",zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:yt}},"> "+We,(0,r.Z)((0,r.Z)((0,r.Z)({borderRadius:it},V(pe)),W(pe)),(X={},(0,y.Z)(X,We+"-item, "+We+"-submenu > "+We+"-submenu-title",{borderRadius:Te}),(0,y.Z)(X,We+"-submenu-title::after",{transition:"transform "+Ie+" "+Le}),X)))),je)),W(pe)),(He={},(0,y.Z)(He,"&-inline-collapsed "+We+`-submenu-arrow, + &-inline `+We+"-submenu-arrow",{"&::before":{transform:"rotate(-45deg) translateX("+nt+")"},"&::after":{transform:"rotate(45deg) translateX(-"+nt+")"}}),(0,y.Z)(He,We+"-submenu-open"+We+"-submenu-inline > "+We+"-submenu-title > "+We+"-submenu-arrow",{transform:"translateY(-"+Pe*.2+"px)","&::after":{transform:"rotate(-45deg) translateX(-"+nt+")"},"&::before":{transform:"rotate(45deg) translateX("+nt+")"}}),He))),(0,y.Z)({},tt+"-layout-header",(0,y.Z)({},We,{lineHeight:"inherit"}))]},k=function(fe,pe){var Re=(0,j.Z)("Menu",function(X,je){var He=je.overrideComponentToken;if(pe===!1)return[];var tt=X.colorBgElevated,We=X.colorPrimary,Ue=X.colorError,Ie=X.colorErrorHover,$e=X.colorTextLightSolid,Le=X.colorTextSecondary,ze=X.controlHeightLG,_e=X.fontSize,ue=_e/7*5,Ye=(0,F.TS)(X,{menuItemHeight:ze,menuItemPaddingInline:X.margin,menuArrowSize:ue,menuHorizontalHeight:ze*1.15,menuArrowOffset:ue*.25+"px",menuPanelMaskInset:-7,menuSubMenuBg:tt}),Ve=(0,F.TS)(Ye,{colorItemText:new I.C($e).setAlpha(.65).toRgbString(),colorItemTextHover:$e,colorGroupTitle:Le,colorItemTextSelected:$e,colorItemBg:"#001529",colorSubItemBg:"#000c17",colorItemBgActive:"transparent",colorItemBgSelected:We,colorActiveBarWidth:0,colorActiveBarHeight:0,colorActiveBarBorderSize:0,colorItemTextDisabled:new I.C($e).setAlpha(.25).toRgbString(),colorDangerItemText:Ue,colorDangerItemTextHover:Ie,colorDangerItemTextSelected:$e,colorDangerItemBgActive:Ue,colorDangerItemBgSelected:Ue,menuSubMenuBg:"#001529"},(0,r.Z)({},He));return[L(Ye),D(Ye),Q(Ye),ve(Ye,"light"),ve(Ve,"dark"),U(Ye),(0,S.Z)(Ye),(0,A.oN)(Ye,"slide-up"),(0,A.oN)(Ye,"slide-down"),(0,O._y)(Ye,"zoom-big")]},function(X){var je=X.colorPrimary,He=X.colorError,tt=X.colorTextDisabled,We=X.colorErrorBg,Ue=X.colorText,Ie=X.colorTextDescription,$e=X.colorBgContainer,Le=X.colorFillAlter,ze=X.colorFillContent,_e=X.lineWidth,ue=X.lineWidthBold,Ye=X.controlItemBgActiveHover,Ve=X.colorBgTextHover;return{dropdownWidth:160,zIndexPopup:X.zIndexPopupBase+50,radiusItem:X.borderRadiusLG,radiusSubMenuItem:X.borderRadiusSM,colorItemText:Ue,colorItemTextHover:Ue,colorItemTextHoverHorizontal:je,colorGroupTitle:Ie,colorItemTextSelected:Ue,colorItemTextSelectedHorizontal:je,colorItemBg:$e,colorItemBgHover:Ve,colorItemBgActive:ze,colorSubItemBg:Le,colorItemBgSelected:Ye,colorItemBgSelectedHorizontal:"transparent",colorActiveBarWidth:0,colorActiveBarHeight:ue,colorActiveBarBorderSize:_e,colorItemTextDisabled:tt,colorDangerItemText:He,colorDangerItemTextHover:He,colorDangerItemTextSelected:He,colorDangerItemBgActive:We,colorDangerItemBgSelected:We,itemMarginInline:X.marginXXS}});return Re(fe)},re=e(76529),K=e(71002),ie=function(fe,pe){var Re={};for(var X in fe)Object.prototype.hasOwnProperty.call(fe,X)&&pe.indexOf(X)<0&&(Re[X]=fe[X]);if(fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,X=Object.getOwnPropertySymbols(fe);je div > "+Q.componentCls,(L={position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:Q.contentHeight},(0,t.Z)(L,Q.componentCls+"-dot",{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-Q.spinDotSize/2}),(0,t.Z)(L,Q.componentCls+"-text",{position:"absolute",top:"50%",width:"100%",paddingTop:(Q.spinDotSize-Q.fontSize)/2+2,textShadow:"0 1px 2px "+Q.colorBgContainer}),(0,t.Z)(L,"&"+Q.componentCls+"-show-text "+Q.componentCls+"-dot",{marginTop:-(Q.spinDotSize/2)-10}),(0,t.Z)(L,"&-sm",(V={},(0,t.Z)(V,Q.componentCls+"-dot",{margin:-Q.spinDotSizeSM/2}),(0,t.Z)(V,Q.componentCls+"-text",{paddingTop:(Q.spinDotSizeSM-Q.fontSize)/2+2}),(0,t.Z)(V,"&"+Q.componentCls+"-show-text "+Q.componentCls+"-dot",{marginTop:-(Q.spinDotSizeSM/2)-10}),V)),(0,t.Z)(L,"&-lg",(W={},(0,t.Z)(W,Q.componentCls+"-dot",{margin:-(Q.spinDotSizeLG/2)}),(0,t.Z)(W,Q.componentCls+"-text",{paddingTop:(Q.spinDotSizeLG-Q.fontSize)/2+2}),(0,t.Z)(W,"&"+Q.componentCls+"-show-text "+Q.componentCls+"-dot",{marginTop:-(Q.spinDotSizeLG/2)-10}),W)),L)),(0,t.Z)(k,Q.componentCls+"-container",{position:"relative",transition:"opacity "+Q.motionDurationSlow,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:Q.colorBgContainer,opacity:0,transition:"all "+Q.motionDurationSlow,content:'""',pointerEvents:"none"}}),(0,t.Z)(k,Q.componentCls+"-blur",(0,t.Z)({clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none"},"&::after",{opacity:.4,pointerEvents:"auto"})),k)},(0,t.Z)(re,"&-tip",{color:Q.spinDotDefault}),(0,t.Z)(re,Q.componentCls+"-dot",{position:"relative",display:"inline-block",fontSize:Q.spinDotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(Q.spinDotSize-Q.marginXXS/2)/2,height:(Q.spinDotSize-Q.marginXXS/2)/2,backgroundColor:Q.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:O,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:j,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}}),(0,t.Z)(re,"&-sm "+Q.componentCls+"-dot",{fontSize:Q.spinDotSizeSM,i:{width:(Q.spinDotSizeSM-Q.marginXXS/2)/2,height:(Q.spinDotSizeSM-Q.marginXXS/2)/2}}),(0,t.Z)(re,"&-lg "+Q.componentCls+"-dot",{fontSize:Q.spinDotSizeLG,i:{width:(Q.spinDotSizeLG-Q.marginXXS)/2,height:(Q.spinDotSizeLG-Q.marginXXS)/2}}),(0,t.Z)(re,"&"+Q.componentCls+"-show-text "+Q.componentCls+"-text",{display:"block"}),re)))},J=(0,I.Z)("Spin",function(xe){var Q=(0,S.TS)(xe,{spinDotDefault:xe.colorTextDescription,spinDotSize:xe.controlHeightLG/2,spinDotSizeSM:xe.controlHeightLG*.35,spinDotSizeLG:xe.controlHeight});return[F(Q)]},{contentHeight:400}),D=function(xe,Q){var V={};for(var W in xe)Object.prototype.hasOwnProperty.call(xe,W)&&Q.indexOf(W)<0&&(V[W]=xe[W]);if(xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,W=Object.getOwnPropertySymbols(xe);L *":"",d=["hover",c.focus?"focus":null,"active"].filter(Boolean).map(function(p){return"&:"+p+" "+l}).join(",");return{"&-item:not(&-last-item)":{marginInlineEnd:-u.lineWidth},"&-item":(0,t.Z)((0,t.Z)((0,r.Z)({},d,{zIndex:2}),c.focusElCls?(0,r.Z)({},"&"+c.focusElCls,{zIndex:2}):{}),(0,r.Z)({},"&[disabled] "+l,{zIndex:0}))}}function i(u,c){var l,d=c.borderElCls?"> "+c.borderElCls:"";return l={},(0,r.Z)(l,"&-item:not(&-first-item):not(&-last-item) "+d,{borderRadius:0}),(0,r.Z)(l,"&-item:not(&-last-item)&-first-item",(0,r.Z)({},"& "+d+", &"+u+"-sm "+d+", &"+u+"-lg "+d,{borderStartEndRadius:0,borderEndEndRadius:0})),(0,r.Z)(l,"&-item:not(&-first-item)&-last-item",(0,r.Z)({},"& "+d+", &"+u+"-sm "+d+", &"+u+"-lg "+d,{borderStartStartRadius:0,borderEndStartRadius:0})),l}function o(u,c){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{focus:!0};return{"&-compact":(0,t.Z)((0,t.Z)({},a(u,l)),i(c,l))}}},14747:function(f,v,e){"use strict";e.d(v,{Lx:function(){return c},Qy:function(){return p},Ro:function(){return o},Wf:function(){return i},dF:function(){return u},du:function(){return l},oN:function(){return d},vS:function(){return a}});var r=e(87462),t=e(4942),a={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},i=function(_){return{boxSizing:"border-box",margin:0,padding:0,color:_.colorText,fontSize:_.fontSize,lineHeight:_.lineHeight,listStyle:"none",fontFamily:_.fontFamily}},o=function(){return{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"},"& &-icon":{display:"block"}}},u=function(){return{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}},c=function(_){var y;return{a:(y={color:_.colorLink,textDecoration:_.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:"color "+_.motionDurationSlow,"-webkit-text-decoration-skip":"objects","&:hover":{color:_.colorLinkHover},"&:active":{color:_.colorLinkActive}},(0,t.Z)(y,`&:active, + &:hover`,{textDecoration:_.linkHoverDecoration,outline:0}),(0,t.Z)(y,"&:focus",{textDecoration:_.linkFocusDecoration,outline:0}),(0,t.Z)(y,"&[disabled]",{color:_.colorTextDisabled,cursor:"not-allowed"}),y)}},l=function(_,y){var I=_.fontFamily,S=_.fontSize,A='[class^="'+y+'"], [class*=" '+y+'"]';return(0,t.Z)({},A,(0,t.Z)({fontFamily:I,fontSize:S,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}},A,{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}))},d=function(_){return{outline:_.lineWidth*4+"px solid "+_.colorPrimaryBorder,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}},p=function(_){return{"&:focus-visible":(0,r.Z)({},d(_))}}},33507:function(f,v,e){"use strict";var r=e(4942),t=function(i){var o;return(0,r.Z)({},i.componentCls,(o={},(0,r.Z)(o,i.antCls+"-motion-collapse-legacy",{overflow:"hidden","&-active":{transition:"height "+i.motionDurationMid+" "+i.motionEaseInOut+`, + opacity `+i.motionDurationMid+" "+i.motionEaseInOut+" !important"}}),(0,r.Z)(o,i.antCls+"-motion-collapse",{overflow:"hidden",transition:"height "+i.motionDurationMid+" "+i.motionEaseInOut+`, + opacity `+i.motionDurationMid+" "+i.motionEaseInOut+" !important"}),o))};v.Z=t},93590:function(f,v,e){"use strict";e.d(v,{R:function(){return o}});var r=e(4942),t=e(87462),a=function(c){return{animationDuration:c,animationFillMode:"both"}},i=function(c){return{animationDuration:c,animationFillMode:"both"}},o=function(c,l,d,p){var M,_=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,y=_?"&":"";return M={},(0,r.Z)(M,` + `+y+c+`-enter, + `+y+c+`-appear + `,(0,t.Z)((0,t.Z)({},a(p)),{animationPlayState:"paused"})),(0,r.Z)(M,""+y+c+"-leave",(0,t.Z)((0,t.Z)({},i(p)),{animationPlayState:"paused"})),(0,r.Z)(M,` + `+y+c+"-enter"+c+`-enter-active, + `+y+c+"-appear"+c+`-appear-active + `,{animationName:l,animationPlayState:"running"}),(0,r.Z)(M,""+y+c+"-leave"+c+"-leave-active",{animationName:d,animationPlayState:"running",pointerEvents:"none"}),M}},33297:function(f,v,e){"use strict";e.d(v,{Fm:function(){return y}});var r=e(4942),t=e(66981),a=e(93590),i=new t.E4("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),o=new t.E4("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),u=new t.E4("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),c=new t.E4("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),l=new t.E4("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),d=new t.E4("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),p=new t.E4("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),M=new t.E4("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),_={"move-up":{inKeyframes:p,outKeyframes:M},"move-down":{inKeyframes:i,outKeyframes:o},"move-left":{inKeyframes:u,outKeyframes:c},"move-right":{inKeyframes:l,outKeyframes:d}},y=function(S,A){var O,j=S.antCls,F=j+"-"+A,J=_[A],D=J.inKeyframes,R=J.outKeyframes;return[(0,a.R)(F,D,R,S.motionDurationMid),(O={},(0,r.Z)(O,` + `+F+`-enter, + `+F+`-appear + `,{opacity:0,animationTimingFunction:S.motionEaseOutCirc}),(0,r.Z)(O,F+"-leave",{animationTimingFunction:S.motionEaseInOutCirc}),O)]}},67771:function(f,v,e){"use strict";e.d(v,{Qt:function(){return u},Uw:function(){return o},fJ:function(){return i},ly:function(){return c},oN:function(){return y}});var r=e(4942),t=e(66981),a=e(93590),i=new t.E4("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),o=new t.E4("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),u=new t.E4("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),c=new t.E4("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),l=new t.E4("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),d=new t.E4("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),p=new t.E4("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),M=new t.E4("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),_={"slide-up":{inKeyframes:i,outKeyframes:o},"slide-down":{inKeyframes:u,outKeyframes:c},"slide-left":{inKeyframes:l,outKeyframes:d},"slide-right":{inKeyframes:p,outKeyframes:M}},y=function(S,A){var O,j=S.antCls,F=j+"-"+A,J=_[A],D=J.inKeyframes,R=J.outKeyframes;return[(0,a.R)(F,D,R,S.motionDurationMid),(O={},(0,r.Z)(O,` + `+F+`-enter, + `+F+`-appear + `,{opacity:0,animationTimingFunction:S.motionEaseOutQuint}),(0,r.Z)(O,F+"-leave",{animationTimingFunction:S.motionEaseInQuint}),O)]}},50438:function(f,v,e){"use strict";e.d(v,{_y:function(){return O},kr:function(){return i}});var r=e(4942),t=e(66981),a=e(93590),i=new t.E4("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),o=new t.E4("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),u=new t.E4("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),c=new t.E4("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),l=new t.E4("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),d=new t.E4("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),p=new t.E4("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),M=new t.E4("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),_=new t.E4("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),y=new t.E4("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),I=new t.E4("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),S=new t.E4("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),A={zoom:{inKeyframes:i,outKeyframes:o},"zoom-big":{inKeyframes:u,outKeyframes:c},"zoom-big-fast":{inKeyframes:u,outKeyframes:c},"zoom-left":{inKeyframes:p,outKeyframes:M},"zoom-right":{inKeyframes:_,outKeyframes:y},"zoom-up":{inKeyframes:l,outKeyframes:d},"zoom-down":{inKeyframes:I,outKeyframes:S}},O=function(F,J){var D,R=F.antCls,U=R+"-"+J,ee=A[J],de=ee.inKeyframes,he=ee.outKeyframes;return[(0,a.R)(U,de,he,F.motionDurationMid),(D={},(0,r.Z)(D,` + `+U+`-enter, + `+U+`-appear + `,{transform:"scale(0)",opacity:0,animationTimingFunction:F.motionEaseOutCirc,"&-prepare":{transform:"none"}}),(0,r.Z)(D,U+"-leave",{animationTimingFunction:F.motionEaseInOutCirc}),D)]}},97414:function(f,v,e){"use strict";e.d(v,{ZP:function(){return c},fS:function(){return u},qN:function(){return o}});var r=e(4942),t=e(87462),a=e(79511);function i(l){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return l.map(function(p){return""+d+p}).join(",")}var o=8;function u(l){var d=o,p=l.sizePopupArrow,M=l.contentRadius,_=l.borderRadiusOuter,y=l.limitVerticalRadius,I=p/2-Math.ceil(_*(Math.sqrt(2)-1)),S=(M>12?M+2:12)-I,A=y?d-I:S;return{dropdownArrowOffset:S,dropdownArrowOffsetVertical:A}}function c(l,d){var p,M=l.componentCls,_=l.sizePopupArrow,y=l.marginXXS,I=l.borderRadiusXS,S=l.borderRadiusOuter,A=l.boxShadowPopoverArrow,O=d.colorBg,j=d.showArrowCls,F=d.contentRadius,J=F===void 0?l.borderRadiusLG:F,D=d.limitVerticalRadius,R=u({sizePopupArrow:_,contentRadius:J,borderRadiusOuter:S,limitVerticalRadius:D}),U=R.dropdownArrowOffsetVertical,ee=R.dropdownArrowOffset,de=_/2+y;return(0,r.Z)({},M,(p={},(0,r.Z)(p,M+"-arrow",[(0,t.Z)((0,t.Z)({position:"absolute",zIndex:1,display:"block"},(0,a.r)(_,I,S,O,A)),{"&:before":{background:O}})]),(0,r.Z)(p,["&-placement-top "+M+"-arrow","&-placement-topLeft "+M+"-arrow","&-placement-topRight "+M+"-arrow"].join(","),{bottom:0,transform:"translateY(100%) rotate(180deg)"}),(0,r.Z)(p,"&-placement-top "+M+"-arrow",{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"}),(0,r.Z)(p,"&-placement-topLeft "+M+"-arrow",{left:{_skip_check_:!0,value:ee}}),(0,r.Z)(p,"&-placement-topRight "+M+"-arrow",{right:{_skip_check_:!0,value:ee}}),(0,r.Z)(p,["&-placement-bottom "+M+"-arrow","&-placement-bottomLeft "+M+"-arrow","&-placement-bottomRight "+M+"-arrow"].join(","),{top:0,transform:"translateY(-100%)"}),(0,r.Z)(p,"&-placement-bottom "+M+"-arrow",{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"}),(0,r.Z)(p,"&-placement-bottomLeft "+M+"-arrow",{left:{_skip_check_:!0,value:ee}}),(0,r.Z)(p,"&-placement-bottomRight "+M+"-arrow",{right:{_skip_check_:!0,value:ee}}),(0,r.Z)(p,["&-placement-left "+M+"-arrow","&-placement-leftTop "+M+"-arrow","&-placement-leftBottom "+M+"-arrow"].join(","),{right:{_skip_check_:!0,value:0},transform:"translateX(100%) rotate(90deg)"}),(0,r.Z)(p,"&-placement-left "+M+"-arrow",{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"}),(0,r.Z)(p,"&-placement-leftTop "+M+"-arrow",{top:U}),(0,r.Z)(p,"&-placement-leftBottom "+M+"-arrow",{bottom:U}),(0,r.Z)(p,["&-placement-right "+M+"-arrow","&-placement-rightTop "+M+"-arrow","&-placement-rightBottom "+M+"-arrow"].join(","),{left:{_skip_check_:!0,value:0},transform:"translateX(-100%) rotate(-90deg)"}),(0,r.Z)(p,"&-placement-right "+M+"-arrow",{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"}),(0,r.Z)(p,"&-placement-rightTop "+M+"-arrow",{top:U}),(0,r.Z)(p,"&-placement-rightBottom "+M+"-arrow",{bottom:U}),(0,r.Z)(p,i(["&-placement-topLeft","&-placement-top","&-placement-topRight"],j),{paddingBottom:de}),(0,r.Z)(p,i(["&-placement-bottomLeft","&-placement-bottom","&-placement-bottomRight"],j),{paddingTop:de}),(0,r.Z)(p,i(["&-placement-leftTop","&-placement-left","&-placement-leftBottom"],j),{paddingRight:{_skip_check_:!0,value:de}}),(0,r.Z)(p,i(["&-placement-rightTop","&-placement-right","&-placement-rightBottom"],j),{paddingLeft:{_skip_check_:!0,value:de}}),p))}},79511:function(f,v,e){"use strict";e.d(v,{r:function(){return r}});var r=function(a,i,o,u,c){var l=a/2,d=l-o*(Math.sqrt(2)-1),p=l,M=l+o*(1-1/Math.sqrt(2)),_=l-o*(1-1/Math.sqrt(2)),y=2*l-i*(1/Math.sqrt(2)),I=i*(1/Math.sqrt(2)),S=4*l-y,A=I,O=4*l-M,j=_,F=4*l-d,J=p;return{borderRadius:{_skip_check_:!0,value:"0 0 "+i+"px"},pointerEvents:"none",width:a*2,height:a*2,overflow:"hidden","&::after":{content:'""',position:"absolute",width:a/Math.sqrt(2),height:a/Math.sqrt(2),bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:"0 0 "+i+"px 0"},transform:"translateY(50%) rotate(-135deg)",boxShadow:c,zIndex:0,background:"transparent"},"&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:a*2,height:a/2,background:u,clipPath:"path('M "+d+" "+p+" A "+o+" "+o+" 0 0 0 "+M+" "+_+" L "+y+" "+I+" A "+i+" "+i+" 0 0 1 "+S+" "+A+" L "+O+" "+j+" A "+o+" "+o+" 0 0 0 "+F+" "+J+" Z')",content:'""'}}}},92195:function(f,v,e){"use strict";e.d(v,{Z:function(){return D}});var r=e(97685),t=e(64049),a=e(67164),i=e(87462),o=e(92138),u=e(2790),c=e(57),l=e(10274),d=function(U,ee){return new l.C(U).setAlpha(ee).toRgbString()},p=function(U,ee){var de=new l.C(U);return de.lighten(ee).toHexString()},M=function(U){var ee=(0,o.generate)(U,{theme:"dark"});return{1:ee[0],2:ee[1],3:ee[2],4:ee[3],5:ee[6],6:ee[5],7:ee[4],8:ee[6],9:ee[5],10:ee[4]}},_=function(U,ee){var de=U||"#000",he=ee||"#fff";return{colorBgBase:de,colorTextBase:he,colorText:d(he,.85),colorTextSecondary:d(he,.65),colorTextTertiary:d(he,.45),colorTextQuaternary:d(he,.25),colorFill:d(he,.18),colorFillSecondary:d(he,.12),colorFillTertiary:d(he,.08),colorFillQuaternary:d(he,.04),colorBgElevated:p(de,12),colorBgContainer:p(de,8),colorBgLayout:p(de,0),colorBgSpotlight:p(de,26),colorBorder:p(de,26),colorBorderSecondary:p(de,19)}},y=function(U,ee){var de=Object.keys(u.M).map(function(ve){var ce=(0,o.generate)(U[ve],{theme:"dark"});return new Array(10).fill(1).reduce(function(xe,Q,V){return xe[ve+"-"+(V+1)]=ce[V],xe},{})}).reduce(function(ve,ce){return ve=(0,i.Z)((0,i.Z)({},ve),ce),ve},{}),he=ee!=null?ee:(0,a.Z)(U);return(0,i.Z)((0,i.Z)((0,i.Z)({},he),de),(0,c.Z)(U,{generateColorPalettes:M,generateNeutralColorPalettes:_}))},I=y,S=e(372);function A(R){var U=R.sizeUnit,ee=R.sizeStep,de=ee-2;return{sizeXXL:U*(de+10),sizeXL:U*(de+6),sizeLG:U*(de+2),sizeMD:U*(de+2),sizeMS:U*(de+1),size:U*de,sizeSM:U*de,sizeXS:U*(de-1),sizeXXS:U*(de-1)}}var O=e(51734),j=function(U,ee){var de=ee!=null?ee:(0,a.Z)(U),he=de.fontSizes[0],ve=(0,O.Z)(he),ce=de.controlHeight-4;return(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},de),A(ee!=null?ee:U)),{fontSizes:ve.map(function(xe){return xe.size}),lineHeights:ve.map(function(xe){return xe.lineHeight}),controlHeight:ce}),(0,S.Z)((0,i.Z)((0,i.Z)({},de),{controlHeight:ce})))},F=j;function J(){var R=(0,t.dQ)(),U=(0,r.Z)(R,3),ee=U[0],de=U[1],he=U[2];return{theme:ee,token:de,hashId:he}}var D={defaultConfig:t.u_,defaultSeed:t.u_.token,useToken:J,defaultAlgorithm:a.Z,darkAlgorithm:I,compactAlgorithm:F}},8796:function(f,v,e){"use strict";e.d(v,{i:function(){return r}});var r=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"]},64049:function(f,v,e){"use strict";e.d(v,{Mj:function(){return A},u_:function(){return S},dQ:function(){return O}});var r=e(87462),t=e(97685),a=e(66981),i=e(67294),o=e(67159),u=e(67164),c=e(2790),l=e(10274);function d(j){return j>=0&&j<=255}function p(j,F){var J=new l.C(j).toRgb(),D=J.r,R=J.g,U=J.b,ee=J.a;if(ee<1)return j;for(var de=new l.C(F).toRgb(),he=de.r,ve=de.g,ce=de.b,xe=.01;xe<=1;xe+=.01){var Q=Math.round((D-he*(1-xe))/xe),V=Math.round((R-ve*(1-xe))/xe),W=Math.round((U-ce*(1-xe))/xe);if(d(Q)&&d(V)&&d(W))return new l.C({r:Q,g:V,b:W,a:Math.round(xe*100)/100}).toRgbString()}return new l.C({r:D,g:R,b:U,a:1}).toRgbString()}var M=p,_=function(j,F){var J={};for(var D in j)Object.prototype.hasOwnProperty.call(j,D)&&F.indexOf(D)<0&&(J[D]=j[D]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,D=Object.getOwnPropertySymbols(j);R=5?F=j+1:j<16&&j>=6?F=j+2:j>=16&&(F=16),j<7&&j>=5?J=4:j<8&&j>=7?J=5:j<14&&j>=8?J=6:j<16&&j>=14?J=7:j>=16&&(J=8),j<6&&j>=2?D=1:j>=6&&(D=2),j>4&&j<8?R=4:j>=8&&(R=6),{borderRadius:j>16?16:j,borderRadiusXS:D,borderRadiusSM:J,borderRadiusLG:F,borderRadiusOuter:R}},d=l;function p(O){var j=O.motionUnit,F=O.motionBase,J=O.fontSize,D=O.borderRadius,R=O.lineWidth,U=(0,c.Z)(J);return(0,r.Z)({motionDurationFast:(F+j).toFixed(1)+"s",motionDurationMid:(F+j*2).toFixed(1)+"s",motionDurationSlow:(F+j*3).toFixed(1)+"s",fontSizes:U.map(function(ee){return ee.size}),lineHeights:U.map(function(ee){return ee.lineHeight}),lineWidthBold:R+1},d(D))}var M=e(10274),_=function(j,F){return new M.C(j).setAlpha(F).toRgbString()},y=function(j,F){var J=new M.C(j);return J.darken(F).toHexString()},I=function(j){var F=(0,t.generate)(j);return{1:F[0],2:F[1],3:F[2],4:F[3],5:F[4],6:F[5],7:F[6],8:F[4],9:F[5],10:F[6]}},S=function(j,F){var J=j||"#fff",D=F||"#000";return{colorBgBase:J,colorTextBase:D,colorText:_(D,.88),colorTextSecondary:_(D,.65),colorTextTertiary:_(D,.45),colorTextQuaternary:_(D,.25),colorFill:_(D,.15),colorFillSecondary:_(D,.06),colorFillTertiary:_(D,.04),colorFillQuaternary:_(D,.02),colorBgLayout:y(J,4),colorBgContainer:y(J,0),colorBgElevated:y(J,0),colorBgSpotlight:_(D,.85),colorBorder:y(J,15),colorBorderSecondary:y(J,6)}};function A(O){var j=Object.keys(o.M).map(function(F){var J=(0,t.generate)(O[F]);return new Array(10).fill(1).reduce(function(D,R,U){return D[F+"-"+(U+1)]=J[U],D},{})}).reduce(function(F,J){return F=(0,r.Z)((0,r.Z)({},F),J),F},{});return(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},O),j),(0,u.Z)(O,{generateColorPalettes:I,generateNeutralColorPalettes:S})),i(O)),(0,a.Z)(O)),p(O))}},2790:function(f,v,e){"use strict";e.d(v,{M:function(){return t}});var r=e(87462),t={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},a=(0,r.Z)((0,r.Z)({},t),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, +'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', +'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});v.Z=a},57:function(f,v,e){"use strict";e.d(v,{Z:function(){return a}});var r=e(87462),t=e(10274);function a(i,o){var u=o.generateColorPalettes,c=o.generateNeutralColorPalettes,l=i.colorSuccess,d=i.colorWarning,p=i.colorError,M=i.colorInfo,_=i.colorPrimary,y=i.colorBgBase,I=i.colorTextBase,S=u(_),A=u(l),O=u(d),j=u(p),F=u(M),J=c(y,I);return(0,r.Z)((0,r.Z)({},J),{colorPrimaryBg:S[1],colorPrimaryBgHover:S[2],colorPrimaryBorder:S[3],colorPrimaryBorderHover:S[4],colorPrimaryHover:S[5],colorPrimary:S[6],colorPrimaryActive:S[7],colorPrimaryTextHover:S[8],colorPrimaryText:S[9],colorPrimaryTextActive:S[10],colorSuccessBg:A[1],colorSuccessBgHover:A[2],colorSuccessBorder:A[3],colorSuccessBorderHover:A[4],colorSuccessHover:A[4],colorSuccess:A[6],colorSuccessActive:A[7],colorSuccessTextHover:A[8],colorSuccessText:A[9],colorSuccessTextActive:A[10],colorErrorBg:j[1],colorErrorBgHover:j[2],colorErrorBorder:j[3],colorErrorBorderHover:j[4],colorErrorHover:j[5],colorError:j[6],colorErrorActive:j[7],colorErrorTextHover:j[8],colorErrorText:j[9],colorErrorTextActive:j[10],colorWarningBg:O[1],colorWarningBgHover:O[2],colorWarningBorder:O[3],colorWarningBorderHover:O[4],colorWarningHover:O[4],colorWarning:O[6],colorWarningActive:O[7],colorWarningTextHover:O[8],colorWarningText:O[9],colorWarningTextActive:O[10],colorInfoBg:F[1],colorInfoBgHover:F[2],colorInfoBorder:F[3],colorInfoBorderHover:F[4],colorInfoHover:F[4],colorInfo:F[6],colorInfoActive:F[7],colorInfoTextHover:F[8],colorInfoText:F[9],colorInfoTextActive:F[10],colorBgMask:new t.C("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}},372:function(f,v){"use strict";var e=function(t){var a=t.controlHeight;return{controlHeightSM:a*.75,controlHeightXS:a*.5,controlHeightLG:a*1.25}};v.Z=e},51734:function(f,v,e){"use strict";e.d(v,{Z:function(){return r}});function r(t){var a=new Array(10).fill(null).map(function(i,o){var u=o-1,c=t*Math.pow(2.71828,u/5),l=o>1?Math.floor(c):Math.ceil(c);return Math.floor(l/2)*2});return a[1]=t,a.map(function(i){var o=i+8;return{size:i,lineHeight:o/i}})}},67968:function(f,v,e){"use strict";e.d(v,{Z:function(){return d}});var r=e(87462),t=e(97685),a=e(66981),i=e(67294),o=e(14747),u=e(53124),c=e(64049),l=e(45503);function d(p,M,_){return function(y){var I=(0,c.dQ)(),S=(0,t.Z)(I,3),A=S[0],O=S[1],j=S[2],F=(0,i.useContext)(u.E_),J=F.getPrefixCls,D=F.iconPrefixCls,R=J();return(0,a.xy)({theme:A,token:O,hashId:j,path:["Shared",R]},function(){return[{"&":(0,o.Lx)(O)}]}),[(0,a.xy)({theme:A,token:O,hashId:j,path:[p,y,D]},function(){var U=(0,l.ZP)(O),ee=U.token,de=U.flush,he=typeof _=="function"?_(ee):_,ve=(0,r.Z)((0,r.Z)({},he),O[p]),ce="."+y,xe=(0,l.TS)(ee,{componentCls:ce,prefixCls:y,iconCls:"."+D,antCls:"."+R},ve),Q=M(xe,{hashId:j,prefixCls:y,rootPrefixCls:R,iconPrefixCls:D,overrideComponentToken:O[p]});return de(p,ve),[(0,o.du)(O,y),Q]}),j]}}},45503:function(f,v,e){"use strict";e.d(v,{TS:function(){return i},ZP:function(){return l}});var r=e(87462),t=typeof CSSINJS_STATISTIC!="undefined",a=!0;function i(){for(var d=arguments.length,p=new Array(d),M=0;Mj.qN?j.qN:me})),(0,r.Z)(L,k+"-content",{position:"relative"}),L)),F(W)),{"&-rtl":{direction:"rtl"}})),(0,j.ZP)((0,S.TS)(W,{borderRadiusOuter:xt}),{colorBg:"var(--antd-arrow-background-color)",showArrowCls:"",contentRadius:me,limitVerticalRadius:!0}),(0,r.Z)({},k+"-pure",{position:"relative",maxWidth:"none"})]},D=function(V,W){var L=(0,A.Z)("Tooltip",function(k){if(W===!1)return[];var re=k.borderRadius,K=k.colorTextLightSolid,ie=k.colorBgDefault,me=k.borderRadiusOuter,Ze=(0,S.TS)(k,{tooltipMaxWidth:250,tooltipColor:K,tooltipBorderRadius:re,tooltipBg:ie,tooltipRadiusOuter:me>4?4:me});return[J(Ze),(0,y._y)(k,"zoom-big-fast")]},function(k){var re=k.zIndexPopupBase,K=k.colorBgSpotlight;return{zIndexPopup:re+70,colorBgDefault:K}});return L(V)},R=e(98787),U=new RegExp("^("+R.Y.join("|")+")(-inverse)?$");function ee(V,W){var L=o()((0,r.Z)({},V+"-"+W,W&&U.test(W))),k={},re={};return W&&!U.test(W)&&(k.background=W,re["--antd-arrow-background-color"]=W),{className:L,overlayStyle:k,arrowStyle:re}}function de(V){var W=V.prefixCls,L=V.className,k=V.placement,re=k===void 0?"top":k,K=V.title,ie=V.color,me=V.overlayInnerStyle,Ze=l.useContext(d.E_),De=Ze.getPrefixCls,Fe=De("tooltip",W),mt=D(Fe,!0),ht=(0,t.Z)(mt,2),xt=ht[0],Et=ht[1],ct=ee(Fe,ie),jt=(0,a.Z)((0,a.Z)({},me),ct.overlayStyle),Tt=ct.arrowStyle;return xt(l.createElement("div",{className:o()(Et,Fe,Fe+"-pure",Fe+"-placement-"+re,L,ct.className),style:Tt},l.createElement(u.G,(0,a.Z)({},V,{className:Et,prefixCls:Fe,overlayInnerStyle:jt}),K)))}var he=function(V,W){var L={};for(var k in V)Object.prototype.hasOwnProperty.call(V,k)&&W.indexOf(k)<0&&(L[k]=V[k]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var re=0,k=Object.getOwnPropertySymbols(V);re=200&&y<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};t.forEach(["delete","get","head"],function(y){M.headers[y]={}}),t.forEach(["post","put","patch"],function(y){M.headers[y]=t.merge(c)}),f.exports=M},77874:function(f){"use strict";f.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},97288:function(f){f.exports={version:"0.27.2"}},91849:function(f){"use strict";f.exports=function(e,r){return function(){for(var a=new Array(arguments.length),i=0;i=0)return;u==="set-cookie"?o[u]=(o[u]?o[u]:[]).concat([c]):o[u]=o[u]?o[u]+", "+c:c}}),o}},90205:function(f){"use strict";f.exports=function(e){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}},8713:function(f){"use strict";f.exports=function(e){return function(t){return e.apply(null,t)}}},47675:function(f,v,e){"use strict";var r=e(48764).lW,t=e(64867);function a(i,o){o=o||new FormData;var u=[];function c(d){return d===null?"":t.isDate(d)?d.toISOString():t.isArrayBuffer(d)||t.isTypedArray(d)?typeof Blob=="function"?new Blob([d]):r.from(d):d}function l(d,p){if(t.isPlainObject(d)||t.isArray(d)){if(u.indexOf(d)!==-1)throw Error("Circular reference detected in "+p);u.push(d),t.forEach(d,function(_,y){if(!t.isUndefined(_)){var I=p?p+"."+y:y,S;if(_&&!p&&typeof _=="object"){if(t.endsWith(y,"{}"))_=JSON.stringify(_);else if(t.endsWith(y,"[]")&&(S=t.toArray(_))){S.forEach(function(A){!t.isUndefined(A)&&o.append(I,c(A))});return}}l(_,I)}}),u.pop()}else o.append(p,c(d))}return l(i),o}f.exports=a},54875:function(f,v,e){"use strict";var r=e(97288).version,t=e(82648),a={};["object","boolean","number","function","string","symbol"].forEach(function(u,c){a[u]=function(d){return typeof d===u||"a"+(c<1?"n ":" ")+u}});var i={};a.transitional=function(c,l,d){function p(M,_){return"[Axios v"+r+"] Transitional option '"+M+"'"+_+(d?". "+d:"")}return function(M,_,y){if(c===!1)throw new t(p(_," has been removed"+(l?" in "+l:"")),t.ERR_DEPRECATED);return l&&!i[_]&&(i[_]=!0,console.warn(p(_," has been deprecated since v"+l+" and will be removed in the near future"))),c?c(M,_,y):!0}};function o(u,c,l){if(typeof u!="object")throw new t("options must be an object",t.ERR_BAD_OPTION_VALUE);for(var d=Object.keys(u),p=d.length;p-- >0;){var M=d[p],_=c[M];if(_){var y=u[M],I=y===void 0||_(y,M,u);if(I!==!0)throw new t("option "+M+" must be "+I,t.ERR_BAD_OPTION_VALUE);continue}if(l!==!0)throw new t("Unknown option "+M,t.ERR_BAD_OPTION)}}f.exports={assertOptions:o,validators:a}},64867:function(f,v,e){"use strict";var r=e(91849),t=Object.prototype.toString,a=function(L){return function(k){var re=t.call(k);return L[re]||(L[re]=re.slice(8,-1).toLowerCase())}}(Object.create(null));function i(L){return L=L.toLowerCase(),function(re){return a(re)===L}}function o(L){return Array.isArray(L)}function u(L){return typeof L=="undefined"}function c(L){return L!==null&&!u(L)&&L.constructor!==null&&!u(L.constructor)&&typeof L.constructor.isBuffer=="function"&&L.constructor.isBuffer(L)}var l=i("ArrayBuffer");function d(L){var k;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?k=ArrayBuffer.isView(L):k=L&&L.buffer&&l(L.buffer),k}function p(L){return typeof L=="string"}function M(L){return typeof L=="number"}function _(L){return L!==null&&typeof L=="object"}function y(L){if(a(L)!=="object")return!1;var k=Object.getPrototypeOf(L);return k===null||k===Object.prototype}var I=i("Date"),S=i("File"),A=i("Blob"),O=i("FileList");function j(L){return t.call(L)==="[object Function]"}function F(L){return _(L)&&j(L.pipe)}function J(L){var k="[object FormData]";return L&&(typeof FormData=="function"&&L instanceof FormData||t.call(L)===k||j(L.toString)&&L.toString()===k)}var D=i("URLSearchParams");function R(L){return L.trim?L.trim():L.replace(/^\s+|\s+$/g,"")}function U(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function ee(L,k){if(!(L===null||typeof L=="undefined"))if(typeof L!="object"&&(L=[L]),o(L))for(var re=0,K=L.length;re0;)me=K[ie],Ze[me]||(k[me]=L[me],Ze[me]=!0);L=Object.getPrototypeOf(L)}while(L&&(!re||re(L,k))&&L!==Object.prototype);return k}function Q(L,k,re){L=String(L),(re===void 0||re>L.length)&&(re=L.length),re-=k.length;var K=L.indexOf(k,re);return K!==-1&&K===re}function V(L){if(!L)return null;var k=L.length;if(u(k))return null;for(var re=new Array(k);k-- >0;)re[k]=L[k];return re}var W=function(L){return function(k){return L&&k instanceof L}}(typeof Uint8Array!="undefined"&&Object.getPrototypeOf(Uint8Array));f.exports={isArray:o,isArrayBuffer:l,isBuffer:c,isFormData:J,isArrayBufferView:d,isString:p,isNumber:M,isObject:_,isPlainObject:y,isUndefined:u,isDate:I,isFile:S,isBlob:A,isFunction:j,isStream:F,isURLSearchParams:D,isStandardBrowserEnv:U,forEach:ee,merge:de,extend:he,trim:R,stripBOM:ve,inherits:ce,toFlatObject:xe,kindOf:a,kindOfTest:i,endsWith:Q,toArray:V,isTypedArray:W,isFileList:O}},79742:function(f,v){"use strict";v.byteLength=c,v.toByteArray=d,v.fromByteArray=_;for(var e=[],r=[],t=typeof Uint8Array!="undefined"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=a.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var S=y.indexOf("=");S===-1&&(S=I);var A=S===I?0:4-S%4;return[S,A]}function c(y){var I=u(y),S=I[0],A=I[1];return(S+A)*3/4-A}function l(y,I,S){return(I+S)*3/4-S}function d(y){var I,S=u(y),A=S[0],O=S[1],j=new t(l(y,A,O)),F=0,J=O>0?A-4:A,D;for(D=0;D>16&255,j[F++]=I>>8&255,j[F++]=I&255;return O===2&&(I=r[y.charCodeAt(D)]<<2|r[y.charCodeAt(D+1)]>>4,j[F++]=I&255),O===1&&(I=r[y.charCodeAt(D)]<<10|r[y.charCodeAt(D+1)]<<4|r[y.charCodeAt(D+2)]>>2,j[F++]=I>>8&255,j[F++]=I&255),j}function p(y){return e[y>>18&63]+e[y>>12&63]+e[y>>6&63]+e[y&63]}function M(y,I,S){for(var A,O=[],j=I;jJ?J:F+j));return A===1?(I=y[S-1],O.push(e[I>>2]+e[I<<4&63]+"==")):A===2&&(I=(y[S-2]<<8)+y[S-1],O.push(e[I>>10]+e[I>>4&63]+e[I<<2&63]+"=")),O.join("")}},48764:function(f,v,e){"use strict";var r;var t=e(79742),a=e(80645),i=e(87300);v.lW=l,r=j,v.h2=50,l.TYPED_ARRAY_SUPPORT=e.g.TYPED_ARRAY_SUPPORT!==void 0?e.g.TYPED_ARRAY_SUPPORT:o(),r=u();function o(){try{var ye=new Uint8Array(1);return ye.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ye.foo()===42&&typeof ye.subarray=="function"&&ye.subarray(1,1).byteLength===0}catch(T){return!1}}function u(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(ye,T){if(u()=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return ye|0}function j(ye){return+ye!=ye&&(ye=0),l.alloc(+ye)}l.isBuffer=function(T){return!!(T!=null&&T._isBuffer)},l.compare=function(T,b){if(!l.isBuffer(T)||!l.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(T===b)return 0;for(var q=T.length,Ce=b.length,le=0,fe=Math.min(q,Ce);le>>1;case"base64":return rr(ye).length;default:if(q)return Wt(ye).length;T=(""+T).toLowerCase(),q=!0}}l.byteLength=F;function J(ye,T,b){var q=!1;if((T===void 0||T<0)&&(T=0),T>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,T>>>=0,b<=T))return"";for(ye||(ye="utf8");;)switch(ye){case"hex":return K(this,T,b);case"utf8":case"utf-8":return V(this,T,b);case"ascii":return k(this,T,b);case"latin1":case"binary":return re(this,T,b);case"base64":return Q(this,T,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,T,b);default:if(q)throw new TypeError("Unknown encoding: "+ye);ye=(ye+"").toLowerCase(),q=!0}}l.prototype._isBuffer=!0;function D(ye,T,b){var q=ye[T];ye[T]=ye[b],ye[b]=q}l.prototype.swap16=function(){var T=this.length;if(T%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var b=0;b0&&(T=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(T+=" ... ")),""},l.prototype.compare=function(T,b,q,Ce,le){if(!l.isBuffer(T))throw new TypeError("Argument must be a Buffer");if(b===void 0&&(b=0),q===void 0&&(q=T?T.length:0),Ce===void 0&&(Ce=0),le===void 0&&(le=this.length),b<0||q>T.length||Ce<0||le>this.length)throw new RangeError("out of range index");if(Ce>=le&&b>=q)return 0;if(Ce>=le)return-1;if(b>=q)return 1;if(b>>>=0,q>>>=0,Ce>>>=0,le>>>=0,this===T)return 0;for(var fe=le-Ce,pe=q-b,Re=Math.min(fe,pe),X=this.slice(Ce,le),je=T.slice(b,q),He=0;He2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,isNaN(b)&&(b=Ce?0:ye.length-1),b<0&&(b=ye.length+b),b>=ye.length){if(Ce)return-1;b=ye.length-1}else if(b<0)if(Ce)b=0;else return-1;if(typeof T=="string"&&(T=l.from(T,q)),l.isBuffer(T))return T.length===0?-1:U(ye,T,b,q,Ce);if(typeof T=="number")return T=T&255,l.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Ce?Uint8Array.prototype.indexOf.call(ye,T,b):Uint8Array.prototype.lastIndexOf.call(ye,T,b):U(ye,[T],b,q,Ce);throw new TypeError("val must be string, number or Buffer")}function U(ye,T,b,q,Ce){var le=1,fe=ye.length,pe=T.length;if(q!==void 0&&(q=String(q).toLowerCase(),q==="ucs2"||q==="ucs-2"||q==="utf16le"||q==="utf-16le")){if(ye.length<2||T.length<2)return-1;le=2,fe/=2,pe/=2,b/=2}function Re(We,Ue){return le===1?We[Ue]:We.readUInt16BE(Ue*le)}var X;if(Ce){var je=-1;for(X=b;Xfe&&(b=fe-pe),X=b;X>=0;X--){for(var He=!0,tt=0;ttCe&&(q=Ce)):q=Ce;var le=T.length;if(le%2!==0)throw new TypeError("Invalid hex string");q>le/2&&(q=le/2);for(var fe=0;fele)&&(q=le),T.length>0&&(q<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ce||(Ce="utf8");for(var fe=!1;;)switch(Ce){case"hex":return ee(this,T,b,q);case"utf8":case"utf-8":return de(this,T,b,q);case"ascii":return he(this,T,b,q);case"latin1":case"binary":return ve(this,T,b,q);case"base64":return ce(this,T,b,q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xe(this,T,b,q);default:if(fe)throw new TypeError("Unknown encoding: "+Ce);Ce=(""+Ce).toLowerCase(),fe=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(ye,T,b){return T===0&&b===ye.length?t.fromByteArray(ye):t.fromByteArray(ye.slice(T,b))}function V(ye,T,b){b=Math.min(ye.length,b);for(var q=[],Ce=T;Ce239?4:le>223?3:le>191?2:1;if(Ce+pe<=b){var Re,X,je,He;switch(pe){case 1:le<128&&(fe=le);break;case 2:Re=ye[Ce+1],(Re&192)===128&&(He=(le&31)<<6|Re&63,He>127&&(fe=He));break;case 3:Re=ye[Ce+1],X=ye[Ce+2],(Re&192)===128&&(X&192)===128&&(He=(le&15)<<12|(Re&63)<<6|X&63,He>2047&&(He<55296||He>57343)&&(fe=He));break;case 4:Re=ye[Ce+1],X=ye[Ce+2],je=ye[Ce+3],(Re&192)===128&&(X&192)===128&&(je&192)===128&&(He=(le&15)<<18|(Re&63)<<12|(X&63)<<6|je&63,He>65535&&He<1114112&&(fe=He))}}fe===null?(fe=65533,pe=1):fe>65535&&(fe-=65536,q.push(fe>>>10&1023|55296),fe=56320|fe&1023),q.push(fe),Ce+=pe}return L(q)}var W=4096;function L(ye){var T=ye.length;if(T<=W)return String.fromCharCode.apply(String,ye);for(var b="",q=0;qq)&&(b=q);for(var Ce="",le=T;leq&&(T=q),b<0?(b+=q,b<0&&(b=0)):b>q&&(b=q),bb)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUIntLE=function(T,b,q){T=T|0,b=b|0,q||me(T,b,this.length);for(var Ce=this[T],le=1,fe=0;++fe0&&(le*=256);)Ce+=this[T+--b]*le;return Ce},l.prototype.readUInt8=function(T,b){return b||me(T,1,this.length),this[T]},l.prototype.readUInt16LE=function(T,b){return b||me(T,2,this.length),this[T]|this[T+1]<<8},l.prototype.readUInt16BE=function(T,b){return b||me(T,2,this.length),this[T]<<8|this[T+1]},l.prototype.readUInt32LE=function(T,b){return b||me(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+this[T+3]*16777216},l.prototype.readUInt32BE=function(T,b){return b||me(T,4,this.length),this[T]*16777216+(this[T+1]<<16|this[T+2]<<8|this[T+3])},l.prototype.readIntLE=function(T,b,q){T=T|0,b=b|0,q||me(T,b,this.length);for(var Ce=this[T],le=1,fe=0;++fe=le&&(Ce-=Math.pow(2,8*b)),Ce},l.prototype.readIntBE=function(T,b,q){T=T|0,b=b|0,q||me(T,b,this.length);for(var Ce=b,le=1,fe=this[T+--Ce];Ce>0&&(le*=256);)fe+=this[T+--Ce]*le;return le*=128,fe>=le&&(fe-=Math.pow(2,8*b)),fe},l.prototype.readInt8=function(T,b){return b||me(T,1,this.length),this[T]&128?(255-this[T]+1)*-1:this[T]},l.prototype.readInt16LE=function(T,b){b||me(T,2,this.length);var q=this[T]|this[T+1]<<8;return q&32768?q|4294901760:q},l.prototype.readInt16BE=function(T,b){b||me(T,2,this.length);var q=this[T+1]|this[T]<<8;return q&32768?q|4294901760:q},l.prototype.readInt32LE=function(T,b){return b||me(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},l.prototype.readInt32BE=function(T,b){return b||me(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},l.prototype.readFloatLE=function(T,b){return b||me(T,4,this.length),a.read(this,T,!0,23,4)},l.prototype.readFloatBE=function(T,b){return b||me(T,4,this.length),a.read(this,T,!1,23,4)},l.prototype.readDoubleLE=function(T,b){return b||me(T,8,this.length),a.read(this,T,!0,52,8)},l.prototype.readDoubleBE=function(T,b){return b||me(T,8,this.length),a.read(this,T,!1,52,8)};function Ze(ye,T,b,q,Ce,le){if(!l.isBuffer(ye))throw new TypeError('"buffer" argument must be a Buffer instance');if(T>Ce||Tye.length)throw new RangeError("Index out of range")}l.prototype.writeUIntLE=function(T,b,q,Ce){if(T=+T,b=b|0,q=q|0,!Ce){var le=Math.pow(2,8*q)-1;Ze(this,T,b,q,le,0)}var fe=1,pe=0;for(this[b]=T&255;++pe=0&&(pe*=256);)this[b+fe]=T/pe&255;return b+q},l.prototype.writeUInt8=function(T,b,q){return T=+T,b=b|0,q||Ze(this,T,b,1,255,0),l.TYPED_ARRAY_SUPPORT||(T=Math.floor(T)),this[b]=T&255,b+1};function De(ye,T,b,q){T<0&&(T=65535+T+1);for(var Ce=0,le=Math.min(ye.length-b,2);Ce>>(q?Ce:1-Ce)*8}l.prototype.writeUInt16LE=function(T,b,q){return T=+T,b=b|0,q||Ze(this,T,b,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[b]=T&255,this[b+1]=T>>>8):De(this,T,b,!0),b+2},l.prototype.writeUInt16BE=function(T,b,q){return T=+T,b=b|0,q||Ze(this,T,b,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[b]=T>>>8,this[b+1]=T&255):De(this,T,b,!1),b+2};function Fe(ye,T,b,q){T<0&&(T=4294967295+T+1);for(var Ce=0,le=Math.min(ye.length-b,4);Ce>>(q?Ce:3-Ce)*8&255}l.prototype.writeUInt32LE=function(T,b,q){return T=+T,b=b|0,q||Ze(this,T,b,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[b+3]=T>>>24,this[b+2]=T>>>16,this[b+1]=T>>>8,this[b]=T&255):Fe(this,T,b,!0),b+4},l.prototype.writeUInt32BE=function(T,b,q){return T=+T,b=b|0,q||Ze(this,T,b,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[b]=T>>>24,this[b+1]=T>>>16,this[b+2]=T>>>8,this[b+3]=T&255):Fe(this,T,b,!1),b+4},l.prototype.writeIntLE=function(T,b,q,Ce){if(T=+T,b=b|0,!Ce){var le=Math.pow(2,8*q-1);Ze(this,T,b,q,le-1,-le)}var fe=0,pe=1,Re=0;for(this[b]=T&255;++fe>0)-Re&255;return b+q},l.prototype.writeIntBE=function(T,b,q,Ce){if(T=+T,b=b|0,!Ce){var le=Math.pow(2,8*q-1);Ze(this,T,b,q,le-1,-le)}var fe=q-1,pe=1,Re=0;for(this[b+fe]=T&255;--fe>=0&&(pe*=256);)T<0&&Re===0&&this[b+fe+1]!==0&&(Re=1),this[b+fe]=(T/pe>>0)-Re&255;return b+q},l.prototype.writeInt8=function(T,b,q){return T=+T,b=b|0,q||Ze(this,T,b,1,127,-128),l.TYPED_ARRAY_SUPPORT||(T=Math.floor(T)),T<0&&(T=255+T+1),this[b]=T&255,b+1},l.prototype.writeInt16LE=function(T,b,q){return T=+T,b=b|0,q||Ze(this,T,b,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[b]=T&255,this[b+1]=T>>>8):De(this,T,b,!0),b+2},l.prototype.writeInt16BE=function(T,b,q){return T=+T,b=b|0,q||Ze(this,T,b,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[b]=T>>>8,this[b+1]=T&255):De(this,T,b,!1),b+2},l.prototype.writeInt32LE=function(T,b,q){return T=+T,b=b|0,q||Ze(this,T,b,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[b]=T&255,this[b+1]=T>>>8,this[b+2]=T>>>16,this[b+3]=T>>>24):Fe(this,T,b,!0),b+4},l.prototype.writeInt32BE=function(T,b,q){return T=+T,b=b|0,q||Ze(this,T,b,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),l.TYPED_ARRAY_SUPPORT?(this[b]=T>>>24,this[b+1]=T>>>16,this[b+2]=T>>>8,this[b+3]=T&255):Fe(this,T,b,!1),b+4};function mt(ye,T,b,q,Ce,le){if(b+q>ye.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function ht(ye,T,b,q,Ce){return Ce||mt(ye,T,b,4,34028234663852886e22,-34028234663852886e22),a.write(ye,T,b,q,23,4),b+4}l.prototype.writeFloatLE=function(T,b,q){return ht(this,T,b,!0,q)},l.prototype.writeFloatBE=function(T,b,q){return ht(this,T,b,!1,q)};function xt(ye,T,b,q,Ce){return Ce||mt(ye,T,b,8,17976931348623157e292,-17976931348623157e292),a.write(ye,T,b,q,52,8),b+8}l.prototype.writeDoubleLE=function(T,b,q){return xt(this,T,b,!0,q)},l.prototype.writeDoubleBE=function(T,b,q){return xt(this,T,b,!1,q)},l.prototype.copy=function(T,b,q,Ce){if(q||(q=0),!Ce&&Ce!==0&&(Ce=this.length),b>=T.length&&(b=T.length),b||(b=0),Ce>0&&Ce=this.length)throw new RangeError("sourceStart out of bounds");if(Ce<0)throw new RangeError("sourceEnd out of bounds");Ce>this.length&&(Ce=this.length),T.length-b=0;--fe)T[fe+b]=this[fe+q];else if(le<1e3||!l.TYPED_ARRAY_SUPPORT)for(fe=0;fe>>0,q=q===void 0?this.length:q>>>0,T||(T=0);var fe;if(typeof T=="number")for(fe=b;fe55295&&b<57344){if(!Ce){if(b>56319){(T-=3)>-1&&le.push(239,191,189);continue}else if(fe+1===q){(T-=3)>-1&&le.push(239,191,189);continue}Ce=b;continue}if(b<56320){(T-=3)>-1&&le.push(239,191,189),Ce=b;continue}b=(Ce-55296<<10|b-56320)+65536}else Ce&&(T-=3)>-1&&le.push(239,191,189);if(Ce=null,b<128){if((T-=1)<0)break;le.push(b)}else if(b<2048){if((T-=2)<0)break;le.push(b>>6|192,b&63|128)}else if(b<65536){if((T-=3)<0)break;le.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((T-=4)<0)break;le.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return le}function Bt(ye){for(var T=[],b=0;b>8,Ce=b%256,le.push(Ce),le.push(q);return le}function rr(ye){return t.toByteArray(ct(ye))}function Sr(ye,T,b,q){for(var Ce=0;Ce=T.length||Ce>=ye.length);++Ce)T[Ce+b]=ye[Ce];return Ce}function Ar(ye){return ye!==ye}},87300:function(f){var v={}.toString;f.exports=Array.isArray||function(e){return v.call(e)=="[object Array]"}},94184:function(f,v){var e,r;(function(){"use strict";var t={}.hasOwnProperty,a="[native code]";function i(){for(var o=[],u=0;u1?arguments[1]:void 0,J=j>2?arguments[2]:void 0;return new(d("Promise"))(function(D){var R=t(A);F!==void 0&&(F=r(F,J));var U=c(R,y),ee=U?void 0:u(R)||I,de=a(O)?new O:[],he=U?i(R,U):new M(o(R,ee));D(_(he,F,de))})}},97745:function(f,v,e){var r=e(26244);f.exports=function(t,a){for(var i=0,o=r(a),u=new t(o);o>i;)u[i]=a[i++];return u}},61386:function(f,v,e){var r=e(17854),t=e(49974),a=e(1702),i=e(68361),o=e(47908),u=e(34948),c=e(26244),l=e(70030),d=e(97745),p=r.Array,M=a([].push);f.exports=function(_,y,I,S){for(var A=o(_),O=i(A),j=t(y,I),F=l(null),J=c(O),D=0,R,U,ee;J>D;D++)ee=O[D],U=u(j(ee,D,A)),U in F?M(F[U],ee):F[U]=[ee];if(S&&(R=S(A),R!==p))for(U in F)F[U]=d(R,F[U]);return F}},41318:function(f,v,e){var r=e(45656),t=e(51400),a=e(26244),i=function(o){return function(u,c,l){var d=r(u),p=a(d),M=t(l,p),_;if(o&&c!=c){for(;p>M;)if(_=d[M++],_!=_)return!0}else for(;p>M;M++)if((o||M in d)&&d[M]===c)return o||M||0;return!o&&-1}};f.exports={includes:i(!0),indexOf:i(!1)}},9671:function(f,v,e){var r=e(49974),t=e(68361),a=e(47908),i=e(26244),o=function(u){var c=u==1;return function(l,d,p){for(var M=a(l),_=t(M),y=r(d,p),I=i(_),S,A;I-- >0;)if(S=_[I],A=y(S,I,M),A)switch(u){case 0:return S;case 1:return I}return c?-1:void 0}};f.exports={findLast:o(0),findLastIndex:o(1)}},42092:function(f,v,e){var r=e(49974),t=e(1702),a=e(68361),i=e(47908),o=e(26244),u=e(65417),c=t([].push),l=function(d){var p=d==1,M=d==2,_=d==3,y=d==4,I=d==6,S=d==7,A=d==5||I;return function(O,j,F,J){for(var D=i(O),R=a(D),U=r(j,F),ee=o(R),de=0,he=J||u,ve=p?he(O,ee):M||S?he(O,0):void 0,ce,xe;ee>de;de++)if((A||de in R)&&(ce=R[de],xe=U(ce,de,D),d))if(p)ve[de]=xe;else if(xe)switch(d){case 3:return!0;case 5:return ce;case 6:return de;case 2:c(ve,ce)}else switch(d){case 4:return!1;case 7:c(ve,ce)}return I?-1:_||y?y:ve}};f.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},9341:function(f,v,e){"use strict";var r=e(47293);f.exports=function(t,a){var i=[][t];return!!i&&r(function(){i.call(null,a||function(){return 1},1)})}},53671:function(f,v,e){var r=e(17854),t=e(19662),a=e(47908),i=e(68361),o=e(26244),u=r.TypeError,c=function(l){return function(d,p,M,_){t(p);var y=a(d),I=i(y),S=o(y),A=l?S-1:0,O=l?-1:1;if(M<2)for(;;){if(A in I){_=I[A],A+=O;break}if(A+=O,l?A<0:S<=A)throw u("Reduce of empty array with no initial value")}for(;l?A>=0:S>A;A+=O)A in I&&(_=p(_,I[A],A,y));return _}};f.exports={left:c(!1),right:c(!0)}},41589:function(f,v,e){var r=e(17854),t=e(51400),a=e(26244),i=e(86135),o=r.Array,u=Math.max;f.exports=function(c,l,d){for(var p=a(c),M=t(l,p),_=t(d===void 0?p:d,p),y=o(u(_-M,0)),I=0;M<_;M++,I++)i(y,I,c[M]);return y.length=I,y}},50206:function(f,v,e){var r=e(1702);f.exports=r([].slice)},77475:function(f,v,e){var r=e(17854),t=e(43157),a=e(4411),i=e(70111),o=e(5112),u=o("species"),c=r.Array;f.exports=function(l){var d;return t(l)&&(d=l.constructor,a(d)&&(d===c||t(d.prototype))?d=void 0:i(d)&&(d=d[u],d===null&&(d=void 0))),d===void 0?c:d}},65417:function(f,v,e){var r=e(77475);f.exports=function(t,a){return new(r(t))(a===0?0:a)}},21843:function(f,v,e){var r=e(26244);f.exports=function(t,a){for(var i=r(t),o=new a(i),u=0;uc)throw i("Maximum allowed length exceeded");for(J=new d(F);A=d||M<0)throw i("Incorrect index");for(var _=new u(d),y=0;yc&&D)throw l("The allowed number of iterations has been exceeded");j.resolve(i(t(F,S))).then(function(ve){try{if(i(ve).done)M?(O.length=J,R(O)):R(I?!1:y||void 0);else{var ce=ve.value;D?j.resolve(M?A(ce,J):A(ce)).then(function(xe){_?he():y?xe?he():ee(R,!1):M?(O[J++]=xe,he()):xe?ee(R,I||ce):he()},de):(O[J++]=ce,he())}}catch(xe){de(xe)}},de)}catch(ve){de(ve)}};he()})}};f.exports={toArray:d(0),forEach:d(1),every:d(2),some:d(3),find:d(4)}},66462:function(f,v,e){var r=e(17854),t=e(5465),a=e(60614),i=e(70030),o=e(79518),u=e(98052),c=e(5112),l=e(31913),d="USE_FUNCTION_CONSTRUCTOR",p=c("asyncIterator"),M=r.AsyncIterator,_=t.AsyncIteratorPrototype,y,I;if(_)y=_;else if(a(M))y=M.prototype;else if(t[d]||r[d])try{I=o(o(o(Function("return async function*(){}()")()))),o(I)===Object.prototype&&(y=I)}catch(S){}y?l&&(y=i(y)):y={},a(y[p])||u(y,p,function(){return this}),f.exports=y},53411:function(f,v,e){var r=e(19670),t=e(99212);f.exports=function(a,i,o,u){try{return u?i(r(o)[0],o[1]):i(o)}catch(c){t(a,"throw",c)}}},17072:function(f,v,e){var r=e(5112),t=r("iterator"),a=!1;try{var i=0,o={next:function(){return{done:!!i++}},return:function(){a=!0}};o[t]=function(){return this},Array.from(o,function(){throw 2})}catch(u){}f.exports=function(u,c){if(!c&&!a)return!1;var l=!1;try{var d={};d[t]=function(){return{next:function(){return{done:l=!0}}}},u(d)}catch(p){}return l}},84326:function(f,v,e){var r=e(1702),t=r({}.toString),a=r("".slice);f.exports=function(i){return a(t(i),8,-1)}},70648:function(f,v,e){var r=e(17854),t=e(51694),a=e(60614),i=e(84326),o=e(5112),u=o("toStringTag"),c=r.Object,l=i(function(){return arguments}())=="Arguments",d=function(p,M){try{return p[M]}catch(_){}};f.exports=t?i:function(p){var M,_,y;return p===void 0?"Undefined":p===null?"Null":typeof(_=d(M=c(p),u))=="string"?_:l?i(M):(y=i(M))=="Object"&&a(M.callee)?"Arguments":y}},77741:function(f,v,e){var r=e(1702),t=Error,a=r("".replace),i=function(c){return String(t(c).stack)}("zxcasd"),o=/\n\s*at [^:]*:[^\n]*/,u=o.test(i);f.exports=function(c,l){if(u&&typeof c=="string"&&!t.prepareStackTrace)for(;l--;)c=a(c,o,"");return c}},31501:function(f,v,e){"use strict";var r=e(46916),t=e(19662),a=e(19670);f.exports=function(){for(var o=a(this),u=t(o.add),c=0,l=arguments.length;c1?arguments[1]:void 0,M,_,y,I;return i(this),M=p!==void 0,M&&a(p),l==null?new this:(_=[],M?(y=0,I=r(p,d>2?arguments[2]:void 0),o(l,function(S){t(u,_,I(S,y++))})):o(l,u,{that:_}),new this(_))}},82044:function(f,v,e){"use strict";var r=e(50206);f.exports=function(){return new this(r(arguments))}},95631:function(f,v,e){"use strict";var r=e(3070).f,t=e(70030),a=e(89190),i=e(49974),o=e(25787),u=e(20408),c=e(70654),l=e(96340),d=e(19781),p=e(62423).fastKey,M=e(29909),_=M.set,y=M.getterFor;f.exports={getConstructor:function(I,S,A,O){var j=I(function(U,ee){o(U,F),_(U,{type:S,index:t(null),first:void 0,last:void 0,size:0}),d||(U.size=0),ee!=null&&u(ee,U[O],{that:U,AS_ENTRIES:A})}),F=j.prototype,J=y(S),D=function(U,ee,de){var he=J(U),ve=R(U,ee),ce,xe;return ve?ve.value=de:(he.last=ve={index:xe=p(ee,!0),key:ee,value:de,previous:ce=he.last,next:void 0,removed:!1},he.first||(he.first=ve),ce&&(ce.next=ve),d?he.size++:U.size++,xe!=="F"&&(he.index[xe]=ve)),U},R=function(U,ee){var de=J(U),he=p(ee),ve;if(he!=="F")return de.index[he];for(ve=de.first;ve;ve=ve.next)if(ve.key==ee)return ve};return a(F,{clear:function(){for(var ee=this,de=J(ee),he=de.index,ve=de.first;ve;)ve.removed=!0,ve.previous&&(ve.previous=ve.previous.next=void 0),delete he[ve.index],ve=ve.next;de.first=de.last=void 0,d?de.size=0:ee.size=0},delete:function(U){var ee=this,de=J(ee),he=R(ee,U);if(he){var ve=he.next,ce=he.previous;delete de.index[he.index],he.removed=!0,ce&&(ce.next=ve),ve&&(ve.previous=ce),de.first==he&&(de.first=ve),de.last==he&&(de.last=ce),d?de.size--:ee.size--}return!!he},forEach:function(ee){for(var de=J(this),he=i(ee,arguments.length>1?arguments[1]:void 0),ve;ve=ve?ve.next:de.first;)for(he(ve.value,ve.key,this);ve&&ve.removed;)ve=ve.previous},has:function(ee){return!!R(this,ee)}}),a(F,A?{get:function(ee){var de=R(this,ee);return de&&de.value},set:function(ee,de){return D(this,ee===0?0:ee,de)}}:{add:function(ee){return D(this,ee=ee===0?0:ee,ee)}}),d&&r(F,"size",{get:function(){return J(this).size}}),j},setStrong:function(I,S,A){var O=S+" Iterator",j=y(S),F=y(O);c(I,S,function(J,D){_(this,{type:O,target:J,state:j(J),kind:D,last:void 0})},function(){for(var J=F(this),D=J.kind,R=J.last;R&&R.removed;)R=R.previous;return!J.target||!(J.last=R=R?R.next:J.state.first)?(J.target=void 0,{value:void 0,done:!0}):D=="keys"?{value:R.key,done:!1}:D=="values"?{value:R.value,done:!1}:{value:[R.key,R.value],done:!1}},A?"entries":"values",!A,!0),l(S)}}},29320:function(f,v,e){"use strict";var r=e(1702),t=e(89190),a=e(62423).getWeakData,i=e(19670),o=e(70111),u=e(25787),c=e(20408),l=e(42092),d=e(92597),p=e(29909),M=p.set,_=p.getterFor,y=l.find,I=l.findIndex,S=r([].splice),A=0,O=function(J){return J.frozen||(J.frozen=new j)},j=function(){this.entries=[]},F=function(J,D){return y(J.entries,function(R){return R[0]===D})};j.prototype={get:function(J){var D=F(this,J);if(D)return D[1]},has:function(J){return!!F(this,J)},set:function(J,D){var R=F(this,J);R?R[1]=D:this.entries.push([J,D])},delete:function(J){var D=I(this.entries,function(R){return R[0]===J});return~D&&S(this.entries,D,1),!!~D}},f.exports={getConstructor:function(J,D,R,U){var ee=J(function(ce,xe){u(ce,de),M(ce,{type:D,id:A++,frozen:void 0}),xe!=null&&c(xe,ce[U],{that:ce,AS_ENTRIES:R})}),de=ee.prototype,he=_(D),ve=function(ce,xe,Q){var V=he(ce),W=a(i(xe),!0);return W===!0?O(V).set(xe,Q):W[V.id]=Q,ce};return t(de,{delete:function(ce){var xe=he(this);if(!o(ce))return!1;var Q=a(ce);return Q===!0?O(xe).delete(ce):Q&&d(Q,xe.id)&&delete Q[xe.id]},has:function(xe){var Q=he(this);if(!o(xe))return!1;var V=a(xe);return V===!0?O(Q).has(xe):V&&d(V,Q.id)}}),t(de,R?{get:function(xe){var Q=he(this);if(o(xe)){var V=a(xe);return V===!0?O(Q).get(xe):V?V[Q.id]:void 0}},set:function(xe,Q){return ve(this,xe,Q)}}:{add:function(xe){return ve(this,xe,!0)}}),ee}}},77710:function(f,v,e){"use strict";var r=e(82109),t=e(17854),a=e(1702),i=e(54705),o=e(98052),u=e(62423),c=e(20408),l=e(25787),d=e(60614),p=e(70111),M=e(47293),_=e(17072),y=e(58003),I=e(79587);f.exports=function(S,A,O){var j=S.indexOf("Map")!==-1,F=S.indexOf("Weak")!==-1,J=j?"set":"add",D=t[S],R=D&&D.prototype,U=D,ee={},de=function(W){var L=a(R[W]);o(R,W,W=="add"?function(re){return L(this,re===0?0:re),this}:W=="delete"?function(k){return F&&!p(k)?!1:L(this,k===0?0:k)}:W=="get"?function(re){return F&&!p(re)?void 0:L(this,re===0?0:re)}:W=="has"?function(re){return F&&!p(re)?!1:L(this,re===0?0:re)}:function(re,K){return L(this,re===0?0:re,K),this})},he=i(S,!d(D)||!(F||R.forEach&&!M(function(){new D().entries().next()})));if(he)U=O.getConstructor(A,S,j,J),u.enable();else if(i(S,!0)){var ve=new U,ce=ve[J](F?{}:-0,1)!=ve,xe=M(function(){ve.has(1)}),Q=_(function(W){new D(W)}),V=!F&&M(function(){for(var W=new D,L=5;L--;)W[J](L,L);return!W.has(-0)});Q||(U=A(function(W,L){l(W,R);var k=I(new D,W,U);return L!=null&&c(L,k[J],{that:k,AS_ENTRIES:j}),k}),U.prototype=R,R.constructor=U),(xe||V)&&(de("delete"),de("has"),j&&de("get")),(V||ce)&&de(J),F&&R.clear&&delete R.clear}return ee[S]=U,r({global:!0,forced:U!=D},ee),y(U,S),F||O.setStrong(U,S,j),U}},10313:function(f,v,e){e(51532),e(4129);var r=e(17854),t=e(35005),a=e(70030),i=e(70111),o=r.Object,u=r.TypeError,c=t("Map"),l=t("WeakMap"),d=function(){this.object=null,this.symbol=null,this.primitives=null,this.objectsByIndex=a(null)};d.prototype.get=function(M,_){return this[M]||(this[M]=_())},d.prototype.next=function(M,_,y){var I=y?this.objectsByIndex[M]||(this.objectsByIndex[M]=new l):this.primitives||(this.primitives=new c),S=I.get(_);return S||I.set(_,S=new d),S};var p=new d;f.exports=function(){var M=p,_=arguments.length,y,I;for(y=0;y<_;y++)i(I=arguments[y])&&(M=M.next(y,I,!0));if(this===o&&M===p)throw u("Composite keys must contain a non-primitive component");for(y=0;y<_;y++)i(I=arguments[y])||(M=M.next(y,I,!1));return M}},99920:function(f,v,e){var r=e(92597),t=e(53887),a=e(31236),i=e(3070);f.exports=function(o,u,c){for(var l=t(u),d=i.f,p=a.f,M=0;M0&&c[0]<4?1:+(c[0]+c[1])),!l&&t&&(c=t.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=t.match(/Chrome\/(\d+)/),c&&(l=+c[1]))),f.exports=l},98770:function(f,v,e){var r=e(17854);f.exports=function(t){return r[t].prototype}},80748:function(f){f.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},22914:function(f,v,e){var r=e(47293),t=e(79114);f.exports=!r(function(){var a=Error("a");return"stack"in a?(Object.defineProperty(a,"stack",t(1,7)),a.stack!==7):!0})},82109:function(f,v,e){var r=e(17854),t=e(31236).f,a=e(68880),i=e(98052),o=e(83505),u=e(99920),c=e(54705);f.exports=function(l,d){var p=l.target,M=l.global,_=l.stat,y,I,S,A,O,j;if(M?I=r:_?I=r[p]||o(p,{}):I=(r[p]||{}).prototype,I)for(S in d){if(O=d[S],l.noTargetGet?(j=t(I,S),A=j&&j.value):A=I[S],y=c(M?S:p+(_?".":"#")+S,l.forced),!y&&A!==void 0){if(typeof O==typeof A)continue;u(O,A)}(l.sham||A&&A.sham)&&a(O,"sham",!0),i(I,S,O,l)}}},47293:function(f){f.exports=function(v){try{return!!v()}catch(e){return!0}}},76677:function(f,v,e){var r=e(47293);f.exports=!r(function(){return Object.isExtensible(Object.preventExtensions({}))})},22104:function(f,v,e){var r=e(34374),t=Function.prototype,a=t.apply,i=t.call;f.exports=typeof Reflect=="object"&&Reflect.apply||(r?i.bind(a):function(){return i.apply(a,arguments)})},49974:function(f,v,e){var r=e(1702),t=e(19662),a=e(34374),i=r(r.bind);f.exports=function(o,u){return t(o),u===void 0?o:a?i(o,u):function(){return o.apply(u,arguments)}}},34374:function(f,v,e){var r=e(47293);f.exports=!r(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")})},46916:function(f,v,e){var r=e(34374),t=Function.prototype.call;f.exports=r?t.bind(t):function(){return t.apply(t,arguments)}},76530:function(f,v,e){var r=e(19781),t=e(92597),a=Function.prototype,i=r&&Object.getOwnPropertyDescriptor,o=t(a,"name"),u=o&&function(){}.name==="something",c=o&&(!r||r&&i(a,"name").configurable);f.exports={EXISTS:o,PROPER:u,CONFIGURABLE:c}},1702:function(f,v,e){var r=e(34374),t=Function.prototype,a=t.bind,i=t.call,o=r&&a.bind(i,i);f.exports=r?function(u){return u&&o(u)}:function(u){return u&&function(){return i.apply(u,arguments)}}},54777:function(f,v,e){var r=e(46916),t=e(28091),a=e(19670),i=e(18554),o=e(58173),u=e(5112),c=u("asyncIterator");f.exports=function(l,d){var p=arguments.length<2?o(l,c):d;return p?a(r(p,l)):new t(i(l))}},35005:function(f,v,e){var r=e(17854),t=e(60614),a=function(i){return t(i)?i:void 0};f.exports=function(i,o){return arguments.length<2?a(r[i]):r[i]&&r[i][o]}},71246:function(f,v,e){var r=e(70648),t=e(58173),a=e(97497),i=e(5112),o=i("iterator");f.exports=function(u){if(u!=null)return t(u,o)||t(u,"@@iterator")||a[r(u)]}},18554:function(f,v,e){var r=e(17854),t=e(46916),a=e(19662),i=e(19670),o=e(66330),u=e(71246),c=r.TypeError;f.exports=function(l,d){var p=arguments.length<2?u(l):d;if(a(p))return i(t(p,l));throw c(o(l)+" is not iterable")}},54647:function(f,v,e){var r=e(46916);f.exports=function(t){return r(Map.prototype.entries,t)}},58173:function(f,v,e){var r=e(19662);f.exports=function(t,a){var i=t[a];return i==null?void 0:r(i)}},96767:function(f,v,e){var r=e(46916);f.exports=function(t){return r(Set.prototype.values,t)}},10647:function(f,v,e){var r=e(1702),t=e(47908),a=Math.floor,i=r("".charAt),o=r("".replace),u=r("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;f.exports=function(d,p,M,_,y,I){var S=M+d.length,A=_.length,O=l;return y!==void 0&&(y=t(y),O=c),o(I,O,function(j,F){var J;switch(i(F,0)){case"$":return"$";case"&":return d;case"`":return u(p,0,M);case"'":return u(p,S);case"<":J=y[u(F,1,-1)];break;default:var D=+F;if(D===0)return j;if(D>A){var R=a(D/10);return R===0?j:R<=A?_[R-1]===void 0?i(F,1):_[R-1]+i(F,1):j}J=_[D-1]}return J===void 0?"":J})}},17854:function(f,v,e){var r=function(t){return t&&t.Math==Math&&t};f.exports=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof e.g=="object"&&e.g)||function(){return this}()||Function("return this")()},92597:function(f,v,e){var r=e(1702),t=e(47908),a=r({}.hasOwnProperty);f.exports=Object.hasOwn||function(o,u){return a(t(o),u)}},3501:function(f){f.exports={}},842:function(f,v,e){var r=e(17854);f.exports=function(t,a){var i=r.console;i&&i.error&&(arguments.length==1?i.error(t):i.error(t,a))}},60490:function(f,v,e){var r=e(35005);f.exports=r("document","documentElement")},64664:function(f,v,e){var r=e(19781),t=e(47293),a=e(80317);f.exports=!r&&!t(function(){return Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a!=7})},68361:function(f,v,e){var r=e(17854),t=e(1702),a=e(47293),i=e(84326),o=r.Object,u=t("".split);f.exports=a(function(){return!o("z").propertyIsEnumerable(0)})?function(c){return i(c)=="String"?u(c,""):o(c)}:o},79587:function(f,v,e){var r=e(60614),t=e(70111),a=e(27674);f.exports=function(i,o,u){var c,l;return a&&r(c=o.constructor)&&c!==u&&t(l=c.prototype)&&l!==u.prototype&&a(i,l),i}},42788:function(f,v,e){var r=e(1702),t=e(60614),a=e(5465),i=r(Function.toString);t(a.inspectSource)||(a.inspectSource=function(o){return i(o)}),f.exports=a.inspectSource},58340:function(f,v,e){var r=e(70111),t=e(68880);f.exports=function(a,i){r(i)&&"cause"in i&&t(a,"cause",i.cause)}},62423:function(f,v,e){var r=e(82109),t=e(1702),a=e(3501),i=e(70111),o=e(92597),u=e(3070).f,c=e(8006),l=e(1156),d=e(52050),p=e(69711),M=e(76677),_=!1,y=p("meta"),I=0,S=function(D){u(D,y,{value:{objectID:"O"+I++,weakData:{}}})},A=function(D,R){if(!i(D))return typeof D=="symbol"?D:(typeof D=="string"?"S":"P")+D;if(!o(D,y)){if(!d(D))return"F";if(!R)return"E";S(D)}return D[y].objectID},O=function(D,R){if(!o(D,y)){if(!d(D))return!0;if(!R)return!1;S(D)}return D[y].weakData},j=function(D){return M&&_&&d(D)&&!o(D,y)&&S(D),D},F=function(){J.enable=function(){},_=!0;var D=c.f,R=t([].splice),U={};U[y]=1,D(U).length&&(c.f=function(ee){for(var de=D(ee),he=0,ve=de.length;hede;de++)if(ve=V(S[de]),ve&&l(I,ve))return ve;return new y(!1)}U=d(S,ee)}for(ce=U.next;!(xe=a(ce,U)).done;){try{ve=V(xe.value)}catch(W){M(U,"throw",W)}if(typeof ve=="object"&&ve&&l(I,ve))return ve}return new y(!1)}},99212:function(f,v,e){var r=e(46916),t=e(19670),a=e(58173);f.exports=function(i,o,u){var c,l;t(i);try{if(c=a(i,"return"),!c){if(o==="throw")throw u;return u}c=r(c,i)}catch(d){l=!0,c=d}if(o==="throw")throw u;if(l)throw c;return t(c),u}},54956:function(f,v,e){"use strict";var r=e(46916),t=e(19662),a=e(19670),i=e(70030),o=e(68880),u=e(89190),c=e(5112),l=e(29909),d=e(58173),p=e(13383).IteratorPrototype,M="IteratorProxy",_=l.set,y=l.getterFor(M),I=c("toStringTag");f.exports=function(S,A){var O=function(F){F.type=M,F.next=t(F.iterator.next),F.done=!1,F.ignoreArg=!A,_(this,F)};return O.prototype=u(i(p),{next:function(F){var J=y(this),D=arguments.length?[J.ignoreArg?void 0:F]:A?[]:[void 0];J.ignoreArg=!1;var R=J.done?void 0:r(S,J,D);return{done:J.done,value:R}},return:function(j){var F=y(this),J=F.iterator;F.done=!0;var D=d(J,"return");return{done:!0,value:D?a(r(D,J,j)).value:j}},throw:function(j){var F=y(this),J=F.iterator;F.done=!0;var D=d(J,"throw");if(D)return r(D,J,j);throw j}}),A||o(O.prototype,I,"Generator"),O}},13383:function(f,v,e){"use strict";var r=e(47293),t=e(60614),a=e(70030),i=e(79518),o=e(98052),u=e(5112),c=e(31913),l=u("iterator"),d=!1,p,M,_;[].keys&&(_=[].keys(),"next"in _?(M=i(i(_)),M!==Object.prototype&&(p=M)):d=!0);var y=p==null||r(function(){var I={};return p[l].call(I)!==I});y?p={}:c&&(p=a(p)),t(p[l])||o(p,l,function(){return this}),f.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:d}},97497:function(f){f.exports={}},26244:function(f,v,e){var r=e(17466);f.exports=function(t){return r(t.length)}},56339:function(f,v,e){var r=e(47293),t=e(60614),a=e(92597),i=e(3070).f,o=e(76530).CONFIGURABLE,u=e(42788),c=e(29909),l=c.enforce,d=c.get,p=!r(function(){return i(function(){},"length",{value:8}).length!==8}),M=String(String).split("String"),_=f.exports=function(y,I,S){String(I).slice(0,7)==="Symbol("&&(I="["+String(I).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),S&&S.getter&&(I="get "+I),S&&S.setter&&(I="set "+I),(!a(y,"name")||o&&y.name!==I)&&i(y,"name",{value:I,configurable:!0}),p&&S&&a(S,"arity")&&y.length!==S.arity&&i(y,"length",{value:S.arity});var A=l(y);return a(A,"source")||(A.source=M.join(typeof I=="string"?I:"")),y};Function.prototype.toString=_(function(){return t(this)&&d(this).source||u(this)},"toString")},37502:function(f,v,e){"use strict";var r=e(46916),t=e(19662),a=e(19670);f.exports=function(o,u){var c=a(this),l=t(c.get),d=t(c.has),p=t(c.set),M=r(d,c,o)&&"update"in u?u.update(r(l,c,o),o,c):u.insert(o,c);return r(p,c,o,M),M}},8154:function(f,v,e){"use strict";var r=e(17854),t=e(46916),a=e(19662),i=e(60614),o=e(19670),u=r.TypeError;f.exports=function(l,d){var p=o(this),M=a(p.get),_=a(p.has),y=a(p.set),I=arguments.length>2?arguments[2]:void 0,S;if(!i(d)&&!i(I))throw u("At least one callback required");return t(_,p,l)?(S=t(M,p,l),i(d)&&(S=d(S),t(y,p,l,S))):i(I)&&(S=I(),t(y,p,l,S)),S}},26130:function(f,v,e){var r=e(64310),t=Math.abs,a=Math.pow,i=a(2,-52),o=a(2,-23),u=a(2,127)*(2-o),c=a(2,-126),l=function(d){return d+1/i-1/i};f.exports=Math.fround||function(p){var M=t(p),_=r(p),y,I;return Mu||I!=I?_*(1/0):_*I)}},47103:function(f){f.exports=Math.scale||function(e,r,t,a,i){var o=+e,u=+r,c=+t,l=+a,d=+i;return o!=o||u!=u||c!=c||l!=l||d!=d?NaN:o===1/0||o===-1/0?o:(o-u)*(d-l)/(c-u)+l}},64310:function(f){f.exports=Math.sign||function(e){return(e=+e)==0||e!=e?e:e<0?-1:1}},30133:function(f,v,e){var r=e(7392),t=e(47293);f.exports=!!Object.getOwnPropertySymbols&&!t(function(){var a=Symbol();return!String(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&r&&r<41})},68536:function(f,v,e){var r=e(17854),t=e(60614),a=e(42788),i=r.WeakMap;f.exports=t(i)&&/native code/.test(a(i))},78523:function(f,v,e){"use strict";var r=e(19662),t=function(a){var i,o;this.promise=new a(function(u,c){if(i!==void 0||o!==void 0)throw TypeError("Bad Promise constructor");i=u,o=c}),this.resolve=r(i),this.reject=r(o)};f.exports.f=function(a){return new t(a)}},56277:function(f,v,e){var r=e(41340);f.exports=function(t,a){return t===void 0?arguments.length<2?"":a:r(t)}},77023:function(f,v,e){var r=e(17854),t=r.isFinite;f.exports=Number.isFinite||function(i){return typeof i=="number"&&t(i)}},83009:function(f,v,e){var r=e(17854),t=e(47293),a=e(1702),i=e(41340),o=e(53111).trim,u=e(81361),c=r.parseInt,l=r.Symbol,d=l&&l.iterator,p=/^[+-]?0x/i,M=a(p.exec),_=c(u+"08")!==8||c(u+"0x16")!==22||d&&!t(function(){c(Object(d))});f.exports=_?function(I,S){var A=o(i(I));return c(A,S>>>0||(M(p,A)?16:10))}:c},80430:function(f,v,e){"use strict";var r=e(17854),t=e(29909),a=e(24994),i=e(70111),o=e(36048).f,u=e(19781),c="Incorrect Number.range arguments",l="NumericRangeIterator",d=t.set,p=t.getterFor(l),M=r.RangeError,_=r.TypeError,y=a(function(A,O,j,F,J,D){if(typeof A!=F||O!==1/0&&O!==-1/0&&typeof O!=F)throw new _(c);if(A===1/0||A===-1/0)throw new M(c);var R=O>A,U=!1,ee;if(j===void 0)ee=void 0;else if(i(j))ee=j.step,U=!!j.inclusive;else if(typeof j==F)ee=j;else throw new _(c);if(ee==null&&(ee=R?D:-D),typeof ee!=F)throw new _(c);if(ee===1/0||ee===-1/0||ee===J&&A!==O)throw new M(c);var de=A!=A||O!=O||ee!=ee||O>A!=ee>J;d(this,{type:l,start:A,end:O,step:ee,inclusiveEnd:U,hitsEnd:de,currentCount:J,zero:J}),u||(this.start=A,this.end=O,this.step=ee,this.inclusive=U)},l,function(){var A=p(this);if(A.hitsEnd)return{value:void 0,done:!0};var O=A.start,j=A.end,F=A.step,J=O+F*A.currentCount++;J===j&&(A.hitsEnd=!0);var D=A.inclusiveEnd,R;return j>O?R=D?J>j:J>=j:R=D?j>J:j>=J,R?{value:void 0,done:A.hitsEnd=!0}:{value:J,done:!1}}),I=function(S){return{get:S,set:function(){},configurable:!0,enumerable:!1}};u&&o(y.prototype,{start:I(function(){return p(this).start}),end:I(function(){return p(this).end}),inclusive:I(function(){return p(this).inclusiveEnd}),step:I(function(){return p(this).step})}),f.exports=y},70030:function(f,v,e){var r=e(19670),t=e(36048),a=e(80748),i=e(3501),o=e(60490),u=e(80317),c=e(6200),l=">",d="<",p="prototype",M="script",_=c("IE_PROTO"),y=function(){},I=function(F){return d+M+l+F+d+"/"+M+l},S=function(F){F.write(I("")),F.close();var J=F.parentWindow.Object;return F=null,J},A=function(){var F=u("iframe"),J="java"+M+":",D;return F.style.display="none",o.appendChild(F),F.src=String(J),D=F.contentWindow.document,D.open(),D.write(I("document.F=Object")),D.close(),D.F},O,j=function(){try{O=new ActiveXObject("htmlfile")}catch(J){}j=typeof document!="undefined"?document.domain&&O?S(O):A():S(O);for(var F=a.length;F--;)delete j[p][a[F]];return j()};i[_]=!0,f.exports=Object.create||function(J,D){var R;return J!==null?(y[p]=r(J),R=new y,y[p]=null,R[_]=J):R=j(),D===void 0?R:t.f(R,D)}},36048:function(f,v,e){var r=e(19781),t=e(3353),a=e(3070),i=e(19670),o=e(45656),u=e(81956);v.f=r&&!t?Object.defineProperties:function(l,d){i(l);for(var p=o(d),M=u(d),_=M.length,y=0,I;_>y;)a.f(l,I=M[y++],p[I]);return l}},3070:function(f,v,e){var r=e(17854),t=e(19781),a=e(64664),i=e(3353),o=e(19670),u=e(34948),c=r.TypeError,l=Object.defineProperty,d=Object.getOwnPropertyDescriptor,p="enumerable",M="configurable",_="writable";v.f=t?i?function(I,S,A){if(o(I),S=u(S),o(A),typeof I=="function"&&S==="prototype"&&"value"in A&&_ in A&&!A[_]){var O=d(I,S);O&&O[_]&&(I[S]=A.value,A={configurable:M in A?A[M]:O[M],enumerable:p in A?A[p]:O[p],writable:!1})}return l(I,S,A)}:l:function(I,S,A){if(o(I),S=u(S),o(A),a)try{return l(I,S,A)}catch(O){}if("get"in A||"set"in A)throw c("Accessors not supported");return"value"in A&&(I[S]=A.value),I}},31236:function(f,v,e){var r=e(19781),t=e(46916),a=e(55296),i=e(79114),o=e(45656),u=e(34948),c=e(92597),l=e(64664),d=Object.getOwnPropertyDescriptor;v.f=r?d:function(M,_){if(M=o(M),_=u(_),l)try{return d(M,_)}catch(y){}if(c(M,_))return i(!t(a.f,M,_),M[_])}},1156:function(f,v,e){var r=e(84326),t=e(45656),a=e(8006).f,i=e(41589),o=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(c){try{return a(c)}catch(l){return i(o)}};f.exports.f=function(l){return o&&r(l)=="Window"?u(l):a(t(l))}},8006:function(f,v,e){var r=e(16324),t=e(80748),a=t.concat("length","prototype");v.f=Object.getOwnPropertyNames||function(o){return r(o,a)}},25181:function(f,v){v.f=Object.getOwnPropertySymbols},79518:function(f,v,e){var r=e(17854),t=e(92597),a=e(60614),i=e(47908),o=e(6200),u=e(49920),c=o("IE_PROTO"),l=r.Object,d=l.prototype;f.exports=u?l.getPrototypeOf:function(p){var M=i(p);if(t(M,c))return M[c];var _=M.constructor;return a(_)&&M instanceof _?_.prototype:M instanceof l?d:null}},52050:function(f,v,e){var r=e(47293),t=e(70111),a=e(84326),i=e(7556),o=Object.isExtensible,u=r(function(){o(1)});f.exports=u||i?function(l){return!t(l)||i&&a(l)=="ArrayBuffer"?!1:o?o(l):!0}:o},47976:function(f,v,e){var r=e(1702);f.exports=r({}.isPrototypeOf)},60996:function(f,v,e){"use strict";var r=e(29909),t=e(24994),a=e(92597),i=e(81956),o=e(47908),u="Object Iterator",c=r.set,l=r.getterFor(u);f.exports=t(function(p,M){var _=o(p);c(this,{type:u,mode:M,object:_,keys:i(_),index:0})},"Object",function(){for(var p=l(this),M=p.keys;;){if(M===null||p.index>=M.length)return p.object=p.keys=null,{value:void 0,done:!0};var _=M[p.index++],y=p.object;if(!!a(y,_)){switch(p.mode){case"keys":return{value:_,done:!1};case"values":return{value:y[_],done:!1}}return{value:[_,y[_]],done:!1}}}})},16324:function(f,v,e){var r=e(1702),t=e(92597),a=e(45656),i=e(41318).indexOf,o=e(3501),u=r([].push);f.exports=function(c,l){var d=a(c),p=0,M=[],_;for(_ in d)!t(o,_)&&t(d,_)&&u(M,_);for(;l.length>p;)t(d,_=l[p++])&&(~i(M,_)||u(M,_));return M}},81956:function(f,v,e){var r=e(16324),t=e(80748);f.exports=Object.keys||function(i){return r(i,t)}},55296:function(f,v){"use strict";var e={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,t=r&&!e.call({1:2},1);v.f=t?function(i){var o=r(this,i);return!!o&&o.enumerable}:e},27674:function(f,v,e){var r=e(1702),t=e(19670),a=e(96077);f.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,o={},u;try{u=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),u(o,[]),i=o instanceof Array}catch(c){}return function(l,d){return t(l),a(d),i?u(l,d):l.__proto__=d,l}}():void 0)},90515:function(f,v,e){var r=e(17854),t=e(60614),a=e(5112),i=a("observable"),o=r.Observable,u=o&&o.prototype;f.exports=!t(o)||!t(o.from)||!t(o.of)||!t(u.subscribe)||!t(u[i])},92140:function(f,v,e){var r=e(17854),t=e(46916),a=e(60614),i=e(70111),o=r.TypeError;f.exports=function(u,c){var l,d;if(c==="string"&&a(l=u.toString)&&!i(d=t(l,u))||a(l=u.valueOf)&&!i(d=t(l,u))||c!=="string"&&a(l=u.toString)&&!i(d=t(l,u)))return d;throw o("Can't convert object to primitive value")}},53887:function(f,v,e){var r=e(35005),t=e(1702),a=e(8006),i=e(25181),o=e(19670),u=t([].concat);f.exports=r("Reflect","ownKeys")||function(l){var d=a.f(o(l)),p=i.f;return p?u(d,p(l)):d}},40857:function(f,v,e){var r=e(17854);f.exports=r},12534:function(f){f.exports=function(v){try{return{error:!1,value:v()}}catch(e){return{error:!0,value:e}}}},2626:function(f,v,e){var r=e(3070).f;f.exports=function(t,a,i){i in t||r(t,i,{configurable:!0,get:function(){return a[i]},set:function(o){a[i]=o}})}},38845:function(f,v,e){e(51532),e(4129);var r=e(35005),t=e(1702),a=e(72309),i=r("Map"),o=r("WeakMap"),u=t([].push),c=a("metadata"),l=c.store||(c.store=new o),d=function(S,A,O){var j=l.get(S);if(!j){if(!O)return;l.set(S,j=new i)}var F=j.get(A);if(!F){if(!O)return;j.set(A,F=new i)}return F},p=function(S,A,O){var j=d(A,O,!1);return j===void 0?!1:j.has(S)},M=function(S,A,O){var j=d(A,O,!1);return j===void 0?void 0:j.get(S)},_=function(S,A,O,j){d(O,j,!0).set(S,A)},y=function(S,A){var O=d(S,A,!1),j=[];return O&&O.forEach(function(F,J){u(j,J)}),j},I=function(S){return S===void 0||typeof S=="symbol"?S:String(S)};f.exports={store:l,getMap:d,has:p,get:M,set:_,keys:y,toKey:I}},67066:function(f,v,e){"use strict";var r=e(19670);f.exports=function(){var t=r(this),a="";return t.hasIndices&&(a+="d"),t.global&&(a+="g"),t.ignoreCase&&(a+="i"),t.multiline&&(a+="m"),t.dotAll&&(a+="s"),t.unicode&&(a+="u"),t.sticky&&(a+="y"),a}},34706:function(f,v,e){var r=e(46916),t=e(92597),a=e(47976),i=e(67066),o=RegExp.prototype;f.exports=function(u){var c=u.flags;return c===void 0&&!("flags"in o)&&!t(u,"flags")&&a(o,u)?r(i,u):c}},84488:function(f,v,e){var r=e(17854),t=r.TypeError;f.exports=function(a){if(a==null)throw t("Can't call method on "+a);return a}},46465:function(f){f.exports=function(v,e){return v===e||v!=v&&e!=e}},83505:function(f,v,e){var r=e(17854),t=Object.defineProperty;f.exports=function(a,i){try{t(r,a,{value:i,configurable:!0,writable:!0})}catch(o){r[a]=i}return i}},96340:function(f,v,e){"use strict";var r=e(35005),t=e(3070),a=e(5112),i=e(19781),o=a("species");f.exports=function(u){var c=r(u),l=t.f;i&&c&&!c[o]&&l(c,o,{configurable:!0,get:function(){return this}})}},58003:function(f,v,e){var r=e(3070).f,t=e(92597),a=e(5112),i=a("toStringTag");f.exports=function(o,u,c){o&&!c&&(o=o.prototype),o&&!t(o,i)&&r(o,i,{configurable:!0,value:u})}},6200:function(f,v,e){var r=e(72309),t=e(69711),a=r("keys");f.exports=function(i){return a[i]||(a[i]=t(i))}},5465:function(f,v,e){var r=e(17854),t=e(83505),a="__core-js_shared__",i=r[a]||t(a,{});f.exports=i},72309:function(f,v,e){var r=e(31913),t=e(5465);(f.exports=function(a,i){return t[a]||(t[a]=i!==void 0?i:{})})("versions",[]).push({version:"3.22.4",mode:r?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE",source:"https://github.com/zloirock/core-js"})},36707:function(f,v,e){var r=e(19670),t=e(39483),a=e(5112),i=a("species");f.exports=function(o,u){var c=r(o).constructor,l;return c===void 0||(l=r(c)[i])==null?u:t(l)}},28710:function(f,v,e){var r=e(1702),t=e(19303),a=e(41340),i=e(84488),o=r("".charAt),u=r("".charCodeAt),c=r("".slice),l=function(d){return function(p,M){var _=a(i(p)),y=t(M),I=_.length,S,A;return y<0||y>=I?d?"":void 0:(S=u(_,y),S<55296||S>56319||y+1===I||(A=u(_,y+1))<56320||A>57343?d?o(_,y):S:d?c(_,y,y+2):(S-55296<<10)+(A-56320)+65536)}};f.exports={codeAt:l(!1),charAt:l(!0)}},53111:function(f,v,e){var r=e(1702),t=e(84488),a=e(41340),i=e(81361),o=r("".replace),u="["+i+"]",c=RegExp("^"+u+u+"*"),l=RegExp(u+u+"*$"),d=function(p){return function(M){var _=a(t(M));return p&1&&(_=o(_,c,"")),p&2&&(_=o(_,l,"")),_}};f.exports={start:d(1),end:d(2),trim:d(3)}},20261:function(f,v,e){var r=e(17854),t=e(22104),a=e(49974),i=e(60614),o=e(92597),u=e(47293),c=e(60490),l=e(50206),d=e(80317),p=e(48053),M=e(6833),_=e(35268),y=r.setImmediate,I=r.clearImmediate,S=r.process,A=r.Dispatch,O=r.Function,j=r.MessageChannel,F=r.String,J=0,D={},R="onreadystatechange",U,ee,de,he;try{U=r.location}catch(V){}var ve=function(V){if(o(D,V)){var W=D[V];delete D[V],W()}},ce=function(V){return function(){ve(V)}},xe=function(V){ve(V.data)},Q=function(V){r.postMessage(F(V),U.protocol+"//"+U.host)};(!y||!I)&&(y=function(W){p(arguments.length,1);var L=i(W)?W:O(W),k=l(arguments,1);return D[++J]=function(){t(L,void 0,k)},ee(J),J},I=function(W){delete D[W]},_?ee=function(V){S.nextTick(ce(V))}:A&&A.now?ee=function(V){A.now(ce(V))}:j&&!M?(de=new j,he=de.port2,de.port1.onmessage=xe,ee=a(he.postMessage,he)):r.addEventListener&&i(r.postMessage)&&!r.importScripts&&U&&U.protocol!=="file:"&&!u(Q)?(ee=Q,r.addEventListener("message",xe,!1)):R in d("script")?ee=function(V){c.appendChild(d("script"))[R]=function(){c.removeChild(this),ve(V)}}:ee=function(V){setTimeout(ce(V),0)}),f.exports={set:y,clear:I}},51400:function(f,v,e){var r=e(19303),t=Math.max,a=Math.min;f.exports=function(i,o){var u=r(i);return u<0?t(u+o,0):a(u,o)}},45656:function(f,v,e){var r=e(68361),t=e(84488);f.exports=function(a){return r(t(a))}},19303:function(f){var v=Math.ceil,e=Math.floor;f.exports=function(r){var t=+r;return t!==t||t===0?0:(t>0?e:v)(t)}},17466:function(f,v,e){var r=e(19303),t=Math.min;f.exports=function(a){return a>0?t(r(a),9007199254740991):0}},47908:function(f,v,e){var r=e(17854),t=e(84488),a=r.Object;f.exports=function(i){return a(t(i))}},84590:function(f,v,e){var r=e(17854),t=e(73002),a=r.RangeError;f.exports=function(i,o){var u=t(i);if(u%o)throw a("Wrong offset");return u}},73002:function(f,v,e){var r=e(17854),t=e(19303),a=r.RangeError;f.exports=function(i){var o=t(i);if(o<0)throw a("The argument can't be less than 0");return o}},57593:function(f,v,e){var r=e(17854),t=e(46916),a=e(70111),i=e(52190),o=e(58173),u=e(92140),c=e(5112),l=r.TypeError,d=c("toPrimitive");f.exports=function(p,M){if(!a(p)||i(p))return p;var _=o(p,d),y;if(_){if(M===void 0&&(M="default"),y=t(_,p,M),!a(y)||i(y))return y;throw l("Can't convert object to primitive value")}return M===void 0&&(M="number"),u(p,M)}},34948:function(f,v,e){var r=e(57593),t=e(52190);f.exports=function(a){var i=r(a,"string");return t(i)?i:i+""}},51694:function(f,v,e){var r=e(5112),t=r("toStringTag"),a={};a[t]="z",f.exports=String(a)==="[object z]"},41340:function(f,v,e){var r=e(17854),t=e(70648),a=r.String;f.exports=function(i){if(t(i)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return a(i)}},66330:function(f,v,e){var r=e(17854),t=r.String;f.exports=function(a){try{return t(a)}catch(i){return"Object"}}},43074:function(f,v,e){var r=e(97745),t=e(66304);f.exports=function(a,i){return r(t(a),i)}},66304:function(f,v,e){var r=e(90260),t=e(36707),a=r.TYPED_ARRAY_CONSTRUCTOR,i=r.aTypedArrayConstructor;f.exports=function(o){return i(t(o,o[a]))}},69711:function(f,v,e){var r=e(1702),t=0,a=Math.random(),i=r(1 .toString);f.exports=function(o){return"Symbol("+(o===void 0?"":o)+")_"+i(++t+a,36)}},43307:function(f,v,e){var r=e(30133);f.exports=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},3353:function(f,v,e){var r=e(19781),t=e(47293);f.exports=r&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},48053:function(f,v,e){var r=e(17854),t=r.TypeError;f.exports=function(a,i){if(aJ&&p(Q,arguments[J]),Q});if(he.prototype=ee,R!=="Error"?o?o(he,de):u(he,de,{name:!0}):y&&F in U&&(c(he,U,F),c(he,U,"prepareStackTrace")),u(he,U),!I)try{ee.name!==R&&a(ee,"name",R),ee.constructor=he}catch(ve){}return he}}},32120:function(f,v,e){var r=e(82109),t=e(35005),a=e(22104),i=e(47293),o=e(89191),u="AggregateError",c=t(u),l=!i(function(){return c([1]).errors[0]!==1})&&i(function(){return c([1],u,{cause:7}).cause!==7});r({global:!0,arity:2,forced:l},{AggregateError:o(u,function(d){return function(M,_){return a(d,this,arguments)}},l,!0)})},56967:function(f,v,e){"use strict";var r=e(82109),t=e(17854),a=e(47976),i=e(79518),o=e(27674),u=e(99920),c=e(70030),l=e(68880),d=e(79114),p=e(77741),M=e(58340),_=e(20408),y=e(56277),I=e(5112),S=e(22914),A=I("toStringTag"),O=t.Error,j=[].push,F=function(R,U){var ee=arguments.length>2?arguments[2]:void 0,de=a(J,this),he;o?he=o(new O,de?i(this):J):(he=de?this:c(J),l(he,A,"Error")),U!==void 0&&l(he,"message",y(U)),S&&l(he,"stack",p(he.stack,1)),M(he,ee);var ve=[];return _(R,j,{that:ve}),l(he,"errors",ve),he};o?o(F,O):u(F,O,{name:!0});var J=F.prototype=c(O.prototype,{constructor:d(1,F),message:d(1,""),name:d(1,"AggregateError")});r({global:!0},{AggregateError:F})},9170:function(f,v,e){e(56967)},52262:function(f,v,e){"use strict";var r=e(82109),t=e(47908),a=e(26244),i=e(19303),o=e(51223);r({target:"Array",proto:!0},{at:function(c){var l=t(this),d=a(l),p=i(c),M=p>=0?p:d+p;return M<0||M>=d?void 0:l[M]}}),o("at")},96644:function(f,v,e){"use strict";var r=e(82109),t=e(53671).right,a=e(9341),i=e(7392),o=e(35268),u=a("reduceRight"),c=!o&&i>79&&i<83;r({target:"Array",proto:!0,forced:!u||c},{reduceRight:function(d){return t(this,d,arguments.length,arguments.length>1?arguments[1]:void 0)}})},85827:function(f,v,e){"use strict";var r=e(82109),t=e(53671).left,a=e(9341),i=e(7392),o=e(35268),u=a("reduce"),c=!o&&i>79&&i<83;r({target:"Array",proto:!0,forced:!u||c},{reduce:function(d){var p=arguments.length;return t(this,d,p,p>1?arguments[1]:void 0)}})},21703:function(f,v,e){var r=e(82109),t=e(17854),a=e(22104),i=e(89191),o="WebAssembly",u=t[o],c=Error("e",{cause:7}).cause!==7,l=function(p,M){var _={};_[p]=i(p,M,c),r({global:!0,arity:1,forced:c},_)},d=function(p,M){if(u&&u[p]){var _={};_[p]=i(o+"."+p,M,c),r({target:o,stat:!0,arity:1,forced:c},_)}};l("Error",function(p){return function(_){return a(p,this,arguments)}}),l("EvalError",function(p){return function(_){return a(p,this,arguments)}}),l("RangeError",function(p){return function(_){return a(p,this,arguments)}}),l("ReferenceError",function(p){return function(_){return a(p,this,arguments)}}),l("SyntaxError",function(p){return function(_){return a(p,this,arguments)}}),l("TypeError",function(p){return function(_){return a(p,this,arguments)}}),l("URIError",function(p){return function(_){return a(p,this,arguments)}}),d("CompileError",function(p){return function(_){return a(p,this,arguments)}}),d("LinkError",function(p){return function(_){return a(p,this,arguments)}}),d("RuntimeError",function(p){return function(_){return a(p,this,arguments)}})},69098:function(f,v,e){"use strict";var r=e(77710),t=e(95631);r("Map",function(a){return function(){return a(this,arguments.length?arguments[0]:void 0)}},t)},51532:function(f,v,e){e(69098)},46314:function(f,v,e){var r=e(82109),t=e(92597);r({target:"Object",stat:!0},{hasOwn:t})},34668:function(f,v,e){"use strict";var r=e(82109),t=e(46916),a=e(19662),i=e(35005),o=e(78523),u=e(12534),c=e(20408),l="No one promise resolved";r({target:"Promise",stat:!0},{any:function(p){var M=this,_=i("AggregateError"),y=o.f(M),I=y.resolve,S=y.reject,A=u(function(){var O=a(M.resolve),j=[],F=0,J=1,D=!1;c(p,function(R){var U=F++,ee=!1;J++,t(O,M,R).then(function(de){ee||D||(D=!0,I(de))},function(de){ee||D||(ee=!0,j[U]=de,--J||S(new _(j,l)))})}),--J||S(new _(j,l))});return A.error&&S(A.value),y.promise}})},81299:function(f,v,e){var r=e(82109),t=e(17854),a=e(58003);r({global:!0},{Reflect:{}}),a(t.Reflect,"Reflect",!0)},92087:function(f,v,e){var r=e(19781),t=e(47045),a=e(67066),i=e(47293),o=RegExp.prototype,u=r&&i(function(){return Object.getOwnPropertyDescriptor(o,"flags").get.call({dotAll:!0,sticky:!0})!=="sy"});u&&t(o,"flags",{configurable:!0,get:a})},24506:function(f,v,e){"use strict";var r=e(82109),t=e(1702),a=e(84488),i=e(19303),o=e(41340),u=e(47293),c=t("".charAt),l=u(function(){return"\u{20BB7}".at(-2)!=="\uD842"});r({target:"String",proto:!0,forced:l},{at:function(p){var M=o(a(this)),_=M.length,y=i(p),I=y>=0?y:_+y;return I<0||I>=_?void 0:c(M,I)}})},68757:function(f,v,e){"use strict";var r=e(82109),t=e(17854),a=e(46916),i=e(1702),o=e(84488),u=e(60614),c=e(47850),l=e(41340),d=e(58173),p=e(34706),M=e(10647),_=e(5112),y=e(31913),I=_("replace"),S=t.TypeError,A=i("".indexOf),O=i("".replace),j=i("".slice),F=Math.max,J=function(D,R,U){return U>D.length?-1:R===""?U:A(D,R,U)};r({target:"String",proto:!0},{replaceAll:function(R,U){var ee=o(this),de,he,ve,ce,xe,Q,V,W,L,k=0,re=0,K="";if(R!=null){if(de=c(R),de&&(he=l(o(p(R))),!~A(he,"g")))throw S("`.replaceAll` does not allow non-global regexes");if(ve=d(R,I),ve)return a(ve,R,ee,U);if(y&&de)return O(l(ee),R,U)}for(ce=l(ee),xe=l(R),Q=u(U),Q||(U=l(U)),V=xe.length,W=F(1,V),k=J(ce,xe,0);k!==-1;)L=Q?l(U(xe,k,ce)):M(xe,ce,k,[],void 0,U),K+=j(ce,re,k)+L,re=k+V,k=J(ce,xe,k+W);return re=0?p:d+p;return M<0||M>=d?void 0:l[M]})},3462:function(f,v,e){"use strict";var r=e(17854),t=e(46916),a=e(90260),i=e(26244),o=e(84590),u=e(47908),c=e(47293),l=r.RangeError,d=r.Int8Array,p=d&&d.prototype,M=p&&p.set,_=a.aTypedArray,y=a.exportTypedArrayMethod,I=!c(function(){var A=new Uint8ClampedArray(2);return t(M,A,{length:1,0:3},1),A[1]!==3}),S=I&&a.NATIVE_ARRAY_BUFFER_VIEWS&&c(function(){var A=new d(2);return A.set(1),A.set("2",1),A[0]!==0||A[1]!==2});y("set",function(O){_(this);var j=o(arguments.length>1?arguments[1]:void 0,1),F=u(O);if(I)return t(M,this,F,j);var J=this.length,D=i(F),R=0;if(D+j>J)throw l("Wrong length");for(;R1?arguments[1]:void 0)}}),a("filterOut")},34286:function(f,v,e){"use strict";var r=e(82109),t=e(42092).filterReject,a=e(51223);r({target:"Array",proto:!0,forced:!0},{filterReject:function(o){return t(this,o,arguments.length>1?arguments[1]:void 0)}}),a("filterReject")},77461:function(f,v,e){"use strict";var r=e(82109),t=e(9671).findLastIndex,a=e(51223);r({target:"Array",proto:!0},{findLastIndex:function(o){return t(this,o,arguments.length>1?arguments[1]:void 0)}}),a("findLastIndex")},3048:function(f,v,e){"use strict";var r=e(82109),t=e(9671).findLast,a=e(51223);r({target:"Array",proto:!0},{findLast:function(o){return t(this,o,arguments.length>1?arguments[1]:void 0)}}),a("findLast")},19258:function(f,v,e){var r=e(82109),t=e(33253);r({target:"Array",stat:!0,forced:!0},{fromAsync:t})},61886:function(f,v,e){"use strict";var r=e(82109),t=e(35005),a=e(49974),i=e(1702),o=e(68361),u=e(47908),c=e(26244),l=e(9341),d=e(51223),p=t("Map"),M=p.prototype,_=i(M.get),y=i(M.has),I=i(M.set),S=i([].push);r({target:"Array",proto:!0,forced:!l("groupByToMap")},{groupByToMap:function(O){for(var j=u(this),F=o(j),J=a(O,arguments.length>1?arguments[1]:void 0),D=new p,R=c(F),U=0,ee,de;R>U;U++)de=F[U],ee=J(de,U,j),y(D,ee)?S(_(D,ee),de):I(D,ee,[de]);return D}}),d("groupByToMap")},1999:function(f,v,e){"use strict";var r=e(82109),t=e(61386),a=e(9341),i=e(51223);r({target:"Array",proto:!0,forced:!a("groupBy")},{groupBy:function(u){var c=arguments.length>1?arguments[1]:void 0;return t(this,u,c)}}),i("groupBy")},8e4:function(f,v,e){var r=e(82109),t=e(43157),a=Object.isFrozen,i=function(o,u){if(!a||!t(o)||!a(o))return!1;for(var c=0,l=o.length,d;c1?arguments[1]:void 0);return!o(d,function(M,_,y){if(!p(_,M,l))return y()},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},71957:function(f,v,e){"use strict";var r=e(82109),t=e(35005),a=e(49974),i=e(46916),o=e(19662),u=e(19670),c=e(36707),l=e(54647),d=e(20408);r({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(M){var _=u(this),y=l(_),I=a(M,arguments.length>1?arguments[1]:void 0),S=new(c(_,t("Map"))),A=o(S.set);return d(y,function(O,j){I(j,O,_)&&i(A,S,O,j)},{AS_ENTRIES:!0,IS_ITERATOR:!0}),S}})},103:function(f,v,e){"use strict";var r=e(82109),t=e(19670),a=e(49974),i=e(54647),o=e(20408);r({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(c){var l=t(this),d=i(l),p=a(c,arguments.length>1?arguments[1]:void 0);return o(d,function(M,_,y){if(p(_,M,l))return y(M)},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},96306:function(f,v,e){"use strict";var r=e(82109),t=e(19670),a=e(49974),i=e(54647),o=e(20408);r({target:"Map",proto:!0,real:!0,forced:!0},{find:function(c){var l=t(this),d=i(l),p=a(c,arguments.length>1?arguments[1]:void 0);return o(d,function(M,_,y){if(p(_,M,l))return y(_)},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},8582:function(f,v,e){var r=e(82109),t=e(27296);r({target:"Map",stat:!0,forced:!0},{from:t})},90618:function(f,v,e){"use strict";var r=e(82109),t=e(46916),a=e(1702),i=e(19662),o=e(18554),u=e(20408),c=a([].push);r({target:"Map",stat:!0,forced:!0},{groupBy:function(d,p){i(p);var M=o(d),_=new this,y=i(_.has),I=i(_.get),S=i(_.set);return u(M,function(A){var O=p(A);t(y,_,O)?c(t(I,_,O),A):t(S,_,O,[A])},{IS_ITERATOR:!0}),_}})},74592:function(f,v,e){"use strict";var r=e(82109),t=e(19670),a=e(54647),i=e(46465),o=e(20408);r({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(c){return o(a(t(this)),function(l,d,p){if(i(d,c))return p()},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},88440:function(f,v,e){"use strict";var r=e(82109),t=e(46916),a=e(20408),i=e(19662);r({target:"Map",stat:!0,forced:!0},{keyBy:function(u,c){var l=new this;i(c);var d=i(l.set);return a(u,function(p){t(d,l,c(p),p)}),l}})},58276:function(f,v,e){"use strict";var r=e(82109),t=e(19670),a=e(54647),i=e(20408);r({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(u){return i(a(t(this)),function(c,l,d){if(l===u)return d(c)},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},35082:function(f,v,e){"use strict";var r=e(82109),t=e(35005),a=e(49974),i=e(46916),o=e(19662),u=e(19670),c=e(36707),l=e(54647),d=e(20408);r({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(M){var _=u(this),y=l(_),I=a(M,arguments.length>1?arguments[1]:void 0),S=new(c(_,t("Map"))),A=o(S.set);return d(y,function(O,j){i(A,S,I(j,O,_),j)},{AS_ENTRIES:!0,IS_ITERATOR:!0}),S}})},12813:function(f,v,e){"use strict";var r=e(82109),t=e(35005),a=e(49974),i=e(46916),o=e(19662),u=e(19670),c=e(36707),l=e(54647),d=e(20408);r({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(M){var _=u(this),y=l(_),I=a(M,arguments.length>1?arguments[1]:void 0),S=new(c(_,t("Map"))),A=o(S.set);return d(y,function(O,j){i(A,S,O,I(j,O,_))},{AS_ENTRIES:!0,IS_ITERATOR:!0}),S}})},18222:function(f,v,e){"use strict";var r=e(82109),t=e(19662),a=e(19670),i=e(20408);r({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(u){for(var c=a(this),l=t(c.set),d=arguments.length,p=0;p1?arguments[1]:void 0);return o(d,function(M,_,y){if(p(_,M,l))return y()},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},74442:function(f,v,e){"use strict";var r=e(82109),t=e(8154);r({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:t})},7512:function(f,v,e){"use strict";var r=e(82109),t=e(17854),a=e(46916),i=e(19670),o=e(19662),u=t.TypeError;r({target:"Map",proto:!0,real:!0,forced:!0},{update:function(l,d){var p=i(this),M=o(p.get),_=o(p.has),y=o(p.set),I=arguments.length;o(d);var S=a(_,p,l);if(!S&&I<3)throw u("Updating absent value");var A=S?a(M,p,l):o(I>2?arguments[2]:void 0)(l,p);return a(y,p,l,d(A,l,p)),p}})},87713:function(f,v,e){"use strict";var r=e(82109),t=e(8154);r({target:"Map",proto:!0,real:!0,forced:!0},{upsert:t})},46603:function(f,v,e){var r=e(82109),t=Math.min,a=Math.max;r({target:"Math",stat:!0,forced:!0},{clamp:function(o,u,c){return t(c,a(u,o))}})},70100:function(f,v,e){var r=e(82109);r({target:"Math",stat:!0,forced:!0},{DEG_PER_RAD:Math.PI/180})},10490:function(f,v,e){var r=e(82109),t=180/Math.PI;r({target:"Math",stat:!0,forced:!0},{degrees:function(i){return i*t}})},13187:function(f,v,e){var r=e(82109),t=e(47103),a=e(26130);r({target:"Math",stat:!0,forced:!0},{fscale:function(o,u,c,l,d){return a(t(o,u,c,l,d))}})},60092:function(f,v,e){var r=e(82109);r({target:"Math",stat:!0,forced:!0},{iaddh:function(a,i,o,u){var c=a>>>0,l=i>>>0,d=o>>>0;return l+(u>>>0)+((c&d|(c|d)&~(c+d>>>0))>>>31)|0}})},19041:function(f,v,e){var r=e(82109);r({target:"Math",stat:!0,forced:!0},{imulh:function(a,i){var o=65535,u=+a,c=+i,l=u&o,d=c&o,p=u>>16,M=c>>16,_=(p*d>>>0)+(l*d>>>16);return p*M+(_>>16)+((l*M>>>0)+(_&o)>>16)}})},30666:function(f,v,e){var r=e(82109);r({target:"Math",stat:!0,forced:!0},{isubh:function(a,i,o,u){var c=a>>>0,l=i>>>0,d=o>>>0;return l-(u>>>0)-((~c&d|~(c^d)&c-d>>>0)>>>31)|0}})},51638:function(f,v,e){var r=e(82109);r({target:"Math",stat:!0,forced:!0},{RAD_PER_DEG:180/Math.PI})},62975:function(f,v,e){var r=e(82109),t=Math.PI/180;r({target:"Math",stat:!0,forced:!0},{radians:function(i){return i*t}})},15728:function(f,v,e){var r=e(82109),t=e(47103);r({target:"Math",stat:!0,forced:!0},{scale:t})},46056:function(f,v,e){var r=e(82109),t=e(17854),a=e(19670),i=e(77023),o=e(24994),u=e(29909),c="Seeded Random",l=c+" Generator",d='Math.seededPRNG() argument should have a "seed" field with a finite value.',p=u.set,M=u.getterFor(l),_=t.TypeError,y=o(function(S){p(this,{type:l,seed:S%2147483647})},c,function(){var S=M(this),A=S.seed=(S.seed*1103515245+12345)%2147483647;return{value:(A&1073741823)/1073741823,done:!1}});r({target:"Math",stat:!0,forced:!0},{seededPRNG:function(S){var A=a(S).seed;if(!i(A))throw _(d);return new y(A)}})},44299:function(f,v,e){var r=e(82109);r({target:"Math",stat:!0,forced:!0},{signbit:function(a){return(a=+a)==a&&a==0?1/a==-1/0:a<0}})},5162:function(f,v,e){var r=e(82109);r({target:"Math",stat:!0,forced:!0},{umulh:function(a,i){var o=65535,u=+a,c=+i,l=u&o,d=c&o,p=u>>>16,M=c>>>16,_=(p*d>>>0)+(l*d>>>16);return p*M+(_>>>16)+((l*M>>>0)+(_&o)>>>16)}})},50292:function(f,v,e){"use strict";var r=e(82109),t=e(17854),a=e(1702),i=e(19303),o=e(83009),u="Invalid number representation",c="Invalid radix",l=t.RangeError,d=t.SyntaxError,p=t.TypeError,M=/^[\da-z]+$/,_=a("".charAt),y=a(M.exec),I=a(1 .toString),S=a("".slice);r({target:"Number",stat:!0,forced:!0},{fromString:function(O,j){var F=1,J,D;if(typeof O!="string")throw p(u);if(!O.length||_(O,0)=="-"&&(F=-1,O=S(O,1),!O.length))throw d(u);if(J=j===void 0?10:i(j),J<2||J>36)throw l(c);if(!y(M,O)||I(D=o(O,J),J)!==O)throw d(u);return F*D}})},29427:function(f,v,e){"use strict";var r=e(82109),t=e(80430);r({target:"Number",stat:!0,forced:!0},{range:function(i,o,u){return new t(i,o,u,"number",0,1)}})},99964:function(f,v,e){"use strict";var r=e(82109),t=e(60996);r({target:"Object",stat:!0,forced:!0},{iterateEntries:function(i){return new t(i,"entries")}})},75238:function(f,v,e){"use strict";var r=e(82109),t=e(60996);r({target:"Object",stat:!0,forced:!0},{iterateKeys:function(i){return new t(i,"keys")}})},4987:function(f,v,e){"use strict";var r=e(82109),t=e(60996);r({target:"Object",stat:!0,forced:!0},{iterateValues:function(i){return new t(i,"values")}})},39769:function(f,v,e){"use strict";var r=e(82109),t=e(46916),a=e(19781),i=e(96340),o=e(19662),u=e(60614),c=e(19670),l=e(70111),d=e(25787),p=e(58173),M=e(98052),_=e(89190),y=e(47045),I=e(842),S=e(5112),A=e(29909),O=e(90515),j=S("observable"),F="Observable",J="Subscription",D="SubscriptionObserver",R=A.getterFor,U=A.set,ee=R(F),de=R(J),he=R(D),ve=function(W){this.observer=c(W),this.cleanup=void 0,this.subscriptionObserver=void 0};ve.prototype={type:J,clean:function(){var W=this.cleanup;if(W){this.cleanup=void 0;try{W()}catch(L){I(L)}}},close:function(){if(!a){var W=this.facade,L=this.subscriptionObserver;W.closed=!0,L&&(L.closed=!0)}this.observer=void 0},isClosed:function(){return this.observer===void 0}};var ce=function(W,L){var k=U(this,new ve(W)),re;a||(this.closed=!1);try{(re=p(W,"start"))&&t(re,W,this)}catch(Ze){I(Ze)}if(!k.isClosed()){var K=k.subscriptionObserver=new xe(k);try{var ie=L(K),me=ie;ie!=null&&(k.cleanup=u(ie.unsubscribe)?function(){me.unsubscribe()}:o(ie))}catch(Ze){K.error(Ze);return}k.isClosed()&&k.clean()}};ce.prototype=_({},{unsubscribe:function(){var L=de(this);L.isClosed()||(L.close(),L.clean())}}),a&&y(ce.prototype,"closed",{configurable:!0,get:function(){return de(this).isClosed()}});var xe=function(W){U(this,{type:D,subscriptionState:W}),a||(this.closed=!1)};xe.prototype=_({},{next:function(L){var k=he(this).subscriptionState;if(!k.isClosed()){var re=k.observer;try{var K=p(re,"next");K&&t(K,re,L)}catch(ie){I(ie)}}},error:function(L){var k=he(this).subscriptionState;if(!k.isClosed()){var re=k.observer;k.close();try{var K=p(re,"error");K?t(K,re,L):I(L)}catch(ie){I(ie)}k.clean()}},complete:function(){var L=he(this).subscriptionState;if(!L.isClosed()){var k=L.observer;L.close();try{var re=p(k,"complete");re&&t(re,k)}catch(K){I(K)}L.clean()}}}),a&&y(xe.prototype,"closed",{configurable:!0,get:function(){return he(this).subscriptionState.isClosed()}});var Q=function(L){d(this,V),U(this,{type:F,subscriber:o(L)})},V=Q.prototype;_(V,{subscribe:function(L){var k=arguments.length;return new ce(u(L)?{next:L,error:k>1?arguments[1]:void 0,complete:k>2?arguments[2]:void 0}:l(L)?L:{},ee(this).subscriber)}}),M(V,j,function(){return this}),r({global:!0,forced:O},{Observable:Q}),i(F)},93532:function(f,v,e){"use strict";var r=e(82109),t=e(35005),a=e(46916),i=e(19670),o=e(4411),u=e(18554),c=e(58173),l=e(20408),d=e(5112),p=e(90515),M=d("observable");r({target:"Observable",stat:!0,forced:p},{from:function(y){var I=o(this)?this:t("Observable"),S=c(i(y),M);if(S){var A=i(a(S,y));return A.constructor===I?A:new I(function(j){return A.subscribe(j)})}var O=u(y);return new I(function(j){l(O,function(F,J){if(j.next(F),j.closed)return J()},{IS_ITERATOR:!0,INTERRUPTED:!0}),j.complete()})}})},1025:function(f,v,e){e(39769),e(93532),e(88170)},88170:function(f,v,e){"use strict";var r=e(82109),t=e(35005),a=e(4411),i=e(90515),o=t("Array");r({target:"Observable",stat:!0,forced:i},{of:function(){for(var c=a(this)?this:t("Observable"),l=arguments.length,d=o(l),p=0;p1?arguments[1]:void 0);return!o(d,function(M,_){if(!p(M,M,l))return _()},{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},64362:function(f,v,e){"use strict";var r=e(82109),t=e(35005),a=e(46916),i=e(19662),o=e(19670),u=e(49974),c=e(36707),l=e(96767),d=e(20408);r({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(M){var _=o(this),y=l(_),I=u(M,arguments.length>1?arguments[1]:void 0),S=new(c(_,t("Set"))),A=i(S.add);return d(y,function(O){I(O,O,_)&&a(A,S,O)},{IS_ITERATOR:!0}),S}})},15389:function(f,v,e){"use strict";var r=e(82109),t=e(19670),a=e(49974),i=e(96767),o=e(20408);r({target:"Set",proto:!0,real:!0,forced:!0},{find:function(c){var l=t(this),d=i(l),p=a(c,arguments.length>1?arguments[1]:void 0);return o(d,function(M,_){if(p(M,M,l))return _(M)},{IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},46006:function(f,v,e){var r=e(82109),t=e(27296);r({target:"Set",stat:!0,forced:!0},{from:t})},90401:function(f,v,e){"use strict";var r=e(82109),t=e(35005),a=e(46916),i=e(19662),o=e(19670),u=e(36707),c=e(20408);r({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(d){var p=o(this),M=new(u(p,t("Set"))),_=i(p.has),y=i(M.add);return c(d,function(I){a(_,p,I)&&a(y,M,I)}),M}})},45164:function(f,v,e){"use strict";var r=e(82109),t=e(46916),a=e(19662),i=e(19670),o=e(20408);r({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(c){var l=i(this),d=a(l.has);return!o(c,function(p,M){if(t(d,l,p)===!0)return M()},{INTERRUPTED:!0}).stopped}})},91238:function(f,v,e){"use strict";var r=e(82109),t=e(35005),a=e(46916),i=e(19662),o=e(60614),u=e(19670),c=e(18554),l=e(20408);r({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(p){var M=c(this),_=u(p),y=_.has;return o(y)||(_=new(t("Set"))(p),y=i(_.has)),!l(M,function(I,S){if(a(y,_,I)===!1)return S()},{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},54837:function(f,v,e){"use strict";var r=e(82109),t=e(46916),a=e(19662),i=e(19670),o=e(20408);r({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(c){var l=i(this),d=a(l.has);return!o(c,function(p,M){if(t(d,l,p)===!1)return M()},{INTERRUPTED:!0}).stopped}})},87485:function(f,v,e){"use strict";var r=e(82109),t=e(1702),a=e(19670),i=e(41340),o=e(96767),u=e(20408),c=t([].join),l=[].push;r({target:"Set",proto:!0,real:!0,forced:!0},{join:function(p){var M=a(this),_=o(M),y=p===void 0?",":i(p),I=[];return u(_,l,{that:I,IS_ITERATOR:!0}),c(I,y)}})},56767:function(f,v,e){"use strict";var r=e(82109),t=e(35005),a=e(49974),i=e(46916),o=e(19662),u=e(19670),c=e(36707),l=e(96767),d=e(20408);r({target:"Set",proto:!0,real:!0,forced:!0},{map:function(M){var _=u(this),y=l(_),I=a(M,arguments.length>1?arguments[1]:void 0),S=new(c(_,t("Set"))),A=o(S.add);return d(y,function(O){i(A,S,I(O,O,_))},{IS_ITERATOR:!0}),S}})},69916:function(f,v,e){var r=e(82109),t=e(82044);r({target:"Set",stat:!0,forced:!0},{of:t})},76651:function(f,v,e){"use strict";var r=e(82109),t=e(17854),a=e(19662),i=e(19670),o=e(96767),u=e(20408),c=t.TypeError;r({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(d){var p=i(this),M=o(p),_=arguments.length<2,y=_?void 0:arguments[1];if(a(d),u(M,function(I){_?(_=!1,y=I):y=d(y,I,I,p)},{IS_ITERATOR:!0}),_)throw c("Reduce of empty set with no initial value");return y}})},61437:function(f,v,e){"use strict";var r=e(82109),t=e(19670),a=e(49974),i=e(96767),o=e(20408);r({target:"Set",proto:!0,real:!0,forced:!0},{some:function(c){var l=t(this),d=i(l),p=a(c,arguments.length>1?arguments[1]:void 0);return o(d,function(M,_){if(p(M,M,l))return _()},{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},35285:function(f,v,e){"use strict";var r=e(82109),t=e(35005),a=e(46916),i=e(19662),o=e(19670),u=e(36707),c=e(20408);r({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(d){var p=o(this),M=new(u(p,t("Set")))(p),_=i(M.delete),y=i(M.add);return c(d,function(I){a(_,M,I)||a(y,M,I)}),M}})},39865:function(f,v,e){"use strict";var r=e(82109),t=e(35005),a=e(19662),i=e(19670),o=e(36707),u=e(20408);r({target:"Set",proto:!0,real:!0,forced:!0},{union:function(l){var d=i(this),p=new(o(d,t("Set")))(d);return u(l,a(p.add),{that:p}),p}})},86035:function(f,v,e){"use strict";var r=e(82109),t=e(28710).charAt,a=e(84488),i=e(19303),o=e(41340);r({target:"String",proto:!0,forced:!0},{at:function(c){var l=o(a(this)),d=l.length,p=i(c),M=p>=0?p:d+p;return M<0||M>=d?void 0:t(l,M)}})},67501:function(f,v,e){"use strict";var r=e(82109),t=e(24994),a=e(84488),i=e(41340),o=e(29909),u=e(28710),c=u.codeAt,l=u.charAt,d="String Iterator",p=o.set,M=o.getterFor(d),_=t(function(I){p(this,{type:d,string:I,index:0})},"String",function(){var I=M(this),S=I.string,A=I.index,O;return A>=S.length?{value:void 0,done:!0}:(O=l(S,A),I.index+=O.length,{value:{codePoint:c(O,0),position:A},done:!1})});r({target:"String",proto:!0,forced:!0},{codePoints:function(){return new _(i(a(this)))}})},50058:function(f,v,e){var r=e(82109),t=e(17854),a=e(1702),i=e(45656),o=e(41340),u=e(26244),c=t.TypeError,l=Array.prototype,d=a(l.push),p=a(l.join);r({target:"String",stat:!0,forced:!0},{cooked:function(_){for(var y=i(_),I=u(y),S=arguments.length,A=[],O=0;I>O;){var j=y[O++];if(j===void 0)throw c("Incorrect template");if(d(A,o(j)),O===I)return p(A,"");O1?arguments[1]:void 0);return a(this,l)},!0)},8922:function(f,v,e){"use strict";var r=e(90260),t=e(42092).filterReject,a=e(43074),i=r.aTypedArray,o=r.exportTypedArrayMethod;o("filterReject",function(c){var l=t(i(this),c,arguments.length>1?arguments[1]:void 0);return a(this,l)},!0)},1118:function(f,v,e){"use strict";var r=e(90260),t=e(9671).findLastIndex,a=r.aTypedArray,i=r.exportTypedArrayMethod;i("findLastIndex",function(u){return t(a(this),u,arguments.length>1?arguments[1]:void 0)})},37380:function(f,v,e){"use strict";var r=e(90260),t=e(9671).findLast,a=r.aTypedArray,i=r.exportTypedArrayMethod;i("findLast",function(u){return t(a(this),u,arguments.length>1?arguments[1]:void 0)})},16850:function(f,v,e){"use strict";var r=e(35005),t=e(39483),a=e(33253),i=e(90260),o=e(97745),u=i.aTypedArrayConstructor,c=i.exportTypedArrayStaticMethod;c("fromAsync",function(d){var p=this,M=arguments.length,_=M>1?arguments[1]:void 0,y=M>2?arguments[2]:void 0;return new(r("Promise"))(function(I){t(p),I(a(d,_,y))}).then(function(I){return o(u(p),I)})},!0)},5835:function(f,v,e){"use strict";var r=e(90260),t=e(61386),a=e(66304),i=r.aTypedArray,o=r.exportTypedArrayMethod;o("groupBy",function(c){var l=arguments.length>1?arguments[1]:void 0;return t(i(this),c,l,a)},!0)},23767:function(f,v,e){"use strict";var r=e(21843),t=e(90260),a=t.aTypedArray,i=t.exportTypedArrayMethod,o=t.TYPED_ARRAY_CONSTRUCTOR;i("toReversed",function(){return r(a(this),this[o])})},8585:function(f,v,e){"use strict";var r=e(90260),t=e(1702),a=e(19662),i=e(97745),o=r.aTypedArray,u=r.exportTypedArrayMethod,c=r.TYPED_ARRAY_CONSTRUCTOR,l=t(r.TypedArrayPrototype.sort);u("toSorted",function(p){p!==void 0&&a(p);var M=o(this),_=i(M[c],M);return l(_,p)})},8970:function(f,v,e){"use strict";var r=e(90260),t=e(50206),a=e(1654),i=r.aTypedArray,o=r.exportTypedArrayMethod,u=r.TYPED_ARRAY_CONSTRUCTOR;o("toSpliced",function(l,d){return a(i(this),this[u],t(arguments))},{arity:2})},84444:function(f,v,e){"use strict";var r=e(1702),t=e(90260),a=e(60956),i=e(43074),o=t.aTypedArray,u=t.exportTypedArrayMethod,c=r(a);u("uniqueBy",function(d){return i(this,c(o(this),d))},!0)},68696:function(f,v,e){"use strict";var r=e(11572),t=e(90260),a=t.aTypedArray,i=t.exportTypedArrayMethod,o=t.TYPED_ARRAY_CONSTRUCTOR;i("with",function(u,c){return r(a(this),this[o],u,c)})},78206:function(f,v,e){"use strict";var r=e(82109),t=e(34092);r({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:t})},12714:function(f,v,e){"use strict";var r=e(82109),t=e(37502);r({target:"WeakMap",proto:!0,real:!0,forced:!0},{emplace:t})},76478:function(f,v,e){var r=e(82109),t=e(27296);r({target:"WeakMap",stat:!0,forced:!0},{from:t})},79715:function(f,v,e){var r=e(82109),t=e(82044);r({target:"WeakMap",stat:!0,forced:!0},{of:t})},5964:function(f,v,e){"use strict";var r=e(82109),t=e(8154);r({target:"WeakMap",proto:!0,real:!0,forced:!0},{upsert:t})},43561:function(f,v,e){"use strict";var r=e(82109),t=e(31501);r({target:"WeakSet",proto:!0,real:!0,forced:!0},{addAll:t})},32049:function(f,v,e){"use strict";var r=e(82109),t=e(34092);r({target:"WeakSet",proto:!0,real:!0,forced:!0},{deleteAll:t})},86020:function(f,v,e){var r=e(82109),t=e(27296);r({target:"WeakSet",stat:!0,forced:!0},{from:t})},56585:function(f,v,e){var r=e(82109),t=e(82044);r({target:"WeakSet",stat:!0,forced:!0},{of:t})},11091:function(f,v,e){var r=e(82109),t=e(17854),a=e(20261).clear;r({global:!0,bind:!0,enumerable:!0,forced:t.clearImmediate!==a},{clearImmediate:a})},82801:function(f,v,e){"use strict";var r=e(82109),t=e(35005),a=e(79114),i=e(3070).f,o=e(92597),u=e(25787),c=e(79587),l=e(56277),d=e(93678),p=e(77741),M=e(31913),_="DOMException",y=t("Error"),I=t(_),S=function(){u(this,A);var he=arguments.length,ve=l(he<1?void 0:arguments[0]),ce=l(he<2?void 0:arguments[1],"Error"),xe=new I(ve,ce),Q=y(ve);return Q.name=_,i(xe,"stack",a(1,p(Q.stack,1))),c(xe,this,S),xe},A=S.prototype=I.prototype,O="stack"in y(_),j="stack"in new I(1,2),F=O&&!j;r({global:!0,forced:M||F},{DOMException:F?S:I});var J=t(_),D=J.prototype;if(D.constructor!==J){M||i(D,"constructor",a(1,J));for(var R in d)if(o(d,R)){var U=d[R],ee=U.s;o(J,ee)||i(J,ee,a(6,U.c))}}},84633:function(f,v,e){e(11091),e(12986)},12986:function(f,v,e){var r=e(82109),t=e(17854),a=e(20261).set;r({global:!0,bind:!0,enumerable:!0,forced:t.setImmediate!==a},{setImmediate:a})},61295:function(f,v,e){var r=e(31913),t=e(82109),a=e(17854),i=e(35005),o=e(1702),u=e(47293),c=e(69711),l=e(60614),d=e(4411),p=e(70111),M=e(52190),_=e(20408),y=e(19670),I=e(70648),S=e(92597),A=e(86135),O=e(68880),j=e(26244),F=e(48053),J=e(34706),D=e(22914),R=a.Object,U=a.Date,ee=a.Error,de=a.EvalError,he=a.RangeError,ve=a.ReferenceError,ce=a.SyntaxError,xe=a.TypeError,Q=a.URIError,V=a.PerformanceMark,W=a.WebAssembly,L=W&&W.CompileError||ee,k=W&&W.LinkError||ee,re=W&&W.RuntimeError||ee,K=i("DOMException"),ie=i("Set"),me=i("Map"),Ze=me.prototype,De=o(Ze.has),Fe=o(Ze.get),mt=o(Ze.set),ht=o(ie.prototype.add),xt=i("Object","keys"),Et=o([].push),ct=o((!0).valueOf),jt=o(1 .valueOf),Tt=o("".valueOf),Wt=o(U.prototype.getTime),Bt=c("structuredClone"),Ht="DataCloneError",rr="Transferring",Sr=function(X){return!u(function(){var je=new a.Set([7]),He=X(je),tt=X(R(7));return He==je||!He.has(7)||typeof tt!="object"||tt!=7})&&X},Ar=function(X){return!u(function(){var je=X(new a.AggregateError([1],Bt,{cause:3}));return je.name!="AggregateError"||je.errors[0]!=1||je.message!=Bt||je.cause!=3})&&X},ye=a.structuredClone,T=r||!Ar(ye),b=!ye&&Sr(function(X){return new V(Bt,{detail:X}).detail}),q=Sr(ye)||b,Ce=function(X){throw new K("Uncloneable type: "+X,Ht)},le=function(X,je){throw new K((je||"Cloning")+" of "+X+" cannot be properly polyfilled in this engine",Ht)},fe=function(X,je){if(M(X)&&Ce("Symbol"),!p(X))return X;if(je){if(De(je,X))return Fe(je,X)}else je=new me;var He=I(X),tt=!1,We,Ue,Ie,$e,Le,ze,_e,ue,Ye,Ve;switch(He){case"Array":Ie=[],tt=!0;break;case"Object":Ie={},tt=!0;break;case"Map":Ie=new me,tt=!0;break;case"Set":Ie=new ie,tt=!0;break;case"RegExp":Ie=new RegExp(X.source,J(X));break;case"Error":switch(Ue=X.name,Ue){case"AggregateError":Ie=i("AggregateError")([]);break;case"EvalError":Ie=de();break;case"RangeError":Ie=he();break;case"ReferenceError":Ie=ve();break;case"SyntaxError":Ie=ce();break;case"TypeError":Ie=xe();break;case"URIError":Ie=Q();break;case"CompileError":Ie=L();break;case"LinkError":Ie=k();break;case"RuntimeError":Ie=re();break;default:Ie=ee()}tt=!0;break;case"DOMException":Ie=new K(X.message,X.name),tt=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":We=a[He],p(We)||le(He),Ie=new We(fe(X.buffer,je),X.byteOffset,He==="DataView"?X.byteLength:X.length);break;case"DOMQuad":try{Ie=new DOMQuad(fe(X.p1,je),fe(X.p2,je),fe(X.p3,je),fe(X.p4,je))}catch(Je){q?Ie=q(X):le(He)}break;case"FileList":if(We=a.DataTransfer,d(We)){for($e=new We,Le=0,ze=j(X);Le1&&arguments[1]!=null?y(arguments[1]):void 0,tt=He?He.transfer:void 0,We;return tt!==void 0&&(We=new me,Re(tt,We)),fe(je,We)}})},51804:function(f,v,e){"use strict";var r=e(75618),t=e(17205),a=e(67191),i=e(5516),o=e(49981),u=f.exports=function(c,l){var d,p,M,_,y;return arguments.length<2||typeof c!="string"?(_=l,l=c,c=null):_=arguments[2],r(c)?(d=o.call(c,"c"),p=o.call(c,"e"),M=o.call(c,"w")):(d=M=!0,p=!1),y={value:l,configurable:d,enumerable:p,writable:M},_?a(i(_),y):y};u.gs=function(c,l,d){var p,M,_,y;return typeof c!="string"?(_=d,d=l,l=c,c=null):_=arguments[3],r(l)?t(l)?r(d)?t(d)||(_=d,d=void 0):d=void 0:(_=l,l=d=void 0):l=void 0,r(c)?(p=o.call(c,"c"),M=o.call(c,"e")):(p=!0,M=!1),y={get:l,set:d,configurable:p,enumerable:M},_?a(i(_),y):y}},44020:function(f){"use strict";var v="%[a-f0-9]{2}",e=new RegExp("("+v+")|([^%]+?)","gi"),r=new RegExp("("+v+")+","gi");function t(o,u){try{return[decodeURIComponent(o.join(""))]}catch(d){}if(o.length===1)return o;u=u||1;var c=o.slice(0,u),l=o.slice(u);return Array.prototype.concat.call([],t(c),t(l))}function a(o){try{return decodeURIComponent(o)}catch(l){for(var u=o.match(e)||[],c=1;c-1}},48370:function(f,v,e){"use strict";var r=e(51804),t=e(31290),a=Function.prototype.apply,i=Function.prototype.call,o=Object.create,u=Object.defineProperty,c=Object.defineProperties,l=Object.prototype.hasOwnProperty,d={configurable:!0,enumerable:!1,writable:!0},p,M,_,y,I,S,A;p=function(O,j){var F;return t(j),l.call(this,"__ee__")?F=this.__ee__:(F=d.value=o(null),u(this,"__ee__",d),d.value=null),F[O]?typeof F[O]=="object"?F[O].push(j):F[O]=[F[O],j]:F[O]=j,this},M=function(O,j){var F,J;return t(j),J=this,p.call(this,O,F=function(){_.call(J,O,F),a.call(j,this,arguments)}),F.__eeOnceListener__=j,this},_=function(O,j){var F,J,D,R;if(t(j),!l.call(this,"__ee__"))return this;if(F=this.__ee__,!F[O])return this;if(J=F[O],typeof J=="object")for(R=0;D=J[R];++R)(D===j||D.__eeOnceListener__===j)&&(J.length===2?F[O]=J[R?0:1]:J.splice(R,1));else(J===j||J.__eeOnceListener__===j)&&delete F[O];return this},y=function(O){var j,F,J,D,R;if(!!l.call(this,"__ee__")&&(D=this.__ee__[O],!!D))if(typeof D=="object"){for(F=arguments.length,R=new Array(F-1),j=1;j=0&&(j.hash=O.substr(F),O=O.substr(0,F));var J=O.indexOf("?");J>=0&&(j.search=O.substr(J),O=O.substr(0,J)),O&&(j.pathname=O)}return j}},8679:function(f,v,e){"use strict";var r=e(59864),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};u[r.ForwardRef]=i,u[r.Memo]=o;function c(S){return r.isMemo(S)?o:u[S.$$typeof]||t}var l=Object.defineProperty,d=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,M=Object.getOwnPropertyDescriptor,_=Object.getPrototypeOf,y=Object.prototype;function I(S,A,O){if(typeof A!="string"){if(y){var j=_(A);j&&j!==y&&I(S,j,O)}var F=d(A);p&&(F=F.concat(p(A)));for(var J=c(S),D=c(A),R=0;R>1,p=-7,M=t?i-1:0,_=t?-1:1,y=e[r+M];for(M+=_,o=y&(1<<-p)-1,y>>=-p,p+=c;p>0;o=o*256+e[r+M],M+=_,p-=8);for(u=o&(1<<-p)-1,o>>=-p,p+=a;p>0;u=u*256+e[r+M],M+=_,p-=8);if(o===0)o=1-d;else{if(o===l)return u?NaN:(y?-1:1)*(1/0);u=u+Math.pow(2,a),o=o-d}return(y?-1:1)*u*Math.pow(2,o-a)},v.write=function(e,r,t,a,i,o){var u,c,l,d=o*8-i-1,p=(1<>1,_=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=a?0:o-1,I=a?1:-1,S=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,u=p):(u=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-u))<1&&(u--,l*=2),u+M>=1?r+=_/l:r+=_*Math.pow(2,1-M),r*l>=2&&(u++,l/=2),u+M>=p?(c=0,u=p):u+M>=1?(c=(r*l-1)*Math.pow(2,i),u=u+M):(c=r*Math.pow(2,M-1)*Math.pow(2,i),u=0));i>=8;e[t+y]=c&255,y+=I,c/=256,i-=8);for(u=u<0;e[t+y]=u&255,y+=I,u/=256,d-=8);e[t+y-I]|=S*128}},41143:function(f){"use strict";var v=function(e,r,t,a,i,o,u,c){if(!e){var l;if(r===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[t,a,i,o,u,c],p=0;l=new Error(r.replace(/%s/g,function(){return d[p++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};f.exports=v},91296:function(f,v,e){var r="Expected a function",t=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,d=typeof e.g=="object"&&e.g&&e.g.Object===Object&&e.g,p=typeof self=="object"&&self&&self.Object===Object&&self,M=d||p||Function("return this")(),_=Object.prototype,y=_.toString,I=Math.max,S=Math.min,A=function(){return M.Date.now()};function O(R,U,ee){var de,he,ve,ce,xe,Q,V=0,W=!1,L=!1,k=!0;if(typeof R!="function")throw new TypeError(r);U=D(U)||0,j(ee)&&(W=!!ee.leading,L="maxWait"in ee,ve=L?I(D(ee.maxWait)||0,U):ve,k="trailing"in ee?!!ee.trailing:k);function re(xt){var Et=de,ct=he;return de=he=void 0,V=xt,ce=R.apply(ct,Et),ce}function K(xt){return V=xt,xe=setTimeout(Ze,U),W?re(xt):ce}function ie(xt){var Et=xt-Q,ct=xt-V,jt=U-Et;return L?S(jt,ve-ct):jt}function me(xt){var Et=xt-Q,ct=xt-V;return Q===void 0||Et>=U||Et<0||L&&ct>=ve}function Ze(){var xt=A();if(me(xt))return De(xt);xe=setTimeout(Ze,ie(xt))}function De(xt){return xe=void 0,k&&de?re(xt):(de=he=void 0,ce)}function Fe(){xe!==void 0&&clearTimeout(xe),V=0,de=Q=he=xe=void 0}function mt(){return xe===void 0?ce:De(A())}function ht(){var xt=A(),Et=me(xt);if(de=arguments,he=this,Q=xt,Et){if(xe===void 0)return K(Q);if(L)return xe=setTimeout(Ze,U),re(Q)}return xe===void 0&&(xe=setTimeout(Ze,U)),ce}return ht.cancel=Fe,ht.flush=mt,ht}function j(R){var U=typeof R;return!!R&&(U=="object"||U=="function")}function F(R){return!!R&&typeof R=="object"}function J(R){return typeof R=="symbol"||F(R)&&y.call(R)==a}function D(R){if(typeof R=="number")return R;if(J(R))return t;if(j(R)){var U=typeof R.valueOf=="function"?R.valueOf():R;R=j(U)?U+"":U}if(typeof R!="string")return R===0?R:+R;R=R.replace(i,"");var ee=u.test(R);return ee||c.test(R)?l(R.slice(2),ee?2:8):o.test(R)?t:+R}f.exports=O},93096:function(f,v,e){var r="Expected a function",t=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,d=typeof e.g=="object"&&e.g&&e.g.Object===Object&&e.g,p=typeof self=="object"&&self&&self.Object===Object&&self,M=d||p||Function("return this")(),_=Object.prototype,y=_.toString,I=Math.max,S=Math.min,A=function(){return M.Date.now()};function O(U,ee,de){var he,ve,ce,xe,Q,V,W=0,L=!1,k=!1,re=!0;if(typeof U!="function")throw new TypeError(r);ee=R(ee)||0,F(de)&&(L=!!de.leading,k="maxWait"in de,ce=k?I(R(de.maxWait)||0,ee):ce,re="trailing"in de?!!de.trailing:re);function K(Et){var ct=he,jt=ve;return he=ve=void 0,W=Et,xe=U.apply(jt,ct),xe}function ie(Et){return W=Et,Q=setTimeout(De,ee),L?K(Et):xe}function me(Et){var ct=Et-V,jt=Et-W,Tt=ee-ct;return k?S(Tt,ce-jt):Tt}function Ze(Et){var ct=Et-V,jt=Et-W;return V===void 0||ct>=ee||ct<0||k&&jt>=ce}function De(){var Et=A();if(Ze(Et))return Fe(Et);Q=setTimeout(De,me(Et))}function Fe(Et){return Q=void 0,re&&he?K(Et):(he=ve=void 0,xe)}function mt(){Q!==void 0&&clearTimeout(Q),W=0,he=V=ve=Q=void 0}function ht(){return Q===void 0?xe:Fe(A())}function xt(){var Et=A(),ct=Ze(Et);if(he=arguments,ve=this,V=Et,ct){if(Q===void 0)return ie(V);if(k)return Q=setTimeout(De,ee),K(V)}return Q===void 0&&(Q=setTimeout(De,ee)),xe}return xt.cancel=mt,xt.flush=ht,xt}function j(U,ee,de){var he=!0,ve=!0;if(typeof U!="function")throw new TypeError(r);return F(de)&&(he="leading"in de?!!de.leading:he,ve="trailing"in de?!!de.trailing:ve),O(U,ee,{leading:he,maxWait:ee,trailing:ve})}function F(U){var ee=typeof U;return!!U&&(ee=="object"||ee=="function")}function J(U){return!!U&&typeof U=="object"}function D(U){return typeof U=="symbol"||J(U)&&y.call(U)==a}function R(U){if(typeof U=="number")return U;if(D(U))return t;if(F(U)){var ee=typeof U.valueOf=="function"?U.valueOf():U;U=F(ee)?ee+"":ee}if(typeof U!="string")return U===0?U:+U;U=U.replace(i,"");var de=u.test(U);return de||c.test(U)?l(U.slice(2),de?2:8):o.test(U)?t:+U}f.exports=j},18552:function(f,v,e){var r=e(10852),t=e(55639),a=r(t,"DataView");f.exports=a},1989:function(f,v,e){var r=e(51789),t=e(80401),a=e(57667),i=e(21327),o=e(81866);function u(c){var l=-1,d=c==null?0:c.length;for(this.clear();++lI))return!1;var A=_.get(c),O=_.get(l);if(A&&O)return A==l&&O==c;var j=-1,F=!0,J=d&o?new r:void 0;for(_.set(c,l),_.set(l,c);++j-1&&t%1==0&&t-1}f.exports=t},44264:function(f,v,e){var r=e(18470);function t(a,i){var o=this.__data__,u=r(o,a);return u<0?(++this.size,o.push([a,i])):o[u][1]=i,this}f.exports=t},24785:function(f,v,e){var r=e(1989),t=e(38407),a=e(57071);function i(){this.size=0,this.__data__={hash:new r,map:new(a||t),string:new r}}f.exports=i},11285:function(f,v,e){var r=e(45050);function t(a){var i=r(this,a).delete(a);return this.size-=i?1:0,i}f.exports=t},96e3:function(f,v,e){var r=e(45050);function t(a){return r(this,a).get(a)}f.exports=t},49916:function(f,v,e){var r=e(45050);function t(a){return r(this,a).has(a)}f.exports=t},95265:function(f,v,e){var r=e(45050);function t(a,i){var o=r(this,a),u=o.size;return o.set(a,i),this.size+=o.size==u?0:1,this}f.exports=t},68776:function(f){function v(e){var r=-1,t=Array(e.size);return e.forEach(function(a,i){t[++r]=[i,a]}),t}f.exports=v},94536:function(f,v,e){var r=e(10852),t=r(Object,"create");f.exports=t},86916:function(f,v,e){var r=e(5569),t=r(Object.keys,Object);f.exports=t},4e3:function(f,v,e){f=e.nmd(f);var r=e(31957),t=v&&!v.nodeType&&v,a=t&&!0&&f&&!f.nodeType&&f,i=a&&a.exports===t,o=i&&r.process,u=function(){try{var c=a&&a.require&&a.require("util").types;return c||o&&o.binding&&o.binding("util")}catch(l){}}();f.exports=u},2333:function(f){var v=Object.prototype,e=v.toString;function r(t){return e.call(t)}f.exports=r},5569:function(f){function v(e,r){return function(t){return e(r(t))}}f.exports=v},55639:function(f,v,e){var r=e(31957),t=typeof self=="object"&&self&&self.Object===Object&&self,a=r||t||Function("return this")();f.exports=a},90619:function(f){var v="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,v),this}f.exports=e},72385:function(f){function v(e){return this.__data__.has(e)}f.exports=v},21814:function(f){function v(e){var r=-1,t=Array(e.size);return e.forEach(function(a){t[++r]=a}),t}f.exports=v},37465:function(f,v,e){var r=e(38407);function t(){this.__data__=new r,this.size=0}f.exports=t},63779:function(f){function v(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}f.exports=v},67599:function(f){function v(e){return this.__data__.get(e)}f.exports=v},44758:function(f){function v(e){return this.__data__.has(e)}f.exports=v},34309:function(f,v,e){var r=e(38407),t=e(57071),a=e(83369),i=200;function o(u,c){var l=this.__data__;if(l instanceof r){var d=l.__data__;if(!t||d.length=d||V<0||F&&W>=y}function de(){var Q=t();if(ee(Q))return he(Q);S=setTimeout(de,U(Q))}function he(Q){return S=void 0,J&&M?D(Q):(M=_=void 0,I)}function ve(){S!==void 0&&clearTimeout(S),O=0,M=A=_=S=void 0}function ce(){return S===void 0?I:he(t())}function xe(){var Q=t(),V=ee(Q);if(M=arguments,_=this,A=Q,V){if(S===void 0)return R(A);if(F)return clearTimeout(S),S=setTimeout(de,d),D(A)}return S===void 0&&(S=setTimeout(de,d)),I}return xe.cancel=ve,xe.flush=ce,xe}f.exports=c},77813:function(f){function v(e,r){return e===r||e!==e&&r!==r}f.exports=v},35694:function(f,v,e){var r=e(9454),t=e(37005),a=Object.prototype,i=a.hasOwnProperty,o=a.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(c){return t(c)&&i.call(c,"callee")&&!o.call(c,"callee")};f.exports=u},1469:function(f){var v=Array.isArray;f.exports=v},98612:function(f,v,e){var r=e(23560),t=e(41780);function a(i){return i!=null&&t(i.length)&&!r(i)}f.exports=a},44144:function(f,v,e){f=e.nmd(f);var r=e(55639),t=e(95062),a=v&&!v.nodeType&&v,i=a&&!0&&f&&!f.nodeType&&f,o=i&&i.exports===a,u=o?r.Buffer:void 0,c=u?u.isBuffer:void 0,l=c||t;f.exports=l},18446:function(f,v,e){var r=e(90939);function t(a,i){return r(a,i)}f.exports=t},23560:function(f,v,e){var r=e(44239),t=e(13218),a="[object AsyncFunction]",i="[object Function]",o="[object GeneratorFunction]",u="[object Proxy]";function c(l){if(!t(l))return!1;var d=r(l);return d==i||d==o||d==a||d==u}f.exports=c},41780:function(f){var v=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=v}f.exports=e},13218:function(f){function v(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}f.exports=v},37005:function(f){function v(e){return e!=null&&typeof e=="object"}f.exports=v},33448:function(f,v,e){var r=e(44239),t=e(37005),a="[object Symbol]";function i(o){return typeof o=="symbol"||t(o)&&r(o)==a}f.exports=i},36719:function(f,v,e){var r=e(38749),t=e(7518),a=e(4e3),i=a&&a.isTypedArray,o=i?t(i):r;f.exports=o},3674:function(f,v,e){var r=e(14636),t=e(280),a=e(98612);function i(o){return a(o)?r(o):t(o)}f.exports=i},7771:function(f,v,e){var r=e(55639),t=function(){return r.Date.now()};f.exports=t},70479:function(f){function v(){return[]}f.exports=v},95062:function(f){function v(){return!1}f.exports=v},14841:function(f,v,e){var r=e(27561),t=e(13218),a=e(33448),i=0/0,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function d(p){if(typeof p=="number")return p;if(a(p))return i;if(t(p)){var M=typeof p.valueOf=="function"?p.valueOf():p;p=t(M)?M+"":M}if(typeof p!="string")return p===0?p:+p;p=r(p);var _=u.test(p);return _||c.test(p)?l(p.slice(2),_?2:8):o.test(p)?i:+p}f.exports=d},42786:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(a){return/^nm$/i.test(a)},meridiem:function(a,i,o){return a<12?o?"vm":"VM":o?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[M\xF4re om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(a){return a+(a===1||a===8||a>=20?"ste":"de")},week:{dow:1,doy:4}});return t})},14130:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=function(c){return c===0?0:c===1?1:c===2?2:c%100>=3&&c%100<=10?3:c%100>=11?4:5},a={s:["\u0623\u0642\u0644 \u0645\u0646 \u062B\u0627\u0646\u064A\u0629","\u062B\u0627\u0646\u064A\u0629 \u0648\u0627\u062D\u062F\u0629",["\u062B\u0627\u0646\u064A\u062A\u0627\u0646","\u062B\u0627\u0646\u064A\u062A\u064A\u0646"],"%d \u062B\u0648\u0627\u0646","%d \u062B\u0627\u0646\u064A\u0629","%d \u062B\u0627\u0646\u064A\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062F\u0642\u064A\u0642\u0629","\u062F\u0642\u064A\u0642\u0629 \u0648\u0627\u062D\u062F\u0629",["\u062F\u0642\u064A\u0642\u062A\u0627\u0646","\u062F\u0642\u064A\u0642\u062A\u064A\u0646"],"%d \u062F\u0642\u0627\u0626\u0642","%d \u062F\u0642\u064A\u0642\u0629","%d \u062F\u0642\u064A\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062D\u062F\u0629",["\u0633\u0627\u0639\u062A\u0627\u0646","\u0633\u0627\u0639\u062A\u064A\u0646"],"%d \u0633\u0627\u0639\u0627\u062A","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064A\u0648\u0645","\u064A\u0648\u0645 \u0648\u0627\u062D\u062F",["\u064A\u0648\u0645\u0627\u0646","\u064A\u0648\u0645\u064A\u0646"],"%d \u0623\u064A\u0627\u0645","%d \u064A\u0648\u0645\u064B\u0627","%d \u064A\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062D\u062F",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064A\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062D\u062F",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064A\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064B\u0627","%d \u0639\u0627\u0645"]},i=function(c){return function(l,d,p,M){var _=t(l),y=a[c][t(l)];return _===2&&(y=y[d?0:1]),y.replace(/%d/i,l)}},o=["\u062C\u0627\u0646\u0641\u064A","\u0641\u064A\u0641\u0631\u064A","\u0645\u0627\u0631\u0633","\u0623\u0641\u0631\u064A\u0644","\u0645\u0627\u064A","\u062C\u0648\u0627\u0646","\u062C\u0648\u064A\u0644\u064A\u0629","\u0623\u0648\u062A","\u0633\u0628\u062A\u0645\u0628\u0631","\u0623\u0643\u062A\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062F\u064A\u0633\u0645\u0628\u0631"],u=r.defineLocale("ar-dz",{months:o,monthsShort:o,weekdays:"\u0627\u0644\u0623\u062D\u062F_\u0627\u0644\u0625\u062B\u0646\u064A\u0646_\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062E\u0645\u064A\u0633_\u0627\u0644\u062C\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062A".split("_"),weekdaysShort:"\u0623\u062D\u062F_\u0625\u062B\u0646\u064A\u0646_\u062B\u0644\u0627\u062B\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062E\u0645\u064A\u0633_\u062C\u0645\u0639\u0629_\u0633\u0628\u062A".split("_"),weekdaysMin:"\u062D_\u0646_\u062B_\u0631_\u062E_\u062C_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200FM/\u200FYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(c){return c==="\u0645"},meridiem:function(c,l,d){return c<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064A\u0648\u0645 \u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063A\u062F\u064B\u0627 \u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062F %s",past:"\u0645\u0646\u0630 %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},postformat:function(c){return c.replace(/,/g,"\u060C")},week:{dow:0,doy:4}});return u})},96135:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("ar-kw",{months:"\u064A\u0646\u0627\u064A\u0631_\u0641\u0628\u0631\u0627\u064A\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064A\u0644_\u0645\u0627\u064A_\u064A\u0648\u0646\u064A\u0648_\u064A\u0648\u0644\u064A\u0648\u0632_\u063A\u0634\u062A_\u0634\u062A\u0646\u0628\u0631_\u0623\u0643\u062A\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062F\u062C\u0646\u0628\u0631".split("_"),monthsShort:"\u064A\u0646\u0627\u064A\u0631_\u0641\u0628\u0631\u0627\u064A\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064A\u0644_\u0645\u0627\u064A_\u064A\u0648\u0646\u064A\u0648_\u064A\u0648\u0644\u064A\u0648\u0632_\u063A\u0634\u062A_\u0634\u062A\u0646\u0628\u0631_\u0623\u0643\u062A\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062F\u062C\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062D\u062F_\u0627\u0644\u0625\u062A\u0646\u064A\u0646_\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062E\u0645\u064A\u0633_\u0627\u0644\u062C\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062A".split("_"),weekdaysShort:"\u0627\u062D\u062F_\u0627\u062A\u0646\u064A\u0646_\u062B\u0644\u0627\u062B\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062E\u0645\u064A\u0633_\u062C\u0645\u0639\u0629_\u0633\u0628\u062A".split("_"),weekdaysMin:"\u062D_\u0646_\u062B_\u0631_\u062E_\u062C_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064A\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063A\u062F\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064A %s",past:"\u0645\u0646\u0630 %s",s:"\u062B\u0648\u0627\u0646",ss:"%d \u062B\u0627\u0646\u064A\u0629",m:"\u062F\u0642\u064A\u0642\u0629",mm:"%d \u062F\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062A",d:"\u064A\u0648\u0645",dd:"%d \u0623\u064A\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062A"},week:{dow:0,doy:12}});return t})},56440:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},a=function(l){return l===0?0:l===1?1:l===2?2:l%100>=3&&l%100<=10?3:l%100>=11?4:5},i={s:["\u0623\u0642\u0644 \u0645\u0646 \u062B\u0627\u0646\u064A\u0629","\u062B\u0627\u0646\u064A\u0629 \u0648\u0627\u062D\u062F\u0629",["\u062B\u0627\u0646\u064A\u062A\u0627\u0646","\u062B\u0627\u0646\u064A\u062A\u064A\u0646"],"%d \u062B\u0648\u0627\u0646","%d \u062B\u0627\u0646\u064A\u0629","%d \u062B\u0627\u0646\u064A\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062F\u0642\u064A\u0642\u0629","\u062F\u0642\u064A\u0642\u0629 \u0648\u0627\u062D\u062F\u0629",["\u062F\u0642\u064A\u0642\u062A\u0627\u0646","\u062F\u0642\u064A\u0642\u062A\u064A\u0646"],"%d \u062F\u0642\u0627\u0626\u0642","%d \u062F\u0642\u064A\u0642\u0629","%d \u062F\u0642\u064A\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062D\u062F\u0629",["\u0633\u0627\u0639\u062A\u0627\u0646","\u0633\u0627\u0639\u062A\u064A\u0646"],"%d \u0633\u0627\u0639\u0627\u062A","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064A\u0648\u0645","\u064A\u0648\u0645 \u0648\u0627\u062D\u062F",["\u064A\u0648\u0645\u0627\u0646","\u064A\u0648\u0645\u064A\u0646"],"%d \u0623\u064A\u0627\u0645","%d \u064A\u0648\u0645\u064B\u0627","%d \u064A\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062D\u062F",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064A\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062D\u062F",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064A\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064B\u0627","%d \u0639\u0627\u0645"]},o=function(l){return function(d,p,M,_){var y=a(d),I=i[l][a(d)];return y===2&&(I=I[p?0:1]),I.replace(/%d/i,d)}},u=["\u064A\u0646\u0627\u064A\u0631","\u0641\u0628\u0631\u0627\u064A\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064A\u0644","\u0645\u0627\u064A\u0648","\u064A\u0648\u0646\u064A\u0648","\u064A\u0648\u0644\u064A\u0648","\u0623\u063A\u0633\u0637\u0633","\u0633\u0628\u062A\u0645\u0628\u0631","\u0623\u0643\u062A\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062F\u064A\u0633\u0645\u0628\u0631"],c=r.defineLocale("ar-ly",{months:u,monthsShort:u,weekdays:"\u0627\u0644\u0623\u062D\u062F_\u0627\u0644\u0625\u062B\u0646\u064A\u0646_\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062E\u0645\u064A\u0633_\u0627\u0644\u062C\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062A".split("_"),weekdaysShort:"\u0623\u062D\u062F_\u0625\u062B\u0646\u064A\u0646_\u062B\u0644\u0627\u062B\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062E\u0645\u064A\u0633_\u062C\u0645\u0639\u0629_\u0633\u0628\u062A".split("_"),weekdaysMin:"\u062D_\u0646_\u062B_\u0631_\u062E_\u062C_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200FM/\u200FYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(l){return l==="\u0645"},meridiem:function(l,d,p){return l<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064A\u0648\u0645 \u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063A\u062F\u064B\u0627 \u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062F %s",past:"\u0645\u0646\u0630 %s",s:o("s"),ss:o("s"),m:o("m"),mm:o("m"),h:o("h"),hh:o("h"),d:o("d"),dd:o("d"),M:o("M"),MM:o("M"),y:o("y"),yy:o("y")},preparse:function(l){return l.replace(/،/g,",")},postformat:function(l){return l.replace(/\d/g,function(d){return t[d]}).replace(/,/g,"\u060C")},week:{dow:6,doy:12}});return c})},47702:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("ar-ma",{months:"\u064A\u0646\u0627\u064A\u0631_\u0641\u0628\u0631\u0627\u064A\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064A\u0644_\u0645\u0627\u064A_\u064A\u0648\u0646\u064A\u0648_\u064A\u0648\u0644\u064A\u0648\u0632_\u063A\u0634\u062A_\u0634\u062A\u0646\u0628\u0631_\u0623\u0643\u062A\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062F\u062C\u0646\u0628\u0631".split("_"),monthsShort:"\u064A\u0646\u0627\u064A\u0631_\u0641\u0628\u0631\u0627\u064A\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064A\u0644_\u0645\u0627\u064A_\u064A\u0648\u0646\u064A\u0648_\u064A\u0648\u0644\u064A\u0648\u0632_\u063A\u0634\u062A_\u0634\u062A\u0646\u0628\u0631_\u0623\u0643\u062A\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062F\u062C\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062D\u062F_\u0627\u0644\u0625\u062B\u0646\u064A\u0646_\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062E\u0645\u064A\u0633_\u0627\u0644\u062C\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062A".split("_"),weekdaysShort:"\u0627\u062D\u062F_\u0627\u062B\u0646\u064A\u0646_\u062B\u0644\u0627\u062B\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062E\u0645\u064A\u0633_\u062C\u0645\u0639\u0629_\u0633\u0628\u062A".split("_"),weekdaysMin:"\u062D_\u0646_\u062B_\u0631_\u062E_\u062C_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064A\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063A\u062F\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064A %s",past:"\u0645\u0646\u0630 %s",s:"\u062B\u0648\u0627\u0646",ss:"%d \u062B\u0627\u0646\u064A\u0629",m:"\u062F\u0642\u064A\u0642\u0629",mm:"%d \u062F\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062A",d:"\u064A\u0648\u0645",dd:"%d \u0623\u064A\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062A"},week:{dow:1,doy:4}});return t})},16040:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},a={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},i=r.defineLocale("ar-sa",{months:"\u064A\u0646\u0627\u064A\u0631_\u0641\u0628\u0631\u0627\u064A\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064A\u0644_\u0645\u0627\u064A\u0648_\u064A\u0648\u0646\u064A\u0648_\u064A\u0648\u0644\u064A\u0648_\u0623\u063A\u0633\u0637\u0633_\u0633\u0628\u062A\u0645\u0628\u0631_\u0623\u0643\u062A\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062F\u064A\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u064A\u0646\u0627\u064A\u0631_\u0641\u0628\u0631\u0627\u064A\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064A\u0644_\u0645\u0627\u064A\u0648_\u064A\u0648\u0646\u064A\u0648_\u064A\u0648\u0644\u064A\u0648_\u0623\u063A\u0633\u0637\u0633_\u0633\u0628\u062A\u0645\u0628\u0631_\u0623\u0643\u062A\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062F\u064A\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062D\u062F_\u0627\u0644\u0625\u062B\u0646\u064A\u0646_\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062E\u0645\u064A\u0633_\u0627\u0644\u062C\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062A".split("_"),weekdaysShort:"\u0623\u062D\u062F_\u0625\u062B\u0646\u064A\u0646_\u062B\u0644\u0627\u062B\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062E\u0645\u064A\u0633_\u062C\u0645\u0639\u0629_\u0633\u0628\u062A".split("_"),weekdaysMin:"\u062D_\u0646_\u062B_\u0631_\u062E_\u062C_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(o){return o==="\u0645"},meridiem:function(o,u,c){return o<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064A\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063A\u062F\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064A %s",past:"\u0645\u0646\u0630 %s",s:"\u062B\u0648\u0627\u0646",ss:"%d \u062B\u0627\u0646\u064A\u0629",m:"\u062F\u0642\u064A\u0642\u0629",mm:"%d \u062F\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062A",d:"\u064A\u0648\u0645",dd:"%d \u0623\u064A\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062A"},preparse:function(o){return o.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(u){return a[u]}).replace(/،/g,",")},postformat:function(o){return o.replace(/\d/g,function(u){return t[u]}).replace(/,/g,"\u060C")},week:{dow:0,doy:6}});return i})},37100:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("ar-tn",{months:"\u062C\u0627\u0646\u0641\u064A_\u0641\u064A\u0641\u0631\u064A_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064A\u0644_\u0645\u0627\u064A_\u062C\u0648\u0627\u0646_\u062C\u0648\u064A\u0644\u064A\u0629_\u0623\u0648\u062A_\u0633\u0628\u062A\u0645\u0628\u0631_\u0623\u0643\u062A\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062F\u064A\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062C\u0627\u0646\u0641\u064A_\u0641\u064A\u0641\u0631\u064A_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064A\u0644_\u0645\u0627\u064A_\u062C\u0648\u0627\u0646_\u062C\u0648\u064A\u0644\u064A\u0629_\u0623\u0648\u062A_\u0633\u0628\u062A\u0645\u0628\u0631_\u0623\u0643\u062A\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062F\u064A\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062D\u062F_\u0627\u0644\u0625\u062B\u0646\u064A\u0646_\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062E\u0645\u064A\u0633_\u0627\u0644\u062C\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062A".split("_"),weekdaysShort:"\u0623\u062D\u062F_\u0625\u062B\u0646\u064A\u0646_\u062B\u0644\u0627\u062B\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062E\u0645\u064A\u0633_\u062C\u0645\u0639\u0629_\u0633\u0628\u062A".split("_"),weekdaysMin:"\u062D_\u0646_\u062B_\u0631_\u062E_\u062C_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064A\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063A\u062F\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064A %s",past:"\u0645\u0646\u0630 %s",s:"\u062B\u0648\u0627\u0646",ss:"%d \u062B\u0627\u0646\u064A\u0629",m:"\u062F\u0642\u064A\u0642\u0629",mm:"%d \u062F\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062A",d:"\u064A\u0648\u0645",dd:"%d \u0623\u064A\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062A"},week:{dow:1,doy:4}});return t})},30867:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},a={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},i=function(d){return d===0?0:d===1?1:d===2?2:d%100>=3&&d%100<=10?3:d%100>=11?4:5},o={s:["\u0623\u0642\u0644 \u0645\u0646 \u062B\u0627\u0646\u064A\u0629","\u062B\u0627\u0646\u064A\u0629 \u0648\u0627\u062D\u062F\u0629",["\u062B\u0627\u0646\u064A\u062A\u0627\u0646","\u062B\u0627\u0646\u064A\u062A\u064A\u0646"],"%d \u062B\u0648\u0627\u0646","%d \u062B\u0627\u0646\u064A\u0629","%d \u062B\u0627\u0646\u064A\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062F\u0642\u064A\u0642\u0629","\u062F\u0642\u064A\u0642\u0629 \u0648\u0627\u062D\u062F\u0629",["\u062F\u0642\u064A\u0642\u062A\u0627\u0646","\u062F\u0642\u064A\u0642\u062A\u064A\u0646"],"%d \u062F\u0642\u0627\u0626\u0642","%d \u062F\u0642\u064A\u0642\u0629","%d \u062F\u0642\u064A\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062D\u062F\u0629",["\u0633\u0627\u0639\u062A\u0627\u0646","\u0633\u0627\u0639\u062A\u064A\u0646"],"%d \u0633\u0627\u0639\u0627\u062A","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064A\u0648\u0645","\u064A\u0648\u0645 \u0648\u0627\u062D\u062F",["\u064A\u0648\u0645\u0627\u0646","\u064A\u0648\u0645\u064A\u0646"],"%d \u0623\u064A\u0627\u0645","%d \u064A\u0648\u0645\u064B\u0627","%d \u064A\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062D\u062F",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064A\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062D\u062F",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064A\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064B\u0627","%d \u0639\u0627\u0645"]},u=function(d){return function(p,M,_,y){var I=i(p),S=o[d][i(p)];return I===2&&(S=S[M?0:1]),S.replace(/%d/i,p)}},c=["\u064A\u0646\u0627\u064A\u0631","\u0641\u0628\u0631\u0627\u064A\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064A\u0644","\u0645\u0627\u064A\u0648","\u064A\u0648\u0646\u064A\u0648","\u064A\u0648\u0644\u064A\u0648","\u0623\u063A\u0633\u0637\u0633","\u0633\u0628\u062A\u0645\u0628\u0631","\u0623\u0643\u062A\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062F\u064A\u0633\u0645\u0628\u0631"],l=r.defineLocale("ar",{months:c,monthsShort:c,weekdays:"\u0627\u0644\u0623\u062D\u062F_\u0627\u0644\u0625\u062B\u0646\u064A\u0646_\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062E\u0645\u064A\u0633_\u0627\u0644\u062C\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062A".split("_"),weekdaysShort:"\u0623\u062D\u062F_\u0625\u062B\u0646\u064A\u0646_\u062B\u0644\u0627\u062B\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062E\u0645\u064A\u0633_\u062C\u0645\u0639\u0629_\u0633\u0628\u062A".split("_"),weekdaysMin:"\u062D_\u0646_\u062B_\u0631_\u062E_\u062C_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200FM/\u200FYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(d){return d==="\u0645"},meridiem:function(d,p,M){return d<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064A\u0648\u0645 \u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063A\u062F\u064B\u0627 \u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062F \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062F %s",past:"\u0645\u0646\u0630 %s",s:u("s"),ss:u("s"),m:u("m"),mm:u("m"),h:u("h"),hh:u("h"),d:u("d"),dd:u("d"),M:u("M"),MM:u("M"),y:u("y"),yy:u("y")},preparse:function(d){return d.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(p){return a[p]}).replace(/،/g,",")},postformat:function(d){return d.replace(/\d/g,function(p){return t[p]}).replace(/,/g,"\u060C")},week:{dow:6,doy:12}});return l})},31083:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-\xFCnc\xFC",4:"-\xFCnc\xFC",100:"-\xFCnc\xFC",6:"-nc\u0131",9:"-uncu",10:"-uncu",30:"-uncu",60:"-\u0131nc\u0131",90:"-\u0131nc\u0131"},a=r.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ert\u0259si_\xC7\u0259r\u015F\u0259nb\u0259 ax\u015Fam\u0131_\xC7\u0259r\u015F\u0259nb\u0259_C\xFCm\u0259 ax\u015Fam\u0131_C\xFCm\u0259_\u015E\u0259nb\u0259".split("_"),weekdaysShort:"Baz_BzE_\xC7Ax_\xC7\u0259r_CAx_C\xFCm_\u015E\u0259n".split("_"),weekdaysMin:"Bz_BE_\xC7A_\xC7\u0259_CA_C\xFC_\u015E\u0259".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xFCn saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[g\u0259l\u0259n h\u0259ft\u0259] dddd [saat] LT",lastDay:"[d\xFCn\u0259n] LT",lastWeek:"[ke\xE7\u0259n h\u0259ft\u0259] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \u0259vv\u0259l",s:"bir ne\xE7\u0259 saniy\u0259",ss:"%d saniy\u0259",m:"bir d\u0259qiq\u0259",mm:"%d d\u0259qiq\u0259",h:"bir saat",hh:"%d saat",d:"bir g\xFCn",dd:"%d g\xFCn",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(i){return/^(gündüz|axşam)$/.test(i)},meridiem:function(i,o,u){return i<4?"gec\u0259":i<12?"s\u0259h\u0259r":i<17?"g\xFCnd\xFCz":"ax\u015Fam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(i){if(i===0)return i+"-\u0131nc\u0131";var o=i%10,u=i%100-o,c=i>=100?100:null;return i+(t[o]||t[u]||t[c])},week:{dow:1,doy:7}});return a})},9808:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(o,u){var c=o.split("_");return u%10===1&&u%100!==11?c[0]:u%10>=2&&u%10<=4&&(u%100<10||u%100>=20)?c[1]:c[2]}function a(o,u,c){var l={ss:u?"\u0441\u0435\u043A\u0443\u043D\u0434\u0430_\u0441\u0435\u043A\u0443\u043D\u0434\u044B_\u0441\u0435\u043A\u0443\u043D\u0434":"\u0441\u0435\u043A\u0443\u043D\u0434\u0443_\u0441\u0435\u043A\u0443\u043D\u0434\u044B_\u0441\u0435\u043A\u0443\u043D\u0434",mm:u?"\u0445\u0432\u0456\u043B\u0456\u043D\u0430_\u0445\u0432\u0456\u043B\u0456\u043D\u044B_\u0445\u0432\u0456\u043B\u0456\u043D":"\u0445\u0432\u0456\u043B\u0456\u043D\u0443_\u0445\u0432\u0456\u043B\u0456\u043D\u044B_\u0445\u0432\u0456\u043B\u0456\u043D",hh:u?"\u0433\u0430\u0434\u0437\u0456\u043D\u0430_\u0433\u0430\u0434\u0437\u0456\u043D\u044B_\u0433\u0430\u0434\u0437\u0456\u043D":"\u0433\u0430\u0434\u0437\u0456\u043D\u0443_\u0433\u0430\u0434\u0437\u0456\u043D\u044B_\u0433\u0430\u0434\u0437\u0456\u043D",dd:"\u0434\u0437\u0435\u043D\u044C_\u0434\u043D\u0456_\u0434\u0437\u0451\u043D",MM:"\u043C\u0435\u0441\u044F\u0446_\u043C\u0435\u0441\u044F\u0446\u044B_\u043C\u0435\u0441\u044F\u0446\u0430\u045E",yy:"\u0433\u043E\u0434_\u0433\u0430\u0434\u044B_\u0433\u0430\u0434\u043E\u045E"};return c==="m"?u?"\u0445\u0432\u0456\u043B\u0456\u043D\u0430":"\u0445\u0432\u0456\u043B\u0456\u043D\u0443":c==="h"?u?"\u0433\u0430\u0434\u0437\u0456\u043D\u0430":"\u0433\u0430\u0434\u0437\u0456\u043D\u0443":o+" "+t(l[c],+o)}var i=r.defineLocale("be",{months:{format:"\u0441\u0442\u0443\u0434\u0437\u0435\u043D\u044F_\u043B\u044E\u0442\u0430\u0433\u0430_\u0441\u0430\u043A\u0430\u0432\u0456\u043A\u0430_\u043A\u0440\u0430\u0441\u0430\u0432\u0456\u043A\u0430_\u0442\u0440\u0430\u045E\u043D\u044F_\u0447\u044D\u0440\u0432\u0435\u043D\u044F_\u043B\u0456\u043F\u0435\u043D\u044F_\u0436\u043D\u0456\u045E\u043D\u044F_\u0432\u0435\u0440\u0430\u0441\u043D\u044F_\u043A\u0430\u0441\u0442\u0440\u044B\u0447\u043D\u0456\u043A\u0430_\u043B\u0456\u0441\u0442\u0430\u043F\u0430\u0434\u0430_\u0441\u043D\u0435\u0436\u043D\u044F".split("_"),standalone:"\u0441\u0442\u0443\u0434\u0437\u0435\u043D\u044C_\u043B\u044E\u0442\u044B_\u0441\u0430\u043A\u0430\u0432\u0456\u043A_\u043A\u0440\u0430\u0441\u0430\u0432\u0456\u043A_\u0442\u0440\u0430\u0432\u0435\u043D\u044C_\u0447\u044D\u0440\u0432\u0435\u043D\u044C_\u043B\u0456\u043F\u0435\u043D\u044C_\u0436\u043D\u0456\u0432\u0435\u043D\u044C_\u0432\u0435\u0440\u0430\u0441\u0435\u043D\u044C_\u043A\u0430\u0441\u0442\u0440\u044B\u0447\u043D\u0456\u043A_\u043B\u0456\u0441\u0442\u0430\u043F\u0430\u0434_\u0441\u043D\u0435\u0436\u0430\u043D\u044C".split("_")},monthsShort:"\u0441\u0442\u0443\u0434_\u043B\u044E\u0442_\u0441\u0430\u043A_\u043A\u0440\u0430\u0441_\u0442\u0440\u0430\u0432_\u0447\u044D\u0440\u0432_\u043B\u0456\u043F_\u0436\u043D\u0456\u0432_\u0432\u0435\u0440_\u043A\u0430\u0441\u0442_\u043B\u0456\u0441\u0442_\u0441\u043D\u0435\u0436".split("_"),weekdays:{format:"\u043D\u044F\u0434\u0437\u0435\u043B\u044E_\u043F\u0430\u043D\u044F\u0434\u0437\u0435\u043B\u0430\u043A_\u0430\u045E\u0442\u043E\u0440\u0430\u043A_\u0441\u0435\u0440\u0430\u0434\u0443_\u0447\u0430\u0446\u0432\u0435\u0440_\u043F\u044F\u0442\u043D\u0456\u0446\u0443_\u0441\u0443\u0431\u043E\u0442\u0443".split("_"),standalone:"\u043D\u044F\u0434\u0437\u0435\u043B\u044F_\u043F\u0430\u043D\u044F\u0434\u0437\u0435\u043B\u0430\u043A_\u0430\u045E\u0442\u043E\u0440\u0430\u043A_\u0441\u0435\u0440\u0430\u0434\u0430_\u0447\u0430\u0446\u0432\u0435\u0440_\u043F\u044F\u0442\u043D\u0456\u0446\u0430_\u0441\u0443\u0431\u043E\u0442\u0430".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"\u043D\u0434_\u043F\u043D_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043F\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043D\u0434_\u043F\u043D_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043F\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., HH:mm",LLLL:"dddd, D MMMM YYYY \u0433., HH:mm"},calendar:{sameDay:"[\u0421\u0451\u043D\u043D\u044F \u045E] LT",nextDay:"[\u0417\u0430\u045E\u0442\u0440\u0430 \u045E] LT",lastDay:"[\u0423\u0447\u043E\u0440\u0430 \u045E] LT",nextWeek:function(){return"[\u0423] dddd [\u045E] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[\u0423 \u043C\u0456\u043D\u0443\u043B\u0443\u044E] dddd [\u045E] LT";case 1:case 2:case 4:return"[\u0423 \u043C\u0456\u043D\u0443\u043B\u044B] dddd [\u045E] LT"}},sameElse:"L"},relativeTime:{future:"\u043F\u0440\u0430\u0437 %s",past:"%s \u0442\u0430\u043C\u0443",s:"\u043D\u0435\u043A\u0430\u043B\u044C\u043A\u0456 \u0441\u0435\u043A\u0443\u043D\u0434",m:a,mm:a,h:a,hh:a,d:"\u0434\u0437\u0435\u043D\u044C",dd:a,M:"\u043C\u0435\u0441\u044F\u0446",MM:a,y:"\u0433\u043E\u0434",yy:a},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(o){return/^(дня|вечара)$/.test(o)},meridiem:function(o,u,c){return o<4?"\u043D\u043E\u0447\u044B":o<12?"\u0440\u0430\u043D\u0456\u0446\u044B":o<17?"\u0434\u043D\u044F":"\u0432\u0435\u0447\u0430\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(o,u){switch(u){case"M":case"d":case"DDD":case"w":case"W":return(o%10===2||o%10===3)&&o%100!==12&&o%100!==13?o+"-\u0456":o+"-\u044B";case"D":return o+"-\u0433\u0430";default:return o}},week:{dow:1,doy:7}});return i})},68338:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("bg",{months:"\u044F\u043D\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043C\u0430\u0440\u0442_\u0430\u043F\u0440\u0438\u043B_\u043C\u0430\u0439_\u044E\u043D\u0438_\u044E\u043B\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043F\u0442\u0435\u043C\u0432\u0440\u0438_\u043E\u043A\u0442\u043E\u043C\u0432\u0440\u0438_\u043D\u043E\u0435\u043C\u0432\u0440\u0438_\u0434\u0435\u043A\u0435\u043C\u0432\u0440\u0438".split("_"),monthsShort:"\u044F\u043D\u0443_\u0444\u0435\u0432_\u043C\u0430\u0440_\u0430\u043F\u0440_\u043C\u0430\u0439_\u044E\u043D\u0438_\u044E\u043B\u0438_\u0430\u0432\u0433_\u0441\u0435\u043F_\u043E\u043A\u0442_\u043D\u043E\u0435_\u0434\u0435\u043A".split("_"),weekdays:"\u043D\u0435\u0434\u0435\u043B\u044F_\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u043D\u0438\u043A_\u0432\u0442\u043E\u0440\u043D\u0438\u043A_\u0441\u0440\u044F\u0434\u0430_\u0447\u0435\u0442\u0432\u044A\u0440\u0442\u044A\u043A_\u043F\u0435\u0442\u044A\u043A_\u0441\u044A\u0431\u043E\u0442\u0430".split("_"),weekdaysShort:"\u043D\u0435\u0434_\u043F\u043E\u043D_\u0432\u0442\u043E_\u0441\u0440\u044F_\u0447\u0435\u0442_\u043F\u0435\u0442_\u0441\u044A\u0431".split("_"),weekdaysMin:"\u043D\u0434_\u043F\u043D_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043F\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u043D\u0435\u0441 \u0432] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432] LT",nextWeek:"dddd [\u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u041C\u0438\u043D\u0430\u043B\u0430\u0442\u0430] dddd [\u0432] LT";case 1:case 2:case 4:case 5:return"[\u041C\u0438\u043D\u0430\u043B\u0438\u044F] dddd [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0441\u043B\u0435\u0434 %s",past:"\u043F\u0440\u0435\u0434\u0438 %s",s:"\u043D\u044F\u043A\u043E\u043B\u043A\u043E \u0441\u0435\u043A\u0443\u043D\u0434\u0438",ss:"%d \u0441\u0435\u043A\u0443\u043D\u0434\u0438",m:"\u043C\u0438\u043D\u0443\u0442\u0430",mm:"%d \u043C\u0438\u043D\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043D",dd:"%d \u0434\u0435\u043D\u0430",w:"\u0441\u0435\u0434\u043C\u0438\u0446\u0430",ww:"%d \u0441\u0435\u0434\u043C\u0438\u0446\u0438",M:"\u043C\u0435\u0441\u0435\u0446",MM:"%d \u043C\u0435\u0441\u0435\u0446\u0430",y:"\u0433\u043E\u0434\u0438\u043D\u0430",yy:"%d \u0433\u043E\u0434\u0438\u043D\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(a){var i=a%10,o=a%100;return a===0?a+"-\u0435\u0432":o===0?a+"-\u0435\u043D":o>10&&o<20?a+"-\u0442\u0438":i===1?a+"-\u0432\u0438":i===2?a+"-\u0440\u0438":i===7||i===8?a+"-\u043C\u0438":a+"-\u0442\u0438"},week:{dow:1,doy:7}});return t})},67438:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_M\u025Bkalo_Zuw\u025Bnkalo_Zuluyekalo_Utikalo_S\u025Btanburukalo_\u0254kut\u0254burukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_M\u025B_Zuw_Zul_Uti_S\u025Bt_\u0254ku_Now_Des".split("_"),weekdays:"Kari_Nt\u025Bn\u025Bn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Nt\u025B_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [l\u025Br\u025B] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [l\u025Br\u025B] HH:mm"},calendar:{sameDay:"[Bi l\u025Br\u025B] LT",nextDay:"[Sini l\u025Br\u025B] LT",nextWeek:"dddd [don l\u025Br\u025B] LT",lastDay:"[Kunu l\u025Br\u025B] LT",lastWeek:"dddd [t\u025Bm\u025Bnen l\u025Br\u025B] LT",sameElse:"L"},relativeTime:{future:"%s k\u0254n\u0254",past:"a b\u025B %s b\u0254",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"l\u025Br\u025B kelen",hh:"l\u025Br\u025B %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});return t})},76225:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u09E7",2:"\u09E8",3:"\u09E9",4:"\u09EA",5:"\u09EB",6:"\u09EC",7:"\u09ED",8:"\u09EE",9:"\u09EF",0:"\u09E6"},a={"\u09E7":"1","\u09E8":"2","\u09E9":"3","\u09EA":"4","\u09EB":"5","\u09EC":"6","\u09ED":"7","\u09EE":"8","\u09EF":"9","\u09E6":"0"},i=r.defineLocale("bn-bd",{months:"\u099C\u09BE\u09A8\u09C1\u09DF\u09BE\u09B0\u09BF_\u09AB\u09C7\u09AC\u09CD\u09B0\u09C1\u09DF\u09BE\u09B0\u09BF_\u09AE\u09BE\u09B0\u09CD\u099A_\u098F\u09AA\u09CD\u09B0\u09BF\u09B2_\u09AE\u09C7_\u099C\u09C1\u09A8_\u099C\u09C1\u09B2\u09BE\u0987_\u0986\u0997\u09B8\u09CD\u099F_\u09B8\u09C7\u09AA\u09CD\u099F\u09C7\u09AE\u09CD\u09AC\u09B0_\u0985\u0995\u09CD\u099F\u09CB\u09AC\u09B0_\u09A8\u09AD\u09C7\u09AE\u09CD\u09AC\u09B0_\u09A1\u09BF\u09B8\u09C7\u09AE\u09CD\u09AC\u09B0".split("_"),monthsShort:"\u099C\u09BE\u09A8\u09C1_\u09AB\u09C7\u09AC\u09CD\u09B0\u09C1_\u09AE\u09BE\u09B0\u09CD\u099A_\u098F\u09AA\u09CD\u09B0\u09BF\u09B2_\u09AE\u09C7_\u099C\u09C1\u09A8_\u099C\u09C1\u09B2\u09BE\u0987_\u0986\u0997\u09B8\u09CD\u099F_\u09B8\u09C7\u09AA\u09CD\u099F_\u0985\u0995\u09CD\u099F\u09CB_\u09A8\u09AD\u09C7_\u09A1\u09BF\u09B8\u09C7".split("_"),weekdays:"\u09B0\u09AC\u09BF\u09AC\u09BE\u09B0_\u09B8\u09CB\u09AE\u09AC\u09BE\u09B0_\u09AE\u0999\u09CD\u0997\u09B2\u09AC\u09BE\u09B0_\u09AC\u09C1\u09A7\u09AC\u09BE\u09B0_\u09AC\u09C3\u09B9\u09B8\u09CD\u09AA\u09A4\u09BF\u09AC\u09BE\u09B0_\u09B6\u09C1\u0995\u09CD\u09B0\u09AC\u09BE\u09B0_\u09B6\u09A8\u09BF\u09AC\u09BE\u09B0".split("_"),weekdaysShort:"\u09B0\u09AC\u09BF_\u09B8\u09CB\u09AE_\u09AE\u0999\u09CD\u0997\u09B2_\u09AC\u09C1\u09A7_\u09AC\u09C3\u09B9\u09B8\u09CD\u09AA\u09A4\u09BF_\u09B6\u09C1\u0995\u09CD\u09B0_\u09B6\u09A8\u09BF".split("_"),weekdaysMin:"\u09B0\u09AC\u09BF_\u09B8\u09CB\u09AE_\u09AE\u0999\u09CD\u0997\u09B2_\u09AC\u09C1\u09A7_\u09AC\u09C3\u09B9_\u09B6\u09C1\u0995\u09CD\u09B0_\u09B6\u09A8\u09BF".split("_"),longDateFormat:{LT:"A h:mm \u09B8\u09AE\u09DF",LTS:"A h:mm:ss \u09B8\u09AE\u09DF",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09B8\u09AE\u09DF",LLLL:"dddd, D MMMM YYYY, A h:mm \u09B8\u09AE\u09DF"},calendar:{sameDay:"[\u0986\u099C] LT",nextDay:"[\u0986\u0997\u09BE\u09AE\u09C0\u0995\u09BE\u09B2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09A4\u0995\u09BE\u09B2] LT",lastWeek:"[\u0997\u09A4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09AA\u09B0\u09C7",past:"%s \u0986\u0997\u09C7",s:"\u0995\u09DF\u09C7\u0995 \u09B8\u09C7\u0995\u09C7\u09A8\u09CD\u09A1",ss:"%d \u09B8\u09C7\u0995\u09C7\u09A8\u09CD\u09A1",m:"\u098F\u0995 \u09AE\u09BF\u09A8\u09BF\u099F",mm:"%d \u09AE\u09BF\u09A8\u09BF\u099F",h:"\u098F\u0995 \u0998\u09A8\u09CD\u099F\u09BE",hh:"%d \u0998\u09A8\u09CD\u099F\u09BE",d:"\u098F\u0995 \u09A6\u09BF\u09A8",dd:"%d \u09A6\u09BF\u09A8",M:"\u098F\u0995 \u09AE\u09BE\u09B8",MM:"%d \u09AE\u09BE\u09B8",y:"\u098F\u0995 \u09AC\u099B\u09B0",yy:"%d \u09AC\u099B\u09B0"},preparse:function(o){return o.replace(/[১২৩৪৫৬৭৮৯০]/g,function(u){return a[u]})},postformat:function(o){return o.replace(/\d/g,function(u){return t[u]})},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(o,u){if(o===12&&(o=0),u==="\u09B0\u09BE\u09A4")return o<4?o:o+12;if(u==="\u09AD\u09CB\u09B0")return o;if(u==="\u09B8\u0995\u09BE\u09B2")return o;if(u==="\u09A6\u09C1\u09AA\u09C1\u09B0")return o>=3?o:o+12;if(u==="\u09AC\u09BF\u0995\u09BE\u09B2")return o+12;if(u==="\u09B8\u09A8\u09CD\u09A7\u09CD\u09AF\u09BE")return o+12},meridiem:function(o,u,c){return o<4?"\u09B0\u09BE\u09A4":o<6?"\u09AD\u09CB\u09B0":o<12?"\u09B8\u0995\u09BE\u09B2":o<15?"\u09A6\u09C1\u09AA\u09C1\u09B0":o<18?"\u09AC\u09BF\u0995\u09BE\u09B2":o<20?"\u09B8\u09A8\u09CD\u09A7\u09CD\u09AF\u09BE":"\u09B0\u09BE\u09A4"},week:{dow:0,doy:6}});return i})},8905:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u09E7",2:"\u09E8",3:"\u09E9",4:"\u09EA",5:"\u09EB",6:"\u09EC",7:"\u09ED",8:"\u09EE",9:"\u09EF",0:"\u09E6"},a={"\u09E7":"1","\u09E8":"2","\u09E9":"3","\u09EA":"4","\u09EB":"5","\u09EC":"6","\u09ED":"7","\u09EE":"8","\u09EF":"9","\u09E6":"0"},i=r.defineLocale("bn",{months:"\u099C\u09BE\u09A8\u09C1\u09DF\u09BE\u09B0\u09BF_\u09AB\u09C7\u09AC\u09CD\u09B0\u09C1\u09DF\u09BE\u09B0\u09BF_\u09AE\u09BE\u09B0\u09CD\u099A_\u098F\u09AA\u09CD\u09B0\u09BF\u09B2_\u09AE\u09C7_\u099C\u09C1\u09A8_\u099C\u09C1\u09B2\u09BE\u0987_\u0986\u0997\u09B8\u09CD\u099F_\u09B8\u09C7\u09AA\u09CD\u099F\u09C7\u09AE\u09CD\u09AC\u09B0_\u0985\u0995\u09CD\u099F\u09CB\u09AC\u09B0_\u09A8\u09AD\u09C7\u09AE\u09CD\u09AC\u09B0_\u09A1\u09BF\u09B8\u09C7\u09AE\u09CD\u09AC\u09B0".split("_"),monthsShort:"\u099C\u09BE\u09A8\u09C1_\u09AB\u09C7\u09AC\u09CD\u09B0\u09C1_\u09AE\u09BE\u09B0\u09CD\u099A_\u098F\u09AA\u09CD\u09B0\u09BF\u09B2_\u09AE\u09C7_\u099C\u09C1\u09A8_\u099C\u09C1\u09B2\u09BE\u0987_\u0986\u0997\u09B8\u09CD\u099F_\u09B8\u09C7\u09AA\u09CD\u099F_\u0985\u0995\u09CD\u099F\u09CB_\u09A8\u09AD\u09C7_\u09A1\u09BF\u09B8\u09C7".split("_"),weekdays:"\u09B0\u09AC\u09BF\u09AC\u09BE\u09B0_\u09B8\u09CB\u09AE\u09AC\u09BE\u09B0_\u09AE\u0999\u09CD\u0997\u09B2\u09AC\u09BE\u09B0_\u09AC\u09C1\u09A7\u09AC\u09BE\u09B0_\u09AC\u09C3\u09B9\u09B8\u09CD\u09AA\u09A4\u09BF\u09AC\u09BE\u09B0_\u09B6\u09C1\u0995\u09CD\u09B0\u09AC\u09BE\u09B0_\u09B6\u09A8\u09BF\u09AC\u09BE\u09B0".split("_"),weekdaysShort:"\u09B0\u09AC\u09BF_\u09B8\u09CB\u09AE_\u09AE\u0999\u09CD\u0997\u09B2_\u09AC\u09C1\u09A7_\u09AC\u09C3\u09B9\u09B8\u09CD\u09AA\u09A4\u09BF_\u09B6\u09C1\u0995\u09CD\u09B0_\u09B6\u09A8\u09BF".split("_"),weekdaysMin:"\u09B0\u09AC\u09BF_\u09B8\u09CB\u09AE_\u09AE\u0999\u09CD\u0997\u09B2_\u09AC\u09C1\u09A7_\u09AC\u09C3\u09B9_\u09B6\u09C1\u0995\u09CD\u09B0_\u09B6\u09A8\u09BF".split("_"),longDateFormat:{LT:"A h:mm \u09B8\u09AE\u09DF",LTS:"A h:mm:ss \u09B8\u09AE\u09DF",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09B8\u09AE\u09DF",LLLL:"dddd, D MMMM YYYY, A h:mm \u09B8\u09AE\u09DF"},calendar:{sameDay:"[\u0986\u099C] LT",nextDay:"[\u0986\u0997\u09BE\u09AE\u09C0\u0995\u09BE\u09B2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09A4\u0995\u09BE\u09B2] LT",lastWeek:"[\u0997\u09A4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09AA\u09B0\u09C7",past:"%s \u0986\u0997\u09C7",s:"\u0995\u09DF\u09C7\u0995 \u09B8\u09C7\u0995\u09C7\u09A8\u09CD\u09A1",ss:"%d \u09B8\u09C7\u0995\u09C7\u09A8\u09CD\u09A1",m:"\u098F\u0995 \u09AE\u09BF\u09A8\u09BF\u099F",mm:"%d \u09AE\u09BF\u09A8\u09BF\u099F",h:"\u098F\u0995 \u0998\u09A8\u09CD\u099F\u09BE",hh:"%d \u0998\u09A8\u09CD\u099F\u09BE",d:"\u098F\u0995 \u09A6\u09BF\u09A8",dd:"%d \u09A6\u09BF\u09A8",M:"\u098F\u0995 \u09AE\u09BE\u09B8",MM:"%d \u09AE\u09BE\u09B8",y:"\u098F\u0995 \u09AC\u099B\u09B0",yy:"%d \u09AC\u099B\u09B0"},preparse:function(o){return o.replace(/[১২৩৪৫৬৭৮৯০]/g,function(u){return a[u]})},postformat:function(o){return o.replace(/\d/g,function(u){return t[u]})},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(o,u){return o===12&&(o=0),u==="\u09B0\u09BE\u09A4"&&o>=4||u==="\u09A6\u09C1\u09AA\u09C1\u09B0"&&o<5||u==="\u09AC\u09BF\u0995\u09BE\u09B2"?o+12:o},meridiem:function(o,u,c){return o<4?"\u09B0\u09BE\u09A4":o<10?"\u09B8\u0995\u09BE\u09B2":o<17?"\u09A6\u09C1\u09AA\u09C1\u09B0":o<20?"\u09AC\u09BF\u0995\u09BE\u09B2":"\u09B0\u09BE\u09A4"},week:{dow:0,doy:6}});return i})},11560:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u0F21",2:"\u0F22",3:"\u0F23",4:"\u0F24",5:"\u0F25",6:"\u0F26",7:"\u0F27",8:"\u0F28",9:"\u0F29",0:"\u0F20"},a={"\u0F21":"1","\u0F22":"2","\u0F23":"3","\u0F24":"4","\u0F25":"5","\u0F26":"6","\u0F27":"7","\u0F28":"8","\u0F29":"9","\u0F20":"0"},i=r.defineLocale("bo",{months:"\u0F5F\u0FB3\u0F0B\u0F56\u0F0B\u0F51\u0F44\u0F0B\u0F54\u0F7C_\u0F5F\u0FB3\u0F0B\u0F56\u0F0B\u0F42\u0F49\u0F72\u0F66\u0F0B\u0F54_\u0F5F\u0FB3\u0F0B\u0F56\u0F0B\u0F42\u0F66\u0F74\u0F58\u0F0B\u0F54_\u0F5F\u0FB3\u0F0B\u0F56\u0F0B\u0F56\u0F5E\u0F72\u0F0B\u0F54_\u0F5F\u0FB3\u0F0B\u0F56\u0F0B\u0F63\u0F94\u0F0B\u0F54_\u0F5F\u0FB3\u0F0B\u0F56\u0F0B\u0F51\u0FB2\u0F74\u0F42\u0F0B\u0F54_\u0F5F\u0FB3\u0F0B\u0F56\u0F0B\u0F56\u0F51\u0F74\u0F53\u0F0B\u0F54_\u0F5F\u0FB3\u0F0B\u0F56\u0F0B\u0F56\u0F62\u0F92\u0FB1\u0F51\u0F0B\u0F54_\u0F5F\u0FB3\u0F0B\u0F56\u0F0B\u0F51\u0F42\u0F74\u0F0B\u0F54_\u0F5F\u0FB3\u0F0B\u0F56\u0F0B\u0F56\u0F45\u0F74\u0F0B\u0F54_\u0F5F\u0FB3\u0F0B\u0F56\u0F0B\u0F56\u0F45\u0F74\u0F0B\u0F42\u0F45\u0F72\u0F42\u0F0B\u0F54_\u0F5F\u0FB3\u0F0B\u0F56\u0F0B\u0F56\u0F45\u0F74\u0F0B\u0F42\u0F49\u0F72\u0F66\u0F0B\u0F54".split("_"),monthsShort:"\u0F5F\u0FB3\u0F0B1_\u0F5F\u0FB3\u0F0B2_\u0F5F\u0FB3\u0F0B3_\u0F5F\u0FB3\u0F0B4_\u0F5F\u0FB3\u0F0B5_\u0F5F\u0FB3\u0F0B6_\u0F5F\u0FB3\u0F0B7_\u0F5F\u0FB3\u0F0B8_\u0F5F\u0FB3\u0F0B9_\u0F5F\u0FB3\u0F0B10_\u0F5F\u0FB3\u0F0B11_\u0F5F\u0FB3\u0F0B12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"\u0F42\u0F5F\u0F60\u0F0B\u0F49\u0F72\u0F0B\u0F58\u0F0B_\u0F42\u0F5F\u0F60\u0F0B\u0F5F\u0FB3\u0F0B\u0F56\u0F0B_\u0F42\u0F5F\u0F60\u0F0B\u0F58\u0F72\u0F42\u0F0B\u0F51\u0F58\u0F62\u0F0B_\u0F42\u0F5F\u0F60\u0F0B\u0F63\u0FB7\u0F42\u0F0B\u0F54\u0F0B_\u0F42\u0F5F\u0F60\u0F0B\u0F55\u0F74\u0F62\u0F0B\u0F56\u0F74_\u0F42\u0F5F\u0F60\u0F0B\u0F54\u0F0B\u0F66\u0F44\u0F66\u0F0B_\u0F42\u0F5F\u0F60\u0F0B\u0F66\u0FA4\u0F7A\u0F53\u0F0B\u0F54\u0F0B".split("_"),weekdaysShort:"\u0F49\u0F72\u0F0B\u0F58\u0F0B_\u0F5F\u0FB3\u0F0B\u0F56\u0F0B_\u0F58\u0F72\u0F42\u0F0B\u0F51\u0F58\u0F62\u0F0B_\u0F63\u0FB7\u0F42\u0F0B\u0F54\u0F0B_\u0F55\u0F74\u0F62\u0F0B\u0F56\u0F74_\u0F54\u0F0B\u0F66\u0F44\u0F66\u0F0B_\u0F66\u0FA4\u0F7A\u0F53\u0F0B\u0F54\u0F0B".split("_"),weekdaysMin:"\u0F49\u0F72_\u0F5F\u0FB3_\u0F58\u0F72\u0F42_\u0F63\u0FB7\u0F42_\u0F55\u0F74\u0F62_\u0F66\u0F44\u0F66_\u0F66\u0FA4\u0F7A\u0F53".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0F51\u0F72\u0F0B\u0F62\u0F72\u0F44] LT",nextDay:"[\u0F66\u0F44\u0F0B\u0F49\u0F72\u0F53] LT",nextWeek:"[\u0F56\u0F51\u0F74\u0F53\u0F0B\u0F55\u0FB2\u0F42\u0F0B\u0F62\u0F97\u0F7A\u0F66\u0F0B\u0F58], LT",lastDay:"[\u0F41\u0F0B\u0F66\u0F44] LT",lastWeek:"[\u0F56\u0F51\u0F74\u0F53\u0F0B\u0F55\u0FB2\u0F42\u0F0B\u0F58\u0F50\u0F60\u0F0B\u0F58] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0F63\u0F0B",past:"%s \u0F66\u0F94\u0F53\u0F0B\u0F63",s:"\u0F63\u0F58\u0F0B\u0F66\u0F44",ss:"%d \u0F66\u0F90\u0F62\u0F0B\u0F46\u0F0D",m:"\u0F66\u0F90\u0F62\u0F0B\u0F58\u0F0B\u0F42\u0F45\u0F72\u0F42",mm:"%d \u0F66\u0F90\u0F62\u0F0B\u0F58",h:"\u0F46\u0F74\u0F0B\u0F5A\u0F7C\u0F51\u0F0B\u0F42\u0F45\u0F72\u0F42",hh:"%d \u0F46\u0F74\u0F0B\u0F5A\u0F7C\u0F51",d:"\u0F49\u0F72\u0F53\u0F0B\u0F42\u0F45\u0F72\u0F42",dd:"%d \u0F49\u0F72\u0F53\u0F0B",M:"\u0F5F\u0FB3\u0F0B\u0F56\u0F0B\u0F42\u0F45\u0F72\u0F42",MM:"%d \u0F5F\u0FB3\u0F0B\u0F56",y:"\u0F63\u0F7C\u0F0B\u0F42\u0F45\u0F72\u0F42",yy:"%d \u0F63\u0F7C"},preparse:function(o){return o.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(u){return a[u]})},postformat:function(o){return o.replace(/\d/g,function(u){return t[u]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(o,u){return o===12&&(o=0),u==="\u0F58\u0F5A\u0F53\u0F0B\u0F58\u0F7C"&&o>=4||u==="\u0F49\u0F72\u0F53\u0F0B\u0F42\u0F74\u0F44"&&o<5||u==="\u0F51\u0F42\u0F7C\u0F44\u0F0B\u0F51\u0F42"?o+12:o},meridiem:function(o,u,c){return o<4?"\u0F58\u0F5A\u0F53\u0F0B\u0F58\u0F7C":o<10?"\u0F5E\u0F7C\u0F42\u0F66\u0F0B\u0F40\u0F66":o<17?"\u0F49\u0F72\u0F53\u0F0B\u0F42\u0F74\u0F44":o<20?"\u0F51\u0F42\u0F7C\u0F44\u0F0B\u0F51\u0F42":"\u0F58\u0F5A\u0F53\u0F0B\u0F58\u0F7C"},week:{dow:0,doy:6}});return i})},1278:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(S,A,O){var j={mm:"munutenn",MM:"miz",dd:"devezh"};return S+" "+o(j[O],S)}function a(S){switch(i(S)){case 1:case 3:case 4:case 5:case 9:return S+" bloaz";default:return S+" vloaz"}}function i(S){return S>9?i(S%10):S}function o(S,A){return A===2?u(S):S}function u(S){var A={m:"v",b:"v",d:"z"};return A[S.charAt(0)]===void 0?S:A[S.charAt(0)]+S.substring(1)}var c=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],l=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,d=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,p=/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,M=[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],_=[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],y=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i],I=r.defineLocale("br",{months:"Genver_C\u02BChwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C\u02BChwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc\u02BCher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:y,fullWeekdaysParse:M,shortWeekdaysParse:_,minWeekdaysParse:y,monthsRegex:l,monthsShortRegex:l,monthsStrictRegex:d,monthsShortStrictRegex:p,monthsParse:c,longMonthsParse:c,shortMonthsParse:c,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc\u02BChoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec\u02BCh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s \u02BCzo",s:"un nebeud segondenno\xF9",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:a},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(S){var A=S===1?"a\xF1":"vet";return S+A},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(S){return S==="g.m."},meridiem:function(S,A,O){return S<12?"a.m.":"g.m."}});return I})},80622:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(i,o,u){var c=i+" ";switch(u){case"ss":return i===1?c+="sekunda":i===2||i===3||i===4?c+="sekunde":c+="sekundi",c;case"m":return o?"jedna minuta":"jedne minute";case"mm":return i===1?c+="minuta":i===2||i===3||i===4?c+="minute":c+="minuta",c;case"h":return o?"jedan sat":"jednog sata";case"hh":return i===1?c+="sat":i===2||i===3||i===4?c+="sata":c+="sati",c;case"dd":return i===1?c+="dan":c+="dana",c;case"MM":return i===1?c+="mjesec":i===2||i===3||i===4?c+="mjeseca":c+="mjeseci",c;case"yy":return i===1?c+="godina":i===2||i===3||i===4?c+="godine":c+="godina",c}}var a=r.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010Detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010Det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010De_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010Der u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[pro\u0161lu] dddd [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return a})},2468:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("ca",{months:{standalone:"gener_febrer_mar\xE7_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de mar\xE7_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._mar\xE7_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[dem\xE0 a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aqu\xED %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(a,i){var o=a===1?"r":a===2?"n":a===3?"r":a===4?"t":"\xE8";return(i==="w"||i==="W")&&(o="a"),a+o},week:{dow:1,doy:4}});return t})},5822:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={format:"leden_\xFAnor_b\u0159ezen_duben_kv\u011Bten_\u010Derven_\u010Dervenec_srpen_z\xE1\u0159\xED_\u0159\xEDjen_listopad_prosinec".split("_"),standalone:"ledna_\xFAnora_b\u0159ezna_dubna_kv\u011Btna_\u010Dervna_\u010Dervence_srpna_z\xE1\u0159\xED_\u0159\xEDjna_listopadu_prosince".split("_")},a="led_\xFAno_b\u0159e_dub_kv\u011B_\u010Dvn_\u010Dvc_srp_z\xE1\u0159_\u0159\xEDj_lis_pro".split("_"),i=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],o=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function u(d){return d>1&&d<5&&~~(d/10)!==1}function c(d,p,M,_){var y=d+" ";switch(M){case"s":return p||_?"p\xE1r sekund":"p\xE1r sekundami";case"ss":return p||_?y+(u(d)?"sekundy":"sekund"):y+"sekundami";case"m":return p?"minuta":_?"minutu":"minutou";case"mm":return p||_?y+(u(d)?"minuty":"minut"):y+"minutami";case"h":return p?"hodina":_?"hodinu":"hodinou";case"hh":return p||_?y+(u(d)?"hodiny":"hodin"):y+"hodinami";case"d":return p||_?"den":"dnem";case"dd":return p||_?y+(u(d)?"dny":"dn\xED"):y+"dny";case"M":return p||_?"m\u011Bs\xEDc":"m\u011Bs\xEDcem";case"MM":return p||_?y+(u(d)?"m\u011Bs\xEDce":"m\u011Bs\xEDc\u016F"):y+"m\u011Bs\xEDci";case"y":return p||_?"rok":"rokem";case"yy":return p||_?y+(u(d)?"roky":"let"):y+"lety"}}var l=r.defineLocale("cs",{months:t,monthsShort:a,monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"ned\u011Ble_pond\u011Bl\xED_\xFAter\xFD_st\u0159eda_\u010Dtvrtek_p\xE1tek_sobota".split("_"),weekdaysShort:"ne_po_\xFAt_st_\u010Dt_p\xE1_so".split("_"),weekdaysMin:"ne_po_\xFAt_st_\u010Dt_p\xE1_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[z\xEDtra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v ned\u011Bli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve st\u0159edu v] LT";case 4:return"[ve \u010Dtvrtek v] LT";case 5:return"[v p\xE1tek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[v\u010Dera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou ned\u011Bli v] LT";case 1:case 2:return"[minul\xE9] dddd [v] LT";case 3:return"[minulou st\u0159edu v] LT";case 4:case 5:return"[minul\xFD] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"p\u0159ed %s",s:c,ss:c,m:c,mm:c,h:c,hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return l})},50877:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("cv",{months:"\u043A\u04D1\u0440\u043B\u0430\u0447_\u043D\u0430\u0440\u04D1\u0441_\u043F\u0443\u0448_\u0430\u043A\u0430_\u043C\u0430\u0439_\u04AB\u04D7\u0440\u0442\u043C\u0435_\u0443\u0442\u04D1_\u04AB\u0443\u0440\u043B\u0430_\u0430\u0432\u04D1\u043D_\u044E\u043F\u0430_\u0447\u04F3\u043A_\u0440\u0430\u0448\u0442\u0430\u0432".split("_"),monthsShort:"\u043A\u04D1\u0440_\u043D\u0430\u0440_\u043F\u0443\u0448_\u0430\u043A\u0430_\u043C\u0430\u0439_\u04AB\u04D7\u0440_\u0443\u0442\u04D1_\u04AB\u0443\u0440_\u0430\u0432\u043D_\u044E\u043F\u0430_\u0447\u04F3\u043A_\u0440\u0430\u0448".split("_"),weekdays:"\u0432\u044B\u0440\u0441\u0430\u0440\u043D\u0438\u043A\u0443\u043D_\u0442\u0443\u043D\u0442\u0438\u043A\u0443\u043D_\u044B\u0442\u043B\u0430\u0440\u0438\u043A\u0443\u043D_\u044E\u043D\u043A\u0443\u043D_\u043A\u04D7\u04AB\u043D\u0435\u0440\u043D\u0438\u043A\u0443\u043D_\u044D\u0440\u043D\u0435\u043A\u0443\u043D_\u0448\u04D1\u043C\u0430\u0442\u043A\u0443\u043D".split("_"),weekdaysShort:"\u0432\u044B\u0440_\u0442\u0443\u043D_\u044B\u0442\u043B_\u044E\u043D_\u043A\u04D7\u04AB_\u044D\u0440\u043D_\u0448\u04D1\u043C".split("_"),weekdaysMin:"\u0432\u0440_\u0442\u043D_\u044B\u0442_\u044E\u043D_\u043A\u04AB_\u044D\u0440_\u0448\u043C".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [\u04AB\u0443\u043B\u0445\u0438] MMMM [\u0443\u0439\u04D1\u0445\u04D7\u043D] D[-\u043C\u04D7\u0448\u04D7]",LLL:"YYYY [\u04AB\u0443\u043B\u0445\u0438] MMMM [\u0443\u0439\u04D1\u0445\u04D7\u043D] D[-\u043C\u04D7\u0448\u04D7], HH:mm",LLLL:"dddd, YYYY [\u04AB\u0443\u043B\u0445\u0438] MMMM [\u0443\u0439\u04D1\u0445\u04D7\u043D] D[-\u043C\u04D7\u0448\u04D7], HH:mm"},calendar:{sameDay:"[\u041F\u0430\u044F\u043D] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextDay:"[\u042B\u0440\u0430\u043D] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastDay:"[\u04D6\u043D\u0435\u0440] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextWeek:"[\u04AA\u0438\u0442\u0435\u0441] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastWeek:"[\u0418\u0440\u0442\u043D\u04D7] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",sameElse:"L"},relativeTime:{future:function(a){var i=/сехет$/i.exec(a)?"\u0440\u0435\u043D":/ҫул$/i.exec(a)?"\u0442\u0430\u043D":"\u0440\u0430\u043D";return a+i},past:"%s \u043A\u0430\u044F\u043B\u043B\u0430",s:"\u043F\u04D7\u0440-\u0438\u043A \u04AB\u0435\u043A\u043A\u0443\u043D\u0442",ss:"%d \u04AB\u0435\u043A\u043A\u0443\u043D\u0442",m:"\u043F\u04D7\u0440 \u043C\u0438\u043D\u0443\u0442",mm:"%d \u043C\u0438\u043D\u0443\u0442",h:"\u043F\u04D7\u0440 \u0441\u0435\u0445\u0435\u0442",hh:"%d \u0441\u0435\u0445\u0435\u0442",d:"\u043F\u04D7\u0440 \u043A\u0443\u043D",dd:"%d \u043A\u0443\u043D",M:"\u043F\u04D7\u0440 \u0443\u0439\u04D1\u0445",MM:"%d \u0443\u0439\u04D1\u0445",y:"\u043F\u04D7\u0440 \u04AB\u0443\u043B",yy:"%d \u04AB\u0443\u043B"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-\u043C\u04D7\u0448",week:{dow:1,doy:7}});return t})},47373:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn \xF4l",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(a){var i=a,o="",u=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return i>20?i===40||i===50||i===60||i===80||i===100?o="fed":o="ain":i>0&&(o=u[i]),a+o},week:{dow:1,doy:4}});return t})},24780:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xF8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xF8rdag".split("_"),weekdaysShort:"s\xF8n_man_tir_ons_tor_fre_l\xF8r".split("_"),weekdaysMin:"s\xF8_ma_ti_on_to_fr_l\xF8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"p\xE5 dddd [kl.] LT",lastDay:"[i g\xE5r kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"f\xE5 sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en m\xE5ned",MM:"%d m\xE5neder",y:"et \xE5r",yy:"%d \xE5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t})},60217:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(i,o,u,c){var l={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[i+" Tage",i+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[i+" Monate",i+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[i+" Jahre",i+" Jahren"]};return o?l[u][0]:l[u][1]}var a=r.defineLocale("de-at",{months:"J\xE4nner_Februar_M\xE4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"J\xE4n._Feb._M\xE4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a})},60894:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(i,o,u,c){var l={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[i+" Tage",i+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[i+" Monate",i+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[i+" Jahre",i+" Jahren"]};return o?l[u][0]:l[u][1]}var a=r.defineLocale("de-ch",{months:"Januar_Februar_M\xE4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xE4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a})},59740:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(i,o,u,c){var l={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[i+" Tage",i+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[i+" Monate",i+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[i+" Jahre",i+" Jahren"]};return o?l[u][0]:l[u][1]}var a=r.defineLocale("de",{months:"Januar_Februar_M\xE4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xE4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a})},5300:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=["\u0796\u07AC\u0782\u07AA\u0787\u07A6\u0783\u07A9","\u078A\u07AC\u0784\u07B0\u0783\u07AA\u0787\u07A6\u0783\u07A9","\u0789\u07A7\u0783\u07A8\u0797\u07AA","\u0787\u07AD\u0795\u07B0\u0783\u07A9\u078D\u07AA","\u0789\u07AD","\u0796\u07AB\u0782\u07B0","\u0796\u07AA\u078D\u07A6\u0787\u07A8","\u0787\u07AF\u078E\u07A6\u0790\u07B0\u0793\u07AA","\u0790\u07AC\u0795\u07B0\u0793\u07AC\u0789\u07B0\u0784\u07A6\u0783\u07AA","\u0787\u07AE\u0786\u07B0\u0793\u07AF\u0784\u07A6\u0783\u07AA","\u0782\u07AE\u0788\u07AC\u0789\u07B0\u0784\u07A6\u0783\u07AA","\u0791\u07A8\u0790\u07AC\u0789\u07B0\u0784\u07A6\u0783\u07AA"],a=["\u0787\u07A7\u078B\u07A8\u0787\u07B0\u078C\u07A6","\u0780\u07AF\u0789\u07A6","\u0787\u07A6\u0782\u07B0\u078E\u07A7\u0783\u07A6","\u0784\u07AA\u078B\u07A6","\u0784\u07AA\u0783\u07A7\u0790\u07B0\u078A\u07A6\u078C\u07A8","\u0780\u07AA\u0786\u07AA\u0783\u07AA","\u0780\u07AE\u0782\u07A8\u0780\u07A8\u0783\u07AA"],i=r.defineLocale("dv",{months:t,monthsShort:t,weekdays:a,weekdaysShort:a,weekdaysMin:"\u0787\u07A7\u078B\u07A8_\u0780\u07AF\u0789\u07A6_\u0787\u07A6\u0782\u07B0_\u0784\u07AA\u078B\u07A6_\u0784\u07AA\u0783\u07A7_\u0780\u07AA\u0786\u07AA_\u0780\u07AE\u0782\u07A8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(o){return o==="\u0789\u078A"},meridiem:function(o,u,c){return o<12?"\u0789\u0786":"\u0789\u078A"},calendar:{sameDay:"[\u0789\u07A8\u0787\u07A6\u078B\u07AA] LT",nextDay:"[\u0789\u07A7\u078B\u07A6\u0789\u07A7] LT",nextWeek:"dddd LT",lastDay:"[\u0787\u07A8\u0787\u07B0\u0794\u07AC] LT",lastWeek:"[\u078A\u07A7\u0787\u07A8\u078C\u07AA\u0788\u07A8] dddd LT",sameElse:"L"},relativeTime:{future:"\u078C\u07AC\u0783\u07AD\u078E\u07A6\u0787\u07A8 %s",past:"\u0786\u07AA\u0783\u07A8\u0782\u07B0 %s",s:"\u0790\u07A8\u0786\u07AA\u0782\u07B0\u078C\u07AA\u0786\u07AE\u0785\u07AC\u0787\u07B0",ss:"d% \u0790\u07A8\u0786\u07AA\u0782\u07B0\u078C\u07AA",m:"\u0789\u07A8\u0782\u07A8\u0793\u07AC\u0787\u07B0",mm:"\u0789\u07A8\u0782\u07A8\u0793\u07AA %d",h:"\u078E\u07A6\u0791\u07A8\u0787\u07A8\u0783\u07AC\u0787\u07B0",hh:"\u078E\u07A6\u0791\u07A8\u0787\u07A8\u0783\u07AA %d",d:"\u078B\u07AA\u0788\u07A6\u0780\u07AC\u0787\u07B0",dd:"\u078B\u07AA\u0788\u07A6\u0790\u07B0 %d",M:"\u0789\u07A6\u0780\u07AC\u0787\u07B0",MM:"\u0789\u07A6\u0790\u07B0 %d",y:"\u0787\u07A6\u0780\u07A6\u0783\u07AC\u0787\u07B0",yy:"\u0787\u07A6\u0780\u07A6\u0783\u07AA %d"},preparse:function(o){return o.replace(/،/g,",")},postformat:function(o){return o.replace(/,/g,"\u060C")},week:{dow:7,doy:12}});return i})},50837:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(i){return typeof Function!="undefined"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}var a=r.defineLocale("el",{monthsNominativeEl:"\u0399\u03B1\u03BD\u03BF\u03C5\u03AC\u03C1\u03B9\u03BF\u03C2_\u03A6\u03B5\u03B2\u03C1\u03BF\u03C5\u03AC\u03C1\u03B9\u03BF\u03C2_\u039C\u03AC\u03C1\u03C4\u03B9\u03BF\u03C2_\u0391\u03C0\u03C1\u03AF\u03BB\u03B9\u03BF\u03C2_\u039C\u03AC\u03B9\u03BF\u03C2_\u0399\u03BF\u03CD\u03BD\u03B9\u03BF\u03C2_\u0399\u03BF\u03CD\u03BB\u03B9\u03BF\u03C2_\u0391\u03CD\u03B3\u03BF\u03C5\u03C3\u03C4\u03BF\u03C2_\u03A3\u03B5\u03C0\u03C4\u03AD\u03BC\u03B2\u03C1\u03B9\u03BF\u03C2_\u039F\u03BA\u03C4\u03CE\u03B2\u03C1\u03B9\u03BF\u03C2_\u039D\u03BF\u03AD\u03BC\u03B2\u03C1\u03B9\u03BF\u03C2_\u0394\u03B5\u03BA\u03AD\u03BC\u03B2\u03C1\u03B9\u03BF\u03C2".split("_"),monthsGenitiveEl:"\u0399\u03B1\u03BD\u03BF\u03C5\u03B1\u03C1\u03AF\u03BF\u03C5_\u03A6\u03B5\u03B2\u03C1\u03BF\u03C5\u03B1\u03C1\u03AF\u03BF\u03C5_\u039C\u03B1\u03C1\u03C4\u03AF\u03BF\u03C5_\u0391\u03C0\u03C1\u03B9\u03BB\u03AF\u03BF\u03C5_\u039C\u03B1\u0390\u03BF\u03C5_\u0399\u03BF\u03C5\u03BD\u03AF\u03BF\u03C5_\u0399\u03BF\u03C5\u03BB\u03AF\u03BF\u03C5_\u0391\u03C5\u03B3\u03BF\u03CD\u03C3\u03C4\u03BF\u03C5_\u03A3\u03B5\u03C0\u03C4\u03B5\u03BC\u03B2\u03C1\u03AF\u03BF\u03C5_\u039F\u03BA\u03C4\u03C9\u03B2\u03C1\u03AF\u03BF\u03C5_\u039D\u03BF\u03B5\u03BC\u03B2\u03C1\u03AF\u03BF\u03C5_\u0394\u03B5\u03BA\u03B5\u03BC\u03B2\u03C1\u03AF\u03BF\u03C5".split("_"),months:function(i,o){return i?typeof o=="string"&&/D/.test(o.substring(0,o.indexOf("MMMM")))?this._monthsGenitiveEl[i.month()]:this._monthsNominativeEl[i.month()]:this._monthsNominativeEl},monthsShort:"\u0399\u03B1\u03BD_\u03A6\u03B5\u03B2_\u039C\u03B1\u03C1_\u0391\u03C0\u03C1_\u039C\u03B1\u03CA_\u0399\u03BF\u03C5\u03BD_\u0399\u03BF\u03C5\u03BB_\u0391\u03C5\u03B3_\u03A3\u03B5\u03C0_\u039F\u03BA\u03C4_\u039D\u03BF\u03B5_\u0394\u03B5\u03BA".split("_"),weekdays:"\u039A\u03C5\u03C1\u03B9\u03B1\u03BA\u03AE_\u0394\u03B5\u03C5\u03C4\u03AD\u03C1\u03B1_\u03A4\u03C1\u03AF\u03C4\u03B7_\u03A4\u03B5\u03C4\u03AC\u03C1\u03C4\u03B7_\u03A0\u03AD\u03BC\u03C0\u03C4\u03B7_\u03A0\u03B1\u03C1\u03B1\u03C3\u03BA\u03B5\u03C5\u03AE_\u03A3\u03AC\u03B2\u03B2\u03B1\u03C4\u03BF".split("_"),weekdaysShort:"\u039A\u03C5\u03C1_\u0394\u03B5\u03C5_\u03A4\u03C1\u03B9_\u03A4\u03B5\u03C4_\u03A0\u03B5\u03BC_\u03A0\u03B1\u03C1_\u03A3\u03B1\u03B2".split("_"),weekdaysMin:"\u039A\u03C5_\u0394\u03B5_\u03A4\u03C1_\u03A4\u03B5_\u03A0\u03B5_\u03A0\u03B1_\u03A3\u03B1".split("_"),meridiem:function(i,o,u){return i>11?u?"\u03BC\u03BC":"\u039C\u039C":u?"\u03C0\u03BC":"\u03A0\u039C"},isPM:function(i){return(i+"").toLowerCase()[0]==="\u03BC"},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[\u03A3\u03AE\u03BC\u03B5\u03C1\u03B1 {}] LT",nextDay:"[\u0391\u03CD\u03C1\u03B9\u03BF {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[\u03A7\u03B8\u03B5\u03C2 {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[\u03C4\u03BF \u03C0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03BF] dddd [{}] LT";default:return"[\u03C4\u03B7\u03BD \u03C0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03B7] dddd [{}] LT"}},sameElse:"L"},calendar:function(i,o){var u=this._calendarEl[i],c=o&&o.hours();return t(u)&&(u=u.apply(o)),u.replace("{}",c%12===1?"\u03C3\u03C4\u03B7":"\u03C3\u03C4\u03B9\u03C2")},relativeTime:{future:"\u03C3\u03B5 %s",past:"%s \u03C0\u03C1\u03B9\u03BD",s:"\u03BB\u03AF\u03B3\u03B1 \u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03CC\u03BB\u03B5\u03C0\u03C4\u03B1",ss:"%d \u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03CC\u03BB\u03B5\u03C0\u03C4\u03B1",m:"\u03AD\u03BD\u03B1 \u03BB\u03B5\u03C0\u03C4\u03CC",mm:"%d \u03BB\u03B5\u03C0\u03C4\u03AC",h:"\u03BC\u03AF\u03B1 \u03CE\u03C1\u03B1",hh:"%d \u03CE\u03C1\u03B5\u03C2",d:"\u03BC\u03AF\u03B1 \u03BC\u03AD\u03C1\u03B1",dd:"%d \u03BC\u03AD\u03C1\u03B5\u03C2",M:"\u03AD\u03BD\u03B1\u03C2 \u03BC\u03AE\u03BD\u03B1\u03C2",MM:"%d \u03BC\u03AE\u03BD\u03B5\u03C2",y:"\u03AD\u03BD\u03B1\u03C2 \u03C7\u03C1\u03CC\u03BD\u03BF\u03C2",yy:"%d \u03C7\u03C1\u03CC\u03BD\u03B9\u03B1"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%d\u03B7",week:{dow:1,doy:4}});return a})},78348:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var i=a%10,o=~~(a%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return a+o},week:{dow:0,doy:4}});return t})},77925:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var i=a%10,o=~~(a%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return a+o}});return t})},22243:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var i=a%10,o=~~(a%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return a+o},week:{dow:1,doy:4}});return t})},46436:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var i=a%10,o=~~(a%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return a+o},week:{dow:1,doy:4}});return t})},47207:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var i=a%10,o=~~(a%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return a+o}});return t})},44175:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var i=a%10,o=~~(a%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return a+o},week:{dow:0,doy:6}});return t})},76319:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var i=a%10,o=~~(a%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return a+o},week:{dow:1,doy:4}});return t})},31662:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var i=a%10,o=~~(a%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return a+o},week:{dow:1,doy:4}});return t})},92915:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_a\u016Dgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_a\u016Dg_sept_okt_nov_dec".split("_"),weekdays:"diman\u0109o_lundo_mardo_merkredo_\u0135a\u016Ddo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_\u0135a\u016D_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_\u0135a_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(a){return a.charAt(0).toLowerCase()==="p"},meridiem:function(a,i,o){return a>11?o?"p.t.m.":"P.T.M.":o?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodia\u016D je] LT",nextDay:"[Morga\u016D je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hiera\u016D je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"anta\u016D %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});return t})},55251:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),a="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],o=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,u=r.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(c,l){return c?/-MMM-/.test(l)?a[c.month()]:t[c.month()]:t},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xE9rcoles_jueves_viernes_s\xE1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xE9._jue._vie._s\xE1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xE1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[ma\xF1ana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xEDa",dd:"%d d\xEDas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xF1o",yy:"%d a\xF1os"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%d\xBA",week:{dow:1,doy:4}});return u})},96112:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),a="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],o=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,u=r.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(c,l){return c?/-MMM-/.test(l)?a[c.month()]:t[c.month()]:t},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xE9rcoles_jueves_viernes_s\xE1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xE9._jue._vie._s\xE1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xE1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[ma\xF1ana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xEDa",dd:"%d d\xEDas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xF1o",yy:"%d a\xF1os"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%d\xBA",week:{dow:0,doy:4},invalidDate:"Fecha inv\xE1lida"});return u})},71146:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),a="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],o=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,u=r.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(c,l){return c?/-MMM-/.test(l)?a[c.month()]:t[c.month()]:t},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xE9rcoles_jueves_viernes_s\xE1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xE9._jue._vie._s\xE1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xE1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[ma\xF1ana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xEDa",dd:"%d d\xEDas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xF1o",yy:"%d a\xF1os"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%d\xBA",week:{dow:0,doy:6}});return u})},55655:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),a="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],o=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,u=r.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(c,l){return c?/-MMM-/.test(l)?a[c.month()]:t[c.month()]:t},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xE9rcoles_jueves_viernes_s\xE1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xE9._jue._vie._s\xE1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xE1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[ma\xF1ana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xEDa",dd:"%d d\xEDas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xF1o",yy:"%d a\xF1os"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%d\xBA",week:{dow:1,doy:4},invalidDate:"Fecha inv\xE1lida"});return u})},5603:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(i,o,u,c){var l={s:["m\xF5ne sekundi","m\xF5ni sekund","paar sekundit"],ss:[i+"sekundi",i+"sekundit"],m:["\xFChe minuti","\xFCks minut"],mm:[i+" minuti",i+" minutit"],h:["\xFChe tunni","tund aega","\xFCks tund"],hh:[i+" tunni",i+" tundi"],d:["\xFChe p\xE4eva","\xFCks p\xE4ev"],M:["kuu aja","kuu aega","\xFCks kuu"],MM:[i+" kuu",i+" kuud"],y:["\xFChe aasta","aasta","\xFCks aasta"],yy:[i+" aasta",i+" aastat"]};return o?l[u][2]?l[u][2]:l[u][1]:c?l[u][0]:l[u][1]}var a=r.defineLocale("et",{months:"jaanuar_veebruar_m\xE4rts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_m\xE4rts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"p\xFChap\xE4ev_esmasp\xE4ev_teisip\xE4ev_kolmap\xE4ev_neljap\xE4ev_reede_laup\xE4ev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[T\xE4na,] LT",nextDay:"[Homme,] LT",nextWeek:"[J\xE4rgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s p\xE4rast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d p\xE4eva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a})},77763:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return t})},76959:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u06F1",2:"\u06F2",3:"\u06F3",4:"\u06F4",5:"\u06F5",6:"\u06F6",7:"\u06F7",8:"\u06F8",9:"\u06F9",0:"\u06F0"},a={"\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u06F0":"0"},i=r.defineLocale("fa",{months:"\u0698\u0627\u0646\u0648\u06CC\u0647_\u0641\u0648\u0631\u06CC\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06CC\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06CC\u0647_\u0627\u0648\u062A_\u0633\u067E\u062A\u0627\u0645\u0628\u0631_\u0627\u06A9\u062A\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062F\u0633\u0627\u0645\u0628\u0631".split("_"),monthsShort:"\u0698\u0627\u0646\u0648\u06CC\u0647_\u0641\u0648\u0631\u06CC\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06CC\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06CC\u0647_\u0627\u0648\u062A_\u0633\u067E\u062A\u0627\u0645\u0628\u0631_\u0627\u06A9\u062A\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062F\u0633\u0627\u0645\u0628\u0631".split("_"),weekdays:"\u06CC\u06A9\u200C\u0634\u0646\u0628\u0647_\u062F\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200C\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067E\u0646\u062C\u200C\u0634\u0646\u0628\u0647_\u062C\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysShort:"\u06CC\u06A9\u200C\u0634\u0646\u0628\u0647_\u062F\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200C\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067E\u0646\u062C\u200C\u0634\u0646\u0628\u0647_\u062C\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysMin:"\u06CC_\u062F_\u0633_\u0686_\u067E_\u062C_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(o){return/بعد از ظهر/.test(o)},meridiem:function(o,u,c){return o<12?"\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631":"\u0628\u0639\u062F \u0627\u0632 \u0638\u0647\u0631"},calendar:{sameDay:"[\u0627\u0645\u0631\u0648\u0632 \u0633\u0627\u0639\u062A] LT",nextDay:"[\u0641\u0631\u062F\u0627 \u0633\u0627\u0639\u062A] LT",nextWeek:"dddd [\u0633\u0627\u0639\u062A] LT",lastDay:"[\u062F\u06CC\u0631\u0648\u0632 \u0633\u0627\u0639\u062A] LT",lastWeek:"dddd [\u067E\u06CC\u0634] [\u0633\u0627\u0639\u062A] LT",sameElse:"L"},relativeTime:{future:"\u062F\u0631 %s",past:"%s \u067E\u06CC\u0634",s:"\u0686\u0646\u062F \u062B\u0627\u0646\u06CC\u0647",ss:"%d \u062B\u0627\u0646\u06CC\u0647",m:"\u06CC\u06A9 \u062F\u0642\u06CC\u0642\u0647",mm:"%d \u062F\u0642\u06CC\u0642\u0647",h:"\u06CC\u06A9 \u0633\u0627\u0639\u062A",hh:"%d \u0633\u0627\u0639\u062A",d:"\u06CC\u06A9 \u0631\u0648\u0632",dd:"%d \u0631\u0648\u0632",M:"\u06CC\u06A9 \u0645\u0627\u0647",MM:"%d \u0645\u0627\u0647",y:"\u06CC\u06A9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(o){return o.replace(/[۰-۹]/g,function(u){return a[u]}).replace(/،/g,",")},postformat:function(o){return o.replace(/\d/g,function(u){return t[u]}).replace(/,/g,"\u060C")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%d\u0645",week:{dow:6,doy:12}});return i})},11897:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t="nolla yksi kaksi kolme nelj\xE4 viisi kuusi seitsem\xE4n kahdeksan yhdeks\xE4n".split(" "),a=["nolla","yhden","kahden","kolmen","nelj\xE4n","viiden","kuuden",t[7],t[8],t[9]];function i(c,l,d,p){var M="";switch(d){case"s":return p?"muutaman sekunnin":"muutama sekunti";case"ss":M=p?"sekunnin":"sekuntia";break;case"m":return p?"minuutin":"minuutti";case"mm":M=p?"minuutin":"minuuttia";break;case"h":return p?"tunnin":"tunti";case"hh":M=p?"tunnin":"tuntia";break;case"d":return p?"p\xE4iv\xE4n":"p\xE4iv\xE4";case"dd":M=p?"p\xE4iv\xE4n":"p\xE4iv\xE4\xE4";break;case"M":return p?"kuukauden":"kuukausi";case"MM":M=p?"kuukauden":"kuukautta";break;case"y":return p?"vuoden":"vuosi";case"yy":M=p?"vuoden":"vuotta";break}return M=o(c,p)+" "+M,M}function o(c,l){return c<10?l?a[c]:t[c]:c}var u=r.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kes\xE4kuu_hein\xE4kuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kes\xE4_hein\xE4_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[t\xE4n\xE4\xE4n] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s p\xE4\xE4st\xE4",past:"%s sitten",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return u})},42549:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(a){return a},week:{dow:1,doy:4}});return t})},94694:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("fo",{months:"januar_februar_mars_apr\xEDl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_m\xE1nadagur_t\xFDsdagur_mikudagur_h\xF3sdagur_fr\xEDggjadagur_leygardagur".split("_"),weekdaysShort:"sun_m\xE1n_t\xFDs_mik_h\xF3s_fr\xED_ley".split("_"),weekdaysMin:"su_m\xE1_t\xFD_mi_h\xF3_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[\xCD dag kl.] LT",nextDay:"[\xCD morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xCD gj\xE1r kl.] LT",lastWeek:"[s\xED\xF0stu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s s\xED\xF0ani",s:"f\xE1 sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein t\xEDmi",hh:"%d t\xEDmar",d:"ein dagur",dd:"%d dagar",M:"ein m\xE1na\xF0ur",MM:"%d m\xE1na\xF0ir",y:"eitt \xE1r",yy:"%d \xE1r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t})},63049:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("fr-ca",{months:"janvier_f\xE9vrier_mars_avril_mai_juin_juillet_ao\xFBt_septembre_octobre_novembre_d\xE9cembre".split("_"),monthsShort:"janv._f\xE9vr._mars_avr._mai_juin_juil._ao\xFBt_sept._oct._nov._d\xE9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xE0] LT",nextDay:"[Demain \xE0] LT",nextWeek:"dddd [\xE0] LT",lastDay:"[Hier \xE0] LT",lastWeek:"dddd [dernier \xE0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(a,i){switch(i){default:case"M":case"Q":case"D":case"DDD":case"d":return a+(a===1?"er":"e");case"w":case"W":return a+(a===1?"re":"e")}}});return t})},52330:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("fr-ch",{months:"janvier_f\xE9vrier_mars_avril_mai_juin_juillet_ao\xFBt_septembre_octobre_novembre_d\xE9cembre".split("_"),monthsShort:"janv._f\xE9vr._mars_avr._mai_juin_juil._ao\xFBt_sept._oct._nov._d\xE9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xE0] LT",nextDay:"[Demain \xE0] LT",nextWeek:"dddd [\xE0] LT",lastDay:"[Hier \xE0] LT",lastWeek:"dddd [dernier \xE0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(a,i){switch(i){default:case"M":case"Q":case"D":case"DDD":case"d":return a+(a===1?"er":"e");case"w":case"W":return a+(a===1?"re":"e")}},week:{dow:1,doy:4}});return t})},94470:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,a=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,i=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,o=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],u=r.defineLocale("fr",{months:"janvier_f\xE9vrier_mars_avril_mai_juin_juillet_ao\xFBt_septembre_octobre_novembre_d\xE9cembre".split("_"),monthsShort:"janv._f\xE9vr._mars_avr._mai_juin_juil._ao\xFBt_sept._oct._nov._d\xE9c.".split("_"),monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:t,monthsShortStrictRegex:a,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xE0] LT",nextDay:"[Demain \xE0] LT",nextWeek:"dddd [\xE0] LT",lastDay:"[Hier \xE0] LT",lastWeek:"dddd [dernier \xE0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(c,l){switch(l){case"D":return c+(c===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return c+(c===1?"er":"e");case"w":case"W":return c+(c===1?"re":"e")}},week:{dow:1,doy:4}});return u})},5044:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),a="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),i=r.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(o,u){return o?/-MMM-/.test(u)?a[o.month()]:t[o.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[\xF4fr\xFBne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien min\xFAt",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(o){return o+(o===1||o===8||o>=20?"ste":"de")},week:{dow:1,doy:4}});return i})},29295:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=["Ean\xE1ir","Feabhra","M\xE1rta","Aibre\xE1n","Bealtaine","Meitheamh","I\xFAil","L\xFAnasa","Me\xE1n F\xF3mhair","Deireadh F\xF3mhair","Samhain","Nollaig"],a=["Ean","Feabh","M\xE1rt","Aib","Beal","Meith","I\xFAil","L\xFAn","M.F.","D.F.","Samh","Noll"],i=["D\xE9 Domhnaigh","D\xE9 Luain","D\xE9 M\xE1irt","D\xE9 C\xE9adaoin","D\xE9ardaoin","D\xE9 hAoine","D\xE9 Sathairn"],o=["Domh","Luan","M\xE1irt","C\xE9ad","D\xE9ar","Aoine","Sath"],u=["Do","Lu","M\xE1","C\xE9","D\xE9","A","Sa"],c=r.defineLocale("ga",{months:t,monthsShort:a,monthsParseExact:!0,weekdays:i,weekdaysShort:o,weekdaysMin:u,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Am\xE1rach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inn\xE9 ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s \xF3 shin",s:"c\xFApla soicind",ss:"%d soicind",m:"n\xF3im\xE9ad",mm:"%d n\xF3im\xE9ad",h:"uair an chloig",hh:"%d uair an chloig",d:"l\xE1",dd:"%d l\xE1",M:"m\xED",MM:"%d m\xEDonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(l){var d=l===1?"d":l%10===2?"na":"mh";return l+d},week:{dow:1,doy:4}});return c})},2101:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=["Am Faoilleach","An Gearran","Am M\xE0rt","An Giblean","An C\xE8itean","An t-\xD2gmhios","An t-Iuchar","An L\xF9nastal","An t-Sultain","An D\xE0mhair","An t-Samhain","An D\xF9bhlachd"],a=["Faoi","Gear","M\xE0rt","Gibl","C\xE8it","\xD2gmh","Iuch","L\xF9n","Sult","D\xE0mh","Samh","D\xF9bh"],i=["Did\xF2mhnaich","Diluain","Dim\xE0irt","Diciadain","Diardaoin","Dihaoine","Disathairne"],o=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],u=["D\xF2","Lu","M\xE0","Ci","Ar","Ha","Sa"],c=r.defineLocale("gd",{months:t,monthsShort:a,monthsParseExact:!0,weekdays:i,weekdaysShort:o,weekdaysMin:u,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-m\xE0ireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-d\xE8 aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"m\xECos",MM:"%d m\xECosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(l){var d=l===1?"d":l%10===2?"na":"mh";return l+d},week:{dow:1,doy:4}});return c})},38794:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xu\xF1o_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xu\xF1._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_m\xE9rcores_xoves_venres_s\xE1bado".split("_"),weekdaysShort:"dom._lun._mar._m\xE9r._xov._ven._s\xE1b.".split("_"),weekdaysMin:"do_lu_ma_m\xE9_xo_ve_s\xE1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"\xE1s":"\xE1")+"] LT"},nextDay:function(){return"[ma\xF1\xE1 "+(this.hours()!==1?"\xE1s":"\xE1")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"\xE1s":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"\xE1":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"\xE1s":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(a){return a.indexOf("un")===0?"n"+a:"en "+a},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un d\xEDa",dd:"%d d\xEDas",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%d\xBA",week:{dow:1,doy:4}});return t})},27884:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(i,o,u,c){var l={s:["\u0925\u094B\u0921\u092F\u093E \u0938\u0945\u0915\u0902\u0921\u093E\u0902\u0928\u0940","\u0925\u094B\u0921\u0947 \u0938\u0945\u0915\u0902\u0921"],ss:[i+" \u0938\u0945\u0915\u0902\u0921\u093E\u0902\u0928\u0940",i+" \u0938\u0945\u0915\u0902\u0921"],m:["\u090F\u0915\u093E \u092E\u093F\u0923\u091F\u093E\u0928","\u090F\u0915 \u092E\u093F\u0928\u0942\u091F"],mm:[i+" \u092E\u093F\u0923\u091F\u093E\u0902\u0928\u0940",i+" \u092E\u093F\u0923\u091F\u093E\u0902"],h:["\u090F\u0915\u093E \u0935\u0930\u093E\u0928","\u090F\u0915 \u0935\u0930"],hh:[i+" \u0935\u0930\u093E\u0902\u0928\u0940",i+" \u0935\u0930\u093E\u0902"],d:["\u090F\u0915\u093E \u0926\u093F\u0938\u093E\u0928","\u090F\u0915 \u0926\u0940\u0938"],dd:[i+" \u0926\u093F\u0938\u093E\u0902\u0928\u0940",i+" \u0926\u0940\u0938"],M:["\u090F\u0915\u093E \u092E\u094D\u0939\u092F\u0928\u094D\u092F\u093E\u0928","\u090F\u0915 \u092E\u094D\u0939\u092F\u0928\u094B"],MM:[i+" \u092E\u094D\u0939\u092F\u0928\u094D\u092F\u093E\u0928\u0940",i+" \u092E\u094D\u0939\u092F\u0928\u0947"],y:["\u090F\u0915\u093E \u0935\u0930\u094D\u0938\u093E\u0928","\u090F\u0915 \u0935\u0930\u094D\u0938"],yy:[i+" \u0935\u0930\u094D\u0938\u093E\u0902\u0928\u0940",i+" \u0935\u0930\u094D\u0938\u093E\u0902"]};return c?l[u][0]:l[u][1]}var a=r.defineLocale("gom-deva",{months:{standalone:"\u091C\u093E\u0928\u0947\u0935\u093E\u0930\u0940_\u092B\u0947\u092C\u094D\u0930\u0941\u0935\u093E\u0930\u0940_\u092E\u093E\u0930\u094D\u091A_\u090F\u092A\u094D\u0930\u0940\u0932_\u092E\u0947_\u091C\u0942\u0928_\u091C\u0941\u0932\u092F_\u0911\u0917\u0938\u094D\u091F_\u0938\u092A\u094D\u091F\u0947\u0902\u092C\u0930_\u0911\u0915\u094D\u091F\u094B\u092C\u0930_\u0928\u094B\u0935\u094D\u0939\u0947\u0902\u092C\u0930_\u0921\u093F\u0938\u0947\u0902\u092C\u0930".split("_"),format:"\u091C\u093E\u0928\u0947\u0935\u093E\u0930\u0940\u091A\u094D\u092F\u093E_\u092B\u0947\u092C\u094D\u0930\u0941\u0935\u093E\u0930\u0940\u091A\u094D\u092F\u093E_\u092E\u093E\u0930\u094D\u091A\u093E\u091A\u094D\u092F\u093E_\u090F\u092A\u094D\u0930\u0940\u0932\u093E\u091A\u094D\u092F\u093E_\u092E\u0947\u092F\u093E\u091A\u094D\u092F\u093E_\u091C\u0942\u0928\u093E\u091A\u094D\u092F\u093E_\u091C\u0941\u0932\u092F\u093E\u091A\u094D\u092F\u093E_\u0911\u0917\u0938\u094D\u091F\u093E\u091A\u094D\u092F\u093E_\u0938\u092A\u094D\u091F\u0947\u0902\u092C\u0930\u093E\u091A\u094D\u092F\u093E_\u0911\u0915\u094D\u091F\u094B\u092C\u0930\u093E\u091A\u094D\u092F\u093E_\u0928\u094B\u0935\u094D\u0939\u0947\u0902\u092C\u0930\u093E\u091A\u094D\u092F\u093E_\u0921\u093F\u0938\u0947\u0902\u092C\u0930\u093E\u091A\u094D\u092F\u093E".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"\u091C\u093E\u0928\u0947._\u092B\u0947\u092C\u094D\u0930\u0941._\u092E\u093E\u0930\u094D\u091A_\u090F\u092A\u094D\u0930\u0940._\u092E\u0947_\u091C\u0942\u0928_\u091C\u0941\u0932._\u0911\u0917._\u0938\u092A\u094D\u091F\u0947\u0902._\u0911\u0915\u094D\u091F\u094B._\u0928\u094B\u0935\u094D\u0939\u0947\u0902._\u0921\u093F\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u092F\u0924\u093E\u0930_\u0938\u094B\u092E\u093E\u0930_\u092E\u0902\u0917\u0933\u093E\u0930_\u092C\u0941\u0927\u0935\u093E\u0930_\u092C\u093F\u0930\u0947\u0938\u094D\u0924\u093E\u0930_\u0938\u0941\u0915\u094D\u0930\u093E\u0930_\u0936\u0947\u0928\u0935\u093E\u0930".split("_"),weekdaysShort:"\u0906\u092F\u0924._\u0938\u094B\u092E._\u092E\u0902\u0917\u0933._\u092C\u0941\u0927._\u092C\u094D\u0930\u0947\u0938\u094D\u0924._\u0938\u0941\u0915\u094D\u0930._\u0936\u0947\u0928.".split("_"),weekdaysMin:"\u0906_\u0938\u094B_\u092E\u0902_\u092C\u0941_\u092C\u094D\u0930\u0947_\u0938\u0941_\u0936\u0947".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [\u0935\u093E\u091C\u0924\u093E\u0902]",LTS:"A h:mm:ss [\u0935\u093E\u091C\u0924\u093E\u0902]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [\u0935\u093E\u091C\u0924\u093E\u0902]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [\u0935\u093E\u091C\u0924\u093E\u0902]",llll:"ddd, D MMM YYYY, A h:mm [\u0935\u093E\u091C\u0924\u093E\u0902]"},calendar:{sameDay:"[\u0906\u092F\u091C] LT",nextDay:"[\u092B\u093E\u0932\u094D\u092F\u093E\u0902] LT",nextWeek:"[\u092B\u0941\u0921\u0932\u094B] dddd[,] LT",lastDay:"[\u0915\u093E\u0932] LT",lastWeek:"[\u092B\u093E\u091F\u0932\u094B] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s \u0906\u0926\u0940\u0902",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(i,o){switch(o){case"D":return i+"\u0935\u0947\u0930";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return i}},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(i,o){if(i===12&&(i=0),o==="\u0930\u093E\u0924\u0940")return i<4?i:i+12;if(o==="\u0938\u0915\u093E\u0933\u0940\u0902")return i;if(o==="\u0926\u0928\u092A\u093E\u0930\u093E\u0902")return i>12?i:i+12;if(o==="\u0938\u093E\u0902\u091C\u0947")return i+12},meridiem:function(i,o,u){return i<4?"\u0930\u093E\u0924\u0940":i<12?"\u0938\u0915\u093E\u0933\u0940\u0902":i<16?"\u0926\u0928\u092A\u093E\u0930\u093E\u0902":i<20?"\u0938\u093E\u0902\u091C\u0947":"\u0930\u093E\u0924\u0940"}});return a})},23168:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(i,o,u,c){var l={s:["thoddea sekondamni","thodde sekond"],ss:[i+" sekondamni",i+" sekond"],m:["eka mintan","ek minut"],mm:[i+" mintamni",i+" mintam"],h:["eka voran","ek vor"],hh:[i+" voramni",i+" voram"],d:["eka disan","ek dis"],dd:[i+" disamni",i+" dis"],M:["eka mhoinean","ek mhoino"],MM:[i+" mhoineamni",i+" mhoine"],y:["eka vorsan","ek voros"],yy:[i+" vorsamni",i+" vorsam"]};return c?l[u][0]:l[u][1]}var a=r.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(i,o){switch(o){case"D":return i+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return i}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(i,o){if(i===12&&(i=0),o==="rati")return i<4?i:i+12;if(o==="sokallim")return i;if(o==="donparam")return i>12?i:i+12;if(o==="sanje")return i+12},meridiem:function(i,o,u){return i<4?"rati":i<12?"sokallim":i<16?"donparam":i<20?"sanje":"rati"}});return a})},95349:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u0AE7",2:"\u0AE8",3:"\u0AE9",4:"\u0AEA",5:"\u0AEB",6:"\u0AEC",7:"\u0AED",8:"\u0AEE",9:"\u0AEF",0:"\u0AE6"},a={"\u0AE7":"1","\u0AE8":"2","\u0AE9":"3","\u0AEA":"4","\u0AEB":"5","\u0AEC":"6","\u0AED":"7","\u0AEE":"8","\u0AEF":"9","\u0AE6":"0"},i=r.defineLocale("gu",{months:"\u0A9C\u0ABE\u0AA8\u0ACD\u0AAF\u0AC1\u0A86\u0AB0\u0AC0_\u0AAB\u0AC7\u0AAC\u0ACD\u0AB0\u0AC1\u0A86\u0AB0\u0AC0_\u0AAE\u0ABE\u0AB0\u0ACD\u0A9A_\u0A8F\u0AAA\u0ACD\u0AB0\u0ABF\u0AB2_\u0AAE\u0AC7_\u0A9C\u0AC2\u0AA8_\u0A9C\u0AC1\u0AB2\u0ABE\u0A88_\u0A91\u0A97\u0AB8\u0ACD\u0A9F_\u0AB8\u0AAA\u0ACD\u0A9F\u0AC7\u0AAE\u0ACD\u0AAC\u0AB0_\u0A91\u0A95\u0ACD\u0A9F\u0ACD\u0AAC\u0AB0_\u0AA8\u0AB5\u0AC7\u0AAE\u0ACD\u0AAC\u0AB0_\u0AA1\u0ABF\u0AB8\u0AC7\u0AAE\u0ACD\u0AAC\u0AB0".split("_"),monthsShort:"\u0A9C\u0ABE\u0AA8\u0ACD\u0AAF\u0AC1._\u0AAB\u0AC7\u0AAC\u0ACD\u0AB0\u0AC1._\u0AAE\u0ABE\u0AB0\u0ACD\u0A9A_\u0A8F\u0AAA\u0ACD\u0AB0\u0ABF._\u0AAE\u0AC7_\u0A9C\u0AC2\u0AA8_\u0A9C\u0AC1\u0AB2\u0ABE._\u0A91\u0A97._\u0AB8\u0AAA\u0ACD\u0A9F\u0AC7._\u0A91\u0A95\u0ACD\u0A9F\u0ACD._\u0AA8\u0AB5\u0AC7._\u0AA1\u0ABF\u0AB8\u0AC7.".split("_"),monthsParseExact:!0,weekdays:"\u0AB0\u0AB5\u0ABF\u0AB5\u0ABE\u0AB0_\u0AB8\u0ACB\u0AAE\u0AB5\u0ABE\u0AB0_\u0AAE\u0A82\u0A97\u0AB3\u0AB5\u0ABE\u0AB0_\u0AAC\u0AC1\u0AA7\u0ACD\u0AB5\u0ABE\u0AB0_\u0A97\u0AC1\u0AB0\u0AC1\u0AB5\u0ABE\u0AB0_\u0AB6\u0AC1\u0A95\u0ACD\u0AB0\u0AB5\u0ABE\u0AB0_\u0AB6\u0AA8\u0ABF\u0AB5\u0ABE\u0AB0".split("_"),weekdaysShort:"\u0AB0\u0AB5\u0ABF_\u0AB8\u0ACB\u0AAE_\u0AAE\u0A82\u0A97\u0AB3_\u0AAC\u0AC1\u0AA7\u0ACD_\u0A97\u0AC1\u0AB0\u0AC1_\u0AB6\u0AC1\u0A95\u0ACD\u0AB0_\u0AB6\u0AA8\u0ABF".split("_"),weekdaysMin:"\u0AB0_\u0AB8\u0ACB_\u0AAE\u0A82_\u0AAC\u0AC1_\u0A97\u0AC1_\u0AB6\u0AC1_\u0AB6".split("_"),longDateFormat:{LT:"A h:mm \u0AB5\u0ABE\u0A97\u0ACD\u0AAF\u0AC7",LTS:"A h:mm:ss \u0AB5\u0ABE\u0A97\u0ACD\u0AAF\u0AC7",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0AB5\u0ABE\u0A97\u0ACD\u0AAF\u0AC7",LLLL:"dddd, D MMMM YYYY, A h:mm \u0AB5\u0ABE\u0A97\u0ACD\u0AAF\u0AC7"},calendar:{sameDay:"[\u0A86\u0A9C] LT",nextDay:"[\u0A95\u0ABE\u0AB2\u0AC7] LT",nextWeek:"dddd, LT",lastDay:"[\u0A97\u0A87\u0A95\u0ABE\u0AB2\u0AC7] LT",lastWeek:"[\u0AAA\u0ABE\u0A9B\u0AB2\u0ABE] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0AAE\u0ABE",past:"%s \u0AAA\u0AB9\u0AC7\u0AB2\u0ABE",s:"\u0A85\u0AAE\u0AC1\u0A95 \u0AAA\u0AB3\u0ACB",ss:"%d \u0AB8\u0AC7\u0A95\u0A82\u0AA1",m:"\u0A8F\u0A95 \u0AAE\u0ABF\u0AA8\u0ABF\u0A9F",mm:"%d \u0AAE\u0ABF\u0AA8\u0ABF\u0A9F",h:"\u0A8F\u0A95 \u0A95\u0AB2\u0ABE\u0A95",hh:"%d \u0A95\u0AB2\u0ABE\u0A95",d:"\u0A8F\u0A95 \u0AA6\u0ABF\u0AB5\u0AB8",dd:"%d \u0AA6\u0ABF\u0AB5\u0AB8",M:"\u0A8F\u0A95 \u0AAE\u0AB9\u0ABF\u0AA8\u0ACB",MM:"%d \u0AAE\u0AB9\u0ABF\u0AA8\u0ACB",y:"\u0A8F\u0A95 \u0AB5\u0AB0\u0ACD\u0AB7",yy:"%d \u0AB5\u0AB0\u0ACD\u0AB7"},preparse:function(o){return o.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,function(u){return a[u]})},postformat:function(o){return o.replace(/\d/g,function(u){return t[u]})},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(o,u){if(o===12&&(o=0),u==="\u0AB0\u0ABE\u0AA4")return o<4?o:o+12;if(u==="\u0AB8\u0AB5\u0ABE\u0AB0")return o;if(u==="\u0AAC\u0AAA\u0ACB\u0AB0")return o>=10?o:o+12;if(u==="\u0AB8\u0ABE\u0A82\u0A9C")return o+12},meridiem:function(o,u,c){return o<4?"\u0AB0\u0ABE\u0AA4":o<10?"\u0AB8\u0AB5\u0ABE\u0AB0":o<17?"\u0AAC\u0AAA\u0ACB\u0AB0":o<20?"\u0AB8\u0ABE\u0A82\u0A9C":"\u0AB0\u0ABE\u0AA4"},week:{dow:0,doy:6}});return i})},24206:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("he",{months:"\u05D9\u05E0\u05D5\u05D0\u05E8_\u05E4\u05D1\u05E8\u05D5\u05D0\u05E8_\u05DE\u05E8\u05E5_\u05D0\u05E4\u05E8\u05D9\u05DC_\u05DE\u05D0\u05D9_\u05D9\u05D5\u05E0\u05D9_\u05D9\u05D5\u05DC\u05D9_\u05D0\u05D5\u05D2\u05D5\u05E1\u05D8_\u05E1\u05E4\u05D8\u05DE\u05D1\u05E8_\u05D0\u05D5\u05E7\u05D8\u05D5\u05D1\u05E8_\u05E0\u05D5\u05D1\u05DE\u05D1\u05E8_\u05D3\u05E6\u05DE\u05D1\u05E8".split("_"),monthsShort:"\u05D9\u05E0\u05D5\u05F3_\u05E4\u05D1\u05E8\u05F3_\u05DE\u05E8\u05E5_\u05D0\u05E4\u05E8\u05F3_\u05DE\u05D0\u05D9_\u05D9\u05D5\u05E0\u05D9_\u05D9\u05D5\u05DC\u05D9_\u05D0\u05D5\u05D2\u05F3_\u05E1\u05E4\u05D8\u05F3_\u05D0\u05D5\u05E7\u05F3_\u05E0\u05D5\u05D1\u05F3_\u05D3\u05E6\u05DE\u05F3".split("_"),weekdays:"\u05E8\u05D0\u05E9\u05D5\u05DF_\u05E9\u05E0\u05D9_\u05E9\u05DC\u05D9\u05E9\u05D9_\u05E8\u05D1\u05D9\u05E2\u05D9_\u05D7\u05DE\u05D9\u05E9\u05D9_\u05E9\u05D9\u05E9\u05D9_\u05E9\u05D1\u05EA".split("_"),weekdaysShort:"\u05D0\u05F3_\u05D1\u05F3_\u05D2\u05F3_\u05D3\u05F3_\u05D4\u05F3_\u05D5\u05F3_\u05E9\u05F3".split("_"),weekdaysMin:"\u05D0_\u05D1_\u05D2_\u05D3_\u05D4_\u05D5_\u05E9".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [\u05D1]MMMM YYYY",LLL:"D [\u05D1]MMMM YYYY HH:mm",LLLL:"dddd, D [\u05D1]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[\u05D4\u05D9\u05D5\u05DD \u05D1\u05BE]LT",nextDay:"[\u05DE\u05D7\u05E8 \u05D1\u05BE]LT",nextWeek:"dddd [\u05D1\u05E9\u05E2\u05D4] LT",lastDay:"[\u05D0\u05EA\u05DE\u05D5\u05DC \u05D1\u05BE]LT",lastWeek:"[\u05D1\u05D9\u05D5\u05DD] dddd [\u05D4\u05D0\u05D7\u05E8\u05D5\u05DF \u05D1\u05E9\u05E2\u05D4] LT",sameElse:"L"},relativeTime:{future:"\u05D1\u05E2\u05D5\u05D3 %s",past:"\u05DC\u05E4\u05E0\u05D9 %s",s:"\u05DE\u05E1\u05E4\u05E8 \u05E9\u05E0\u05D9\u05D5\u05EA",ss:"%d \u05E9\u05E0\u05D9\u05D5\u05EA",m:"\u05D3\u05E7\u05D4",mm:"%d \u05D3\u05E7\u05D5\u05EA",h:"\u05E9\u05E2\u05D4",hh:function(a){return a===2?"\u05E9\u05E2\u05EA\u05D9\u05D9\u05DD":a+" \u05E9\u05E2\u05D5\u05EA"},d:"\u05D9\u05D5\u05DD",dd:function(a){return a===2?"\u05D9\u05D5\u05DE\u05D9\u05D9\u05DD":a+" \u05D9\u05DE\u05D9\u05DD"},M:"\u05D7\u05D5\u05D3\u05E9",MM:function(a){return a===2?"\u05D7\u05D5\u05D3\u05E9\u05D9\u05D9\u05DD":a+" \u05D7\u05D5\u05D3\u05E9\u05D9\u05DD"},y:"\u05E9\u05E0\u05D4",yy:function(a){return a===2?"\u05E9\u05E0\u05EA\u05D9\u05D9\u05DD":a%10===0&&a!==10?a+" \u05E9\u05E0\u05D4":a+" \u05E9\u05E0\u05D9\u05DD"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(a){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(a)},meridiem:function(a,i,o){return a<5?"\u05DC\u05E4\u05E0\u05D5\u05EA \u05D1\u05D5\u05E7\u05E8":a<10?"\u05D1\u05D1\u05D5\u05E7\u05E8":a<12?o?'\u05DC\u05E4\u05E0\u05D4"\u05E6':"\u05DC\u05E4\u05E0\u05D9 \u05D4\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD":a<18?o?'\u05D0\u05D7\u05D4"\u05E6':"\u05D0\u05D7\u05E8\u05D9 \u05D4\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD":"\u05D1\u05E2\u05E8\u05D1"}});return t})},30094:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096A",5:"\u096B",6:"\u096C",7:"\u096D",8:"\u096E",9:"\u096F",0:"\u0966"},a={"\u0967":"1","\u0968":"2","\u0969":"3","\u096A":"4","\u096B":"5","\u096C":"6","\u096D":"7","\u096E":"8","\u096F":"9","\u0966":"0"},i=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i],o=[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i],u=r.defineLocale("hi",{months:{format:"\u091C\u0928\u0935\u0930\u0940_\u092B\u093C\u0930\u0935\u0930\u0940_\u092E\u093E\u0930\u094D\u091A_\u0905\u092A\u094D\u0930\u0948\u0932_\u092E\u0908_\u091C\u0942\u0928_\u091C\u0941\u0932\u093E\u0908_\u0905\u0917\u0938\u094D\u0924_\u0938\u093F\u0924\u092E\u094D\u092C\u0930_\u0905\u0915\u094D\u091F\u0942\u092C\u0930_\u0928\u0935\u092E\u094D\u092C\u0930_\u0926\u093F\u0938\u092E\u094D\u092C\u0930".split("_"),standalone:"\u091C\u0928\u0935\u0930\u0940_\u092B\u0930\u0935\u0930\u0940_\u092E\u093E\u0930\u094D\u091A_\u0905\u092A\u094D\u0930\u0948\u0932_\u092E\u0908_\u091C\u0942\u0928_\u091C\u0941\u0932\u093E\u0908_\u0905\u0917\u0938\u094D\u0924_\u0938\u093F\u0924\u0902\u092C\u0930_\u0905\u0915\u094D\u091F\u0942\u092C\u0930_\u0928\u0935\u0902\u092C\u0930_\u0926\u093F\u0938\u0902\u092C\u0930".split("_")},monthsShort:"\u091C\u0928._\u092B\u093C\u0930._\u092E\u093E\u0930\u094D\u091A_\u0905\u092A\u094D\u0930\u0948._\u092E\u0908_\u091C\u0942\u0928_\u091C\u0941\u0932._\u0905\u0917._\u0938\u093F\u0924._\u0905\u0915\u094D\u091F\u0942._\u0928\u0935._\u0926\u093F\u0938.".split("_"),weekdays:"\u0930\u0935\u093F\u0935\u093E\u0930_\u0938\u094B\u092E\u0935\u093E\u0930_\u092E\u0902\u0917\u0932\u0935\u093E\u0930_\u092C\u0941\u0927\u0935\u093E\u0930_\u0917\u0941\u0930\u0942\u0935\u093E\u0930_\u0936\u0941\u0915\u094D\u0930\u0935\u093E\u0930_\u0936\u0928\u093F\u0935\u093E\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093F_\u0938\u094B\u092E_\u092E\u0902\u0917\u0932_\u092C\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094D\u0930_\u0936\u0928\u093F".split("_"),weekdaysMin:"\u0930_\u0938\u094B_\u092E\u0902_\u092C\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u092C\u091C\u0947",LTS:"A h:mm:ss \u092C\u091C\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u092C\u091C\u0947",LLLL:"dddd, D MMMM YYYY, A h:mm \u092C\u091C\u0947"},monthsParse:i,longMonthsParse:i,shortMonthsParse:o,monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[\u0906\u091C] LT",nextDay:"[\u0915\u0932] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u0932] LT",lastWeek:"[\u092A\u093F\u091B\u0932\u0947] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u092E\u0947\u0902",past:"%s \u092A\u0939\u0932\u0947",s:"\u0915\u0941\u091B \u0939\u0940 \u0915\u094D\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0902\u0921",m:"\u090F\u0915 \u092E\u093F\u0928\u091F",mm:"%d \u092E\u093F\u0928\u091F",h:"\u090F\u0915 \u0918\u0902\u091F\u093E",hh:"%d \u0918\u0902\u091F\u0947",d:"\u090F\u0915 \u0926\u093F\u0928",dd:"%d \u0926\u093F\u0928",M:"\u090F\u0915 \u092E\u0939\u0940\u0928\u0947",MM:"%d \u092E\u0939\u0940\u0928\u0947",y:"\u090F\u0915 \u0935\u0930\u094D\u0937",yy:"%d \u0935\u0930\u094D\u0937"},preparse:function(c){return c.replace(/[१२३४५६७८९०]/g,function(l){return a[l]})},postformat:function(c){return c.replace(/\d/g,function(l){return t[l]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(c,l){if(c===12&&(c=0),l==="\u0930\u093E\u0924")return c<4?c:c+12;if(l==="\u0938\u0941\u092C\u0939")return c;if(l==="\u0926\u094B\u092A\u0939\u0930")return c>=10?c:c+12;if(l==="\u0936\u093E\u092E")return c+12},meridiem:function(c,l,d){return c<4?"\u0930\u093E\u0924":c<10?"\u0938\u0941\u092C\u0939":c<17?"\u0926\u094B\u092A\u0939\u0930":c<20?"\u0936\u093E\u092E":"\u0930\u093E\u0924"},week:{dow:0,doy:6}});return u})},30316:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(i,o,u){var c=i+" ";switch(u){case"ss":return i===1?c+="sekunda":i===2||i===3||i===4?c+="sekunde":c+="sekundi",c;case"m":return o?"jedna minuta":"jedne minute";case"mm":return i===1?c+="minuta":i===2||i===3||i===4?c+="minute":c+="minuta",c;case"h":return o?"jedan sat":"jednog sata";case"hh":return i===1?c+="sat":i===2||i===3||i===4?c+="sata":c+="sati",c;case"dd":return i===1?c+="dan":c+="dana",c;case"MM":return i===1?c+="mjesec":i===2||i===3||i===4?c+="mjeseca":c+="mjeseci",c;case"yy":return i===1?c+="godina":i===2||i===3||i===4?c+="godine":c+="godina",c}}var a=r.defineLocale("hr",{months:{format:"sije\u010Dnja_velja\u010De_o\u017Eujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"sije\u010Danj_velja\u010Da_o\u017Eujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._o\u017Eu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010Detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010Det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010De_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010Der u] LT",lastWeek:function(){switch(this.day()){case 0:return"[pro\u0161lu] [nedjelju] [u] LT";case 3:return"[pro\u0161lu] [srijedu] [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return a})},22138:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t="vas\xE1rnap h\xE9tf\u0151n kedden szerd\xE1n cs\xFCt\xF6rt\xF6k\xF6n p\xE9nteken szombaton".split(" ");function a(u,c,l,d){var p=u;switch(l){case"s":return d||c?"n\xE9h\xE1ny m\xE1sodperc":"n\xE9h\xE1ny m\xE1sodperce";case"ss":return p+(d||c)?" m\xE1sodperc":" m\xE1sodperce";case"m":return"egy"+(d||c?" perc":" perce");case"mm":return p+(d||c?" perc":" perce");case"h":return"egy"+(d||c?" \xF3ra":" \xF3r\xE1ja");case"hh":return p+(d||c?" \xF3ra":" \xF3r\xE1ja");case"d":return"egy"+(d||c?" nap":" napja");case"dd":return p+(d||c?" nap":" napja");case"M":return"egy"+(d||c?" h\xF3nap":" h\xF3napja");case"MM":return p+(d||c?" h\xF3nap":" h\xF3napja");case"y":return"egy"+(d||c?" \xE9v":" \xE9ve");case"yy":return p+(d||c?" \xE9v":" \xE9ve")}return""}function i(u){return(u?"":"[m\xFAlt] ")+"["+t[this.day()]+"] LT[-kor]"}var o=r.defineLocale("hu",{months:"janu\xE1r_febru\xE1r_m\xE1rcius_\xE1prilis_m\xE1jus_j\xFAnius_j\xFAlius_augusztus_szeptember_okt\xF3ber_november_december".split("_"),monthsShort:"jan._feb._m\xE1rc._\xE1pr._m\xE1j._j\xFAn._j\xFAl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vas\xE1rnap_h\xE9tf\u0151_kedd_szerda_cs\xFCt\xF6rt\xF6k_p\xE9ntek_szombat".split("_"),weekdaysShort:"vas_h\xE9t_kedd_sze_cs\xFCt_p\xE9n_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(u){return u.charAt(1).toLowerCase()==="u"},meridiem:function(u,c,l){return u<12?l===!0?"de":"DE":l===!0?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return i.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return i.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s m\xFAlva",past:"%s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o})},11423:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("hy-am",{months:{format:"\u0570\u0578\u0582\u0576\u057E\u0561\u0580\u056B_\u0583\u0565\u057F\u0580\u057E\u0561\u0580\u056B_\u0574\u0561\u0580\u057F\u056B_\u0561\u057A\u0580\u056B\u056C\u056B_\u0574\u0561\u0575\u056B\u057D\u056B_\u0570\u0578\u0582\u0576\u056B\u057D\u056B_\u0570\u0578\u0582\u056C\u056B\u057D\u056B_\u0585\u0563\u0578\u057D\u057F\u0578\u057D\u056B_\u057D\u0565\u057A\u057F\u0565\u0574\u0562\u0565\u0580\u056B_\u0570\u0578\u056F\u057F\u0565\u0574\u0562\u0565\u0580\u056B_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056B_\u0564\u0565\u056F\u057F\u0565\u0574\u0562\u0565\u0580\u056B".split("_"),standalone:"\u0570\u0578\u0582\u0576\u057E\u0561\u0580_\u0583\u0565\u057F\u0580\u057E\u0561\u0580_\u0574\u0561\u0580\u057F_\u0561\u057A\u0580\u056B\u056C_\u0574\u0561\u0575\u056B\u057D_\u0570\u0578\u0582\u0576\u056B\u057D_\u0570\u0578\u0582\u056C\u056B\u057D_\u0585\u0563\u0578\u057D\u057F\u0578\u057D_\u057D\u0565\u057A\u057F\u0565\u0574\u0562\u0565\u0580_\u0570\u0578\u056F\u057F\u0565\u0574\u0562\u0565\u0580_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580_\u0564\u0565\u056F\u057F\u0565\u0574\u0562\u0565\u0580".split("_")},monthsShort:"\u0570\u0576\u057E_\u0583\u057F\u0580_\u0574\u0580\u057F_\u0561\u057A\u0580_\u0574\u0575\u057D_\u0570\u0576\u057D_\u0570\u056C\u057D_\u0585\u0563\u057D_\u057D\u057A\u057F_\u0570\u056F\u057F_\u0576\u0574\u0562_\u0564\u056F\u057F".split("_"),weekdays:"\u056F\u056B\u0580\u0561\u056F\u056B_\u0565\u0580\u056F\u0578\u0582\u0577\u0561\u0562\u0569\u056B_\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056B_\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056B_\u0570\u056B\u0576\u0563\u0577\u0561\u0562\u0569\u056B_\u0578\u0582\u0580\u0562\u0561\u0569_\u0577\u0561\u0562\u0561\u0569".split("_"),weekdaysShort:"\u056F\u0580\u056F_\u0565\u0580\u056F_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),weekdaysMin:"\u056F\u0580\u056F_\u0565\u0580\u056F_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0569.",LLL:"D MMMM YYYY \u0569., HH:mm",LLLL:"dddd, D MMMM YYYY \u0569., HH:mm"},calendar:{sameDay:"[\u0561\u0575\u057D\u0585\u0580] LT",nextDay:"[\u057E\u0561\u0572\u0568] LT",lastDay:"[\u0565\u0580\u0565\u056F] LT",nextWeek:function(){return"dddd [\u0585\u0580\u0568 \u056A\u0561\u0574\u0568] LT"},lastWeek:function(){return"[\u0561\u0576\u0581\u0561\u056E] dddd [\u0585\u0580\u0568 \u056A\u0561\u0574\u0568] LT"},sameElse:"L"},relativeTime:{future:"%s \u0570\u0565\u057F\u0578",past:"%s \u0561\u057C\u0561\u057B",s:"\u0574\u056B \u0584\u0561\u0576\u056B \u057E\u0561\u0575\u0580\u056F\u0575\u0561\u0576",ss:"%d \u057E\u0561\u0575\u0580\u056F\u0575\u0561\u0576",m:"\u0580\u0578\u057A\u0565",mm:"%d \u0580\u0578\u057A\u0565",h:"\u056A\u0561\u0574",hh:"%d \u056A\u0561\u0574",d:"\u0585\u0580",dd:"%d \u0585\u0580",M:"\u0561\u0574\u056B\u057D",MM:"%d \u0561\u0574\u056B\u057D",y:"\u057F\u0561\u0580\u056B",yy:"%d \u057F\u0561\u0580\u056B"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(a){return/^(ցերեկվա|երեկոյան)$/.test(a)},meridiem:function(a){return a<4?"\u0563\u056B\u0577\u0565\u0580\u057E\u0561":a<12?"\u0561\u057C\u0561\u057E\u0578\u057F\u057E\u0561":a<17?"\u0581\u0565\u0580\u0565\u056F\u057E\u0561":"\u0565\u0580\u0565\u056F\u0578\u0575\u0561\u0576"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(a,i){switch(i){case"DDD":case"w":case"W":case"DDDo":return a===1?a+"-\u056B\u0576":a+"-\u0580\u0564";default:return a}},week:{dow:1,doy:7}});return t})},29218:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(a,i){if(a===12&&(a=0),i==="pagi")return a;if(i==="siang")return a>=11?a:a+12;if(i==="sore"||i==="malam")return a+12},meridiem:function(a,i,o){return a<11?"pagi":a<15?"siang":a<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}});return t})},90135:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(o){return o%100===11?!0:o%10!==1}function a(o,u,c,l){var d=o+" ";switch(c){case"s":return u||l?"nokkrar sek\xFAndur":"nokkrum sek\xFAndum";case"ss":return t(o)?d+(u||l?"sek\xFAndur":"sek\xFAndum"):d+"sek\xFAnda";case"m":return u?"m\xEDn\xFAta":"m\xEDn\xFAtu";case"mm":return t(o)?d+(u||l?"m\xEDn\xFAtur":"m\xEDn\xFAtum"):u?d+"m\xEDn\xFAta":d+"m\xEDn\xFAtu";case"hh":return t(o)?d+(u||l?"klukkustundir":"klukkustundum"):d+"klukkustund";case"d":return u?"dagur":l?"dag":"degi";case"dd":return t(o)?u?d+"dagar":d+(l?"daga":"d\xF6gum"):u?d+"dagur":d+(l?"dag":"degi");case"M":return u?"m\xE1nu\xF0ur":l?"m\xE1nu\xF0":"m\xE1nu\xF0i";case"MM":return t(o)?u?d+"m\xE1nu\xF0ir":d+(l?"m\xE1nu\xF0i":"m\xE1nu\xF0um"):u?d+"m\xE1nu\xF0ur":d+(l?"m\xE1nu\xF0":"m\xE1nu\xF0i");case"y":return u||l?"\xE1r":"\xE1ri";case"yy":return t(o)?d+(u||l?"\xE1r":"\xE1rum"):d+(u||l?"\xE1r":"\xE1ri")}}var i=r.defineLocale("is",{months:"jan\xFAar_febr\xFAar_mars_apr\xEDl_ma\xED_j\xFAn\xED_j\xFAl\xED_\xE1g\xFAst_september_okt\xF3ber_n\xF3vember_desember".split("_"),monthsShort:"jan_feb_mar_apr_ma\xED_j\xFAn_j\xFAl_\xE1g\xFA_sep_okt_n\xF3v_des".split("_"),weekdays:"sunnudagur_m\xE1nudagur_\xFEri\xF0judagur_mi\xF0vikudagur_fimmtudagur_f\xF6studagur_laugardagur".split("_"),weekdaysShort:"sun_m\xE1n_\xFEri_mi\xF0_fim_f\xF6s_lau".split("_"),weekdaysMin:"Su_M\xE1_\xDEr_Mi_Fi_F\xF6_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[\xED dag kl.] LT",nextDay:"[\xE1 morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xED g\xE6r kl.] LT",lastWeek:"[s\xED\xF0asta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s s\xED\xF0an",s:a,ss:a,m:a,mm:a,h:"klukkustund",hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i})},10150:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xEC_marted\xEC_mercoled\xEC_gioved\xEC_venerd\xEC_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(a){return(/^[0-9].+$/.test(a)?"tra":"in")+" "+a},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%d\xBA",week:{dow:1,doy:4}});return t})},90626:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xEC_marted\xEC_mercoled\xEC_gioved\xEC_venerd\xEC_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%d\xBA",week:{dow:1,doy:4}});return t})},39183:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"\u4EE4\u548C",narrow:"\u32FF",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"\u5E73\u6210",narrow:"\u337B",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"\u662D\u548C",narrow:"\u337C",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"\u5927\u6B63",narrow:"\u337D",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"\u660E\u6CBB",narrow:"\u337E",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"\u897F\u66A6",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"\u7D00\u5143\u524D",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(a,i){return i[1]==="\u5143"?1:parseInt(i[1]||a,10)},months:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u65E5\u66DC\u65E5_\u6708\u66DC\u65E5_\u706B\u66DC\u65E5_\u6C34\u66DC\u65E5_\u6728\u66DC\u65E5_\u91D1\u66DC\u65E5_\u571F\u66DC\u65E5".split("_"),weekdaysShort:"\u65E5_\u6708_\u706B_\u6C34_\u6728_\u91D1_\u571F".split("_"),weekdaysMin:"\u65E5_\u6708_\u706B_\u6C34_\u6728_\u91D1_\u571F".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5 HH:mm",LLLL:"YYYY\u5E74M\u6708D\u65E5 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(a){return a==="\u5348\u5F8C"},meridiem:function(a,i,o){return a<12?"\u5348\u524D":"\u5348\u5F8C"},calendar:{sameDay:"[\u4ECA\u65E5] LT",nextDay:"[\u660E\u65E5] LT",nextWeek:function(a){return a.week()!==this.week()?"[\u6765\u9031]dddd LT":"dddd LT"},lastDay:"[\u6628\u65E5] LT",lastWeek:function(a){return this.week()!==a.week()?"[\u5148\u9031]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(a,i){switch(i){case"y":return a===1?"\u5143\u5E74":a+"\u5E74";case"d":case"D":case"DDD":return a+"\u65E5";default:return a}},relativeTime:{future:"%s\u5F8C",past:"%s\u524D",s:"\u6570\u79D2",ss:"%d\u79D2",m:"1\u5206",mm:"%d\u5206",h:"1\u6642\u9593",hh:"%d\u6642\u9593",d:"1\u65E5",dd:"%d\u65E5",M:"1\u30F6\u6708",MM:"%d\u30F6\u6708",y:"1\u5E74",yy:"%d\u5E74"}});return t})},24286:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(a,i){if(a===12&&(a=0),i==="enjing")return a;if(i==="siyang")return a>=11?a:a+12;if(i==="sonten"||i==="ndalu")return a+12},meridiem:function(a,i,o){return a<11?"enjing":a<15?"siyang":a<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}});return t})},12105:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("ka",{months:"\u10D8\u10D0\u10DC\u10D5\u10D0\u10E0\u10D8_\u10D7\u10D4\u10D1\u10D4\u10E0\u10D5\u10D0\u10DA\u10D8_\u10DB\u10D0\u10E0\u10E2\u10D8_\u10D0\u10DE\u10E0\u10D8\u10DA\u10D8_\u10DB\u10D0\u10D8\u10E1\u10D8_\u10D8\u10D5\u10DC\u10D8\u10E1\u10D8_\u10D8\u10D5\u10DA\u10D8\u10E1\u10D8_\u10D0\u10D2\u10D5\u10D8\u10E1\u10E2\u10DD_\u10E1\u10D4\u10E5\u10E2\u10D4\u10DB\u10D1\u10D4\u10E0\u10D8_\u10DD\u10E5\u10E2\u10DD\u10DB\u10D1\u10D4\u10E0\u10D8_\u10DC\u10DD\u10D4\u10DB\u10D1\u10D4\u10E0\u10D8_\u10D3\u10D4\u10D9\u10D4\u10DB\u10D1\u10D4\u10E0\u10D8".split("_"),monthsShort:"\u10D8\u10D0\u10DC_\u10D7\u10D4\u10D1_\u10DB\u10D0\u10E0_\u10D0\u10DE\u10E0_\u10DB\u10D0\u10D8_\u10D8\u10D5\u10DC_\u10D8\u10D5\u10DA_\u10D0\u10D2\u10D5_\u10E1\u10D4\u10E5_\u10DD\u10E5\u10E2_\u10DC\u10DD\u10D4_\u10D3\u10D4\u10D9".split("_"),weekdays:{standalone:"\u10D9\u10D5\u10D8\u10E0\u10D0_\u10DD\u10E0\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8_\u10E1\u10D0\u10DB\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8_\u10DD\u10D7\u10EE\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8_\u10EE\u10E3\u10D7\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8_\u10DE\u10D0\u10E0\u10D0\u10E1\u10D9\u10D4\u10D5\u10D8_\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8".split("_"),format:"\u10D9\u10D5\u10D8\u10E0\u10D0\u10E1_\u10DD\u10E0\u10E8\u10D0\u10D1\u10D0\u10D7\u10E1_\u10E1\u10D0\u10DB\u10E8\u10D0\u10D1\u10D0\u10D7\u10E1_\u10DD\u10D7\u10EE\u10E8\u10D0\u10D1\u10D0\u10D7\u10E1_\u10EE\u10E3\u10D7\u10E8\u10D0\u10D1\u10D0\u10D7\u10E1_\u10DE\u10D0\u10E0\u10D0\u10E1\u10D9\u10D4\u10D5\u10E1_\u10E8\u10D0\u10D1\u10D0\u10D7\u10E1".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"\u10D9\u10D5\u10D8_\u10DD\u10E0\u10E8_\u10E1\u10D0\u10DB_\u10DD\u10D7\u10EE_\u10EE\u10E3\u10D7_\u10DE\u10D0\u10E0_\u10E8\u10D0\u10D1".split("_"),weekdaysMin:"\u10D9\u10D5_\u10DD\u10E0_\u10E1\u10D0_\u10DD\u10D7_\u10EE\u10E3_\u10DE\u10D0_\u10E8\u10D0".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u10D3\u10E6\u10D4\u10E1] LT[-\u10D6\u10D4]",nextDay:"[\u10EE\u10D5\u10D0\u10DA] LT[-\u10D6\u10D4]",lastDay:"[\u10D2\u10E3\u10E8\u10D8\u10DC] LT[-\u10D6\u10D4]",nextWeek:"[\u10E8\u10D4\u10DB\u10D3\u10D4\u10D2] dddd LT[-\u10D6\u10D4]",lastWeek:"[\u10EC\u10D8\u10DC\u10D0] dddd LT-\u10D6\u10D4",sameElse:"L"},relativeTime:{future:function(a){return a.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,function(i,o,u){return u==="\u10D8"?o+"\u10E8\u10D8":o+u+"\u10E8\u10D8"})},past:function(a){return/(წამი|წუთი|საათი|დღე|თვე)/.test(a)?a.replace(/(ი|ე)$/,"\u10D8\u10E1 \u10EC\u10D8\u10DC"):/წელი/.test(a)?a.replace(/წელი$/,"\u10EC\u10DA\u10D8\u10E1 \u10EC\u10D8\u10DC"):a},s:"\u10E0\u10D0\u10DB\u10D3\u10D4\u10DC\u10D8\u10DB\u10D4 \u10EC\u10D0\u10DB\u10D8",ss:"%d \u10EC\u10D0\u10DB\u10D8",m:"\u10EC\u10E3\u10D7\u10D8",mm:"%d \u10EC\u10E3\u10D7\u10D8",h:"\u10E1\u10D0\u10D0\u10D7\u10D8",hh:"%d \u10E1\u10D0\u10D0\u10D7\u10D8",d:"\u10D3\u10E6\u10D4",dd:"%d \u10D3\u10E6\u10D4",M:"\u10D7\u10D5\u10D4",MM:"%d \u10D7\u10D5\u10D4",y:"\u10EC\u10D4\u10DA\u10D8",yy:"%d \u10EC\u10D4\u10DA\u10D8"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(a){return a===0?a:a===1?a+"-\u10DA\u10D8":a<20||a<=100&&a%20===0||a%100===0?"\u10DB\u10D4-"+a:a+"-\u10D4"},week:{dow:1,doy:7}});return t})},47772:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={0:"-\u0448\u0456",1:"-\u0448\u0456",2:"-\u0448\u0456",3:"-\u0448\u0456",4:"-\u0448\u0456",5:"-\u0448\u0456",6:"-\u0448\u044B",7:"-\u0448\u0456",8:"-\u0448\u0456",9:"-\u0448\u044B",10:"-\u0448\u044B",20:"-\u0448\u044B",30:"-\u0448\u044B",40:"-\u0448\u044B",50:"-\u0448\u0456",60:"-\u0448\u044B",70:"-\u0448\u0456",80:"-\u0448\u0456",90:"-\u0448\u044B",100:"-\u0448\u0456"},a=r.defineLocale("kk",{months:"\u049B\u0430\u04A3\u0442\u0430\u0440_\u0430\u049B\u043F\u0430\u043D_\u043D\u0430\u0443\u0440\u044B\u0437_\u0441\u04D9\u0443\u0456\u0440_\u043C\u0430\u043C\u044B\u0440_\u043C\u0430\u0443\u0441\u044B\u043C_\u0448\u0456\u043B\u0434\u0435_\u0442\u0430\u043C\u044B\u0437_\u049B\u044B\u0440\u043A\u04AF\u0439\u0435\u043A_\u049B\u0430\u0437\u0430\u043D_\u049B\u0430\u0440\u0430\u0448\u0430_\u0436\u0435\u043B\u0442\u043E\u049B\u0441\u0430\u043D".split("_"),monthsShort:"\u049B\u0430\u04A3_\u0430\u049B\u043F_\u043D\u0430\u0443_\u0441\u04D9\u0443_\u043C\u0430\u043C_\u043C\u0430\u0443_\u0448\u0456\u043B_\u0442\u0430\u043C_\u049B\u044B\u0440_\u049B\u0430\u0437_\u049B\u0430\u0440_\u0436\u0435\u043B".split("_"),weekdays:"\u0436\u0435\u043A\u0441\u0435\u043D\u0431\u0456_\u0434\u04AF\u0439\u0441\u0435\u043D\u0431\u0456_\u0441\u0435\u0439\u0441\u0435\u043D\u0431\u0456_\u0441\u04D9\u0440\u0441\u0435\u043D\u0431\u0456_\u0431\u0435\u0439\u0441\u0435\u043D\u0431\u0456_\u0436\u04B1\u043C\u0430_\u0441\u0435\u043D\u0431\u0456".split("_"),weekdaysShort:"\u0436\u0435\u043A_\u0434\u04AF\u0439_\u0441\u0435\u0439_\u0441\u04D9\u0440_\u0431\u0435\u0439_\u0436\u04B1\u043C_\u0441\u0435\u043D".split("_"),weekdaysMin:"\u0436\u043A_\u0434\u0439_\u0441\u0439_\u0441\u0440_\u0431\u0439_\u0436\u043C_\u0441\u043D".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04AF\u0433\u0456\u043D \u0441\u0430\u0493\u0430\u0442] LT",nextDay:"[\u0415\u0440\u0442\u0435\u04A3 \u0441\u0430\u0493\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0493\u0430\u0442] LT",lastDay:"[\u041A\u0435\u0448\u0435 \u0441\u0430\u0493\u0430\u0442] LT",lastWeek:"[\u04E8\u0442\u043A\u0435\u043D \u0430\u043F\u0442\u0430\u043D\u044B\u04A3] dddd [\u0441\u0430\u0493\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0456\u0448\u0456\u043D\u0434\u0435",past:"%s \u0431\u04B1\u0440\u044B\u043D",s:"\u0431\u0456\u0440\u043D\u0435\u0448\u0435 \u0441\u0435\u043A\u0443\u043D\u0434",ss:"%d \u0441\u0435\u043A\u0443\u043D\u0434",m:"\u0431\u0456\u0440 \u043C\u0438\u043D\u0443\u0442",mm:"%d \u043C\u0438\u043D\u0443\u0442",h:"\u0431\u0456\u0440 \u0441\u0430\u0493\u0430\u0442",hh:"%d \u0441\u0430\u0493\u0430\u0442",d:"\u0431\u0456\u0440 \u043A\u04AF\u043D",dd:"%d \u043A\u04AF\u043D",M:"\u0431\u0456\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0456\u0440 \u0436\u044B\u043B",yy:"%d \u0436\u044B\u043B"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(i){var o=i%10,u=i>=100?100:null;return i+(t[i]||t[o]||t[u])},week:{dow:1,doy:7}});return a})},18758:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u17E1",2:"\u17E2",3:"\u17E3",4:"\u17E4",5:"\u17E5",6:"\u17E6",7:"\u17E7",8:"\u17E8",9:"\u17E9",0:"\u17E0"},a={"\u17E1":"1","\u17E2":"2","\u17E3":"3","\u17E4":"4","\u17E5":"5","\u17E6":"6","\u17E7":"7","\u17E8":"8","\u17E9":"9","\u17E0":"0"},i=r.defineLocale("km",{months:"\u1798\u1780\u179A\u17B6_\u1780\u17BB\u1798\u17D2\u1797\u17C8_\u1798\u17B8\u1793\u17B6_\u1798\u17C1\u179F\u17B6_\u17A7\u179F\u1797\u17B6_\u1798\u17B7\u1790\u17BB\u1793\u17B6_\u1780\u1780\u17D2\u1780\u178A\u17B6_\u179F\u17B8\u17A0\u17B6_\u1780\u1789\u17D2\u1789\u17B6_\u178F\u17BB\u179B\u17B6_\u179C\u17B7\u1785\u17D2\u1786\u17B7\u1780\u17B6_\u1792\u17D2\u1793\u17BC".split("_"),monthsShort:"\u1798\u1780\u179A\u17B6_\u1780\u17BB\u1798\u17D2\u1797\u17C8_\u1798\u17B8\u1793\u17B6_\u1798\u17C1\u179F\u17B6_\u17A7\u179F\u1797\u17B6_\u1798\u17B7\u1790\u17BB\u1793\u17B6_\u1780\u1780\u17D2\u1780\u178A\u17B6_\u179F\u17B8\u17A0\u17B6_\u1780\u1789\u17D2\u1789\u17B6_\u178F\u17BB\u179B\u17B6_\u179C\u17B7\u1785\u17D2\u1786\u17B7\u1780\u17B6_\u1792\u17D2\u1793\u17BC".split("_"),weekdays:"\u17A2\u17B6\u1791\u17B7\u178F\u17D2\u1799_\u1785\u17D0\u1793\u17D2\u1791_\u17A2\u1784\u17D2\u1782\u17B6\u179A_\u1796\u17BB\u1792_\u1796\u17D2\u179A\u17A0\u179F\u17D2\u1794\u178F\u17B7\u17CD_\u179F\u17BB\u1780\u17D2\u179A_\u179F\u17C5\u179A\u17CD".split("_"),weekdaysShort:"\u17A2\u17B6_\u1785_\u17A2_\u1796_\u1796\u17D2\u179A_\u179F\u17BB_\u179F".split("_"),weekdaysMin:"\u17A2\u17B6_\u1785_\u17A2_\u1796_\u1796\u17D2\u179A_\u179F\u17BB_\u179F".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(o){return o==="\u179B\u17D2\u1784\u17B6\u1785"},meridiem:function(o,u,c){return o<12?"\u1796\u17D2\u179A\u17B9\u1780":"\u179B\u17D2\u1784\u17B6\u1785"},calendar:{sameDay:"[\u1790\u17D2\u1784\u17C3\u1793\u17C1\u17C7 \u1798\u17C9\u17C4\u1784] LT",nextDay:"[\u179F\u17D2\u17A2\u17C2\u1780 \u1798\u17C9\u17C4\u1784] LT",nextWeek:"dddd [\u1798\u17C9\u17C4\u1784] LT",lastDay:"[\u1798\u17D2\u179F\u17B7\u179B\u1798\u17B7\u1789 \u1798\u17C9\u17C4\u1784] LT",lastWeek:"dddd [\u179F\u1794\u17D2\u178F\u17B6\u17A0\u17CD\u1798\u17BB\u1793] [\u1798\u17C9\u17C4\u1784] LT",sameElse:"L"},relativeTime:{future:"%s\u1791\u17C0\u178F",past:"%s\u1798\u17BB\u1793",s:"\u1794\u17C9\u17BB\u1793\u17D2\u1798\u17B6\u1793\u179C\u17B7\u1793\u17B6\u1791\u17B8",ss:"%d \u179C\u17B7\u1793\u17B6\u1791\u17B8",m:"\u1798\u17BD\u1799\u1793\u17B6\u1791\u17B8",mm:"%d \u1793\u17B6\u1791\u17B8",h:"\u1798\u17BD\u1799\u1798\u17C9\u17C4\u1784",hh:"%d \u1798\u17C9\u17C4\u1784",d:"\u1798\u17BD\u1799\u1790\u17D2\u1784\u17C3",dd:"%d \u1790\u17D2\u1784\u17C3",M:"\u1798\u17BD\u1799\u1781\u17C2",MM:"%d \u1781\u17C2",y:"\u1798\u17BD\u1799\u1786\u17D2\u1793\u17B6\u17C6",yy:"%d \u1786\u17D2\u1793\u17B6\u17C6"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"\u1791\u17B8%d",preparse:function(o){return o.replace(/[១២៣៤៥៦៧៨៩០]/g,function(u){return a[u]})},postformat:function(o){return o.replace(/\d/g,function(u){return t[u]})},week:{dow:1,doy:4}});return i})},79282:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u0CE7",2:"\u0CE8",3:"\u0CE9",4:"\u0CEA",5:"\u0CEB",6:"\u0CEC",7:"\u0CED",8:"\u0CEE",9:"\u0CEF",0:"\u0CE6"},a={"\u0CE7":"1","\u0CE8":"2","\u0CE9":"3","\u0CEA":"4","\u0CEB":"5","\u0CEC":"6","\u0CED":"7","\u0CEE":"8","\u0CEF":"9","\u0CE6":"0"},i=r.defineLocale("kn",{months:"\u0C9C\u0CA8\u0CB5\u0CB0\u0CBF_\u0CAB\u0CC6\u0CAC\u0CCD\u0CB0\u0CB5\u0CB0\u0CBF_\u0CAE\u0CBE\u0CB0\u0CCD\u0C9A\u0CCD_\u0C8F\u0CAA\u0CCD\u0CB0\u0CBF\u0CB2\u0CCD_\u0CAE\u0CC6\u0CD5_\u0C9C\u0CC2\u0CA8\u0CCD_\u0C9C\u0CC1\u0CB2\u0CC6\u0CD6_\u0C86\u0C97\u0CB8\u0CCD\u0C9F\u0CCD_\u0CB8\u0CC6\u0CAA\u0CCD\u0C9F\u0CC6\u0C82\u0CAC\u0CB0\u0CCD_\u0C85\u0C95\u0CCD\u0C9F\u0CC6\u0CC2\u0CD5\u0CAC\u0CB0\u0CCD_\u0CA8\u0CB5\u0CC6\u0C82\u0CAC\u0CB0\u0CCD_\u0CA1\u0CBF\u0CB8\u0CC6\u0C82\u0CAC\u0CB0\u0CCD".split("_"),monthsShort:"\u0C9C\u0CA8_\u0CAB\u0CC6\u0CAC\u0CCD\u0CB0_\u0CAE\u0CBE\u0CB0\u0CCD\u0C9A\u0CCD_\u0C8F\u0CAA\u0CCD\u0CB0\u0CBF\u0CB2\u0CCD_\u0CAE\u0CC6\u0CD5_\u0C9C\u0CC2\u0CA8\u0CCD_\u0C9C\u0CC1\u0CB2\u0CC6\u0CD6_\u0C86\u0C97\u0CB8\u0CCD\u0C9F\u0CCD_\u0CB8\u0CC6\u0CAA\u0CCD\u0C9F\u0CC6\u0C82_\u0C85\u0C95\u0CCD\u0C9F\u0CC6\u0CC2\u0CD5_\u0CA8\u0CB5\u0CC6\u0C82_\u0CA1\u0CBF\u0CB8\u0CC6\u0C82".split("_"),monthsParseExact:!0,weekdays:"\u0CAD\u0CBE\u0CA8\u0CC1\u0CB5\u0CBE\u0CB0_\u0CB8\u0CC6\u0CC2\u0CD5\u0CAE\u0CB5\u0CBE\u0CB0_\u0CAE\u0C82\u0C97\u0CB3\u0CB5\u0CBE\u0CB0_\u0CAC\u0CC1\u0CA7\u0CB5\u0CBE\u0CB0_\u0C97\u0CC1\u0CB0\u0CC1\u0CB5\u0CBE\u0CB0_\u0CB6\u0CC1\u0C95\u0CCD\u0CB0\u0CB5\u0CBE\u0CB0_\u0CB6\u0CA8\u0CBF\u0CB5\u0CBE\u0CB0".split("_"),weekdaysShort:"\u0CAD\u0CBE\u0CA8\u0CC1_\u0CB8\u0CC6\u0CC2\u0CD5\u0CAE_\u0CAE\u0C82\u0C97\u0CB3_\u0CAC\u0CC1\u0CA7_\u0C97\u0CC1\u0CB0\u0CC1_\u0CB6\u0CC1\u0C95\u0CCD\u0CB0_\u0CB6\u0CA8\u0CBF".split("_"),weekdaysMin:"\u0CAD\u0CBE_\u0CB8\u0CC6\u0CC2\u0CD5_\u0CAE\u0C82_\u0CAC\u0CC1_\u0C97\u0CC1_\u0CB6\u0CC1_\u0CB6".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0C87\u0C82\u0CA6\u0CC1] LT",nextDay:"[\u0CA8\u0CBE\u0CB3\u0CC6] LT",nextWeek:"dddd, LT",lastDay:"[\u0CA8\u0CBF\u0CA8\u0CCD\u0CA8\u0CC6] LT",lastWeek:"[\u0C95\u0CC6\u0CC2\u0CA8\u0CC6\u0CAF] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0CA8\u0C82\u0CA4\u0CB0",past:"%s \u0CB9\u0CBF\u0C82\u0CA6\u0CC6",s:"\u0C95\u0CC6\u0CB2\u0CB5\u0CC1 \u0C95\u0CCD\u0CB7\u0CA3\u0C97\u0CB3\u0CC1",ss:"%d \u0CB8\u0CC6\u0C95\u0CC6\u0C82\u0CA1\u0CC1\u0C97\u0CB3\u0CC1",m:"\u0C92\u0C82\u0CA6\u0CC1 \u0CA8\u0CBF\u0CAE\u0CBF\u0CB7",mm:"%d \u0CA8\u0CBF\u0CAE\u0CBF\u0CB7",h:"\u0C92\u0C82\u0CA6\u0CC1 \u0C97\u0C82\u0C9F\u0CC6",hh:"%d \u0C97\u0C82\u0C9F\u0CC6",d:"\u0C92\u0C82\u0CA6\u0CC1 \u0CA6\u0CBF\u0CA8",dd:"%d \u0CA6\u0CBF\u0CA8",M:"\u0C92\u0C82\u0CA6\u0CC1 \u0CA4\u0CBF\u0C82\u0C97\u0CB3\u0CC1",MM:"%d \u0CA4\u0CBF\u0C82\u0C97\u0CB3\u0CC1",y:"\u0C92\u0C82\u0CA6\u0CC1 \u0CB5\u0CB0\u0CCD\u0CB7",yy:"%d \u0CB5\u0CB0\u0CCD\u0CB7"},preparse:function(o){return o.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,function(u){return a[u]})},postformat:function(o){return o.replace(/\d/g,function(u){return t[u]})},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(o,u){if(o===12&&(o=0),u==="\u0CB0\u0CBE\u0CA4\u0CCD\u0CB0\u0CBF")return o<4?o:o+12;if(u==="\u0CAC\u0CC6\u0CB3\u0CBF\u0C97\u0CCD\u0C97\u0CC6")return o;if(u==="\u0CAE\u0CA7\u0CCD\u0CAF\u0CBE\u0CB9\u0CCD\u0CA8")return o>=10?o:o+12;if(u==="\u0CB8\u0C82\u0C9C\u0CC6")return o+12},meridiem:function(o,u,c){return o<4?"\u0CB0\u0CBE\u0CA4\u0CCD\u0CB0\u0CBF":o<10?"\u0CAC\u0CC6\u0CB3\u0CBF\u0C97\u0CCD\u0C97\u0CC6":o<17?"\u0CAE\u0CA7\u0CCD\u0CAF\u0CBE\u0CB9\u0CCD\u0CA8":o<20?"\u0CB8\u0C82\u0C9C\u0CC6":"\u0CB0\u0CBE\u0CA4\u0CCD\u0CB0\u0CBF"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(o){return o+"\u0CA8\u0CC6\u0CD5"},week:{dow:0,doy:6}});return i})},33730:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("ko",{months:"1\uC6D4_2\uC6D4_3\uC6D4_4\uC6D4_5\uC6D4_6\uC6D4_7\uC6D4_8\uC6D4_9\uC6D4_10\uC6D4_11\uC6D4_12\uC6D4".split("_"),monthsShort:"1\uC6D4_2\uC6D4_3\uC6D4_4\uC6D4_5\uC6D4_6\uC6D4_7\uC6D4_8\uC6D4_9\uC6D4_10\uC6D4_11\uC6D4_12\uC6D4".split("_"),weekdays:"\uC77C\uC694\uC77C_\uC6D4\uC694\uC77C_\uD654\uC694\uC77C_\uC218\uC694\uC77C_\uBAA9\uC694\uC77C_\uAE08\uC694\uC77C_\uD1A0\uC694\uC77C".split("_"),weekdaysShort:"\uC77C_\uC6D4_\uD654_\uC218_\uBAA9_\uAE08_\uD1A0".split("_"),weekdaysMin:"\uC77C_\uC6D4_\uD654_\uC218_\uBAA9_\uAE08_\uD1A0".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY\uB144 MMMM D\uC77C",LLL:"YYYY\uB144 MMMM D\uC77C A h:mm",LLLL:"YYYY\uB144 MMMM D\uC77C dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY\uB144 MMMM D\uC77C",lll:"YYYY\uB144 MMMM D\uC77C A h:mm",llll:"YYYY\uB144 MMMM D\uC77C dddd A h:mm"},calendar:{sameDay:"\uC624\uB298 LT",nextDay:"\uB0B4\uC77C LT",nextWeek:"dddd LT",lastDay:"\uC5B4\uC81C LT",lastWeek:"\uC9C0\uB09C\uC8FC dddd LT",sameElse:"L"},relativeTime:{future:"%s \uD6C4",past:"%s \uC804",s:"\uBA87 \uCD08",ss:"%d\uCD08",m:"1\uBD84",mm:"%d\uBD84",h:"\uD55C \uC2DC\uAC04",hh:"%d\uC2DC\uAC04",d:"\uD558\uB8E8",dd:"%d\uC77C",M:"\uD55C \uB2EC",MM:"%d\uB2EC",y:"\uC77C \uB144",yy:"%d\uB144"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(a,i){switch(i){case"d":case"D":case"DDD":return a+"\uC77C";case"M":return a+"\uC6D4";case"w":case"W":return a+"\uC8FC";default:return a}},meridiemParse:/오전|오후/,isPM:function(a){return a==="\uC624\uD6C4"},meridiem:function(a,i,o){return a<12?"\uC624\uC804":"\uC624\uD6C4"}});return t})},1408:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},a={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},i=["\u06A9\u0627\u0646\u0648\u0646\u06CC \u062F\u0648\u0648\u06D5\u0645","\u0634\u0648\u0628\u0627\u062A","\u0626\u0627\u0632\u0627\u0631","\u0646\u06CC\u0633\u0627\u0646","\u0626\u0627\u06CC\u0627\u0631","\u062D\u0648\u0632\u06D5\u06CC\u0631\u0627\u0646","\u062A\u06D5\u0645\u0645\u0648\u0632","\u0626\u0627\u0628","\u0626\u06D5\u06CC\u0644\u0648\u0648\u0644","\u062A\u0634\u0631\u06CC\u0646\u06CC \u06CC\u06D5\u0643\u06D5\u0645","\u062A\u0634\u0631\u06CC\u0646\u06CC \u062F\u0648\u0648\u06D5\u0645","\u0643\u0627\u0646\u0648\u0646\u06CC \u06CC\u06D5\u06A9\u06D5\u0645"],o=r.defineLocale("ku",{months:i,monthsShort:i,weekdays:"\u06CC\u0647\u200C\u0643\u0634\u0647\u200C\u0645\u0645\u0647\u200C_\u062F\u0648\u0648\u0634\u0647\u200C\u0645\u0645\u0647\u200C_\u0633\u06CE\u0634\u0647\u200C\u0645\u0645\u0647\u200C_\u0686\u0648\u0627\u0631\u0634\u0647\u200C\u0645\u0645\u0647\u200C_\u067E\u06CE\u0646\u062C\u0634\u0647\u200C\u0645\u0645\u0647\u200C_\u0647\u0647\u200C\u06CC\u0646\u06CC_\u0634\u0647\u200C\u0645\u0645\u0647\u200C".split("_"),weekdaysShort:"\u06CC\u0647\u200C\u0643\u0634\u0647\u200C\u0645_\u062F\u0648\u0648\u0634\u0647\u200C\u0645_\u0633\u06CE\u0634\u0647\u200C\u0645_\u0686\u0648\u0627\u0631\u0634\u0647\u200C\u0645_\u067E\u06CE\u0646\u062C\u0634\u0647\u200C\u0645_\u0647\u0647\u200C\u06CC\u0646\u06CC_\u0634\u0647\u200C\u0645\u0645\u0647\u200C".split("_"),weekdaysMin:"\u06CC_\u062F_\u0633_\u0686_\u067E_\u0647_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(u){return/ئێواره‌/.test(u)},meridiem:function(u,c,l){return u<12?"\u0628\u0647\u200C\u06CC\u0627\u0646\u06CC":"\u0626\u06CE\u0648\u0627\u0631\u0647\u200C"},calendar:{sameDay:"[\u0626\u0647\u200C\u0645\u0631\u06C6 \u0643\u0627\u062A\u0698\u0645\u06CE\u0631] LT",nextDay:"[\u0628\u0647\u200C\u06CC\u0627\u0646\u06CC \u0643\u0627\u062A\u0698\u0645\u06CE\u0631] LT",nextWeek:"dddd [\u0643\u0627\u062A\u0698\u0645\u06CE\u0631] LT",lastDay:"[\u062F\u0648\u06CE\u0646\u06CE \u0643\u0627\u062A\u0698\u0645\u06CE\u0631] LT",lastWeek:"dddd [\u0643\u0627\u062A\u0698\u0645\u06CE\u0631] LT",sameElse:"L"},relativeTime:{future:"\u0644\u0647\u200C %s",past:"%s",s:"\u0686\u0647\u200C\u0646\u062F \u0686\u0631\u0643\u0647\u200C\u06CC\u0647\u200C\u0643",ss:"\u0686\u0631\u0643\u0647\u200C %d",m:"\u06CC\u0647\u200C\u0643 \u062E\u0648\u0644\u0647\u200C\u0643",mm:"%d \u062E\u0648\u0644\u0647\u200C\u0643",h:"\u06CC\u0647\u200C\u0643 \u0643\u0627\u062A\u0698\u0645\u06CE\u0631",hh:"%d \u0643\u0627\u062A\u0698\u0645\u06CE\u0631",d:"\u06CC\u0647\u200C\u0643 \u0695\u06C6\u0698",dd:"%d \u0695\u06C6\u0698",M:"\u06CC\u0647\u200C\u0643 \u0645\u0627\u0646\u06AF",MM:"%d \u0645\u0627\u0646\u06AF",y:"\u06CC\u0647\u200C\u0643 \u0633\u0627\u06B5",yy:"%d \u0633\u0627\u06B5"},preparse:function(u){return u.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(c){return a[c]}).replace(/،/g,",")},postformat:function(u){return u.replace(/\d/g,function(c){return t[c]}).replace(/,/g,"\u060C")},week:{dow:6,doy:12}});return o})},33291:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={0:"-\u0447\u04AF",1:"-\u0447\u0438",2:"-\u0447\u0438",3:"-\u0447\u04AF",4:"-\u0447\u04AF",5:"-\u0447\u0438",6:"-\u0447\u044B",7:"-\u0447\u0438",8:"-\u0447\u0438",9:"-\u0447\u0443",10:"-\u0447\u0443",20:"-\u0447\u044B",30:"-\u0447\u0443",40:"-\u0447\u044B",50:"-\u0447\u04AF",60:"-\u0447\u044B",70:"-\u0447\u0438",80:"-\u0447\u0438",90:"-\u0447\u0443",100:"-\u0447\u04AF"},a=r.defineLocale("ky",{months:"\u044F\u043D\u0432\u0430\u0440\u044C_\u0444\u0435\u0432\u0440\u0430\u043B\u044C_\u043C\u0430\u0440\u0442_\u0430\u043F\u0440\u0435\u043B\u044C_\u043C\u0430\u0439_\u0438\u044E\u043D\u044C_\u0438\u044E\u043B\u044C_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C_\u043E\u043A\u0442\u044F\u0431\u0440\u044C_\u043D\u043E\u044F\u0431\u0440\u044C_\u0434\u0435\u043A\u0430\u0431\u0440\u044C".split("_"),monthsShort:"\u044F\u043D\u0432_\u0444\u0435\u0432_\u043C\u0430\u0440\u0442_\u0430\u043F\u0440_\u043C\u0430\u0439_\u0438\u044E\u043D\u044C_\u0438\u044E\u043B\u044C_\u0430\u0432\u0433_\u0441\u0435\u043D_\u043E\u043A\u0442_\u043D\u043E\u044F_\u0434\u0435\u043A".split("_"),weekdays:"\u0416\u0435\u043A\u0448\u0435\u043C\u0431\u0438_\u0414\u04AF\u0439\u0448\u04E9\u043C\u0431\u04AF_\u0428\u0435\u0439\u0448\u0435\u043C\u0431\u0438_\u0428\u0430\u0440\u0448\u0435\u043C\u0431\u0438_\u0411\u0435\u0439\u0448\u0435\u043C\u0431\u0438_\u0416\u0443\u043C\u0430_\u0418\u0448\u0435\u043C\u0431\u0438".split("_"),weekdaysShort:"\u0416\u0435\u043A_\u0414\u04AF\u0439_\u0428\u0435\u0439_\u0428\u0430\u0440_\u0411\u0435\u0439_\u0416\u0443\u043C_\u0418\u0448\u0435".split("_"),weekdaysMin:"\u0416\u043A_\u0414\u0439_\u0428\u0439_\u0428\u0440_\u0411\u0439_\u0416\u043C_\u0418\u0448".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04AF\u0433\u04AF\u043D \u0441\u0430\u0430\u0442] LT",nextDay:"[\u042D\u0440\u0442\u0435\u04A3 \u0441\u0430\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0430\u0442] LT",lastDay:"[\u041A\u0435\u0447\u044D\u044D \u0441\u0430\u0430\u0442] LT",lastWeek:"[\u04E8\u0442\u043A\u04E9\u043D \u0430\u043F\u0442\u0430\u043D\u044B\u043D] dddd [\u043A\u04AF\u043D\u04AF] [\u0441\u0430\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0438\u0447\u0438\u043D\u0434\u0435",past:"%s \u043C\u0443\u0440\u0443\u043D",s:"\u0431\u0438\u0440\u043D\u0435\u0447\u0435 \u0441\u0435\u043A\u0443\u043D\u0434",ss:"%d \u0441\u0435\u043A\u0443\u043D\u0434",m:"\u0431\u0438\u0440 \u043C\u04AF\u043D\u04E9\u0442",mm:"%d \u043C\u04AF\u043D\u04E9\u0442",h:"\u0431\u0438\u0440 \u0441\u0430\u0430\u0442",hh:"%d \u0441\u0430\u0430\u0442",d:"\u0431\u0438\u0440 \u043A\u04AF\u043D",dd:"%d \u043A\u04AF\u043D",M:"\u0431\u0438\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0438\u0440 \u0436\u044B\u043B",yy:"%d \u0436\u044B\u043B"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(i){var o=i%10,u=i>=100?100:null;return i+(t[i]||t[o]||t[u])},week:{dow:1,doy:7}});return a})},36841:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(c,l,d,p){var M={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return l?M[d][0]:M[d][1]}function a(c){var l=c.substr(0,c.indexOf(" "));return o(l)?"a "+c:"an "+c}function i(c){var l=c.substr(0,c.indexOf(" "));return o(l)?"viru "+c:"virun "+c}function o(c){if(c=parseInt(c,10),isNaN(c))return!1;if(c<0)return!0;if(c<10)return 4<=c&&c<=7;if(c<100){var l=c%10,d=c/10;return o(l===0?d:l)}else if(c<1e4){for(;c>=10;)c=c/10;return o(c)}else return c=c/1e3,o(c)}var u=r.defineLocale("lb",{months:"Januar_Februar_M\xE4erz_Abr\xEBll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_M\xE9indeg_D\xEBnschdeg_M\xEBttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._M\xE9._D\xEB._M\xEB._Do._Fr._Sa.".split("_"),weekdaysMin:"So_M\xE9_D\xEB_M\xEB_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[G\xEBschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:a,past:i,s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d M\xE9int",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return u})},55466:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("lo",{months:"\u0EA1\u0EB1\u0E87\u0E81\u0EAD\u0E99_\u0E81\u0EB8\u0EA1\u0E9E\u0EB2_\u0EA1\u0EB5\u0E99\u0EB2_\u0EC0\u0EA1\u0EAA\u0EB2_\u0E9E\u0EB6\u0E94\u0EAA\u0EB0\u0E9E\u0EB2_\u0EA1\u0EB4\u0E96\u0EB8\u0E99\u0EB2_\u0E81\u0ECD\u0EA5\u0EB0\u0E81\u0EBB\u0E94_\u0EAA\u0EB4\u0E87\u0EAB\u0EB2_\u0E81\u0EB1\u0E99\u0E8D\u0EB2_\u0E95\u0EB8\u0EA5\u0EB2_\u0E9E\u0EB0\u0E88\u0EB4\u0E81_\u0E97\u0EB1\u0E99\u0EA7\u0EB2".split("_"),monthsShort:"\u0EA1\u0EB1\u0E87\u0E81\u0EAD\u0E99_\u0E81\u0EB8\u0EA1\u0E9E\u0EB2_\u0EA1\u0EB5\u0E99\u0EB2_\u0EC0\u0EA1\u0EAA\u0EB2_\u0E9E\u0EB6\u0E94\u0EAA\u0EB0\u0E9E\u0EB2_\u0EA1\u0EB4\u0E96\u0EB8\u0E99\u0EB2_\u0E81\u0ECD\u0EA5\u0EB0\u0E81\u0EBB\u0E94_\u0EAA\u0EB4\u0E87\u0EAB\u0EB2_\u0E81\u0EB1\u0E99\u0E8D\u0EB2_\u0E95\u0EB8\u0EA5\u0EB2_\u0E9E\u0EB0\u0E88\u0EB4\u0E81_\u0E97\u0EB1\u0E99\u0EA7\u0EB2".split("_"),weekdays:"\u0EAD\u0EB2\u0E97\u0EB4\u0E94_\u0E88\u0EB1\u0E99_\u0EAD\u0EB1\u0E87\u0E84\u0EB2\u0E99_\u0E9E\u0EB8\u0E94_\u0E9E\u0EB0\u0EAB\u0EB1\u0E94_\u0EAA\u0EB8\u0E81_\u0EC0\u0EAA\u0EBB\u0EB2".split("_"),weekdaysShort:"\u0E97\u0EB4\u0E94_\u0E88\u0EB1\u0E99_\u0EAD\u0EB1\u0E87\u0E84\u0EB2\u0E99_\u0E9E\u0EB8\u0E94_\u0E9E\u0EB0\u0EAB\u0EB1\u0E94_\u0EAA\u0EB8\u0E81_\u0EC0\u0EAA\u0EBB\u0EB2".split("_"),weekdaysMin:"\u0E97_\u0E88_\u0EAD\u0E84_\u0E9E_\u0E9E\u0EAB_\u0EAA\u0E81_\u0EAA".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"\u0EA7\u0EB1\u0E99dddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(a){return a==="\u0E95\u0EAD\u0E99\u0EC1\u0EA5\u0E87"},meridiem:function(a,i,o){return a<12?"\u0E95\u0EAD\u0E99\u0EC0\u0E8A\u0EBB\u0EC9\u0EB2":"\u0E95\u0EAD\u0E99\u0EC1\u0EA5\u0E87"},calendar:{sameDay:"[\u0EA1\u0EB7\u0EC9\u0E99\u0EB5\u0EC9\u0EC0\u0EA7\u0EA5\u0EB2] LT",nextDay:"[\u0EA1\u0EB7\u0EC9\u0EAD\u0EB7\u0EC8\u0E99\u0EC0\u0EA7\u0EA5\u0EB2] LT",nextWeek:"[\u0EA7\u0EB1\u0E99]dddd[\u0EDC\u0EC9\u0EB2\u0EC0\u0EA7\u0EA5\u0EB2] LT",lastDay:"[\u0EA1\u0EB7\u0EC9\u0EA7\u0EB2\u0E99\u0E99\u0EB5\u0EC9\u0EC0\u0EA7\u0EA5\u0EB2] LT",lastWeek:"[\u0EA7\u0EB1\u0E99]dddd[\u0EC1\u0EA5\u0EC9\u0EA7\u0E99\u0EB5\u0EC9\u0EC0\u0EA7\u0EA5\u0EB2] LT",sameElse:"L"},relativeTime:{future:"\u0EAD\u0EB5\u0E81 %s",past:"%s\u0E9C\u0EC8\u0EB2\u0E99\u0EA1\u0EB2",s:"\u0E9A\u0ECD\u0EC8\u0EC0\u0E97\u0EBB\u0EC8\u0EB2\u0EC3\u0E94\u0EA7\u0EB4\u0E99\u0EB2\u0E97\u0EB5",ss:"%d \u0EA7\u0EB4\u0E99\u0EB2\u0E97\u0EB5",m:"1 \u0E99\u0EB2\u0E97\u0EB5",mm:"%d \u0E99\u0EB2\u0E97\u0EB5",h:"1 \u0E8A\u0EBB\u0EC8\u0EA7\u0EC2\u0EA1\u0E87",hh:"%d \u0E8A\u0EBB\u0EC8\u0EA7\u0EC2\u0EA1\u0E87",d:"1 \u0EA1\u0EB7\u0EC9",dd:"%d \u0EA1\u0EB7\u0EC9",M:"1 \u0EC0\u0E94\u0EB7\u0EAD\u0E99",MM:"%d \u0EC0\u0E94\u0EB7\u0EAD\u0E99",y:"1 \u0E9B\u0EB5",yy:"%d \u0E9B\u0EB5"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(a){return"\u0E97\u0EB5\u0EC8"+a}});return t})},57010:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={ss:"sekund\u0117_sekund\u017Ei\u0173_sekundes",m:"minut\u0117_minut\u0117s_minut\u0119",mm:"minut\u0117s_minu\u010Di\u0173_minutes",h:"valanda_valandos_valand\u0105",hh:"valandos_valand\u0173_valandas",d:"diena_dienos_dien\u0105",dd:"dienos_dien\u0173_dienas",M:"m\u0117nuo_m\u0117nesio_m\u0117nes\u012F",MM:"m\u0117nesiai_m\u0117nesi\u0173_m\u0117nesius",y:"metai_met\u0173_metus",yy:"metai_met\u0173_metus"};function a(d,p,M,_){return p?"kelios sekund\u0117s":_?"keli\u0173 sekund\u017Ei\u0173":"kelias sekundes"}function i(d,p,M,_){return p?u(M)[0]:_?u(M)[1]:u(M)[2]}function o(d){return d%10===0||d>10&&d<20}function u(d){return t[d].split("_")}function c(d,p,M,_){var y=d+" ";return d===1?y+i(d,p,M[0],_):p?y+(o(d)?u(M)[1]:u(M)[0]):_?y+u(M)[1]:y+(o(d)?u(M)[1]:u(M)[2])}var l=r.defineLocale("lt",{months:{format:"sausio_vasario_kovo_baland\u017Eio_gegu\u017E\u0117s_bir\u017Eelio_liepos_rugpj\u016B\u010Dio_rugs\u0117jo_spalio_lapkri\u010Dio_gruod\u017Eio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegu\u017E\u0117_bir\u017Eelis_liepa_rugpj\u016Btis_rugs\u0117jis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadien\u012F_pirmadien\u012F_antradien\u012F_tre\u010Diadien\u012F_ketvirtadien\u012F_penktadien\u012F_\u0161e\u0161tadien\u012F".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_tre\u010Diadienis_ketvirtadienis_penktadienis_\u0161e\u0161tadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_\u0160e\u0161".split("_"),weekdaysMin:"S_P_A_T_K_Pn_\u0160".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[\u0160iandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Pra\u0117jus\u012F] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prie\u0161 %s",s:a,ss:c,m:i,mm:c,h:i,hh:c,d:i,dd:c,M:i,MM:c,y:i,yy:c},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(d){return d+"-oji"},week:{dow:1,doy:4}});return l})},37595:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={ss:"sekundes_sekund\u0113m_sekunde_sekundes".split("_"),m:"min\u016Btes_min\u016Bt\u0113m_min\u016Bte_min\u016Btes".split("_"),mm:"min\u016Btes_min\u016Bt\u0113m_min\u016Bte_min\u016Btes".split("_"),h:"stundas_stund\u0101m_stunda_stundas".split("_"),hh:"stundas_stund\u0101m_stunda_stundas".split("_"),d:"dienas_dien\u0101m_diena_dienas".split("_"),dd:"dienas_dien\u0101m_diena_dienas".split("_"),M:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),MM:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function a(l,d,p){return p?d%10===1&&d%100!==11?l[2]:l[3]:d%10===1&&d%100!==11?l[0]:l[1]}function i(l,d,p){return l+" "+a(t[p],l,d)}function o(l,d,p){return a(t[p],l,d)}function u(l,d){return d?"da\u017Eas sekundes":"da\u017E\u0101m sekund\u0113m"}var c=r.defineLocale("lv",{months:"janv\u0101ris_febru\u0101ris_marts_apr\u012Blis_maijs_j\u016Bnijs_j\u016Blijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_j\u016Bn_j\u016Bl_aug_sep_okt_nov_dec".split("_"),weekdays:"sv\u0113tdiena_pirmdiena_otrdiena_tre\u0161diena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[\u0160odien pulksten] LT",nextDay:"[R\u012Bt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pag\u0101ju\u0161\u0101] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"p\u0113c %s",past:"pirms %s",s:u,ss:i,m:o,mm:i,h:o,hh:i,d:o,dd:i,M:o,MM:i,y:o,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return c})},39861:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(i,o){return i===1?o[0]:i>=2&&i<=4?o[1]:o[2]},translate:function(i,o,u){var c=t.words[u];return u.length===1?o?c[0]:c[1]:i+" "+t.correctGrammaticalCase(i,c)}},a=r.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010Detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010Det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010De_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010De u] LT",lastWeek:function(){var i=["[pro\u0161le] [nedjelje] [u] LT","[pro\u0161log] [ponedjeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srijede] [u] LT","[pro\u0161log] [\u010Detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"];return i[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return a})},35493:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("mi",{months:"Kohi-t\u0101te_Hui-tanguru_Pout\u016B-te-rangi_Paenga-wh\u0101wh\u0101_Haratua_Pipiri_H\u014Dngoingoi_Here-turi-k\u014Dk\u0101_Mahuru_Whiringa-\u0101-nuku_Whiringa-\u0101-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_H\u014Dngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"R\u0101tapu_Mane_T\u016Brei_Wenerei_T\u0101ite_Paraire_H\u0101tarei".split("_"),weekdaysShort:"Ta_Ma_T\u016B_We_T\u0101i_Pa_H\u0101".split("_"),weekdaysMin:"Ta_Ma_T\u016B_We_T\u0101i_Pa_H\u0101".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te h\u0113kona ruarua",ss:"%d h\u0113kona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%d\xBA",week:{dow:1,doy:4}});return t})},95966:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("mk",{months:"\u0458\u0430\u043D\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043C\u0430\u0440\u0442_\u0430\u043F\u0440\u0438\u043B_\u043C\u0430\u0458_\u0458\u0443\u043D\u0438_\u0458\u0443\u043B\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043F\u0442\u0435\u043C\u0432\u0440\u0438_\u043E\u043A\u0442\u043E\u043C\u0432\u0440\u0438_\u043D\u043E\u0435\u043C\u0432\u0440\u0438_\u0434\u0435\u043A\u0435\u043C\u0432\u0440\u0438".split("_"),monthsShort:"\u0458\u0430\u043D_\u0444\u0435\u0432_\u043C\u0430\u0440_\u0430\u043F\u0440_\u043C\u0430\u0458_\u0458\u0443\u043D_\u0458\u0443\u043B_\u0430\u0432\u0433_\u0441\u0435\u043F_\u043E\u043A\u0442_\u043D\u043E\u0435_\u0434\u0435\u043A".split("_"),weekdays:"\u043D\u0435\u0434\u0435\u043B\u0430_\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u043D\u0438\u043A_\u0432\u0442\u043E\u0440\u043D\u0438\u043A_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u043E\u043A_\u043F\u0435\u0442\u043E\u043A_\u0441\u0430\u0431\u043E\u0442\u0430".split("_"),weekdaysShort:"\u043D\u0435\u0434_\u043F\u043E\u043D_\u0432\u0442\u043E_\u0441\u0440\u0435_\u0447\u0435\u0442_\u043F\u0435\u0442_\u0441\u0430\u0431".split("_"),weekdaysMin:"\u043De_\u043Fo_\u0432\u0442_\u0441\u0440_\u0447\u0435_\u043F\u0435_\u0441a".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u0435\u043D\u0435\u0441 \u0432\u043E] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432\u043E] LT",nextWeek:"[\u0412\u043E] dddd [\u0432\u043E] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432\u043E] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u0418\u0437\u043C\u0438\u043D\u0430\u0442\u0430\u0442\u0430] dddd [\u0432\u043E] LT";case 1:case 2:case 4:case 5:return"[\u0418\u0437\u043C\u0438\u043D\u0430\u0442\u0438\u043E\u0442] dddd [\u0432\u043E] LT"}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043F\u0440\u0435\u0434 %s",s:"\u043D\u0435\u043A\u043E\u043B\u043A\u0443 \u0441\u0435\u043A\u0443\u043D\u0434\u0438",ss:"%d \u0441\u0435\u043A\u0443\u043D\u0434\u0438",m:"\u0435\u0434\u043D\u0430 \u043C\u0438\u043D\u0443\u0442\u0430",mm:"%d \u043C\u0438\u043D\u0443\u0442\u0438",h:"\u0435\u0434\u0435\u043D \u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0435\u0434\u0435\u043D \u0434\u0435\u043D",dd:"%d \u0434\u0435\u043D\u0430",M:"\u0435\u0434\u0435\u043D \u043C\u0435\u0441\u0435\u0446",MM:"%d \u043C\u0435\u0441\u0435\u0446\u0438",y:"\u0435\u0434\u043D\u0430 \u0433\u043E\u0434\u0438\u043D\u0430",yy:"%d \u0433\u043E\u0434\u0438\u043D\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(a){var i=a%10,o=a%100;return a===0?a+"-\u0435\u0432":o===0?a+"-\u0435\u043D":o>10&&o<20?a+"-\u0442\u0438":i===1?a+"-\u0432\u0438":i===2?a+"-\u0440\u0438":i===7||i===8?a+"-\u043C\u0438":a+"-\u0442\u0438"},week:{dow:1,doy:7}});return t})},87341:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("ml",{months:"\u0D1C\u0D28\u0D41\u0D35\u0D30\u0D3F_\u0D2B\u0D46\u0D2C\u0D4D\u0D30\u0D41\u0D35\u0D30\u0D3F_\u0D2E\u0D3E\u0D7C\u0D1A\u0D4D\u0D1A\u0D4D_\u0D0F\u0D2A\u0D4D\u0D30\u0D3F\u0D7D_\u0D2E\u0D47\u0D2F\u0D4D_\u0D1C\u0D42\u0D7A_\u0D1C\u0D42\u0D32\u0D48_\u0D13\u0D17\u0D38\u0D4D\u0D31\u0D4D\u0D31\u0D4D_\u0D38\u0D46\u0D2A\u0D4D\u0D31\u0D4D\u0D31\u0D02\u0D2C\u0D7C_\u0D12\u0D15\u0D4D\u0D1F\u0D4B\u0D2C\u0D7C_\u0D28\u0D35\u0D02\u0D2C\u0D7C_\u0D21\u0D3F\u0D38\u0D02\u0D2C\u0D7C".split("_"),monthsShort:"\u0D1C\u0D28\u0D41._\u0D2B\u0D46\u0D2C\u0D4D\u0D30\u0D41._\u0D2E\u0D3E\u0D7C._\u0D0F\u0D2A\u0D4D\u0D30\u0D3F._\u0D2E\u0D47\u0D2F\u0D4D_\u0D1C\u0D42\u0D7A_\u0D1C\u0D42\u0D32\u0D48._\u0D13\u0D17._\u0D38\u0D46\u0D2A\u0D4D\u0D31\u0D4D\u0D31._\u0D12\u0D15\u0D4D\u0D1F\u0D4B._\u0D28\u0D35\u0D02._\u0D21\u0D3F\u0D38\u0D02.".split("_"),monthsParseExact:!0,weekdays:"\u0D1E\u0D3E\u0D2F\u0D31\u0D3E\u0D34\u0D4D\u0D1A_\u0D24\u0D3F\u0D19\u0D4D\u0D15\u0D33\u0D3E\u0D34\u0D4D\u0D1A_\u0D1A\u0D4A\u0D35\u0D4D\u0D35\u0D3E\u0D34\u0D4D\u0D1A_\u0D2C\u0D41\u0D27\u0D28\u0D3E\u0D34\u0D4D\u0D1A_\u0D35\u0D4D\u0D2F\u0D3E\u0D34\u0D3E\u0D34\u0D4D\u0D1A_\u0D35\u0D46\u0D33\u0D4D\u0D33\u0D3F\u0D2F\u0D3E\u0D34\u0D4D\u0D1A_\u0D36\u0D28\u0D3F\u0D2F\u0D3E\u0D34\u0D4D\u0D1A".split("_"),weekdaysShort:"\u0D1E\u0D3E\u0D2F\u0D7C_\u0D24\u0D3F\u0D19\u0D4D\u0D15\u0D7E_\u0D1A\u0D4A\u0D35\u0D4D\u0D35_\u0D2C\u0D41\u0D27\u0D7B_\u0D35\u0D4D\u0D2F\u0D3E\u0D34\u0D02_\u0D35\u0D46\u0D33\u0D4D\u0D33\u0D3F_\u0D36\u0D28\u0D3F".split("_"),weekdaysMin:"\u0D1E\u0D3E_\u0D24\u0D3F_\u0D1A\u0D4A_\u0D2C\u0D41_\u0D35\u0D4D\u0D2F\u0D3E_\u0D35\u0D46_\u0D36".split("_"),longDateFormat:{LT:"A h:mm -\u0D28\u0D41",LTS:"A h:mm:ss -\u0D28\u0D41",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -\u0D28\u0D41",LLLL:"dddd, D MMMM YYYY, A h:mm -\u0D28\u0D41"},calendar:{sameDay:"[\u0D07\u0D28\u0D4D\u0D28\u0D4D] LT",nextDay:"[\u0D28\u0D3E\u0D33\u0D46] LT",nextWeek:"dddd, LT",lastDay:"[\u0D07\u0D28\u0D4D\u0D28\u0D32\u0D46] LT",lastWeek:"[\u0D15\u0D34\u0D3F\u0D1E\u0D4D\u0D1E] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0D15\u0D34\u0D3F\u0D1E\u0D4D\u0D1E\u0D4D",past:"%s \u0D2E\u0D41\u0D7B\u0D2A\u0D4D",s:"\u0D05\u0D7D\u0D2A \u0D28\u0D3F\u0D2E\u0D3F\u0D37\u0D19\u0D4D\u0D19\u0D7E",ss:"%d \u0D38\u0D46\u0D15\u0D4D\u0D15\u0D7B\u0D21\u0D4D",m:"\u0D12\u0D30\u0D41 \u0D2E\u0D3F\u0D28\u0D3F\u0D31\u0D4D\u0D31\u0D4D",mm:"%d \u0D2E\u0D3F\u0D28\u0D3F\u0D31\u0D4D\u0D31\u0D4D",h:"\u0D12\u0D30\u0D41 \u0D2E\u0D23\u0D3F\u0D15\u0D4D\u0D15\u0D42\u0D7C",hh:"%d \u0D2E\u0D23\u0D3F\u0D15\u0D4D\u0D15\u0D42\u0D7C",d:"\u0D12\u0D30\u0D41 \u0D26\u0D3F\u0D35\u0D38\u0D02",dd:"%d \u0D26\u0D3F\u0D35\u0D38\u0D02",M:"\u0D12\u0D30\u0D41 \u0D2E\u0D3E\u0D38\u0D02",MM:"%d \u0D2E\u0D3E\u0D38\u0D02",y:"\u0D12\u0D30\u0D41 \u0D35\u0D7C\u0D37\u0D02",yy:"%d \u0D35\u0D7C\u0D37\u0D02"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(a,i){return a===12&&(a=0),i==="\u0D30\u0D3E\u0D24\u0D4D\u0D30\u0D3F"&&a>=4||i==="\u0D09\u0D1A\u0D4D\u0D1A \u0D15\u0D34\u0D3F\u0D1E\u0D4D\u0D1E\u0D4D"||i==="\u0D35\u0D48\u0D15\u0D41\u0D28\u0D4D\u0D28\u0D47\u0D30\u0D02"?a+12:a},meridiem:function(a,i,o){return a<4?"\u0D30\u0D3E\u0D24\u0D4D\u0D30\u0D3F":a<12?"\u0D30\u0D3E\u0D35\u0D3F\u0D32\u0D46":a<17?"\u0D09\u0D1A\u0D4D\u0D1A \u0D15\u0D34\u0D3F\u0D1E\u0D4D\u0D1E\u0D4D":a<20?"\u0D35\u0D48\u0D15\u0D41\u0D28\u0D4D\u0D28\u0D47\u0D30\u0D02":"\u0D30\u0D3E\u0D24\u0D4D\u0D30\u0D3F"}});return t})},5115:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(i,o,u,c){switch(u){case"s":return o?"\u0445\u044D\u0434\u0445\u044D\u043D \u0441\u0435\u043A\u0443\u043D\u0434":"\u0445\u044D\u0434\u0445\u044D\u043D \u0441\u0435\u043A\u0443\u043D\u0434\u044B\u043D";case"ss":return i+(o?" \u0441\u0435\u043A\u0443\u043D\u0434":" \u0441\u0435\u043A\u0443\u043D\u0434\u044B\u043D");case"m":case"mm":return i+(o?" \u043C\u0438\u043D\u0443\u0442":" \u043C\u0438\u043D\u0443\u0442\u044B\u043D");case"h":case"hh":return i+(o?" \u0446\u0430\u0433":" \u0446\u0430\u0433\u0438\u0439\u043D");case"d":case"dd":return i+(o?" \u04E9\u0434\u04E9\u0440":" \u04E9\u0434\u0440\u0438\u0439\u043D");case"M":case"MM":return i+(o?" \u0441\u0430\u0440":" \u0441\u0430\u0440\u044B\u043D");case"y":case"yy":return i+(o?" \u0436\u0438\u043B":" \u0436\u0438\u043B\u0438\u0439\u043D");default:return i}}var a=r.defineLocale("mn",{months:"\u041D\u044D\u0433\u0434\u04AF\u0433\u044D\u044D\u0440 \u0441\u0430\u0440_\u0425\u043E\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u04E9\u0440\u04E9\u0432\u0434\u04AF\u0433\u044D\u044D\u0440 \u0441\u0430\u0440_\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u043E\u043B\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u041D\u0430\u0439\u043C\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0415\u0441\u0434\u04AF\u0433\u044D\u044D\u0440 \u0441\u0430\u0440_\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043D \u043D\u044D\u0433\u0434\u04AF\u0433\u044D\u044D\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043D \u0445\u043E\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440".split("_"),monthsShort:"1 \u0441\u0430\u0440_2 \u0441\u0430\u0440_3 \u0441\u0430\u0440_4 \u0441\u0430\u0440_5 \u0441\u0430\u0440_6 \u0441\u0430\u0440_7 \u0441\u0430\u0440_8 \u0441\u0430\u0440_9 \u0441\u0430\u0440_10 \u0441\u0430\u0440_11 \u0441\u0430\u0440_12 \u0441\u0430\u0440".split("_"),monthsParseExact:!0,weekdays:"\u041D\u044F\u043C_\u0414\u0430\u0432\u0430\u0430_\u041C\u044F\u0433\u043C\u0430\u0440_\u041B\u0445\u0430\u0433\u0432\u0430_\u041F\u04AF\u0440\u044D\u0432_\u0411\u0430\u0430\u0441\u0430\u043D_\u0411\u044F\u043C\u0431\u0430".split("_"),weekdaysShort:"\u041D\u044F\u043C_\u0414\u0430\u0432_\u041C\u044F\u0433_\u041B\u0445\u0430_\u041F\u04AF\u0440_\u0411\u0430\u0430_\u0411\u044F\u043C".split("_"),weekdaysMin:"\u041D\u044F_\u0414\u0430_\u041C\u044F_\u041B\u0445_\u041F\u04AF_\u0411\u0430_\u0411\u044F".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY \u043E\u043D\u044B MMMM\u044B\u043D D",LLL:"YYYY \u043E\u043D\u044B MMMM\u044B\u043D D HH:mm",LLLL:"dddd, YYYY \u043E\u043D\u044B MMMM\u044B\u043D D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(i){return i==="\u04AE\u0425"},meridiem:function(i,o,u){return i<12?"\u04AE\u04E8":"\u04AE\u0425"},calendar:{sameDay:"[\u04E8\u043D\u04E9\u04E9\u0434\u04E9\u0440] LT",nextDay:"[\u041C\u0430\u0440\u0433\u0430\u0430\u0448] LT",nextWeek:"[\u0418\u0440\u044D\u0445] dddd LT",lastDay:"[\u04E8\u0447\u0438\u0433\u0434\u04E9\u0440] LT",lastWeek:"[\u04E8\u043D\u0433\u04E9\u0440\u0441\u04E9\u043D] dddd LT",sameElse:"L"},relativeTime:{future:"%s \u0434\u0430\u0440\u0430\u0430",past:"%s \u04E9\u043C\u043D\u04E9",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(i,o){switch(o){case"d":case"D":case"DDD":return i+" \u04E9\u0434\u04E9\u0440";default:return i}}});return a})},10370:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096A",5:"\u096B",6:"\u096C",7:"\u096D",8:"\u096E",9:"\u096F",0:"\u0966"},a={"\u0967":"1","\u0968":"2","\u0969":"3","\u096A":"4","\u096B":"5","\u096C":"6","\u096D":"7","\u096E":"8","\u096F":"9","\u0966":"0"};function i(u,c,l,d){var p="";if(c)switch(l){case"s":p="\u0915\u093E\u0939\u0940 \u0938\u0947\u0915\u0902\u0926";break;case"ss":p="%d \u0938\u0947\u0915\u0902\u0926";break;case"m":p="\u090F\u0915 \u092E\u093F\u0928\u093F\u091F";break;case"mm":p="%d \u092E\u093F\u0928\u093F\u091F\u0947";break;case"h":p="\u090F\u0915 \u0924\u093E\u0938";break;case"hh":p="%d \u0924\u093E\u0938";break;case"d":p="\u090F\u0915 \u0926\u093F\u0935\u0938";break;case"dd":p="%d \u0926\u093F\u0935\u0938";break;case"M":p="\u090F\u0915 \u092E\u0939\u093F\u0928\u093E";break;case"MM":p="%d \u092E\u0939\u093F\u0928\u0947";break;case"y":p="\u090F\u0915 \u0935\u0930\u094D\u0937";break;case"yy":p="%d \u0935\u0930\u094D\u0937\u0947";break}else switch(l){case"s":p="\u0915\u093E\u0939\u0940 \u0938\u0947\u0915\u0902\u0926\u093E\u0902";break;case"ss":p="%d \u0938\u0947\u0915\u0902\u0926\u093E\u0902";break;case"m":p="\u090F\u0915\u093E \u092E\u093F\u0928\u093F\u091F\u093E";break;case"mm":p="%d \u092E\u093F\u0928\u093F\u091F\u093E\u0902";break;case"h":p="\u090F\u0915\u093E \u0924\u093E\u0938\u093E";break;case"hh":p="%d \u0924\u093E\u0938\u093E\u0902";break;case"d":p="\u090F\u0915\u093E \u0926\u093F\u0935\u0938\u093E";break;case"dd":p="%d \u0926\u093F\u0935\u0938\u093E\u0902";break;case"M":p="\u090F\u0915\u093E \u092E\u0939\u093F\u0928\u094D\u092F\u093E";break;case"MM":p="%d \u092E\u0939\u093F\u0928\u094D\u092F\u093E\u0902";break;case"y":p="\u090F\u0915\u093E \u0935\u0930\u094D\u0937\u093E";break;case"yy":p="%d \u0935\u0930\u094D\u0937\u093E\u0902";break}return p.replace(/%d/i,u)}var o=r.defineLocale("mr",{months:"\u091C\u093E\u0928\u0947\u0935\u093E\u0930\u0940_\u092B\u0947\u092C\u094D\u0930\u0941\u0935\u093E\u0930\u0940_\u092E\u093E\u0930\u094D\u091A_\u090F\u092A\u094D\u0930\u093F\u0932_\u092E\u0947_\u091C\u0942\u0928_\u091C\u0941\u0932\u0948_\u0911\u0917\u0938\u094D\u091F_\u0938\u092A\u094D\u091F\u0947\u0902\u092C\u0930_\u0911\u0915\u094D\u091F\u094B\u092C\u0930_\u0928\u094B\u0935\u094D\u0939\u0947\u0902\u092C\u0930_\u0921\u093F\u0938\u0947\u0902\u092C\u0930".split("_"),monthsShort:"\u091C\u093E\u0928\u0947._\u092B\u0947\u092C\u094D\u0930\u0941._\u092E\u093E\u0930\u094D\u091A._\u090F\u092A\u094D\u0930\u093F._\u092E\u0947._\u091C\u0942\u0928._\u091C\u0941\u0932\u0948._\u0911\u0917._\u0938\u092A\u094D\u091F\u0947\u0902._\u0911\u0915\u094D\u091F\u094B._\u0928\u094B\u0935\u094D\u0939\u0947\u0902._\u0921\u093F\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0930\u0935\u093F\u0935\u093E\u0930_\u0938\u094B\u092E\u0935\u093E\u0930_\u092E\u0902\u0917\u0933\u0935\u093E\u0930_\u092C\u0941\u0927\u0935\u093E\u0930_\u0917\u0941\u0930\u0942\u0935\u093E\u0930_\u0936\u0941\u0915\u094D\u0930\u0935\u093E\u0930_\u0936\u0928\u093F\u0935\u093E\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093F_\u0938\u094B\u092E_\u092E\u0902\u0917\u0933_\u092C\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094D\u0930_\u0936\u0928\u093F".split("_"),weekdaysMin:"\u0930_\u0938\u094B_\u092E\u0902_\u092C\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u0935\u093E\u091C\u0924\u093E",LTS:"A h:mm:ss \u0935\u093E\u091C\u0924\u093E",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0935\u093E\u091C\u0924\u093E",LLLL:"dddd, D MMMM YYYY, A h:mm \u0935\u093E\u091C\u0924\u093E"},calendar:{sameDay:"[\u0906\u091C] LT",nextDay:"[\u0909\u0926\u094D\u092F\u093E] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u093E\u0932] LT",lastWeek:"[\u092E\u093E\u0917\u0940\u0932] dddd, LT",sameElse:"L"},relativeTime:{future:"%s\u092E\u0927\u094D\u092F\u0947",past:"%s\u092A\u0942\u0930\u094D\u0935\u0940",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},preparse:function(u){return u.replace(/[१२३४५६७८९०]/g,function(c){return a[c]})},postformat:function(u){return u.replace(/\d/g,function(c){return t[c]})},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(u,c){if(u===12&&(u=0),c==="\u092A\u0939\u093E\u091F\u0947"||c==="\u0938\u0915\u093E\u0933\u0940")return u;if(c==="\u0926\u0941\u092A\u093E\u0930\u0940"||c==="\u0938\u093E\u092F\u0902\u0915\u093E\u0933\u0940"||c==="\u0930\u093E\u0924\u094D\u0930\u0940")return u>=12?u:u+12},meridiem:function(u,c,l){return u>=0&&u<6?"\u092A\u0939\u093E\u091F\u0947":u<12?"\u0938\u0915\u093E\u0933\u0940":u<17?"\u0926\u0941\u092A\u093E\u0930\u0940":u<20?"\u0938\u093E\u092F\u0902\u0915\u093E\u0933\u0940":"\u0930\u093E\u0924\u094D\u0930\u0940"},week:{dow:0,doy:6}});return o})},41237:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(a,i){if(a===12&&(a=0),i==="pagi")return a;if(i==="tengahari")return a>=11?a:a+12;if(i==="petang"||i==="malam")return a+12},meridiem:function(a,i,o){return a<11?"pagi":a<15?"tengahari":a<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t})},9847:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(a,i){if(a===12&&(a=0),i==="pagi")return a;if(i==="tengahari")return a>=11?a:a+12;if(i==="petang"||i==="malam")return a+12},meridiem:function(a,i,o){return a<11?"pagi":a<15?"tengahari":a<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t})},72126:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_\u0120unju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Di\u010Bembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_\u0120un_Lul_Aww_Set_Ott_Nov_Di\u010B".split("_"),weekdays:"Il-\u0126add_It-Tnejn_It-Tlieta_L-Erbg\u0127a_Il-\u0126amis_Il-\u0120img\u0127a_Is-Sibt".split("_"),weekdaysShort:"\u0126ad_Tne_Tli_Erb_\u0126am_\u0120im_Sib".split("_"),weekdaysMin:"\u0126a_Tn_Tl_Er_\u0126a_\u0120i_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[G\u0127ada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-biera\u0127 fil-]LT",lastWeek:"dddd [li g\u0127adda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f\u2019 %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"sieg\u0127a",hh:"%d sieg\u0127at",d:"\u0121urnata",dd:"%d \u0121ranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%d\xBA",week:{dow:1,doy:4}});return t})},56165:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u1041",2:"\u1042",3:"\u1043",4:"\u1044",5:"\u1045",6:"\u1046",7:"\u1047",8:"\u1048",9:"\u1049",0:"\u1040"},a={"\u1041":"1","\u1042":"2","\u1043":"3","\u1044":"4","\u1045":"5","\u1046":"6","\u1047":"7","\u1048":"8","\u1049":"9","\u1040":"0"},i=r.defineLocale("my",{months:"\u1007\u1014\u103A\u1014\u101D\u102B\u101B\u102E_\u1016\u1031\u1016\u1031\u102C\u103A\u101D\u102B\u101B\u102E_\u1019\u1010\u103A_\u1027\u1015\u103C\u102E_\u1019\u1031_\u1007\u103D\u1014\u103A_\u1007\u1030\u101C\u102D\u102F\u1004\u103A_\u101E\u103C\u1002\u102F\u1010\u103A_\u1005\u1000\u103A\u1010\u1004\u103A\u1018\u102C_\u1021\u1031\u102C\u1000\u103A\u1010\u102D\u102F\u1018\u102C_\u1014\u102D\u102F\u101D\u1004\u103A\u1018\u102C_\u1012\u102E\u1007\u1004\u103A\u1018\u102C".split("_"),monthsShort:"\u1007\u1014\u103A_\u1016\u1031_\u1019\u1010\u103A_\u1015\u103C\u102E_\u1019\u1031_\u1007\u103D\u1014\u103A_\u101C\u102D\u102F\u1004\u103A_\u101E\u103C_\u1005\u1000\u103A_\u1021\u1031\u102C\u1000\u103A_\u1014\u102D\u102F_\u1012\u102E".split("_"),weekdays:"\u1010\u1014\u1004\u103A\u1039\u1002\u1014\u103D\u1031_\u1010\u1014\u1004\u103A\u1039\u101C\u102C_\u1021\u1004\u103A\u1039\u1002\u102B_\u1017\u102F\u1012\u1039\u1013\u101F\u1030\u1038_\u1000\u103C\u102C\u101E\u1015\u1010\u1031\u1038_\u101E\u1031\u102C\u1000\u103C\u102C_\u1005\u1014\u1031".split("_"),weekdaysShort:"\u1014\u103D\u1031_\u101C\u102C_\u1002\u102B_\u101F\u1030\u1038_\u1000\u103C\u102C_\u101E\u1031\u102C_\u1014\u1031".split("_"),weekdaysMin:"\u1014\u103D\u1031_\u101C\u102C_\u1002\u102B_\u101F\u1030\u1038_\u1000\u103C\u102C_\u101E\u1031\u102C_\u1014\u1031".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u101A\u1014\u1031.] LT [\u1019\u103E\u102C]",nextDay:"[\u1019\u1014\u1000\u103A\u1016\u103C\u1014\u103A] LT [\u1019\u103E\u102C]",nextWeek:"dddd LT [\u1019\u103E\u102C]",lastDay:"[\u1019\u1014\u1031.\u1000] LT [\u1019\u103E\u102C]",lastWeek:"[\u1015\u103C\u102E\u1038\u1001\u1032\u1037\u101E\u1031\u102C] dddd LT [\u1019\u103E\u102C]",sameElse:"L"},relativeTime:{future:"\u101C\u102C\u1019\u100A\u103A\u1037 %s \u1019\u103E\u102C",past:"\u101C\u103D\u1014\u103A\u1001\u1032\u1037\u101E\u1031\u102C %s \u1000",s:"\u1005\u1000\u1039\u1000\u1014\u103A.\u1021\u1014\u100A\u103A\u1038\u1004\u101A\u103A",ss:"%d \u1005\u1000\u1039\u1000\u1014\u1037\u103A",m:"\u1010\u1005\u103A\u1019\u102D\u1014\u1005\u103A",mm:"%d \u1019\u102D\u1014\u1005\u103A",h:"\u1010\u1005\u103A\u1014\u102C\u101B\u102E",hh:"%d \u1014\u102C\u101B\u102E",d:"\u1010\u1005\u103A\u101B\u1000\u103A",dd:"%d \u101B\u1000\u103A",M:"\u1010\u1005\u103A\u101C",MM:"%d \u101C",y:"\u1010\u1005\u103A\u1014\u103E\u1005\u103A",yy:"%d \u1014\u103E\u1005\u103A"},preparse:function(o){return o.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(u){return a[u]})},postformat:function(o){return o.replace(/\d/g,function(u){return t[u]})},week:{dow:1,doy:4}});return i})},64924:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"s\xF8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xF8rdag".split("_"),weekdaysShort:"s\xF8._ma._ti._on._to._fr._l\xF8.".split("_"),weekdaysMin:"s\xF8_ma_ti_on_to_fr_l\xF8".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i g\xE5r kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",w:"en uke",ww:"%d uker",M:"en m\xE5ned",MM:"%d m\xE5neder",y:"ett \xE5r",yy:"%d \xE5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t})},16744:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096A",5:"\u096B",6:"\u096C",7:"\u096D",8:"\u096E",9:"\u096F",0:"\u0966"},a={"\u0967":"1","\u0968":"2","\u0969":"3","\u096A":"4","\u096B":"5","\u096C":"6","\u096D":"7","\u096E":"8","\u096F":"9","\u0966":"0"},i=r.defineLocale("ne",{months:"\u091C\u0928\u0935\u0930\u0940_\u092B\u0947\u092C\u094D\u0930\u0941\u0935\u0930\u0940_\u092E\u093E\u0930\u094D\u091A_\u0905\u092A\u094D\u0930\u093F\u0932_\u092E\u0908_\u091C\u0941\u0928_\u091C\u0941\u0932\u093E\u0908_\u0905\u0917\u0937\u094D\u091F_\u0938\u0947\u092A\u094D\u091F\u0947\u092E\u094D\u092C\u0930_\u0905\u0915\u094D\u091F\u094B\u092C\u0930_\u0928\u094B\u092D\u0947\u092E\u094D\u092C\u0930_\u0921\u093F\u0938\u0947\u092E\u094D\u092C\u0930".split("_"),monthsShort:"\u091C\u0928._\u092B\u0947\u092C\u094D\u0930\u0941._\u092E\u093E\u0930\u094D\u091A_\u0905\u092A\u094D\u0930\u093F._\u092E\u0908_\u091C\u0941\u0928_\u091C\u0941\u0932\u093E\u0908._\u0905\u0917._\u0938\u0947\u092A\u094D\u091F._\u0905\u0915\u094D\u091F\u094B._\u0928\u094B\u092D\u0947._\u0921\u093F\u0938\u0947.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u0907\u0924\u092C\u093E\u0930_\u0938\u094B\u092E\u092C\u093E\u0930_\u092E\u0919\u094D\u0917\u0932\u092C\u093E\u0930_\u092C\u0941\u0927\u092C\u093E\u0930_\u092C\u093F\u0939\u093F\u092C\u093E\u0930_\u0936\u0941\u0915\u094D\u0930\u092C\u093E\u0930_\u0936\u0928\u093F\u092C\u093E\u0930".split("_"),weekdaysShort:"\u0906\u0907\u0924._\u0938\u094B\u092E._\u092E\u0919\u094D\u0917\u0932._\u092C\u0941\u0927._\u092C\u093F\u0939\u093F._\u0936\u0941\u0915\u094D\u0930._\u0936\u0928\u093F.".split("_"),weekdaysMin:"\u0906._\u0938\u094B._\u092E\u0902._\u092C\u0941._\u092C\u093F._\u0936\u0941._\u0936.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A\u0915\u094B h:mm \u092C\u091C\u0947",LTS:"A\u0915\u094B h:mm:ss \u092C\u091C\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A\u0915\u094B h:mm \u092C\u091C\u0947",LLLL:"dddd, D MMMM YYYY, A\u0915\u094B h:mm \u092C\u091C\u0947"},preparse:function(o){return o.replace(/[१२३४५६७८९०]/g,function(u){return a[u]})},postformat:function(o){return o.replace(/\d/g,function(u){return t[u]})},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(o,u){if(o===12&&(o=0),u==="\u0930\u093E\u0924\u093F")return o<4?o:o+12;if(u==="\u092C\u093F\u0939\u093E\u0928")return o;if(u==="\u0926\u093F\u0909\u0901\u0938\u094B")return o>=10?o:o+12;if(u==="\u0938\u093E\u0901\u091D")return o+12},meridiem:function(o,u,c){return o<3?"\u0930\u093E\u0924\u093F":o<12?"\u092C\u093F\u0939\u093E\u0928":o<16?"\u0926\u093F\u0909\u0901\u0938\u094B":o<20?"\u0938\u093E\u0901\u091D":"\u0930\u093E\u0924\u093F"},calendar:{sameDay:"[\u0906\u091C] LT",nextDay:"[\u092D\u094B\u0932\u093F] LT",nextWeek:"[\u0906\u0909\u0901\u0926\u094B] dddd[,] LT",lastDay:"[\u0939\u093F\u091C\u094B] LT",lastWeek:"[\u0917\u090F\u0915\u094B] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s\u092E\u093E",past:"%s \u0905\u0917\u093E\u0921\u093F",s:"\u0915\u0947\u0939\u0940 \u0915\u094D\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0947\u0923\u094D\u0921",m:"\u090F\u0915 \u092E\u093F\u0928\u0947\u091F",mm:"%d \u092E\u093F\u0928\u0947\u091F",h:"\u090F\u0915 \u0918\u0923\u094D\u091F\u093E",hh:"%d \u0918\u0923\u094D\u091F\u093E",d:"\u090F\u0915 \u0926\u093F\u0928",dd:"%d \u0926\u093F\u0928",M:"\u090F\u0915 \u092E\u0939\u093F\u0928\u093E",MM:"%d \u092E\u0939\u093F\u0928\u093E",y:"\u090F\u0915 \u092C\u0930\u094D\u0937",yy:"%d \u092C\u0930\u094D\u0937"},week:{dow:0,doy:6}});return i})},59814:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),a="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),i=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],o=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,u=r.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(c,l){return c?/-MMM-/.test(l)?a[c.month()]:t[c.month()]:t},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xE9\xE9n minuut",mm:"%d minuten",h:"\xE9\xE9n uur",hh:"%d uur",d:"\xE9\xE9n dag",dd:"%d dagen",M:"\xE9\xE9n maand",MM:"%d maanden",y:"\xE9\xE9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(c){return c+(c===1||c===8||c>=20?"ste":"de")},week:{dow:1,doy:4}});return u})},93901:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),a="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),i=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],o=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,u=r.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(c,l){return c?/-MMM-/.test(l)?a[c.month()]:t[c.month()]:t},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xE9\xE9n minuut",mm:"%d minuten",h:"\xE9\xE9n uur",hh:"%d uur",d:"\xE9\xE9n dag",dd:"%d dagen",w:"\xE9\xE9n week",ww:"%d weken",M:"\xE9\xE9n maand",MM:"%d maanden",y:"\xE9\xE9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(c){return c+(c===1||c===8||c>=20?"ste":"de")},week:{dow:1,doy:4}});return u})},83877:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_m\xE5ndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._m\xE5._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_m\xE5_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I g\xE5r klokka] LT",lastWeek:"[F\xF8reg\xE5ande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein m\xE5nad",MM:"%d m\xE5nader",y:"eit \xE5r",yy:"%d \xE5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t})},92135:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("oc-lnc",{months:{standalone:"geni\xE8r_febri\xE8r_mar\xE7_abril_mai_junh_julhet_agost_setembre_oct\xF2bre_novembre_decembre".split("_"),format:"de geni\xE8r_de febri\xE8r_de mar\xE7_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'oct\xF2bre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._mar\xE7_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dim\xE8cres_dij\xF2us_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[u\xE8i a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[i\xE8r a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aqu\xED %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(a,i){var o=a===1?"r":a===2?"n":a===3?"r":a===4?"t":"\xE8";return(i==="w"||i==="W")&&(o="a"),a+o},week:{dow:1,doy:4}});return t})},15858:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u0A67",2:"\u0A68",3:"\u0A69",4:"\u0A6A",5:"\u0A6B",6:"\u0A6C",7:"\u0A6D",8:"\u0A6E",9:"\u0A6F",0:"\u0A66"},a={"\u0A67":"1","\u0A68":"2","\u0A69":"3","\u0A6A":"4","\u0A6B":"5","\u0A6C":"6","\u0A6D":"7","\u0A6E":"8","\u0A6F":"9","\u0A66":"0"},i=r.defineLocale("pa-in",{months:"\u0A1C\u0A28\u0A35\u0A30\u0A40_\u0A2B\u0A3C\u0A30\u0A35\u0A30\u0A40_\u0A2E\u0A3E\u0A30\u0A1A_\u0A05\u0A2A\u0A4D\u0A30\u0A48\u0A32_\u0A2E\u0A08_\u0A1C\u0A42\u0A28_\u0A1C\u0A41\u0A32\u0A3E\u0A08_\u0A05\u0A17\u0A38\u0A24_\u0A38\u0A24\u0A70\u0A2C\u0A30_\u0A05\u0A15\u0A24\u0A42\u0A2C\u0A30_\u0A28\u0A35\u0A70\u0A2C\u0A30_\u0A26\u0A38\u0A70\u0A2C\u0A30".split("_"),monthsShort:"\u0A1C\u0A28\u0A35\u0A30\u0A40_\u0A2B\u0A3C\u0A30\u0A35\u0A30\u0A40_\u0A2E\u0A3E\u0A30\u0A1A_\u0A05\u0A2A\u0A4D\u0A30\u0A48\u0A32_\u0A2E\u0A08_\u0A1C\u0A42\u0A28_\u0A1C\u0A41\u0A32\u0A3E\u0A08_\u0A05\u0A17\u0A38\u0A24_\u0A38\u0A24\u0A70\u0A2C\u0A30_\u0A05\u0A15\u0A24\u0A42\u0A2C\u0A30_\u0A28\u0A35\u0A70\u0A2C\u0A30_\u0A26\u0A38\u0A70\u0A2C\u0A30".split("_"),weekdays:"\u0A10\u0A24\u0A35\u0A3E\u0A30_\u0A38\u0A4B\u0A2E\u0A35\u0A3E\u0A30_\u0A2E\u0A70\u0A17\u0A32\u0A35\u0A3E\u0A30_\u0A2C\u0A41\u0A27\u0A35\u0A3E\u0A30_\u0A35\u0A40\u0A30\u0A35\u0A3E\u0A30_\u0A38\u0A3C\u0A41\u0A71\u0A15\u0A30\u0A35\u0A3E\u0A30_\u0A38\u0A3C\u0A28\u0A40\u0A1A\u0A30\u0A35\u0A3E\u0A30".split("_"),weekdaysShort:"\u0A10\u0A24_\u0A38\u0A4B\u0A2E_\u0A2E\u0A70\u0A17\u0A32_\u0A2C\u0A41\u0A27_\u0A35\u0A40\u0A30_\u0A38\u0A3C\u0A41\u0A15\u0A30_\u0A38\u0A3C\u0A28\u0A40".split("_"),weekdaysMin:"\u0A10\u0A24_\u0A38\u0A4B\u0A2E_\u0A2E\u0A70\u0A17\u0A32_\u0A2C\u0A41\u0A27_\u0A35\u0A40\u0A30_\u0A38\u0A3C\u0A41\u0A15\u0A30_\u0A38\u0A3C\u0A28\u0A40".split("_"),longDateFormat:{LT:"A h:mm \u0A35\u0A1C\u0A47",LTS:"A h:mm:ss \u0A35\u0A1C\u0A47",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0A35\u0A1C\u0A47",LLLL:"dddd, D MMMM YYYY, A h:mm \u0A35\u0A1C\u0A47"},calendar:{sameDay:"[\u0A05\u0A1C] LT",nextDay:"[\u0A15\u0A32] LT",nextWeek:"[\u0A05\u0A17\u0A32\u0A3E] dddd, LT",lastDay:"[\u0A15\u0A32] LT",lastWeek:"[\u0A2A\u0A3F\u0A1B\u0A32\u0A47] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0A35\u0A3F\u0A71\u0A1A",past:"%s \u0A2A\u0A3F\u0A1B\u0A32\u0A47",s:"\u0A15\u0A41\u0A1D \u0A38\u0A15\u0A3F\u0A70\u0A1F",ss:"%d \u0A38\u0A15\u0A3F\u0A70\u0A1F",m:"\u0A07\u0A15 \u0A2E\u0A3F\u0A70\u0A1F",mm:"%d \u0A2E\u0A3F\u0A70\u0A1F",h:"\u0A07\u0A71\u0A15 \u0A18\u0A70\u0A1F\u0A3E",hh:"%d \u0A18\u0A70\u0A1F\u0A47",d:"\u0A07\u0A71\u0A15 \u0A26\u0A3F\u0A28",dd:"%d \u0A26\u0A3F\u0A28",M:"\u0A07\u0A71\u0A15 \u0A2E\u0A39\u0A40\u0A28\u0A3E",MM:"%d \u0A2E\u0A39\u0A40\u0A28\u0A47",y:"\u0A07\u0A71\u0A15 \u0A38\u0A3E\u0A32",yy:"%d \u0A38\u0A3E\u0A32"},preparse:function(o){return o.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,function(u){return a[u]})},postformat:function(o){return o.replace(/\d/g,function(u){return t[u]})},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(o,u){if(o===12&&(o=0),u==="\u0A30\u0A3E\u0A24")return o<4?o:o+12;if(u==="\u0A38\u0A35\u0A47\u0A30")return o;if(u==="\u0A26\u0A41\u0A2A\u0A39\u0A3F\u0A30")return o>=10?o:o+12;if(u==="\u0A38\u0A3C\u0A3E\u0A2E")return o+12},meridiem:function(o,u,c){return o<4?"\u0A30\u0A3E\u0A24":o<10?"\u0A38\u0A35\u0A47\u0A30":o<17?"\u0A26\u0A41\u0A2A\u0A39\u0A3F\u0A30":o<20?"\u0A38\u0A3C\u0A3E\u0A2E":"\u0A30\u0A3E\u0A24"},week:{dow:0,doy:6}});return i})},64495:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t="stycze\u0144_luty_marzec_kwiecie\u0144_maj_czerwiec_lipiec_sierpie\u0144_wrzesie\u0144_pa\u017Adziernik_listopad_grudzie\u0144".split("_"),a="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrze\u015Bnia_pa\u017Adziernika_listopada_grudnia".split("_"),i=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function o(l){return l%10<5&&l%10>1&&~~(l/10)%10!==1}function u(l,d,p){var M=l+" ";switch(p){case"ss":return M+(o(l)?"sekundy":"sekund");case"m":return d?"minuta":"minut\u0119";case"mm":return M+(o(l)?"minuty":"minut");case"h":return d?"godzina":"godzin\u0119";case"hh":return M+(o(l)?"godziny":"godzin");case"ww":return M+(o(l)?"tygodnie":"tygodni");case"MM":return M+(o(l)?"miesi\u0105ce":"miesi\u0119cy");case"yy":return M+(o(l)?"lata":"lat")}}var c=r.defineLocale("pl",{months:function(l,d){return l?/D MMMM/.test(d)?a[l.month()]:t[l.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_pa\u017A_lis_gru".split("_"),monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"niedziela_poniedzia\u0142ek_wtorek_\u015Broda_czwartek_pi\u0105tek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_\u015Br_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_\u015Ar_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dzi\u015B o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedziel\u0119 o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W \u015Brod\u0119 o] LT";case 6:return"[W sobot\u0119 o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zesz\u0142\u0105 niedziel\u0119 o] LT";case 3:return"[W zesz\u0142\u0105 \u015Brod\u0119 o] LT";case 6:return"[W zesz\u0142\u0105 sobot\u0119 o] LT";default:return"[W zesz\u0142y] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:u,m:u,mm:u,h:u,hh:u,d:"1 dzie\u0144",dd:"%d dni",w:"tydzie\u0144",ww:u,M:"miesi\u0105c",MM:u,y:"rok",yy:u},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return c})},57971:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("pt-br",{months:"janeiro_fevereiro_mar\xE7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_ter\xE7a-feira_quarta-feira_quinta-feira_sexta-feira_s\xE1bado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_s\xE1b".split("_"),weekdaysMin:"do_2\xAA_3\xAA_4\xAA_5\xAA_6\xAA_s\xE1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [\xE0s] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [\xE0s] HH:mm"},calendar:{sameDay:"[Hoje \xE0s] LT",nextDay:"[Amanh\xE3 \xE0s] LT",nextWeek:"dddd [\xE0s] LT",lastDay:"[Ontem \xE0s] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[\xDAltimo] dddd [\xE0s] LT":"[\xDAltima] dddd [\xE0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xE1 %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um m\xEAs",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%d\xBA",invalidDate:"Data inv\xE1lida"});return t})},89520:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("pt",{months:"janeiro_fevereiro_mar\xE7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Ter\xE7a-feira_Quarta-feira_Quinta-feira_Sexta-feira_S\xE1bado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_S\xE1b".split("_"),weekdaysMin:"Do_2\xAA_3\xAA_4\xAA_5\xAA_6\xAA_S\xE1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje \xE0s] LT",nextDay:"[Amanh\xE3 \xE0s] LT",nextWeek:"dddd [\xE0s] LT",lastDay:"[Ontem \xE0s] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[\xDAltimo] dddd [\xE0s] LT":"[\xDAltima] dddd [\xE0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xE1 %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um m\xEAs",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%d\xBA",week:{dow:1,doy:4}});return t})},96459:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(i,o,u){var c={ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"s\u0103pt\u0103m\xE2ni",MM:"luni",yy:"ani"},l=" ";return(i%100>=20||i>=100&&i%100===0)&&(l=" de "),i+l+c[u]}var a=r.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminic\u0103_luni_mar\u021Bi_miercuri_joi_vineri_s\xE2mb\u0103t\u0103".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_S\xE2m".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_S\xE2".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[m\xE2ine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s \xEEn urm\u0103",s:"c\xE2teva secunde",ss:t,m:"un minut",mm:t,h:"o or\u0103",hh:t,d:"o zi",dd:t,w:"o s\u0103pt\u0103m\xE2n\u0103",ww:t,M:"o lun\u0103",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}});return a})},21793:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(u,c){var l=u.split("_");return c%10===1&&c%100!==11?l[0]:c%10>=2&&c%10<=4&&(c%100<10||c%100>=20)?l[1]:l[2]}function a(u,c,l){var d={ss:c?"\u0441\u0435\u043A\u0443\u043D\u0434\u0430_\u0441\u0435\u043A\u0443\u043D\u0434\u044B_\u0441\u0435\u043A\u0443\u043D\u0434":"\u0441\u0435\u043A\u0443\u043D\u0434\u0443_\u0441\u0435\u043A\u0443\u043D\u0434\u044B_\u0441\u0435\u043A\u0443\u043D\u0434",mm:c?"\u043C\u0438\u043D\u0443\u0442\u0430_\u043C\u0438\u043D\u0443\u0442\u044B_\u043C\u0438\u043D\u0443\u0442":"\u043C\u0438\u043D\u0443\u0442\u0443_\u043C\u0438\u043D\u0443\u0442\u044B_\u043C\u0438\u043D\u0443\u0442",hh:"\u0447\u0430\u0441_\u0447\u0430\u0441\u0430_\u0447\u0430\u0441\u043E\u0432",dd:"\u0434\u0435\u043D\u044C_\u0434\u043D\u044F_\u0434\u043D\u0435\u0439",ww:"\u043D\u0435\u0434\u0435\u043B\u044F_\u043D\u0435\u0434\u0435\u043B\u0438_\u043D\u0435\u0434\u0435\u043B\u044C",MM:"\u043C\u0435\u0441\u044F\u0446_\u043C\u0435\u0441\u044F\u0446\u0430_\u043C\u0435\u0441\u044F\u0446\u0435\u0432",yy:"\u0433\u043E\u0434_\u0433\u043E\u0434\u0430_\u043B\u0435\u0442"};return l==="m"?c?"\u043C\u0438\u043D\u0443\u0442\u0430":"\u043C\u0438\u043D\u0443\u0442\u0443":u+" "+t(d[l],+u)}var i=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],o=r.defineLocale("ru",{months:{format:"\u044F\u043D\u0432\u0430\u0440\u044F_\u0444\u0435\u0432\u0440\u0430\u043B\u044F_\u043C\u0430\u0440\u0442\u0430_\u0430\u043F\u0440\u0435\u043B\u044F_\u043C\u0430\u044F_\u0438\u044E\u043D\u044F_\u0438\u044E\u043B\u044F_\u0430\u0432\u0433\u0443\u0441\u0442\u0430_\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F_\u043E\u043A\u0442\u044F\u0431\u0440\u044F_\u043D\u043E\u044F\u0431\u0440\u044F_\u0434\u0435\u043A\u0430\u0431\u0440\u044F".split("_"),standalone:"\u044F\u043D\u0432\u0430\u0440\u044C_\u0444\u0435\u0432\u0440\u0430\u043B\u044C_\u043C\u0430\u0440\u0442_\u0430\u043F\u0440\u0435\u043B\u044C_\u043C\u0430\u0439_\u0438\u044E\u043D\u044C_\u0438\u044E\u043B\u044C_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C_\u043E\u043A\u0442\u044F\u0431\u0440\u044C_\u043D\u043E\u044F\u0431\u0440\u044C_\u0434\u0435\u043A\u0430\u0431\u0440\u044C".split("_")},monthsShort:{format:"\u044F\u043D\u0432._\u0444\u0435\u0432\u0440._\u043C\u0430\u0440._\u0430\u043F\u0440._\u043C\u0430\u044F_\u0438\u044E\u043D\u044F_\u0438\u044E\u043B\u044F_\u0430\u0432\u0433._\u0441\u0435\u043D\u0442._\u043E\u043A\u0442._\u043D\u043E\u044F\u0431._\u0434\u0435\u043A.".split("_"),standalone:"\u044F\u043D\u0432._\u0444\u0435\u0432\u0440._\u043C\u0430\u0440\u0442_\u0430\u043F\u0440._\u043C\u0430\u0439_\u0438\u044E\u043D\u044C_\u0438\u044E\u043B\u044C_\u0430\u0432\u0433._\u0441\u0435\u043D\u0442._\u043E\u043A\u0442._\u043D\u043E\u044F\u0431._\u0434\u0435\u043A.".split("_")},weekdays:{standalone:"\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435_\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A_\u0432\u0442\u043E\u0440\u043D\u0438\u043A_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043F\u044F\u0442\u043D\u0438\u0446\u0430_\u0441\u0443\u0431\u0431\u043E\u0442\u0430".split("_"),format:"\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435_\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A_\u0432\u0442\u043E\u0440\u043D\u0438\u043A_\u0441\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043F\u044F\u0442\u043D\u0438\u0446\u0443_\u0441\u0443\u0431\u0431\u043E\u0442\u0443".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"\u0432\u0441_\u043F\u043D_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043F\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u0432\u0441_\u043F\u043D_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043F\u0442_\u0441\u0431".split("_"),monthsParse:i,longMonthsParse:i,shortMonthsParse:i,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., H:mm",LLLL:"dddd, D MMMM YYYY \u0433., H:mm"},calendar:{sameDay:"[\u0421\u0435\u0433\u043E\u0434\u043D\u044F, \u0432] LT",nextDay:"[\u0417\u0430\u0432\u0442\u0440\u0430, \u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430, \u0432] LT",nextWeek:function(u){if(u.week()!==this.week())switch(this.day()){case 0:return"[\u0412 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E] dddd, [\u0432] LT"}else return this.day()===2?"[\u0412\u043E] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT"},lastWeek:function(u){if(u.week()!==this.week())switch(this.day()){case 0:return"[\u0412 \u043F\u0440\u043E\u0448\u043B\u043E\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u043F\u0440\u043E\u0448\u043B\u044B\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u043F\u0440\u043E\u0448\u043B\u0443\u044E] dddd, [\u0432] LT"}else return this.day()===2?"[\u0412\u043E] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT"},sameElse:"L"},relativeTime:{future:"\u0447\u0435\u0440\u0435\u0437 %s",past:"%s \u043D\u0430\u0437\u0430\u0434",s:"\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u043A\u0443\u043D\u0434",ss:a,m:a,mm:a,h:"\u0447\u0430\u0441",hh:a,d:"\u0434\u0435\u043D\u044C",dd:a,w:"\u043D\u0435\u0434\u0435\u043B\u044F",ww:a,M:"\u043C\u0435\u0441\u044F\u0446",MM:a,y:"\u0433\u043E\u0434",yy:a},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(u){return/^(дня|вечера)$/.test(u)},meridiem:function(u,c,l){return u<4?"\u043D\u043E\u0447\u0438":u<12?"\u0443\u0442\u0440\u0430":u<17?"\u0434\u043D\u044F":"\u0432\u0435\u0447\u0435\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(u,c){switch(c){case"M":case"d":case"DDD":return u+"-\u0439";case"D":return u+"-\u0433\u043E";case"w":case"W":return u+"-\u044F";default:return u}},week:{dow:1,doy:4}});return o})},40950:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=["\u062C\u0646\u0648\u0631\u064A","\u0641\u064A\u0628\u0631\u0648\u0631\u064A","\u0645\u0627\u0631\u0686","\u0627\u067E\u0631\u064A\u0644","\u0645\u0626\u064A","\u062C\u0648\u0646","\u062C\u0648\u0644\u0627\u0621\u0650","\u0622\u06AF\u0633\u067D","\u0633\u064A\u067E\u067D\u0645\u0628\u0631","\u0622\u06AA\u067D\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u068A\u0633\u0645\u0628\u0631"],a=["\u0622\u0686\u0631","\u0633\u0648\u0645\u0631","\u0627\u06B1\u0627\u0631\u0648","\u0627\u0631\u0628\u0639","\u062E\u0645\u064A\u0633","\u062C\u0645\u0639","\u0687\u0646\u0687\u0631"],i=r.defineLocale("sd",{months:t,monthsShort:t,weekdays:a,weekdaysShort:a,weekdaysMin:a,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060C D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(o){return o==="\u0634\u0627\u0645"},meridiem:function(o,u,c){return o<12?"\u0635\u0628\u062D":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0627\u0684] LT",nextDay:"[\u0633\u0680\u0627\u06BB\u064A] LT",nextWeek:"dddd [\u0627\u06B3\u064A\u0646 \u0647\u0641\u062A\u064A \u062A\u064A] LT",lastDay:"[\u06AA\u0627\u0644\u0647\u0647] LT",lastWeek:"[\u06AF\u0632\u0631\u064A\u0644 \u0647\u0641\u062A\u064A] dddd [\u062A\u064A] LT",sameElse:"L"},relativeTime:{future:"%s \u067E\u0648\u0621",past:"%s \u0627\u06B3",s:"\u0686\u0646\u062F \u0633\u064A\u06AA\u0646\u068A",ss:"%d \u0633\u064A\u06AA\u0646\u068A",m:"\u0647\u06AA \u0645\u0646\u067D",mm:"%d \u0645\u0646\u067D",h:"\u0647\u06AA \u06AA\u0644\u0627\u06AA",hh:"%d \u06AA\u0644\u0627\u06AA",d:"\u0647\u06AA \u068F\u064A\u0646\u0647\u0646",dd:"%d \u068F\u064A\u0646\u0647\u0646",M:"\u0647\u06AA \u0645\u0647\u064A\u0646\u0648",MM:"%d \u0645\u0647\u064A\u0646\u0627",y:"\u0647\u06AA \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(o){return o.replace(/،/g,",")},postformat:function(o){return o.replace(/,/g,"\u060C")},week:{dow:1,doy:4}});return i})},37930:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("se",{months:"o\u0111\u0111ajagem\xE1nnu_guovvam\xE1nnu_njuk\u010Dam\xE1nnu_cuo\u014Bom\xE1nnu_miessem\xE1nnu_geassem\xE1nnu_suoidnem\xE1nnu_borgem\xE1nnu_\u010Dak\u010Dam\xE1nnu_golggotm\xE1nnu_sk\xE1bmam\xE1nnu_juovlam\xE1nnu".split("_"),monthsShort:"o\u0111\u0111j_guov_njuk_cuo_mies_geas_suoi_borg_\u010Dak\u010D_golg_sk\xE1b_juov".split("_"),weekdays:"sotnabeaivi_vuoss\xE1rga_ma\u014B\u014Beb\xE1rga_gaskavahkku_duorastat_bearjadat_l\xE1vvardat".split("_"),weekdaysShort:"sotn_vuos_ma\u014B_gask_duor_bear_l\xE1v".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s gea\u017Ees",past:"ma\u014Bit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta m\xE1nnu",MM:"%d m\xE1nut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t})},90124:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("si",{months:"\u0DA2\u0DB1\u0DC0\u0DCF\u0DBB\u0DD2_\u0DB4\u0DD9\u0DB6\u0DBB\u0DC0\u0DCF\u0DBB\u0DD2_\u0DB8\u0DCF\u0DBB\u0DCA\u0DAD\u0DD4_\u0D85\u0DB4\u0DCA\u200D\u0DBB\u0DDA\u0DBD\u0DCA_\u0DB8\u0DD0\u0DBA\u0DD2_\u0DA2\u0DD6\u0DB1\u0DD2_\u0DA2\u0DD6\u0DBD\u0DD2_\u0D85\u0D9C\u0DDD\u0DC3\u0DCA\u0DAD\u0DD4_\u0DC3\u0DD0\u0DB4\u0DCA\u0DAD\u0DD0\u0DB8\u0DCA\u0DB6\u0DBB\u0DCA_\u0D94\u0D9A\u0DCA\u0DAD\u0DDD\u0DB6\u0DBB\u0DCA_\u0DB1\u0DDC\u0DC0\u0DD0\u0DB8\u0DCA\u0DB6\u0DBB\u0DCA_\u0DAF\u0DD9\u0DC3\u0DD0\u0DB8\u0DCA\u0DB6\u0DBB\u0DCA".split("_"),monthsShort:"\u0DA2\u0DB1_\u0DB4\u0DD9\u0DB6_\u0DB8\u0DCF\u0DBB\u0DCA_\u0D85\u0DB4\u0DCA_\u0DB8\u0DD0\u0DBA\u0DD2_\u0DA2\u0DD6\u0DB1\u0DD2_\u0DA2\u0DD6\u0DBD\u0DD2_\u0D85\u0D9C\u0DDD_\u0DC3\u0DD0\u0DB4\u0DCA_\u0D94\u0D9A\u0DCA_\u0DB1\u0DDC\u0DC0\u0DD0_\u0DAF\u0DD9\u0DC3\u0DD0".split("_"),weekdays:"\u0D89\u0DBB\u0DD2\u0DAF\u0DCF_\u0DC3\u0DB3\u0DD4\u0DAF\u0DCF_\u0D85\u0D9F\u0DC4\u0DBB\u0DD4\u0DC0\u0DCF\u0DAF\u0DCF_\u0DB6\u0DAF\u0DCF\u0DAF\u0DCF_\u0DB6\u0DCA\u200D\u0DBB\u0DC4\u0DC3\u0DCA\u0DB4\u0DAD\u0DD2\u0DB1\u0DCA\u0DAF\u0DCF_\u0DC3\u0DD2\u0D9A\u0DD4\u0DBB\u0DCF\u0DAF\u0DCF_\u0DC3\u0DD9\u0DB1\u0DC3\u0DD4\u0DBB\u0DCF\u0DAF\u0DCF".split("_"),weekdaysShort:"\u0D89\u0DBB\u0DD2_\u0DC3\u0DB3\u0DD4_\u0D85\u0D9F_\u0DB6\u0DAF\u0DCF_\u0DB6\u0DCA\u200D\u0DBB\u0DC4_\u0DC3\u0DD2\u0D9A\u0DD4_\u0DC3\u0DD9\u0DB1".split("_"),weekdaysMin:"\u0D89_\u0DC3_\u0D85_\u0DB6_\u0DB6\u0DCA\u200D\u0DBB_\u0DC3\u0DD2_\u0DC3\u0DD9".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [\u0DC0\u0DD0\u0DB1\u0DD2] dddd, a h:mm:ss"},calendar:{sameDay:"[\u0D85\u0DAF] LT[\u0DA7]",nextDay:"[\u0DC4\u0DD9\u0DA7] LT[\u0DA7]",nextWeek:"dddd LT[\u0DA7]",lastDay:"[\u0D8A\u0DBA\u0DDA] LT[\u0DA7]",lastWeek:"[\u0DB4\u0DC3\u0DD4\u0D9C\u0DD2\u0DBA] dddd LT[\u0DA7]",sameElse:"L"},relativeTime:{future:"%s\u0D9A\u0DD2\u0DB1\u0DCA",past:"%s\u0D9A\u0DA7 \u0DB4\u0DD9\u0DBB",s:"\u0DAD\u0DAD\u0DCA\u0DB4\u0DBB \u0D9A\u0DD2\u0DC4\u0DD2\u0DB4\u0DBA",ss:"\u0DAD\u0DAD\u0DCA\u0DB4\u0DBB %d",m:"\u0DB8\u0DD2\u0DB1\u0DD2\u0DAD\u0DCA\u0DAD\u0DD4\u0DC0",mm:"\u0DB8\u0DD2\u0DB1\u0DD2\u0DAD\u0DCA\u0DAD\u0DD4 %d",h:"\u0DB4\u0DD0\u0DBA",hh:"\u0DB4\u0DD0\u0DBA %d",d:"\u0DAF\u0DD2\u0DB1\u0DBA",dd:"\u0DAF\u0DD2\u0DB1 %d",M:"\u0DB8\u0DCF\u0DC3\u0DBA",MM:"\u0DB8\u0DCF\u0DC3 %d",y:"\u0DC0\u0DC3\u0DBB",yy:"\u0DC0\u0DC3\u0DBB %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(a){return a+" \u0DC0\u0DD0\u0DB1\u0DD2"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(a){return a==="\u0DB4.\u0DC0."||a==="\u0DB4\u0DC3\u0DCA \u0DC0\u0DBB\u0DD4"},meridiem:function(a,i,o){return a>11?o?"\u0DB4.\u0DC0.":"\u0DB4\u0DC3\u0DCA \u0DC0\u0DBB\u0DD4":o?"\u0DB4\u0DD9.\u0DC0.":"\u0DB4\u0DD9\u0DBB \u0DC0\u0DBB\u0DD4"}});return t})},64249:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t="janu\xE1r_febru\xE1r_marec_apr\xEDl_m\xE1j_j\xFAn_j\xFAl_august_september_okt\xF3ber_november_december".split("_"),a="jan_feb_mar_apr_m\xE1j_j\xFAn_j\xFAl_aug_sep_okt_nov_dec".split("_");function i(c){return c>1&&c<5}function o(c,l,d,p){var M=c+" ";switch(d){case"s":return l||p?"p\xE1r sek\xFAnd":"p\xE1r sekundami";case"ss":return l||p?M+(i(c)?"sekundy":"sek\xFAnd"):M+"sekundami";case"m":return l?"min\xFAta":p?"min\xFAtu":"min\xFAtou";case"mm":return l||p?M+(i(c)?"min\xFAty":"min\xFAt"):M+"min\xFAtami";case"h":return l?"hodina":p?"hodinu":"hodinou";case"hh":return l||p?M+(i(c)?"hodiny":"hod\xEDn"):M+"hodinami";case"d":return l||p?"de\u0148":"d\u0148om";case"dd":return l||p?M+(i(c)?"dni":"dn\xED"):M+"d\u0148ami";case"M":return l||p?"mesiac":"mesiacom";case"MM":return l||p?M+(i(c)?"mesiace":"mesiacov"):M+"mesiacmi";case"y":return l||p?"rok":"rokom";case"yy":return l||p?M+(i(c)?"roky":"rokov"):M+"rokmi"}}var u=r.defineLocale("sk",{months:t,monthsShort:a,weekdays:"nede\u013Ea_pondelok_utorok_streda_\u0161tvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_\u0161t_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_\u0161t_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nede\u013Eu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo \u0161tvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[v\u010Dera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minul\xFA nede\u013Eu o] LT";case 1:case 2:return"[minul\xFD] dddd [o] LT";case 3:return"[minul\xFA stredu o] LT";case 4:case 5:return"[minul\xFD] dddd [o] LT";case 6:return"[minul\xFA sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:o,ss:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return u})},14985:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(i,o,u,c){var l=i+" ";switch(u){case"s":return o||c?"nekaj sekund":"nekaj sekundami";case"ss":return i===1?l+=o?"sekundo":"sekundi":i===2?l+=o||c?"sekundi":"sekundah":i<5?l+=o||c?"sekunde":"sekundah":l+="sekund",l;case"m":return o?"ena minuta":"eno minuto";case"mm":return i===1?l+=o?"minuta":"minuto":i===2?l+=o||c?"minuti":"minutama":i<5?l+=o||c?"minute":"minutami":l+=o||c?"minut":"minutami",l;case"h":return o?"ena ura":"eno uro";case"hh":return i===1?l+=o?"ura":"uro":i===2?l+=o||c?"uri":"urama":i<5?l+=o||c?"ure":"urami":l+=o||c?"ur":"urami",l;case"d":return o||c?"en dan":"enim dnem";case"dd":return i===1?l+=o||c?"dan":"dnem":i===2?l+=o||c?"dni":"dnevoma":l+=o||c?"dni":"dnevi",l;case"M":return o||c?"en mesec":"enim mesecem";case"MM":return i===1?l+=o||c?"mesec":"mesecem":i===2?l+=o||c?"meseca":"mesecema":i<5?l+=o||c?"mesece":"meseci":l+=o||c?"mesecev":"meseci",l;case"y":return o||c?"eno leto":"enim letom";case"yy":return i===1?l+=o||c?"leto":"letom":i===2?l+=o||c?"leti":"letoma":i<5?l+=o||c?"leta":"leti":l+=o||c?"let":"leti",l}}var a=r.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_\u010Detrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._\u010Det._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_\u010De_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[v\u010Deraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prej\u0161njo] [nedeljo] [ob] LT";case 3:return"[prej\u0161njo] [sredo] [ob] LT";case 6:return"[prej\u0161njo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prej\u0161nji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"\u010Dez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return a})},51104:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_N\xEBntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_N\xEBn_Dhj".split("_"),weekdays:"E Diel_E H\xEBn\xEB_E Mart\xEB_E M\xEBrkur\xEB_E Enjte_E Premte_E Shtun\xEB".split("_"),weekdaysShort:"Die_H\xEBn_Mar_M\xEBr_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_M\xEB_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(a){return a.charAt(0)==="M"},meridiem:function(a,i,o){return a<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot n\xEB] LT",nextDay:"[Nes\xEBr n\xEB] LT",nextWeek:"dddd [n\xEB] LT",lastDay:"[Dje n\xEB] LT",lastWeek:"dddd [e kaluar n\xEB] LT",sameElse:"L"},relativeTime:{future:"n\xEB %s",past:"%s m\xEB par\xEB",s:"disa sekonda",ss:"%d sekonda",m:"nj\xEB minut\xEB",mm:"%d minuta",h:"nj\xEB or\xEB",hh:"%d or\xEB",d:"nj\xEB dit\xEB",dd:"%d dit\xEB",M:"nj\xEB muaj",MM:"%d muaj",y:"nj\xEB vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t})},79915:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={words:{ss:["\u0441\u0435\u043A\u0443\u043D\u0434\u0430","\u0441\u0435\u043A\u0443\u043D\u0434\u0435","\u0441\u0435\u043A\u0443\u043D\u0434\u0438"],m:["\u0458\u0435\u0434\u0430\u043D \u043C\u0438\u043D\u0443\u0442","\u0458\u0435\u0434\u043D\u043E\u0433 \u043C\u0438\u043D\u0443\u0442\u0430"],mm:["\u043C\u0438\u043D\u0443\u0442","\u043C\u0438\u043D\u0443\u0442\u0430","\u043C\u0438\u043D\u0443\u0442\u0430"],h:["\u0458\u0435\u0434\u0430\u043D \u0441\u0430\u0442","\u0458\u0435\u0434\u043D\u043E\u0433 \u0441\u0430\u0442\u0430"],hh:["\u0441\u0430\u0442","\u0441\u0430\u0442\u0430","\u0441\u0430\u0442\u0438"],d:["\u0458\u0435\u0434\u0430\u043D \u0434\u0430\u043D","\u0458\u0435\u0434\u043D\u043E\u0433 \u0434\u0430\u043D\u0430"],dd:["\u0434\u0430\u043D","\u0434\u0430\u043D\u0430","\u0434\u0430\u043D\u0430"],M:["\u0458\u0435\u0434\u0430\u043D \u043C\u0435\u0441\u0435\u0446","\u0458\u0435\u0434\u043D\u043E\u0433 \u043C\u0435\u0441\u0435\u0446\u0430"],MM:["\u043C\u0435\u0441\u0435\u0446","\u043C\u0435\u0441\u0435\u0446\u0430","\u043C\u0435\u0441\u0435\u0446\u0438"],y:["\u0458\u0435\u0434\u043D\u0443 \u0433\u043E\u0434\u0438\u043D\u0443","\u0458\u0435\u0434\u043D\u0435 \u0433\u043E\u0434\u0438\u043D\u0435"],yy:["\u0433\u043E\u0434\u0438\u043D\u0443","\u0433\u043E\u0434\u0438\u043D\u0435","\u0433\u043E\u0434\u0438\u043D\u0430"]},correctGrammaticalCase:function(i,o){return i%10>=1&&i%10<=4&&(i%100<10||i%100>=20)?i%10===1?o[0]:o[1]:o[2]},translate:function(i,o,u,c){var l=t.words[u],d;return u.length===1?u==="y"&&o?"\u0458\u0435\u0434\u043D\u0430 \u0433\u043E\u0434\u0438\u043D\u0430":c||o?l[0]:l[1]:(d=t.correctGrammaticalCase(i,l),u==="yy"&&o&&d==="\u0433\u043E\u0434\u0438\u043D\u0443"?i+" \u0433\u043E\u0434\u0438\u043D\u0430":i+" "+d)}},a=r.defineLocale("sr-cyrl",{months:"\u0458\u0430\u043D\u0443\u0430\u0440_\u0444\u0435\u0431\u0440\u0443\u0430\u0440_\u043C\u0430\u0440\u0442_\u0430\u043F\u0440\u0438\u043B_\u043C\u0430\u0458_\u0458\u0443\u043D_\u0458\u0443\u043B_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043F\u0442\u0435\u043C\u0431\u0430\u0440_\u043E\u043A\u0442\u043E\u0431\u0430\u0440_\u043D\u043E\u0432\u0435\u043C\u0431\u0430\u0440_\u0434\u0435\u0446\u0435\u043C\u0431\u0430\u0440".split("_"),monthsShort:"\u0458\u0430\u043D._\u0444\u0435\u0431._\u043C\u0430\u0440._\u0430\u043F\u0440._\u043C\u0430\u0458_\u0458\u0443\u043D_\u0458\u0443\u043B_\u0430\u0432\u0433._\u0441\u0435\u043F._\u043E\u043A\u0442._\u043D\u043E\u0432._\u0434\u0435\u0446.".split("_"),monthsParseExact:!0,weekdays:"\u043D\u0435\u0434\u0435\u0459\u0430_\u043F\u043E\u043D\u0435\u0434\u0435\u0459\u0430\u043A_\u0443\u0442\u043E\u0440\u0430\u043A_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043A_\u043F\u0435\u0442\u0430\u043A_\u0441\u0443\u0431\u043E\u0442\u0430".split("_"),weekdaysShort:"\u043D\u0435\u0434._\u043F\u043E\u043D._\u0443\u0442\u043E._\u0441\u0440\u0435._\u0447\u0435\u0442._\u043F\u0435\u0442._\u0441\u0443\u0431.".split("_"),weekdaysMin:"\u043D\u0435_\u043F\u043E_\u0443\u0442_\u0441\u0440_\u0447\u0435_\u043F\u0435_\u0441\u0443".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[\u0434\u0430\u043D\u0430\u0441 \u0443] LT",nextDay:"[\u0441\u0443\u0442\u0440\u0430 \u0443] LT",nextWeek:function(){switch(this.day()){case 0:return"[\u0443] [\u043D\u0435\u0434\u0435\u0459\u0443] [\u0443] LT";case 3:return"[\u0443] [\u0441\u0440\u0435\u0434\u0443] [\u0443] LT";case 6:return"[\u0443] [\u0441\u0443\u0431\u043E\u0442\u0443] [\u0443] LT";case 1:case 2:case 4:case 5:return"[\u0443] dddd [\u0443] LT"}},lastDay:"[\u0458\u0443\u0447\u0435 \u0443] LT",lastWeek:function(){var i=["[\u043F\u0440\u043E\u0448\u043B\u0435] [\u043D\u0435\u0434\u0435\u0459\u0435] [\u0443] LT","[\u043F\u0440\u043E\u0448\u043B\u043E\u0433] [\u043F\u043E\u043D\u0435\u0434\u0435\u0459\u043A\u0430] [\u0443] LT","[\u043F\u0440\u043E\u0448\u043B\u043E\u0433] [\u0443\u0442\u043E\u0440\u043A\u0430] [\u0443] LT","[\u043F\u0440\u043E\u0448\u043B\u0435] [\u0441\u0440\u0435\u0434\u0435] [\u0443] LT","[\u043F\u0440\u043E\u0448\u043B\u043E\u0433] [\u0447\u0435\u0442\u0432\u0440\u0442\u043A\u0430] [\u0443] LT","[\u043F\u0440\u043E\u0448\u043B\u043E\u0433] [\u043F\u0435\u0442\u043A\u0430] [\u0443] LT","[\u043F\u0440\u043E\u0448\u043B\u0435] [\u0441\u0443\u0431\u043E\u0442\u0435] [\u0443] LT"];return i[this.day()]},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043F\u0440\u0435 %s",s:"\u043D\u0435\u043A\u043E\u043B\u0438\u043A\u043E \u0441\u0435\u043A\u0443\u043D\u0434\u0438",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return a})},49131:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],d:["jedan dan","jednog dana"],dd:["dan","dana","dana"],M:["jedan mesec","jednog meseca"],MM:["mesec","meseca","meseci"],y:["jednu godinu","jedne godine"],yy:["godinu","godine","godina"]},correctGrammaticalCase:function(i,o){return i%10>=1&&i%10<=4&&(i%100<10||i%100>=20)?i%10===1?o[0]:o[1]:o[2]},translate:function(i,o,u,c){var l=t.words[u],d;return u.length===1?u==="y"&&o?"jedna godina":c||o?l[0]:l[1]:(d=t.correctGrammaticalCase(i,l),u==="yy"&&o&&d==="godinu"?i+" godina":i+" "+d)}},a=r.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_\u010Detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._\u010Det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010De_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010De u] LT",lastWeek:function(){var i=["[pro\u0161le] [nedelje] [u] LT","[pro\u0161log] [ponedeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srede] [u] LT","[pro\u0161log] [\u010Detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"];return i[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return a})},95606:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(a,i,o){return a<11?"ekuseni":a<15?"emini":a<19?"entsambama":"ebusuku"},meridiemHour:function(a,i){if(a===12&&(a=0),i==="ekuseni")return a;if(i==="emini")return a>=11?a:a+12;if(i==="entsambama"||i==="ebusuku")return a===0?0:a+12},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}});return t})},98760:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xF6ndag_m\xE5ndag_tisdag_onsdag_torsdag_fredag_l\xF6rdag".split("_"),weekdaysShort:"s\xF6n_m\xE5n_tis_ons_tor_fre_l\xF6r".split("_"),weekdaysMin:"s\xF6_m\xE5_ti_on_to_fr_l\xF6".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Ig\xE5r] LT",nextWeek:"[P\xE5] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"f\xF6r %s sedan",s:"n\xE5gra sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en m\xE5nad",MM:"%d m\xE5nader",y:"ett \xE5r",yy:"%d \xE5r"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(a){var i=a%10,o=~~(a%100/10)===1?":e":i===1||i===2?":a":":e";return a+o},week:{dow:1,doy:4}});return t})},91172:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});return t})},27333:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"\u0BE7",2:"\u0BE8",3:"\u0BE9",4:"\u0BEA",5:"\u0BEB",6:"\u0BEC",7:"\u0BED",8:"\u0BEE",9:"\u0BEF",0:"\u0BE6"},a={"\u0BE7":"1","\u0BE8":"2","\u0BE9":"3","\u0BEA":"4","\u0BEB":"5","\u0BEC":"6","\u0BED":"7","\u0BEE":"8","\u0BEF":"9","\u0BE6":"0"},i=r.defineLocale("ta",{months:"\u0B9C\u0BA9\u0BB5\u0BB0\u0BBF_\u0BAA\u0BBF\u0BAA\u0BCD\u0BB0\u0BB5\u0BB0\u0BBF_\u0BAE\u0BBE\u0BB0\u0BCD\u0B9A\u0BCD_\u0B8F\u0BAA\u0BCD\u0BB0\u0BB2\u0BCD_\u0BAE\u0BC7_\u0B9C\u0BC2\u0BA9\u0BCD_\u0B9C\u0BC2\u0BB2\u0BC8_\u0B86\u0B95\u0BB8\u0BCD\u0B9F\u0BCD_\u0B9A\u0BC6\u0BAA\u0BCD\u0B9F\u0BC6\u0BAE\u0BCD\u0BAA\u0BB0\u0BCD_\u0B85\u0B95\u0BCD\u0B9F\u0BC7\u0BBE\u0BAA\u0BB0\u0BCD_\u0BA8\u0BB5\u0BAE\u0BCD\u0BAA\u0BB0\u0BCD_\u0B9F\u0BBF\u0B9A\u0BAE\u0BCD\u0BAA\u0BB0\u0BCD".split("_"),monthsShort:"\u0B9C\u0BA9\u0BB5\u0BB0\u0BBF_\u0BAA\u0BBF\u0BAA\u0BCD\u0BB0\u0BB5\u0BB0\u0BBF_\u0BAE\u0BBE\u0BB0\u0BCD\u0B9A\u0BCD_\u0B8F\u0BAA\u0BCD\u0BB0\u0BB2\u0BCD_\u0BAE\u0BC7_\u0B9C\u0BC2\u0BA9\u0BCD_\u0B9C\u0BC2\u0BB2\u0BC8_\u0B86\u0B95\u0BB8\u0BCD\u0B9F\u0BCD_\u0B9A\u0BC6\u0BAA\u0BCD\u0B9F\u0BC6\u0BAE\u0BCD\u0BAA\u0BB0\u0BCD_\u0B85\u0B95\u0BCD\u0B9F\u0BC7\u0BBE\u0BAA\u0BB0\u0BCD_\u0BA8\u0BB5\u0BAE\u0BCD\u0BAA\u0BB0\u0BCD_\u0B9F\u0BBF\u0B9A\u0BAE\u0BCD\u0BAA\u0BB0\u0BCD".split("_"),weekdays:"\u0B9E\u0BBE\u0BAF\u0BBF\u0BB1\u0BCD\u0BB1\u0BC1\u0B95\u0BCD\u0B95\u0BBF\u0BB4\u0BAE\u0BC8_\u0BA4\u0BBF\u0B99\u0BCD\u0B95\u0B9F\u0BCD\u0B95\u0BBF\u0BB4\u0BAE\u0BC8_\u0B9A\u0BC6\u0BB5\u0BCD\u0BB5\u0BBE\u0BAF\u0BCD\u0B95\u0BBF\u0BB4\u0BAE\u0BC8_\u0BAA\u0BC1\u0BA4\u0BA9\u0BCD\u0B95\u0BBF\u0BB4\u0BAE\u0BC8_\u0BB5\u0BBF\u0BAF\u0BBE\u0BB4\u0B95\u0BCD\u0B95\u0BBF\u0BB4\u0BAE\u0BC8_\u0BB5\u0BC6\u0BB3\u0BCD\u0BB3\u0BBF\u0B95\u0BCD\u0B95\u0BBF\u0BB4\u0BAE\u0BC8_\u0B9A\u0BA9\u0BBF\u0B95\u0BCD\u0B95\u0BBF\u0BB4\u0BAE\u0BC8".split("_"),weekdaysShort:"\u0B9E\u0BBE\u0BAF\u0BBF\u0BB1\u0BC1_\u0BA4\u0BBF\u0B99\u0BCD\u0B95\u0BB3\u0BCD_\u0B9A\u0BC6\u0BB5\u0BCD\u0BB5\u0BBE\u0BAF\u0BCD_\u0BAA\u0BC1\u0BA4\u0BA9\u0BCD_\u0BB5\u0BBF\u0BAF\u0BBE\u0BB4\u0BA9\u0BCD_\u0BB5\u0BC6\u0BB3\u0BCD\u0BB3\u0BBF_\u0B9A\u0BA9\u0BBF".split("_"),weekdaysMin:"\u0B9E\u0BBE_\u0BA4\u0BBF_\u0B9A\u0BC6_\u0BAA\u0BC1_\u0BB5\u0BBF_\u0BB5\u0BC6_\u0B9A".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[\u0B87\u0BA9\u0BCD\u0BB1\u0BC1] LT",nextDay:"[\u0BA8\u0BBE\u0BB3\u0BC8] LT",nextWeek:"dddd, LT",lastDay:"[\u0BA8\u0BC7\u0BB1\u0BCD\u0BB1\u0BC1] LT",lastWeek:"[\u0B95\u0B9F\u0BA8\u0BCD\u0BA4 \u0BB5\u0BBE\u0BB0\u0BAE\u0BCD] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0B87\u0BB2\u0BCD",past:"%s \u0BAE\u0BC1\u0BA9\u0BCD",s:"\u0B92\u0BB0\u0BC1 \u0B9A\u0BBF\u0BB2 \u0BB5\u0BBF\u0BA8\u0BBE\u0B9F\u0BBF\u0B95\u0BB3\u0BCD",ss:"%d \u0BB5\u0BBF\u0BA8\u0BBE\u0B9F\u0BBF\u0B95\u0BB3\u0BCD",m:"\u0B92\u0BB0\u0BC1 \u0BA8\u0BBF\u0BAE\u0BBF\u0B9F\u0BAE\u0BCD",mm:"%d \u0BA8\u0BBF\u0BAE\u0BBF\u0B9F\u0B99\u0BCD\u0B95\u0BB3\u0BCD",h:"\u0B92\u0BB0\u0BC1 \u0BAE\u0BA3\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",hh:"%d \u0BAE\u0BA3\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",d:"\u0B92\u0BB0\u0BC1 \u0BA8\u0BBE\u0BB3\u0BCD",dd:"%d \u0BA8\u0BBE\u0B9F\u0BCD\u0B95\u0BB3\u0BCD",M:"\u0B92\u0BB0\u0BC1 \u0BAE\u0BBE\u0BA4\u0BAE\u0BCD",MM:"%d \u0BAE\u0BBE\u0BA4\u0B99\u0BCD\u0B95\u0BB3\u0BCD",y:"\u0B92\u0BB0\u0BC1 \u0BB5\u0BB0\u0BC1\u0B9F\u0BAE\u0BCD",yy:"%d \u0B86\u0BA3\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(o){return o+"\u0BB5\u0BA4\u0BC1"},preparse:function(o){return o.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,function(u){return a[u]})},postformat:function(o){return o.replace(/\d/g,function(u){return t[u]})},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(o,u,c){return o<2?" \u0BAF\u0BBE\u0BAE\u0BAE\u0BCD":o<6?" \u0BB5\u0BC8\u0B95\u0BB1\u0BC8":o<10?" \u0B95\u0BBE\u0BB2\u0BC8":o<14?" \u0BA8\u0BA3\u0BCD\u0BAA\u0B95\u0BB2\u0BCD":o<18?" \u0B8E\u0BB1\u0BCD\u0BAA\u0BBE\u0B9F\u0BC1":o<22?" \u0BAE\u0BBE\u0BB2\u0BC8":" \u0BAF\u0BBE\u0BAE\u0BAE\u0BCD"},meridiemHour:function(o,u){return o===12&&(o=0),u==="\u0BAF\u0BBE\u0BAE\u0BAE\u0BCD"?o<2?o:o+12:u==="\u0BB5\u0BC8\u0B95\u0BB1\u0BC8"||u==="\u0B95\u0BBE\u0BB2\u0BC8"||u==="\u0BA8\u0BA3\u0BCD\u0BAA\u0B95\u0BB2\u0BCD"&&o>=10?o:o+12},week:{dow:0,doy:6}});return i})},23110:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("te",{months:"\u0C1C\u0C28\u0C35\u0C30\u0C3F_\u0C2B\u0C3F\u0C2C\u0C4D\u0C30\u0C35\u0C30\u0C3F_\u0C2E\u0C3E\u0C30\u0C4D\u0C1A\u0C3F_\u0C0F\u0C2A\u0C4D\u0C30\u0C3F\u0C32\u0C4D_\u0C2E\u0C47_\u0C1C\u0C42\u0C28\u0C4D_\u0C1C\u0C41\u0C32\u0C48_\u0C06\u0C17\u0C38\u0C4D\u0C1F\u0C41_\u0C38\u0C46\u0C2A\u0C4D\u0C1F\u0C46\u0C02\u0C2C\u0C30\u0C4D_\u0C05\u0C15\u0C4D\u0C1F\u0C4B\u0C2C\u0C30\u0C4D_\u0C28\u0C35\u0C02\u0C2C\u0C30\u0C4D_\u0C21\u0C3F\u0C38\u0C46\u0C02\u0C2C\u0C30\u0C4D".split("_"),monthsShort:"\u0C1C\u0C28._\u0C2B\u0C3F\u0C2C\u0C4D\u0C30._\u0C2E\u0C3E\u0C30\u0C4D\u0C1A\u0C3F_\u0C0F\u0C2A\u0C4D\u0C30\u0C3F._\u0C2E\u0C47_\u0C1C\u0C42\u0C28\u0C4D_\u0C1C\u0C41\u0C32\u0C48_\u0C06\u0C17._\u0C38\u0C46\u0C2A\u0C4D._\u0C05\u0C15\u0C4D\u0C1F\u0C4B._\u0C28\u0C35._\u0C21\u0C3F\u0C38\u0C46.".split("_"),monthsParseExact:!0,weekdays:"\u0C06\u0C26\u0C3F\u0C35\u0C3E\u0C30\u0C02_\u0C38\u0C4B\u0C2E\u0C35\u0C3E\u0C30\u0C02_\u0C2E\u0C02\u0C17\u0C33\u0C35\u0C3E\u0C30\u0C02_\u0C2C\u0C41\u0C27\u0C35\u0C3E\u0C30\u0C02_\u0C17\u0C41\u0C30\u0C41\u0C35\u0C3E\u0C30\u0C02_\u0C36\u0C41\u0C15\u0C4D\u0C30\u0C35\u0C3E\u0C30\u0C02_\u0C36\u0C28\u0C3F\u0C35\u0C3E\u0C30\u0C02".split("_"),weekdaysShort:"\u0C06\u0C26\u0C3F_\u0C38\u0C4B\u0C2E_\u0C2E\u0C02\u0C17\u0C33_\u0C2C\u0C41\u0C27_\u0C17\u0C41\u0C30\u0C41_\u0C36\u0C41\u0C15\u0C4D\u0C30_\u0C36\u0C28\u0C3F".split("_"),weekdaysMin:"\u0C06_\u0C38\u0C4B_\u0C2E\u0C02_\u0C2C\u0C41_\u0C17\u0C41_\u0C36\u0C41_\u0C36".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0C28\u0C47\u0C21\u0C41] LT",nextDay:"[\u0C30\u0C47\u0C2A\u0C41] LT",nextWeek:"dddd, LT",lastDay:"[\u0C28\u0C3F\u0C28\u0C4D\u0C28] LT",lastWeek:"[\u0C17\u0C24] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0C32\u0C4B",past:"%s \u0C15\u0C4D\u0C30\u0C3F\u0C24\u0C02",s:"\u0C15\u0C4A\u0C28\u0C4D\u0C28\u0C3F \u0C15\u0C4D\u0C37\u0C23\u0C3E\u0C32\u0C41",ss:"%d \u0C38\u0C46\u0C15\u0C28\u0C4D\u0C32\u0C41",m:"\u0C12\u0C15 \u0C28\u0C3F\u0C2E\u0C3F\u0C37\u0C02",mm:"%d \u0C28\u0C3F\u0C2E\u0C3F\u0C37\u0C3E\u0C32\u0C41",h:"\u0C12\u0C15 \u0C17\u0C02\u0C1F",hh:"%d \u0C17\u0C02\u0C1F\u0C32\u0C41",d:"\u0C12\u0C15 \u0C30\u0C4B\u0C1C\u0C41",dd:"%d \u0C30\u0C4B\u0C1C\u0C41\u0C32\u0C41",M:"\u0C12\u0C15 \u0C28\u0C46\u0C32",MM:"%d \u0C28\u0C46\u0C32\u0C32\u0C41",y:"\u0C12\u0C15 \u0C38\u0C02\u0C35\u0C24\u0C4D\u0C38\u0C30\u0C02",yy:"%d \u0C38\u0C02\u0C35\u0C24\u0C4D\u0C38\u0C30\u0C3E\u0C32\u0C41"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%d\u0C35",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(a,i){if(a===12&&(a=0),i==="\u0C30\u0C3E\u0C24\u0C4D\u0C30\u0C3F")return a<4?a:a+12;if(i==="\u0C09\u0C26\u0C2F\u0C02")return a;if(i==="\u0C2E\u0C27\u0C4D\u0C2F\u0C3E\u0C39\u0C4D\u0C28\u0C02")return a>=10?a:a+12;if(i==="\u0C38\u0C3E\u0C2F\u0C02\u0C24\u0C4D\u0C30\u0C02")return a+12},meridiem:function(a,i,o){return a<4?"\u0C30\u0C3E\u0C24\u0C4D\u0C30\u0C3F":a<10?"\u0C09\u0C26\u0C2F\u0C02":a<17?"\u0C2E\u0C27\u0C4D\u0C2F\u0C3E\u0C39\u0C4D\u0C28\u0C02":a<20?"\u0C38\u0C3E\u0C2F\u0C02\u0C24\u0C4D\u0C30\u0C02":"\u0C30\u0C3E\u0C24\u0C4D\u0C30\u0C3F"},week:{dow:0,doy:6}});return t})},52095:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Ju\xF1u_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var i=a%10,o=~~(a%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return a+o},week:{dow:1,doy:4}});return t})},27321:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={0:"-\u0443\u043C",1:"-\u0443\u043C",2:"-\u044E\u043C",3:"-\u044E\u043C",4:"-\u0443\u043C",5:"-\u0443\u043C",6:"-\u0443\u043C",7:"-\u0443\u043C",8:"-\u0443\u043C",9:"-\u0443\u043C",10:"-\u0443\u043C",12:"-\u0443\u043C",13:"-\u0443\u043C",20:"-\u0443\u043C",30:"-\u044E\u043C",40:"-\u0443\u043C",50:"-\u0443\u043C",60:"-\u0443\u043C",70:"-\u0443\u043C",80:"-\u0443\u043C",90:"-\u0443\u043C",100:"-\u0443\u043C"},a=r.defineLocale("tg",{months:{format:"\u044F\u043D\u0432\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0430\u043B\u0438_\u043C\u0430\u0440\u0442\u0438_\u0430\u043F\u0440\u0435\u043B\u0438_\u043C\u0430\u0439\u0438_\u0438\u044E\u043D\u0438_\u0438\u044E\u043B\u0438_\u0430\u0432\u0433\u0443\u0441\u0442\u0438_\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0438_\u043E\u043A\u0442\u044F\u0431\u0440\u0438_\u043D\u043E\u044F\u0431\u0440\u0438_\u0434\u0435\u043A\u0430\u0431\u0440\u0438".split("_"),standalone:"\u044F\u043D\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043B_\u043C\u0430\u0440\u0442_\u0430\u043F\u0440\u0435\u043B_\u043C\u0430\u0439_\u0438\u044E\u043D_\u0438\u044E\u043B_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043D\u0442\u044F\u0431\u0440_\u043E\u043A\u0442\u044F\u0431\u0440_\u043D\u043E\u044F\u0431\u0440_\u0434\u0435\u043A\u0430\u0431\u0440".split("_")},monthsShort:"\u044F\u043D\u0432_\u0444\u0435\u0432_\u043C\u0430\u0440_\u0430\u043F\u0440_\u043C\u0430\u0439_\u0438\u044E\u043D_\u0438\u044E\u043B_\u0430\u0432\u0433_\u0441\u0435\u043D_\u043E\u043A\u0442_\u043D\u043E\u044F_\u0434\u0435\u043A".split("_"),weekdays:"\u044F\u043A\u0448\u0430\u043D\u0431\u0435_\u0434\u0443\u0448\u0430\u043D\u0431\u0435_\u0441\u0435\u0448\u0430\u043D\u0431\u0435_\u0447\u043E\u0440\u0448\u0430\u043D\u0431\u0435_\u043F\u0430\u043D\u04B7\u0448\u0430\u043D\u0431\u0435_\u04B7\u0443\u043C\u044A\u0430_\u0448\u0430\u043D\u0431\u0435".split("_"),weekdaysShort:"\u044F\u0448\u0431_\u0434\u0448\u0431_\u0441\u0448\u0431_\u0447\u0448\u0431_\u043F\u0448\u0431_\u04B7\u0443\u043C_\u0448\u043D\u0431".split("_"),weekdaysMin:"\u044F\u0448_\u0434\u0448_\u0441\u0448_\u0447\u0448_\u043F\u0448_\u04B7\u043C_\u0448\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0418\u043C\u0440\u04EF\u0437 \u0441\u043E\u0430\u0442\u0438] LT",nextDay:"[\u0424\u0430\u0440\u0434\u043E \u0441\u043E\u0430\u0442\u0438] LT",lastDay:"[\u0414\u0438\u0440\u04EF\u0437 \u0441\u043E\u0430\u0442\u0438] LT",nextWeek:"dddd[\u0438] [\u04B3\u0430\u0444\u0442\u0430\u0438 \u043E\u044F\u043D\u0434\u0430 \u0441\u043E\u0430\u0442\u0438] LT",lastWeek:"dddd[\u0438] [\u04B3\u0430\u0444\u0442\u0430\u0438 \u0433\u0443\u0437\u0430\u0448\u0442\u0430 \u0441\u043E\u0430\u0442\u0438] LT",sameElse:"L"},relativeTime:{future:"\u0431\u0430\u044A\u0434\u0438 %s",past:"%s \u043F\u0435\u0448",s:"\u044F\u043A\u0447\u0430\u043D\u0434 \u0441\u043E\u043D\u0438\u044F",m:"\u044F\u043A \u0434\u0430\u049B\u0438\u049B\u0430",mm:"%d \u0434\u0430\u049B\u0438\u049B\u0430",h:"\u044F\u043A \u0441\u043E\u0430\u0442",hh:"%d \u0441\u043E\u0430\u0442",d:"\u044F\u043A \u0440\u04EF\u0437",dd:"%d \u0440\u04EF\u0437",M:"\u044F\u043A \u043C\u043E\u04B3",MM:"%d \u043C\u043E\u04B3",y:"\u044F\u043A \u0441\u043E\u043B",yy:"%d \u0441\u043E\u043B"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(i,o){if(i===12&&(i=0),o==="\u0448\u0430\u0431")return i<4?i:i+12;if(o==="\u0441\u0443\u0431\u04B3")return i;if(o==="\u0440\u04EF\u0437")return i>=11?i:i+12;if(o==="\u0431\u0435\u0433\u043E\u04B3")return i+12},meridiem:function(i,o,u){return i<4?"\u0448\u0430\u0431":i<11?"\u0441\u0443\u0431\u04B3":i<16?"\u0440\u04EF\u0437":i<19?"\u0431\u0435\u0433\u043E\u04B3":"\u0448\u0430\u0431"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(i){var o=i%10,u=i>=100?100:null;return i+(t[i]||t[o]||t[u])},week:{dow:1,doy:7}});return a})},9041:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("th",{months:"\u0E21\u0E01\u0E23\u0E32\u0E04\u0E21_\u0E01\u0E38\u0E21\u0E20\u0E32\u0E1E\u0E31\u0E19\u0E18\u0E4C_\u0E21\u0E35\u0E19\u0E32\u0E04\u0E21_\u0E40\u0E21\u0E29\u0E32\u0E22\u0E19_\u0E1E\u0E24\u0E29\u0E20\u0E32\u0E04\u0E21_\u0E21\u0E34\u0E16\u0E38\u0E19\u0E32\u0E22\u0E19_\u0E01\u0E23\u0E01\u0E0E\u0E32\u0E04\u0E21_\u0E2A\u0E34\u0E07\u0E2B\u0E32\u0E04\u0E21_\u0E01\u0E31\u0E19\u0E22\u0E32\u0E22\u0E19_\u0E15\u0E38\u0E25\u0E32\u0E04\u0E21_\u0E1E\u0E24\u0E28\u0E08\u0E34\u0E01\u0E32\u0E22\u0E19_\u0E18\u0E31\u0E19\u0E27\u0E32\u0E04\u0E21".split("_"),monthsShort:"\u0E21.\u0E04._\u0E01.\u0E1E._\u0E21\u0E35.\u0E04._\u0E40\u0E21.\u0E22._\u0E1E.\u0E04._\u0E21\u0E34.\u0E22._\u0E01.\u0E04._\u0E2A.\u0E04._\u0E01.\u0E22._\u0E15.\u0E04._\u0E1E.\u0E22._\u0E18.\u0E04.".split("_"),monthsParseExact:!0,weekdays:"\u0E2D\u0E32\u0E17\u0E34\u0E15\u0E22\u0E4C_\u0E08\u0E31\u0E19\u0E17\u0E23\u0E4C_\u0E2D\u0E31\u0E07\u0E04\u0E32\u0E23_\u0E1E\u0E38\u0E18_\u0E1E\u0E24\u0E2B\u0E31\u0E2A\u0E1A\u0E14\u0E35_\u0E28\u0E38\u0E01\u0E23\u0E4C_\u0E40\u0E2A\u0E32\u0E23\u0E4C".split("_"),weekdaysShort:"\u0E2D\u0E32\u0E17\u0E34\u0E15\u0E22\u0E4C_\u0E08\u0E31\u0E19\u0E17\u0E23\u0E4C_\u0E2D\u0E31\u0E07\u0E04\u0E32\u0E23_\u0E1E\u0E38\u0E18_\u0E1E\u0E24\u0E2B\u0E31\u0E2A_\u0E28\u0E38\u0E01\u0E23\u0E4C_\u0E40\u0E2A\u0E32\u0E23\u0E4C".split("_"),weekdaysMin:"\u0E2D\u0E32._\u0E08._\u0E2D._\u0E1E._\u0E1E\u0E24._\u0E28._\u0E2A.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY \u0E40\u0E27\u0E25\u0E32 H:mm",LLLL:"\u0E27\u0E31\u0E19dddd\u0E17\u0E35\u0E48 D MMMM YYYY \u0E40\u0E27\u0E25\u0E32 H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(a){return a==="\u0E2B\u0E25\u0E31\u0E07\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07"},meridiem:function(a,i,o){return a<12?"\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07":"\u0E2B\u0E25\u0E31\u0E07\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07"},calendar:{sameDay:"[\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 \u0E40\u0E27\u0E25\u0E32] LT",nextDay:"[\u0E1E\u0E23\u0E38\u0E48\u0E07\u0E19\u0E35\u0E49 \u0E40\u0E27\u0E25\u0E32] LT",nextWeek:"dddd[\u0E2B\u0E19\u0E49\u0E32 \u0E40\u0E27\u0E25\u0E32] LT",lastDay:"[\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E27\u0E32\u0E19\u0E19\u0E35\u0E49 \u0E40\u0E27\u0E25\u0E32] LT",lastWeek:"[\u0E27\u0E31\u0E19]dddd[\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27 \u0E40\u0E27\u0E25\u0E32] LT",sameElse:"L"},relativeTime:{future:"\u0E2D\u0E35\u0E01 %s",past:"%s\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27",s:"\u0E44\u0E21\u0E48\u0E01\u0E35\u0E48\u0E27\u0E34\u0E19\u0E32\u0E17\u0E35",ss:"%d \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35",m:"1 \u0E19\u0E32\u0E17\u0E35",mm:"%d \u0E19\u0E32\u0E17\u0E35",h:"1 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07",hh:"%d \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07",d:"1 \u0E27\u0E31\u0E19",dd:"%d \u0E27\u0E31\u0E19",w:"1 \u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C",ww:"%d \u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C",M:"1 \u0E40\u0E14\u0E37\u0E2D\u0E19",MM:"%d \u0E40\u0E14\u0E37\u0E2D\u0E19",y:"1 \u0E1B\u0E35",yy:"%d \u0E1B\u0E35"}});return t})},19005:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'\xFCnji",4:"'\xFCnji",100:"'\xFCnji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"},a=r.defineLocale("tk",{months:"\xDDanwar_Fewral_Mart_Aprel_Ma\xFD_I\xFDun_I\xFDul_Awgust_Sent\xFDabr_Okt\xFDabr_No\xFDabr_Dekabr".split("_"),monthsShort:"\xDDan_Few_Mar_Apr_Ma\xFD_I\xFDn_I\xFDl_Awg_Sen_Okt_No\xFD_Dek".split("_"),weekdays:"\xDDek\u015Fenbe_Du\u015Fenbe_Si\u015Fenbe_\xC7ar\u015Fenbe_Pen\u015Fenbe_Anna_\u015Eenbe".split("_"),weekdaysShort:"\xDDek_Du\u015F_Si\u015F_\xC7ar_Pen_Ann_\u015Een".split("_"),weekdaysMin:"\xDDk_D\u015F_S\u015F_\xC7r_Pn_An_\u015En".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xFCn sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[d\xFC\xFDn] LT",lastWeek:"[ge\xE7en] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s so\u0148",past:"%s \xF6\u0148",s:"birn\xE4\xE7e sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir g\xFCn",dd:"%d g\xFCn",M:"bir a\xFD",MM:"%d a\xFD",y:"bir \xFDyl",yy:"%d \xFDyl"},ordinal:function(i,o){switch(o){case"d":case"D":case"Do":case"DD":return i;default:if(i===0)return i+"'unjy";var u=i%10,c=i%100-u,l=i>=100?100:null;return i+(t[u]||t[c]||t[l])}},week:{dow:1,doy:7}});return a})},75768:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(a){return a},week:{dow:1,doy:4}});return t})},89444:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t="pagh_wa\u2019_cha\u2019_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function a(l){var d=l;return d=l.indexOf("jaj")!==-1?d.slice(0,-3)+"leS":l.indexOf("jar")!==-1?d.slice(0,-3)+"waQ":l.indexOf("DIS")!==-1?d.slice(0,-3)+"nem":d+" pIq",d}function i(l){var d=l;return d=l.indexOf("jaj")!==-1?d.slice(0,-3)+"Hu\u2019":l.indexOf("jar")!==-1?d.slice(0,-3)+"wen":l.indexOf("DIS")!==-1?d.slice(0,-3)+"ben":d+" ret",d}function o(l,d,p,M){var _=u(l);switch(p){case"ss":return _+" lup";case"mm":return _+" tup";case"hh":return _+" rep";case"dd":return _+" jaj";case"MM":return _+" jar";case"yy":return _+" DIS"}}function u(l){var d=Math.floor(l%1e3/100),p=Math.floor(l%100/10),M=l%10,_="";return d>0&&(_+=t[d]+"vatlh"),p>0&&(_+=(_!==""?" ":"")+t[p]+"maH"),M>0&&(_+=(_!==""?" ":"")+t[M]),_===""?"pagh":_}var c=r.defineLocale("tlh",{months:"tera\u2019 jar wa\u2019_tera\u2019 jar cha\u2019_tera\u2019 jar wej_tera\u2019 jar loS_tera\u2019 jar vagh_tera\u2019 jar jav_tera\u2019 jar Soch_tera\u2019 jar chorgh_tera\u2019 jar Hut_tera\u2019 jar wa\u2019maH_tera\u2019 jar wa\u2019maH wa\u2019_tera\u2019 jar wa\u2019maH cha\u2019".split("_"),monthsShort:"jar wa\u2019_jar cha\u2019_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa\u2019maH_jar wa\u2019maH wa\u2019_jar wa\u2019maH cha\u2019".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa\u2019leS] LT",nextWeek:"LLL",lastDay:"[wa\u2019Hu\u2019] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:a,past:i,s:"puS lup",ss:o,m:"wa\u2019 tup",mm:o,h:"wa\u2019 rep",hh:o,d:"wa\u2019 jaj",dd:o,M:"wa\u2019 jar",MM:o,y:"wa\u2019 DIS",yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return c})},72397:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'\xFCnc\xFC",4:"'\xFCnc\xFC",100:"'\xFCnc\xFC",6:"'nc\u0131",9:"'uncu",10:"'uncu",30:"'uncu",60:"'\u0131nc\u0131",90:"'\u0131nc\u0131"},a=r.defineLocale("tr",{months:"Ocak_\u015Eubat_Mart_Nisan_May\u0131s_Haziran_Temmuz_A\u011Fustos_Eyl\xFCl_Ekim_Kas\u0131m_Aral\u0131k".split("_"),monthsShort:"Oca_\u015Eub_Mar_Nis_May_Haz_Tem_A\u011Fu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Sal\u0131_\xC7ar\u015Famba_Per\u015Fembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_\xC7ar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_\xC7a_Pe_Cu_Ct".split("_"),meridiem:function(i,o,u){return i<12?u?"\xF6\xF6":"\xD6\xD6":u?"\xF6s":"\xD6S"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(i){return i==="\xF6s"||i==="\xD6S"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xFCn saat] LT",nextDay:"[yar\u0131n saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[d\xFCn] LT",lastWeek:"[ge\xE7en] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \xF6nce",s:"birka\xE7 saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir g\xFCn",dd:"%d g\xFCn",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir y\u0131l",yy:"%d y\u0131l"},ordinal:function(i,o){switch(o){case"d":case"D":case"Do":case"DD":return i;default:if(i===0)return i+"'\u0131nc\u0131";var u=i%10,c=i%100-u,l=i>=100?100:null;return i+(t[u]||t[c]||t[l])}},week:{dow:1,doy:7}});return a})},28254:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("tzl",{months:"Januar_Fevraglh_Mar\xE7_Avr\xEFu_Mai_G\xFCn_Julia_Guscht_Setemvar_Listop\xE4ts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_G\xFCn_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"S\xFAladi_L\xFAne\xE7i_Maitzi_M\xE1rcuri_Xh\xFAadi_Vi\xE9ner\xE7i_S\xE1turi".split("_"),weekdaysShort:"S\xFAl_L\xFAn_Mai_M\xE1r_Xh\xFA_Vi\xE9_S\xE1t".split("_"),weekdaysMin:"S\xFA_L\xFA_Ma_M\xE1_Xh_Vi_S\xE1".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(i){return i.toLowerCase()==="d'o"},meridiem:function(i,o,u){return i>11?u?"d'o":"D'O":u?"d'a":"D'A"},calendar:{sameDay:"[oxhi \xE0] LT",nextDay:"[dem\xE0 \xE0] LT",nextWeek:"dddd [\xE0] LT",lastDay:"[ieiri \xE0] LT",lastWeek:"[s\xFCr el] dddd [lasteu \xE0] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});function a(i,o,u,c){var l={s:["viensas secunds","'iensas secunds"],ss:[i+" secunds",""+i+" secunds"],m:["'n m\xEDut","'iens m\xEDut"],mm:[i+" m\xEDuts",""+i+" m\xEDuts"],h:["'n \xFEora","'iensa \xFEora"],hh:[i+" \xFEoras",""+i+" \xFEoras"],d:["'n ziua","'iensa ziua"],dd:[i+" ziuas",""+i+" ziuas"],M:["'n mes","'iens mes"],MM:[i+" mesen",""+i+" mesen"],y:["'n ar","'iens ar"],yy:[i+" ars",""+i+" ars"]};return c||o?l[u][0]:l[u][1]}return t})},30699:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("tzm-latn",{months:"innayr_br\u02E4ayr\u02E4_mar\u02E4s\u02E4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02E4wbr\u02E4_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_br\u02E4ayr\u02E4_mar\u02E4s\u02E4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02E4wbr\u02E4_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1E0Dyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1E0Dyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1E0Dyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minu\u1E0D",mm:"%d minu\u1E0D",h:"sa\u025Ba",hh:"%d tassa\u025Bin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}});return t})},51106:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("tzm",{months:"\u2D49\u2D4F\u2D4F\u2D30\u2D62\u2D54_\u2D31\u2D55\u2D30\u2D62\u2D55_\u2D4E\u2D30\u2D55\u2D5A_\u2D49\u2D31\u2D54\u2D49\u2D54_\u2D4E\u2D30\u2D62\u2D62\u2D53_\u2D62\u2D53\u2D4F\u2D62\u2D53_\u2D62\u2D53\u2D4D\u2D62\u2D53\u2D63_\u2D56\u2D53\u2D5B\u2D5C_\u2D5B\u2D53\u2D5C\u2D30\u2D4F\u2D31\u2D49\u2D54_\u2D3D\u2D5F\u2D53\u2D31\u2D55_\u2D4F\u2D53\u2D61\u2D30\u2D4F\u2D31\u2D49\u2D54_\u2D37\u2D53\u2D4A\u2D4F\u2D31\u2D49\u2D54".split("_"),monthsShort:"\u2D49\u2D4F\u2D4F\u2D30\u2D62\u2D54_\u2D31\u2D55\u2D30\u2D62\u2D55_\u2D4E\u2D30\u2D55\u2D5A_\u2D49\u2D31\u2D54\u2D49\u2D54_\u2D4E\u2D30\u2D62\u2D62\u2D53_\u2D62\u2D53\u2D4F\u2D62\u2D53_\u2D62\u2D53\u2D4D\u2D62\u2D53\u2D63_\u2D56\u2D53\u2D5B\u2D5C_\u2D5B\u2D53\u2D5C\u2D30\u2D4F\u2D31\u2D49\u2D54_\u2D3D\u2D5F\u2D53\u2D31\u2D55_\u2D4F\u2D53\u2D61\u2D30\u2D4F\u2D31\u2D49\u2D54_\u2D37\u2D53\u2D4A\u2D4F\u2D31\u2D49\u2D54".split("_"),weekdays:"\u2D30\u2D59\u2D30\u2D4E\u2D30\u2D59_\u2D30\u2D62\u2D4F\u2D30\u2D59_\u2D30\u2D59\u2D49\u2D4F\u2D30\u2D59_\u2D30\u2D3D\u2D54\u2D30\u2D59_\u2D30\u2D3D\u2D61\u2D30\u2D59_\u2D30\u2D59\u2D49\u2D4E\u2D61\u2D30\u2D59_\u2D30\u2D59\u2D49\u2D39\u2D62\u2D30\u2D59".split("_"),weekdaysShort:"\u2D30\u2D59\u2D30\u2D4E\u2D30\u2D59_\u2D30\u2D62\u2D4F\u2D30\u2D59_\u2D30\u2D59\u2D49\u2D4F\u2D30\u2D59_\u2D30\u2D3D\u2D54\u2D30\u2D59_\u2D30\u2D3D\u2D61\u2D30\u2D59_\u2D30\u2D59\u2D49\u2D4E\u2D61\u2D30\u2D59_\u2D30\u2D59\u2D49\u2D39\u2D62\u2D30\u2D59".split("_"),weekdaysMin:"\u2D30\u2D59\u2D30\u2D4E\u2D30\u2D59_\u2D30\u2D62\u2D4F\u2D30\u2D59_\u2D30\u2D59\u2D49\u2D4F\u2D30\u2D59_\u2D30\u2D3D\u2D54\u2D30\u2D59_\u2D30\u2D3D\u2D61\u2D30\u2D59_\u2D30\u2D59\u2D49\u2D4E\u2D61\u2D30\u2D59_\u2D30\u2D59\u2D49\u2D39\u2D62\u2D30\u2D59".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u2D30\u2D59\u2D37\u2D45 \u2D34] LT",nextDay:"[\u2D30\u2D59\u2D3D\u2D30 \u2D34] LT",nextWeek:"dddd [\u2D34] LT",lastDay:"[\u2D30\u2D5A\u2D30\u2D4F\u2D5C \u2D34] LT",lastWeek:"dddd [\u2D34] LT",sameElse:"L"},relativeTime:{future:"\u2D37\u2D30\u2D37\u2D45 \u2D59 \u2D62\u2D30\u2D4F %s",past:"\u2D62\u2D30\u2D4F %s",s:"\u2D49\u2D4E\u2D49\u2D3D",ss:"%d \u2D49\u2D4E\u2D49\u2D3D",m:"\u2D4E\u2D49\u2D4F\u2D53\u2D3A",mm:"%d \u2D4E\u2D49\u2D4F\u2D53\u2D3A",h:"\u2D59\u2D30\u2D44\u2D30",hh:"%d \u2D5C\u2D30\u2D59\u2D59\u2D30\u2D44\u2D49\u2D4F",d:"\u2D30\u2D59\u2D59",dd:"%d o\u2D59\u2D59\u2D30\u2D4F",M:"\u2D30\u2D62o\u2D53\u2D54",MM:"%d \u2D49\u2D62\u2D62\u2D49\u2D54\u2D4F",y:"\u2D30\u2D59\u2D33\u2D30\u2D59",yy:"%d \u2D49\u2D59\u2D33\u2D30\u2D59\u2D4F"},week:{dow:6,doy:12}});return t})},9288:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("ug-cn",{months:"\u064A\u0627\u0646\u06CB\u0627\u0631_\u0641\u06D0\u06CB\u0631\u0627\u0644_\u0645\u0627\u0631\u062A_\u0626\u0627\u067E\u0631\u06D0\u0644_\u0645\u0627\u064A_\u0626\u0649\u064A\u06C7\u0646_\u0626\u0649\u064A\u06C7\u0644_\u0626\u0627\u06CB\u063A\u06C7\u0633\u062A_\u0633\u06D0\u0646\u062A\u06D5\u0628\u0649\u0631_\u0626\u06C6\u0643\u062A\u06D5\u0628\u0649\u0631_\u0646\u0648\u064A\u0627\u0628\u0649\u0631_\u062F\u06D0\u0643\u0627\u0628\u0649\u0631".split("_"),monthsShort:"\u064A\u0627\u0646\u06CB\u0627\u0631_\u0641\u06D0\u06CB\u0631\u0627\u0644_\u0645\u0627\u0631\u062A_\u0626\u0627\u067E\u0631\u06D0\u0644_\u0645\u0627\u064A_\u0626\u0649\u064A\u06C7\u0646_\u0626\u0649\u064A\u06C7\u0644_\u0626\u0627\u06CB\u063A\u06C7\u0633\u062A_\u0633\u06D0\u0646\u062A\u06D5\u0628\u0649\u0631_\u0626\u06C6\u0643\u062A\u06D5\u0628\u0649\u0631_\u0646\u0648\u064A\u0627\u0628\u0649\u0631_\u062F\u06D0\u0643\u0627\u0628\u0649\u0631".split("_"),weekdays:"\u064A\u06D5\u0643\u0634\u06D5\u0646\u0628\u06D5_\u062F\u06C8\u0634\u06D5\u0646\u0628\u06D5_\u0633\u06D5\u064A\u0634\u06D5\u0646\u0628\u06D5_\u0686\u0627\u0631\u0634\u06D5\u0646\u0628\u06D5_\u067E\u06D5\u064A\u0634\u06D5\u0646\u0628\u06D5_\u062C\u06C8\u0645\u06D5_\u0634\u06D5\u0646\u0628\u06D5".split("_"),weekdaysShort:"\u064A\u06D5_\u062F\u06C8_\u0633\u06D5_\u0686\u0627_\u067E\u06D5_\u062C\u06C8_\u0634\u06D5".split("_"),weekdaysMin:"\u064A\u06D5_\u062F\u06C8_\u0633\u06D5_\u0686\u0627_\u067E\u06D5_\u062C\u06C8_\u0634\u06D5".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-\u064A\u0649\u0644\u0649M-\u0626\u0627\u064A\u0646\u0649\u06ADD-\u0643\u06C8\u0646\u0649",LLL:"YYYY-\u064A\u0649\u0644\u0649M-\u0626\u0627\u064A\u0646\u0649\u06ADD-\u0643\u06C8\u0646\u0649\u060C HH:mm",LLLL:"dddd\u060C YYYY-\u064A\u0649\u0644\u0649M-\u0626\u0627\u064A\u0646\u0649\u06ADD-\u0643\u06C8\u0646\u0649\u060C HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(a,i){return a===12&&(a=0),i==="\u064A\u06D0\u0631\u0649\u0645 \u0643\u06D0\u0686\u06D5"||i==="\u0633\u06D5\u06BE\u06D5\u0631"||i==="\u0686\u06C8\u0634\u062A\u0649\u0646 \u0628\u06C7\u0631\u06C7\u0646"?a:i==="\u0686\u06C8\u0634\u062A\u0649\u0646 \u0643\u06D0\u064A\u0649\u0646"||i==="\u0643\u06D5\u0686"?a+12:a>=11?a:a+12},meridiem:function(a,i,o){var u=a*100+i;return u<600?"\u064A\u06D0\u0631\u0649\u0645 \u0643\u06D0\u0686\u06D5":u<900?"\u0633\u06D5\u06BE\u06D5\u0631":u<1130?"\u0686\u06C8\u0634\u062A\u0649\u0646 \u0628\u06C7\u0631\u06C7\u0646":u<1230?"\u0686\u06C8\u0634":u<1800?"\u0686\u06C8\u0634\u062A\u0649\u0646 \u0643\u06D0\u064A\u0649\u0646":"\u0643\u06D5\u0686"},calendar:{sameDay:"[\u0628\u06C8\u06AF\u06C8\u0646 \u0633\u0627\u0626\u06D5\u062A] LT",nextDay:"[\u0626\u06D5\u062A\u06D5 \u0633\u0627\u0626\u06D5\u062A] LT",nextWeek:"[\u0643\u06D0\u0644\u06D5\u0631\u0643\u0649] dddd [\u0633\u0627\u0626\u06D5\u062A] LT",lastDay:"[\u062A\u06C6\u0646\u06C8\u06AF\u06C8\u0646] LT",lastWeek:"[\u0626\u0627\u0644\u062F\u0649\u0646\u0642\u0649] dddd [\u0633\u0627\u0626\u06D5\u062A] LT",sameElse:"L"},relativeTime:{future:"%s \u0643\u06D0\u064A\u0649\u0646",past:"%s \u0628\u06C7\u0631\u06C7\u0646",s:"\u0646\u06D5\u0686\u0686\u06D5 \u0633\u06D0\u0643\u0648\u0646\u062A",ss:"%d \u0633\u06D0\u0643\u0648\u0646\u062A",m:"\u0628\u0649\u0631 \u0645\u0649\u0646\u06C7\u062A",mm:"%d \u0645\u0649\u0646\u06C7\u062A",h:"\u0628\u0649\u0631 \u0633\u0627\u0626\u06D5\u062A",hh:"%d \u0633\u0627\u0626\u06D5\u062A",d:"\u0628\u0649\u0631 \u0643\u06C8\u0646",dd:"%d \u0643\u06C8\u0646",M:"\u0628\u0649\u0631 \u0626\u0627\u064A",MM:"%d \u0626\u0627\u064A",y:"\u0628\u0649\u0631 \u064A\u0649\u0644",yy:"%d \u064A\u0649\u0644"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(a,i){switch(i){case"d":case"D":case"DDD":return a+"-\u0643\u06C8\u0646\u0649";case"w":case"W":return a+"-\u06BE\u06D5\u067E\u062A\u06D5";default:return a}},preparse:function(a){return a.replace(/،/g,",")},postformat:function(a){return a.replace(/,/g,"\u060C")},week:{dow:1,doy:7}});return t})},67691:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";function t(c,l){var d=c.split("_");return l%10===1&&l%100!==11?d[0]:l%10>=2&&l%10<=4&&(l%100<10||l%100>=20)?d[1]:d[2]}function a(c,l,d){var p={ss:l?"\u0441\u0435\u043A\u0443\u043D\u0434\u0430_\u0441\u0435\u043A\u0443\u043D\u0434\u0438_\u0441\u0435\u043A\u0443\u043D\u0434":"\u0441\u0435\u043A\u0443\u043D\u0434\u0443_\u0441\u0435\u043A\u0443\u043D\u0434\u0438_\u0441\u0435\u043A\u0443\u043D\u0434",mm:l?"\u0445\u0432\u0438\u043B\u0438\u043D\u0430_\u0445\u0432\u0438\u043B\u0438\u043D\u0438_\u0445\u0432\u0438\u043B\u0438\u043D":"\u0445\u0432\u0438\u043B\u0438\u043D\u0443_\u0445\u0432\u0438\u043B\u0438\u043D\u0438_\u0445\u0432\u0438\u043B\u0438\u043D",hh:l?"\u0433\u043E\u0434\u0438\u043D\u0430_\u0433\u043E\u0434\u0438\u043D\u0438_\u0433\u043E\u0434\u0438\u043D":"\u0433\u043E\u0434\u0438\u043D\u0443_\u0433\u043E\u0434\u0438\u043D\u0438_\u0433\u043E\u0434\u0438\u043D",dd:"\u0434\u0435\u043D\u044C_\u0434\u043D\u0456_\u0434\u043D\u0456\u0432",MM:"\u043C\u0456\u0441\u044F\u0446\u044C_\u043C\u0456\u0441\u044F\u0446\u0456_\u043C\u0456\u0441\u044F\u0446\u0456\u0432",yy:"\u0440\u0456\u043A_\u0440\u043E\u043A\u0438_\u0440\u043E\u043A\u0456\u0432"};return d==="m"?l?"\u0445\u0432\u0438\u043B\u0438\u043D\u0430":"\u0445\u0432\u0438\u043B\u0438\u043D\u0443":d==="h"?l?"\u0433\u043E\u0434\u0438\u043D\u0430":"\u0433\u043E\u0434\u0438\u043D\u0443":c+" "+t(p[d],+c)}function i(c,l){var d={nominative:"\u043D\u0435\u0434\u0456\u043B\u044F_\u043F\u043E\u043D\u0435\u0434\u0456\u043B\u043E\u043A_\u0432\u0456\u0432\u0442\u043E\u0440\u043E\u043A_\u0441\u0435\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440_\u043F\u2019\u044F\u0442\u043D\u0438\u0446\u044F_\u0441\u0443\u0431\u043E\u0442\u0430".split("_"),accusative:"\u043D\u0435\u0434\u0456\u043B\u044E_\u043F\u043E\u043D\u0435\u0434\u0456\u043B\u043E\u043A_\u0432\u0456\u0432\u0442\u043E\u0440\u043E\u043A_\u0441\u0435\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440_\u043F\u2019\u044F\u0442\u043D\u0438\u0446\u044E_\u0441\u0443\u0431\u043E\u0442\u0443".split("_"),genitive:"\u043D\u0435\u0434\u0456\u043B\u0456_\u043F\u043E\u043D\u0435\u0434\u0456\u043B\u043A\u0430_\u0432\u0456\u0432\u0442\u043E\u0440\u043A\u0430_\u0441\u0435\u0440\u0435\u0434\u0438_\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430_\u043F\u2019\u044F\u0442\u043D\u0438\u0446\u0456_\u0441\u0443\u0431\u043E\u0442\u0438".split("_")},p;return c===!0?d.nominative.slice(1,7).concat(d.nominative.slice(0,1)):c?(p=/(\[[ВвУу]\]) ?dddd/.test(l)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(l)?"genitive":"nominative",d[p][c.day()]):d.nominative}function o(c){return function(){return c+"\u043E"+(this.hours()===11?"\u0431":"")+"] LT"}}var u=r.defineLocale("uk",{months:{format:"\u0441\u0456\u0447\u043D\u044F_\u043B\u044E\u0442\u043E\u0433\u043E_\u0431\u0435\u0440\u0435\u0437\u043D\u044F_\u043A\u0432\u0456\u0442\u043D\u044F_\u0442\u0440\u0430\u0432\u043D\u044F_\u0447\u0435\u0440\u0432\u043D\u044F_\u043B\u0438\u043F\u043D\u044F_\u0441\u0435\u0440\u043F\u043D\u044F_\u0432\u0435\u0440\u0435\u0441\u043D\u044F_\u0436\u043E\u0432\u0442\u043D\u044F_\u043B\u0438\u0441\u0442\u043E\u043F\u0430\u0434\u0430_\u0433\u0440\u0443\u0434\u043D\u044F".split("_"),standalone:"\u0441\u0456\u0447\u0435\u043D\u044C_\u043B\u044E\u0442\u0438\u0439_\u0431\u0435\u0440\u0435\u0437\u0435\u043D\u044C_\u043A\u0432\u0456\u0442\u0435\u043D\u044C_\u0442\u0440\u0430\u0432\u0435\u043D\u044C_\u0447\u0435\u0440\u0432\u0435\u043D\u044C_\u043B\u0438\u043F\u0435\u043D\u044C_\u0441\u0435\u0440\u043F\u0435\u043D\u044C_\u0432\u0435\u0440\u0435\u0441\u0435\u043D\u044C_\u0436\u043E\u0432\u0442\u0435\u043D\u044C_\u043B\u0438\u0441\u0442\u043E\u043F\u0430\u0434_\u0433\u0440\u0443\u0434\u0435\u043D\u044C".split("_")},monthsShort:"\u0441\u0456\u0447_\u043B\u044E\u0442_\u0431\u0435\u0440_\u043A\u0432\u0456\u0442_\u0442\u0440\u0430\u0432_\u0447\u0435\u0440\u0432_\u043B\u0438\u043F_\u0441\u0435\u0440\u043F_\u0432\u0435\u0440_\u0436\u043E\u0432\u0442_\u043B\u0438\u0441\u0442_\u0433\u0440\u0443\u0434".split("_"),weekdays:i,weekdaysShort:"\u043D\u0434_\u043F\u043D_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043F\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043D\u0434_\u043F\u043D_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043F\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0440.",LLL:"D MMMM YYYY \u0440., HH:mm",LLLL:"dddd, D MMMM YYYY \u0440., HH:mm"},calendar:{sameDay:o("[\u0421\u044C\u043E\u0433\u043E\u0434\u043D\u0456 "),nextDay:o("[\u0417\u0430\u0432\u0442\u0440\u0430 "),lastDay:o("[\u0412\u0447\u043E\u0440\u0430 "),nextWeek:o("[\u0423] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return o("[\u041C\u0438\u043D\u0443\u043B\u043E\u0457] dddd [").call(this);case 1:case 2:case 4:return o("[\u041C\u0438\u043D\u0443\u043B\u043E\u0433\u043E] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"%s \u0442\u043E\u043C\u0443",s:"\u0434\u0435\u043A\u0456\u043B\u044C\u043A\u0430 \u0441\u0435\u043A\u0443\u043D\u0434",ss:a,m:a,mm:a,h:"\u0433\u043E\u0434\u0438\u043D\u0443",hh:a,d:"\u0434\u0435\u043D\u044C",dd:a,M:"\u043C\u0456\u0441\u044F\u0446\u044C",MM:a,y:"\u0440\u0456\u043A",yy:a},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(c){return/^(дня|вечора)$/.test(c)},meridiem:function(c,l,d){return c<4?"\u043D\u043E\u0447\u0456":c<12?"\u0440\u0430\u043D\u043A\u0443":c<17?"\u0434\u043D\u044F":"\u0432\u0435\u0447\u043E\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(c,l){switch(l){case"M":case"d":case"DDD":case"w":case"W":return c+"-\u0439";case"D":return c+"-\u0433\u043E";default:return c}},week:{dow:1,doy:7}});return u})},13795:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=["\u062C\u0646\u0648\u0631\u06CC","\u0641\u0631\u0648\u0631\u06CC","\u0645\u0627\u0631\u0686","\u0627\u067E\u0631\u06CC\u0644","\u0645\u0626\u06CC","\u062C\u0648\u0646","\u062C\u0648\u0644\u0627\u0626\u06CC","\u0627\u06AF\u0633\u062A","\u0633\u062A\u0645\u0628\u0631","\u0627\u06A9\u062A\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u062F\u0633\u0645\u0628\u0631"],a=["\u0627\u062A\u0648\u0627\u0631","\u067E\u06CC\u0631","\u0645\u0646\u06AF\u0644","\u0628\u062F\u06BE","\u062C\u0645\u0639\u0631\u0627\u062A","\u062C\u0645\u0639\u06C1","\u06C1\u0641\u062A\u06C1"],i=r.defineLocale("ur",{months:t,monthsShort:t,weekdays:a,weekdaysShort:a,weekdaysMin:a,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060C D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(o){return o==="\u0634\u0627\u0645"},meridiem:function(o,u,c){return o<12?"\u0635\u0628\u062D":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0622\u062C \u0628\u0648\u0642\u062A] LT",nextDay:"[\u06A9\u0644 \u0628\u0648\u0642\u062A] LT",nextWeek:"dddd [\u0628\u0648\u0642\u062A] LT",lastDay:"[\u06AF\u0630\u0634\u062A\u06C1 \u0631\u0648\u0632 \u0628\u0648\u0642\u062A] LT",lastWeek:"[\u06AF\u0630\u0634\u062A\u06C1] dddd [\u0628\u0648\u0642\u062A] LT",sameElse:"L"},relativeTime:{future:"%s \u0628\u0639\u062F",past:"%s \u0642\u0628\u0644",s:"\u0686\u0646\u062F \u0633\u06CC\u06A9\u0646\u0688",ss:"%d \u0633\u06CC\u06A9\u0646\u0688",m:"\u0627\u06CC\u06A9 \u0645\u0646\u0679",mm:"%d \u0645\u0646\u0679",h:"\u0627\u06CC\u06A9 \u06AF\u06BE\u0646\u0679\u06C1",hh:"%d \u06AF\u06BE\u0646\u0679\u06D2",d:"\u0627\u06CC\u06A9 \u062F\u0646",dd:"%d \u062F\u0646",M:"\u0627\u06CC\u06A9 \u0645\u0627\u06C1",MM:"%d \u0645\u0627\u06C1",y:"\u0627\u06CC\u06A9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(o){return o.replace(/،/g,",")},postformat:function(o){return o.replace(/,/g,"\u060C")},week:{dow:1,doy:4}});return i})},60588:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}});return t})},6791:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("uz",{months:"\u044F\u043D\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043B_\u043C\u0430\u0440\u0442_\u0430\u043F\u0440\u0435\u043B_\u043C\u0430\u0439_\u0438\u044E\u043D_\u0438\u044E\u043B_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043D\u0442\u044F\u0431\u0440_\u043E\u043A\u0442\u044F\u0431\u0440_\u043D\u043E\u044F\u0431\u0440_\u0434\u0435\u043A\u0430\u0431\u0440".split("_"),monthsShort:"\u044F\u043D\u0432_\u0444\u0435\u0432_\u043C\u0430\u0440_\u0430\u043F\u0440_\u043C\u0430\u0439_\u0438\u044E\u043D_\u0438\u044E\u043B_\u0430\u0432\u0433_\u0441\u0435\u043D_\u043E\u043A\u0442_\u043D\u043E\u044F_\u0434\u0435\u043A".split("_"),weekdays:"\u042F\u043A\u0448\u0430\u043D\u0431\u0430_\u0414\u0443\u0448\u0430\u043D\u0431\u0430_\u0421\u0435\u0448\u0430\u043D\u0431\u0430_\u0427\u043E\u0440\u0448\u0430\u043D\u0431\u0430_\u041F\u0430\u0439\u0448\u0430\u043D\u0431\u0430_\u0416\u0443\u043C\u0430_\u0428\u0430\u043D\u0431\u0430".split("_"),weekdaysShort:"\u042F\u043A\u0448_\u0414\u0443\u0448_\u0421\u0435\u0448_\u0427\u043E\u0440_\u041F\u0430\u0439_\u0416\u0443\u043C_\u0428\u0430\u043D".split("_"),weekdaysMin:"\u042F\u043A_\u0414\u0443_\u0421\u0435_\u0427\u043E_\u041F\u0430_\u0416\u0443_\u0428\u0430".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[\u0411\u0443\u0433\u0443\u043D \u0441\u043E\u0430\u0442] LT [\u0434\u0430]",nextDay:"[\u042D\u0440\u0442\u0430\u0433\u0430] LT [\u0434\u0430]",nextWeek:"dddd [\u043A\u0443\u043D\u0438 \u0441\u043E\u0430\u0442] LT [\u0434\u0430]",lastDay:"[\u041A\u0435\u0447\u0430 \u0441\u043E\u0430\u0442] LT [\u0434\u0430]",lastWeek:"[\u0423\u0442\u0433\u0430\u043D] dddd [\u043A\u0443\u043D\u0438 \u0441\u043E\u0430\u0442] LT [\u0434\u0430]",sameElse:"L"},relativeTime:{future:"\u042F\u043A\u0438\u043D %s \u0438\u0447\u0438\u0434\u0430",past:"\u0411\u0438\u0440 \u043D\u0435\u0447\u0430 %s \u043E\u043B\u0434\u0438\u043D",s:"\u0444\u0443\u0440\u0441\u0430\u0442",ss:"%d \u0444\u0443\u0440\u0441\u0430\u0442",m:"\u0431\u0438\u0440 \u0434\u0430\u043A\u0438\u043A\u0430",mm:"%d \u0434\u0430\u043A\u0438\u043A\u0430",h:"\u0431\u0438\u0440 \u0441\u043E\u0430\u0442",hh:"%d \u0441\u043E\u0430\u0442",d:"\u0431\u0438\u0440 \u043A\u0443\u043D",dd:"%d \u043A\u0443\u043D",M:"\u0431\u0438\u0440 \u043E\u0439",MM:"%d \u043E\u0439",y:"\u0431\u0438\u0440 \u0439\u0438\u043B",yy:"%d \u0439\u0438\u043B"},week:{dow:1,doy:7}});return t})},65666:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("vi",{months:"th\xE1ng 1_th\xE1ng 2_th\xE1ng 3_th\xE1ng 4_th\xE1ng 5_th\xE1ng 6_th\xE1ng 7_th\xE1ng 8_th\xE1ng 9_th\xE1ng 10_th\xE1ng 11_th\xE1ng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"ch\u1EE7 nh\u1EADt_th\u1EE9 hai_th\u1EE9 ba_th\u1EE9 t\u01B0_th\u1EE9 n\u0103m_th\u1EE9 s\xE1u_th\u1EE9 b\u1EA3y".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(a){return/^ch$/i.test(a)},meridiem:function(a,i,o){return a<12?o?"sa":"SA":o?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [n\u0103m] YYYY",LLL:"D MMMM [n\u0103m] YYYY HH:mm",LLLL:"dddd, D MMMM [n\u0103m] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[H\xF4m nay l\xFAc] LT",nextDay:"[Ng\xE0y mai l\xFAc] LT",nextWeek:"dddd [tu\u1EA7n t\u1EDBi l\xFAc] LT",lastDay:"[H\xF4m qua l\xFAc] LT",lastWeek:"dddd [tu\u1EA7n tr\u01B0\u1EDBc l\xFAc] LT",sameElse:"L"},relativeTime:{future:"%s t\u1EDBi",past:"%s tr\u01B0\u1EDBc",s:"v\xE0i gi\xE2y",ss:"%d gi\xE2y",m:"m\u1ED9t ph\xFAt",mm:"%d ph\xFAt",h:"m\u1ED9t gi\u1EDD",hh:"%d gi\u1EDD",d:"m\u1ED9t ng\xE0y",dd:"%d ng\xE0y",w:"m\u1ED9t tu\u1EA7n",ww:"%d tu\u1EA7n",M:"m\u1ED9t th\xE1ng",MM:"%d th\xE1ng",y:"m\u1ED9t n\u0103m",yy:"%d n\u0103m"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(a){return a},week:{dow:1,doy:4}});return t})},14378:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("x-pseudo",{months:"J~\xE1\xF1\xFA\xE1~r\xFD_F~\xE9br\xFA~\xE1r\xFD_~M\xE1rc~h_\xC1p~r\xEDl_~M\xE1\xFD_~J\xFA\xF1\xE9~_J\xFAl~\xFD_\xC1\xFA~g\xFAst~_S\xE9p~t\xE9mb~\xE9r_\xD3~ct\xF3b~\xE9r_\xD1~\xF3v\xE9m~b\xE9r_~D\xE9c\xE9~mb\xE9r".split("_"),monthsShort:"J~\xE1\xF1_~F\xE9b_~M\xE1r_~\xC1pr_~M\xE1\xFD_~J\xFA\xF1_~J\xFAl_~\xC1\xFAg_~S\xE9p_~\xD3ct_~\xD1\xF3v_~D\xE9c".split("_"),monthsParseExact:!0,weekdays:"S~\xFA\xF1d\xE1~\xFD_M\xF3~\xF1d\xE1\xFD~_T\xFA\xE9~sd\xE1\xFD~_W\xE9d~\xF1\xE9sd~\xE1\xFD_T~h\xFArs~d\xE1\xFD_~Fr\xEDd~\xE1\xFD_S~\xE1t\xFAr~d\xE1\xFD".split("_"),weekdaysShort:"S~\xFA\xF1_~M\xF3\xF1_~T\xFA\xE9_~W\xE9d_~Th\xFA_~Fr\xED_~S\xE1t".split("_"),weekdaysMin:"S~\xFA_M\xF3~_T\xFA_~W\xE9_T~h_Fr~_S\xE1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~\xF3d\xE1~\xFD \xE1t] LT",nextDay:"[T~\xF3m\xF3~rr\xF3~w \xE1t] LT",nextWeek:"dddd [\xE1t] LT",lastDay:"[\xDD~\xE9st~\xE9rd\xE1~\xFD \xE1t] LT",lastWeek:"[L~\xE1st] dddd [\xE1t] LT",sameElse:"L"},relativeTime:{future:"\xED~\xF1 %s",past:"%s \xE1~g\xF3",s:"\xE1 ~f\xE9w ~s\xE9c\xF3~\xF1ds",ss:"%d s~\xE9c\xF3\xF1~ds",m:"\xE1 ~m\xED\xF1~\xFAt\xE9",mm:"%d m~\xED\xF1\xFA~t\xE9s",h:"\xE1~\xF1 h\xF3~\xFAr",hh:"%d h~\xF3\xFArs",d:"\xE1 ~d\xE1\xFD",dd:"%d d~\xE1\xFDs",M:"\xE1 ~m\xF3\xF1~th",MM:"%d m~\xF3\xF1t~hs",y:"\xE1 ~\xFD\xE9\xE1r",yy:"%d \xFD~\xE9\xE1rs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var i=a%10,o=~~(a%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return a+o},week:{dow:1,doy:4}});return t})},75805:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("yo",{months:"S\u1EB9\u0301r\u1EB9\u0301_E\u0300re\u0300le\u0300_\u1EB8r\u1EB9\u0300na\u0300_I\u0300gbe\u0301_E\u0300bibi_O\u0300ku\u0300du_Ag\u1EB9mo_O\u0300gu\u0301n_Owewe_\u1ECC\u0300wa\u0300ra\u0300_Be\u0301lu\u0301_\u1ECC\u0300p\u1EB9\u0300\u0300".split("_"),monthsShort:"S\u1EB9\u0301r_E\u0300rl_\u1EB8rn_I\u0300gb_E\u0300bi_O\u0300ku\u0300_Ag\u1EB9_O\u0300gu\u0301_Owe_\u1ECC\u0300wa\u0300_Be\u0301l_\u1ECC\u0300p\u1EB9\u0300\u0300".split("_"),weekdays:"A\u0300i\u0300ku\u0301_Aje\u0301_I\u0300s\u1EB9\u0301gun_\u1ECCj\u1ECD\u0301ru\u0301_\u1ECCj\u1ECD\u0301b\u1ECD_\u1EB8ti\u0300_A\u0300ba\u0301m\u1EB9\u0301ta".split("_"),weekdaysShort:"A\u0300i\u0300k_Aje\u0301_I\u0300s\u1EB9\u0301_\u1ECCjr_\u1ECCjb_\u1EB8ti\u0300_A\u0300ba\u0301".split("_"),weekdaysMin:"A\u0300i\u0300_Aj_I\u0300s_\u1ECCr_\u1ECCb_\u1EB8t_A\u0300b".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[O\u0300ni\u0300 ni] LT",nextDay:"[\u1ECC\u0300la ni] LT",nextWeek:"dddd [\u1ECCs\u1EB9\u0300 to\u0301n'b\u1ECD] [ni] LT",lastDay:"[A\u0300na ni] LT",lastWeek:"dddd [\u1ECCs\u1EB9\u0300 to\u0301l\u1ECD\u0301] [ni] LT",sameElse:"L"},relativeTime:{future:"ni\u0301 %s",past:"%s k\u1ECDja\u0301",s:"i\u0300s\u1EB9ju\u0301 aaya\u0301 die",ss:"aaya\u0301 %d",m:"i\u0300s\u1EB9ju\u0301 kan",mm:"i\u0300s\u1EB9ju\u0301 %d",h:"wa\u0301kati kan",hh:"wa\u0301kati %d",d:"\u1ECDj\u1ECD\u0301 kan",dd:"\u1ECDj\u1ECD\u0301 %d",M:"osu\u0300 kan",MM:"osu\u0300 %d",y:"\u1ECDdu\u0301n kan",yy:"\u1ECDdu\u0301n %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"\u1ECDj\u1ECD\u0301 %d",week:{dow:1,doy:4}});return t})},83839:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("zh-cn",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5Ah\u70B9mm\u5206",LLLL:"YYYY\u5E74M\u6708D\u65E5ddddAh\u70B9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(a,i){return a===12&&(a=0),i==="\u51CC\u6668"||i==="\u65E9\u4E0A"||i==="\u4E0A\u5348"?a:i==="\u4E0B\u5348"||i==="\u665A\u4E0A"?a+12:a>=11?a:a+12},meridiem:function(a,i,o){var u=a*100+i;return u<600?"\u51CC\u6668":u<900?"\u65E9\u4E0A":u<1130?"\u4E0A\u5348":u<1230?"\u4E2D\u5348":u<1800?"\u4E0B\u5348":"\u665A\u4E0A"},calendar:{sameDay:"[\u4ECA\u5929]LT",nextDay:"[\u660E\u5929]LT",nextWeek:function(a){return a.week()!==this.week()?"[\u4E0B]dddLT":"[\u672C]dddLT"},lastDay:"[\u6628\u5929]LT",lastWeek:function(a){return this.week()!==a.week()?"[\u4E0A]dddLT":"[\u672C]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(a,i){switch(i){case"d":case"D":case"DDD":return a+"\u65E5";case"M":return a+"\u6708";case"w":case"W":return a+"\u5468";default:return a}},relativeTime:{future:"%s\u540E",past:"%s\u524D",s:"\u51E0\u79D2",ss:"%d \u79D2",m:"1 \u5206\u949F",mm:"%d \u5206\u949F",h:"1 \u5C0F\u65F6",hh:"%d \u5C0F\u65F6",d:"1 \u5929",dd:"%d \u5929",w:"1 \u5468",ww:"%d \u5468",M:"1 \u4E2A\u6708",MM:"%d \u4E2A\u6708",y:"1 \u5E74",yy:"%d \u5E74"},week:{dow:1,doy:4}});return t})},55726:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("zh-hk",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u9031\u65E5_\u9031\u4E00_\u9031\u4E8C_\u9031\u4E09_\u9031\u56DB_\u9031\u4E94_\u9031\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5 HH:mm",LLLL:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(a,i){if(a===12&&(a=0),i==="\u51CC\u6668"||i==="\u65E9\u4E0A"||i==="\u4E0A\u5348")return a;if(i==="\u4E2D\u5348")return a>=11?a:a+12;if(i==="\u4E0B\u5348"||i==="\u665A\u4E0A")return a+12},meridiem:function(a,i,o){var u=a*100+i;return u<600?"\u51CC\u6668":u<900?"\u65E9\u4E0A":u<1200?"\u4E0A\u5348":u===1200?"\u4E2D\u5348":u<1800?"\u4E0B\u5348":"\u665A\u4E0A"},calendar:{sameDay:"[\u4ECA\u5929]LT",nextDay:"[\u660E\u5929]LT",nextWeek:"[\u4E0B]ddddLT",lastDay:"[\u6628\u5929]LT",lastWeek:"[\u4E0A]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(a,i){switch(i){case"d":case"D":case"DDD":return a+"\u65E5";case"M":return a+"\u6708";case"w":case"W":return a+"\u9031";default:return a}},relativeTime:{future:"%s\u5F8C",past:"%s\u524D",s:"\u5E7E\u79D2",ss:"%d \u79D2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5C0F\u6642",hh:"%d \u5C0F\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500B\u6708",MM:"%d \u500B\u6708",y:"1 \u5E74",yy:"%d \u5E74"}});return t})},99807:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("zh-mo",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u9031\u65E5_\u9031\u4E00_\u9031\u4E8C_\u9031\u4E09_\u9031\u56DB_\u9031\u4E94_\u9031\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5 HH:mm",LLLL:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm",l:"D/M/YYYY",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(a,i){if(a===12&&(a=0),i==="\u51CC\u6668"||i==="\u65E9\u4E0A"||i==="\u4E0A\u5348")return a;if(i==="\u4E2D\u5348")return a>=11?a:a+12;if(i==="\u4E0B\u5348"||i==="\u665A\u4E0A")return a+12},meridiem:function(a,i,o){var u=a*100+i;return u<600?"\u51CC\u6668":u<900?"\u65E9\u4E0A":u<1130?"\u4E0A\u5348":u<1230?"\u4E2D\u5348":u<1800?"\u4E0B\u5348":"\u665A\u4E0A"},calendar:{sameDay:"[\u4ECA\u5929] LT",nextDay:"[\u660E\u5929] LT",nextWeek:"[\u4E0B]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4E0A]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(a,i){switch(i){case"d":case"D":case"DDD":return a+"\u65E5";case"M":return a+"\u6708";case"w":case"W":return a+"\u9031";default:return a}},relativeTime:{future:"%s\u5167",past:"%s\u524D",s:"\u5E7E\u79D2",ss:"%d \u79D2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5C0F\u6642",hh:"%d \u5C0F\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500B\u6708",MM:"%d \u500B\u6708",y:"1 \u5E74",yy:"%d \u5E74"}});return t})},74152:function(f,v,e){(function(r,t){t(e(30381))})(this,function(r){"use strict";var t=r.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u9031\u65E5_\u9031\u4E00_\u9031\u4E8C_\u9031\u4E09_\u9031\u56DB_\u9031\u4E94_\u9031\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5 HH:mm",LLLL:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(a,i){if(a===12&&(a=0),i==="\u51CC\u6668"||i==="\u65E9\u4E0A"||i==="\u4E0A\u5348")return a;if(i==="\u4E2D\u5348")return a>=11?a:a+12;if(i==="\u4E0B\u5348"||i==="\u665A\u4E0A")return a+12},meridiem:function(a,i,o){var u=a*100+i;return u<600?"\u51CC\u6668":u<900?"\u65E9\u4E0A":u<1130?"\u4E0A\u5348":u<1230?"\u4E2D\u5348":u<1800?"\u4E0B\u5348":"\u665A\u4E0A"},calendar:{sameDay:"[\u4ECA\u5929] LT",nextDay:"[\u660E\u5929] LT",nextWeek:"[\u4E0B]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4E0A]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(a,i){switch(i){case"d":case"D":case"DDD":return a+"\u65E5";case"M":return a+"\u6708";case"w":case"W":return a+"\u9031";default:return a}},relativeTime:{future:"%s\u5F8C",past:"%s\u524D",s:"\u5E7E\u79D2",ss:"%d \u79D2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5C0F\u6642",hh:"%d \u5C0F\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500B\u6708",MM:"%d \u500B\u6708",y:"1 \u5E74",yy:"%d \u5E74"}});return t})},46700:function(f,v,e){var r={"./af":42786,"./af.js":42786,"./ar":30867,"./ar-dz":14130,"./ar-dz.js":14130,"./ar-kw":96135,"./ar-kw.js":96135,"./ar-ly":56440,"./ar-ly.js":56440,"./ar-ma":47702,"./ar-ma.js":47702,"./ar-sa":16040,"./ar-sa.js":16040,"./ar-tn":37100,"./ar-tn.js":37100,"./ar.js":30867,"./az":31083,"./az.js":31083,"./be":9808,"./be.js":9808,"./bg":68338,"./bg.js":68338,"./bm":67438,"./bm.js":67438,"./bn":8905,"./bn-bd":76225,"./bn-bd.js":76225,"./bn.js":8905,"./bo":11560,"./bo.js":11560,"./br":1278,"./br.js":1278,"./bs":80622,"./bs.js":80622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":50877,"./cv.js":50877,"./cy":47373,"./cy.js":47373,"./da":24780,"./da.js":24780,"./de":59740,"./de-at":60217,"./de-at.js":60217,"./de-ch":60894,"./de-ch.js":60894,"./de.js":59740,"./dv":5300,"./dv.js":5300,"./el":50837,"./el.js":50837,"./en-au":78348,"./en-au.js":78348,"./en-ca":77925,"./en-ca.js":77925,"./en-gb":22243,"./en-gb.js":22243,"./en-ie":46436,"./en-ie.js":46436,"./en-il":47207,"./en-il.js":47207,"./en-in":44175,"./en-in.js":44175,"./en-nz":76319,"./en-nz.js":76319,"./en-sg":31662,"./en-sg.js":31662,"./eo":92915,"./eo.js":92915,"./es":55655,"./es-do":55251,"./es-do.js":55251,"./es-mx":96112,"./es-mx.js":96112,"./es-us":71146,"./es-us.js":71146,"./es.js":55655,"./et":5603,"./et.js":5603,"./eu":77763,"./eu.js":77763,"./fa":76959,"./fa.js":76959,"./fi":11897,"./fi.js":11897,"./fil":42549,"./fil.js":42549,"./fo":94694,"./fo.js":94694,"./fr":94470,"./fr-ca":63049,"./fr-ca.js":63049,"./fr-ch":52330,"./fr-ch.js":52330,"./fr.js":94470,"./fy":5044,"./fy.js":5044,"./ga":29295,"./ga.js":29295,"./gd":2101,"./gd.js":2101,"./gl":38794,"./gl.js":38794,"./gom-deva":27884,"./gom-deva.js":27884,"./gom-latn":23168,"./gom-latn.js":23168,"./gu":95349,"./gu.js":95349,"./he":24206,"./he.js":24206,"./hi":30094,"./hi.js":30094,"./hr":30316,"./hr.js":30316,"./hu":22138,"./hu.js":22138,"./hy-am":11423,"./hy-am.js":11423,"./id":29218,"./id.js":29218,"./is":90135,"./is.js":90135,"./it":90626,"./it-ch":10150,"./it-ch.js":10150,"./it.js":90626,"./ja":39183,"./ja.js":39183,"./jv":24286,"./jv.js":24286,"./ka":12105,"./ka.js":12105,"./kk":47772,"./kk.js":47772,"./km":18758,"./km.js":18758,"./kn":79282,"./kn.js":79282,"./ko":33730,"./ko.js":33730,"./ku":1408,"./ku.js":1408,"./ky":33291,"./ky.js":33291,"./lb":36841,"./lb.js":36841,"./lo":55466,"./lo.js":55466,"./lt":57010,"./lt.js":57010,"./lv":37595,"./lv.js":37595,"./me":39861,"./me.js":39861,"./mi":35493,"./mi.js":35493,"./mk":95966,"./mk.js":95966,"./ml":87341,"./ml.js":87341,"./mn":5115,"./mn.js":5115,"./mr":10370,"./mr.js":10370,"./ms":9847,"./ms-my":41237,"./ms-my.js":41237,"./ms.js":9847,"./mt":72126,"./mt.js":72126,"./my":56165,"./my.js":56165,"./nb":64924,"./nb.js":64924,"./ne":16744,"./ne.js":16744,"./nl":93901,"./nl-be":59814,"./nl-be.js":59814,"./nl.js":93901,"./nn":83877,"./nn.js":83877,"./oc-lnc":92135,"./oc-lnc.js":92135,"./pa-in":15858,"./pa-in.js":15858,"./pl":64495,"./pl.js":64495,"./pt":89520,"./pt-br":57971,"./pt-br.js":57971,"./pt.js":89520,"./ro":96459,"./ro.js":96459,"./ru":21793,"./ru.js":21793,"./sd":40950,"./sd.js":40950,"./se":37930,"./se.js":37930,"./si":90124,"./si.js":90124,"./sk":64249,"./sk.js":64249,"./sl":14985,"./sl.js":14985,"./sq":51104,"./sq.js":51104,"./sr":49131,"./sr-cyrl":79915,"./sr-cyrl.js":79915,"./sr.js":49131,"./ss":95606,"./ss.js":95606,"./sv":98760,"./sv.js":98760,"./sw":91172,"./sw.js":91172,"./ta":27333,"./ta.js":27333,"./te":23110,"./te.js":23110,"./tet":52095,"./tet.js":52095,"./tg":27321,"./tg.js":27321,"./th":9041,"./th.js":9041,"./tk":19005,"./tk.js":19005,"./tl-ph":75768,"./tl-ph.js":75768,"./tlh":89444,"./tlh.js":89444,"./tr":72397,"./tr.js":72397,"./tzl":28254,"./tzl.js":28254,"./tzm":51106,"./tzm-latn":30699,"./tzm-latn.js":30699,"./tzm.js":51106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":67691,"./uk.js":67691,"./ur":13795,"./ur.js":13795,"./uz":6791,"./uz-latn":60588,"./uz-latn.js":60588,"./uz.js":6791,"./vi":65666,"./vi.js":65666,"./x-pseudo":14378,"./x-pseudo.js":14378,"./yo":75805,"./yo.js":75805,"./zh-cn":83839,"./zh-cn.js":83839,"./zh-hk":55726,"./zh-hk.js":55726,"./zh-mo":99807,"./zh-mo.js":99807,"./zh-tw":74152,"./zh-tw.js":74152};function t(i){var o=a(i);return e(o)}function a(i){if(!e.o(r,i)){var o=new Error("Cannot find module '"+i+"'");throw o.code="MODULE_NOT_FOUND",o}return r[i]}t.keys=function(){return Object.keys(r)},t.resolve=a,f.exports=t,t.id=46700},30381:function(f,v,e){f=e.nmd(f);(function(r,t){f.exports=t()})(this,function(){"use strict";var r;function t(){return r.apply(null,arguments)}function a(h){r=h}function i(h){return h instanceof Array||Object.prototype.toString.call(h)==="[object Array]"}function o(h){return h!=null&&Object.prototype.toString.call(h)==="[object Object]"}function u(h,E){return Object.prototype.hasOwnProperty.call(h,E)}function c(h){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(h).length===0;var E;for(E in h)if(u(h,E))return!1;return!0}function l(h){return h===void 0}function d(h){return typeof h=="number"||Object.prototype.toString.call(h)==="[object Number]"}function p(h){return h instanceof Date||Object.prototype.toString.call(h)==="[object Date]"}function M(h,E){var ae=[],Se,Ge=h.length;for(Se=0;Se>>0,Se;for(Se=0;Se0)for(ae=0;ae=0;return(Nt?ae?"+":"":"-")+Math.pow(10,Math.max(0,Ge)).toString().substr(1)+Se}var K=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ie=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,me={},Ze={};function De(h,E,ae,Se){var Ge=Se;typeof Se=="string"&&(Ge=function(){return this[Se]()}),h&&(Ze[h]=Ge),E&&(Ze[E[0]]=function(){return re(Ge.apply(this,arguments),E[1],E[2])}),ae&&(Ze[ae]=function(){return this.localeData().ordinal(Ge.apply(this,arguments),h)})}function Fe(h){return h.match(/\[[\s\S]/)?h.replace(/^\[|\]$/g,""):h.replace(/\\/g,"")}function mt(h){var E=h.match(K),ae,Se;for(ae=0,Se=E.length;ae=0&&ie.test(h);)h=h.replace(ie,Se),ie.lastIndex=0,ae-=1;return h}var Et={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ct(h){var E=this._longDateFormat[h],ae=this._longDateFormat[h.toUpperCase()];return E||!ae?E:(this._longDateFormat[h]=ae.match(K).map(function(Se){return Se==="MMMM"||Se==="MM"||Se==="DD"||Se==="dddd"?Se.slice(1):Se}).join(""),this._longDateFormat[h])}var jt="Invalid date";function Tt(){return this._invalidDate}var Wt="%d",Bt=/\d{1,2}/;function Ht(h){return this._ordinal.replace("%d",h)}var rr={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Sr(h,E,ae,Se){var Ge=this._relativeTime[ae];return ce(Ge)?Ge(h,E,ae,Se):Ge.replace(/%d/i,h)}function Ar(h,E){var ae=this._relativeTime[h>0?"future":"past"];return ce(ae)?ae(E):ae.replace(/%s/i,E)}var ye={};function T(h,E){var ae=h.toLowerCase();ye[ae]=ye[ae+"s"]=ye[E]=h}function b(h){return typeof h=="string"?ye[h]||ye[h.toLowerCase()]:void 0}function q(h){var E={},ae,Se;for(Se in h)u(h,Se)&&(ae=b(Se),ae&&(E[ae]=h[Se]));return E}var Ce={};function le(h,E){Ce[h]=E}function fe(h){var E=[],ae;for(ae in h)u(h,ae)&&E.push({unit:ae,priority:Ce[ae]});return E.sort(function(Se,Ge){return Se.priority-Ge.priority}),E}function pe(h){return h%4===0&&h%100!==0||h%400===0}function Re(h){return h<0?Math.ceil(h)||0:Math.floor(h)}function X(h){var E=+h,ae=0;return E!==0&&isFinite(E)&&(ae=Re(E)),ae}function je(h,E){return function(ae){return ae!=null?(tt(this,h,ae),t.updateOffset(this,E),this):He(this,h)}}function He(h,E){return h.isValid()?h._d["get"+(h._isUTC?"UTC":"")+E]():NaN}function tt(h,E,ae){h.isValid()&&!isNaN(ae)&&(E==="FullYear"&&pe(h.year())&&h.month()===1&&h.date()===29?(ae=X(ae),h._d["set"+(h._isUTC?"UTC":"")+E](ae,h.month(),xn(ae,h.month()))):h._d["set"+(h._isUTC?"UTC":"")+E](ae))}function We(h){return h=b(h),ce(this[h])?this[h]():this}function Ue(h,E){if(typeof h=="object"){h=q(h);var ae=fe(h),Se,Ge=ae.length;for(Se=0;Se68?1900:2e3)};var gn=je("FullYear",!0);function cn(){return pe(this.year())}function yn(h,E,ae,Se,Ge,Nt,gr){var Nn;return h<100&&h>=0?(Nn=new Date(h+400,E,ae,Se,Ge,Nt,gr),isFinite(Nn.getFullYear())&&Nn.setFullYear(h)):Nn=new Date(h,E,ae,Se,Ge,Nt,gr),Nn}function dn(h){var E,ae;return h<100&&h>=0?(ae=Array.prototype.slice.call(arguments),ae[0]=h+400,E=new Date(Date.UTC.apply(null,ae)),isFinite(E.getUTCFullYear())&&E.setUTCFullYear(h)):E=new Date(Date.UTC.apply(null,arguments)),E}function Yn(h,E,ae){var Se=7+E-ae,Ge=(7+dn(h,0,Se).getUTCDay()-E)%7;return-Ge+Se-1}function Dn(h,E,ae,Se,Ge){var Nt=(7+ae-Se)%7,gr=Yn(h,Se,Ge),Nn=1+7*(E-1)+Nt+gr,la,Ca;return Nn<=0?(la=h-1,Ca=Fr(la)+Nn):Nn>Fr(h)?(la=h+1,Ca=Nn-Fr(h)):(la=h,Ca=Nn),{year:la,dayOfYear:Ca}}function sn(h,E,ae){var Se=Yn(h.year(),E,ae),Ge=Math.floor((h.dayOfYear()-Se-1)/7)+1,Nt,gr;return Ge<1?(gr=h.year()-1,Nt=Ge+ln(gr,E,ae)):Ge>ln(h.year(),E,ae)?(Nt=Ge-ln(h.year(),E,ae),gr=h.year()+1):(gr=h.year(),Nt=Ge),{week:Nt,year:gr}}function ln(h,E,ae){var Se=Yn(h,E,ae),Ge=Yn(h+1,E,ae);return(Fr(h)-Se+Ge)/7}De("w",["ww",2],"wo","week"),De("W",["WW",2],"Wo","isoWeek"),T("week","w"),T("isoWeek","W"),le("week",5),le("isoWeek",5),dt("w",ue),dt("ww",ue,$e),dt("W",ue),dt("WW",ue,$e),Rr(["w","ww","W","WW"],function(h,E,ae,Se){E[Se.substr(0,1)]=X(h)});function _n(h){return sn(h,this._week.dow,this._week.doy).week}var Mn={dow:0,doy:6};function Ur(){return this._week.dow}function ea(){return this._week.doy}function ca(h){var E=this.localeData().week(this);return h==null?E:this.add((h-E)*7,"d")}function da(h){var E=sn(this,1,4).week;return h==null?E:this.add((h-E)*7,"d")}De("d",0,"do","day"),De("dd",0,0,function(h){return this.localeData().weekdaysMin(this,h)}),De("ddd",0,0,function(h){return this.localeData().weekdaysShort(this,h)}),De("dddd",0,0,function(h){return this.localeData().weekdays(this,h)}),De("e",0,0,"weekday"),De("E",0,0,"isoWeekday"),T("day","d"),T("weekday","e"),T("isoWeekday","E"),le("day",11),le("weekday",11),le("isoWeekday",11),dt("d",ue),dt("e",ue),dt("E",ue),dt("dd",function(h,E){return E.weekdaysMinRegex(h)}),dt("ddd",function(h,E){return E.weekdaysShortRegex(h)}),dt("dddd",function(h,E){return E.weekdaysRegex(h)}),Rr(["dd","ddd","dddd"],function(h,E,ae,Se){var Ge=ae._locale.weekdaysParse(h,Se,ae._strict);Ge!=null?E.d=Ge:S(ae).invalidWeekday=h}),Rr(["d","e","E"],function(h,E,ae,Se){E[Se]=X(h)});function Ia(h,E){return typeof h!="string"?h:isNaN(h)?(h=E.weekdaysParse(h),typeof h=="number"?h:null):parseInt(h,10)}function ka(h,E){return typeof h=="string"?E.weekdaysParse(h)%7||7:isNaN(h)?null:h}function na(h,E){return h.slice(E,7).concat(h.slice(0,E))}var Za="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),gt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Oe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),C=ot,G=ot,B=ot;function be(h,E){var ae=i(this._weekdays)?this._weekdays:this._weekdays[h&&h!==!0&&this._weekdays.isFormat.test(E)?"format":"standalone"];return h===!0?na(ae,this._week.dow):h?ae[h.day()]:ae}function ke(h){return h===!0?na(this._weekdaysShort,this._week.dow):h?this._weekdaysShort[h.day()]:this._weekdaysShort}function Qe(h){return h===!0?na(this._weekdaysMin,this._week.dow):h?this._weekdaysMin[h.day()]:this._weekdaysMin}function ge(h,E,ae){var Se,Ge,Nt,gr=h.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],Se=0;Se<7;++Se)Nt=y([2e3,1]).day(Se),this._minWeekdaysParse[Se]=this.weekdaysMin(Nt,"").toLocaleLowerCase(),this._shortWeekdaysParse[Se]=this.weekdaysShort(Nt,"").toLocaleLowerCase(),this._weekdaysParse[Se]=this.weekdays(Nt,"").toLocaleLowerCase();return ae?E==="dddd"?(Ge=mn.call(this._weekdaysParse,gr),Ge!==-1?Ge:null):E==="ddd"?(Ge=mn.call(this._shortWeekdaysParse,gr),Ge!==-1?Ge:null):(Ge=mn.call(this._minWeekdaysParse,gr),Ge!==-1?Ge:null):E==="dddd"?(Ge=mn.call(this._weekdaysParse,gr),Ge!==-1||(Ge=mn.call(this._shortWeekdaysParse,gr),Ge!==-1)?Ge:(Ge=mn.call(this._minWeekdaysParse,gr),Ge!==-1?Ge:null)):E==="ddd"?(Ge=mn.call(this._shortWeekdaysParse,gr),Ge!==-1||(Ge=mn.call(this._weekdaysParse,gr),Ge!==-1)?Ge:(Ge=mn.call(this._minWeekdaysParse,gr),Ge!==-1?Ge:null)):(Ge=mn.call(this._minWeekdaysParse,gr),Ge!==-1||(Ge=mn.call(this._weekdaysParse,gr),Ge!==-1)?Ge:(Ge=mn.call(this._shortWeekdaysParse,gr),Ge!==-1?Ge:null))}function ft(h,E,ae){var Se,Ge,Nt;if(this._weekdaysParseExact)return ge.call(this,h,E,ae);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),Se=0;Se<7;Se++){if(Ge=y([2e3,1]).day(Se),ae&&!this._fullWeekdaysParse[Se]&&(this._fullWeekdaysParse[Se]=new RegExp("^"+this.weekdays(Ge,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[Se]=new RegExp("^"+this.weekdaysShort(Ge,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[Se]=new RegExp("^"+this.weekdaysMin(Ge,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[Se]||(Nt="^"+this.weekdays(Ge,"")+"|^"+this.weekdaysShort(Ge,"")+"|^"+this.weekdaysMin(Ge,""),this._weekdaysParse[Se]=new RegExp(Nt.replace(".",""),"i")),ae&&E==="dddd"&&this._fullWeekdaysParse[Se].test(h))return Se;if(ae&&E==="ddd"&&this._shortWeekdaysParse[Se].test(h))return Se;if(ae&&E==="dd"&&this._minWeekdaysParse[Se].test(h))return Se;if(!ae&&this._weekdaysParse[Se].test(h))return Se}}function rt(h){if(!this.isValid())return h!=null?this:NaN;var E=this._isUTC?this._d.getUTCDay():this._d.getDay();return h!=null?(h=Ia(h,this.localeData()),this.add(h-E,"d")):E}function At(h){if(!this.isValid())return h!=null?this:NaN;var E=(this.day()+7-this.localeData()._week.dow)%7;return h==null?E:this.add(h-E,"d")}function qt(h){if(!this.isValid())return h!=null?this:NaN;if(h!=null){var E=ka(h,this.localeData());return this.day(this.day()%7?E:E-7)}else return this.day()||7}function Lr(h){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Jt.call(this),h?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=C),this._weekdaysStrictRegex&&h?this._weekdaysStrictRegex:this._weekdaysRegex)}function hr(h){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Jt.call(this),h?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=G),this._weekdaysShortStrictRegex&&h?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Qt(h){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Jt.call(this),h?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=B),this._weekdaysMinStrictRegex&&h?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Jt(){function h(Va,Xi){return Xi.length-Va.length}var E=[],ae=[],Se=[],Ge=[],Nt,gr,Nn,la,Ca;for(Nt=0;Nt<7;Nt++)gr=y([2e3,1]).day(Nt),Nn=Ut(this.weekdaysMin(gr,"")),la=Ut(this.weekdaysShort(gr,"")),Ca=Ut(this.weekdays(gr,"")),E.push(Nn),ae.push(la),Se.push(Ca),Ge.push(Nn),Ge.push(la),Ge.push(Ca);E.sort(h),ae.sort(h),Se.sort(h),Ge.sort(h),this._weekdaysRegex=new RegExp("^("+Ge.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+Se.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+ae.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+E.join("|")+")","i")}function nr(){return this.hours()%12||12}function Nr(){return this.hours()||24}De("H",["HH",2],0,"hour"),De("h",["hh",2],0,nr),De("k",["kk",2],0,Nr),De("hmm",0,0,function(){return""+nr.apply(this)+re(this.minutes(),2)}),De("hmmss",0,0,function(){return""+nr.apply(this)+re(this.minutes(),2)+re(this.seconds(),2)}),De("Hmm",0,0,function(){return""+this.hours()+re(this.minutes(),2)}),De("Hmmss",0,0,function(){return""+this.hours()+re(this.minutes(),2)+re(this.seconds(),2)});function Yr(h,E){De(h,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),E)})}Yr("a",!0),Yr("A",!1),T("hour","h"),le("hour",13);function Hr(h,E){return E._meridiemParse}dt("a",Hr),dt("A",Hr),dt("H",ue),dt("h",ue),dt("k",ue),dt("HH",ue,$e),dt("hh",ue,$e),dt("kk",ue,$e),dt("hmm",Ye),dt("hmmss",Ve),dt("Hmm",Ye),dt("Hmmss",Ve),ir(["H","HH"],Pr),ir(["k","kk"],function(h,E,ae){var Se=X(h);E[Pr]=Se===24?0:Se}),ir(["a","A"],function(h,E,ae){ae._isPm=ae._locale.isPM(h),ae._meridiem=h}),ir(["h","hh"],function(h,E,ae){E[Pr]=X(h),S(ae).bigHour=!0}),ir("hmm",function(h,E,ae){var Se=h.length-2;E[Pr]=X(h.substr(0,Se)),E[nn]=X(h.substr(Se)),S(ae).bigHour=!0}),ir("hmmss",function(h,E,ae){var Se=h.length-4,Ge=h.length-2;E[Pr]=X(h.substr(0,Se)),E[nn]=X(h.substr(Se,2)),E[qr]=X(h.substr(Ge)),S(ae).bigHour=!0}),ir("Hmm",function(h,E,ae){var Se=h.length-2;E[Pr]=X(h.substr(0,Se)),E[nn]=X(h.substr(Se))}),ir("Hmmss",function(h,E,ae){var Se=h.length-4,Ge=h.length-2;E[Pr]=X(h.substr(0,Se)),E[nn]=X(h.substr(Se,2)),E[qr]=X(h.substr(Ge))});function an(h){return(h+"").toLowerCase().charAt(0)==="p"}var tn=/[ap]\.?m?\.?/i,bn=je("Hours",!0);function vn(h,E,ae){return h>11?ae?"pm":"PM":ae?"am":"AM"}var Ln={calendar:L,longDateFormat:Et,invalidDate:jt,ordinal:Wt,dayOfMonthOrdinalParse:Bt,relativeTime:rr,months:en,monthsShort:Wn,week:Mn,weekdays:Za,weekdaysMin:Oe,weekdaysShort:gt,meridiemParse:tn},we={},qe={},z;function Mt(h,E){var ae,Se=Math.min(h.length,E.length);for(ae=0;ae0;){if(Ge=xr(Nt.slice(0,ae).join("-")),Ge)return Ge;if(Se&&Se.length>=ae&&Mt(Nt,Se)>=ae-1)break;ae--}E++}return z}function vr(h){return h.match("^[^/\\\\]*$")!=null}function xr(h){var E=null,ae;if(we[h]===void 0&&!0&&f&&f.exports&&vr(h))try{E=z._abbr,ae=void 0,e(46700)("./"+h),Br(E)}catch(Se){we[h]=null}return we[h]}function Br(h,E){var ae;return h&&(l(E)?ae=Cr(h):ae=On(h,E),ae?z=ae:typeof console!="undefined"&&console.warn&&console.warn("Locale "+h+" not found. Did you forget to load it?")),z._abbr}function On(h,E){if(E!==null){var ae,Se=Ln;if(E.abbr=h,we[h]!=null)ve("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),Se=we[h]._config;else if(E.parentLocale!=null)if(we[E.parentLocale]!=null)Se=we[E.parentLocale]._config;else if(ae=xr(E.parentLocale),ae!=null)Se=ae._config;else return qe[E.parentLocale]||(qe[E.parentLocale]=[]),qe[E.parentLocale].push({name:h,config:E}),null;return we[h]=new V(Q(Se,E)),qe[h]&&qe[h].forEach(function(Ge){On(Ge.name,Ge.config)}),Br(h),we[h]}else return delete we[h],null}function Dr(h,E){if(E!=null){var ae,Se,Ge=Ln;we[h]!=null&&we[h].parentLocale!=null?we[h].set(Q(we[h]._config,E)):(Se=xr(h),Se!=null&&(Ge=Se._config),E=Q(Ge,E),Se==null&&(E.abbr=h),ae=new V(E),ae.parentLocale=we[h],we[h]=ae),Br(h)}else we[h]!=null&&(we[h].parentLocale!=null?(we[h]=we[h].parentLocale,h===Br()&&Br(h)):we[h]!=null&&delete we[h]);return we[h]}function Cr(h){var E;if(h&&h._locale&&h._locale._abbr&&(h=h._locale._abbr),!h)return z;if(!i(h)){if(E=xr(h),E)return E;h=[h]}return or(h)}function zr(){return W(we)}function un(h){var E,ae=h._a;return ae&&S(h).overflow===-2&&(E=ae[Vr]<0||ae[Vr]>11?Vr:ae[Qr]<1||ae[Qr]>xn(ae[wr],ae[Vr])?Qr:ae[Pr]<0||ae[Pr]>24||ae[Pr]===24&&(ae[nn]!==0||ae[qr]!==0||ae[fn]!==0)?Pr:ae[nn]<0||ae[nn]>59?nn:ae[qr]<0||ae[qr]>59?qr:ae[fn]<0||ae[fn]>999?fn:-1,S(h)._overflowDayOfYear&&(EQr)&&(E=Qr),S(h)._overflowWeeks&&E===-1&&(E=Zn),S(h)._overflowWeekday&&E===-1&&(E=Gn),S(h).overflow=E),h}var kn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,sa=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ba=/Z|[+-]\d\d(?::?\d\d)?/,za=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ka=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ba=/^\/?Date\((-?\d+)/i,Fa=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,hi={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Gr(h){var E,ae,Se=h._i,Ge=kn.exec(Se)||sa.exec(Se),Nt,gr,Nn,la,Ca=za.length,Va=Ka.length;if(Ge){for(S(h).iso=!0,E=0,ae=Ca;EFr(gr)||h._dayOfYear===0)&&(S(h)._overflowDayOfYear=!0),ae=dn(gr,0,h._dayOfYear),h._a[Vr]=ae.getUTCMonth(),h._a[Qr]=ae.getUTCDate()),E=0;E<3&&h._a[E]==null;++E)h._a[E]=Se[E]=Ge[E];for(;E<7;E++)h._a[E]=Se[E]=h._a[E]==null?E===2?1:0:h._a[E];h._a[Pr]===24&&h._a[nn]===0&&h._a[qr]===0&&h._a[fn]===0&&(h._nextDay=!0,h._a[Pr]=0),h._d=(h._useUTC?dn:yn).apply(null,Se),Nt=h._useUTC?h._d.getUTCDay():h._d.getDay(),h._tzm!=null&&h._d.setUTCMinutes(h._d.getUTCMinutes()-h._tzm),h._nextDay&&(h._a[Pr]=24),h._w&&typeof h._w.d!="undefined"&&h._w.d!==Nt&&(S(h).weekdayMismatch=!0)}}function Y(h){var E,ae,Se,Ge,Nt,gr,Nn,la,Ca;E=h._w,E.GG!=null||E.W!=null||E.E!=null?(Nt=1,gr=4,ae=Ga(E.GG,h._a[wr],sn(at(),1,4).year),Se=Ga(E.W,1),Ge=Ga(E.E,1),(Ge<1||Ge>7)&&(la=!0)):(Nt=h._locale._week.dow,gr=h._locale._week.doy,Ca=sn(at(),Nt,gr),ae=Ga(E.gg,h._a[wr],Ca.year),Se=Ga(E.w,Ca.week),E.d!=null?(Ge=E.d,(Ge<0||Ge>6)&&(la=!0)):E.e!=null?(Ge=E.e+Nt,(E.e<0||E.e>6)&&(la=!0)):Ge=Nt),Se<1||Se>ln(ae,Nt,gr)?S(h)._overflowWeeks=!0:la!=null?S(h)._overflowWeekday=!0:(Nn=Dn(ae,Se,Ge,Nt,gr),h._a[wr]=Nn.year,h._dayOfYear=Nn.dayOfYear)}t.ISO_8601=function(){},t.RFC_2822=function(){};function w(h){if(h._f===t.ISO_8601){Gr(h);return}if(h._f===t.RFC_2822){Ra(h);return}h._a=[],S(h).empty=!0;var E=""+h._i,ae,Se,Ge,Nt,gr,Nn=E.length,la=0,Ca,Va;for(Ge=xt(h._f,h._locale).match(K)||[],Va=Ge.length,ae=0;ae0&&S(h).unusedInput.push(gr),E=E.slice(E.indexOf(Se)+Se.length),la+=Se.length),Ze[Nt]?(Se?S(h).empty=!1:S(h).unusedTokens.push(Nt),dr(Nt,Se,h)):h._strict&&!Se&&S(h).unusedTokens.push(Nt);S(h).charsLeftOver=Nn-la,E.length>0&&S(h).unusedInput.push(E),h._a[Pr]<=12&&S(h).bigHour===!0&&h._a[Pr]>0&&(S(h).bigHour=void 0),S(h).parsedDateParts=h._a.slice(0),S(h).meridiem=h._meridiem,h._a[Pr]=N(h._locale,h._a[Pr],h._meridiem),Ca=S(h).era,Ca!==null&&(h._a[wr]=h._locale.erasConvertYear(Ca,h._a[wr])),$(h),un(h)}function N(h,E,ae){var Se;return ae==null?E:h.meridiemHour!=null?h.meridiemHour(E,ae):(h.isPM!=null&&(Se=h.isPM(ae),Se&&E<12&&(E+=12),!Se&&E===12&&(E=0)),E)}function P(h){var E,ae,Se,Ge,Nt,gr,Nn=!1,la=h._f.length;if(la===0){S(h).invalidFormat=!0,h._d=new Date(NaN);return}for(Ge=0;Gethis?this:h:j()});function fr(h,E){var ae,Se;if(E.length===1&&i(E[0])&&(E=E[0]),!E.length)return at();for(ae=E[0],Se=1;Sethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function aa(){if(!l(this._isDSTShifted))return this._isDSTShifted;var h={},E;return D(h,this),h=se(h),h._a?(E=h._isUTC?y(h._a):at(h._a),this._isDSTShifted=this.isValid()&&_a(h._a,E.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Sa(){return this.isValid()?!this._isUTC:!1}function ri(){return this.isValid()?this._isUTC:!1}function Ea(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ni=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ai=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Qa(h,E){var ae=h,Se=null,Ge,Nt,gr;return Fn(h)?ae={ms:h._milliseconds,d:h._days,M:h._months}:d(h)||!isNaN(+h)?(ae={},E?ae[E]=+h:ae.milliseconds=+h):(Se=ni.exec(h))?(Ge=Se[1]==="-"?-1:1,ae={y:0,d:X(Se[Qr])*Ge,h:X(Se[Pr])*Ge,m:X(Se[nn])*Ge,s:X(Se[qr])*Ge,ms:X(ya(Se[fn]*1e3))*Ge}):(Se=ai.exec(h))?(Ge=Se[1]==="-"?-1:1,ae={y:$i(Se[2],Ge),M:$i(Se[3],Ge),w:$i(Se[4],Ge),d:$i(Se[5],Ge),h:$i(Se[6],Ge),m:$i(Se[7],Ge),s:$i(Se[8],Ge)}):ae==null?ae={}:typeof ae=="object"&&("from"in ae||"to"in ae)&&(gr=yo(at(ae.from),at(ae.to)),ae={},ae.ms=gr.milliseconds,ae.M=gr.months),Nt=new oa(ae),Fn(h)&&u(h,"_locale")&&(Nt._locale=h._locale),Fn(h)&&u(h,"_isValid")&&(Nt._isValid=h._isValid),Nt}Qa.fn=oa.prototype,Qa.invalid=ha;function $i(h,E){var ae=h&&parseFloat(h.replace(",","."));return(isNaN(ae)?0:ae)*E}function Co(h,E){var ae={};return ae.months=E.month()-h.month()+(E.year()-h.year())*12,h.clone().add(ae.months,"M").isAfter(E)&&--ae.months,ae.milliseconds=+E-+h.clone().add(ae.months,"M"),ae}function yo(h,E){var ae;return h.isValid()&&E.isValid()?(E=fi(E,h),h.isBefore(E)?ae=Co(h,E):(ae=Co(E,h),ae.milliseconds=-ae.milliseconds,ae.months=-ae.months),ae):{milliseconds:0,months:0}}function Go(h,E){return function(ae,Se){var Ge,Nt;return Se!==null&&!isNaN(+Se)&&(ve(E,"moment()."+E+"(period, number) is deprecated. Please use moment()."+E+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),Nt=ae,ae=Se,Se=Nt),Ge=Qa(ae,Se),eo(this,Ge,h),this}}function eo(h,E,ae,Se){var Ge=E._milliseconds,Nt=ya(E._days),gr=ya(E._months);!h.isValid()||(Se=Se==null?!0:Se,gr&&Zt(h,He(h,"Month")+gr*ae),Nt&&tt(h,"Date",He(h,"Date")+Nt*ae),Ge&&h._d.setTime(h._d.valueOf()+Ge*ae),Se&&t.updateOffset(h,Nt||gr))}var Yi=Go(1,"add"),ko=Go(-1,"subtract");function Vi(h){return typeof h=="string"||h instanceof String}function _o(h){return U(h)||p(h)||Vi(h)||d(h)||Mo(h)||No(h)||h===null||h===void 0}function No(h){var E=o(h)&&!c(h),ae=!1,Se=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],Ge,Nt,gr=Se.length;for(Ge=0;Geae.valueOf():ae.valueOf()9999?ht(ae,E?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ce(Date.prototype.toISOString)?E?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ht(ae,"Z")):ht(ae,E?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Vn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var h="moment",E="",ae,Se,Ge,Nt;return this.isLocal()||(h=this.utcOffset()===0?"moment.utc":"moment.parseZone",E="Z"),ae="["+h+'("]',Se=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",Ge="-MM-DD[T]HH:mm:ss.SSS",Nt=E+'[")]',this.format(ae+Se+Ge+Nt)}function Xn(h){h||(h=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var E=ht(this,h);return this.localeData().postformat(E)}function ga(h,E){return this.isValid()&&(U(h)&&h.isValid()||at(h).isValid())?Qa({to:this,from:h}).locale(this.locale()).humanize(!E):this.localeData().invalidDate()}function Ke(h){return this.from(at(),h)}function kt(h,E){return this.isValid()&&(U(h)&&h.isValid()||at(h).isValid())?Qa({from:this,to:h}).locale(this.locale()).humanize(!E):this.localeData().invalidDate()}function Lt(h){return this.to(at(),h)}function Gt(h){var E;return h===void 0?this._locale._abbr:(E=Cr(h),E!=null&&(this._locale=E),this)}var Er=de("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(h){return h===void 0?this.localeData():this.locale(h)});function kr(){return this._locale}var br=1e3,Or=60*br,wn=60*Or,Cn=(365*400+97)*24*wn;function Jn(h,E){return(h%E+E)%E}function fa(h,E,ae){return h<100&&h>=0?new Date(h+400,E,ae)-Cn:new Date(h,E,ae).valueOf()}function ta(h,E,ae){return h<100&&h>=0?Date.UTC(h+400,E,ae)-Cn:Date.UTC(h,E,ae)}function jr(h){var E,ae;if(h=b(h),h===void 0||h==="millisecond"||!this.isValid())return this;switch(ae=this._isUTC?ta:fa,h){case"year":E=ae(this.year(),0,1);break;case"quarter":E=ae(this.year(),this.month()-this.month()%3,1);break;case"month":E=ae(this.year(),this.month(),1);break;case"week":E=ae(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":E=ae(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":E=ae(this.year(),this.month(),this.date());break;case"hour":E=this._d.valueOf(),E-=Jn(E+(this._isUTC?0:this.utcOffset()*Or),wn);break;case"minute":E=this._d.valueOf(),E-=Jn(E,Or);break;case"second":E=this._d.valueOf(),E-=Jn(E,br);break}return this._d.setTime(E),t.updateOffset(this,!0),this}function qa(h){var E,ae;if(h=b(h),h===void 0||h==="millisecond"||!this.isValid())return this;switch(ae=this._isUTC?ta:fa,h){case"year":E=ae(this.year()+1,0,1)-1;break;case"quarter":E=ae(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":E=ae(this.year(),this.month()+1,1)-1;break;case"week":E=ae(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":E=ae(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":E=ae(this.year(),this.month(),this.date()+1)-1;break;case"hour":E=this._d.valueOf(),E+=wn-Jn(E+(this._isUTC?0:this.utcOffset()*Or),wn)-1;break;case"minute":E=this._d.valueOf(),E+=Or-Jn(E,Or)-1;break;case"second":E=this._d.valueOf(),E+=br-Jn(E,br)-1;break}return this._d.setTime(E),t.updateOffset(this,!0),this}function Da(){return this._d.valueOf()-(this._offset||0)*6e4}function ei(){return Math.floor(this.valueOf()/1e3)}function _i(){return new Date(this.valueOf())}function Ni(){var h=this;return[h.year(),h.month(),h.date(),h.hour(),h.minute(),h.second(),h.millisecond()]}function Di(){var h=this;return{years:h.year(),months:h.month(),date:h.date(),hours:h.hours(),minutes:h.minutes(),seconds:h.seconds(),milliseconds:h.milliseconds()}}function Ki(){return this.isValid()?this.toISOString():null}function Oo(){return O(this)}function jo(){return _({},S(this))}function rs(){return S(this).overflow}function ji(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}De("N",0,0,"eraAbbr"),De("NN",0,0,"eraAbbr"),De("NNN",0,0,"eraAbbr"),De("NNNN",0,0,"eraName"),De("NNNNN",0,0,"eraNarrow"),De("y",["y",1],"yo","eraYear"),De("y",["yy",2],0,"eraYear"),De("y",["yyy",3],0,"eraYear"),De("y",["yyyy",4],0,"eraYear"),dt("N",fo),dt("NN",fo),dt("NNN",fo),dt("NNNN",Jo),dt("NNNNN",Ho),ir(["N","NN","NNN","NNNN","NNNNN"],function(h,E,ae,Se){var Ge=ae._locale.erasParse(h,Se,ae._strict);Ge?S(ae).era=Ge:S(ae).invalidEra=h}),dt("y",Pe),dt("yy",Pe),dt("yyy",Pe),dt("yyyy",Pe),dt("yo",Xo),ir(["y","yy","yyy","yyyy"],wr),ir(["yo"],function(h,E,ae,Se){var Ge;ae._locale._eraYearOrdinalRegex&&(Ge=h.match(ae._locale._eraYearOrdinalRegex)),ae._locale.eraYearOrdinalParse?E[wr]=ae._locale.eraYearOrdinalParse(h,Ge):E[wr]=parseInt(h,10)});function So(h,E){var ae,Se,Ge,Nt=this._eras||Cr("en")._eras;for(ae=0,Se=Nt.length;ae=0)return Nt[Se]}function Fo(h,E){var ae=h.since<=h.until?1:-1;return E===void 0?t(h.since).year():t(h.since).year()+(E-h.offset)*ae}function lo(){var h,E,ae,Se=this.localeData().eras();for(h=0,E=Se.length;hNt&&(E=Nt),Bo.call(this,h,E,ae,Se,Ge))}function Bo(h,E,ae,Se,Ge){var Nt=Dn(h,E,ae,Se,Ge),gr=dn(Nt.year,0,Nt.dayOfYear);return this.year(gr.getUTCFullYear()),this.month(gr.getUTCMonth()),this.date(gr.getUTCDate()),this}De("Q",0,"Qo","quarter"),T("quarter","Q"),le("quarter",7),dt("Q",Ie),ir("Q",function(h,E){E[Vr]=(X(h)-1)*3});function li(h){return h==null?Math.ceil((this.month()+1)/3):this.month((h-1)*3+this.month()%3)}De("D",["DD",2],"Do","date"),T("date","D"),le("date",9),dt("D",ue),dt("DD",ue,$e),dt("Do",function(h,E){return h?E._dayOfMonthOrdinalParse||E._ordinalParse:E._dayOfMonthOrdinalParseLenient}),ir(["D","DD"],Qr),ir("Do",function(h,E){E[Qr]=X(h.match(ue)[0])});var zo=je("Date",!0);De("DDD",["DDDD",3],"DDDo","dayOfYear"),T("dayOfYear","DDD"),le("dayOfYear",4),dt("DDD",Je),dt("DDDD",Le),ir(["DDD","DDDD"],function(h,E,ae){ae._dayOfYear=X(h)});function ns(h){var E=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return h==null?E:this.add(h-E,"d")}De("m",["mm",2],0,"minute"),T("minute","m"),le("minute",14),dt("m",ue),dt("mm",ue,$e),ir(["m","mm"],nn);var Gi=je("Minutes",!1);De("s",["ss",2],0,"second"),T("second","s"),le("second",15),dt("s",ue),dt("ss",ue,$e),ir(["s","ss"],qr);var as=je("Seconds",!1);De("S",0,0,function(){return~~(this.millisecond()/100)}),De(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),De(0,["SSS",3],0,"millisecond"),De(0,["SSSS",4],0,function(){return this.millisecond()*10}),De(0,["SSSSS",5],0,function(){return this.millisecond()*100}),De(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),De(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),De(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),De(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),T("millisecond","ms"),le("millisecond",16),dt("S",Je,Ie),dt("SS",Je,$e),dt("SSS",Je,Le);var to,ii;for(to="SSSS";to.length<=9;to+="S")dt(to,Pe);function Me(h,E){E[fn]=X(("0."+h)*1e3)}for(to="S";to.length<=9;to+="S")ir(to,Me);ii=je("Milliseconds",!1),De("z",0,0,"zoneAbbr"),De("zz",0,0,"zoneName");function st(){return this._isUTC?"UTC":""}function Xt(){return this._isUTC?"Coordinated Universal Time":""}var It=R.prototype;It.add=Yi,It.calendar=Ee,It.clone=Xe,It.diff=Kr,It.endOf=qa,It.format=Xn,It.from=ga,It.fromNow=Ke,It.to=kt,It.toNow=Lt,It.get=We,It.invalidAt=rs,It.isAfter=vt,It.isBefore=lt,It.isBetween=zt,It.isSame=Pt,It.isSameOrAfter=er,It.isSameOrBefore=yr,It.isValid=Oo,It.lang=Er,It.locale=Gt,It.localeData=kr,It.max=Yt,It.min=ut,It.parsingFlags=jo,It.set=Ue,It.startOf=jr,It.subtract=ko,It.toArray=Ni,It.toObject=Di,It.toDate=_i,It.toISOString=on,It.inspect=Vn,typeof Symbol!="undefined"&&Symbol.for!=null&&(It[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),It.toJSON=Ki,It.toString=Ae,It.unix=ei,It.valueOf=Da,It.creationData=ji,It.eraName=lo,It.eraNarrow=wi,It.eraAbbr=xo,It.eraYear=Hi,It.year=gn,It.isLeapYear=cn,It.weekYear=mo,It.isoWeekYear=Hn,It.quarter=It.quarters=li,It.month=Dt,It.daysInMonth=ur,It.week=It.weeks=ca,It.isoWeek=It.isoWeeks=da,It.weeksInYear=Ja,It.weeksInWeekYear=Mi,It.isoWeeksInYear=Ya,It.isoWeeksInISOWeekYear=Po,It.date=zo,It.day=It.days=rt,It.weekday=At,It.isoWeekday=qt,It.dayOfYear=ns,It.hour=It.hours=bn,It.minute=It.minutes=Gi,It.second=It.seconds=as,It.millisecond=It.milliseconds=ii,It.utcOffset=bi,It.utc=yi,It.local=Ha,It.parseZone=Pa,It.hasAlignedHourOffset=Pi,It.isDST=va,It.isLocal=Sa,It.isUtcOffset=ri,It.isUtc=Ea,It.isUTC=Ea,It.zoneAbbr=st,It.zoneName=Xt,It.dates=de("dates accessor is deprecated. Use date instead.",zo),It.months=de("months accessor is deprecated. Use month instead",Dt),It.years=de("years accessor is deprecated. Use year instead",gn),It.zone=de("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ri),It.isDSTShifted=de("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",aa);function $r(h){return at(h*1e3)}function zn(){return at.apply(null,arguments).parseZone()}function La(h){return h}var Sn=V.prototype;Sn.calendar=k,Sn.longDateFormat=ct,Sn.invalidDate=Tt,Sn.ordinal=Ht,Sn.preparse=La,Sn.postformat=La,Sn.relativeTime=Sr,Sn.pastFuture=Ar,Sn.set=xe,Sn.eras=So,Sn.erasParse=Fi,Sn.erasConvertYear=Fo,Sn.erasAbbrRegex=co,Sn.erasNameRegex=mi,Sn.erasNarrowRegex=bo,Sn.months=Kt,Sn.monthsShort=sr,Sn.monthsParse=_t,Sn.monthsRegex=_r,Sn.monthsShortRegex=$t,Sn.week=_n,Sn.firstDayOfYear=ea,Sn.firstDayOfWeek=Ur,Sn.weekdays=be,Sn.weekdaysMin=Qe,Sn.weekdaysShort=ke,Sn.weekdaysParse=ft,Sn.weekdaysRegex=Lr,Sn.weekdaysShortRegex=hr,Sn.weekdaysMinRegex=Qt,Sn.isPM=an,Sn.meridiem=vn;function oi(h,E,ae,Se){var Ge=Cr(),Nt=y().set(Se,E);return Ge[ae](Nt,h)}function ra(h,E,ae){if(d(h)&&(E=h,h=void 0),h=h||"",E!=null)return oi(h,E,ae,"month");var Se,Ge=[];for(Se=0;Se<12;Se++)Ge[Se]=oi(h,Se,ae,"month");return Ge}function pa(h,E,ae,Se){typeof h=="boolean"?(d(E)&&(ae=E,E=void 0),E=E||""):(E=h,ae=E,h=!1,d(E)&&(ae=E,E=void 0),E=E||"");var Ge=Cr(),Nt=h?Ge._week.dow:0,gr,Nn=[];if(ae!=null)return oi(E,(ae+Nt)%7,Se,"day");for(gr=0;gr<7;gr++)Nn[gr]=oi(E,(gr+Nt)%7,Se,"day");return Nn}function ma(h,E){return ra(h,E,"months")}function xa(h,E){return ra(h,E,"monthsShort")}function ti(h,E,ae){return pa(h,E,ae,"weekdays")}function vi(h,E,ae){return pa(h,E,ae,"weekdaysShort")}function is(h,E,ae){return pa(h,E,ae,"weekdaysMin")}Br("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(h){var E=h%10,ae=X(h%100/10)===1?"th":E===1?"st":E===2?"nd":E===3?"rd":"th";return h+ae}}),t.lang=de("moment.lang is deprecated. Use moment.locale instead.",Br),t.langData=de("moment.langData is deprecated. Use moment.localeData instead.",Cr);var po=Math.abs;function Ys(){var h=this._data;return this._milliseconds=po(this._milliseconds),this._days=po(this._days),this._months=po(this._months),h.milliseconds=po(h.milliseconds),h.seconds=po(h.seconds),h.minutes=po(h.minutes),h.hours=po(h.hours),h.months=po(h.months),h.years=po(h.years),this}function Zi(h,E,ae,Se){var Ge=Qa(E,ae);return h._milliseconds+=Se*Ge._milliseconds,h._days+=Se*Ge._days,h._months+=Se*Ge._months,h._bubble()}function Ji(h,E){return Zi(this,h,E,1)}function $a(h,E){return Zi(this,h,E,-1)}function ro(h){return h<0?Math.floor(h):Math.ceil(h)}function eu(){var h=this._milliseconds,E=this._days,ae=this._months,Se=this._data,Ge,Nt,gr,Nn,la;return h>=0&&E>=0&&ae>=0||h<=0&&E<=0&&ae<=0||(h+=ro(hs(ae)+E)*864e5,E=0,ae=0),Se.milliseconds=h%1e3,Ge=Re(h/1e3),Se.seconds=Ge%60,Nt=Re(Ge/60),Se.minutes=Nt%60,gr=Re(Nt/60),Se.hours=gr%24,E+=Re(gr/24),la=Re(ks(E)),ae+=la,E-=ro(hs(la)),Nn=Re(ae/12),ae%=12,Se.days=E,Se.months=ae,Se.years=Nn,this}function ks(h){return h*4800/146097}function hs(h){return h*146097/4800}function Ns(h){if(!this.isValid())return NaN;var E,ae,Se=this._milliseconds;if(h=b(h),h==="month"||h==="quarter"||h==="year")switch(E=this._days+Se/864e5,ae=this._months+ks(E),h){case"month":return ae;case"quarter":return ae/3;case"year":return ae/12}else switch(E=this._days+Math.round(hs(this._months)),h){case"week":return E/7+Se/6048e5;case"day":return E+Se/864e5;case"hour":return E*24+Se/36e5;case"minute":return E*1440+Se/6e4;case"second":return E*86400+Se/1e3;case"millisecond":return Math.floor(E*864e5)+Se;default:throw new Error("Unknown unit "+h)}}function tu(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+X(this._months/12)*31536e6:NaN}function no(h){return function(){return this.as(h)}}var ru=no("ms"),os=no("s"),js=no("m"),Au=no("h"),ho=no("d"),ws=no("w"),Es=no("M"),ss=no("Q"),Fs=no("y");function Hs(){return Qa(this)}function Zs(h){return h=b(h),this.isValid()?this[h+"s"]():NaN}function Do(h){return function(){return this.isValid()?this._data[h]:NaN}}var us=Do("milliseconds"),ao=Do("seconds"),Qo=Do("minutes"),Bs=Do("hours"),nu=Do("days"),Ao=Do("months"),Wo=Do("years");function zs(){return Re(this.days()/7)}var wo=Math.round,Bi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Uo(h,E,ae,Se,Ge){return Ge.relativeTime(E||1,!!ae,h,Se)}function Ls(h,E,ae,Se){var Ge=Qa(h).abs(),Nt=wo(Ge.as("s")),gr=wo(Ge.as("m")),Nn=wo(Ge.as("h")),la=wo(Ge.as("d")),Ca=wo(Ge.as("M")),Va=wo(Ge.as("w")),Xi=wo(Ge.as("y")),io=Nt<=ae.ss&&["s",Nt]||Nt0,io[4]=Se,Uo.apply(null,io)}function au(h){return h===void 0?wo:typeof h=="function"?(wo=h,!0):!1}function Ts(h,E){return Bi[h]===void 0?!1:E===void 0?Bi[h]:(Bi[h]=E,h==="s"&&(Bi.ss=E-1),!0)}function iu(h,E){if(!this.isValid())return this.localeData().invalidDate();var ae=!1,Se=Bi,Ge,Nt;return typeof h=="object"&&(E=h,h=!1),typeof h=="boolean"&&(ae=h),typeof E=="object"&&(Se=Object.assign({},Bi,E),E.s!=null&&E.ss==null&&(Se.ss=E.s-1)),Ge=this.localeData(),Nt=Ls(this,!ae,Se,Ge),ae&&(Nt=Ge.pastFuture(+this,Nt)),Ge.postformat(Nt)}var Cs=Math.abs;function $o(h){return(h>0)-(h<0)||+h}function qo(){if(!this.isValid())return this.localeData().invalidDate();var h=Cs(this._milliseconds)/1e3,E=Cs(this._days),ae=Cs(this._months),Se,Ge,Nt,gr,Nn=this.asSeconds(),la,Ca,Va,Xi;return Nn?(Se=Re(h/60),Ge=Re(Se/60),h%=60,Se%=60,Nt=Re(ae/12),ae%=12,gr=h?h.toFixed(3).replace(/\.?0+$/,""):"",la=Nn<0?"-":"",Ca=$o(this._months)!==$o(Nn)?"-":"",Va=$o(this._days)!==$o(Nn)?"-":"",Xi=$o(this._milliseconds)!==$o(Nn)?"-":"",la+"P"+(Nt?Ca+Nt+"Y":"")+(ae?Ca+ae+"M":"")+(E?Va+E+"D":"")+(Ge||Se||h?"T":"")+(Ge?Xi+Ge+"H":"")+(Se?Xi+Se+"M":"")+(h?Xi+gr+"S":"")):"P0D"}var Ma=oa.prototype;Ma.isValid=An,Ma.abs=Ys,Ma.add=Ji,Ma.subtract=$a,Ma.as=Ns,Ma.asMilliseconds=ru,Ma.asSeconds=os,Ma.asMinutes=js,Ma.asHours=Au,Ma.asDays=ho,Ma.asWeeks=ws,Ma.asMonths=Es,Ma.asQuarters=ss,Ma.asYears=Fs,Ma.valueOf=tu,Ma._bubble=eu,Ma.clone=Hs,Ma.get=Zs,Ma.milliseconds=us,Ma.seconds=ao,Ma.minutes=Qo,Ma.hours=Bs,Ma.days=nu,Ma.weeks=zs,Ma.months=Ao,Ma.years=Wo,Ma.humanize=iu,Ma.toISOString=qo,Ma.toString=qo,Ma.toJSON=qo,Ma.locale=Gt,Ma.localeData=kr,Ma.toIsoString=de("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qo),Ma.lang=Er,De("X",0,0,"unix"),De("x",0,0,"valueOf"),dt("x",nt),dt("X",wt),ir("X",function(h,E,ae){ae._d=new Date(parseFloat(h)*1e3)}),ir("x",function(h,E,ae){ae._d=new Date(X(h))});return t.version="2.29.4",a(at),t.fn=It,t.min=Tr,t.max=Ir,t.now=pn,t.utc=y,t.unix=$r,t.months=ma,t.isDate=p,t.locale=Br,t.invalid=j,t.duration=Qa,t.isMoment=U,t.weekdays=ti,t.parseZone=zn,t.localeData=Cr,t.isDuration=Fn,t.monthsShort=xa,t.weekdaysMin=is,t.defineLocale=On,t.updateLocale=Dr,t.locales=zr,t.weekdaysShort=vi,t.normalizeUnits=b,t.relativeTimeRounding=au,t.relativeTimeThreshold=Ts,t.calendarFormat=g,t.prototype=It,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t})},34155:function(f){var v=f.exports={},e,r;function t(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?e=setTimeout:e=t}catch(I){e=t}try{typeof clearTimeout=="function"?r=clearTimeout:r=a}catch(I){r=a}})();function i(I){if(e===setTimeout)return setTimeout(I,0);if((e===t||!e)&&setTimeout)return e=setTimeout,setTimeout(I,0);try{return e(I,0)}catch(S){try{return e.call(null,I,0)}catch(A){return e.call(this,I,0)}}}function o(I){if(r===clearTimeout)return clearTimeout(I);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(I);try{return r(I)}catch(S){try{return r.call(null,I)}catch(A){return r.call(this,I)}}}var u=[],c=!1,l,d=-1;function p(){!c||!l||(c=!1,l.length?u=l.concat(u):d=-1,u.length&&M())}function M(){if(!c){var I=i(p);c=!0;for(var S=u.length;S;){for(l=u,u=[];++d1)for(var A=1;A0&&c>u&&(c=u);for(var l=0;l=0?(M=d.substr(0,p),_=d.substr(p+1)):(M=d,_=""),y=decodeURIComponent(M),I=decodeURIComponent(_),v(i,y)?Array.isArray(i[y])?i[y].push(I):i[y]=[i[y],I]:i[y]=I}return i}},12361:function(f){"use strict";var v=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};f.exports=function(e,r,t,a){return r=r||"&",t=t||"=",e===null&&(e=void 0),typeof e=="object"?Object.keys(e).map(function(i){var o=encodeURIComponent(v(i))+t;return Array.isArray(e[i])?e[i].map(function(u){return o+encodeURIComponent(v(u))}).join(r):o+encodeURIComponent(v(e[i]))}).join(r):a?encodeURIComponent(v(a))+t+encodeURIComponent(v(e)):""}},17673:function(f,v,e){"use strict";var r;r=v.parse=e(62587),r=v.stringify=e(12361)},60057:function(f,v,e){"use strict";e.d(v,{Z:function(){return R}});var r=e(4942),t=e(1413),a=e(97685),i=e(91),o=e(67294),u=e(81263),c=e(94184),l=e.n(c),d={adjustX:1,adjustY:1},p=[0,0],M={topLeft:{points:["bl","tl"],overflow:d,offset:[0,-4],targetOffset:p},topCenter:{points:["bc","tc"],overflow:d,offset:[0,-4],targetOffset:p},topRight:{points:["br","tr"],overflow:d,offset:[0,-4],targetOffset:p},bottomLeft:{points:["tl","bl"],overflow:d,offset:[0,4],targetOffset:p},bottomCenter:{points:["tc","bc"],overflow:d,offset:[0,4],targetOffset:p},bottomRight:{points:["tr","br"],overflow:d,offset:[0,4],targetOffset:p}},_=M,y=e(15105),I=e(75164),S=e(88603),A=y.Z.ESC,O=y.Z.TAB;function j(U){var ee=U.visible,de=U.setTriggerVisible,he=U.triggerRef,ve=U.onVisibleChange,ce=U.autoFocus,xe=o.useRef(!1),Q=function(){if(ee&&he.current){var k,re,K,ie;(k=he.current)===null||k===void 0||(re=k.triggerRef)===null||re===void 0||(K=re.current)===null||K===void 0||(ie=K.focus)===null||ie===void 0||ie.call(K),de(!1),typeof ve=="function"&&ve(!1)}},V=function(){var k,re,K,ie,me=(0,S.tS)((k=he.current)===null||k===void 0||(re=k.popupRef)===null||re===void 0||(K=re.current)===null||K===void 0||(ie=K.getElement)===null||ie===void 0?void 0:ie.call(K)),Ze=me[0];return Ze!=null&&Ze.focus?(Ze.focus(),xe.current=!0,!0):!1},W=function(k){switch(k.keyCode){case A:Q();break;case O:{var re=!1;xe.current||(re=V()),re?k.preventDefault():Q();break}}};o.useEffect(function(){return ee?(window.addEventListener("keydown",W),ce&&(0,I.Z)(V,3),function(){window.removeEventListener("keydown",W),xe.current=!1}):function(){xe.current=!1}},[ee])}var F=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus"];function J(U,ee){var de=U.arrow,he=de===void 0?!1:de,ve=U.prefixCls,ce=ve===void 0?"rc-dropdown":ve,xe=U.transitionName,Q=U.animation,V=U.align,W=U.placement,L=W===void 0?"bottomLeft":W,k=U.placements,re=k===void 0?_:k,K=U.getPopupContainer,ie=U.showAction,me=U.hideAction,Ze=U.overlayClassName,De=U.overlayStyle,Fe=U.visible,mt=U.trigger,ht=mt===void 0?["hover"]:mt,xt=U.autoFocus,Et=(0,i.Z)(U,F),ct=o.useState(),jt=(0,a.Z)(ct,2),Tt=jt[0],Wt=jt[1],Bt="visible"in U?Fe:Tt,Ht=o.useRef(null);o.useImperativeHandle(ee,function(){return Ht.current}),j({visible:Bt,setTriggerVisible:Wt,triggerRef:Ht,onVisibleChange:U.onVisibleChange,autoFocus:xt});var rr=function(){var pe=U.overlay,Re;return typeof pe=="function"?Re=pe():Re=pe,Re},Sr=function(pe){var Re=U.onOverlayClick;Wt(!1),Re&&Re(pe)},Ar=function(pe){var Re=U.onVisibleChange;Wt(pe),typeof Re=="function"&&Re(pe)},ye=function(){var pe=rr();return o.createElement(o.Fragment,null,he&&o.createElement("div",{className:"".concat(ce,"-arrow")}),pe)},T=function(){var pe=U.overlay;return typeof pe=="function"?ye:ye()},b=function(){var pe=U.minOverlayWidthMatchTrigger,Re=U.alignPoint;return"minOverlayWidthMatchTrigger"in U?pe:!Re},q=function(){var pe=U.openClassName;return pe!==void 0?pe:"".concat(ce,"-open")},Ce=function(){var pe=U.children,Re=pe.props?pe.props:{},X=l()(Re.className,q());return Bt&&pe?o.cloneElement(pe,{className:X}):pe},le=me;return!le&&ht.indexOf("contextMenu")!==-1&&(le=["click"]),o.createElement(u.Z,(0,t.Z)((0,t.Z)({builtinPlacements:re},Et),{},{prefixCls:ce,ref:Ht,popupClassName:l()(Ze,(0,r.Z)({},"".concat(ce,"-show-arrow"),he)),popupStyle:De,action:ht,showAction:ie,hideAction:le||[],popupPlacement:L,popupAlign:V,popupTransitionName:xe,popupAnimation:Q,popupVisible:Bt,stretch:b()?"minWidth":"",popup:T(),onPopupVisibleChange:Ar,onPopupClick:Sr,getPopupContainer:K}),Ce())}var D=o.forwardRef(J),R=D},71990:function(f,v,e){"use strict";e.d(v,{gN:function(){return Mr},zb:function(){return O},RV:function(){return ln},aV:function(){return ur},ZM:function(){return Zt},ZP:function(){return Za},cI:function(){return Dn},qo:function(){return Ia}});var r=e(67294),t=e(87462),a=e(91),i=e(4942),o=e(1413),u=e(74902),c=e(15671),l=e(43144),d=e(97326),p=e(60136),M=e(29388),_=e(50344),y=e(80334),I="RC_FORM_INTERNAL_HOOKS",S=function(){(0,y.ZP)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},A=r.createContext({getFieldValue:S,getFieldsValue:S,getFieldError:S,getFieldWarning:S,getFieldsError:S,isFieldsTouched:S,isFieldTouched:S,isFieldValidating:S,isFieldsValidating:S,resetFields:S,setFields:S,setFieldValue:S,setFieldsValue:S,validateFields:S,submit:S,getInternalHooks:function(){return S(),{dispatch:S,initEntityValue:S,registerField:S,useSubscribe:S,setInitialValues:S,destroyForm:S,setCallbacks:S,registerWatch:S,getFields:S,setValidateMessages:S,setPreserve:S,getInitialValue:S}}}),O=A;function j(gt){return gt==null?[]:Array.isArray(gt)?gt:[gt]}var F=e(74165),J=e(15861),D=e(34155);function R(){return R=Object.assign?Object.assign.bind():function(gt){for(var Oe=1;Oe1?Oe-1:0),G=1;G=be)return Qe;switch(Qe){case"%s":return String(C[B++]);case"%d":return Number(C[B++]);case"%j":try{return JSON.stringify(C[B++])}catch(ge){return"[Circular]"}break;default:return Qe}});return ke}return gt}function k(gt){return gt==="string"||gt==="url"||gt==="hex"||gt==="email"||gt==="date"||gt==="pattern"}function re(gt,Oe){return!!(gt==null||Oe==="array"&&Array.isArray(gt)&&!gt.length||k(Oe)&&typeof gt=="string"&&!gt)}function K(gt,Oe,C){var G=[],B=0,be=gt.length;function ke(Qe){G.push.apply(G,Qe||[]),B++,B===be&&C(G)}gt.forEach(function(Qe){Oe(Qe,ke)})}function ie(gt,Oe,C){var G=0,B=gt.length;function be(ke){if(ke&&ke.length){C(ke);return}var Qe=G;G=G+1,Qe()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Bt={integer:function(Oe){return Bt.number(Oe)&&parseInt(Oe,10)===Oe},float:function(Oe){return Bt.number(Oe)&&!Bt.integer(Oe)},array:function(Oe){return Array.isArray(Oe)},regexp:function(Oe){if(Oe instanceof RegExp)return!0;try{return!!new RegExp(Oe)}catch(C){return!1}},date:function(Oe){return typeof Oe.getTime=="function"&&typeof Oe.getMonth=="function"&&typeof Oe.getYear=="function"&&!isNaN(Oe.getTime())},number:function(Oe){return isNaN(Oe)?!1:typeof Oe=="number"},object:function(Oe){return typeof Oe=="object"&&!Bt.array(Oe)},method:function(Oe){return typeof Oe=="function"},email:function(Oe){return typeof Oe=="string"&&Oe.length<=320&&!!Oe.match(Wt.email)},url:function(Oe){return typeof Oe=="string"&&Oe.length<=2048&&!!Oe.match(Tt())},hex:function(Oe){return typeof Oe=="string"&&!!Oe.match(Wt.hex)}},Ht=function(Oe,C,G,B,be){if(Oe.required&&C===void 0){Et(Oe,C,G,B,be);return}var ke=["integer","float","array","regexp","object","method","email","number","date","url","hex"],Qe=Oe.type;ke.indexOf(Qe)>-1?Bt[Qe](C)||B.push(L(be.messages.types[Qe],Oe.fullField,Oe.type)):Qe&&typeof C!==Oe.type&&B.push(L(be.messages.types[Qe],Oe.fullField,Oe.type))},rr=function(Oe,C,G,B,be){var ke=typeof Oe.len=="number",Qe=typeof Oe.min=="number",ge=typeof Oe.max=="number",ft=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rt=C,At=null,qt=typeof C=="number",Lr=typeof C=="string",hr=Array.isArray(C);if(qt?At="number":Lr?At="string":hr&&(At="array"),!At)return!1;hr&&(rt=C.length),Lr&&(rt=C.replace(ft,"_").length),ke?rt!==Oe.len&&B.push(L(be.messages[At].len,Oe.fullField,Oe.len)):Qe&&!ge&&rtOe.max?B.push(L(be.messages[At].max,Oe.fullField,Oe.max)):Qe&&ge&&(rtOe.max)&&B.push(L(be.messages[At].range,Oe.fullField,Oe.min,Oe.max))},Sr="enum",Ar=function(Oe,C,G,B,be){Oe[Sr]=Array.isArray(Oe[Sr])?Oe[Sr]:[],Oe[Sr].indexOf(C)===-1&&B.push(L(be.messages[Sr],Oe.fullField,Oe[Sr].join(", ")))},ye=function(Oe,C,G,B,be){if(Oe.pattern){if(Oe.pattern instanceof RegExp)Oe.pattern.lastIndex=0,Oe.pattern.test(C)||B.push(L(be.messages.pattern.mismatch,Oe.fullField,C,Oe.pattern));else if(typeof Oe.pattern=="string"){var ke=new RegExp(Oe.pattern);ke.test(C)||B.push(L(be.messages.pattern.mismatch,Oe.fullField,C,Oe.pattern))}}},T={required:Et,whitespace:ct,type:Ht,range:rr,enum:Ar,pattern:ye},b=function(Oe,C,G,B,be){var ke=[],Qe=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(Qe){if(re(C,"string")&&!Oe.required)return G();T.required(Oe,C,B,ke,be,"string"),re(C,"string")||(T.type(Oe,C,B,ke,be),T.range(Oe,C,B,ke,be),T.pattern(Oe,C,B,ke,be),Oe.whitespace===!0&&T.whitespace(Oe,C,B,ke,be))}G(ke)},q=function(Oe,C,G,B,be){var ke=[],Qe=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(Qe){if(re(C)&&!Oe.required)return G();T.required(Oe,C,B,ke,be),C!==void 0&&T.type(Oe,C,B,ke,be)}G(ke)},Ce=function(Oe,C,G,B,be){var ke=[],Qe=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(Qe){if(C===""&&(C=void 0),re(C)&&!Oe.required)return G();T.required(Oe,C,B,ke,be),C!==void 0&&(T.type(Oe,C,B,ke,be),T.range(Oe,C,B,ke,be))}G(ke)},le=function(Oe,C,G,B,be){var ke=[],Qe=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(Qe){if(re(C)&&!Oe.required)return G();T.required(Oe,C,B,ke,be),C!==void 0&&T.type(Oe,C,B,ke,be)}G(ke)},fe=function(Oe,C,G,B,be){var ke=[],Qe=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(Qe){if(re(C)&&!Oe.required)return G();T.required(Oe,C,B,ke,be),re(C)||T.type(Oe,C,B,ke,be)}G(ke)},pe=function(Oe,C,G,B,be){var ke=[],Qe=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(Qe){if(re(C)&&!Oe.required)return G();T.required(Oe,C,B,ke,be),C!==void 0&&(T.type(Oe,C,B,ke,be),T.range(Oe,C,B,ke,be))}G(ke)},Re=function(Oe,C,G,B,be){var ke=[],Qe=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(Qe){if(re(C)&&!Oe.required)return G();T.required(Oe,C,B,ke,be),C!==void 0&&(T.type(Oe,C,B,ke,be),T.range(Oe,C,B,ke,be))}G(ke)},X=function(Oe,C,G,B,be){var ke=[],Qe=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(Qe){if(C==null&&!Oe.required)return G();T.required(Oe,C,B,ke,be,"array"),C!=null&&(T.type(Oe,C,B,ke,be),T.range(Oe,C,B,ke,be))}G(ke)},je=function(Oe,C,G,B,be){var ke=[],Qe=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(Qe){if(re(C)&&!Oe.required)return G();T.required(Oe,C,B,ke,be),C!==void 0&&T.type(Oe,C,B,ke,be)}G(ke)},He="enum",tt=function(Oe,C,G,B,be){var ke=[],Qe=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(Qe){if(re(C)&&!Oe.required)return G();T.required(Oe,C,B,ke,be),C!==void 0&&T[He](Oe,C,B,ke,be)}G(ke)},We=function(Oe,C,G,B,be){var ke=[],Qe=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(Qe){if(re(C,"string")&&!Oe.required)return G();T.required(Oe,C,B,ke,be),re(C,"string")||T.pattern(Oe,C,B,ke,be)}G(ke)},Ue=function(Oe,C,G,B,be){var ke=[],Qe=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(Qe){if(re(C,"date")&&!Oe.required)return G();if(T.required(Oe,C,B,ke,be),!re(C,"date")){var ge;C instanceof Date?ge=C:ge=new Date(C),T.type(Oe,ge,B,ke,be),ge&&T.range(Oe,ge.getTime(),B,ke,be)}}G(ke)},Ie=function(Oe,C,G,B,be){var ke=[],Qe=Array.isArray(C)?"array":typeof C;T.required(Oe,C,B,ke,be,Qe),G(ke)},$e=function(Oe,C,G,B,be){var ke=Oe.type,Qe=[],ge=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(ge){if(re(C,ke)&&!Oe.required)return G();T.required(Oe,C,B,Qe,be,ke),re(C,ke)||T.type(Oe,C,B,Qe,be)}G(Qe)},Le=function(Oe,C,G,B,be){var ke=[],Qe=Oe.required||!Oe.required&&B.hasOwnProperty(Oe.field);if(Qe){if(re(C)&&!Oe.required)return G();T.required(Oe,C,B,ke,be)}G(ke)},ze={string:b,method:q,number:Ce,boolean:le,regexp:fe,integer:pe,float:Re,array:X,object:je,enum:tt,pattern:We,date:Ue,url:$e,hex:$e,email:$e,required:Ie,any:Le};function _e(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var Oe=JSON.parse(JSON.stringify(this));return Oe.clone=this.clone,Oe}}}var ue=_e(),Ye=function(){function gt(C){this.rules=null,this._messages=ue,this.define(C)}var Oe=gt.prototype;return Oe.define=function(G){var B=this;if(!G)throw new Error("Cannot configure a schema with no rules");if(typeof G!="object"||Array.isArray(G))throw new Error("Rules must be an object");this.rules={},Object.keys(G).forEach(function(be){var ke=G[be];B.rules[be]=Array.isArray(ke)?ke:[ke]})},Oe.messages=function(G){return G&&(this._messages=xt(_e(),G)),this._messages},Oe.validate=function(G,B,be){var ke=this;B===void 0&&(B={}),be===void 0&&(be=function(){});var Qe=G,ge=B,ft=be;if(typeof ge=="function"&&(ft=ge,ge={}),!this.rules||Object.keys(this.rules).length===0)return ft&&ft(null,Qe),Promise.resolve(Qe);function rt(Qt){var Jt=[],nr={};function Nr(Hr){if(Array.isArray(Hr)){var an;Jt=(an=Jt).concat.apply(an,Hr)}else Jt.push(Hr)}for(var Yr=0;Yr3&&arguments[3]!==void 0?arguments[3]:!1;return Oe.length&&G&&C===void 0&&!Te(gt,Oe.slice(0,-1))?gt:nt(gt,Oe,C,G)}function yt(gt){return Array.isArray(gt)?ot(gt):(0,it.Z)(gt)==="object"&>!==null?wt(gt):gt}function wt(gt){if(Object.getPrototypeOf(gt)===Object.prototype){var Oe={};for(var C in gt)Oe[C]=yt(gt[C]);return Oe}return gt}function ot(gt){return gt.map(function(Oe){return yt(Oe)})}var St=yt;function dt(gt){return j(gt)}function Rt(gt,Oe){var C=Te(gt,Oe);return C}function Ct(gt,Oe,C){var G=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,B=pt(gt,Oe,C,G);return B}function Ut(gt,Oe){var C={};return Oe.forEach(function(G){var B=Rt(gt,G);C=Ct(C,G,B)}),C}function cr(gt,Oe){return gt&>.some(function(C){return wr(C,Oe)})}function ir(gt){return(0,it.Z)(gt)==="object"&>!==null&&Object.getPrototypeOf(gt)===Object.prototype}function Rr(gt,Oe){var C=Array.isArray(gt)?(0,u.Z)(gt):(0,o.Z)({},gt);return Oe&&Object.keys(Oe).forEach(function(G){var B=C[G],be=Oe[G],ke=ir(B)&&ir(be);C[G]=ke?Rr(B,be||{}):St(be)}),C}function dr(gt){for(var Oe=arguments.length,C=new Array(Oe>1?Oe-1:0),G=1;G=G||C<0||C>=G)return gt;var B=gt[Oe],be=Oe-C;return be>0?[].concat((0,u.Z)(gt.slice(0,C)),[B],(0,u.Z)(gt.slice(C,Oe)),(0,u.Z)(gt.slice(Oe+1,G))):be<0?[].concat((0,u.Z)(gt.slice(0,Oe)),(0,u.Z)(gt.slice(Oe+1,C+1)),[B],(0,u.Z)(gt.slice(C+1,G))):gt}var nn=Ye;function qr(gt,Oe){return gt.replace(/\$\{\w+\}/g,function(C){var G=C.slice(2,-1);return Oe[G]})}var fn="CODE_LOGIC_ERROR";function Zn(gt,Oe,C,G,B){return Gn.apply(this,arguments)}function Gn(){return Gn=(0,J.Z)((0,F.Z)().mark(function gt(Oe,C,G,B,be){var ke,Qe,ge,ft,rt,At,qt,Lr,hr;return(0,F.Z)().wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return ke=(0,o.Z)({},G),delete ke.ruleIndex,ke.validator&&(Qe=ke.validator,ke.validator=function(){try{return Qe.apply(void 0,arguments)}catch(nr){return console.error(nr),Promise.reject(fn)}}),ge=null,ke&&ke.type==="array"&&ke.defaultField&&(ge=ke.defaultField,delete ke.defaultField),ft=new nn((0,i.Z)({},Oe,[ke])),rt=dr({},Je,B.validateMessages),ft.messages(rt),At=[],Jt.prev=9,Jt.next=12,Promise.resolve(ft.validate((0,i.Z)({},Oe,C),(0,o.Z)({},B)));case 12:Jt.next=17;break;case 14:Jt.prev=14,Jt.t0=Jt.catch(9),Jt.t0.errors&&(At=Jt.t0.errors.map(function(nr,Nr){var Yr=nr.message,Hr=Yr===fn?rt.default:Yr;return r.isValidElement(Hr)?r.cloneElement(Hr,{key:"error_".concat(Nr)}):Hr}));case 17:if(!(!At.length&&ge)){Jt.next=22;break}return Jt.next=20,Promise.all(C.map(function(nr,Nr){return Zn("".concat(Oe,".").concat(Nr),nr,ge,B,be)}));case 20:return qt=Jt.sent,Jt.abrupt("return",qt.reduce(function(nr,Nr){return[].concat((0,u.Z)(nr),(0,u.Z)(Nr))},[]));case 22:return Lr=(0,o.Z)((0,o.Z)({},G),{},{name:Oe,enum:(G.enum||[]).join(", ")},be),hr=At.map(function(nr){return typeof nr=="string"?qr(nr,Lr):nr}),Jt.abrupt("return",hr);case 25:case"end":return Jt.stop()}},gt,null,[[9,14]])})),Gn.apply(this,arguments)}function Rn(gt,Oe,C,G,B,be){var ke=gt.join("."),Qe=C.map(function(rt,At){var qt=rt.validator,Lr=(0,o.Z)((0,o.Z)({},rt),{},{ruleIndex:At});return qt&&(Lr.validator=function(hr,Qt,Jt){var nr=!1,Nr=function(){for(var an=arguments.length,tn=new Array(an),bn=0;bn0&&arguments[0]!==void 0?arguments[0]:Kn;if(B.validatePromise===At){var an;B.validatePromise=null;var tn=[],bn=[];(an=Hr.forEach)===null||an===void 0||an.call(Hr,function(vn){var Ln=vn.rule.warningOnly,we=vn.errors,qe=we===void 0?Kn:we;Ln?bn.push.apply(bn,(0,u.Z)(qe)):tn.push.apply(tn,(0,u.Z)(qe))}),B.errors=tn,B.warnings=bn,B.triggerMetaEvent(),B.reRender()}}),Yr});return B.validatePromise=At,B.dirty=!0,B.errors=Kn,B.warnings=Kn,B.triggerMetaEvent(),B.reRender(),At},B.isFieldValidating=function(){return!!B.validatePromise},B.isFieldTouched=function(){return B.touched},B.isFieldDirty=function(){if(B.dirty||B.props.initialValue!==void 0)return!0;var ge=B.props.fieldContext,ft=ge.getInternalHooks(I),rt=ft.getInitialValue;return rt(B.getNamePath())!==void 0},B.getErrors=function(){return B.errors},B.getWarnings=function(){return B.warnings},B.isListField=function(){return B.props.isListField},B.isList=function(){return B.props.isList},B.isPreserve=function(){return B.props.preserve},B.getMeta=function(){B.prevValidating=B.isFieldValidating();var ge={touched:B.isFieldTouched(),validating:B.prevValidating,errors:B.errors,warnings:B.warnings,name:B.getNamePath()};return ge},B.getOnlyChild=function(ge){if(typeof ge=="function"){var ft=B.getMeta();return(0,o.Z)((0,o.Z)({},B.getOnlyChild(ge(B.getControlled(),ft,B.props.fieldContext))),{},{isFunction:!0})}var rt=(0,_.Z)(ge);return rt.length!==1||!r.isValidElement(rt[0])?{child:rt,isFunction:!1}:{child:rt[0],isFunction:!1}},B.getValue=function(ge){var ft=B.props.fieldContext.getFieldsValue,rt=B.getNamePath();return Rt(ge||ft(!0),rt)},B.getControlled=function(){var ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ft=B.props,rt=ft.trigger,At=ft.validateTrigger,qt=ft.getValueFromEvent,Lr=ft.normalize,hr=ft.valuePropName,Qt=ft.getValueProps,Jt=ft.fieldContext,nr=At!==void 0?At:Jt.validateTrigger,Nr=B.getNamePath(),Yr=Jt.getInternalHooks,Hr=Jt.getFieldsValue,an=Yr(I),tn=an.dispatch,bn=B.getValue(),vn=Qt||function(z){return(0,i.Z)({},hr,z)},Ln=ge[rt],we=(0,o.Z)((0,o.Z)({},ge),vn(bn));we[rt]=function(){B.touched=!0,B.dirty=!0,B.triggerMetaEvent();for(var z,Mt=arguments.length,Ot=new Array(Mt),or=0;or=0&&Ln<=we.length?(ft.keys=[].concat((0,u.Z)(ft.keys.slice(0,Ln)),[ft.id],(0,u.Z)(ft.keys.slice(Ln))),Nr([].concat((0,u.Z)(we.slice(0,Ln)),[vn],(0,u.Z)(we.slice(Ln))))):(ft.keys=[].concat((0,u.Z)(ft.keys),[ft.id]),Nr([].concat((0,u.Z)(we),[vn]))),ft.id+=1},remove:function(vn){var Ln=Hr(),we=new Set(Array.isArray(vn)?vn:[vn]);we.size<=0||(ft.keys=ft.keys.filter(function(qe,z){return!we.has(z)}),Nr(Ln.filter(function(qe,z){return!we.has(z)})))},move:function(vn,Ln){if(vn!==Ln){var we=Hr();vn<0||vn>=we.length||Ln<0||Ln>=we.length||(ft.keys=Pr(ft.keys,vn,Ln),Nr(Pr(we,vn,Ln)))}}},tn=nr||[];return Array.isArray(tn)||(tn=[]),B(tn.map(function(bn,vn){var Ln=ft.keys[vn];return Ln===void 0&&(ft.keys[vn]=ft.id,Ln=ft.keys[vn],ft.id+=1),{name:vn,key:Ln,isListField:!0}}),an,Qt)})))},ur=Dt,$t=e(97685);function _r(gt){var Oe=!1,C=gt.length,G=[];return gt.length?new Promise(function(B,be){gt.forEach(function(ke,Qe){ke.catch(function(ge){return Oe=!0,ge}).then(function(ge){C-=1,G[Qe]=ge,!(C>0)&&(Oe&&be(G),B(G))})})}):Promise.resolve([])}var pr="__@field_split__";function Fr(gt){return gt.map(function(Oe){return"".concat((0,it.Z)(Oe),":").concat(Oe)}).join(pr)}var gn=function(){function gt(){(0,c.Z)(this,gt),this.kvs=new Map}return(0,l.Z)(gt,[{key:"set",value:function(C,G){this.kvs.set(Fr(C),G)}},{key:"get",value:function(C){return this.kvs.get(Fr(C))}},{key:"update",value:function(C,G){var B=this.get(C),be=G(B);be?this.set(C,be):this.delete(C)}},{key:"delete",value:function(C){this.kvs.delete(Fr(C))}},{key:"map",value:function(C){return(0,u.Z)(this.kvs.entries()).map(function(G){var B=(0,$t.Z)(G,2),be=B[0],ke=B[1],Qe=be.split(pr);return C({key:Qe.map(function(ge){var ft=ge.match(/^([^:]*):(.*)$/),rt=(0,$t.Z)(ft,3),At=rt[1],qt=rt[2];return At==="number"?Number(qt):qt}),value:ke})})}},{key:"toJSON",value:function(){var C={};return this.map(function(G){var B=G.key,be=G.value;return C[B.join(".")]=be,null}),C}}]),gt}(),cn=gn,yn=["name","errors"],dn=(0,l.Z)(function gt(Oe){var C=this;(0,c.Z)(this,gt),this.formHooked=!1,this.forceRootUpdate=void 0,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:C.getFieldValue,getFieldsValue:C.getFieldsValue,getFieldError:C.getFieldError,getFieldWarning:C.getFieldWarning,getFieldsError:C.getFieldsError,isFieldsTouched:C.isFieldsTouched,isFieldTouched:C.isFieldTouched,isFieldValidating:C.isFieldValidating,isFieldsValidating:C.isFieldsValidating,resetFields:C.resetFields,setFields:C.setFields,setFieldValue:C.setFieldValue,setFieldsValue:C.setFieldsValue,validateFields:C.validateFields,submit:C.submit,_init:!0,getInternalHooks:C.getInternalHooks}},this.getInternalHooks=function(G){return G===I?(C.formHooked=!0,{dispatch:C.dispatch,initEntityValue:C.initEntityValue,registerField:C.registerField,useSubscribe:C.useSubscribe,setInitialValues:C.setInitialValues,destroyForm:C.destroyForm,setCallbacks:C.setCallbacks,setValidateMessages:C.setValidateMessages,getFields:C.getFields,setPreserve:C.setPreserve,getInitialValue:C.getInitialValue,registerWatch:C.registerWatch}):((0,y.ZP)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(G){C.subscribable=G},this.prevWithoutPreserves=null,this.setInitialValues=function(G,B){if(C.initialValues=G||{},B){var be,ke=dr({},G,C.store);(be=C.prevWithoutPreserves)===null||be===void 0||be.map(function(Qe){var ge=Qe.key;ke=Ct(ke,ge,Rt(G,ge))}),C.prevWithoutPreserves=null,C.updateStore(ke)}},this.destroyForm=function(){var G=new cn;C.getFieldEntities(!0).forEach(function(B){C.isMergedPreserve(B.isPreserve())||G.set(B.getNamePath(),!0)}),C.prevWithoutPreserves=G},this.getInitialValue=function(G){var B=Rt(C.initialValues,G);return G.length?St(B):B},this.setCallbacks=function(G){C.callbacks=G},this.setValidateMessages=function(G){C.validateMessages=G},this.setPreserve=function(G){C.preserve=G},this.watchList=[],this.registerWatch=function(G){return C.watchList.push(G),function(){C.watchList=C.watchList.filter(function(B){return B!==G})}},this.notifyWatch=function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(C.watchList.length){var B=C.getFieldsValue();C.watchList.forEach(function(be){be(B,G)})}},this.timeoutId=null,this.warningUnhooked=function(){},this.updateStore=function(G){C.store=G},this.getFieldEntities=function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return G?C.fieldEntities.filter(function(B){return B.getNamePath().length}):C.fieldEntities},this.getFieldsMap=function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,B=new cn;return C.getFieldEntities(G).forEach(function(be){var ke=be.getNamePath();B.set(ke,be)}),B},this.getFieldEntitiesForNamePathList=function(G){if(!G)return C.getFieldEntities(!0);var B=C.getFieldsMap(!0);return G.map(function(be){var ke=dt(be);return B.get(ke)||{INVALIDATE_NAME_PATH:dt(be)}})},this.getFieldsValue=function(G,B){if(C.warningUnhooked(),G===!0&&!B)return C.store;var be=C.getFieldEntitiesForNamePathList(Array.isArray(G)?G:null),ke=[];return be.forEach(function(Qe){var ge,ft="INVALIDATE_NAME_PATH"in Qe?Qe.INVALIDATE_NAME_PATH:Qe.getNamePath();if(!(!G&&((ge=Qe.isListField)===null||ge===void 0?void 0:ge.call(Qe))))if(!B)ke.push(ft);else{var rt="getMeta"in Qe?Qe.getMeta():null;B(rt)&&ke.push(ft)}}),Ut(C.store,ke.map(dt))},this.getFieldValue=function(G){C.warningUnhooked();var B=dt(G);return Rt(C.store,B)},this.getFieldsError=function(G){C.warningUnhooked();var B=C.getFieldEntitiesForNamePathList(G);return B.map(function(be,ke){return be&&!("INVALIDATE_NAME_PATH"in be)?{name:be.getNamePath(),errors:be.getErrors(),warnings:be.getWarnings()}:{name:dt(G[ke]),errors:[],warnings:[]}})},this.getFieldError=function(G){C.warningUnhooked();var B=dt(G),be=C.getFieldsError([B])[0];return be.errors},this.getFieldWarning=function(G){C.warningUnhooked();var B=dt(G),be=C.getFieldsError([B])[0];return be.warnings},this.isFieldsTouched=function(){C.warningUnhooked();for(var G=arguments.length,B=new Array(G),be=0;be0&&arguments[0]!==void 0?arguments[0]:{},B=new cn,be=C.getFieldEntities(!0);be.forEach(function(ge){var ft=ge.props.initialValue,rt=ge.getNamePath();if(ft!==void 0){var At=B.get(rt)||new Set;At.add({entity:ge,value:ft}),B.set(rt,At)}});var ke=function(ft){ft.forEach(function(rt){var At=rt.props.initialValue;if(At!==void 0){var qt=rt.getNamePath(),Lr=C.getInitialValue(qt);if(Lr!==void 0)(0,y.ZP)(!1,"Form already set 'initialValues' with path '".concat(qt.join("."),"'. Field can not overwrite it."));else{var hr=B.get(qt);if(hr&&hr.size>1)(0,y.ZP)(!1,"Multiple Field with path '".concat(qt.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(hr){var Qt=C.getFieldValue(qt);(!G.skipExist||Qt===void 0)&&C.updateStore(Ct(C.store,qt,(0,u.Z)(hr)[0].value))}}}})},Qe;G.entities?Qe=G.entities:G.namePathList?(Qe=[],G.namePathList.forEach(function(ge){var ft=B.get(ge);if(ft){var rt;(rt=Qe).push.apply(rt,(0,u.Z)((0,u.Z)(ft).map(function(At){return At.entity})))}})):Qe=be,ke(Qe)},this.resetFields=function(G){C.warningUnhooked();var B=C.store;if(!G){C.updateStore(dr({},C.initialValues)),C.resetWithFieldInitialValue(),C.notifyObservers(B,null,{type:"reset"}),C.notifyWatch();return}var be=G.map(dt);be.forEach(function(ke){var Qe=C.getInitialValue(ke);C.updateStore(Ct(C.store,ke,Qe))}),C.resetWithFieldInitialValue({namePathList:be}),C.notifyObservers(B,be,{type:"reset"}),C.notifyWatch(be)},this.setFields=function(G){C.warningUnhooked();var B=C.store,be=[];G.forEach(function(ke){var Qe=ke.name,ge=ke.errors,ft=(0,a.Z)(ke,yn),rt=dt(Qe);be.push(rt),"value"in ft&&C.updateStore(Ct(C.store,rt,ft.value)),C.notifyObservers(B,[rt],{type:"setField",data:ke})}),C.notifyWatch(be)},this.getFields=function(){var G=C.getFieldEntities(!0),B=G.map(function(be){var ke=be.getNamePath(),Qe=be.getMeta(),ge=(0,o.Z)((0,o.Z)({},Qe),{},{name:ke,value:C.getFieldValue(ke)});return Object.defineProperty(ge,"originRCField",{value:!0}),ge});return B},this.initEntityValue=function(G){var B=G.props.initialValue;if(B!==void 0){var be=G.getNamePath(),ke=Rt(C.store,be);ke===void 0&&C.updateStore(Ct(C.store,be,B))}},this.isMergedPreserve=function(G){var B=G!==void 0?G:C.preserve;return B!=null?B:!0},this.registerField=function(G){C.fieldEntities.push(G);var B=G.getNamePath();if(C.notifyWatch([B]),G.props.initialValue!==void 0){var be=C.store;C.resetWithFieldInitialValue({entities:[G],skipExist:!0}),C.notifyObservers(be,[G.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(ke,Qe){var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(C.fieldEntities=C.fieldEntities.filter(function(At){return At!==G}),!C.isMergedPreserve(Qe)&&(!ke||ge.length>1)){var ft=ke?void 0:C.getInitialValue(B);if(B.length&&C.getFieldValue(B)!==ft&&C.fieldEntities.every(function(At){return!wr(At.getNamePath(),B)})){var rt=C.store;C.updateStore(Ct(rt,B,ft,!0)),C.notifyObservers(rt,[B],{type:"remove"}),C.triggerDependenciesUpdate(rt,B)}}C.notifyWatch([B])}},this.dispatch=function(G){switch(G.type){case"updateValue":{var B=G.namePath,be=G.value;C.updateValue(B,be);break}case"validateField":{var ke=G.namePath,Qe=G.triggerName;C.validateFields([ke],{triggerName:Qe});break}default:}},this.notifyObservers=function(G,B,be){if(C.subscribable){var ke=(0,o.Z)((0,o.Z)({},be),{},{store:C.getFieldsValue(!0)});C.getFieldEntities().forEach(function(Qe){var ge=Qe.onStoreChange;ge(G,B,ke)})}else C.forceRootUpdate()},this.triggerDependenciesUpdate=function(G,B){var be=C.getDependencyChildrenFields(B);return be.length&&C.validateFields(be),C.notifyObservers(G,be,{type:"dependenciesUpdate",relatedFields:[B].concat((0,u.Z)(be))}),be},this.updateValue=function(G,B){var be=dt(G),ke=C.store;C.updateStore(Ct(C.store,be,B)),C.notifyObservers(ke,[be],{type:"valueUpdate",source:"internal"}),C.notifyWatch([be]);var Qe=C.triggerDependenciesUpdate(ke,be),ge=C.callbacks.onValuesChange;if(ge){var ft=Ut(C.store,[be]);ge(ft,C.getFieldsValue())}C.triggerOnFieldsChange([be].concat((0,u.Z)(Qe)))},this.setFieldsValue=function(G){C.warningUnhooked();var B=C.store;if(G){var be=dr(C.store,G);C.updateStore(be)}C.notifyObservers(B,null,{type:"valueUpdate",source:"external"}),C.notifyWatch()},this.setFieldValue=function(G,B){C.setFields([{name:G,value:B}])},this.getDependencyChildrenFields=function(G){var B=new Set,be=[],ke=new cn;C.getFieldEntities().forEach(function(ge){var ft=ge.props.dependencies;(ft||[]).forEach(function(rt){var At=dt(rt);ke.update(At,function(){var qt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return qt.add(ge),qt})})});var Qe=function ge(ft){var rt=ke.get(ft)||new Set;rt.forEach(function(At){if(!B.has(At)){B.add(At);var qt=At.getNamePath();At.isFieldDirty()&&qt.length&&(be.push(qt),ge(qt))}})};return Qe(G),be},this.triggerOnFieldsChange=function(G,B){var be=C.callbacks.onFieldsChange;if(be){var ke=C.getFields();if(B){var Qe=new cn;B.forEach(function(ft){var rt=ft.name,At=ft.errors;Qe.set(rt,At)}),ke.forEach(function(ft){ft.errors=Qe.get(ft.name)||ft.errors})}var ge=ke.filter(function(ft){var rt=ft.name;return cr(G,rt)});be(ge,ke)}},this.validateFields=function(G,B){C.warningUnhooked();var be=!!G,ke=be?G.map(dt):[],Qe=[];C.getFieldEntities(!0).forEach(function(rt){if(be||ke.push(rt.getNamePath()),(B==null?void 0:B.recursive)&&be){var At=rt.getNamePath();At.every(function(hr,Qt){return G[Qt]===hr||G[Qt]===void 0})&&ke.push(At)}if(!(!rt.props.rules||!rt.props.rules.length)){var qt=rt.getNamePath();if(!be||cr(ke,qt)){var Lr=rt.validateRules((0,o.Z)({validateMessages:(0,o.Z)((0,o.Z)({},Je),C.validateMessages)},B));Qe.push(Lr.then(function(){return{name:qt,errors:[],warnings:[]}}).catch(function(hr){var Qt,Jt=[],nr=[];return(Qt=hr.forEach)===null||Qt===void 0||Qt.call(hr,function(Nr){var Yr=Nr.rule.warningOnly,Hr=Nr.errors;Yr?nr.push.apply(nr,(0,u.Z)(Hr)):Jt.push.apply(Jt,(0,u.Z)(Hr))}),Jt.length?Promise.reject({name:qt,errors:Jt,warnings:nr}):{name:qt,errors:Jt,warnings:nr}}))}}});var ge=_r(Qe);C.lastValidatePromise=ge,ge.catch(function(rt){return rt}).then(function(rt){var At=rt.map(function(qt){var Lr=qt.name;return Lr});C.notifyObservers(C.store,At,{type:"validateFinish"}),C.triggerOnFieldsChange(At,rt)});var ft=ge.then(function(){return C.lastValidatePromise===ge?Promise.resolve(C.getFieldsValue(ke)):Promise.reject([])}).catch(function(rt){var At=rt.filter(function(qt){return qt&&qt.errors.length});return Promise.reject({values:C.getFieldsValue(ke),errorFields:At,outOfDate:C.lastValidatePromise!==ge})});return ft.catch(function(rt){return rt}),ft},this.submit=function(){C.warningUnhooked(),C.validateFields().then(function(G){var B=C.callbacks.onFinish;if(B)try{B(G)}catch(be){console.error(be)}}).catch(function(G){var B=C.callbacks.onFinishFailed;B&&B(G)})},this.forceRootUpdate=Oe});function Yn(gt){var Oe=r.useRef(),C=r.useState({}),G=(0,$t.Z)(C,2),B=G[1];if(!Oe.current)if(gt)Oe.current=gt;else{var be=function(){B({})},ke=new dn(be);Oe.current=ke.getForm()}return[Oe.current]}var Dn=Yn,sn=r.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),ln=function(Oe){var C=Oe.validateMessages,G=Oe.onFormChange,B=Oe.onFormFinish,be=Oe.children,ke=r.useContext(sn),Qe=r.useRef({});return r.createElement(sn.Provider,{value:(0,o.Z)((0,o.Z)({},ke),{},{validateMessages:(0,o.Z)((0,o.Z)({},ke.validateMessages),C),triggerFormChange:function(ft,rt){G&&G(ft,{changedFields:rt,forms:Qe.current}),ke.triggerFormChange(ft,rt)},triggerFormFinish:function(ft,rt){B&&B(ft,{values:rt,forms:Qe.current}),ke.triggerFormFinish(ft,rt)},registerForm:function(ft,rt){ft&&(Qe.current=(0,o.Z)((0,o.Z)({},Qe.current),{},(0,i.Z)({},ft,rt))),ke.registerForm(ft,rt)},unregisterForm:function(ft){var rt=(0,o.Z)({},Qe.current);delete rt[ft],Qe.current=rt,ke.unregisterForm(ft)}})},be)},_n=sn,Mn=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],Ur=function(Oe,C){var G=Oe.name,B=Oe.initialValues,be=Oe.fields,ke=Oe.form,Qe=Oe.preserve,ge=Oe.children,ft=Oe.component,rt=ft===void 0?"form":ft,At=Oe.validateMessages,qt=Oe.validateTrigger,Lr=qt===void 0?"onChange":qt,hr=Oe.onValuesChange,Qt=Oe.onFieldsChange,Jt=Oe.onFinish,nr=Oe.onFinishFailed,Nr=(0,a.Z)(Oe,Mn),Yr=r.useContext(_n),Hr=Dn(ke),an=(0,$t.Z)(Hr,1),tn=an[0],bn=tn.getInternalHooks(I),vn=bn.useSubscribe,Ln=bn.setInitialValues,we=bn.setCallbacks,qe=bn.setValidateMessages,z=bn.setPreserve,Mt=bn.destroyForm;r.useImperativeHandle(C,function(){return tn}),r.useEffect(function(){return Yr.registerForm(G,tn),function(){Yr.unregisterForm(G)}},[Yr,tn,G]),qe((0,o.Z)((0,o.Z)({},Yr.validateMessages),At)),we({onValuesChange:hr,onFieldsChange:function(zr){if(Yr.triggerFormChange(G,zr),Qt){for(var un=arguments.length,kn=new Array(un>1?un-1:0),sa=1;sa3&&arguments[3]!==void 0?arguments[3]:1;if(!mr)return null;var _t=jt(mr,Kt),Zt=_t.length,Dt=_t.findIndex(function(ur){return sr===ur});return Mr<0?Dt===-1?Dt=Zt-1:Dt-=1:Mr>0&&(Dt+=1),Dt=(Dt+Zt)%Zt,_t[Dt]}function Wt(mr,Kt,sr,Mr,_t,Zt,Dt,ur,$t,_r){var pr=_.useRef(),Fr=_.useRef();Fr.current=Kt;var gn=function(){L.Z.cancel(pr.current)};return _.useEffect(function(){return function(){gn()}},[]),function(cn){var yn=cn.which;if([].concat(ht,[Ze,De,Fe,mt]).includes(yn)){var dn,Yn,Dn,sn=function(){dn=new Set,Yn=new Map,Dn=new Map;var Oe=Zt();return Oe.forEach(function(C){var G=document.querySelector("[data-menu-id='".concat(O(Mr,C),"']"));G&&(dn.add(G),Dn.set(G,C),Yn.set(C,G))}),dn};sn();var ln=Yn.get(Kt),_n=ct(ln,dn),Mn=Dn.get(_n),Ur=xt(mr,Dt(Mn,!0).length===1,sr,yn);if(!Ur&&yn!==Fe&&yn!==mt)return;(ht.includes(yn)||[Fe,mt].includes(yn))&&cn.preventDefault();var ea=function(Oe){if(Oe){var C=Oe,G=Oe.querySelector("a");G!=null&&G.getAttribute("href")&&(C=G);var B=Dn.get(Oe);ur(B),gn(),pr.current=(0,L.Z)(function(){Fr.current===B&&C.focus()})}};if([Fe,mt].includes(yn)||Ur.sibling||!_n){var ca;!_n||mr==="inline"?ca=_t.current:ca=Et(_n);var da,Ia=jt(ca,dn);yn===Fe?da=Ia[0]:yn===mt?da=Ia[Ia.length-1]:da=Tt(ca,dn,_n,Ur.offset),ea(da)}else if(Ur.inlineTrigger)$t(Mn);else if(Ur.offset>0)$t(Mn,!0),gn(),pr.current=(0,L.Z)(function(){sn();var gt=_n.getAttribute("aria-controls"),Oe=document.getElementById(gt),C=Tt(Oe,dn);ea(C)},5);else if(Ur.offset<0){var ka=Dt(Mn,!0),na=ka[ka.length-2],Za=Yn.get(na);$t(na,!1),ea(Za)}}_r==null||_r(cn)}}function Bt(mr){Promise.resolve().then(mr)}var Ht="__RC_UTIL_PATH_SPLIT__",rr=function(Kt){return Kt.join(Ht)},Sr=function(Kt){return Kt.split(Ht)},Ar="rc-menu-more";function ye(){var mr=_.useState({}),Kt=(0,o.Z)(mr,2),sr=Kt[1],Mr=(0,_.useRef)(new Map),_t=(0,_.useRef)(new Map),Zt=_.useState([]),Dt=(0,o.Z)(Zt,2),ur=Dt[0],$t=Dt[1],_r=(0,_.useRef)(0),pr=(0,_.useRef)(!1),Fr=function(){pr.current||sr({})},gn=(0,_.useCallback)(function(ln,_n){var Mn=rr(_n);_t.current.set(Mn,ln),Mr.current.set(ln,Mn),_r.current+=1;var Ur=_r.current;Bt(function(){Ur===_r.current&&Fr()})},[]),cn=(0,_.useCallback)(function(ln,_n){var Mn=rr(_n);_t.current.delete(Mn),Mr.current.delete(ln)},[]),yn=(0,_.useCallback)(function(ln){$t(ln)},[]),dn=(0,_.useCallback)(function(ln,_n){var Mn=Mr.current.get(ln)||"",Ur=Sr(Mn);return _n&&ur.includes(Ur[0])&&Ur.unshift(Ar),Ur},[ur]),Yn=(0,_.useCallback)(function(ln,_n){return ln.some(function(Mn){var Ur=dn(Mn,!0);return Ur.includes(_n)})},[dn]),Dn=function(){var _n=(0,i.Z)(Mr.current.keys());return ur.length&&_n.push(Ar),_n},sn=(0,_.useCallback)(function(ln){var _n="".concat(Mr.current.get(ln)).concat(Ht),Mn=new Set;return(0,i.Z)(_t.current.keys()).forEach(function(Ur){Ur.startsWith(_n)&&Mn.add(_t.current.get(Ur))}),Mn},[]);return _.useEffect(function(){return function(){pr.current=!0}},[]),{registerPath:gn,unregisterPath:cn,refreshOverflowKeys:yn,isSubPathKey:Yn,getKeyPath:dn,getKeys:Dn,getSubPathKeys:sn}}function T(mr){var Kt=_.useRef(mr);Kt.current=mr;var sr=_.useCallback(function(){for(var Mr,_t=arguments.length,Zt=new Array(_t),Dt=0;Dt<_t;Dt++)Zt[Dt]=arguments[Dt];return(Mr=Kt.current)===null||Mr===void 0?void 0:Mr.call.apply(Mr,[Kt].concat(Zt))},[]);return mr?sr:void 0}var b=Math.random().toFixed(5).toString().slice(2),q=0;function Ce(mr){var Kt=(0,p.Z)(mr,{value:mr}),sr=(0,o.Z)(Kt,2),Mr=sr[0],_t=sr[1];return _.useEffect(function(){q+=1;var Zt="".concat(b,"-").concat(q);_t("rc-menu-uuid-".concat(Zt))},[]),Mr}var le=e(15671),fe=e(43144),pe=e(60136),Re=e(29388),X=e(98423);function je(mr,Kt,sr,Mr){var _t=_.useContext(D),Zt=_t.activeKey,Dt=_t.onActive,ur=_t.onInactive,$t={active:Zt===mr};return Kt||($t.onMouseEnter=function(_r){sr==null||sr({key:mr,domEvent:_r}),Dt(mr)},$t.onMouseLeave=function(_r){Mr==null||Mr({key:mr,domEvent:_r}),ur(mr)}),$t}var He=["item"];function tt(mr){var Kt=mr.item,sr=(0,u.Z)(mr,He);return Object.defineProperty(sr,"item",{get:function(){return(0,M.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Kt}}),sr}function We(mr){var Kt=mr.icon,sr=mr.props,Mr=mr.children,_t;return typeof Kt=="function"?_t=_.createElement(Kt,(0,a.Z)({},sr)):_t=Kt,_t||Mr||null}function Ue(mr){var Kt=_.useContext(D),sr=Kt.mode,Mr=Kt.rtl,_t=Kt.inlineIndent;if(sr!=="inline")return null;var Zt=mr;return Mr?{paddingRight:Zt*_t}:{paddingLeft:Zt*_t}}var Ie=["title","attribute","elementRef"],$e=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Le=["active"],ze=function(mr){(0,pe.Z)(sr,mr);var Kt=(0,Re.Z)(sr);function sr(){return(0,le.Z)(this,sr),Kt.apply(this,arguments)}return(0,fe.Z)(sr,[{key:"render",value:function(){var _t=this.props,Zt=_t.title,Dt=_t.attribute,ur=_t.elementRef,$t=(0,u.Z)(_t,Ie),_r=(0,X.Z)($t,["eventKey"]);return(0,M.ZP)(!Dt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),_.createElement(d.Z.Item,(0,r.Z)({},Dt,{title:typeof Zt=="string"?Zt:void 0},_r,{ref:ur}))}}]),sr}(_.Component),_e=function(Kt){var sr,Mr=Kt.style,_t=Kt.className,Zt=Kt.eventKey,Dt=Kt.warnKey,ur=Kt.disabled,$t=Kt.itemIcon,_r=Kt.children,pr=Kt.role,Fr=Kt.onMouseEnter,gn=Kt.onMouseLeave,cn=Kt.onClick,yn=Kt.onKeyDown,dn=Kt.onFocus,Yn=(0,u.Z)(Kt,$e),Dn=j(Zt),sn=_.useContext(D),ln=sn.prefixCls,_n=sn.onItemClick,Mn=sn.disabled,Ur=sn.overflowDisabled,ea=sn.itemIcon,ca=sn.selectedKeys,da=sn.onActive,Ia=_.useContext(V),ka=Ia._internalRenderMenuItem,na="".concat(ln,"-item"),Za=_.useRef(),gt=_.useRef(),Oe=Mn||ur,C=ce(Zt),G=function(Jt){return{key:Zt,keyPath:(0,i.Z)(C).reverse(),item:Za.current,domEvent:Jt}},B=$t||ea,be=je(Zt,Oe,Fr,gn),ke=be.active,Qe=(0,u.Z)(be,Le),ge=ca.includes(Zt),ft=Ue(C.length),rt=function(Jt){if(!Oe){var nr=G(Jt);cn==null||cn(tt(nr)),_n(nr)}},At=function(Jt){if(yn==null||yn(Jt),Jt.which===W.Z.ENTER){var nr=G(Jt);cn==null||cn(tt(nr)),_n(nr)}},qt=function(Jt){da(Zt),dn==null||dn(Jt)},Lr={};Kt.role==="option"&&(Lr["aria-selected"]=ge);var hr=_.createElement(ze,(0,r.Z)({ref:Za,elementRef:gt,role:pr===null?"none":pr||"menuitem",tabIndex:ur?null:-1,"data-menu-id":Ur&&Dn?null:Dn},Yn,Qe,Lr,{component:"li","aria-disabled":ur,style:(0,a.Z)((0,a.Z)({},ft),Mr),className:l()(na,(sr={},(0,t.Z)(sr,"".concat(na,"-active"),ke),(0,t.Z)(sr,"".concat(na,"-selected"),ge),(0,t.Z)(sr,"".concat(na,"-disabled"),Oe),sr),_t),onClick:rt,onKeyDown:At,onFocus:qt}),_r,_.createElement(We,{props:(0,a.Z)((0,a.Z)({},Kt),{},{isSelected:ge}),icon:B}));return ka&&(hr=ka(hr,Kt,{selected:ge})),hr};function ue(mr){var Kt=mr.eventKey,sr=he(),Mr=ce(Kt);return _.useEffect(function(){if(sr)return sr.registerPath(Kt,Mr),function(){sr.unregisterPath(Kt,Mr)}},[Mr]),sr?null:_.createElement(_e,mr)}var Ye=ue,Ve=["className","children"],Je=function(Kt,sr){var Mr=Kt.className,_t=Kt.children,Zt=(0,u.Z)(Kt,Ve),Dt=_.useContext(D),ur=Dt.prefixCls,$t=Dt.mode,_r=Dt.rtl;return _.createElement("ul",(0,r.Z)({className:l()(ur,_r&&"".concat(ur,"-rtl"),"".concat(ur,"-sub"),"".concat(ur,"-").concat($t==="inline"?"inline":"vertical"),Mr)},Zt,{"data-menu-list":!0,ref:sr}),_t)},it=_.forwardRef(Je);it.displayName="SubMenuList";var Te=it,Pe=e(71002),nt=e(50344),pt=["label","children","key","type"];function yt(mr,Kt){return(0,nt.Z)(mr).map(function(sr,Mr){if(_.isValidElement(sr)){var _t,Zt,Dt=sr.key,ur=(_t=(Zt=sr.props)===null||Zt===void 0?void 0:Zt.eventKey)!==null&&_t!==void 0?_t:Dt,$t=ur==null;$t&&(ur="tmp_key-".concat([].concat((0,i.Z)(Kt),[Mr]).join("-")));var _r={key:ur,eventKey:ur};return _.cloneElement(sr,_r)}return sr})}function wt(mr){return(mr||[]).map(function(Kt,sr){if(Kt&&(0,Pe.Z)(Kt)==="object"){var Mr=Kt,_t=Mr.label,Zt=Mr.children,Dt=Mr.key,ur=Mr.type,$t=(0,u.Z)(Mr,pt),_r=Dt!=null?Dt:"tmp-".concat(sr);return Zt||ur==="group"?ur==="group"?_.createElement(en,(0,r.Z)({key:_r},$t,{title:_t}),wt(Zt)):_.createElement(nn,(0,r.Z)({key:_r},$t,{title:_t}),wt(Zt)):ur==="divider"?_.createElement(Wn,(0,r.Z)({key:_r},$t)):_.createElement(Ye,(0,r.Z)({key:_r},$t),_t)}return null}).filter(function(Kt){return Kt})}function ot(mr,Kt,sr){var Mr=mr;return Kt&&(Mr=wt(Kt)),yt(Mr,sr)}var St=e(81263),dt={adjustX:1,adjustY:1},Rt={topLeft:{points:["bl","tl"],overflow:dt,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:dt,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:dt,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:dt,offset:[4,0]}},Ct={topLeft:{points:["bl","tl"],overflow:dt,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:dt,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:dt,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:dt,offset:[4,0]}},Ut=null;function cr(mr,Kt,sr){if(Kt)return Kt;if(sr)return sr[mr]||sr.other}var ir={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Rr(mr){var Kt=mr.prefixCls,sr=mr.visible,Mr=mr.children,_t=mr.popup,Zt=mr.popupClassName,Dt=mr.popupOffset,ur=mr.disabled,$t=mr.mode,_r=mr.onVisibleChange,pr=_.useContext(D),Fr=pr.getPopupContainer,gn=pr.rtl,cn=pr.subMenuOpenDelay,yn=pr.subMenuCloseDelay,dn=pr.builtinPlacements,Yn=pr.triggerSubMenuAction,Dn=pr.forceSubMenuRender,sn=pr.rootClassName,ln=pr.motion,_n=pr.defaultMotions,Mn=_.useState(!1),Ur=(0,o.Z)(Mn,2),ea=Ur[0],ca=Ur[1],da=gn?(0,a.Z)((0,a.Z)({},Ct),dn):(0,a.Z)((0,a.Z)({},Rt),dn),Ia=ir[$t],ka=cr($t,ln,_n),na=(0,a.Z)((0,a.Z)({},ka),{},{leavedClassName:"".concat(Kt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Za=_.useRef();return _.useEffect(function(){return Za.current=(0,L.Z)(function(){ca(sr)}),function(){L.Z.cancel(Za.current)}},[sr]),_.createElement(St.Z,{prefixCls:Kt,popupClassName:l()("".concat(Kt,"-popup"),(0,t.Z)({},"".concat(Kt,"-rtl"),gn),Zt,sn),stretch:$t==="horizontal"?"minWidth":null,getPopupContainer:Fr,builtinPlacements:da,popupPlacement:Ia,popupVisible:ea,popup:_t,popupAlign:Dt&&{offset:Dt},action:ur?[]:[Yn],mouseEnterDelay:cn,mouseLeaveDelay:yn,onPopupVisibleChange:_r,forceRender:Dn,popupMotion:na},Mr)}var dr=e(62874);function wr(mr){var Kt=mr.id,sr=mr.open,Mr=mr.keyPath,_t=mr.children,Zt="inline",Dt=_.useContext(D),ur=Dt.prefixCls,$t=Dt.forceSubMenuRender,_r=Dt.motion,pr=Dt.defaultMotions,Fr=Dt.mode,gn=_.useRef(!1);gn.current=Fr===Zt;var cn=_.useState(!gn.current),yn=(0,o.Z)(cn,2),dn=yn[0],Yn=yn[1],Dn=gn.current?sr:!1;_.useEffect(function(){gn.current&&Yn(!1)},[Fr]);var sn=(0,a.Z)({},cr(Zt,_r,pr));Mr.length>1&&(sn.motionAppear=!1);var ln=sn.onVisibleChanged;return sn.onVisibleChanged=function(_n){return!gn.current&&!_n&&Yn(!0),ln==null?void 0:ln(_n)},dn?null:_.createElement(U,{mode:Zt,locked:!gn.current},_.createElement(dr.Z,(0,r.Z)({visible:Dn},sn,{forceRender:$t,removeOnLeave:!1,leavedClassName:"".concat(ur,"-hidden")}),function(_n){var Mn=_n.className,Ur=_n.style;return _.createElement(Te,{id:Kt,className:Mn,style:Ur},_t)}))}var Vr=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Qr=["active"],Pr=function(Kt){var sr,Mr=Kt.style,_t=Kt.className,Zt=Kt.title,Dt=Kt.eventKey,ur=Kt.warnKey,$t=Kt.disabled,_r=Kt.internalPopupClose,pr=Kt.children,Fr=Kt.itemIcon,gn=Kt.expandIcon,cn=Kt.popupClassName,yn=Kt.popupOffset,dn=Kt.onClick,Yn=Kt.onMouseEnter,Dn=Kt.onMouseLeave,sn=Kt.onTitleClick,ln=Kt.onTitleMouseEnter,_n=Kt.onTitleMouseLeave,Mn=(0,u.Z)(Kt,Vr),Ur=j(Dt),ea=_.useContext(D),ca=ea.prefixCls,da=ea.mode,Ia=ea.openKeys,ka=ea.disabled,na=ea.overflowDisabled,Za=ea.activeKey,gt=ea.selectedKeys,Oe=ea.itemIcon,C=ea.expandIcon,G=ea.onItemClick,B=ea.onOpenChange,be=ea.onActive,ke=_.useContext(V),Qe=ke._internalRenderSubMenuItem,ge=_.useContext(xe),ft=ge.isSubPathKey,rt=ce(),At="".concat(ca,"-submenu"),qt=ka||$t,Lr=_.useRef(),hr=_.useRef(),Qt=Fr||Oe,Jt=gn||C,nr=Ia.includes(Dt),Nr=!na&&nr,Yr=ft(gt,Dt),Hr=je(Dt,qt,ln,_n),an=Hr.active,tn=(0,u.Z)(Hr,Qr),bn=_.useState(!1),vn=(0,o.Z)(bn,2),Ln=vn[0],we=vn[1],qe=function(ba){qt||we(ba)},z=function(ba){qe(!0),Yn==null||Yn({key:Dt,domEvent:ba})},Mt=function(ba){qe(!1),Dn==null||Dn({key:Dt,domEvent:ba})},Ot=_.useMemo(function(){return an||(da!=="inline"?Ln||ft([Za],Dt):!1)},[da,an,Za,Ln,Dt,ft]),or=Ue(rt.length),vr=function(ba){qt||(sn==null||sn({key:Dt,domEvent:ba}),da==="inline"&&B(Dt,!nr))},xr=T(function(sa){dn==null||dn(tt(sa)),G(sa)}),Br=function(ba){da!=="inline"&&B(Dt,ba)},On=function(){be(Dt)},Dr=Ur&&"".concat(Ur,"-popup"),Cr=_.createElement("div",(0,r.Z)({role:"menuitem",style:or,className:"".concat(At,"-title"),tabIndex:qt?null:-1,ref:Lr,title:typeof Zt=="string"?Zt:null,"data-menu-id":na&&Ur?null:Ur,"aria-expanded":Nr,"aria-haspopup":!0,"aria-controls":Dr,"aria-disabled":qt,onClick:vr,onFocus:On},tn),Zt,_.createElement(We,{icon:da!=="horizontal"?Jt:null,props:(0,a.Z)((0,a.Z)({},Kt),{},{isOpen:Nr,isSubMenu:!0})},_.createElement("i",{className:"".concat(At,"-arrow")}))),zr=_.useRef(da);if(da!=="inline"&&rt.length>1?zr.current="vertical":zr.current=da,!na){var un=zr.current;Cr=_.createElement(Rr,{mode:un,prefixCls:At,visible:!_r&&Nr&&da!=="inline",popupClassName:cn,popupOffset:yn,popup:_.createElement(U,{mode:un==="horizontal"?"vertical":un},_.createElement(Te,{id:Dr,ref:hr},pr)),disabled:qt,onVisibleChange:Br},Cr)}var kn=_.createElement(d.Z.Item,(0,r.Z)({role:"none"},Mn,{component:"li",style:Mr,className:l()(At,"".concat(At,"-").concat(da),_t,(sr={},(0,t.Z)(sr,"".concat(At,"-open"),Nr),(0,t.Z)(sr,"".concat(At,"-active"),Ot),(0,t.Z)(sr,"".concat(At,"-selected"),Yr),(0,t.Z)(sr,"".concat(At,"-disabled"),qt),sr)),onMouseEnter:z,onMouseLeave:Mt}),Cr,!na&&_.createElement(wr,{id:Dr,open:Nr,keyPath:rt},pr));return Qe&&(kn=Qe(kn,Kt,{selected:Yr,active:Ot,open:Nr,disabled:qt})),_.createElement(U,{onItemClick:xr,mode:da==="horizontal"?"vertical":da,itemIcon:Qt,expandIcon:Jt},kn)};function nn(mr){var Kt=mr.eventKey,sr=mr.children,Mr=ce(Kt),_t=yt(sr,Mr),Zt=he();_.useEffect(function(){if(Zt)return Zt.registerPath(Kt,Mr),function(){Zt.unregisterPath(Kt,Mr)}},[Mr]);var Dt;return Zt?Dt=_t:Dt=_.createElement(Pr,mr,_t),_.createElement(ve.Provider,{value:Mr},Dt)}var qr=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],fn=[],Zn=_.forwardRef(function(mr,Kt){var sr,Mr,_t=mr,Zt=_t.prefixCls,Dt=Zt===void 0?"rc-menu":Zt,ur=_t.rootClassName,$t=_t.style,_r=_t.className,pr=_t.tabIndex,Fr=pr===void 0?0:pr,gn=_t.items,cn=_t.children,yn=_t.direction,dn=_t.id,Yn=_t.mode,Dn=Yn===void 0?"vertical":Yn,sn=_t.inlineCollapsed,ln=_t.disabled,_n=_t.disabledOverflow,Mn=_t.subMenuOpenDelay,Ur=Mn===void 0?.1:Mn,ea=_t.subMenuCloseDelay,ca=ea===void 0?.1:ea,da=_t.forceSubMenuRender,Ia=_t.defaultOpenKeys,ka=_t.openKeys,na=_t.activeKey,Za=_t.defaultActiveFirst,gt=_t.selectable,Oe=gt===void 0?!0:gt,C=_t.multiple,G=C===void 0?!1:C,B=_t.defaultSelectedKeys,be=_t.selectedKeys,ke=_t.onSelect,Qe=_t.onDeselect,ge=_t.inlineIndent,ft=ge===void 0?24:ge,rt=_t.motion,At=_t.defaultMotions,qt=_t.triggerSubMenuAction,Lr=qt===void 0?"hover":qt,hr=_t.builtinPlacements,Qt=_t.itemIcon,Jt=_t.expandIcon,nr=_t.overflowedIndicator,Nr=nr===void 0?"...":nr,Yr=_t.overflowedIndicatorPopupClassName,Hr=_t.getPopupContainer,an=_t.onClick,tn=_t.onOpenChange,bn=_t.onKeyDown,vn=_t.openAnimation,Ln=_t.openTransitionName,we=_t._internalRenderMenuItem,qe=_t._internalRenderSubMenuItem,z=(0,u.Z)(_t,qr),Mt=_.useMemo(function(){return ot(cn,gn,fn)},[cn,gn]),Ot=_.useState(!1),or=(0,o.Z)(Ot,2),vr=or[0],xr=or[1],Br=_.useRef(),On=Ce(dn),Dr=yn==="rtl",Cr=(0,p.Z)(Ia,{value:ka,postState:function(aa){return aa||fn}}),zr=(0,o.Z)(Cr,2),un=zr[0],kn=zr[1],sa=function(aa){var Sa=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function ri(){kn(aa),tn==null||tn(aa)}Sa?(0,y.flushSync)(ri):ri()},ba=_.useState(un),za=(0,o.Z)(ba,2),Ka=za[0],Ba=za[1],Fa=_.useRef(!1),hi=_.useMemo(function(){return(Dn==="inline"||Dn==="vertical")&&sn?["vertical",sn]:[Dn,!1]},[Dn,sn]),Gr=(0,o.Z)(hi,2),Xa=Gr[0],$n=Gr[1],wa=Xa==="inline",Wa=_.useState(Xa),Ua=(0,o.Z)(Wa,2),Ra=Ua[0],Oi=Ua[1],Ga=_.useState($n),Ta=(0,o.Z)(Ga,2),$=Ta[0],Y=Ta[1];_.useEffect(function(){Oi(Xa),Y($n),Fa.current&&(wa?kn(Ka):sa(fn))},[Xa,$n]);var w=_.useState(0),N=(0,o.Z)(w,2),P=N[0],Z=N[1],ne=P>=Mt.length-1||Ra!=="horizontal"||_n;_.useEffect(function(){wa&&Ba(un)},[un]),_.useEffect(function(){return Fa.current=!0,function(){Fa.current=!1}},[]);var se=ye(),Ne=se.registerPath,et=se.unregisterPath,at=se.refreshOverflowKeys,ut=se.isSubPathKey,Yt=se.getKeyPath,fr=se.getKeys,Tr=se.getSubPathKeys,Ir=_.useMemo(function(){return{registerPath:Ne,unregisterPath:et}},[Ne,et]),pn=_.useMemo(function(){return{isSubPathKey:ut}},[ut]);_.useEffect(function(){at(ne?fn:Mt.slice(P+1).map(function(va){return va.key}))},[P,ne]);var Jr=(0,p.Z)(na||Za&&((sr=Mt[0])===null||sr===void 0?void 0:sr.key),{value:na}),hn=(0,o.Z)(Jr,2),An=hn[0],ha=hn[1],oa=T(function(va){ha(va)}),Fn=T(function(){ha(void 0)});(0,_.useImperativeHandle)(Kt,function(){return{list:Br.current,focus:function(aa){var Sa,ri=An!=null?An:(Sa=Mt.find(function(Qa){return!Qa.props.disabled}))===null||Sa===void 0?void 0:Sa.key;if(ri){var Ea,ni,ai;(Ea=Br.current)===null||Ea===void 0||(ni=Ea.querySelector("li[data-menu-id='".concat(O(On,ri),"']")))===null||ni===void 0||(ai=ni.focus)===null||ai===void 0||ai.call(ni,aa)}}}});var ya=(0,p.Z)(B||[],{value:be,postState:function(aa){return Array.isArray(aa)?aa:aa==null?fn:[aa]}}),_a=(0,o.Z)(ya,2),ua=_a[0],Na=_a[1],ja=function(aa){if(Oe){var Sa=aa.key,ri=ua.includes(Sa),Ea;G?ri?Ea=ua.filter(function(ai){return ai!==Sa}):Ea=[].concat((0,i.Z)(ua),[Sa]):Ea=[Sa],Na(Ea);var ni=(0,a.Z)((0,a.Z)({},aa),{},{selectedKeys:Ea});ri?Qe==null||Qe(ni):ke==null||ke(ni)}!G&&un.length&&Ra!=="inline"&&sa(fn)},fi=T(function(va){an==null||an(tt(va)),ja(va)}),gi=T(function(va,aa){var Sa=un.filter(function(Ea){return Ea!==va});if(aa)Sa.push(va);else if(Ra!=="inline"){var ri=Tr(va);Sa=Sa.filter(function(Ea){return!ri.has(Ea)})}S()(un,Sa)||sa(Sa,!0)}),bi=T(Hr),Ri=function(aa,Sa){var ri=Sa!=null?Sa:!un.includes(aa);gi(aa,ri)},yi=Wt(Ra,An,Dr,On,Br,fr,Yt,ha,Ri,bn);_.useEffect(function(){xr(!0)},[]);var Ha=_.useMemo(function(){return{_internalRenderMenuItem:we,_internalRenderSubMenuItem:qe}},[we,qe]),Pa=Ra!=="horizontal"||_n?Mt:Mt.map(function(va,aa){return _.createElement(U,{key:va.key,overflowDisabled:aa>P},va)}),Pi=_.createElement(d.Z,(0,r.Z)({id:dn,ref:Br,prefixCls:"".concat(Dt,"-overflow"),component:"ul",itemComponent:Ye,className:l()(Dt,"".concat(Dt,"-root"),"".concat(Dt,"-").concat(Ra),_r,(Mr={},(0,t.Z)(Mr,"".concat(Dt,"-inline-collapsed"),$),(0,t.Z)(Mr,"".concat(Dt,"-rtl"),Dr),Mr),ur),dir:yn,style:$t,role:"menu",tabIndex:Fr,data:Pa,renderRawItem:function(aa){return aa},renderRawRest:function(aa){var Sa=aa.length,ri=Sa?Mt.slice(-Sa):null;return _.createElement(nn,{eventKey:Ar,title:Nr,disabled:ne,internalPopupClose:Sa===0,popupClassName:Yr},ri)},maxCount:Ra!=="horizontal"||_n?d.Z.INVALIDATE:d.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(aa){Z(aa)},onKeyDown:yi},z));return _.createElement(V.Provider,{value:Ha},_.createElement(A.Provider,{value:On},_.createElement(U,{prefixCls:Dt,rootClassName:ur,mode:Ra,openKeys:un,rtl:Dr,disabled:ln,motion:vr?rt:null,defaultMotions:vr?At:null,activeKey:An,onActive:oa,onInactive:Fn,selectedKeys:ua,inlineIndent:ft,subMenuOpenDelay:Ur,subMenuCloseDelay:ca,forceSubMenuRender:da,builtinPlacements:hr,triggerSubMenuAction:Lr,getPopupContainer:bi,itemIcon:Qt,expandIcon:Jt,onItemClick:fi,onOpenChange:gi},_.createElement(xe.Provider,{value:pn},Pi),_.createElement("div",{style:{display:"none"},"aria-hidden":!0},_.createElement(de.Provider,{value:Ir},Mt)))))}),Gn=Zn,Rn=["className","title","eventKey","children"],mn=["children"],xn=function(Kt){var sr=Kt.className,Mr=Kt.title,_t=Kt.eventKey,Zt=Kt.children,Dt=(0,u.Z)(Kt,Rn),ur=_.useContext(D),$t=ur.prefixCls,_r="".concat($t,"-item-group");return _.createElement("li",(0,r.Z)({},Dt,{onClick:function(Fr){return Fr.stopPropagation()},className:l()(_r,sr)}),_.createElement("div",{className:"".concat(_r,"-title"),title:typeof Mr=="string"?Mr:void 0},Mr),_.createElement("ul",{className:"".concat(_r,"-list")},Zt))};function en(mr){var Kt=mr.children,sr=(0,u.Z)(mr,mn),Mr=ce(sr.eventKey),_t=yt(Kt,Mr),Zt=he();return Zt?_t:_.createElement(xn,(0,X.Z)(sr,["warnKey"]),_t)}function Wn(mr){var Kt=mr.className,sr=mr.style,Mr=_.useContext(D),_t=Mr.prefixCls,Zt=he();return Zt?null:_.createElement("li",{className:l()("".concat(_t,"-item-divider"),Kt),style:sr})}var Un=Gn;Un.Item=Ye,Un.SubMenu=nn,Un.ItemGroup=en,Un.Divider=Wn;var Kn=Un},62874:function(f,v,e){"use strict";e.d(v,{V:function(){return He},Z:function(){return tt}});var r=e(4942),t=e(1413),a=e(97685),i=e(71002),o=e(67294),u=e(34203),c=e(42550),l=e(94184),d=e.n(l),p=e(98924);function M(We,Ue){var Ie={};return Ie[We.toLowerCase()]=Ue.toLowerCase(),Ie["Webkit".concat(We)]="webkit".concat(Ue),Ie["Moz".concat(We)]="moz".concat(Ue),Ie["ms".concat(We)]="MS".concat(Ue),Ie["O".concat(We)]="o".concat(Ue.toLowerCase()),Ie}function _(We,Ue){var Ie={animationend:M("Animation","AnimationEnd"),transitionend:M("Transition","TransitionEnd")};return We&&("AnimationEvent"in Ue||delete Ie.animationend.animation,"TransitionEvent"in Ue||delete Ie.transitionend.transition),Ie}var y=_((0,p.Z)(),typeof window!="undefined"?window:{}),I={};if((0,p.Z)()){var S=document.createElement("div");I=S.style}var A={};function O(We){if(A[We])return A[We];var Ue=y[We];if(Ue)for(var Ie=Object.keys(Ue),$e=Ie.length,Le=0;Le<$e;Le+=1){var ze=Ie[Le];if(Object.prototype.hasOwnProperty.call(Ue,ze)&&ze in I)return A[We]=Ue[ze],A[We]}return""}var j=O("animationend"),F=O("transitionend"),J=!!(j&&F),D=j||"animationend",R=F||"transitionend";function U(We,Ue){if(!We)return null;if((0,i.Z)(We)==="object"){var Ie=Ue.replace(/-\w/g,function($e){return $e[1].toUpperCase()});return We[Ie]}return"".concat(We,"-").concat(Ue)}var ee="none",de="appear",he="enter",ve="leave",ce="none",xe="prepare",Q="start",V="active",W="end",L=e(30470),k=e(75164),re=function(){var We=o.useRef(null);function Ue(){k.Z.cancel(We.current)}function Ie($e){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Ue();var ze=(0,k.Z)(function(){Le<=1?$e({isCanceled:function(){return ze!==We.current}}):Ie($e,Le-1)});We.current=ze}return o.useEffect(function(){return function(){Ue()}},[]),[Ie,Ue]},K=(0,p.Z)()?o.useLayoutEffect:o.useEffect,ie=K,me=[xe,Q,V,W],Ze=!1,De=!0;function Fe(We){return We===V||We===W}var mt=function(We,Ue){var Ie=(0,L.Z)(ce),$e=(0,a.Z)(Ie,2),Le=$e[0],ze=$e[1],_e=re(),ue=(0,a.Z)(_e,2),Ye=ue[0],Ve=ue[1];function Je(){ze(xe,!0)}return ie(function(){if(Le!==ce&&Le!==W){var it=me.indexOf(Le),Te=me[it+1],Pe=Ue(Le);Pe===Ze?ze(Te,!0):Ye(function(nt){function pt(){nt.isCanceled()||ze(Te,!0)}Pe===!0?pt():Promise.resolve(Pe).then(pt)})}},[We,Le]),o.useEffect(function(){return function(){Ve()}},[]),[Je,Le]},ht=function(We){var Ue=(0,o.useRef)(),Ie=(0,o.useRef)(We);Ie.current=We;var $e=o.useCallback(function(_e){Ie.current(_e)},[]);function Le(_e){_e&&(_e.removeEventListener(R,$e),_e.removeEventListener(D,$e))}function ze(_e){Ue.current&&Ue.current!==_e&&Le(Ue.current),_e&&_e!==Ue.current&&(_e.addEventListener(R,$e),_e.addEventListener(D,$e),Ue.current=_e)}return o.useEffect(function(){return function(){Le(Ue.current)}},[]),[ze,Le]};function xt(We,Ue,Ie,$e){var Le=$e.motionEnter,ze=Le===void 0?!0:Le,_e=$e.motionAppear,ue=_e===void 0?!0:_e,Ye=$e.motionLeave,Ve=Ye===void 0?!0:Ye,Je=$e.motionDeadline,it=$e.motionLeaveImmediately,Te=$e.onAppearPrepare,Pe=$e.onEnterPrepare,nt=$e.onLeavePrepare,pt=$e.onAppearStart,yt=$e.onEnterStart,wt=$e.onLeaveStart,ot=$e.onAppearActive,St=$e.onEnterActive,dt=$e.onLeaveActive,Rt=$e.onAppearEnd,Ct=$e.onEnterEnd,Ut=$e.onLeaveEnd,cr=$e.onVisibleChanged,ir=(0,L.Z)(),Rr=(0,a.Z)(ir,2),dr=Rr[0],wr=Rr[1],Vr=(0,L.Z)(ee),Qr=(0,a.Z)(Vr,2),Pr=Qr[0],nn=Qr[1],qr=(0,L.Z)(null),fn=(0,a.Z)(qr,2),Zn=fn[0],Gn=fn[1],Rn=(0,o.useRef)(!1),mn=(0,o.useRef)(null);function xn(){return Ie()}var en=(0,o.useRef)(!1);function Wn(_r){var pr=xn();if(!(_r&&!_r.deadline&&_r.target!==pr)){var Fr=en.current,gn;Pr===de&&Fr?gn=Rt==null?void 0:Rt(pr,_r):Pr===he&&Fr?gn=Ct==null?void 0:Ct(pr,_r):Pr===ve&&Fr&&(gn=Ut==null?void 0:Ut(pr,_r)),Pr!==ee&&Fr&&gn!==!1&&(nn(ee,!0),Gn(null,!0))}}var Un=ht(Wn),Kn=(0,a.Z)(Un,1),mr=Kn[0],Kt=o.useMemo(function(){var _r,pr,Fr;switch(Pr){case de:return _r={},(0,r.Z)(_r,xe,Te),(0,r.Z)(_r,Q,pt),(0,r.Z)(_r,V,ot),_r;case he:return pr={},(0,r.Z)(pr,xe,Pe),(0,r.Z)(pr,Q,yt),(0,r.Z)(pr,V,St),pr;case ve:return Fr={},(0,r.Z)(Fr,xe,nt),(0,r.Z)(Fr,Q,wt),(0,r.Z)(Fr,V,dt),Fr;default:return{}}},[Pr]),sr=mt(Pr,function(_r){if(_r===xe){var pr=Kt[xe];return pr?pr(xn()):Ze}if(Zt in Kt){var Fr;Gn(((Fr=Kt[Zt])===null||Fr===void 0?void 0:Fr.call(Kt,xn(),null))||null)}return Zt===V&&(mr(xn()),Je>0&&(clearTimeout(mn.current),mn.current=setTimeout(function(){Wn({deadline:!0})},Je))),De}),Mr=(0,a.Z)(sr,2),_t=Mr[0],Zt=Mr[1],Dt=Fe(Zt);en.current=Dt,ie(function(){wr(Ue);var _r=Rn.current;if(Rn.current=!0,!!We){var pr;!_r&&Ue&&ue&&(pr=de),_r&&Ue&&ze&&(pr=he),(_r&&!Ue&&Ve||!_r&&it&&!Ue&&Ve)&&(pr=ve),pr&&(nn(pr),_t())}},[Ue]),(0,o.useEffect)(function(){(Pr===de&&!ue||Pr===he&&!ze||Pr===ve&&!Ve)&&nn(ee)},[ue,ze,Ve]),(0,o.useEffect)(function(){return function(){Rn.current=!1,clearTimeout(mn.current)}},[]);var ur=o.useRef(!1);(0,o.useEffect)(function(){dr&&(ur.current=!0),dr!==void 0&&Pr===ee&&((ur.current||dr)&&(cr==null||cr(dr)),ur.current=!0)},[dr,Pr]);var $t=Zn;return Kt[xe]&&Zt===Q&&($t=(0,t.Z)({transition:"none"},$t)),[Pr,Zt,$t,dr!=null?dr:Ue]}var Et=e(15671),ct=e(43144),jt=e(60136),Tt=e(29388),Wt=function(We){(0,jt.Z)(Ie,We);var Ue=(0,Tt.Z)(Ie);function Ie(){return(0,Et.Z)(this,Ie),Ue.apply(this,arguments)}return(0,ct.Z)(Ie,[{key:"render",value:function(){return this.props.children}}]),Ie}(o.Component),Bt=Wt;function Ht(We){var Ue=We;(0,i.Z)(We)==="object"&&(Ue=We.transitionSupport);function Ie(Le){return!!(Le.motionName&&Ue)}var $e=o.forwardRef(function(Le,ze){var _e=Le.visible,ue=_e===void 0?!0:_e,Ye=Le.removeOnLeave,Ve=Ye===void 0?!0:Ye,Je=Le.forceRender,it=Le.children,Te=Le.motionName,Pe=Le.leavedClassName,nt=Le.eventProps,pt=Ie(Le),yt=(0,o.useRef)(),wt=(0,o.useRef)();function ot(){try{return yt.current instanceof HTMLElement?yt.current:(0,u.Z)(wt.current)}catch(qr){return null}}var St=xt(pt,ue,ot,Le),dt=(0,a.Z)(St,4),Rt=dt[0],Ct=dt[1],Ut=dt[2],cr=dt[3],ir=o.useRef(cr);cr&&(ir.current=!0);var Rr=o.useCallback(function(qr){yt.current=qr,(0,c.mH)(ze,qr)},[ze]),dr,wr=(0,t.Z)((0,t.Z)({},nt),{},{visible:ue});if(!it)dr=null;else if(Rt===ee||!Ie(Le))cr?dr=it((0,t.Z)({},wr),Rr):!Ve&&ir.current?dr=it((0,t.Z)((0,t.Z)({},wr),{},{className:Pe}),Rr):Je?dr=it((0,t.Z)((0,t.Z)({},wr),{},{style:{display:"none"}}),Rr):dr=null;else{var Vr,Qr;Ct===xe?Qr="prepare":Fe(Ct)?Qr="active":Ct===Q&&(Qr="start"),dr=it((0,t.Z)((0,t.Z)({},wr),{},{className:d()(U(Te,Rt),(Vr={},(0,r.Z)(Vr,U(Te,"".concat(Rt,"-").concat(Qr)),Qr),(0,r.Z)(Vr,Te,typeof Te=="string"),Vr)),style:Ut}),Rr)}if(o.isValidElement(dr)&&(0,c.Yr)(dr)){var Pr=dr,nn=Pr.ref;nn||(dr=o.cloneElement(dr,{ref:Rr}))}return o.createElement(Bt,{ref:wt},dr)});return $e.displayName="CSSMotion",$e}var rr=Ht(J),Sr=e(87462),Ar=e(91),ye="add",T="keep",b="remove",q="removed";function Ce(We){var Ue;return We&&(0,i.Z)(We)==="object"&&"key"in We?Ue=We:Ue={key:We},(0,t.Z)((0,t.Z)({},Ue),{},{key:String(Ue.key)})}function le(){var We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return We.map(Ce)}function fe(){var We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ie=[],$e=0,Le=Ue.length,ze=le(We),_e=le(Ue);ze.forEach(function(Ve){for(var Je=!1,it=$e;it1});return Ye.forEach(function(Ve){Ie=Ie.filter(function(Je){var it=Je.key,Te=Je.status;return it!==Ve||Te!==b}),Ie.forEach(function(Je){Je.key===Ve&&(Je.status=T)})}),Ie}var pe=["component","children","onVisibleChanged","onAllRemoved"],Re=["status"],X=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function je(We){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rr,Ie=function($e){(0,jt.Z)(ze,$e);var Le=(0,Tt.Z)(ze);function ze(){var _e;(0,Et.Z)(this,ze);for(var ue=arguments.length,Ye=new Array(ue),Ve=0;Ve0){var mt=setTimeout(function(){De()},ve*1e3);return function(){clearTimeout(mt)}}},[ve,me]);var Fe="".concat(U,"-notice");return i.createElement("div",(0,o.Z)({},L,{ref:R,className:p()(Fe,de,(0,M.Z)({},"".concat(Fe,"-closable"),Q)),style:ee,onMouseEnter:function(){Ze(!0)},onMouseLeave:function(){Ze(!1)},onClick:k}),i.createElement("div",{className:"".concat(Fe,"-content")},xe),Q&&i.createElement("a",{tabIndex:0,className:"".concat(Fe,"-close"),onClick:function(ht){ht.preventDefault(),ht.stopPropagation(),De()}},W))}),y=_,I=i.forwardRef(function(D,R){var U=D.prefixCls,ee=U===void 0?"rc-notification":U,de=D.container,he=D.motion,ve=D.maxCount,ce=D.className,xe=D.style,Q=D.onAllRemoved,V=i.useState([]),W=(0,t.Z)(V,2),L=W[0],k=W[1],re=function(xt){var Et,ct=L.find(function(jt){return jt.key===xt});ct==null||(Et=ct.onClose)===null||Et===void 0||Et.call(ct),k(function(jt){return jt.filter(function(Tt){return Tt.key!==xt})})};i.useImperativeHandle(R,function(){return{open:function(xt){k(function(Et){var ct=(0,r.Z)(Et),jt=ct.findIndex(function(Tt){return Tt.key===xt.key});return jt>=0?ct[jt]=xt:ct.push(xt),ve>0&&ct.length>ve&&(ct=ct.slice(-ve)),ct})},close:function(xt){re(xt)},destroy:function(){k([])}}});var K=i.useState({}),ie=(0,t.Z)(K,2),me=ie[0],Ze=ie[1];i.useEffect(function(){var ht={};L.forEach(function(xt){var Et=xt.placement,ct=Et===void 0?"topRight":Et;ct&&(ht[ct]=ht[ct]||[],ht[ct].push(xt))}),Object.keys(me).forEach(function(xt){ht[xt]=ht[xt]||[]}),Ze(ht)},[L]);var De=function(xt){Ze(function(Et){var ct=(0,u.Z)({},Et),jt=ct[xt]||[];return jt.length||delete ct[xt],ct})},Fe=i.useRef(!1);if(i.useEffect(function(){Object.keys(me).length>0?Fe.current=!0:Fe.current&&(Q==null||Q(),Fe.current=!1)},[me]),!de)return null;var mt=Object.keys(me);return(0,c.createPortal)(i.createElement(i.Fragment,null,mt.map(function(ht){var xt=me[ht],Et=xt.map(function(jt){return{config:jt,key:jt.key}}),ct=typeof he=="function"?he(ht):he;return i.createElement(l.V,(0,o.Z)({key:ht,className:p()(ee,"".concat(ee,"-").concat(ht),ce==null?void 0:ce(ht)),style:xe==null?void 0:xe(ht),keys:Et,motionAppear:!0},ct,{onAllRemoved:function(){De(ht)}}),function(jt,Tt){var Wt=jt.config,Bt=jt.className,Ht=jt.style,rr=Wt.key,Sr=Wt.className,Ar=Wt.style;return i.createElement(y,(0,o.Z)({},Wt,{ref:Tt,prefixCls:ee,className:p()(Bt,Sr),style:(0,u.Z)((0,u.Z)({},Ht),Ar),key:rr,eventKey:rr,onNoticeClose:re}))})})),de)}),S=I,A=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved"],O=function(){return document.body},j=0;function F(){for(var D={},R=arguments.length,U=new Array(R),ee=0;ee0&&arguments[0]!==void 0?arguments[0]:{},R=D.getContainer,U=R===void 0?O:R,ee=D.motion,de=D.prefixCls,he=D.maxCount,ve=D.className,ce=D.style,xe=D.onAllRemoved,Q=(0,a.Z)(D,A),V=i.useState(),W=(0,t.Z)(V,2),L=W[0],k=W[1],re=i.useRef(),K=i.createElement(S,{container:L,ref:re,prefixCls:de,motion:ee,maxCount:he,className:ve,style:ce,onAllRemoved:xe}),ie=i.useState([]),me=(0,t.Z)(ie,2),Ze=me[0],De=me[1],Fe=i.useMemo(function(){return{open:function(ht){var xt=F(Q,ht);(xt.key===null||xt.key===void 0)&&(xt.key="rc-notification-".concat(j),j+=1),De(function(Et){return[].concat((0,r.Z)(Et),[{type:"open",config:xt}])})},close:function(ht){De(function(xt){return[].concat((0,r.Z)(xt),[{type:"close",key:ht}])})},destroy:function(){De(function(ht){return[].concat((0,r.Z)(ht),[{type:"destroy"}])})}}},[]);return i.useEffect(function(){k(U())}),i.useEffect(function(){re.current&&Ze.length&&(Ze.forEach(function(mt){switch(mt.type){case"open":re.current.open(mt.config);break;case"close":re.current.close(mt.key);break;case"destroy":re.current.destroy();break}}),De([]))},[Ze]),[Fe,K]}},34243:function(f,v,e){"use strict";e.d(v,{Z:function(){return W}});var r=e(87462),t=e(1413),a=e(97685),i=e(91),o=e(67294),u=e(94184),c=e.n(u),l=e(48555),d=e(8410),p=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],M=void 0;function _(L,k){var re=L.prefixCls,K=L.invalidate,ie=L.item,me=L.renderItem,Ze=L.responsive,De=L.responsiveDisabled,Fe=L.registerSize,mt=L.itemKey,ht=L.className,xt=L.style,Et=L.children,ct=L.display,jt=L.order,Tt=L.component,Wt=Tt===void 0?"div":Tt,Bt=(0,i.Z)(L,p),Ht=Ze&&!ct;function rr(b){Fe(mt,b)}o.useEffect(function(){return function(){rr(null)}},[]);var Sr=me&&ie!==M?me(ie):Et,Ar;K||(Ar={opacity:Ht?0:1,height:Ht?0:M,overflowY:Ht?"hidden":M,order:Ze?jt:M,pointerEvents:Ht?"none":M,position:Ht?"absolute":M});var ye={};Ht&&(ye["aria-hidden"]=!0);var T=o.createElement(Wt,(0,r.Z)({className:c()(!K&&re,ht),style:(0,t.Z)((0,t.Z)({},Ar),xt)},ye,Bt,{ref:k}),Sr);return Ze&&(T=o.createElement(l.Z,{onResize:function(q){var Ce=q.offsetWidth;rr(Ce)},disabled:De},T)),T}var y=o.forwardRef(_);y.displayName="Item";var I=y,S=e(75164),A=e(30470);function O(){var L=(0,A.Z)({}),k=(0,a.Z)(L,2),re=k[1],K=(0,o.useRef)([]),ie=0,me=0;function Ze(De){var Fe=ie;ie+=1,K.current.lengthjt,Qr=(0,o.useMemo)(function(){var _t=me;return dr?le===null&&b?_t=me:_t=me.slice(0,Math.min(me.length,pe/ht)):typeof jt=="number"&&(_t=me.slice(0,jt)),_t},[me,ht,le,jt,dr]),Pr=(0,o.useMemo)(function(){return dr?me.slice(St+1):me.slice(Qr.length)},[me,Qr,dr,St]),nn=(0,o.useCallback)(function(_t,Zt){var Dt;return typeof Fe=="function"?Fe(_t):(Dt=Fe&&(_t==null?void 0:_t[Fe]))!==null&&Dt!==void 0?Dt:Zt},[Fe]),qr=(0,o.useCallback)(Ze||function(_t){return _t},[Ze]);function fn(_t,Zt,Dt){wt===_t&&(Zt===void 0||Zt===Pe)||(ot(_t),Dt||(Ut(_tpe){fn(ur-1,_t-$t-Ve+ze);break}}Bt&&xn(0)+Ve>pe&&nt(null)}},[pe,je,ze,Ve,nn,Qr]);var en=Ct&&!!Pr.length,Wn={};Pe!==null&&dr&&(Wn={position:"absolute",left:Pe,top:0});var Un={prefixCls:cr,responsive:dr,component:Sr,invalidate:wr},Kn=De?function(_t,Zt){var Dt=nn(_t,Zt);return o.createElement(de.Provider,{key:Dt,value:(0,t.Z)((0,t.Z)({},Un),{},{order:Zt,item:_t,itemKey:Dt,registerSize:Gn,display:Zt<=St})},De(_t,Zt))}:function(_t,Zt){var Dt=nn(_t,Zt);return o.createElement(I,(0,r.Z)({},Un,{order:Zt,key:Dt,item:_t,renderItem:qr,itemKey:Dt,registerSize:Gn,display:Zt<=St}))},mr,Kt={order:en?St:Number.MAX_SAFE_INTEGER,className:"".concat(cr,"-rest"),registerSize:Rn,display:en};if(Wt)Wt&&(mr=o.createElement(de.Provider,{value:(0,t.Z)((0,t.Z)({},Un),Kt)},Wt(Pr)));else{var sr=Tt||ce;mr=o.createElement(I,(0,r.Z)({},Un,Kt),typeof sr=="function"?sr(Pr):sr)}var Mr=o.createElement(rr,(0,r.Z)({className:c()(!wr&&K,ct),style:Et,ref:k},ye),Qr.map(Kn),Vr?mr:null,Bt&&o.createElement(I,(0,r.Z)({},Un,{responsive:Rr,responsiveDisabled:!dr,order:St,className:"".concat(cr,"-suffix"),registerSize:mn,display:!0,style:Wn}),Bt));return Rr&&(Mr=o.createElement(l.Z,{onResize:Zn,disabled:!dr},Mr)),Mr}var Q=o.forwardRef(xe);Q.displayName="Overflow",Q.Item=U,Q.RESPONSIVE=he,Q.INVALIDATE=ve;var V=Q,W=V},62906:function(f,v){"use strict";v.Z={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"}},81626:function(f,v){"use strict";v.Z={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"}},48555:function(f,v,e){"use strict";e.d(v,{Z:function(){return he}});var r=e(87462),t=e(67294),a=e(50344),i=e(80334),o=e(1413),u=e(42550),c=e(34203),l=e(91033),d=new Map;function p(ve){ve.forEach(function(ce){var xe,Q=ce.target;(xe=d.get(Q))===null||xe===void 0||xe.forEach(function(V){return V(Q)})})}var M=new l.Z(p),_=null,y=null;function I(ve,ce){d.has(ve)||(d.set(ve,new Set),M.observe(ve)),d.get(ve).add(ce)}function S(ve,ce){d.has(ve)&&(d.get(ve).delete(ce),d.get(ve).size||(M.unobserve(ve),d.delete(ve)))}var A=e(15671),O=e(43144),j=e(60136),F=e(29388),J=function(ve){(0,j.Z)(xe,ve);var ce=(0,F.Z)(xe);function xe(){return(0,A.Z)(this,xe),ce.apply(this,arguments)}return(0,O.Z)(xe,[{key:"render",value:function(){return this.props.children}}]),xe}(t.Component),D=t.createContext(null);function R(ve){var ce=ve.children,xe=ve.onBatchResize,Q=t.useRef(0),V=t.useRef([]),W=t.useContext(D),L=t.useCallback(function(k,re,K){Q.current+=1;var ie=Q.current;V.current.push({size:k,element:re,data:K}),Promise.resolve().then(function(){ie===Q.current&&(xe==null||xe(V.current),V.current=[])}),W==null||W(k,re,K)},[xe,W]);return t.createElement(D.Provider,{value:L},ce)}function U(ve){var ce=ve.children,xe=ve.disabled,Q=t.useRef(null),V=t.useRef(null),W=t.useContext(D),L=typeof ce=="function",k=L?ce(Q):ce,re=t.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),K=!L&&t.isValidElement(k)&&(0,u.Yr)(k),ie=K?k.ref:null,me=t.useMemo(function(){return(0,u.sQ)(ie,Q)},[ie,Q]),Ze=t.useRef(ve);Ze.current=ve;var De=t.useCallback(function(Fe){var mt=Ze.current,ht=mt.onResize,xt=mt.data,Et=Fe.getBoundingClientRect(),ct=Et.width,jt=Et.height,Tt=Fe.offsetWidth,Wt=Fe.offsetHeight,Bt=Math.floor(ct),Ht=Math.floor(jt);if(re.current.width!==Bt||re.current.height!==Ht||re.current.offsetWidth!==Tt||re.current.offsetHeight!==Wt){var rr={width:Bt,height:Ht,offsetWidth:Tt,offsetHeight:Wt};re.current=rr;var Sr=Tt===Math.round(ct)?ct:Tt,Ar=Wt===Math.round(jt)?jt:Wt,ye=(0,o.Z)((0,o.Z)({},rr),{},{offsetWidth:Sr,offsetHeight:Ar});W==null||W(ye,Fe,xt),ht&&Promise.resolve().then(function(){ht(ye,Fe)})}},[]);return t.useEffect(function(){var Fe=(0,c.Z)(Q.current)||(0,c.Z)(V.current);return Fe&&!xe&&I(Fe,De),function(){return S(Fe,De)}},[Q.current,xe]),t.createElement(J,{ref:V},K?t.cloneElement(k,{ref:me}):k)}var ee="rc-observer-key";function de(ve){var ce=ve.children,xe=typeof ce=="function"?[ce]:(0,a.Z)(ce);return xe.map(function(Q,V){var W=(Q==null?void 0:Q.key)||"".concat(ee,"-").concat(V);return t.createElement(U,(0,r.Z)({},ve,{key:W}),Q)})}de.Collection=R;var he=de},43763:function(f,v,e){"use strict";e.d(v,{G:function(){return p},Z:function(){return y}});var r=e(87462),t=e(71002),a=e(1413),i=e(91),o=e(67294),u=e(81263),c=e(43159),l=e(94184),d=e.n(l);function p(I){var S=I.showArrow,A=I.arrowContent,O=I.children,j=I.prefixCls,F=I.id,J=I.overlayInnerStyle,D=I.className,R=I.style;return o.createElement("div",{className:d()("".concat(j,"-content"),D),style:R},S!==!1&&o.createElement("div",{className:"".concat(j,"-arrow"),key:"arrow"},A),o.createElement("div",{className:"".concat(j,"-inner"),id:F,role:"tooltip",style:J},typeof O=="function"?O():O))}var M=function(S,A){var O=S.overlayClassName,j=S.trigger,F=j===void 0?["hover"]:j,J=S.mouseEnterDelay,D=J===void 0?0:J,R=S.mouseLeaveDelay,U=R===void 0?.1:R,ee=S.overlayStyle,de=S.prefixCls,he=de===void 0?"rc-tooltip":de,ve=S.children,ce=S.onVisibleChange,xe=S.afterVisibleChange,Q=S.transitionName,V=S.animation,W=S.motion,L=S.placement,k=L===void 0?"right":L,re=S.align,K=re===void 0?{}:re,ie=S.destroyTooltipOnHide,me=ie===void 0?!1:ie,Ze=S.defaultVisible,De=S.getTooltipContainer,Fe=S.overlayInnerStyle,mt=S.arrowContent,ht=S.overlay,xt=S.id,Et=S.showArrow,ct=(0,i.Z)(S,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),jt=(0,o.useRef)(null);(0,o.useImperativeHandle)(A,function(){return jt.current});var Tt=(0,a.Z)({},ct);"visible"in S&&(Tt.popupVisible=S.visible);var Wt=function(){return o.createElement(p,{showArrow:Et,arrowContent:mt,key:"content",prefixCls:he,id:xt,overlayInnerStyle:Fe},ht)},Bt=!1,Ht=!1;if(typeof me=="boolean")Bt=me;else if(me&&(0,t.Z)(me)==="object"){var rr=me.keepParent;Bt=rr===!0,Ht=rr===!1}return o.createElement(u.Z,(0,r.Z)({popupClassName:O,prefixCls:he,popup:Wt,action:F,builtinPlacements:c.C,popupPlacement:k,ref:jt,popupAlign:K,getPopupContainer:De,onPopupVisibleChange:ce,afterPopupVisibleChange:xe,popupTransitionName:Q,popupAnimation:V,popupMotion:W,defaultPopupVisible:Ze,destroyPopupOnHide:Bt,autoDestroy:Ht,mouseLeaveDelay:U,popupStyle:ee,mouseEnterDelay:D},Tt),ve)},_=(0,o.forwardRef)(M),y=_},43159:function(f,v,e){"use strict";e.d(v,{C:function(){return a}});var r={adjustX:1,adjustY:1},t=[0,0],a={left:{points:["cr","cl"],overflow:r,offset:[-4,0],targetOffset:t},right:{points:["cl","cr"],overflow:r,offset:[4,0],targetOffset:t},top:{points:["bc","tc"],overflow:r,offset:[0,-4],targetOffset:t},bottom:{points:["tc","bc"],overflow:r,offset:[0,4],targetOffset:t},topLeft:{points:["bl","tl"],overflow:r,offset:[0,-4],targetOffset:t},leftTop:{points:["tr","tl"],overflow:r,offset:[-4,0],targetOffset:t},topRight:{points:["br","tr"],overflow:r,offset:[0,-4],targetOffset:t},rightTop:{points:["tl","tr"],overflow:r,offset:[4,0],targetOffset:t},bottomRight:{points:["tr","br"],overflow:r,offset:[0,4],targetOffset:t},rightBottom:{points:["bl","br"],overflow:r,offset:[4,0],targetOffset:t},bottomLeft:{points:["tl","bl"],overflow:r,offset:[0,4],targetOffset:t},leftBottom:{points:["br","bl"],overflow:r,offset:[-4,0],targetOffset:t}},i=null},81263:function(f,v,e){"use strict";e.d(v,{Z:function(){return Oe}});var r=e(1413),t=e(87462),a=e(15671),i=e(43144),o=e(97326),u=e(60136),c=e(29388),l=e(4942),d=e(67294),p=e(73935),M=e(75164),_=e(94999),y=e(34203),I=e(42550),S=e(64019),A=e(98924),O=(0,d.forwardRef)(function(C,G){var B=C.didUpdate,be=C.getContainer,ke=C.children,Qe=(0,d.useRef)(),ge=(0,d.useRef)();(0,d.useImperativeHandle)(G,function(){return{}});var ft=(0,d.useRef)(!1);return!ft.current&&(0,A.Z)()&&(ge.current=be(),Qe.current=ge.current.parentNode,ft.current=!0),(0,d.useEffect)(function(){B==null||B(C)}),(0,d.useEffect)(function(){return ge.current.parentNode===null&&Qe.current!==null&&Qe.current.appendChild(ge.current),function(){var rt,At;(rt=ge.current)===null||rt===void 0||(At=rt.parentNode)===null||At===void 0||At.removeChild(ge.current)}},[]),ge.current?p.createPortal(ke,ge.current):null}),j=O,F=e(94184),J=e.n(F);function D(C,G,B){return B?C[0]===G[0]:C[0]===G[0]&&C[1]===G[1]}function R(C,G,B){var be=C[G]||{};return(0,r.Z)((0,r.Z)({},be),B)}function U(C,G,B,be){for(var ke=B.points,Qe=Object.keys(C),ge=0;ge=0&&B.left>=0&&B.bottom>B.top&&B.right>B.left?B:null}function cr(C,G,B,be){var ke=ot.clone(C),Qe={width:G.width,height:G.height};return be.adjustX&&ke.left=B.left&&ke.left+Qe.width>B.right&&(Qe.width-=ke.left+Qe.width-B.right),be.adjustX&&ke.left+Qe.width>B.right&&(ke.left=Math.max(B.right-Qe.width,B.left)),be.adjustY&&ke.top=B.top&&ke.top+Qe.height>B.bottom&&(Qe.height-=ke.top+Qe.height-B.bottom),be.adjustY&&ke.top+Qe.height>B.bottom&&(ke.top=Math.max(B.bottom-Qe.height,B.top)),ot.mix(ke,Qe)}function ir(C){var G,B,be;if(!ot.isWindow(C)&&C.nodeType!==9)G=ot.offset(C),B=ot.outerWidth(C),be=ot.outerHeight(C);else{var ke=ot.getWindow(C);G={left:ot.getWindowScrollLeft(ke),top:ot.getWindowScrollTop(ke)},B=ot.viewportWidth(ke),be=ot.viewportHeight(ke)}return G.width=B,G.height=be,G}function Rr(C,G){var B=G.charAt(0),be=G.charAt(1),ke=C.width,Qe=C.height,ge=C.left,ft=C.top;return B==="c"?ft+=Qe/2:B==="b"&&(ft+=Qe),be==="c"?ge+=ke/2:be==="r"&&(ge+=ke),{left:ge,top:ft}}function dr(C,G,B,be,ke){var Qe=Rr(G,B[1]),ge=Rr(C,B[0]),ft=[ge.left-Qe.left,ge.top-Qe.top];return{left:Math.round(C.left-ft[0]+be[0]-ke[0]),top:Math.round(C.top-ft[1]+be[1]-ke[1])}}function wr(C,G,B){return C.leftB.right}function Vr(C,G,B){return C.topB.bottom}function Qr(C,G,B){return C.left>B.right||C.left+G.widthB.bottom||C.top+G.height=B.right||be.top>=B.bottom}function mn(C,G,B){var be=B.target||G,ke=ir(be),Qe=!Rn(be,B.overflow&&B.overflow.alwaysByViewport);return Gn(C,ke,B,Qe)}mn.__getOffsetParent=dt,mn.__getVisibleRectForElement=Ut;function xn(C,G,B){var be,ke,Qe=ot.getDocument(C),ge=Qe.defaultView||Qe.parentWindow,ft=ot.getWindowScrollLeft(ge),rt=ot.getWindowScrollTop(ge),At=ot.viewportWidth(ge),qt=ot.viewportHeight(ge);"pageX"in G?be=G.pageX:be=ft+G.clientX,"pageY"in G?ke=G.pageY:ke=rt+G.clientY;var Lr={left:be,top:ke,width:0,height:0},hr=be>=0&&be<=ft+At&&ke>=0&&ke<=rt+qt,Qt=[B.points[0],"cc"];return Gn(C,Lr,L(L({},B),{},{points:Qt}),hr)}var en=null,Wn=e(18446),Un=e.n(Wn),Kn=e(91033);function mr(C,G){return C===G?!0:!C||!G?!1:"pageX"in G&&"pageY"in G?C.pageX===G.pageX&&C.pageY===G.pageY:"clientX"in G&&"clientY"in G?C.clientX===G.clientX&&C.clientY===G.clientY:!1}function Kt(C,G){C!==document.activeElement&&(0,_.Z)(G,C)&&typeof C.focus=="function"&&C.focus()}function sr(C,G){var B=null,be=null;function ke(ge){var ft=(0,ee.Z)(ge,1),rt=ft[0].target;if(!!document.documentElement.contains(rt)){var At=rt.getBoundingClientRect(),qt=At.width,Lr=At.height,hr=Math.floor(qt),Qt=Math.floor(Lr);(B!==hr||be!==Qt)&&Promise.resolve().then(function(){G({width:hr,height:Qt})}),B=hr,be=Qt}}var Qe=new Kn.Z(ke);return C&&Qe.observe(C),function(){Qe.disconnect()}}var Mr=function(C,G){var B=d.useRef(!1),be=d.useRef(null);function ke(){window.clearTimeout(be.current)}function Qe(ge){if(ke(),!B.current||ge===!0){if(C()===!1)return;B.current=!0,be.current=window.setTimeout(function(){B.current=!1},G)}else be.current=window.setTimeout(function(){B.current=!1,Qe()},G)}return[Qe,function(){B.current=!1,ke()}]};function _t(C){return typeof C!="function"?null:C()}function Zt(C){return(0,Q.Z)(C)!=="object"||!C?null:C}var Dt=function(G,B){var be=G.children,ke=G.disabled,Qe=G.target,ge=G.align,ft=G.onAlign,rt=G.monitorWindowResize,At=G.monitorBufferTime,qt=At===void 0?0:At,Lr=d.useRef({}),hr=d.useRef(),Qt=d.Children.only(be),Jt=d.useRef({});Jt.current.disabled=ke,Jt.current.target=Qe,Jt.current.align=ge,Jt.current.onAlign=ft;var nr=Mr(function(){var vn=Jt.current,Ln=vn.disabled,we=vn.target,qe=vn.align,z=vn.onAlign;if(!Ln&&we){var Mt=hr.current,Ot,or=_t(we),vr=Zt(we);Lr.current.element=or,Lr.current.point=vr,Lr.current.align=qe;var xr=document,Br=xr.activeElement;return or&&(0,V.Z)(or)?Ot=mn(Mt,or,qe):vr&&(Ot=xn(Mt,vr,qe)),Kt(Br,Mt),z&&Ot&&z(Mt,Ot),!0}return!1},qt),Nr=(0,ee.Z)(nr,2),Yr=Nr[0],Hr=Nr[1],an=d.useRef({cancel:function(){}}),tn=d.useRef({cancel:function(){}});d.useEffect(function(){var vn=_t(Qe),Ln=Zt(Qe);hr.current!==tn.current.element&&(tn.current.cancel(),tn.current.element=hr.current,tn.current.cancel=sr(hr.current,Yr)),(Lr.current.element!==vn||!mr(Lr.current.point,Ln)||!Un()(Lr.current.align,ge))&&(Yr(),an.current.element!==vn&&(an.current.cancel(),an.current.element=vn,an.current.cancel=sr(vn,Yr)))}),d.useEffect(function(){ke?Hr():Yr()},[ke]);var bn=d.useRef(null);return d.useEffect(function(){rt?bn.current||(bn.current=(0,S.Z)(window,"resize",Yr)):bn.current&&(bn.current.remove(),bn.current=null)},[rt]),d.useEffect(function(){return function(){an.current.cancel(),tn.current.cancel(),bn.current&&bn.current.remove(),Hr()}},[]),d.useImperativeHandle(B,function(){return{forceAlign:function(){return Yr(!0)}}}),d.isValidElement(Qt)&&(Qt=d.cloneElement(Qt,{ref:(0,I.sQ)(Qt.ref,hr)})),Qt},ur=d.forwardRef(Dt);ur.displayName="Align";var $t=ur,_r=$t,pr=e(8410),Fr=e(74165),gn=e(15861),cn=e(30470),yn=["measure","alignPre","align",null,"motion"],dn=function(C,G){var B=(0,cn.Z)(null),be=(0,ee.Z)(B,2),ke=be[0],Qe=be[1],ge=(0,d.useRef)();function ft(qt){Qe(qt,!0)}function rt(){M.Z.cancel(ge.current)}function At(qt){rt(),ge.current=(0,M.Z)(function(){ft(function(Lr){switch(ke){case"align":return"motion";case"motion":return"stable";default:}return Lr}),qt==null||qt()})}return(0,d.useEffect)(function(){ft("measure")},[C]),(0,d.useEffect)(function(){switch(ke){case"measure":G();break;default:}ke&&(ge.current=(0,M.Z)((0,gn.Z)((0,Fr.Z)().mark(function qt(){var Lr,hr;return(0,Fr.Z)().wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:Lr=yn.indexOf(ke),hr=yn[Lr+1],hr&&Lr!==-1&&ft(hr);case 3:case"end":return Jt.stop()}},qt)}))))},[ke]),(0,d.useEffect)(function(){return function(){rt()}},[]),[ke,At]},Yn=function(C){var G=d.useState({width:0,height:0}),B=(0,ee.Z)(G,2),be=B[0],ke=B[1];function Qe(ft){var rt=ft.offsetWidth,At=ft.offsetHeight,qt=ft.getBoundingClientRect(),Lr=qt.width,hr=qt.height;Math.abs(rt-Lr)<1&&Math.abs(At-hr)<1&&(rt=Lr,At=hr),ke({width:rt,height:At})}var ge=d.useMemo(function(){var ft={};if(C){var rt=be.width,At=be.height;C.indexOf("height")!==-1&&At?ft.height=At:C.indexOf("minHeight")!==-1&&At&&(ft.minHeight=At),C.indexOf("width")!==-1&&rt?ft.width=rt:C.indexOf("minWidth")!==-1&&rt&&(ft.minWidth=rt)}return ft},[C,be]);return[ge,Qe]},Dn=d.forwardRef(function(C,G){var B=C.visible,be=C.prefixCls,ke=C.className,Qe=C.style,ge=C.children,ft=C.zIndex,rt=C.stretch,At=C.destroyPopupOnHide,qt=C.forceRender,Lr=C.align,hr=C.point,Qt=C.getRootDomNode,Jt=C.getClassNameFromAlign,nr=C.onAlign,Nr=C.onMouseEnter,Yr=C.onMouseLeave,Hr=C.onMouseDown,an=C.onTouchStart,tn=C.onClick,bn=(0,d.useRef)(),vn=(0,d.useRef)(),Ln=(0,d.useState)(),we=(0,ee.Z)(Ln,2),qe=we[0],z=we[1],Mt=Yn(rt),Ot=(0,ee.Z)(Mt,2),or=Ot[0],vr=Ot[1];function xr(){rt&&vr(Qt())}var Br=dn(B,xr),On=(0,ee.Z)(Br,2),Dr=On[0],Cr=On[1],zr=(0,d.useState)(0),un=(0,ee.Z)(zr,2),kn=un[0],sa=un[1],ba=(0,d.useRef)();(0,pr.Z)(function(){Dr==="alignPre"&&sa(0)},[Dr]);function za(){return hr||Qt}function Ka(){var wa;(wa=bn.current)===null||wa===void 0||wa.forceAlign()}function Ba(wa,Wa){var Ua=Jt(Wa);qe!==Ua&&z(Ua),sa(function(Ra){return Ra+1}),Dr==="align"&&(nr==null||nr(wa,Wa))}(0,pr.Z)(function(){Dr==="align"&&(kn<3?Ka():Cr(function(){var wa;(wa=ba.current)===null||wa===void 0||wa.call(ba)}))},[kn]);var Fa=(0,r.Z)({},ce(C));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(wa){var Wa=Fa[wa];Fa[wa]=function(Ua,Ra){return Cr(),Wa==null?void 0:Wa(Ua,Ra)}});function hi(){return new Promise(function(wa){ba.current=wa})}d.useEffect(function(){!Fa.motionName&&Dr==="motion"&&Cr()},[Fa.motionName,Dr]),d.useImperativeHandle(G,function(){return{forceAlign:Ka,getElement:function(){return vn.current}}});var Gr=(0,r.Z)((0,r.Z)({},or),{},{zIndex:ft,opacity:Dr==="motion"||Dr==="stable"||!B?void 0:0,pointerEvents:!B&&Dr!=="stable"?"none":void 0},Qe),Xa=!0;Lr!=null&&Lr.points&&(Dr==="align"||Dr==="stable")&&(Xa=!1);var $n=ge;return d.Children.count(ge)>1&&($n=d.createElement("div",{className:"".concat(be,"-content")},ge)),d.createElement(ve.Z,(0,t.Z)({visible:B,ref:vn,leavedClassName:"".concat(be,"-hidden")},Fa,{onAppearPrepare:hi,onEnterPrepare:hi,removeOnLeave:At,forceRender:qt}),function(wa,Wa){var Ua=wa.className,Ra=wa.style,Oi=J()(be,ke,qe,Ua);return d.createElement(_r,{target:za(),key:"popup",ref:bn,monitorWindowResize:!0,disabled:Xa,align:Lr,onAlign:Ba},d.createElement("div",{ref:Wa,className:Oi,onMouseEnter:Nr,onMouseLeave:Yr,onMouseDownCapture:Hr,onTouchStartCapture:an,onClick:tn,style:(0,r.Z)((0,r.Z)({},Ra),Gr)},$n))})});Dn.displayName="PopupInner";var sn=Dn,ln=d.forwardRef(function(C,G){var B=C.prefixCls,be=C.visible,ke=C.zIndex,Qe=C.children,ge=C.mobile;ge=ge===void 0?{}:ge;var ft=ge.popupClassName,rt=ge.popupStyle,At=ge.popupMotion,qt=At===void 0?{}:At,Lr=ge.popupRender,hr=C.onClick,Qt=d.useRef();d.useImperativeHandle(G,function(){return{forceAlign:function(){},getElement:function(){return Qt.current}}});var Jt=(0,r.Z)({zIndex:ke},rt),nr=Qe;return d.Children.count(Qe)>1&&(nr=d.createElement("div",{className:"".concat(B,"-content")},Qe)),Lr&&(nr=Lr(nr)),d.createElement(ve.Z,(0,t.Z)({visible:be,ref:Qt,removeOnLeave:!0},qt),function(Nr,Yr){var Hr=Nr.className,an=Nr.style,tn=J()(B,ft,Hr);return d.createElement("div",{ref:Yr,className:tn,onClick:hr,style:(0,r.Z)((0,r.Z)({},an),Jt)},nr)})});ln.displayName="MobilePopupInner";var _n=ln,Mn=["visible","mobile"],Ur=d.forwardRef(function(C,G){var B=C.visible,be=C.mobile,ke=(0,de.Z)(C,Mn),Qe=(0,d.useState)(B),ge=(0,ee.Z)(Qe,2),ft=ge[0],rt=ge[1],At=(0,d.useState)(!1),qt=(0,ee.Z)(At,2),Lr=qt[0],hr=qt[1],Qt=(0,r.Z)((0,r.Z)({},ke),{},{visible:ft});(0,d.useEffect)(function(){rt(B),B&&be&&hr((0,he.Z)())},[B,be]);var Jt=Lr?d.createElement(_n,(0,t.Z)({},Qt,{mobile:be,ref:G})):d.createElement(sn,(0,t.Z)({},Qt,{ref:G}));return d.createElement("div",null,d.createElement(xe,Qt),Jt)});Ur.displayName="Popup";var ea=Ur,ca=d.createContext(null),da=ca;function Ia(){}function ka(){return""}function na(C){return C?C.ownerDocument:window.document}var Za=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function gt(C){var G=function(B){(0,u.Z)(ke,B);var be=(0,c.Z)(ke);function ke(Qe){var ge;(0,a.Z)(this,ke),ge=be.call(this,Qe),(0,l.Z)((0,o.Z)(ge),"popupRef",d.createRef()),(0,l.Z)((0,o.Z)(ge),"triggerRef",d.createRef()),(0,l.Z)((0,o.Z)(ge),"portalContainer",void 0),(0,l.Z)((0,o.Z)(ge),"attachId",void 0),(0,l.Z)((0,o.Z)(ge),"clickOutsideHandler",void 0),(0,l.Z)((0,o.Z)(ge),"touchOutsideHandler",void 0),(0,l.Z)((0,o.Z)(ge),"contextMenuOutsideHandler1",void 0),(0,l.Z)((0,o.Z)(ge),"contextMenuOutsideHandler2",void 0),(0,l.Z)((0,o.Z)(ge),"mouseDownTimeout",void 0),(0,l.Z)((0,o.Z)(ge),"focusTime",void 0),(0,l.Z)((0,o.Z)(ge),"preClickTime",void 0),(0,l.Z)((0,o.Z)(ge),"preTouchTime",void 0),(0,l.Z)((0,o.Z)(ge),"delayTimer",void 0),(0,l.Z)((0,o.Z)(ge),"hasPopupMouseDown",void 0),(0,l.Z)((0,o.Z)(ge),"onMouseEnter",function(rt){var At=ge.props.mouseEnterDelay;ge.fireEvents("onMouseEnter",rt),ge.delaySetPopupVisible(!0,At,At?null:rt)}),(0,l.Z)((0,o.Z)(ge),"onMouseMove",function(rt){ge.fireEvents("onMouseMove",rt),ge.setPoint(rt)}),(0,l.Z)((0,o.Z)(ge),"onMouseLeave",function(rt){ge.fireEvents("onMouseLeave",rt),ge.delaySetPopupVisible(!1,ge.props.mouseLeaveDelay)}),(0,l.Z)((0,o.Z)(ge),"onPopupMouseEnter",function(){ge.clearDelayTimer()}),(0,l.Z)((0,o.Z)(ge),"onPopupMouseLeave",function(rt){var At;rt.relatedTarget&&!rt.relatedTarget.setTimeout&&(0,_.Z)((At=ge.popupRef.current)===null||At===void 0?void 0:At.getElement(),rt.relatedTarget)||ge.delaySetPopupVisible(!1,ge.props.mouseLeaveDelay)}),(0,l.Z)((0,o.Z)(ge),"onFocus",function(rt){ge.fireEvents("onFocus",rt),ge.clearDelayTimer(),ge.isFocusToShow()&&(ge.focusTime=Date.now(),ge.delaySetPopupVisible(!0,ge.props.focusDelay))}),(0,l.Z)((0,o.Z)(ge),"onMouseDown",function(rt){ge.fireEvents("onMouseDown",rt),ge.preClickTime=Date.now()}),(0,l.Z)((0,o.Z)(ge),"onTouchStart",function(rt){ge.fireEvents("onTouchStart",rt),ge.preTouchTime=Date.now()}),(0,l.Z)((0,o.Z)(ge),"onBlur",function(rt){ge.fireEvents("onBlur",rt),ge.clearDelayTimer(),ge.isBlurToHide()&&ge.delaySetPopupVisible(!1,ge.props.blurDelay)}),(0,l.Z)((0,o.Z)(ge),"onContextMenu",function(rt){rt.preventDefault(),ge.fireEvents("onContextMenu",rt),ge.setPopupVisible(!0,rt)}),(0,l.Z)((0,o.Z)(ge),"onContextMenuClose",function(){ge.isContextMenuToShow()&&ge.close()}),(0,l.Z)((0,o.Z)(ge),"onClick",function(rt){if(ge.fireEvents("onClick",rt),ge.focusTime){var At;if(ge.preClickTime&&ge.preTouchTime?At=Math.min(ge.preClickTime,ge.preTouchTime):ge.preClickTime?At=ge.preClickTime:ge.preTouchTime&&(At=ge.preTouchTime),Math.abs(At-ge.focusTime)<20)return;ge.focusTime=0}ge.preClickTime=0,ge.preTouchTime=0,ge.isClickToShow()&&(ge.isClickToHide()||ge.isBlurToHide())&&rt&&rt.preventDefault&&rt.preventDefault();var qt=!ge.state.popupVisible;(ge.isClickToHide()&&!qt||qt&&ge.isClickToShow())&&ge.setPopupVisible(!ge.state.popupVisible,rt)}),(0,l.Z)((0,o.Z)(ge),"onPopupMouseDown",function(){if(ge.hasPopupMouseDown=!0,clearTimeout(ge.mouseDownTimeout),ge.mouseDownTimeout=window.setTimeout(function(){ge.hasPopupMouseDown=!1},0),ge.context){var rt;(rt=ge.context).onPopupMouseDown.apply(rt,arguments)}}),(0,l.Z)((0,o.Z)(ge),"onDocumentClick",function(rt){if(!(ge.props.mask&&!ge.props.maskClosable)){var At=rt.target,qt=ge.getRootDomNode(),Lr=ge.getPopupDomNode();(!(0,_.Z)(qt,At)||ge.isContextMenuOnly())&&!(0,_.Z)(Lr,At)&&!ge.hasPopupMouseDown&&ge.close()}}),(0,l.Z)((0,o.Z)(ge),"getRootDomNode",function(){var rt=ge.props.getTriggerDOMNode;if(rt)return rt(ge.triggerRef.current);try{var At=(0,y.Z)(ge.triggerRef.current);if(At)return At}catch(qt){}return p.findDOMNode((0,o.Z)(ge))}),(0,l.Z)((0,o.Z)(ge),"getPopupClassNameFromAlign",function(rt){var At=[],qt=ge.props,Lr=qt.popupPlacement,hr=qt.builtinPlacements,Qt=qt.prefixCls,Jt=qt.alignPoint,nr=qt.getPopupClassNameFromAlign;return Lr&&hr&&At.push(U(hr,Qt,rt,Jt)),nr&&At.push(nr(rt)),At.join(" ")}),(0,l.Z)((0,o.Z)(ge),"getComponent",function(){var rt=ge.props,At=rt.prefixCls,qt=rt.destroyPopupOnHide,Lr=rt.popupClassName,hr=rt.onPopupAlign,Qt=rt.popupMotion,Jt=rt.popupAnimation,nr=rt.popupTransitionName,Nr=rt.popupStyle,Yr=rt.mask,Hr=rt.maskAnimation,an=rt.maskTransitionName,tn=rt.maskMotion,bn=rt.zIndex,vn=rt.popup,Ln=rt.stretch,we=rt.alignPoint,qe=rt.mobile,z=rt.forceRender,Mt=rt.onPopupClick,Ot=ge.state,or=Ot.popupVisible,vr=Ot.point,xr=ge.getPopupAlign(),Br={};return ge.isMouseEnterToShow()&&(Br.onMouseEnter=ge.onPopupMouseEnter),ge.isMouseLeaveToHide()&&(Br.onMouseLeave=ge.onPopupMouseLeave),Br.onMouseDown=ge.onPopupMouseDown,Br.onTouchStart=ge.onPopupMouseDown,d.createElement(ea,(0,t.Z)({prefixCls:At,destroyPopupOnHide:qt,visible:or,point:we&&vr,className:Lr,align:xr,onAlign:hr,animation:Jt,getClassNameFromAlign:ge.getPopupClassNameFromAlign},Br,{stretch:Ln,getRootDomNode:ge.getRootDomNode,style:Nr,mask:Yr,zIndex:bn,transitionName:nr,maskAnimation:Hr,maskTransitionName:an,maskMotion:tn,ref:ge.popupRef,motion:Qt,mobile:qe,forceRender:z,onClick:Mt}),typeof vn=="function"?vn():vn)}),(0,l.Z)((0,o.Z)(ge),"attachParent",function(rt){M.Z.cancel(ge.attachId);var At=ge.props,qt=At.getPopupContainer,Lr=At.getDocument,hr=ge.getRootDomNode(),Qt;qt?(hr||qt.length===0)&&(Qt=qt(hr)):Qt=Lr(ge.getRootDomNode()).body,Qt?Qt.appendChild(rt):ge.attachId=(0,M.Z)(function(){ge.attachParent(rt)})}),(0,l.Z)((0,o.Z)(ge),"getContainer",function(){if(!ge.portalContainer){var rt=ge.props.getDocument,At=rt(ge.getRootDomNode()).createElement("div");At.style.position="absolute",At.style.top="0",At.style.left="0",At.style.width="100%",ge.portalContainer=At}return ge.attachParent(ge.portalContainer),ge.portalContainer}),(0,l.Z)((0,o.Z)(ge),"setPoint",function(rt){var At=ge.props.alignPoint;!At||!rt||ge.setState({point:{pageX:rt.pageX,pageY:rt.pageY}})}),(0,l.Z)((0,o.Z)(ge),"handlePortalUpdate",function(){ge.state.prevPopupVisible!==ge.state.popupVisible&&ge.props.afterPopupVisibleChange(ge.state.popupVisible)}),(0,l.Z)((0,o.Z)(ge),"triggerContextValue",{onPopupMouseDown:ge.onPopupMouseDown});var ft;return"popupVisible"in Qe?ft=!!Qe.popupVisible:ft=!!Qe.defaultPopupVisible,ge.state={prevPopupVisible:ft,popupVisible:ft},Za.forEach(function(rt){ge["fire".concat(rt)]=function(At){ge.fireEvents(rt,At)}}),ge}return(0,i.Z)(ke,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ge=this.props,ft=this.state;if(ft.popupVisible){var rt;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(rt=ge.getDocument(this.getRootDomNode()),this.clickOutsideHandler=(0,S.Z)(rt,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(rt=rt||ge.getDocument(this.getRootDomNode()),this.touchOutsideHandler=(0,S.Z)(rt,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(rt=rt||ge.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=(0,S.Z)(rt,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=(0,S.Z)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),M.Z.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ge;return((ge=this.popupRef.current)===null||ge===void 0?void 0:ge.getElement())||null}},{key:"getPopupAlign",value:function(){var ge=this.props,ft=ge.popupPlacement,rt=ge.popupAlign,At=ge.builtinPlacements;return ft&&At?R(At,ft,rt):rt}},{key:"setPopupVisible",value:function(ge,ft){var rt=this.props.alignPoint,At=this.state.popupVisible;this.clearDelayTimer(),At!==ge&&("popupVisible"in this.props||this.setState({popupVisible:ge,prevPopupVisible:At}),this.props.onPopupVisibleChange(ge)),rt&&ft&&ge&&this.setPoint(ft)}},{key:"delaySetPopupVisible",value:function(ge,ft,rt){var At=this,qt=ft*1e3;if(this.clearDelayTimer(),qt){var Lr=rt?{pageX:rt.pageX,pageY:rt.pageY}:null;this.delayTimer=window.setTimeout(function(){At.setPopupVisible(ge,Lr),At.clearDelayTimer()},qt)}else this.setPopupVisible(ge,rt)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(ge){var ft=this.props.children.props,rt=this.props;return ft[ge]&&rt[ge]?this["fire".concat(ge)]:ft[ge]||rt[ge]}},{key:"isClickToShow",value:function(){var ge=this.props,ft=ge.action,rt=ge.showAction;return ft.indexOf("click")!==-1||rt.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ge=this.props.action;return ge==="contextMenu"||ge.length===1&&ge[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ge=this.props,ft=ge.action,rt=ge.showAction;return ft.indexOf("contextMenu")!==-1||rt.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ge=this.props,ft=ge.action,rt=ge.hideAction;return ft.indexOf("click")!==-1||rt.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ge=this.props,ft=ge.action,rt=ge.showAction;return ft.indexOf("hover")!==-1||rt.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ge=this.props,ft=ge.action,rt=ge.hideAction;return ft.indexOf("hover")!==-1||rt.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ge=this.props,ft=ge.action,rt=ge.showAction;return ft.indexOf("focus")!==-1||rt.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ge=this.props,ft=ge.action,rt=ge.hideAction;return ft.indexOf("focus")!==-1||rt.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ge;(ge=this.popupRef.current)===null||ge===void 0||ge.forceAlign()}}},{key:"fireEvents",value:function(ge,ft){var rt=this.props.children.props[ge];rt&&rt(ft);var At=this.props[ge];At&&At(ft)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ge=this.state.popupVisible,ft=this.props,rt=ft.children,At=ft.forceRender,qt=ft.alignPoint,Lr=ft.className,hr=ft.autoDestroy,Qt=d.Children.only(rt),Jt={key:"trigger"};this.isContextMenuToShow()?Jt.onContextMenu=this.onContextMenu:Jt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(Jt.onClick=this.onClick,Jt.onMouseDown=this.onMouseDown,Jt.onTouchStart=this.onTouchStart):(Jt.onClick=this.createTwoChains("onClick"),Jt.onMouseDown=this.createTwoChains("onMouseDown"),Jt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(Jt.onMouseEnter=this.onMouseEnter,qt&&(Jt.onMouseMove=this.onMouseMove)):Jt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?Jt.onMouseLeave=this.onMouseLeave:Jt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(Jt.onFocus=this.onFocus,Jt.onBlur=this.onBlur):(Jt.onFocus=this.createTwoChains("onFocus"),Jt.onBlur=this.createTwoChains("onBlur"));var nr=J()(Qt&&Qt.props&&Qt.props.className,Lr);nr&&(Jt.className=nr);var Nr=(0,r.Z)({},Jt);(0,I.Yr)(Qt)&&(Nr.ref=(0,I.sQ)(this.triggerRef,Qt.ref));var Yr=d.cloneElement(Qt,Nr),Hr;return(ge||this.popupRef.current||At)&&(Hr=d.createElement(C,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ge&&hr&&(Hr=null),d.createElement(da.Provider,{value:this.triggerContextValue},Yr,Hr)}}],[{key:"getDerivedStateFromProps",value:function(ge,ft){var rt=ge.popupVisible,At={};return rt!==void 0&&ft.popupVisible!==rt&&(At.popupVisible=rt,At.prevPopupVisible=ft.popupVisible),At}}]),ke}(d.Component);return(0,l.Z)(G,"contextType",da),(0,l.Z)(G,"defaultProps",{prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:ka,getDocument:na,onPopupVisibleChange:Ia,afterPopupVisibleChange:Ia,onPopupAlign:Ia,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1}),G}var Oe=gt(j)},50344:function(f,v,e){"use strict";e.d(v,{Z:function(){return a}});var r=e(67294),t=e(59864);function a(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=[];return r.Children.forEach(i,function(c){c==null&&!o.keepEmpty||(Array.isArray(c)?u=u.concat(a(c)):(0,t.isFragment)(c)&&c.props?u=u.concat(a(c.props.children,o)):u.push(c))}),u}},64019:function(f,v,e){"use strict";e.d(v,{Z:function(){return t}});var r=e(73935);function t(a,i,o,u){var c=r.unstable_batchedUpdates?function(d){r.unstable_batchedUpdates(o,d)}:o;return a.addEventListener&&a.addEventListener(i,c,u),{remove:function(){a.removeEventListener&&a.removeEventListener(i,c,u)}}}},98924:function(f,v,e){"use strict";e.d(v,{Z:function(){return r}});function r(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}},94999:function(f,v,e){"use strict";e.d(v,{Z:function(){return r}});function r(t,a){if(!t)return!1;if(t.contains)return t.contains(a);for(var i=a;i;){if(i===t)return!0;i=i.parentNode}return!1}},44958:function(f,v,e){"use strict";e.d(v,{hq:function(){return S},jL:function(){return _}});var r=e(98924),t=e(94999),a="data-rc-order",i="rc-util-key",o=new Map;function u(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=A.mark;return O?O.startsWith("data-")?O:"data-".concat(O):i}function c(A){if(A.attachTo)return A.attachTo;var O=document.querySelector("head");return O||document.body}function l(A){return A==="queue"?"prependQueue":A?"prepend":"append"}function d(A){return Array.from((o.get(A)||A).children).filter(function(O){return O.tagName==="STYLE"})}function p(A){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,r.Z)())return null;var j=O.csp,F=O.prepend,J=document.createElement("style");J.setAttribute(a,l(F)),j!=null&&j.nonce&&(J.nonce=j==null?void 0:j.nonce),J.innerHTML=A;var D=c(O),R=D.firstChild;if(F){if(F==="queue"){var U=d(D).filter(function(ee){return["prepend","prependQueue"].includes(ee.getAttribute(a))});if(U.length)return D.insertBefore(J,U[U.length-1].nextSibling),J}D.insertBefore(J,R)}else D.appendChild(J);return J}function M(A){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=c(O);return d(j).find(function(F){return F.getAttribute(u(O))===A})}function _(A){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=M(A,O);if(j){var F=c(O);F.removeChild(j)}}function y(A,O){var j=o.get(A);if(!j||!(0,t.Z)(document,j)){var F=p("",O),J=F.parentNode;o.set(A,J),A.removeChild(F)}}function I(){o.clear()}function S(A,O){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},F=c(j);y(F,j);var J=M(O,j);if(J){var D,R;if(((D=j.csp)===null||D===void 0?void 0:D.nonce)&&J.nonce!==((R=j.csp)===null||R===void 0?void 0:R.nonce)){var U;J.nonce=(U=j.csp)===null||U===void 0?void 0:U.nonce}return J.innerHTML!==A&&(J.innerHTML=A),J}var ee=p(A,j);return ee.setAttribute(u(j),O),ee}},34203:function(f,v,e){"use strict";e.d(v,{Z:function(){return t}});var r=e(73935);function t(a){return a instanceof HTMLElement?a:r.findDOMNode(a)}},88603:function(f,v,e){"use strict";e.d(v,{tS:function(){return i}});var r=e(74902),t=e(5110);function a(p){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,t.Z)(p)){var _=p.nodeName.toLowerCase(),y=["input","select","textarea","button"].includes(_)||p.isContentEditable||_==="a"&&!!p.getAttribute("href"),I=p.getAttribute("tabindex"),S=Number(I),A=null;return I&&!Number.isNaN(S)?A=S:y&&A===null&&(A=0),y&&p.disabled&&(A=null),A!==null&&(A>=0||M&&A<0)}return!1}function i(p){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_=(0,r.Z)(p.querySelectorAll("*")).filter(function(y){return a(y,M)});return a(p,M)&&_.unshift(p),_}var o=null;function u(){o=document.activeElement}function c(){o=null}function l(){if(o)try{o.focus()}catch(p){}}function d(p,M){if(M.keyCode===9){var _=i(p),y=_[M.shiftKey?0:_.length-1],I=y===document.activeElement||p===document.activeElement;if(I){var S=_[M.shiftKey?_.length-1:0];S.focus(),M.preventDefault()}}}},5110:function(f,v){"use strict";v.Z=function(e){if(!e)return!1;if(e instanceof HTMLElement&&e.offsetParent)return!0;if(e instanceof SVGGraphicsElement&&e.getBBox){var r=e.getBBox(),t=r.width,a=r.height;if(t||a)return!0}if(e instanceof HTMLElement&&e.getBoundingClientRect){var i=e.getBoundingClientRect(),o=i.width,u=i.height;if(o||u)return!0}return!1}},15105:function(f,v){"use strict";var e={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(t){var a=t.keyCode;if(t.altKey&&!t.ctrlKey||t.metaKey||a>=e.F1&&a<=e.F12)return!1;switch(a){case e.ALT:case e.CAPS_LOCK:case e.CONTEXT_MENU:case e.CTRL:case e.DOWN:case e.END:case e.ESC:case e.HOME:case e.INSERT:case e.LEFT:case e.MAC_FF_META:case e.META:case e.NUMLOCK:case e.NUM_CENTER:case e.PAGE_DOWN:case e.PAGE_UP:case e.PAUSE:case e.PRINT_SCREEN:case e.RIGHT:case e.SHIFT:case e.UP:case e.WIN_KEY:case e.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(t){if(t>=e.ZERO&&t<=e.NINE||t>=e.NUM_ZERO&&t<=e.NUM_MULTIPLY||t>=e.A&&t<=e.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&t===0)return!0;switch(t){case e.SPACE:case e.QUESTION_MARK:case e.NUM_PLUS:case e.NUM_MINUS:case e.NUM_PERIOD:case e.NUM_DIVISION:case e.SEMICOLON:case e.DASH:case e.EQUALS:case e.COMMA:case e.PERIOD:case e.SLASH:case e.APOSTROPHE:case e.SINGLE_QUOTE:case e.OPEN_SQUARE_BRACKET:case e.BACKSLASH:case e.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};v.Z=e},38135:function(f,v,e){"use strict";var r;e.d(v,{s:function(){return j},v:function(){return U}});var t=e(74165),a=e(15861),i=e(71002),o=e(1413),u=e(73935),c=(0,o.Z)({},r||(r=e.t(u,2))),l=c.version,d=c.render,p=c.unmountComponentAtNode,M;try{var _=Number((l||"").split(".")[0]);_>=18&&(M=c.createRoot)}catch(de){}function y(de){var he=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;he&&(0,i.Z)(he)==="object"&&(he.usingClientEntryPoint=de)}var I="__rc_react_root__";function S(de,he){y(!0);var ve=he[I]||M(he);y(!1),ve.render(de),he[I]=ve}function A(de,he){d(de,he)}function O(de,he){}function j(de,he){if(M){S(de,he);return}A(de,he)}function F(de){return J.apply(this,arguments)}function J(){return J=(0,a.Z)((0,t.Z)().mark(function de(he){return(0,t.Z)().wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return ce.abrupt("return",Promise.resolve().then(function(){var xe;(xe=he[I])===null||xe===void 0||xe.unmount(),delete he[I]}));case 1:case"end":return ce.stop()}},de)})),J.apply(this,arguments)}function D(de){p(de)}function R(de){}function U(de){return ee.apply(this,arguments)}function ee(){return ee=(0,a.Z)((0,t.Z)().mark(function de(he){return(0,t.Z)().wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:if(M===void 0){ce.next=2;break}return ce.abrupt("return",F(he));case 2:D(he);case 3:case"end":return ce.stop()}},de)})),ee.apply(this,arguments)}},66680:function(f,v,e){"use strict";e.d(v,{Z:function(){return t}});var r=e(67294);function t(a){var i=r.useRef();i.current=a;var o=r.useCallback(function(){for(var u,c=arguments.length,l=new Array(c),d=0;d1&&arguments[1]!==void 0?arguments[1]:1;t+=1;var d=t;function p(M){if(M===0)i(d),c();else{var _=e(function(){p(M-1)});a.set(d,_)}}return p(l),d};o.cancel=function(u){var c=a.get(u);return i(c),r(c)},v.Z=o},42550:function(f,v,e){"use strict";e.d(v,{Yr:function(){return c},mH:function(){return i},sQ:function(){return o},x1:function(){return u}});var r=e(71002),t=e(59864),a=e(56982);function i(l,d){typeof l=="function"?l(d):(0,r.Z)(l)==="object"&&l&&"current"in l&&(l.current=d)}function o(){for(var l=arguments.length,d=new Array(l),p=0;ps}return!1}function A(n,s,m,x,H,te,Be){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=x,this.attributeNamespace=H,this.mustUseProperty=m,this.propertyName=n,this.type=s,this.sanitizeURL=te,this.removeEmptyString=Be}var O={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){O[n]=new A(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var s=n[0];O[s]=new A(s,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){O[n]=new A(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){O[n]=new A(n,2,!1,n,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){O[n]=new A(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){O[n]=new A(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){O[n]=new A(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){O[n]=new A(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){O[n]=new A(n,5,!1,n.toLowerCase(),null,!1,!1)});var j=/[\-:]([a-z])/g;function F(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var s=n.replace(j,F);O[s]=new A(s,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var s=n.replace(j,F);O[s]=new A(s,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var s=n.replace(j,F);O[s]=new A(s,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){O[n]=new A(n,1,!1,n.toLowerCase(),null,!1,!1)}),O.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){O[n]=new A(n,1,!1,n.toLowerCase(),null,!0,!0)});function J(n,s,m,x){var H=O.hasOwnProperty(s)?O[s]:null;(H!==null?H.type!==0:x||!(2bt||H[Be]!==te[bt]){var Ft=` +`+H[Be].replace(" at new "," at ");return n.displayName&&Ft.includes("")&&(Ft=Ft.replace("",n.displayName)),Ft}while(1<=Be&&0<=bt);break}}}finally{De=!1,Error.prepareStackTrace=m}return(n=n?n.displayName||n.name:"")?Ze(n):""}function mt(n){switch(n.tag){case 5:return Ze(n.type);case 16:return Ze("Lazy");case 13:return Ze("Suspense");case 19:return Ze("SuspenseList");case 0:case 2:case 15:return n=Fe(n.type,!1),n;case 11:return n=Fe(n.type.render,!1),n;case 1:return n=Fe(n.type,!0),n;default:return""}}function ht(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case ee:return"Fragment";case U:return"Portal";case he:return"Profiler";case de:return"StrictMode";case Q:return"Suspense";case V:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case ce:return(n.displayName||"Context")+".Consumer";case ve:return(n._context.displayName||"Context")+".Provider";case xe:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case W:return s=n.displayName||null,s!==null?s:ht(n.type)||"Memo";case L:s=n._payload,n=n._init;try{return ht(n(s))}catch(m){}}return null}function xt(n){var s=n.type;switch(n.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=s.render,n=n.displayName||n.name||"",s.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ht(s);case 8:return s===de?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Et(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function ct(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function jt(n){var s=ct(n)?"checked":"value",m=Object.getOwnPropertyDescriptor(n.constructor.prototype,s),x=""+n[s];if(!n.hasOwnProperty(s)&&typeof m!="undefined"&&typeof m.get=="function"&&typeof m.set=="function"){var H=m.get,te=m.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return H.call(this)},set:function(Be){x=""+Be,te.call(this,Be)}}),Object.defineProperty(n,s,{enumerable:m.enumerable}),{getValue:function(){return x},setValue:function(Be){x=""+Be},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function Tt(n){n._valueTracker||(n._valueTracker=jt(n))}function Wt(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var m=s.getValue(),x="";return n&&(x=ct(n)?n.checked?"true":"false":n.value),n=x,n!==m?(s.setValue(n),!0):!1}function Bt(n){if(n=n||(typeof document!="undefined"?document:void 0),typeof n=="undefined")return null;try{return n.activeElement||n.body}catch(s){return n.body}}function Ht(n,s){var m=s.checked;return ie({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:m!=null?m:n._wrapperState.initialChecked})}function rr(n,s){var m=s.defaultValue==null?"":s.defaultValue,x=s.checked!=null?s.checked:s.defaultChecked;m=Et(s.value!=null?s.value:m),n._wrapperState={initialChecked:x,initialValue:m,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Sr(n,s){s=s.checked,s!=null&&J(n,"checked",s,!1)}function Ar(n,s){Sr(n,s);var m=Et(s.value),x=s.type;if(m!=null)x==="number"?(m===0&&n.value===""||n.value!=m)&&(n.value=""+m):n.value!==""+m&&(n.value=""+m);else if(x==="submit"||x==="reset"){n.removeAttribute("value");return}s.hasOwnProperty("value")?T(n,s.type,m):s.hasOwnProperty("defaultValue")&&T(n,s.type,Et(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(n.defaultChecked=!!s.defaultChecked)}function ye(n,s,m){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var x=s.type;if(!(x!=="submit"&&x!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+n._wrapperState.initialValue,m||s===n.value||(n.value=s),n.defaultValue=s}m=n.name,m!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,m!==""&&(n.name=m)}function T(n,s,m){(s!=="number"||Bt(n.ownerDocument)!==n)&&(m==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+m&&(n.defaultValue=""+m))}var b=Array.isArray;function q(n,s,m,x){if(n=n.options,s){s={};for(var H=0;H"+s.valueOf().toString()+"",s=je.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;s.firstChild;)n.appendChild(s.firstChild)}});function tt(n,s){if(s){var m=n.firstChild;if(m&&m===n.lastChild&&m.nodeType===3){m.nodeValue=s;return}}n.textContent=s}var We={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ue=["Webkit","ms","Moz","O"];Object.keys(We).forEach(function(n){Ue.forEach(function(s){s=s+n.charAt(0).toUpperCase()+n.substring(1),We[s]=We[n]})});function Ie(n,s,m){return s==null||typeof s=="boolean"||s===""?"":m||typeof s!="number"||s===0||We.hasOwnProperty(n)&&We[n]?(""+s).trim():s+"px"}function $e(n,s){n=n.style;for(var m in s)if(s.hasOwnProperty(m)){var x=m.indexOf("--")===0,H=Ie(m,s[m],x);m==="float"&&(m="cssFloat"),x?n.setProperty(m,H):n[m]=H}}var Le=ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ze(n,s){if(s){if(Le[n]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(a(137,n));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(a(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(a(61))}if(s.style!=null&&typeof s.style!="object")throw Error(a(62))}}function _e(n,s){if(n.indexOf("-")===-1)return typeof s.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ue=null;function Ye(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ve=null,Je=null,it=null;function Te(n){if(n=Jo(n)){if(typeof Ve!="function")throw Error(a(280));var s=n.stateNode;s&&(s=Xo(s),Ve(n.stateNode,n.type,s))}}function Pe(n){Je?it?it.push(n):it=[n]:Je=n}function nt(){if(Je){var n=Je,s=it;if(it=Je=null,Te(n),s)for(n=0;n>>=0,n===0?32:31-(ur(n)/$t|0)|0}var pr=64,Fr=4194304;function gn(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function cn(n,s){var m=n.pendingLanes;if(m===0)return 0;var x=0,H=n.suspendedLanes,te=n.pingedLanes,Be=m&268435455;if(Be!==0){var bt=Be&~H;bt!==0?x=gn(bt):(te&=Be,te!==0&&(x=gn(te)))}else Be=m&~H,Be!==0?x=gn(Be):te!==0&&(x=gn(te));if(x===0)return 0;if(s!==0&&s!==x&&(s&H)===0&&(H=x&-x,te=s&-s,H>=te||H===16&&(te&4194240)!==0))return s;if((x&4)!==0&&(x|=m&16),s=n.entangledLanes,s!==0)for(n=n.entanglements,s&=x;0m;m++)s.push(n);return s}function ln(n,s,m){n.pendingLanes|=s,s!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,s=31-Dt(s),n[s]=m}function _n(n,s){var m=n.pendingLanes&~s;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=s,n.mutableReadLanes&=s,n.entangledLanes&=s,s=n.entanglements;var x=n.eventTimes;for(n=n.expirationTimes;0=ut),Tr=String.fromCharCode(32),Ir=!1;function pn(n,s){switch(n){case"keyup":return et.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jr(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var hn=!1;function An(n,s){switch(n){case"compositionend":return Jr(s);case"keypress":return s.which!==32?null:(Ir=!0,Tr);case"textInput":return n=s.data,n===Tr&&Ir?null:n;default:return null}}function ha(n,s){if(hn)return n==="compositionend"||!at&&pn(n,s)?(n=z(),qe=we=Ln=null,hn=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:m,offset:s-n};n=x}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=ai(m)}}function $i(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?$i(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function Co(){for(var n=window,s=Bt();s instanceof n.HTMLIFrameElement;){try{var m=typeof s.contentWindow.location.href=="string"}catch(x){m=!1}if(m)n=s.contentWindow;else break;s=Bt(n.document)}return s}function yo(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}function Go(n){var s=Co(),m=n.focusedElem,x=n.selectionRange;if(s!==m&&m&&m.ownerDocument&&$i(m.ownerDocument.documentElement,m)){if(x!==null&&yo(m)){if(s=x.start,n=x.end,n===void 0&&(n=s),"selectionStart"in m)m.selectionStart=s,m.selectionEnd=Math.min(n,m.value.length);else if(n=(s=m.ownerDocument||document)&&s.defaultView||window,n.getSelection){n=n.getSelection();var H=m.textContent.length,te=Math.min(x.start,H);x=x.end===void 0?te:Math.min(x.end,H),!n.extend&&te>x&&(H=x,x=te,te=H),H=Qa(m,te);var Be=Qa(m,x);H&&Be&&(n.rangeCount!==1||n.anchorNode!==H.node||n.anchorOffset!==H.offset||n.focusNode!==Be.node||n.focusOffset!==Be.offset)&&(s=s.createRange(),s.setStart(H.node,H.offset),n.removeAllRanges(),te>x?(n.addRange(s),n.extend(Be.node,Be.offset)):(s.setEnd(Be.node,Be.offset),n.addRange(s)))}}for(s=[],n=m;n=n.parentNode;)n.nodeType===1&&s.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m=document.documentMode,Yi=null,ko=null,Vi=null,_o=!1;function No(n,s,m){var x=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;_o||Yi==null||Yi!==Bt(x)||(x=Yi,"selectionStart"in x&&yo(x)?x={start:x.selectionStart,end:x.selectionEnd}:(x=(x.ownerDocument&&x.ownerDocument.defaultView||window).getSelection(),x={anchorNode:x.anchorNode,anchorOffset:x.anchorOffset,focusNode:x.focusNode,focusOffset:x.focusOffset}),Vi&&ni(Vi,x)||(Vi=x,x=Cn(ko,"onSelect"),0Ei||(n.current=Zo[Ei],Zo[Ei]=null,Ei--)}function Ya(n,s){Ei++,Zo[Ei]=n.current,n.current=s}var Po={},Ja=mo(Po),Mi=mo(!1),vo=Po;function Bo(n,s){var m=n.type.contextTypes;if(!m)return Po;var x=n.stateNode;if(x&&x.__reactInternalMemoizedUnmaskedChildContext===s)return x.__reactInternalMemoizedMaskedChildContext;var H={},te;for(te in m)H[te]=s[te];return x&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=s,n.__reactInternalMemoizedMaskedChildContext=H),H}function li(n){return n=n.childContextTypes,n!=null}function zo(){Hn(Mi),Hn(Ja)}function ns(n,s,m){if(Ja.current!==Po)throw Error(a(168));Ya(Ja,s),Ya(Mi,m)}function Gi(n,s,m){var x=n.stateNode;if(s=s.childContextTypes,typeof x.getChildContext!="function")return m;x=x.getChildContext();for(var H in x)if(!(H in s))throw Error(a(108,xt(n)||"Unknown",H));return ie({},m,x)}function as(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||Po,vo=Ja.current,Ya(Ja,n),Ya(Mi,Mi.current),!0}function to(n,s,m){var x=n.stateNode;if(!x)throw Error(a(169));m?(n=Gi(n,s,vo),x.__reactInternalMemoizedMergedChildContext=n,Hn(Mi),Hn(Ja),Ya(Ja,n)):Hn(Mi),Ya(Mi,m)}var ii=null,Me=!1,st=!1;function Xt(n){ii===null?ii=[n]:ii.push(n)}function It(n){Me=!0,Xt(n)}function $r(){if(!st&&ii!==null){st=!0;var n=0,s=Ur;try{var m=ii;for(Ur=1;n>=Be,H-=Be,xa=1<<32-Dt(s)+H|m<ia?(Ci=qn,qn=null):Ci=qn.sibling;var Aa=Zr(tr,qn,ar[ia],rn);if(Aa===null){qn===null&&(qn=Ci);break}n&&qn&&Aa.alternate===null&&s(tr,qn),Vt=te(Aa,Vt,ia),Qn===null?Bn=Aa:Qn.sibling=Aa,Qn=Aa,qn=Ci}if(ia===ar.length)return m(tr,qn),$a&&vi(tr,ia),Bn;if(qn===null){for(;iaia?(Ci=qn,qn=null):Ci=qn.sibling;var ps=Zr(tr,qn,Aa.value,rn);if(ps===null){qn===null&&(qn=Ci);break}n&&qn&&ps.alternate===null&&s(tr,qn),Vt=te(ps,Vt,ia),Qn===null?Bn=ps:Qn.sibling=ps,Qn=ps,qn=Ci}if(Aa.done)return m(tr,qn),$a&&vi(tr,ia),Bn;if(qn===null){for(;!Aa.done;ia++,Aa=ar.next())Aa=Xr(tr,Aa.value,rn),Aa!==null&&(Vt=te(Aa,Vt,ia),Qn===null?Bn=Aa:Qn.sibling=Aa,Qn=Aa);return $a&&vi(tr,ia),Bn}for(qn=x(tr,qn);!Aa.done;ia++,Aa=ar.next())Aa=En(qn,tr,ia,Aa.value,rn),Aa!==null&&(n&&Aa.alternate!==null&&qn.delete(Aa.key===null?ia:Aa.key),Vt=te(Aa,Vt,ia),Qn===null?Bn=Aa:Qn.sibling=Aa,Qn=Aa);return n&&qn.forEach(function(vd){return s(tr,vd)}),$a&&vi(tr,ia),Bn}function di(tr,Vt,ar,rn){if(typeof ar=="object"&&ar!==null&&ar.type===ee&&ar.key===null&&(ar=ar.props.children),typeof ar=="object"&&ar!==null){switch(ar.$$typeof){case R:e:{for(var Bn=ar.key,Qn=Vt;Qn!==null;){if(Qn.key===Bn){if(Bn=ar.type,Bn===ee){if(Qn.tag===7){m(tr,Qn.sibling),Vt=H(Qn,ar.props.children),Vt.return=tr,tr=Vt;break e}}else if(Qn.elementType===Bn||typeof Bn=="object"&&Bn!==null&&Bn.$$typeof===L&&Nt(Bn)===Qn.type){m(tr,Qn.sibling),Vt=H(Qn,ar.props),Vt.ref=Se(tr,Qn,ar),Vt.return=tr,tr=Vt;break e}m(tr,Qn);break}else s(tr,Qn);Qn=Qn.sibling}ar.type===ee?(Vt=bs(ar.props.children,tr.mode,rn,ar.key),Vt.return=tr,tr=Vt):(rn=wu(ar.type,ar.key,ar.props,null,tr.mode,rn),rn.ref=Se(tr,Vt,ar),rn.return=tr,tr=rn)}return Be(tr);case U:e:{for(Qn=ar.key;Vt!==null;){if(Vt.key===Qn)if(Vt.tag===4&&Vt.stateNode.containerInfo===ar.containerInfo&&Vt.stateNode.implementation===ar.implementation){m(tr,Vt.sibling),Vt=H(Vt,ar.children||[]),Vt.return=tr,tr=Vt;break e}else{m(tr,Vt);break}else s(tr,Vt);Vt=Vt.sibling}Vt=hl(ar,tr.mode,rn),Vt.return=tr,tr=Vt}return Be(tr);case L:return Qn=ar._init,di(tr,Vt,Qn(ar._payload),rn)}if(b(ar))return In(tr,Vt,ar,rn);if(K(ar))return jn(tr,Vt,ar,rn);Ge(tr,ar)}return typeof ar=="string"&&ar!==""||typeof ar=="number"?(ar=""+ar,Vt!==null&&Vt.tag===6?(m(tr,Vt.sibling),Vt=H(Vt,ar),Vt.return=tr,tr=Vt):(m(tr,Vt),Vt=pl(ar,tr.mode,rn),Vt.return=tr,tr=Vt),Be(tr)):m(tr,Vt)}return di}var Nn=gr(!0),la=gr(!1),Ca={},Va=mo(Ca),Xi=mo(Ca),io=mo(Ca);function gs(n){if(n===Ca)throw Error(a(174));return n}function Iu(n,s){switch(Ya(io,s),Ya(Xi,n),Ya(Va,Ca),n=s.nodeType,n){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:X(null,"");break;default:n=n===8?s.parentNode:s,s=n.namespaceURI||null,n=n.tagName,s=X(s,n)}Hn(Va),Ya(Va,s)}function Os(){Hn(Va),Hn(Xi),Hn(io)}function bl(n){gs(io.current);var s=gs(Va.current),m=X(s,n.type);s!==m&&(Ya(Xi,n),Ya(Va,m))}function Ru(n){Xi.current===n&&(Hn(Va),Hn(Xi))}var si=mo(0);function ou(n){for(var s=n;s!==null;){if(s.tag===13){var m=s.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||m.data==="$?"||m.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Yu=[];function ku(){for(var n=0;nm?m:4,n(!0);var x=Nu.transition;Nu.transition={};try{n(!1),s()}finally{Ur=m,Nu.transition=x}}function Zl(){return Eo().memoizedState}function jc(n,s,m){var x=fs(n);if(m={lane:x,action:m,hasEagerState:!1,eagerState:null,next:null},Bl(n))zl(s,m);else if(m=nu(n,s,m,x),m!==null){var H=qi();Yo(m,n,x,H),Wl(m,s,x)}}function Fc(n,s,m){var x=fs(n),H={lane:x,action:m,hasEagerState:!1,eagerState:null,next:null};if(Bl(n))zl(s,H);else{var te=n.alternate;if(n.lanes===0&&(te===null||te.lanes===0)&&(te=s.lastRenderedReducer,te!==null))try{var Be=s.lastRenderedState,bt=te(Be,m);if(H.hasEagerState=!0,H.eagerState=bt,Ea(bt,Be)){var Ft=s.interleaved;Ft===null?(H.next=H,Bs(s)):(H.next=Ft.next,Ft.next=H),s.interleaved=H;return}}catch(lr){}finally{}m=nu(n,s,H,x),m!==null&&(H=qi(),Yo(m,n,x,H),Wl(m,s,x))}}function Bl(n){var s=n.alternate;return n===ui||s!==null&&s===ui}function zl(n,s){Ws=uu=!0;var m=n.pending;m===null?s.next=s:(s.next=m.next,m.next=s),n.pending=s}function Wl(n,s,m){if((m&4194240)!==0){var x=s.lanes;x&=n.pendingLanes,m|=x,s.lanes=m,Mn(n,m)}}var du={readContext:ao,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},Hc={readContext:ao,useCallback:function(n,s){return Vo().memoizedState=[n,s===void 0?null:s],n},useContext:ao,useEffect:Il,useImperativeHandle:function(n,s,m){return m=m!=null?m.concat([n]):null,lu(4194308,4,kl.bind(null,s,n),m)},useLayoutEffect:function(n,s){return lu(4194308,4,n,s)},useInsertionEffect:function(n,s){return lu(4,2,n,s)},useMemo:function(n,s){var m=Vo();return s=s===void 0?null:s,n=n(),m.memoizedState=[n,s],n},useReducer:function(n,s,m){var x=Vo();return s=m!==void 0?m(s):s,x.memoizedState=x.baseState=s,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:s},x.queue=n,n=n.dispatch=jc.bind(null,ui,n),[x.memoizedState,n]},useRef:function(n){var s=Vo();return n={current:n},s.memoizedState=n},useState:Dl,useDebugValue:Wu,useDeferredValue:function(n){return Vo().memoizedState=n},useTransition:function(){var n=Dl(!1),s=n[0];return n=Nc.bind(null,n[1]),Vo().memoizedState=n,[s,n]},useMutableSource:function(){},useSyncExternalStore:function(n,s,m){var x=ui,H=Vo();if($a){if(m===void 0)throw Error(a(407));m=m()}else{if(m=s(),Ti===null)throw Error(a(349));(ys&30)!==0||Ll(x,s,m)}H.memoizedState=m;var te={value:m,getSnapshot:s};return H.queue=te,Il(Cl.bind(null,x,te,n),[n]),x.flags|=2048,Vs(9,Tl.bind(null,x,te,m,s),void 0,null),m},useId:function(){var n=Vo(),s=Ti.identifierPrefix;if($a){var m=ti,x=xa;m=(x&~(1<<32-Dt(x)-1)).toString(32)+m,s=":"+s+"R"+m,m=Us++,0<\/script>",n=n.removeChild(n.firstChild)):typeof x.is=="string"?n=Be.createElement(m,{is:x.is}):(n=Be.createElement(m),m==="select"&&(Be=n,x.multiple?Be.multiple=!0:x.size&&(Be.size=x.size))):n=Be.createElementNS(n,m),n[wi]=s,n[xo]=x,sc(n,s,!1,!1),s.stateNode=n;e:{switch(Be=_e(m,x),m){case"dialog":Lt("cancel",n),Lt("close",n),H=x;break;case"iframe":case"object":case"embed":Lt("load",n),H=x;break;case"video":case"audio":for(H=0;HIs&&(s.flags|=128,x=!0,Ks(te,!1),s.lanes=4194304)}else{if(!x)if(n=ou(Be),n!==null){if(s.flags|=128,x=!0,m=n.updateQueue,m!==null&&(s.updateQueue=m,s.flags|=4),Ks(te,!0),te.tail===null&&te.tailMode==="hidden"&&!Be.alternate&&!$a)return Wi(s),null}else 2*en()-te.renderingStartTime>Is&&m!==1073741824&&(s.flags|=128,x=!0,Ks(te,!1),s.lanes=4194304);te.isBackwards?(Be.sibling=s.child,s.child=Be):(m=te.last,m!==null?m.sibling=Be:s.child=Be,te.last=Be)}return te.tail!==null?(s=te.tail,te.rendering=s,te.tail=s.sibling,te.renderingStartTime=en(),s.sibling=null,m=si.current,Ya(si,x?m&1|2:m&1),s):(Wi(s),null);case 22:case 23:return fl(),x=s.memoizedState!==null,n!==null&&n.memoizedState!==null!==x&&(s.flags|=8192),x&&(s.mode&1)!==0?(go&1073741824)!==0&&(Wi(s),s.subtreeFlags&6&&(s.flags|=8192)):Wi(s),null;case 24:return null;case 25:return null}throw Error(a(156,s.tag))}function Kc(n,s){switch(Ys(s),s.tag){case 1:return li(s.type)&&zo(),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return Os(),Hn(Mi),Hn(Ja),ku(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 5:return Ru(s),null;case 13:if(Hn(si),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(a(340));os()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return Hn(si),null;case 4:return Os(),null;case 10:return Zs(s.type._context),null;case 22:case 23:return fl(),null;case 24:return null;default:return null}}var vu=!1,Ui=!1,Gc=typeof WeakSet=="function"?WeakSet:Set,Pn=null;function Ds(n,s){var m=n.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(x){ci(n,s,x)}else m.current=null}function el(n,s,m){try{m()}catch(x){ci(n,s,x)}}var cc=!1;function Jc(n,s){if(_i=Nr,n=Co(),yo(n)){if("selectionStart"in n)var m={start:n.selectionStart,end:n.selectionEnd};else e:{m=(m=n.ownerDocument)&&m.defaultView||window;var x=m.getSelection&&m.getSelection();if(x&&x.rangeCount!==0){m=x.anchorNode;var H=x.anchorOffset,te=x.focusNode;x=x.focusOffset;try{m.nodeType,te.nodeType}catch(rn){m=null;break e}var Be=0,bt=-1,Ft=-1,lr=0,Wr=0,Xr=n,Zr=null;t:for(;;){for(var En;Xr!==m||H!==0&&Xr.nodeType!==3||(bt=Be+H),Xr!==te||x!==0&&Xr.nodeType!==3||(Ft=Be+x),Xr.nodeType===3&&(Be+=Xr.nodeValue.length),(En=Xr.firstChild)!==null;)Zr=Xr,Xr=En;for(;;){if(Xr===n)break t;if(Zr===m&&++lr===H&&(bt=Be),Zr===te&&++Wr===x&&(Ft=Be),(En=Xr.nextSibling)!==null)break;Xr=Zr,Zr=Xr.parentNode}Xr=En}m=bt===-1||Ft===-1?null:{start:bt,end:Ft}}else m=null}m=m||{start:0,end:0}}else m=null;for(Ni={focusedElem:n,selectionRange:m},Nr=!1,Pn=s;Pn!==null;)if(s=Pn,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,Pn=n;else for(;Pn!==null;){s=Pn;try{var In=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(In!==null){var jn=In.memoizedProps,di=In.memoizedState,tr=s.stateNode,Vt=tr.getSnapshotBeforeUpdate(s.elementType===s.type?jn:ho(s.type,jn),di);tr.__reactInternalSnapshotBeforeUpdate=Vt}break;case 3:var ar=s.stateNode.containerInfo;ar.nodeType===1?ar.textContent="":ar.nodeType===9&&ar.documentElement&&ar.removeChild(ar.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(rn){ci(s,s.return,rn)}if(n=s.sibling,n!==null){n.return=s.return,Pn=n;break}Pn=s.return}return In=cc,cc=!1,In}function Gs(n,s,m){var x=s.updateQueue;if(x=x!==null?x.lastEffect:null,x!==null){var H=x=x.next;do{if((H.tag&n)===n){var te=H.destroy;H.destroy=void 0,te!==void 0&&el(s,m,te)}H=H.next}while(H!==x)}}function pu(n,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var m=s=s.next;do{if((m.tag&n)===n){var x=m.create;m.destroy=x()}m=m.next}while(m!==s)}}function tl(n){var s=n.ref;if(s!==null){var m=n.stateNode;switch(n.tag){case 5:n=m;break;default:n=m}typeof s=="function"?s(n):s.current=n}}function dc(n){var s=n.alternate;s!==null&&(n.alternate=null,dc(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&(delete s[wi],delete s[xo],delete s[mi],delete s[co],delete s[bo])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function fc(n){return n.tag===5||n.tag===3||n.tag===4}function mc(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||fc(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function rl(n,s,m){var x=n.tag;if(x===5||x===6)n=n.stateNode,s?m.nodeType===8?m.parentNode.insertBefore(n,s):m.insertBefore(n,s):(m.nodeType===8?(s=m.parentNode,s.insertBefore(n,m)):(s=m,s.appendChild(n)),m=m._reactRootContainer,m!=null||s.onclick!==null||(s.onclick=ei));else if(x!==4&&(n=n.child,n!==null))for(rl(n,s,m),n=n.sibling;n!==null;)rl(n,s,m),n=n.sibling}function nl(n,s,m){var x=n.tag;if(x===5||x===6)n=n.stateNode,s?m.insertBefore(n,s):m.appendChild(n);else if(x!==4&&(n=n.child,n!==null))for(nl(n,s,m),n=n.sibling;n!==null;)nl(n,s,m),n=n.sibling}var Ai=null,Io=!1;function ls(n,s,m){for(m=m.child;m!==null;)vc(n,s,m),m=m.sibling}function vc(n,s,m){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Mr,m)}catch(bt){}switch(m.tag){case 5:Ui||Ds(m,s);case 6:var x=Ai,H=Io;Ai=null,ls(n,s,m),Ai=x,Io=H,Ai!==null&&(Io?(n=Ai,m=m.stateNode,n.nodeType===8?n.parentNode.removeChild(m):n.removeChild(m)):Ai.removeChild(m.stateNode));break;case 18:Ai!==null&&(Io?(n=Ai,m=m.stateNode,n.nodeType===8?So(n.parentNode,m):n.nodeType===1&&So(n,m),Jt(n)):So(Ai,m.stateNode));break;case 4:x=Ai,H=Io,Ai=m.stateNode.containerInfo,Io=!0,ls(n,s,m),Ai=x,Io=H;break;case 0:case 11:case 14:case 15:if(!Ui&&(x=m.updateQueue,x!==null&&(x=x.lastEffect,x!==null))){H=x=x.next;do{var te=H,Be=te.destroy;te=te.tag,Be!==void 0&&((te&2)!==0||(te&4)!==0)&&el(m,s,Be),H=H.next}while(H!==x)}ls(n,s,m);break;case 1:if(!Ui&&(Ds(m,s),x=m.stateNode,typeof x.componentWillUnmount=="function"))try{x.props=m.memoizedProps,x.state=m.memoizedState,x.componentWillUnmount()}catch(bt){ci(m,s,bt)}ls(n,s,m);break;case 21:ls(n,s,m);break;case 22:m.mode&1?(Ui=(x=Ui)||m.memoizedState!==null,ls(n,s,m),Ui=x):ls(n,s,m);break;default:ls(n,s,m)}}function pc(n){var s=n.updateQueue;if(s!==null){n.updateQueue=null;var m=n.stateNode;m===null&&(m=n.stateNode=new Gc),s.forEach(function(x){var H=id.bind(null,n,x);m.has(x)||(m.add(x),x.then(H,H))})}}function Ro(n,s){var m=s.deletions;if(m!==null)for(var x=0;xH&&(H=Be),x&=~te}if(x=H,x=en()-x,x=(120>x?120:480>x?480:1080>x?1080:1920>x?1920:3e3>x?3e3:4320>x?4320:1960*Qc(x/1960))-x,10n?16:n,ds===null)var x=!1;else{if(n=ds,ds=null,Mu=0,(Oa&6)!==0)throw Error(a(331));var H=Oa;for(Oa|=4,Pn=n.current;Pn!==null;){var te=Pn,Be=te.child;if((Pn.flags&16)!==0){var bt=te.deletions;if(bt!==null){for(var Ft=0;Ften()-ol?Ss(n,0):il|=m),uo(n,s)}function Cc(n,s){s===0&&((n.mode&1)===0?s=1:(s=Fr,Fr<<=1,(Fr&130023424)===0&&(Fr=4194304)));var m=qi();n=Ao(n,s),n!==null&&(ln(n,s,m),uo(n,m))}function ad(n){var s=n.memoizedState,m=0;s!==null&&(m=s.retryLane),Cc(n,m)}function id(n,s){var m=0;switch(n.tag){case 13:var x=n.stateNode,H=n.memoizedState;H!==null&&(m=H.retryLane);break;case 19:x=n.stateNode;break;default:throw Error(a(314))}x!==null&&x.delete(s),Cc(n,m)}var Oc;Oc=function(n,s,m){if(n!==null)if(n.memoizedProps!==s.pendingProps||Mi.current)oo=!0;else{if((n.lanes&m)===0&&(s.flags&128)===0)return oo=!1,$c(n,s,m);oo=(n.flags&131072)!==0}else oo=!1,$a&&(s.flags&1048576)!==0&&is(s,oi,s.index);switch(s.lanes=0,s.tag){case 2:var x=s.type;mu(n,s),n=s.pendingProps;var H=Bo(s,Ja.current);us(s,m),H=Fu(null,s,x,n,H,m);var te=Hu();return s.flags|=1,typeof H=="object"&&H!==null&&typeof H.render=="function"&&H.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,li(x)?(te=!0,as(s)):te=!1,s.memoizedState=H.state!==null&&H.state!==void 0?H.state:null,zs(s),H.updater=qo,s.stateNode=H,H._reactInternals=s,ae(s,x,n,m),s=Ku(null,s,x,!0,te,m)):(s.tag=0,$a&&te&&po(s),Qi(null,s,H,m),s=s.child),s;case 16:x=s.elementType;e:{switch(mu(n,s),n=s.pendingProps,H=x._init,x=H(x._payload),s.type=x,H=s.tag=sd(x),n=ho(x,n),H){case 0:s=Vu(null,s,x,n,m);break e;case 1:s=tc(null,s,x,n,m);break e;case 11:s=Jl(null,s,x,n,m);break e;case 14:s=Xl(null,s,x,ho(x.type,n),m);break e}throw Error(a(306,x,""))}return s;case 0:return x=s.type,H=s.pendingProps,H=s.elementType===x?H:ho(x,H),Vu(n,s,x,H,m);case 1:return x=s.type,H=s.pendingProps,H=s.elementType===x?H:ho(x,H),tc(n,s,x,H,m);case 3:e:{if(rc(s),n===null)throw Error(a(387));x=s.pendingProps,te=s.memoizedState,H=te.element,wo(n,s),Ts(s,x,null,m);var Be=s.memoizedState;if(x=Be.element,te.isDehydrated)if(te={element:x,isDehydrated:!1,cache:Be.cache,pendingSuspenseBoundaries:Be.pendingSuspenseBoundaries,transitions:Be.transitions},s.updateQueue.baseState=te,s.memoizedState=te,s.flags&256){H=Ps(Error(a(423)),s),s=nc(n,s,x,m,H);break e}else if(x!==H){H=Ps(Error(a(424)),s),s=nc(n,s,x,m,H);break e}else for(Ji=Fi(s.stateNode.containerInfo.firstChild),Zi=s,$a=!0,ro=null,m=la(s,null,x,m),s.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(os(),x===H){s=es(n,s,m);break e}Qi(n,s,x,m)}s=s.child}return s;case 5:return bl(s),n===null&&Ns(s),x=s.type,H=s.pendingProps,te=n!==null?n.memoizedProps:null,Be=H.children,Di(x,H)?Be=null:te!==null&&Di(x,te)&&(s.flags|=32),ec(n,s),Qi(n,s,Be,m),s.child;case 6:return n===null&&Ns(s),null;case 13:return ac(n,s,m);case 4:return Iu(s,s.stateNode.containerInfo),x=s.pendingProps,n===null?s.child=Nn(s,null,x,m):Qi(n,s,x,m),s.child;case 11:return x=s.type,H=s.pendingProps,H=s.elementType===x?H:ho(x,H),Jl(n,s,x,H,m);case 7:return Qi(n,s,s.pendingProps,m),s.child;case 8:return Qi(n,s,s.pendingProps.children,m),s.child;case 12:return Qi(n,s,s.pendingProps.children,m),s.child;case 10:e:{if(x=s.type._context,H=s.pendingProps,te=s.memoizedProps,Be=H.value,Ya(ws,x._currentValue),x._currentValue=Be,te!==null)if(Ea(te.value,Be)){if(te.children===H.children&&!Mi.current){s=es(n,s,m);break e}}else for(te=s.child,te!==null&&(te.return=s);te!==null;){var bt=te.dependencies;if(bt!==null){Be=te.child;for(var Ft=bt.firstContext;Ft!==null;){if(Ft.context===x){if(te.tag===1){Ft=Bi(-1,m&-m),Ft.tag=2;var lr=te.updateQueue;if(lr!==null){lr=lr.shared;var Wr=lr.pending;Wr===null?Ft.next=Ft:(Ft.next=Wr.next,Wr.next=Ft),lr.pending=Ft}}te.lanes|=m,Ft=te.alternate,Ft!==null&&(Ft.lanes|=m),Do(te.return,m,s),bt.lanes|=m;break}Ft=Ft.next}}else if(te.tag===10)Be=te.type===s.type?null:te.child;else if(te.tag===18){if(Be=te.return,Be===null)throw Error(a(341));Be.lanes|=m,bt=Be.alternate,bt!==null&&(bt.lanes|=m),Do(Be,m,s),Be=te.sibling}else Be=te.child;if(Be!==null)Be.return=te;else for(Be=te;Be!==null;){if(Be===s){Be=null;break}if(te=Be.sibling,te!==null){te.return=Be.return,Be=te;break}Be=Be.return}te=Be}Qi(n,s,H.children,m),s=s.child}return s;case 9:return H=s.type,x=s.pendingProps.children,us(s,m),H=ao(H),x=x(H),s.flags|=1,Qi(n,s,x,m),s.child;case 14:return x=s.type,H=ho(x,s.pendingProps),H=ho(x.type,H),Xl(n,s,x,H,m);case 15:return Ql(n,s,s.type,s.pendingProps,m);case 17:return x=s.type,H=s.pendingProps,H=s.elementType===x?H:ho(x,H),mu(n,s),s.tag=1,li(x)?(n=!0,as(s)):n=!1,us(s,m),h(s,x,H),ae(s,x,H,m),Ku(null,s,x,!0,n,m);case 19:return oc(n,s,m);case 22:return ql(n,s,m)}throw Error(a(156,s.tag))};function Pc(n,s){return Gn(n,s)}function od(n,s,m,x){this.tag=n,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function To(n,s,m,x){return new od(n,s,m,x)}function vl(n){return n=n.prototype,!(!n||!n.isReactComponent)}function sd(n){if(typeof n=="function")return vl(n)?1:0;if(n!=null){if(n=n.$$typeof,n===xe)return 11;if(n===W)return 14}return 2}function vs(n,s){var m=n.alternate;return m===null?(m=To(n.tag,s,n.key,n.mode),m.elementType=n.elementType,m.type=n.type,m.stateNode=n.stateNode,m.alternate=n,n.alternate=m):(m.pendingProps=s,m.type=n.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=n.flags&14680064,m.childLanes=n.childLanes,m.lanes=n.lanes,m.child=n.child,m.memoizedProps=n.memoizedProps,m.memoizedState=n.memoizedState,m.updateQueue=n.updateQueue,s=n.dependencies,m.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},m.sibling=n.sibling,m.index=n.index,m.ref=n.ref,m}function wu(n,s,m,x,H,te){var Be=2;if(x=n,typeof n=="function")vl(n)&&(Be=1);else if(typeof n=="string")Be=5;else e:switch(n){case ee:return bs(m.children,H,te,s);case de:Be=8,H|=8;break;case he:return n=To(12,m,s,H|2),n.elementType=he,n.lanes=te,n;case Q:return n=To(13,m,s,H),n.elementType=Q,n.lanes=te,n;case V:return n=To(19,m,s,H),n.elementType=V,n.lanes=te,n;case k:return Eu(m,H,te,s);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case ve:Be=10;break e;case ce:Be=9;break e;case xe:Be=11;break e;case W:Be=14;break e;case L:Be=16,x=null;break e}throw Error(a(130,n==null?n:typeof n,""))}return s=To(Be,m,s,H),s.elementType=n,s.type=x,s.lanes=te,s}function bs(n,s,m,x){return n=To(7,n,x,s),n.lanes=m,n}function Eu(n,s,m,x){return n=To(22,n,x,s),n.elementType=k,n.lanes=m,n.stateNode={isHidden:!1},n}function pl(n,s,m){return n=To(6,n,null,s),n.lanes=m,n}function hl(n,s,m){return s=To(4,n.children!==null?n.children:[],n.key,s),s.lanes=m,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}function ud(n,s,m,x,H){this.tag=s,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sn(0),this.expirationTimes=sn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sn(0),this.identifierPrefix=x,this.onRecoverableError=H,this.mutableSourceEagerHydrationData=null}function gl(n,s,m,x,H,te,Be,bt,Ft){return n=new ud(n,s,m,bt,Ft),s===1?(s=1,te===!0&&(s|=8)):s=0,te=To(3,null,null,s),n.current=te,te.stateNode=n,te.memoizedState={element:x,isDehydrated:m,cache:null,transitions:null,pendingSuspenseBoundaries:null},zs(te),n}function ld(n,s,m){var x=3