diff --git a/src/main/webapp/META-INF/MANIFEST.MF b/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/src/main/webapp/META-INF/OSSLicenses b/src/main/webapp/META-INF/OSSLicenses new file mode 100644 index 0000000..3e658bd --- /dev/null +++ b/src/main/webapp/META-INF/OSSLicenses @@ -0,0 +1,1016 @@ +전자정부 표준프레임워크 공통컴포넌트에서는 +아래와 같은 오픈소스 소프트웨어를 이용하며 관련 라이센스의 적용을 받습니다. + +------------------ +Apache License 2.0 + - Commons IO + - egovframework + - godsoft + - OSS2016_CommonComponent + - Spring Social Config + - spring-social-samples +------------------ +BSD 3-clause "New" or "Revised" License + - HTMLarea Editor For XOOPS +------------------ +GNU Lesser General Public License v2.1 or later + - FCKeditor - CKEditor +------------------ +htmlArea License + - htmlArea +------------------ +JSON License + - JSON in Java +------------------ +MIT License + - jquery + - jQuery UI - jquery/jquery-ui on GitHub + - jsTree + - jsx-requirejs-plugin + - Prototype JavaScript Framework +------------------ +Oracle Technology Network Development and Distribution License + - Oracle JDBC Driver + + . + . + . + +/**********************************************************************************************/ +/************************************** *********************************/ +/************************************** OSS License Details *********************************/ +/************************************** *********************************/ +/**********************************************************************************************/ + +------------------------------------------------------------------------------------------------ + +/************************************** *********************************/ +/************************************** Apache License 2.0 *********************************/ +/************************************** *********************************/ +/* ============================================================================================ + * Apache License + * Version 2.0, January 2004 + * http://www.apache.org/licenses/ + * + * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + * + * 1. Definitions. + * + * "License" shall mean the terms and conditions for use, reproduction, + * and distribution as defined by Sections 1 through 9 of this document. + * + * "Licensor" shall mean the copyright owner or entity authorized by + * the copyright owner that is granting the License. + * + * "Legal Entity" shall mean the union of the acting entity and all + * other entities that control, are controlled by, or are under common + * control with that entity. For the purposes of this definition, + * "control" means (i) the power, direct or indirect, to cause the + * direction or management of such entity, whether by contract or + * otherwise, or (ii) ownership of fifty percent (50%) or more of the + * outstanding shares, or (iii) beneficial ownership of such entity. + * + * "You" (or "Your") shall mean an individual or Legal Entity + * exercising permissions granted by this License. + * + * "Source" form shall mean the preferred form for making modifications, + * including but not limited to software source code, documentation + * source, and configuration files. + * + * "Object" form shall mean any form resulting from mechanical + * transformation or translation of a Source form, including but + * not limited to compiled object code, generated documentation, + * and conversions to other media types. + * + * "Work" shall mean the work of authorship, whether in Source or + * Object form, made available under the License, as indicated by a + * copyright notice that is included in or attached to the work + * (an example is provided in the Appendix below). + * + * "Derivative Works" shall mean any work, whether in Source or Object + * form, that is based on (or derived from) the Work and for which the + * editorial revisions, annotations, elaborations, or other modifications + * represent, as a whole, an original work of authorship. For the purposes + * of this License, Derivative Works shall not include works that remain + * separable from, or merely link (or bind by name) to the interfaces of, + * the Work and Derivative Works thereof. + * + * "Contribution" shall mean any work of authorship, including + * the original version of the Work and any modifications or additions + * to that Work or Derivative Works thereof, that is intentionally + * submitted to Licensor for inclusion in the Work by the copyright owner + * or by an individual or Legal Entity authorized to submit on behalf of + * the copyright owner. For the purposes of this definition, "submitted" + * means any form of electronic, verbal, or written communication sent + * to the Licensor or its representatives, including but not limited to + * communication on electronic mailing lists, source code control systems, + * and issue tracking systems that are managed by, or on behalf of, the + * Licensor for the purpose of discussing and improving the Work, but + * excluding communication that is conspicuously marked or otherwise + * designated in writing by the copyright owner as "Not a Contribution." + * + * "Contributor" shall mean Licensor and any individual or Legal Entity + * on behalf of whom a Contribution has been received by Licensor and + * subsequently incorporated within the Work. + * + * 2. Grant of Copyright License. Subject to the terms and conditions of + * this License, each Contributor hereby grants to You a perpetual, + * worldwide, non-exclusive, no-charge, royalty-free, irrevocable + * copyright license to reproduce, prepare Derivative Works of, + * publicly display, publicly perform, sublicense, and distribute the + * Work and such Derivative Works in Source or Object form. + * + * 3. Grant of Patent License. Subject to the terms and conditions of + * this License, each Contributor hereby grants to You a perpetual, + * worldwide, non-exclusive, no-charge, royalty-free, irrevocable + * (except as stated in this section) patent license to make, have made, + * use, offer to sell, sell, import, and otherwise transfer the Work, + * where such license applies only to those patent claims licensable + * by such Contributor that are necessarily infringed by their + * Contribution(s) alone or by combination of their Contribution(s) + * with the Work to which such Contribution(s) was submitted. If You + * institute patent litigation against any entity (including a + * cross-claim or counterclaim in a lawsuit) alleging that the Work + * or a Contribution incorporated within the Work constitutes direct + * or contributory patent infringement, then any patent licenses + * granted to You under this License for that Work shall terminate + * as of the date such litigation is filed. + * + * 4. Redistribution. You may reproduce and distribute copies of the + * Work or Derivative Works thereof in any medium, with or without + * modifications, and in Source or Object form, provided that You + * meet the following conditions: + * + * (a) You must give any other recipients of the Work or + * Derivative Works a copy of this License; and + * + * (b) You must cause any modified files to carry prominent notices + * stating that You changed the files; and + * + * (c) You must retain, in the Source form of any Derivative Works + * that You distribute, all copyright, patent, trademark, and + * attribution notices from the Source form of the Work, + * excluding those notices that do not pertain to any part of + * the Derivative Works; and + * + * (d) If the Work includes a "NOTICE" text file as part of its + * distribution, then any Derivative Works that You distribute must + * include a readable copy of the attribution notices contained + * within such NOTICE file, excluding those notices that do not + * pertain to any part of the Derivative Works, in at least one + * of the following places: within a NOTICE text file distributed + * as part of the Derivative Works; within the Source form or + * documentation, if provided along with the Derivative Works; or, + * within a display generated by the Derivative Works, if and + * wherever such third-party notices normally appear. The contents + * of the NOTICE file are for informational purposes only and + * do not modify the License. You may add Your own attribution + * notices within Derivative Works that You distribute, alongside + * or as an addendum to the NOTICE text from the Work, provided + * that such additional attribution notices cannot be construed + * as modifying the License. + * + * You may add Your own copyright statement to Your modifications and + * may provide additional or different license terms and conditions + * for use, reproduction, or distribution of Your modifications, or + * for any such Derivative Works as a whole, provided Your use, + * reproduction, and distribution of the Work otherwise complies with + * the conditions stated in this License. + * + * 5. Submission of Contributions. Unless You explicitly state otherwise, + * any Contribution intentionally submitted for inclusion in the Work + * by You to the Licensor shall be under the terms and conditions of + * this License, without any additional terms or conditions. + * Notwithstanding the above, nothing herein shall supersede or modify + * the terms of any separate license agreement you may have executed + * with Licensor regarding such Contributions. + * + * 6. Trademarks. This License does not grant permission to use the trade + * names, trademarks, service marks, or product names of the Licensor, + * except as required for reasonable and customary use in describing the + * origin of the Work and reproducing the content of the NOTICE file. + * + * 7. Disclaimer of Warranty. Unless required by applicable law or + * agreed to in writing, Licensor provides the Work (and each + * Contributor provides its Contributions) on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied, including, without limitation, any warranties or conditions + * of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + * PARTICULAR PURPOSE. You are solely responsible for determining the + * appropriateness of using or redistributing the Work and assume any + * risks associated with Your exercise of permissions under this License. + * + * 8. Limitation of Liability. In no event and under no legal theory, + * whether in tort (including negligence), contract, or otherwise, + * unless required by applicable law (such as deliberate and grossly + * negligent acts) or agreed to in writing, shall any Contributor be + * liable to You for damages, including any direct, indirect, special, + * incidental, or consequential damages of any character arising as a + * result of this License or out of the use or inability to use the + * Work (including but not limited to damages for loss of goodwill, + * work stoppage, computer failure or malfunction, or any and all + * other commercial damages or losses), even if such Contributor + * has been advised of the possibility of such damages. + * + * 9. Accepting Warranty or Additional Liability. While redistributing + * the Work or Derivative Works thereof, You may choose to offer, + * and charge a fee for, acceptance of support, warranty, indemnity, + * or other liability obligations and/or rights consistent with this + * License. However, in accepting such obligations, You may act only + * on Your own behalf and on Your sole responsibility, not on behalf + * of any other Contributor, and only if You agree to indemnify, + * defend, and hold each Contributor harmless for any liability + * incurred by, or claims asserted against, such Contributor by reason + * of your accepting any such warranty or additional liability. + * + * END OF TERMS AND CONDITIONS + * + * APPENDIX: How to apply the Apache License to your work. + * + * To apply the Apache License to your work, attach the following + * boilerplate notice, with the fields enclosed by brackets "[]" + * replaced with your own identifying information. (Don't include + * the brackets!) The text should be enclosed in the appropriate + * comment syntax for the file format. We also recommend that a + * file or class name and description of purpose be included on the + * same "printed page" as the copyright notice for easier + * identification within third-party archives. + * + * Copyright [yyyy] [name of copyright owner] + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/************************************** *********************************/ +/*************************** BSD 3-clause "New" or "Revised" License ************************/ +/************************************** *********************************/ +/* ============================================================================================ + * + * Copyright (c) , + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +/************************************** *********************************/ +/********************** GNU Lesser General Public License v2.1 or later ********************/ +/************************************** *********************************/ +/* ============================================================================================ + * GNU Lesser General Public License v2.1 or later + * * FCKeditor - CKEditor + * -------------------------------------------------------------------------------------------- + * Software License Agreement + * ========================== + * + * CKEditor - The text editor for Internet - http://ckeditor.com + * Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * (See Appendix A) + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * (See Appendix B) + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * (See Appendix C) + * + * You are not required to, but if you want to explicitly declare the + * license you have chosen to be bound to when using, reproducing, + * modifying and distributing this software, just include a text file + * titled "legal.txt" in your version of this software, indicating your + * license choice. In any case, your choice will not restrict any + * recipient of your version of this software to use, reproduce, modify + * and distribute this software under any of the above licenses. + * + * Sources of Intellectual Property Included in CKEditor + * -------------------------------------------------------------------------------------------- + * + * Where not otherwise indicated, all CKEditor content is authored by + * CKSource engineers and consists of CKSource-owned intellectual + * property. In some specific instances, CKEditor will incorporate work + * done by developers outside of CKSource with their express permission. + * + * Trademarks + * -------------------------------------------------------------------------------------------- + * + * CKEditor is a trademark of CKSource - Frederico Knabben. All other brand + * and product names are trademarks, registered trademarks or service + * marks of their respective holders. + * + * ============================================================================================ + * GNU LESSER GENERAL PUBLIC LICENSE + * Version 2.1, February 1999 + * + * Copyright (C) 1991, 1999 Free Software Foundation, Inc. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Everyone is permitted to copy and distribute verbatim copies + * of this license document, but changing it is not allowed. + * + * [This is the first released version of the Lesser GPL. It also counts + * as the successor of the GNU Library Public License, version 2, hence + * the version number 2.1.] + * + * Preamble + * + * The licenses for most software are designed to take away your + * freedom to share and change it. By contrast, the GNU General Public + * Licenses are intended to guarantee your freedom to share and change + * free software--to make sure the software is free for all its users. + * + * This license, the Lesser General Public License, applies to some + * specially designated software packages--typically libraries--of the + * Free Software Foundation and other authors who decide to use it. You + * can use it too, but we suggest you first think carefully about whether + * this license or the ordinary General Public License is the better + * strategy to use in any particular case, based on the explanations below. + * + * When we speak of free software, we are referring to freedom of use, + * not price. Our General Public Licenses are designed to make sure that + * you have the freedom to distribute copies of free software (and charge + * for this service if you wish); that you receive source code or can get + * it if you want it; that you can change the software and use pieces of + * it in new free programs; and that you are informed that you can do + * these things. + * + * To protect your rights, we need to make restrictions that forbid + * distributors to deny you these rights or to ask you to surrender these + * rights. These restrictions translate to certain responsibilities for + * you if you distribute copies of the library or if you modify it. + * + * For example, if you distribute copies of the library, whether gratis + * or for a fee, you must give the recipients all the rights that we gave + * you. You must make sure that they, too, receive or can get the source + * code. If you link other code with the library, you must provide + * complete object files to the recipients, so that they can relink them + * with the library after making changes to the library and recompiling + * it. And you must show them these terms so they know their rights. + * + * We protect your rights with a two-step method: (1) we copyright the + * library, and (2) we offer you this license, which gives you legal + * permission to copy, distribute and/or modify the library. + * + * To protect each distributor, we want to make it very clear that + * there is no warranty for the free library. Also, if the library is + * modified by someone else and passed on, the recipients should know + * that what they have is not the original version, so that the original + * author's reputation will not be affected by problems that might be + * introduced by others. + * + * Finally, software patents pose a constant threat to the existence of + * any free program. We wish to make sure that a company cannot + * effectively restrict the users of a free program by obtaining a + * restrictive license from a patent holder. Therefore, we insist that + * any patent license obtained for a version of the library must be + * consistent with the full freedom of use specified in this license. + * + * Most GNU software, including some libraries, is covered by the + * ordinary GNU General Public License. This license, the GNU Lesser + * General Public License, applies to certain designated libraries, and + * is quite different from the ordinary General Public License. We use + * this license for certain libraries in order to permit linking those + * libraries into non-free programs. + * + * When a program is linked with a library, whether statically or using + * a shared library, the combination of the two is legally speaking a + * combined work, a derivative of the original library. The ordinary + * General Public License therefore permits such linking only if the + * entire combination fits its criteria of freedom. The Lesser General + * Public License permits more lax criteria for linking other code with + * the library. + * + * We call this license the "Lesser" General Public License because it + * does Less to protect the user's freedom than the ordinary General + * Public License. It also provides other free software developers Less + * of an advantage over competing non-free programs. These disadvantages + * are the reason we use the ordinary General Public License for many + * libraries. However, the Lesser license provides advantages in certain + * special circumstances. + * + * For example, on rare occasions, there may be a special need to + * encourage the widest possible use of a certain library, so that it becomes + * a de-facto standard. To achieve this, non-free programs must be + * allowed to use the library. A more frequent case is that a free + * library does the same job as widely used non-free libraries. In this + * case, there is little to gain by limiting the free library to free + * software only, so we use the Lesser General Public License. + * + * In other cases, permission to use a particular library in non-free + * programs enables a greater number of people to use a large body of + * free software. For example, permission to use the GNU C Library in + * non-free programs enables many more people to use the whole GNU + * operating system, as well as its variant, the GNU/Linux operating + * system. + * + * Although the Lesser General Public License is Less protective of the + * users' freedom, it does ensure that the user of a program that is + * linked with the Library has the freedom and the wherewithal to run + * that program using a modified version of the Library. + * + * The precise terms and conditions for copying, distribution and + * modification follow. Pay close attention to the difference between a + * "work based on the library" and a "work that uses the library". The + * former contains code derived from the library, whereas the latter must + * be combined with the library in order to run. + * + * GNU LESSER GENERAL PUBLIC LICENSE + * TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + * + * 0. This License Agreement applies to any software library or other + * program which contains a notice placed by the copyright holder or + * other authorized party saying it may be distributed under the terms of + * this Lesser General Public License (also called "this License"). + * Each licensee is addressed as "you". + * + * A "library" means a collection of software functions and/or data + * prepared so as to be conveniently linked with application programs + * (which use some of those functions and data) to form executables. + * + * The "Library", below, refers to any such software library or work + * which has been distributed under these terms. A "work based on the + * Library" means either the Library or any derivative work under + * copyright law: that is to say, a work containing the Library or a + * portion of it, either verbatim or with modifications and/or translated + * straightforwardly into another language. (Hereinafter, translation is + * included without limitation in the term "modification".) + * + * "Source code" for a work means the preferred form of the work for + * making modifications to it. For a library, complete source code means + * all the source code for all modules it contains, plus any associated + * interface definition files, plus the scripts used to control compilation + * and installation of the library. + * + * Activities other than copying, distribution and modification are not + * covered by this License; they are outside its scope. The act of + * running a program using the Library is not restricted, and output from + * such a program is covered only if its contents constitute a work based + * on the Library (independent of the use of the Library in a tool for + * writing it). Whether that is true depends on what the Library does + * and what the program that uses the Library does. + * + * 1. You may copy and distribute verbatim copies of the Library's + * complete source code as you receive it, in any medium, provided that + * you conspicuously and appropriately publish on each copy an + * appropriate copyright notice and disclaimer of warranty; keep intact + * all the notices that refer to this License and to the absence of any + * warranty; and distribute a copy of this License along with the + * Library. + * + * You may charge a fee for the physical act of transferring a copy, + * and you may at your option offer warranty protection in exchange for a + * fee. + * + * 2. You may modify your copy or copies of the Library or any portion + * of it, thus forming a work based on the Library, and copy and + * distribute such modifications or work under the terms of Section 1 + * above, provided that you also meet all of these conditions: + * + * a) The modified work must itself be a software library. + * + * b) You must cause the files modified to carry prominent notices + * stating that you changed the files and the date of any change. + * + * c) You must cause the whole of the work to be licensed at no + * charge to all third parties under the terms of this License. + * + * d) If a facility in the modified Library refers to a function or a + * table of data to be supplied by an application program that uses + * the facility, other than as an argument passed when the facility + * is invoked, then you must make a good faith effort to ensure that, + * in the event an application does not supply such function or + * table, the facility still operates, and performs whatever part of + * its purpose remains meaningful. + * + * (For example, a function in a library to compute square roots has + * a purpose that is entirely well-defined independent of the + * application. Therefore, Subsection 2d requires that any + * application-supplied function or table used by this function must + * be optional: if the application does not supply it, the square + * root function must still compute square roots.) + * + * These requirements apply to the modified work as a whole. If + * identifiable sections of that work are not derived from the Library, + * and can be reasonably considered independent and separate works in + * themselves, then this License, and its terms, do not apply to those + * sections when you distribute them as separate works. But when you + * distribute the same sections as part of a whole which is a work based + * on the Library, the distribution of the whole must be on the terms of + * this License, whose permissions for other licensees extend to the + * entire whole, and thus to each and every part regardless of who wrote + * it. + * + * Thus, it is not the intent of this section to claim rights or contest + * your rights to work written entirely by you; rather, the intent is to + * exercise the right to control the distribution of derivative or + * collective works based on the Library. + * + * In addition, mere aggregation of another work not based on the Library + * with the Library (or with a work based on the Library) on a volume of + * a storage or distribution medium does not bring the other work under + * the scope of this License. + * + * 3. You may opt to apply the terms of the ordinary GNU General Public + * License instead of this License to a given copy of the Library. To do + * this, you must alter all the notices that refer to this License, so + * that they refer to the ordinary GNU General Public License, version 2, + * instead of to this License. (If a newer version than version 2 of the + * ordinary GNU General Public License has appeared, then you can specify + * that version instead if you wish.) Do not make any other change in + * these notices. + * + * Once this change is made in a given copy, it is irreversible for + * that copy, so the ordinary GNU General Public License applies to all + * subsequent copies and derivative works made from that copy. + * + * This option is useful when you wish to copy part of the code of + * the Library into a program that is not a library. + * + * 4. You may copy and distribute the Library (or a portion or + * derivative of it, under Section 2) in object code or executable form + * under the terms of Sections 1 and 2 above provided that you accompany + * it with the complete corresponding machine-readable source code, which + * must be distributed under the terms of Sections 1 and 2 above on a + * medium customarily used for software interchange. + * + * If distribution of object code is made by offering access to copy + * from a designated place, then offering equivalent access to copy the + * source code from the same place satisfies the requirement to + * distribute the source code, even though third parties are not + * compelled to copy the source along with the object code. + * + * 5. A program that contains no derivative of any portion of the + * Library, but is designed to work with the Library by being compiled or + * linked with it, is called a "work that uses the Library". Such a + * work, in isolation, is not a derivative work of the Library, and + * therefore falls outside the scope of this License. + * + * However, linking a "work that uses the Library" with the Library + * creates an executable that is a derivative of the Library (because it + * contains portions of the Library), rather than a "work that uses the + * library". The executable is therefore covered by this License. + * Section 6 states terms for distribution of such executables. + * + * When a "work that uses the Library" uses material from a header file + * that is part of the Library, the object code for the work may be a + * derivative work of the Library even though the source code is not. + * Whether this is true is especially significant if the work can be + * linked without the Library, or if the work is itself a library. The + * threshold for this to be true is not precisely defined by law. + * + * If such an object file uses only numerical parameters, data + * structure layouts and accessors, and small macros and small inline + * functions (ten lines or less in length), then the use of the object + * file is unrestricted, regardless of whether it is legally a derivative + * work. (Executables containing this object code plus portions of the + * Library will still fall under Section 6.) + * + * Otherwise, if the work is a derivative of the Library, you may + * distribute the object code for the work under the terms of Section 6. + * Any executables containing that work also fall under Section 6, + * whether or not they are linked directly with the Library itself. + * + * 6. As an exception to the Sections above, you may also combine or + * link a "work that uses the Library" with the Library to produce a + * work containing portions of the Library, and distribute that work + * under terms of your choice, provided that the terms permit + * modification of the work for the customer's own use and reverse + * engineering for debugging such modifications. + * + * You must give prominent notice with each copy of the work that the + * Library is used in it and that the Library and its use are covered by + * this License. You must supply a copy of this License. If the work + * during execution displays copyright notices, you must include the + * copyright notice for the Library among them, as well as a reference + * directing the user to the copy of this License. Also, you must do one + * of these things: + * + * a) Accompany the work with the complete corresponding + * machine-readable source code for the Library including whatever + * changes were used in the work (which must be distributed under + * Sections 1 and 2 above); and, if the work is an executable linked + * with the Library, with the complete machine-readable "work that + * uses the Library", as object code and/or source code, so that the + * user can modify the Library and then relink to produce a modified + * executable containing the modified Library. (It is understood + * that the user who changes the contents of definitions files in the + * Library will not necessarily be able to recompile the application + * to use the modified definitions.) + * + * b) Use a suitable shared library mechanism for linking with the + * Library. A suitable mechanism is one that (1) uses at run time a + * copy of the library already present on the user's computer system, + * rather than copying library functions into the executable, and (2) + * will operate properly with a modified version of the library, if + * the user installs one, as long as the modified version is + * interface-compatible with the version that the work was made with. + * + * c) Accompany the work with a written offer, valid for at + * least three years, to give the same user the materials + * specified in Subsection 6a, above, for a charge no more + * than the cost of performing this distribution. + * + * d) If distribution of the work is made by offering access to copy + * from a designated place, offer equivalent access to copy the above + * specified materials from the same place. + * + * e) Verify that the user has already received a copy of these + * materials or that you have already sent this user a copy. + * + * For an executable, the required form of the "work that uses the + * Library" must include any data and utility programs needed for + * reproducing the executable from it. However, as a special exception, + * the materials to be distributed need not include anything that is + * normally distributed (in either source or binary form) with the major + * components (compiler, kernel, and so on) of the operating system on + * which the executable runs, unless that component itself accompanies + * the executable. + * + * It may happen that this requirement contradicts the license + * restrictions of other proprietary libraries that do not normally + * accompany the operating system. Such a contradiction means you cannot + * use both them and the Library together in an executable that you + * distribute. + * + * 7. You may place library facilities that are a work based on the + * Library side-by-side in a single library together with other library + * facilities not covered by this License, and distribute such a combined + * library, provided that the separate distribution of the work based on + * the Library and of the other library facilities is otherwise + * permitted, and provided that you do these two things: + * + * a) Accompany the combined library with a copy of the same work + * based on the Library, uncombined with any other library + * facilities. This must be distributed under the terms of the + * Sections above. + * + * b) Give prominent notice with the combined library of the fact + * that part of it is a work based on the Library, and explaining + * where to find the accompanying uncombined form of the same work. + * + * 8. You may not copy, modify, sublicense, link with, or distribute + * the Library except as expressly provided under this License. Any + * attempt otherwise to copy, modify, sublicense, link with, or + * distribute the Library is void, and will automatically terminate your + * rights under this License. However, parties who have received copies, + * or rights, from you under this License will not have their licenses + * terminated so long as such parties remain in full compliance. + * + * 9. You are not required to accept this License, since you have not + * signed it. However, nothing else grants you permission to modify or + * distribute the Library or its derivative works. These actions are + * prohibited by law if you do not accept this License. Therefore, by + * modifying or distributing the Library (or any work based on the + * Library), you indicate your acceptance of this License to do so, and + * all its terms and conditions for copying, distributing or modifying + * the Library or works based on it. + * + * 10. Each time you redistribute the Library (or any work based on the + * Library), the recipient automatically receives a license from the + * original licensor to copy, distribute, link with or modify the Library + * subject to these terms and conditions. You may not impose any further + * restrictions on the recipients' exercise of the rights granted herein. + * You are not responsible for enforcing compliance by third parties with + * this License. + * + * 11. If, as a consequence of a court judgment or allegation of patent + * infringement or for any other reason (not limited to patent issues), + * conditions are imposed on you (whether by court order, agreement or + * otherwise) that contradict the conditions of this License, they do not + * excuse you from the conditions of this License. If you cannot + * distribute so as to satisfy simultaneously your obligations under this + * License and any other pertinent obligations, then as a consequence you + * may not distribute the Library at all. For example, if a patent + * license would not permit royalty-free redistribution of the Library by + * all those who receive copies directly or indirectly through you, then + * the only way you could satisfy both it and this License would be to + * refrain entirely from distribution of the Library. + * + * If any portion of this section is held invalid or unenforceable under any + * particular circumstance, the balance of the section is intended to apply, + * and the section as a whole is intended to apply in other circumstances. + * + * It is not the purpose of this section to induce you to infringe any + * patents or other property right claims or to contest validity of any + * such claims; this section has the sole purpose of protecting the + * integrity of the free software distribution system which is + * implemented by public license practices. Many people have made + * generous contributions to the wide range of software distributed + * through that system in reliance on consistent application of that + * system; it is up to the author/donor to decide if he or she is willing + * to distribute software through any other system and a licensee cannot + * impose that choice. + * + * This section is intended to make thoroughly clear what is believed to + * be a consequence of the rest of this License. + * + * 12. If the distribution and/or use of the Library is restricted in + * certain countries either by patents or by copyrighted interfaces, the + * original copyright holder who places the Library under this License may add + * an explicit geographical distribution limitation excluding those countries, + * so that distribution is permitted only in or among countries not thus + * excluded. In such case, this License incorporates the limitation as if + * written in the body of this License. + * + * 13. The Free Software Foundation may publish revised and/or new + * versions of the Lesser 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 Library + * specifies a version number of this License which applies to it and + * "any later version", you have the option of following the terms and + * conditions either of that version or of any later version published by + * the Free Software Foundation. If the Library does not specify a + * license version number, you may choose any version ever published by + * the Free Software Foundation. + * + * 14. If you wish to incorporate parts of the Library into other free + * programs whose distribution conditions are incompatible with these, + * write to the author to ask for permission. For software which is + * copyrighted by the Free Software Foundation, write to the Free + * Software Foundation; we sometimes make exceptions for this. Our + * decision will be guided by the two goals of preserving the free status + * of all derivatives of our free software and of promoting the sharing + * and reuse of software generally. + * + * NO WARRANTY + * + * 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO + * WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. + * EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR + * OTHER PARTIES PROVIDE THE LIBRARY "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 + * LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME + * THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + * + * 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + * WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY + * AND/OR REDISTRIBUTE THE LIBRARY 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 + * LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF + * SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGES. + * + * END OF TERMS AND CONDITIONS + * + * How to Apply These Terms to Your New Libraries + * + * If you develop a new library, and you want it to be of the greatest + * possible use to the public, we recommend making it free software that + * everyone can redistribute and change. You can do so by permitting + * redistribution under these terms (or, alternatively, under the terms of the + * ordinary General Public License). + * + * To apply these terms, attach the following notices to the library. It is + * safest to attach them to the start of each source file to most effectively + * convey the exclusion of warranty; and each file should have at least the + * "copyright" line and a pointer to where the full notice is found. + * + * + * Copyright (C) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Also add information on how to contact you by electronic and paper mail. + * + * You should also get your employer (if you work as a programmer) or your + * school, if any, to sign a "copyright disclaimer" for the library, if + * necessary. Here is a sample; alter the names: + * + * Yoyodyne, Inc., hereby disclaims all copyright interest in the + * library `Frob' (a library for tweaking knobs) written by James Random Hacker. + * + * , 1 April 1990 + * Ty Coon, President of Vice + * + * That's all there is to it! + * + * + */ +/************************************** *********************************/ +/************************************** htmlArea License *********************************/ +/************************************** *********************************/ +/* ============================================================================================ + * This license is based on the BSD license. + * + * htmlArea License (based on BSD license) + * Copyright (c) 2002-2004, interactivetools.com, inc. + * Copyright (c) 2003-2005 dynarch.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1) Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2) Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3) Neither the name of interactivetools.com, inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +/************************************** *********************************/ +/************************************** JSON License *********************************/ +/************************************** *********************************/ +/* ============================================================================================ + * Copyright (c) 2002 JSON.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is furnished + * to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * The Software shall be used for Good, not Evil. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ +/************************************** *********************************/ +/************************************** MIT License *********************************/ +/************************************** *********************************/ +/* ============================================================================================ + * The MIT License (MIT) + * Copyright (c) + * + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * + */ +/************************************** *********************************/ +/*************** Oracle Technology Network Development and Distribution License *************/ +/************************************** *********************************/ +/* ============================================================================================ + * Oracle Technology Network License Agreement + * + * Oracle is willing to authorize Your access to software associated with this License Agreement (“Agreement”) only upon the condition that You accept that this Agreement governs Your use of the software. By selecting the “Accept License Agreement” button or box (or the equivalent) or installing or using the Programs You indicate Your acceptance of this Agreement and Your agreement, as an authorized representative of Your company or organization (if being acquired for use by an entity) or as an individual, to comply with the license terms that apply to the software that You wish to download and access. If You are not willing to be bound by this Agreement, do not select the “Accept License Agreement” button or box (or the equivalent) and do not download or access the software. + * + * Definitions + * "Oracle" refers to Oracle America, Inc. "You" and "Your" refers to (a) a company or organization (each an “Entity”) accessing the Programs, if use of the Programs will be on behalf of such Entity; or (b) an individual accessing the Programs, if use of the Programs will not be on behalf of an Entity. “Contractors” refers to Your agents and contractors (including, without limitation, outsourcers). "Program(s)" refers to Oracle software provided by Oracle pursuant to this Agreement and any updates, error corrections, and/or Program Documentation provided by Oracle. “Program Documentation” refers to Program user manuals and Program installation manuals, if any. If available, Program Documentation may be delivered with the Programs and/or may be accessed from www.oracle.com/documentation. “Associated Product” refers to the Oracle product(s), if any, and as identified in the Programs documentation or on the Programs download site, with which the Programs are intended to enable or enhance interoperation with Your application(s). “Separate Terms” refers to separate license terms that are specified in the Program Documentation, readmes or notice files and that apply to Separately Licensed Third Party Technology. “Separately Licensed Third Party Technology” refers to third party technology that is licensed under Separate Terms and not under the terms of this Agreement. + * + * License Rights and Restrictions + * Oracle grants You a nonexclusive, nontransferable, limited license to, subject to the restrictions stated in this Agreement, (a) internally use the Programs solely for the purposes of developing, testing, prototyping and demonstrating Your applications, and running the Programs for Your own internal business operations; and (b) redistribute unmodified Programs and Programs Documentation pursuant to the Programs Redistribution section below. You may allow Your Contractor(s) to use the Programs, provided they are acting on Your behalf to exercise license rights granted in this Agreement and further provided that You are responsible for their compliance with this Agreement in such use. You will have a written agreement with Your Contractor(s) that strictly limits their right to use the Programs and that otherwise protects Oracle’s intellectual property rights to the same extent as this Agreement. You may make copies of the Programs to the extent reasonably necessary to exercise the license rights granted in this Agreement. You may make one copy of the Programs for backup purposes. + * + * Further, You may not: + * + * remove or modify any Program markings or any notice of Oracle’s or a licensor’s proprietary rights; + * use the Programs to provide third party training unless Oracle expressly authorizes such use on the Program’s download page; + * assign this Agreement or distribute, give, or transfer the Programs or an interest in them to any third party, except as expressly permitted in this Agreement (the foregoing shall not be construed to limit the rights You may otherwise have with respect to Separately Licensed Third Party Technology); + * cause or permit reverse engineering (unless required by law for interoperability), disassembly or decompilation of the Programs; and + * disclose results of any Program benchmark tests without Oracle’s prior consent. + * The Programs may contain source code that, unless expressly licensed in this Agreement for other purposes (for example, licensed under an open source license), is provided solely for reference purposes pursuant to the terms of this Agreement and may not be modified. + * + * All rights not expressly granted in this Agreement are reserved by Oracle. If You want to use the Programs or Your application for any purpose other than as expressly permitted under this Agreement, You must obtain from Oracle or an Oracle reseller a valid Programs license under a separate agreement permitting such use. However, You acknowledge that the Programs may not be intended for production use and/or Oracle may not make a version of the Programs available for production or other purposes; any development or other work You undertake with the Programs is at Your sole risk. + * + * Programs Redistribution + * We grant You a nonexclusive, nontransferable right to copy and distribute unmodified Programs and Programs Documentation as part of and included in Your application that is intended to interoperate with the Associated Product, if any, provided that You do not charge Your end users any additional fees for the use of the Programs. Prior to distributing the Programs and Programs Documentation, You shall require Your end users to execute an agreement binding them to terms, with respect to the Programs and Programs Documentation, materially consistent and no less restrictive than those contained in this section and the sections of this Agreement entitled “License Rights and Restrictions” (except that the redistribution right granted to You shall not be included; Your end users may not distribute Programs and Programs Documentation to any third parties), "Ownership," "Export Controls," "Disclaimer of Warranties; Limitation of Liability," "No Technical Support" (with respect to Oracle support; You may provide Your own support for Programs at Your discretion), "Audit; Termination (except that Oracle’s audit right shall not be included)," "Relationship Between the Parties," and “U.S. Government End Users.” You must also include a provision stating that Your end users shall have no right to distribute the Programs and Programs Documentation, and a provision specifying us as a third party beneficiary of the agreement. You are responsible for obtaining these agreements with Your end users. + * + * You agree to: (a) defend and indemnify us against all claims and damages caused by Your distribution of the Programs and Programs Documentation in breach of this Agreement and/or failure to include the required contractual provisions in Your end user agreement as stated above; (b) keep executed end user agreements and records of end user information including name, address, date of distribution and identity of Programs distributed; (c) allow us to inspect Your end user agreements and records upon request; and, (d) enforce the terms of Your end user agreements so as to effect a timely cure of any end user breach, and to notify us of any breach of the terms. + * + * Ownership + * Oracle or its licensors retain all ownership and intellectual property rights to the Programs. + * + * Third-Party Technology + * The Programs may contain or require the use of third party technology that is provided with the Programs. Oracle may provide certain notices to You in Program Documentation, readmes or notice files in connection with such third party technology. Third party technology will be licensed to You either under the terms of this Agreement or, if specified in the Program Documentation, readmes or notice files, under Separate Terms. Your rights to use Separately Licensed Third Party Technology under Separate Terms are not restricted in any way by this Agreement. However, for clarity, notwithstanding the existence of a notice, third party technology that is not Separately Licensed Third Party Technology shall be deemed part of the Programs and is licensed to You under the terms of this Agreement. + * + * Source Code for Open Source Software + * For software that You receive from Oracle in binary form that is licensed under an open source license that gives You the right to receive the source code for that binary, You can obtain a copy of the applicable source code from https://oss.oracle.com/sources/ or http://www.oracle.com/goto/opensourcecode. If the source code for such software was not provided to You with the binary, You can also receive a copy of the source code on physical media by submitting a written request pursuant to the instructions in the "Written Offer for Source Code" section of the latter website. + * + * Export Controls + * Export laws and regulations of the United States and any other relevant local export laws and regulations apply to the Programs . You agree that such export control laws govern Your use of the Programs (including technical data) and any services deliverables provided under this agreement, and You agree to comply with all such export laws and regulations (including "deemed export" and "deemed re-export" regulations). You agree that no data, information, program and/or materials resulting from Programs or services (or direct products thereof) will be exported, directly or indirectly, in violation of these laws, or will be used for any purpose prohibited by these laws including, without limitation, nuclear, chemical, or biological weapons proliferation, or development of missile technology. Accordingly, You confirm: + * + * You will not download, provide, make available or otherwise export or re-export the Programs, directly or indirectly, to countries prohibited by applicable laws and regulations nor to citizens, nationals or residents of those countries. + * You are not listed on the United States Department of Treasury lists of Specially Designated Nationals and Blocked Persons, Specially Designated Terrorists, and Specially Designated Narcotic Traffickers, nor are You listed on the United States Department of Commerce Table of Denial Orders. + * You will not download or otherwise export or re-export the Programs, directly or indirectly, to persons on the above mentioned lists. + * You will not use the Programs for, and will not allow the Programs to be used for, any purposes prohibited by applicable law, including, without limitation, for the development, design, manufacture or production of nuclear, chemical or biological weapons of mass destruction. + * Information Collection + * The Programs’ installation and/or auto-update processes, if any, may transmit a limited amount of data to Oracle or its service provider about those processes to help Oracle understand and optimize them. Oracle does not associate the data with personally identifiable information. Refer to Oracle’s Privacy Policy at www.oracle.com/privacy. + * + * Disclaimer of Warranties; Limitation of Liability + * + * THE PROGRAMS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ORACLE FURTHER DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT . + * + * IN NO EVENT WILL ORACLE BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA OR DATA USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, EVEN IF ORACLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ORACLE’S ENTIRE LIABILITY FOR DAMAGES UNDER THIS AGREEMENT SHALL IN NO EVENT EXCEED ONE THOUSAND DOLLARS (U.S. $1,000) . + * + * No Technical Support + * Unless Oracle support for the Programs, if any, is expressly included in a separate, current support agreement between You and Oracle, Oracle’s technical support organization will not provide technical support, phone support, or updates to You for the Programs provided under this Agreement. + * + * Audit; Termination + * Oracle may audit Your use of the Programs. You may terminate this Agreement by destroying all copies of the Programs. This Agreement shall automatically terminate without notice if You fail to comply with any of the terms of this Agreement, in which case You shall promptly destroy all copies of the Programs. + * + * U.S. Government End Users + * Programs and/or Programs Documentation delivered to U.S. Government end users are “commercial computer software” pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs and/or Programs Documentation shall be subject to the license terms and license restrictions set forth in this Agreement. No other rights are granted to the U.S. Government. + * + * Relationship Between the Parties + * Oracle is an independent contractor and we agree that no partnership, joint venture, or agency relationship exists between us. We each will be responsible for paying our own employees, including employment related taxes and insurance.. Nothing in this agreement shall be construed to limit either party's right to independently develop or distribute software that is functionally similar to the other party's products, so long as proprietary information of the other party is not included in such software. + * + * Entire Agreement; Governing Law + * You agree that this Agreement is the complete agreement for the Programs and this Agreement supersedes all prior or contemporaneous agreements or representations, including any clickwrap, shrinkwrap or similar licenses, or license agreements for prior versions of the Programs. This Agreement may not be modified and the rights and restrictions may not be altered or waived except in a writing signed by authorized representatives of You and of Oracle. If any term of this Agreement is found to be invalid or unenforceable, the remaining provisions will remain effective. + * + * This Agreement is governed by the substantive and procedural laws of the State of California, USA, and You and Oracle agree to submit to the exclusive jurisdiction of, and venue in, the courts of San Francisco or Santa Clara counties in California in any dispute arising out of or relating to this Agreement. + * + * Notices + * Should you have any questions concerning this License Agreement, or if you desire to contact Oracle for any reason, please write: + * + * Oracle America, Inc. + * 500 Oracle Parkway + * Redwood City, CA 94065 + * + * Oracle Employees: Under no circumstances are Oracle Employees authorized to download software for the purpose of distributing it to customers. Oracle products are available to employees for internal use or demonstration purposes only. In keeping with Oracle's trade compliance obligations under U.S. and applicable multilateral law, failure to comply with this policy could result in disciplinary action up to and including termination. + * + * Last updated: 30 November 2016 + * + */ \ No newline at end of file diff --git a/src/main/webapp/META-INF/license b/src/main/webapp/META-INF/license new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/src/main/webapp/META-INF/license @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/main/webapp/META-INF/readme b/src/main/webapp/META-INF/readme new file mode 100644 index 0000000..ac8bb2f --- /dev/null +++ b/src/main/webapp/META-INF/readme @@ -0,0 +1,18 @@ +Copyright <2014> "전자정부 표준프레임워크" + +전자정부 표준프레임워크 공통컴포넌트는 +아래와 같은 라이선스를 적용받는 오픈소스 소프트웨어를 기반으로 만들어졌습니다. + +Apache License 2.0 +BSD 3-clause "New" or "Revised" License +GNU Lesser General Public License v2.1 or later +htmlArea License +JSON License +MIT License +Oracle Technology Network Development and Distribution License + + +전자정부 표준프레임워크 공통컴포넌트를 수정 혹은 확장한 2차적 저작물을 사용하거나 배포하여 발생하는 모든 손해나 법적 문제에 대해 +전자정부 표준프레임워크의 저작권자는 일체의 책임을 지지 않습니다. + +전자정부 표준프레임워크 공통컴포넌트에 사용된 오픈 소스소프트웨어의 라이선스는 OSSLicenses 파일을 참조하십시오 diff --git a/src/main/webapp/WEB-INF/config/egovframework/springmvc/egov-com-servlet.xml b/src/main/webapp/WEB-INF/config/egovframework/springmvc/egov-com-servlet.xml new file mode 100644 index 0000000..cc4ca36 --- /dev/null +++ b/src/main/webapp/WEB-INF/config/egovframework/springmvc/egov-com-servlet.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + cmm/error/dataAccessFailure + cmm/error/transactionFailure + cmm/error/accessDenied + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/lib/CACheck.jar_ b/src/main/webapp/WEB-INF/lib/CACheck.jar_ new file mode 100644 index 0000000..3e7e903 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/CACheck.jar_ differ diff --git a/src/main/webapp/WEB-INF/lib/CACheck_custom.jar b/src/main/webapp/WEB-INF/lib/CACheck_custom.jar new file mode 100644 index 0000000..dfcb362 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/CACheck_custom.jar differ diff --git a/src/main/webapp/WEB-INF/lib/ClipReport4.0-1.0.0.217.jar b/src/main/webapp/WEB-INF/lib/ClipReport4.0-1.0.0.217.jar new file mode 100644 index 0000000..627e600 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/ClipReport4.0-1.0.0.217.jar differ diff --git a/src/main/webapp/WEB-INF/lib/ClipReport4.0-Common.jar b/src/main/webapp/WEB-INF/lib/ClipReport4.0-Common.jar new file mode 100644 index 0000000..301a1a5 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/ClipReport4.0-Common.jar differ diff --git a/src/main/webapp/WEB-INF/lib/NiceID.jar b/src/main/webapp/WEB-INF/lib/NiceID.jar new file mode 100644 index 0000000..abd2d17 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/NiceID.jar differ diff --git a/src/main/webapp/WEB-INF/lib/VNOInterop.jar_ b/src/main/webapp/WEB-INF/lib/VNOInterop.jar_ new file mode 100644 index 0000000..d46f04b Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/VNOInterop.jar_ differ diff --git a/src/main/webapp/WEB-INF/lib/VNOInterop_custom.jar b/src/main/webapp/WEB-INF/lib/VNOInterop_custom.jar new file mode 100644 index 0000000..3ff6f42 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/VNOInterop_custom.jar differ diff --git a/src/main/webapp/WEB-INF/lib/batik-all-1.7.1-20150510.jar b/src/main/webapp/WEB-INF/lib/batik-all-1.7.1-20150510.jar new file mode 100644 index 0000000..2dac2b5 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/batik-all-1.7.1-20150510.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jai_codec-1.1.3.jar b/src/main/webapp/WEB-INF/lib/jai_codec-1.1.3.jar new file mode 100644 index 0000000..056ecd3 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jai_codec-1.1.3.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jai_core-1.1.3.jar b/src/main/webapp/WEB-INF/lib/jai_core-1.1.3.jar new file mode 100644 index 0000000..b29b8ee Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jai_core-1.1.3.jar differ diff --git a/src/main/webapp/WEB-INF/lib/pdf-transcoder-1.0beta2.jar b/src/main/webapp/WEB-INF/lib/pdf-transcoder-1.0beta2.jar new file mode 100644 index 0000000..5476969 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/pdf-transcoder-1.0beta2.jar differ diff --git a/src/main/webapp/WEB-INF/lib/tibero6-jdbc.jar b/src/main/webapp/WEB-INF/lib/tibero6-jdbc.jar new file mode 100644 index 0000000..d9ae951 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/tibero6-jdbc.jar differ diff --git a/src/main/webapp/WEB-INF/lib/websquare_5.0_3.3643B.20190521.175836_1.5.jar b/src/main/webapp/WEB-INF/lib/websquare_5.0_3.3643B.20190521.175836_1.5.jar new file mode 100644 index 0000000..2e0b032 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/websquare_5.0_3.3643B.20190521.175836_1.5.jar differ diff --git a/src/main/webapp/WEB-INF/lib/xbean.jar b/src/main/webapp/WEB-INF/lib/xbean.jar new file mode 100644 index 0000000..0c64f66 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/xbean.jar differ diff --git a/src/main/webapp/WEB-INF/lib/xmlbeans_xpath-2.4.0.jar b/src/main/webapp/WEB-INF/lib/xmlbeans_xpath-2.4.0.jar new file mode 100644 index 0000000..0f05f0b Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/xmlbeans_xpath-2.4.0.jar differ diff --git a/src/main/webapp/WEB-INF/views/juso/Sample.jsp b/src/main/webapp/WEB-INF/views/juso/Sample.jsp new file mode 100644 index 0000000..e188a58 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/juso/Sample.jsp @@ -0,0 +1,93 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + +주소 입력 샘플 + + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
도로명주소 전체(포멧)
도로명주소
고객입력 상세주소
참고주소
영문 도로명주소
지번
우편번호
행정구역코드
도로명코드
건물관리번호
상세번물명
건물명
공동주택여부
시도명
시군구명
읍면동명
법정리명
도로명
지하여부
건물본번
건물부번
산여부
지번본번(번지)
지번부번(호)
읍면동일련번호
+
+ +
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/juso/jusoPopup.jsp b/src/main/webapp/WEB-INF/views/juso/jusoPopup.jsp new file mode 100644 index 0000000..c5966ef --- /dev/null +++ b/src/main/webapp/WEB-INF/views/juso/jusoPopup.jsp @@ -0,0 +1,79 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + 주소찾기 + <%--<% + //request.setCharacterEncoding("UTF-8"); //한글깨지면 주석제거 + //request.setCharacterEncoding("EUC-KR"); //해당시스템의 인코딩타입이 EUC-KR일경우에 + String inputYn = request.getParameter("inputYn"); + String roadFullAddr = request.getParameter("roadFullAddr"); + String roadAddrPart1 = request.getParameter("roadAddrPart1"); + String roadAddrPart2 = request.getParameter("roadAddrPart2"); + String engAddr = request.getParameter("engAddr"); + String jibunAddr = request.getParameter("jibunAddr"); + String zipNo = request.getParameter("zipNo"); + String addrDetail = request.getParameter("addrDetail"); + String admCd = request.getParameter("admCd"); + String rnMgtSn = request.getParameter("rnMgtSn"); + String bdMgtSn = request.getParameter("bdMgtSn"); + String detBdNmList = request.getParameter("detBdNmList"); + /** 2017년 2월 추가제공 **/ + String bdNm = request.getParameter("bdNm"); + String bdKdcd = request.getParameter("bdKdcd"); + String siNm = request.getParameter("siNm"); + String sggNm = request.getParameter("sggNm"); + String emdNm = request.getParameter("emdNm"); + String liNm = request.getParameter("liNm"); + String rn = request.getParameter("rn"); + String udrtYn = request.getParameter("udrtYn"); + String buldMnnm = request.getParameter("buldMnnm"); + String buldSlno = request.getParameter("buldSlno"); + String mtYn = request.getParameter("mtYn"); + String lnbrMnnm = request.getParameter("lnbrMnnm"); + String lnbrSlno = request.getParameter("lnbrSlno"); + /** 2017년 3월 추가제공 **/ + String emdNo = request.getParameter("emdNo"); + %>--%> + + + +
+ + + + + + +
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/nice/credit/checkplus_fail.jsp b/src/main/webapp/WEB-INF/views/nice/credit/checkplus_fail.jsp new file mode 100644 index 0000000..d956e2d --- /dev/null +++ b/src/main/webapp/WEB-INF/views/nice/credit/checkplus_fail.jsp @@ -0,0 +1,132 @@ +<%@ page language="java" contentType="text/html;charset=euc-kr" %> + +<% + NiceID.Check.CPClient niceCheck = new NiceID.Check.CPClient(); + + String sEncodeData = requestReplace(request.getParameter("EncodeData"), "encodeData"); + + String sSiteCode = "BO815"; // NICEκ ο Ʈ ڵ + String sSitePassword = "aSs33dfqwXFY"; // NICEκ ο Ʈ н + + String sCipherTime = ""; // ȣȭ ð + String sRequestNumber = ""; // û ȣ + String sErrorCode = ""; // ڵ + String sAuthType = ""; // + String sMessage = ""; + String sPlainData = ""; + + int iReturn = niceCheck.fnDecode(sSiteCode, sSitePassword, sEncodeData); + + if( iReturn == 0 ) + { + sPlainData = niceCheck.getPlainData(); + sCipherTime = niceCheck.getCipherDateTime(); + + // Ÿ մϴ. + java.util.HashMap mapresult = niceCheck.fnParse(sPlainData); + + sRequestNumber = (String)mapresult.get("REQ_SEQ"); + sErrorCode = (String)mapresult.get("ERR_CODE"); + sAuthType = (String)mapresult.get("AUTH_TYPE"); + } + else if( iReturn == -1) + { + sMessage = "ȣȭ ý Դϴ."; + } + else if( iReturn == -4) + { + sMessage = "ȣȭ óԴϴ."; + } + else if( iReturn == -5) + { + sMessage = "ȣȭ ؽ Դϴ."; + } + else if( iReturn == -6) + { + sMessage = "ȣȭ Դϴ."; + } + else if( iReturn == -9) + { + sMessage = "Է Դϴ."; + } + else if( iReturn == -12) + { + sMessage = "Ʈ н Դϴ."; + } + else + { + sMessage = "˼ Դϴ. iReturn : " + iReturn; + } + +%> +<%! +public String requestReplace (String paramValue, String gubun) { + String result = ""; + + if (paramValue != null) { + + paramValue = paramValue.replaceAll("<", "<").replaceAll(">", ">"); + + paramValue = paramValue.replaceAll("\\*", ""); + paramValue = paramValue.replaceAll("\\?", ""); + paramValue = paramValue.replaceAll("\\[", ""); + paramValue = paramValue.replaceAll("\\{", ""); + paramValue = paramValue.replaceAll("\\(", ""); + paramValue = paramValue.replaceAll("\\)", ""); + paramValue = paramValue.replaceAll("\\^", ""); + paramValue = paramValue.replaceAll("\\$", ""); + paramValue = paramValue.replaceAll("'", ""); + paramValue = paramValue.replaceAll("@", ""); + paramValue = paramValue.replaceAll("%", ""); + paramValue = paramValue.replaceAll(";", ""); + paramValue = paramValue.replaceAll(":", ""); + paramValue = paramValue.replaceAll("-", ""); + paramValue = paramValue.replaceAll("#", ""); + paramValue = paramValue.replaceAll("--", ""); + paramValue = paramValue.replaceAll("-", ""); + paramValue = paramValue.replaceAll(",", ""); + + if(gubun != "encodeData"){ + paramValue = paramValue.replaceAll("\\+", ""); + paramValue = paramValue.replaceAll("/", ""); + paramValue = paramValue.replaceAll("=", ""); + } + + result = paramValue; + + } + return result; + } + +%> + + + + NICE - CheckPlus Ƚɺ ׽Ʈ + + +
+

+ Ͽϴ.
+ + + + + + + + + + + + + + + + + +
ȣȭ ð<%= sCipherTime %> (YYMMDDHHMMSS)
û ȣ<%= sRequestNumber %>
ڵ<%= sErrorCode %>
<%= sAuthType %>


+ <%= sMessage %>
+

+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/nice/credit/checkplus_main.jsp b/src/main/webapp/WEB-INF/views/nice/credit/checkplus_main.jsp new file mode 100644 index 0000000..c2c69ad --- /dev/null +++ b/src/main/webapp/WEB-INF/views/nice/credit/checkplus_main.jsp @@ -0,0 +1,94 @@ +<%@ page language="java" contentType="text/html;charset=euc-kr" %> + +<% + NiceID.Check.CPClient niceCheck = new NiceID.Check.CPClient(); + + String sSiteCode = "BO815"; // NICEκ ο Ʈ ڵ + String sSitePassword = "aSs33dfqwXFY"; // NICEκ ο Ʈ н + + String sRequestNumber = "REQ0000000001"; // û ȣ, ̴ /Ŀ ǵְ ǹǷ + // ü ϰ Ͽ ų, Ʒ Ѵ. + sRequestNumber = niceCheck.getRequestNO(sSiteCode); + session.setAttribute("REQ_SEQ" , sRequestNumber); // ŷ Ͽ ٸ, ǿ ûȣ ִ´. + + String sAuthType = "C"; // ⺻ ȭ, M: ڵ, C: ſī, X: + + String popgubun = "N"; //Y : ҹư / N : ҹư + String customize = ""; // ⺻ / Mobile : + + String sGender = ""; // ⺻ , 0 : , 1 : + + // CheckPlus() ó , Ÿ ޱ http Էմϴ. + //url ȣϱ url ؾ մϴ. ex) url : http://www.~ url : http://www.~ + //String sReturnUrl = "http://www.test.co.kr/checkplus_success.jsp"; // ̵ URL + //String sErrorUrl = "http://www.test.co.kr/checkplus_fail.jsp"; // н ̵ URL + String sReturnUrl = "http://localhost:8080/check/credit/success.do"; // ̵ URL + String sErrorUrl = "http://localhost:8080/check/credit/fail.do"; // н ̵ URL + // Էµ plain Ÿ . + String sPlainData = "7:REQ_SEQ" + sRequestNumber.getBytes().length + ":" + sRequestNumber + + "8:SITECODE" + sSiteCode.getBytes().length + ":" + sSiteCode + + "9:AUTH_TYPE" + sAuthType.getBytes().length + ":" + sAuthType + + "7:RTN_URL" + sReturnUrl.getBytes().length + ":" + sReturnUrl + + "7:ERR_URL" + sErrorUrl.getBytes().length + ":" + sErrorUrl + + "11:POPUP_GUBUN" + popgubun.getBytes().length + ":" + popgubun + + "9:CUSTOMIZE" + customize.getBytes().length + ":" + customize + + "6:GENDER" + sGender.getBytes().length + ":" + sGender; + + String sMessage = ""; + String sEncData = ""; + + int iReturn = niceCheck.fnEncode(sSiteCode, sSitePassword, sPlainData); + if( iReturn == 0 ) + { + sEncData = niceCheck.getCipherData(); + } + else if( iReturn == -1) + { + sMessage = "ȣȭ ý Դϴ."; + } + else if( iReturn == -2) + { + sMessage = "ȣȭ óԴϴ."; + } + else if( iReturn == -3) + { + sMessage = "ȣȭ Դϴ."; + } + else if( iReturn == -9) + { + sMessage = "Է Դϴ."; + } + else + { + sMessage = "˼ Դϴ. iReturn : " + iReturn; + } +%> + + + + NICE - CheckPlus Ƚɺ ׽Ʈ + + + + + <%= sMessage %>

+ ü ȣȭ Ÿ : [<%= sEncData %>]

+ + +
+ + + + CheckPlus Ƚɺ Click +
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/nice/credit/checkplus_success.jsp b/src/main/webapp/WEB-INF/views/nice/credit/checkplus_success.jsp new file mode 100644 index 0000000..b47a174 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/nice/credit/checkplus_success.jsp @@ -0,0 +1,194 @@ +<%@ page language="java" contentType="text/html;charset=euc-kr" %> + +<% // null κ ڿ ٶϴ. + NiceID.Check.CPClient niceCheck = new NiceID.Check.CPClient(); + + String sEncodeData = requestReplace(request.getParameter("EncodeData"), "encodeData"); + + String sSiteCode = "BO815"; // NICEκ ο Ʈ ڵ + String sSitePassword = "aSs33dfqwXFY"; // NICEκ ο Ʈ н + + String sCipherTime = ""; // ȣȭ ð + String sRequestNumber = ""; // û ȣ + String sResponseNumber = ""; // ȣ + String sAuthType = ""; // + String sName = ""; // + String sDupInfo = ""; // ߺ Ȯΰ (DI_64 byte) + String sConnInfo = ""; // Ȯΰ (CI_88 byte) + String sBirthDate = ""; // (YYYYMMDD) + String sGender = ""; // + String sNationalInfo = ""; // /ܱ (̵߰ ) + String sMobileNo = ""; // ޴ȣ + String sMobileCo = ""; // Ż + String sMessage = ""; + String sPlainData = ""; + + int iReturn = niceCheck.fnDecode(sSiteCode, sSitePassword, sEncodeData); + + if( iReturn == 0 ) + { + sPlainData = niceCheck.getPlainData(); + sCipherTime = niceCheck.getCipherDateTime(); + + // Ÿ մϴ. + java.util.HashMap mapresult = niceCheck.fnParse(sPlainData); + + sRequestNumber = (String)mapresult.get("REQ_SEQ"); + sResponseNumber = (String)mapresult.get("RES_SEQ"); + sAuthType = (String)mapresult.get("AUTH_TYPE"); + sName = (String)mapresult.get("NAME"); + //sName = (String)mapresult.get("UTF8_NAME"); //charset utf8 ּ + sBirthDate = (String)mapresult.get("BIRTHDATE"); + sGender = (String)mapresult.get("GENDER"); + sNationalInfo = (String)mapresult.get("NATIONALINFO"); + sDupInfo = (String)mapresult.get("DI"); + sConnInfo = (String)mapresult.get("CI"); + sMobileNo = (String)mapresult.get("MOBILE_NO"); + sMobileCo = (String)mapresult.get("MOBILE_CO"); + + String session_sRequestNumber = (String)session.getAttribute("REQ_SEQ"); + if(!sRequestNumber.equals(session_sRequestNumber)) + { + sMessage = "ǰ ٸϴ. ùٸ η Ͻñ ٶϴ."; + sResponseNumber = ""; + sAuthType = ""; + } + } + else if( iReturn == -1) + { + sMessage = "ȣȭ ý Դϴ."; + } + else if( iReturn == -4) + { + sMessage = "ȣȭ óԴϴ."; + } + else if( iReturn == -5) + { + sMessage = "ȣȭ ؽ Դϴ."; + } + else if( iReturn == -6) + { + sMessage = "ȣȭ Դϴ."; + } + else if( iReturn == -9) + { + sMessage = "Է Դϴ."; + } + else if( iReturn == -12) + { + sMessage = "Ʈ н Դϴ."; + } + else + { + sMessage = "˼ Դϴ. iReturn : " + iReturn; + } + +%> +<%! + + public String requestReplace (String paramValue, String gubun) { + + String result = ""; + + if (paramValue != null) { + + paramValue = paramValue.replaceAll("<", "<").replaceAll(">", ">"); + + paramValue = paramValue.replaceAll("\\*", ""); + paramValue = paramValue.replaceAll("\\?", ""); + paramValue = paramValue.replaceAll("\\[", ""); + paramValue = paramValue.replaceAll("\\{", ""); + paramValue = paramValue.replaceAll("\\(", ""); + paramValue = paramValue.replaceAll("\\)", ""); + paramValue = paramValue.replaceAll("\\^", ""); + paramValue = paramValue.replaceAll("\\$", ""); + paramValue = paramValue.replaceAll("'", ""); + paramValue = paramValue.replaceAll("@", ""); + paramValue = paramValue.replaceAll("%", ""); + paramValue = paramValue.replaceAll(";", ""); + paramValue = paramValue.replaceAll(":", ""); + paramValue = paramValue.replaceAll("-", ""); + paramValue = paramValue.replaceAll("#", ""); + paramValue = paramValue.replaceAll("--", ""); + paramValue = paramValue.replaceAll("-", ""); + paramValue = paramValue.replaceAll(",", ""); + + if(gubun != "encodeData"){ + paramValue = paramValue.replaceAll("\\+", ""); + paramValue = paramValue.replaceAll("/", ""); + paramValue = paramValue.replaceAll("=", ""); + } + + result = paramValue; + + } + return result; + } +%> + + + + NICE - CheckPlus Ƚɺ ׽Ʈ + + +
+

+ Ϸ Ǿϴ.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ȣȭ ð<%= sCipherTime %> (YYMMDDHHMMSS)
û ȣ<%= sRequestNumber %>
NICE ȣ<%= sResponseNumber %>
<%= sAuthType %>
<%= sName %>
ߺ Ȯΰ(DI)<%= sDupInfo %>
Ȯΰ(CI)<%= sConnInfo %>
(YYYYMMDD)<%= sBirthDate %>
<%= sGender %>
<%= sNationalInfo %>
޴ȣ<%= sMobileNo %>
Ż<%= sMobileCo %>
Ϲ ֽϴ.
+ Ϻ null ϵǴ Ǵ μ(02-2122-4615) ǹٶϴ.


+ <%= sMessage %>
+

+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/nice/phone/checkplus_fail.jsp b/src/main/webapp/WEB-INF/views/nice/phone/checkplus_fail.jsp new file mode 100644 index 0000000..2d9ca77 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/nice/phone/checkplus_fail.jsp @@ -0,0 +1,132 @@ +<%@ page language="java" contentType="text/html;charset=euc-kr" %> + +<% + NiceID.Check.CPClient niceCheck = new NiceID.Check.CPClient(); + + String sEncodeData = requestReplace(request.getParameter("EncodeData"), "encodeData"); + + String sSiteCode = "BO814"; // NICEκ ο Ʈ ڵ + String sSitePassword = "V61T17LvnrxW"; // NICEκ ο Ʈ н + + String sCipherTime = ""; // ȣȭ ð + String sRequestNumber = ""; // û ȣ + String sErrorCode = ""; // ڵ + String sAuthType = ""; // + String sMessage = ""; + String sPlainData = ""; + + int iReturn = niceCheck.fnDecode(sSiteCode, sSitePassword, sEncodeData); + + if( iReturn == 0 ) + { + sPlainData = niceCheck.getPlainData(); + sCipherTime = niceCheck.getCipherDateTime(); + + // Ÿ մϴ. + java.util.HashMap mapresult = niceCheck.fnParse(sPlainData); + + sRequestNumber = (String)mapresult.get("REQ_SEQ"); + sErrorCode = (String)mapresult.get("ERR_CODE"); + sAuthType = (String)mapresult.get("AUTH_TYPE"); + } + else if( iReturn == -1) + { + sMessage = "ȣȭ ý Դϴ."; + } + else if( iReturn == -4) + { + sMessage = "ȣȭ óԴϴ."; + } + else if( iReturn == -5) + { + sMessage = "ȣȭ ؽ Դϴ."; + } + else if( iReturn == -6) + { + sMessage = "ȣȭ Դϴ."; + } + else if( iReturn == -9) + { + sMessage = "Է Դϴ."; + } + else if( iReturn == -12) + { + sMessage = "Ʈ н Դϴ."; + } + else + { + sMessage = "˼ Դϴ. iReturn : " + iReturn; + } + +%> +<%! +public String requestReplace (String paramValue, String gubun) { + String result = ""; + + if (paramValue != null) { + + paramValue = paramValue.replaceAll("<", "<").replaceAll(">", ">"); + + paramValue = paramValue.replaceAll("\\*", ""); + paramValue = paramValue.replaceAll("\\?", ""); + paramValue = paramValue.replaceAll("\\[", ""); + paramValue = paramValue.replaceAll("\\{", ""); + paramValue = paramValue.replaceAll("\\(", ""); + paramValue = paramValue.replaceAll("\\)", ""); + paramValue = paramValue.replaceAll("\\^", ""); + paramValue = paramValue.replaceAll("\\$", ""); + paramValue = paramValue.replaceAll("'", ""); + paramValue = paramValue.replaceAll("@", ""); + paramValue = paramValue.replaceAll("%", ""); + paramValue = paramValue.replaceAll(";", ""); + paramValue = paramValue.replaceAll(":", ""); + paramValue = paramValue.replaceAll("-", ""); + paramValue = paramValue.replaceAll("#", ""); + paramValue = paramValue.replaceAll("--", ""); + paramValue = paramValue.replaceAll("-", ""); + paramValue = paramValue.replaceAll(",", ""); + + if(gubun != "encodeData"){ + paramValue = paramValue.replaceAll("\\+", ""); + paramValue = paramValue.replaceAll("/", ""); + paramValue = paramValue.replaceAll("=", ""); + } + + result = paramValue; + + } + return result; + } + +%> + + + + NICE - CheckPlus Ƚɺ ׽Ʈ + + +
+

+ Ͽϴ.
+ + + + + + + + + + + + + + + + + +
ȣȭ ð<%= sCipherTime %> (YYMMDDHHMMSS)
û ȣ<%= sRequestNumber %>
ڵ<%= sErrorCode %>
<%= sAuthType %>


+ <%= sMessage %>
+

+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/nice/phone/checkplus_main.jsp b/src/main/webapp/WEB-INF/views/nice/phone/checkplus_main.jsp new file mode 100644 index 0000000..ca291c9 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/nice/phone/checkplus_main.jsp @@ -0,0 +1,94 @@ +<%@ page language="java" contentType="text/html;charset=euc-kr" %> + +<% + NiceID.Check.CPClient niceCheck = new NiceID.Check.CPClient(); + + String sSiteCode = "BO814"; // NICEκ ο Ʈ ڵ + String sSitePassword = "V61T17LvnrxW"; // NICEκ ο Ʈ н + + String sRequestNumber = "REQ0000000001"; // û ȣ, ̴ /Ŀ ǵְ ǹǷ + // ü ϰ Ͽ ų, Ʒ Ѵ. + sRequestNumber = niceCheck.getRequestNO(sSiteCode); + session.setAttribute("REQ_SEQ" , sRequestNumber); // ŷ Ͽ ٸ, ǿ ûȣ ִ´. + + String sAuthType = "M"; // ⺻ ȭ, M: ڵ, C: ſī, X: + + String popgubun = "N"; //Y : ҹư / N : ҹư + String customize = ""; // ⺻ / Mobile : + + String sGender = ""; // ⺻ , 0 : , 1 : + + // CheckPlus() ó , Ÿ ޱ http Էմϴ. + //url ȣϱ url ؾ մϴ. ex) url : http://www.~ url : http://www.~ + //String sReturnUrl = "http://www.test.co.kr/checkplus_success.jsp"; // ̵ URL + //String sErrorUrl = "http://www.test.co.kr/checkplus_fail.jsp"; // н ̵ URL + String sReturnUrl = "http://localhost:8080/check/phone/success.do"; // ̵ URL + String sErrorUrl = "http://localhost:8080/check/phone/fail.do"; // н ̵ URL + // Էµ plain Ÿ . + String sPlainData = "7:REQ_SEQ" + sRequestNumber.getBytes().length + ":" + sRequestNumber + + "8:SITECODE" + sSiteCode.getBytes().length + ":" + sSiteCode + + "9:AUTH_TYPE" + sAuthType.getBytes().length + ":" + sAuthType + + "7:RTN_URL" + sReturnUrl.getBytes().length + ":" + sReturnUrl + + "7:ERR_URL" + sErrorUrl.getBytes().length + ":" + sErrorUrl + + "11:POPUP_GUBUN" + popgubun.getBytes().length + ":" + popgubun + + "9:CUSTOMIZE" + customize.getBytes().length + ":" + customize + + "6:GENDER" + sGender.getBytes().length + ":" + sGender; + + String sMessage = ""; + String sEncData = ""; + + int iReturn = niceCheck.fnEncode(sSiteCode, sSitePassword, sPlainData); + if( iReturn == 0 ) + { + sEncData = niceCheck.getCipherData(); + } + else if( iReturn == -1) + { + sMessage = "ȣȭ ý Դϴ."; + } + else if( iReturn == -2) + { + sMessage = "ȣȭ óԴϴ."; + } + else if( iReturn == -3) + { + sMessage = "ȣȭ Դϴ."; + } + else if( iReturn == -9) + { + sMessage = "Է Դϴ."; + } + else + { + sMessage = "˼ Դϴ. iReturn : " + iReturn; + } +%> + + + + NICE - CheckPlus Ƚɺ ׽Ʈ + + + + + <%= sMessage %>

+ ü ȣȭ Ÿ : [<%= sEncData %>]

+ + +
+ + + + CheckPlus Ƚɺ Click +
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/nice/phone/checkplus_success.jsp b/src/main/webapp/WEB-INF/views/nice/phone/checkplus_success.jsp new file mode 100644 index 0000000..42a0a46 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/nice/phone/checkplus_success.jsp @@ -0,0 +1,194 @@ +<%@ page language="java" contentType="text/html;charset=euc-kr" %> + +<% // null κ ڿ ٶϴ. + NiceID.Check.CPClient niceCheck = new NiceID.Check.CPClient(); + + String sEncodeData = requestReplace(request.getParameter("EncodeData"), "encodeData"); + + String sSiteCode = "BO814"; // NICEκ ο Ʈ ڵ + String sSitePassword = "V61T17LvnrxW"; // NICEκ ο Ʈ н + + String sCipherTime = ""; // ȣȭ ð + String sRequestNumber = ""; // û ȣ + String sResponseNumber = ""; // ȣ + String sAuthType = ""; // + String sName = ""; // + String sDupInfo = ""; // ߺ Ȯΰ (DI_64 byte) + String sConnInfo = ""; // Ȯΰ (CI_88 byte) + String sBirthDate = ""; // (YYYYMMDD) + String sGender = ""; // + String sNationalInfo = ""; // /ܱ (̵߰ ) + String sMobileNo = ""; // ޴ȣ + String sMobileCo = ""; // Ż + String sMessage = ""; + String sPlainData = ""; + + int iReturn = niceCheck.fnDecode(sSiteCode, sSitePassword, sEncodeData); + + if( iReturn == 0 ) + { + sPlainData = niceCheck.getPlainData(); + sCipherTime = niceCheck.getCipherDateTime(); + + // Ÿ մϴ. + java.util.HashMap mapresult = niceCheck.fnParse(sPlainData); + + sRequestNumber = (String)mapresult.get("REQ_SEQ"); + sResponseNumber = (String)mapresult.get("RES_SEQ"); + sAuthType = (String)mapresult.get("AUTH_TYPE"); + sName = (String)mapresult.get("NAME"); + //sName = (String)mapresult.get("UTF8_NAME"); //charset utf8 ּ + sBirthDate = (String)mapresult.get("BIRTHDATE"); + sGender = (String)mapresult.get("GENDER"); + sNationalInfo = (String)mapresult.get("NATIONALINFO"); + sDupInfo = (String)mapresult.get("DI"); + sConnInfo = (String)mapresult.get("CI"); + sMobileNo = (String)mapresult.get("MOBILE_NO"); + sMobileCo = (String)mapresult.get("MOBILE_CO"); + + String session_sRequestNumber = (String)session.getAttribute("REQ_SEQ"); + if(!sRequestNumber.equals(session_sRequestNumber)) + { + sMessage = "ǰ ٸϴ. ùٸ η Ͻñ ٶϴ."; + sResponseNumber = ""; + sAuthType = ""; + } + } + else if( iReturn == -1) + { + sMessage = "ȣȭ ý Դϴ."; + } + else if( iReturn == -4) + { + sMessage = "ȣȭ óԴϴ."; + } + else if( iReturn == -5) + { + sMessage = "ȣȭ ؽ Դϴ."; + } + else if( iReturn == -6) + { + sMessage = "ȣȭ Դϴ."; + } + else if( iReturn == -9) + { + sMessage = "Է Դϴ."; + } + else if( iReturn == -12) + { + sMessage = "Ʈ н Դϴ."; + } + else + { + sMessage = "˼ Դϴ. iReturn : " + iReturn; + } + +%> +<%! + + public String requestReplace (String paramValue, String gubun) { + + String result = ""; + + if (paramValue != null) { + + paramValue = paramValue.replaceAll("<", "<").replaceAll(">", ">"); + + paramValue = paramValue.replaceAll("\\*", ""); + paramValue = paramValue.replaceAll("\\?", ""); + paramValue = paramValue.replaceAll("\\[", ""); + paramValue = paramValue.replaceAll("\\{", ""); + paramValue = paramValue.replaceAll("\\(", ""); + paramValue = paramValue.replaceAll("\\)", ""); + paramValue = paramValue.replaceAll("\\^", ""); + paramValue = paramValue.replaceAll("\\$", ""); + paramValue = paramValue.replaceAll("'", ""); + paramValue = paramValue.replaceAll("@", ""); + paramValue = paramValue.replaceAll("%", ""); + paramValue = paramValue.replaceAll(";", ""); + paramValue = paramValue.replaceAll(":", ""); + paramValue = paramValue.replaceAll("-", ""); + paramValue = paramValue.replaceAll("#", ""); + paramValue = paramValue.replaceAll("--", ""); + paramValue = paramValue.replaceAll("-", ""); + paramValue = paramValue.replaceAll(",", ""); + + if(gubun != "encodeData"){ + paramValue = paramValue.replaceAll("\\+", ""); + paramValue = paramValue.replaceAll("/", ""); + paramValue = paramValue.replaceAll("=", ""); + } + + result = paramValue; + + } + return result; + } +%> + + + + NICE - CheckPlus Ƚɺ ׽Ʈ + + +
+

+ Ϸ Ǿϴ.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ȣȭ ð<%= sCipherTime %> (YYMMDDHHMMSS)
û ȣ<%= sRequestNumber %>
NICE ȣ<%= sResponseNumber %>
<%= sAuthType %>
<%= sName %>
ߺ Ȯΰ(DI)<%= sDupInfo %>
Ȯΰ(CI)<%= sConnInfo %>
(YYYYMMDD)<%= sBirthDate %>
<%= sGender %>
<%= sNationalInfo %>
޴ȣ<%= sMobileNo %>
Ż<%= sMobileCo %>
Ϲ ֽϴ.
+ Ϻ null ϵǴ Ǵ μ(02-2122-4615) ǹٶϴ.


+ <%= sMessage %>
+

+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/websquare/I18N.jsp b/src/main/webapp/WEB-INF/views/websquare/I18N.jsp new file mode 100644 index 0000000..182f6d7 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/websquare/I18N.jsp @@ -0,0 +1,108 @@ +<%@ page contentType="text/xml; charset=UTF-8" language="java" errorPage="" import="java.io.*,java.math.*,java.net.*,java.security.*,java.text.*,java.util.*,java.util.zip.*,javax.servlet.http.*,org.w3c.dom.*,websquare.i18n.*,websquare.logging.*,websquare.util.*,websquare.logging.util.LogUtil" +%><% + HTTPContext frameworkContext = null; + + try { + frameworkContext = HTTPContext.getContext(); + frameworkContext.setWebInfo(request, response, null, null ); + String w2xPath = HttpUtil.getParameter( request, "w2xPath" ); + + if( FileValidUtil.getInstance().isValidFullPath( w2xPath ) ) { //경로 유효성 검사 + //컨텍스트가 /인 경우 blank.xml만 baseURI 참조를 하고 있지 않아 코드 추가 + String result = null; + try{ + result = Web2FileCache.getInstance().getXML(request); + }catch(ParseException ffe){ + result = ""; + } + if ( w2xPath != null && !w2xPath.equals("") && result != null && !result.equals("") ) { + OutputStream os = null; + try { + byte[] bytes = result.getBytes("UTF-8"); + MessageDigest md = null; + try { + md = MessageDigest.getInstance("SHA-256"); + md.update(result.getBytes()); + byte[] messageDigest = md.digest(bytes); + BigInteger number = new BigInteger(1, messageDigest); + StringBuffer sb = new StringBuffer('0'); + sb.append("\""); + sb.append(number.toString(16)); + sb.append("\""); + String ETAG = sb.toString(); + String previousETAG = request.getHeader("If-None-Match"); + + if (previousETAG != null && ETAG != null) { + if (ETAG.equals(previousETAG)) { + response.setStatus(HttpServletResponse.SC_NOT_MODIFIED); + return; + } + } + response.setHeader("ETag", sb.toString() ); + } catch (NoSuchAlgorithmException e) { + LogUtil.exception("[I18N.jsp] MessageDigest Exception.", e); + } + + boolean compressed = true; + String ae = request.getHeader("Accept-Encoding"); + if (ae != null && ae.indexOf("gzip") != -1) { // 압축 가능 여부 판단 + compressed = true; + } + + if (compressed) { + ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); + OutputStream zipOut = new GZIPOutputStream(byteOut); + try{ + zipOut.write(bytes, 0, bytes.length); + zipOut.flush(); + }catch(IOException e){ + Logger.exception("[I18N.jsp] IOException.", e); + }finally{ + zipOut.close(); + } + + byteOut.flush(); + bytes = byteOut.toByteArray(); + response.setHeader("Content-Encoding", "gzip"); + } + + SimpleDateFormat formatter = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); + Calendar cal = Calendar.getInstance(); + cal.add(Calendar.YEAR, 1); + cal.add(Calendar.DATE, -1); + formatter.setTimeZone(TimeZone.getTimeZone("GMT")); + String expires = formatter.format(cal.getTime()); + response.setHeader("Expires", expires); + response.setHeader("Last-Modified", expires); + response.setHeader("Cache-Control", "public, max-age=31449600"); // 31449600 + + response.setContentLength(bytes.length); + os = response.getOutputStream(); + os.write(bytes,0,bytes.length); + } catch (IOException e) { + throw e; + } finally { + try { + os.flush(); + } catch( IOException e ) { + LogUtil.exception("[I18N.jsp] OutputStream flush Exception.", e); + } + try { + os.close(); + } catch( IOException e ) { + LogUtil.exception("[I18N.jsp] OutputStream close Exception.", e); + } + } + } else { + response.setStatus(HttpServletResponse.SC_NOT_FOUND); + return; + } + } + } catch (FileNotFoundException e1) { + LogUtil.exception("[I18N.jsp] FileNotFoundException Exception.", e1); + } catch (IOException e) { + LogUtil.exception("[I18N.jsp] IOException.", e); + } finally { + frameworkContext.setWebInfo(null,null,null,null); + } +%> \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/websquare/blank.jsp b/src/main/webapp/WEB-INF/views/websquare/blank.jsp new file mode 100644 index 0000000..e3d78f3 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/websquare/blank.jsp @@ -0,0 +1,18 @@ +<%@page contentType="text/html; charset=utf-8" language="java"%> + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/websquare/websquare.jsp b/src/main/webapp/WEB-INF/views/websquare/websquare.jsp new file mode 100644 index 0000000..8a80db2 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/websquare/websquare.jsp @@ -0,0 +1,58 @@ +<%@page contentType="text/html; charset=utf-8" language="java" %> + + + + + + + + + + + + + <%----%> + 현장장비관리 + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..0f70b90 --- /dev/null +++ b/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,138 @@ + + + 현장장비관리 + + encodingFilter + org.springframework.web.filter.CharacterEncodingFilter + + encoding + utf-8 + + + + encodingFilter + *.do + + + + + HTMLTagFilter + egovframework.rte.ptl.mvc.filter.HTMLTagFilter + + + HTMLTagFilter + *.do + + + + + + contextConfigLocation + + classpath*:egovframework/spring/com/context-*.xml + + + + + org.springframework.web.context.ContextLoaderListener + + + org.springframework.web.context.request.RequestContextListener + + + gtpa.icsmw.util.HttpSessionRenew + + + + + appServlet + org.springframework.web.servlet.DispatcherServlet + + contextConfigLocation + + /WEB-INF/config/egovframework/springmvc/*.xml + + + 1 + + + + appServlet + *.do + + + + + + websquareDispatcher + websquare.http.DefaultRequestDispatcher + + WEBSQUARE_HOME + C:\egov\WORKSPACES\ICSMW\src\main\webapp\WEB-INF\websquare_home + + + + + + + websquareDispatcher + *.wq + + + + + /ws.do + + + BASIC + + + + 60 + + + + + diff --git a/src/main/webapp/WEB-INF/websquare_home/config/websquare.xml b/src/main/webapp/WEB-INF/websquare_home/config/websquare.xml new file mode 100644 index 0000000..84fc23c --- /dev/null +++ b/src/main/webapp/WEB-INF/websquare_home/config/websquare.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + gif, jpg + + + + + + exe, none, jsp + + + + + + + + + + + + + + + + + + + xls,xlsx + + + xls,xlsx + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/websquare_home/license/license b/src/main/webapp/WEB-INF/websquare_home/license/license new file mode 100644 index 0000000..ec3f81e --- /dev/null +++ b/src/main/webapp/WEB-INF/websquare_home/license/license @@ -0,0 +1,3 @@ +XGtyyTTI1MDNQMT1FQlY7PjNRQDJYQUc= +ukPiaRLGv4+8RZzrRfjifeK1elkKh+TrEN29V+xkoPJfiuH4bsFLaWlWrdn32Ohd50qf4ko +Ua7c5hxsjhCJ55yRqXBKpOHPaZueBOE= \ No newline at end of file diff --git a/src/main/webapp/cm/css/common.css b/src/main/webapp/cm/css/common.css new file mode 100644 index 0000000..1fc7af9 --- /dev/null +++ b/src/main/webapp/cm/css/common.css @@ -0,0 +1,381 @@ +@charset "utf-8"; + +@font-face { + font-family: 'NanumBarunGothic'; + font-style: normal; + font-weight: normal; + src:local(Nanum Barun Gothic Regular), + local(Nanum Barun Gothic-Regular), + local(NanumBarunGothic Regular), + local(NanumBarunGothic), + url(../font/NanumBarunGothic.woff) format('woff'); +} + +@font-face { + font-family: 'NanumSquareR'; + font-style: normal; + font-weight: 400; + src: url(../font/NanumSquareR.eot); + src: local('Nanum Square Regular'), + local('NanumSquareR'), + url(../font/NanumSquareR.eot?#iefix) format('embedded-opentype'), + url(../font/NanumSquareR.woff2) format('woff2'), + url(../font/NanumSquareR.woff) format('woff'), + url(../font/NanumSquareR.ttf) format('truetype'); +} + +@font-face { + font-family: 'NanumSquareB'; + font-style: bold; + font-weight: 700; + src: url(../font/NanumSquareB.eot); + src: local('Nanum Square Bold'), + local('NanumSquareB'), + url(../font/NanumSquareB.eot?#iefix) format('embedded-opentype'), + url(../font/NanumSquareB.woff2) format('woff2'), + url(../font/NanumSquareB.woff) format('woff'), + url(../font/NanumSquareB.ttf) format('truetype'); +} + + +input:-ms-input-placeholder{color:#888888;} +input::-moz-input-placeholder{color:#888888;} +input::-webkit-input-placeholder {color:#888888;} +input[type=text]::-ms-clear {display: none;} + + +/* Common */ +html,body{/* overscroll-behavior-y:contain; *//* overflow:hidden; */ /* -webkit-overflow-scrolling:auto; */} +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,input,select,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;} +html,body{width:100%; height:100%; color:#575757; -webkit-text-size-adjust:none; -webkit-touch-callout: none !important; -webkit-user-select: none;} +html,body,pre,select,textarea,input,h1,h2,h3,h4,h5,h6,.w2input{font-size:12px; font-family:Nanum Barun Gothic Regular,NanumBarunGothic,Noto Sans Regular,Verdana,Dotum,Helvetica;} +h1,h2,h3,h4,h5,h6{font-weight:normal;} +img,fieldset{border:0 !important;} +img .inputBtn{vertical-align:middle;} +ul,ol{list-style:none} +em,address{font-style:normal} +em{color:#000;} +table{border-collapse:collapse} +caption, legend{overflow:hidden; width:0; height:0; font-size:0; line-height:0; visibility:hidden;} +pre, .pre{white-space:pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;} +input,input[type=button]{/* -webkit-appearance:none; border-radius:0; */} +input:-webkit-autofill, +input:-webkit-autofill:hover, +input:-webkit-autofill:focus, +input:-webkit-autofill:active{box-shadow:0 0 0 30px white inset !important;-webkit-box-shadow:0 0 0 30px white inset !important;-moz-box-shadow:0 0 0 30px white inset !important;} +.w2anchor2, a{color:inherit;text-decoration:none} +.clear:after{content:""; display:block; clear:both;} +/* .w2modalopenedbody body, .w2modalopenedbody{overflow:hidden;} */ + +/* float버그 높이값 사라짐 처리 */ +.cb:after{display:block;visibility:hidden;clear:both;height:0;font-size:0;line-height:0;content: '.'} + +/* websquare common */ +:focus{outline:none} +.w2group{background:transparent} +.w2textarea{display:block;margin:0}/* 브라우저 margin */ +.w2textarea.resize_auto{resize:auto} +.w2trigger{display:-moz-inline-stack;overflow:visible}/* firefox padding 버그 및 ie padding 버그 */ +.w2selectbox_label{padding-top:0} +.w2radio .w2radio_main, .w2checkbox .w2checkbox_main{width:auto} +/* .w2inputCalendar, .w2inputCalendar_div{position:relative;} +.w2inputCalendar_div{width:100%} */ +/* .w2selectbox_native_select option{text-align:right;} +.w2balloonTip{z-index:1000;} +.w2input_focus{background:transparent} */ + +/* cke_reset cke_chrome cke_editor_wq_uuid_66_ cke_ltr cke_browser_webkit */ + +/* layout - START */ + + +.wrap{width:100%;height:100%;min-width:1000px;} + +.header{width:100%;height:139px; background:url(../../cm/images/temp_header_bg.png) repeat-x;} +.header .header_inner{width:100%;height:139px;min-width:1000px;max-width:1200px;margin:0 auto; background:url(../../cm/images/temp_header.png) no-repeat;} +.container{width:100%;min-width:1000px;max-width:1200px;min-height:450px;margin:0 auto;} +.container .content{padding:20px 0 120px 0;} +.footer{width:100%;height:144px; background:url(../../cm/images/temp_footer_bg.png) repeat-x;} +.footer .footer_inner{min-width:1000px;max-width:1200px;height:144px;margin:0 auto; background:url(../../cm/images/temp_footer.png) no-repeat;} + +.content{padding:20px 10px 120px 10px;/* position:relative;width:100%;height:100%; */} +.content:before, .content:after{display:block;visibility:hidden;clear:both;height:0px;font-size:0;line-height:0;content: '.'} +.content .contarea{margin-top:70px;} +.content .contarea:before, .content .contarea:after{display:block;visibility:hidden;clear:both;height:0px;font-size:0;line-height:0;content: '.'} +/* .content > .contarea:first-child{margin-top:0px;} */ +.overlay{display:none;position:fixed;top:0px;left:0px;right:0px;bottom:0px;z-index:999;opacity:0.7;background-color:#000;} +.overlay.on{display:block;} +/* layout - END */ + + + +/* MOBILE layout - START */ +.m_wrap{width:100%;height:100%;min-width:320px;} +.m_header{width:100%;height:50px;background-color:#0065b2;} +.m_header_inner{position:relative;height:50px;padding:0 50px;z-index:1;background-color:#0065b2;} +.m_header_inner h1{display:block;width:100%;height:100%;font-size:17px;color:#fff;text-align:center;line-height:50px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:url(../../cm/images/m_ico_logo.png) no-repeat center center;background-size:auto 30px;} +/* .m_header_inner .btnback{display:none;position:absolute;top:0;left:0;font-size:0;line-height:0;width:50px;height:50px;background:url(../../cm/images/btn_back.png) no-repeat center center;background-size:50% auto;} */ +.m_header_inner .btnback{display:none;} +.m_header_inner .btnallmenu{position:absolute;top:0;right:0;font-size:0;line-height:0;width:50px;height:50px;background:url(../../cm/images/btn_allmenu.png) no-repeat right 18px center;background-size:18px 12px;} + +.m_container{width:100%;/*min-height:200px;*/min-height:600px;} + +/*모바일 해상도에 따라 컨텐츠 높이 안전 영역 설정*/ +@media all and (max-height:568px){ +/* .main_wrap .main_autofixed{position:fixed;left:0;right:0;bottom:0;top:inherit;} */ + .m_container {min-height:380px;} +} + +@media all and (min-height: 569px) and (max-height:640px){ + .m_container {min-height:450px} +} + +@media all and (min-height: 641px) and (max-height:667px){ + .m_container {min-height:470px} +} + +@media all and (min-height: 668px) and (max-height:736px){ + .m_container {min-height:550px} +} + + +.m_content{position:relative;width:100%;height:auto;} +.m_content .contarea{padding:20px 18px 20px 18px;} +.m_content .contarea + .contarea {padding-top:0;} +.m_content .contarea.bg_gray{padding:18px;} +.m_content .contarea.bg_gray .member_joinbox{margin-top:0px !important;} + +.m_footer{} +.m_fagree{border:1px solid #e0e0e0;border-left:0;border-right:0;box-sizing:border-box;} +.m_fagree .btn_fagree{position:relative;display:inline-block;width:50%;height:42px;line-height:42px;color:#000;text-align:center;} +.m_fagree .btn_fagree:before{content:"";display:block;position:absolute;top:50%;left:0;width:1px;height:18px;margin-top:-9px;background-color:#e0e0e0;} +.m_fagree .btn_fagree:first-child:before{display:none;} +.m_fagree .btn_fagree:first-child{font-weight:bold;border-left:0;} +.m_copyright{text-align:center;padding:20px;font-size:11px;line-height:14px;} +/* MOBILE layout - END */ + +/* allmenu - START */ +.grp_allmenu{z-index:1000;display:none;position:fixed;top:0;right:-260px;width:260px;height:100%;background-color:#fff;} +.grp_allmenu .allmenu_top{height:50px;padding:0 18px;background-color:#0065b2;} +.grp_allmenu .allmenu_top .grp_loginout{float:left;margin-top:18px;} +.grp_allmenu .allmenu_top .grp_loginout a{position:relative;display:inline-block;float:left;margin-left:20px;font-size:13px;color:#fff;} +.grp_allmenu .allmenu_top .grp_loginout a:before{content:"";position:absolute;top:0;left:-10px;display:block;width:1px;height:12px;background-color:#fff;} +.grp_allmenu .allmenu_top .grp_loginout a:first-child{margin-left:0;} +.grp_allmenu .allmenu_top .grp_loginout a:first-child:before{display:none;} +.grp_allmenu .allmenu_top .grp_loginout a:hover{text-decoration:underline;} + +.grp_allmenu .allmenu_top .rightarea{float:right;margin-top:9px;} +.grp_allmenu .allmenu_top .btn_allmenu_home{float:left;width:28px;height:28px;font-size:0;line-height:0;background:url(../../cm/images/btn_allmenu_home.png) no-repeat center center;background-size:20px;} +.grp_allmenu .allmenu_top .btn_allmenu_close{float:left;width:28px;height:28px;margin-left:5px;font-size:0;line-height:0;background:url(../../cm/images/btn_allmenu_close.png) no-repeat center center;background-size:18px;} +.grp_allmenu .allmenu{width:100%;} + +.grp_allmenu .allmenu > li >a{display:block;height:40px;line-height:40px;font-size:13px;font-weight:bold;color:#000;padding:0 18px;border-bottom:1px solid #e0e0e0;box-sizing:border-box;background:url(../../cm/images/ico_allmenu_open.png) no-repeat right 18px center;background-size:5px 8px;} +.grp_allmenu .allmenu > li.selected >a{background:url(../../cm/images/ico_allmenu_close.png) no-repeat right 18px center;background-size:6px 1px;} + +/* .grp_allmenu .allmenu > li >a.selected + ul{display:block !important;} */ +.grp_allmenu .allmenu > li > ul{display:none;border-bottom:1px solid #e0e0e0;box-sizing:border-box;background-color:#f3f3f5;} +.grp_allmenu .allmenu > li > ul > li{} +.grp_allmenu .allmenu > li > ul > li > a{display:block;height:34px;line-height:34px;font-size:12px;color:#000;padding:0 18px;} + +/* allmenu - END */ + + +/* openpop - START */ +.w2modal, .w2modal_popup{background-color:#000;opacity:0.7;/* z-index:8000; */} +.w2window.w2popup_window{border:none;/* z-index:10000; *//* border:1px solid #2f3947;_box-sizing:border-box; */} +.w2window.w2popup_window .w2window_wframe{overflow:hidden;} +.w2window.w2popup_window .w2window_header{height:50px;padding:0px;overflow:visible;border-bottom:1px solid #e0e0e0;/* border-bottom:0; */box-sizing:border-box;background:#fff;} +.w2window.w2popup_window .w2window_header .w2window_header_icon{display:none;} +.w2window.w2popup_window .w2window_header .w2window_header_title{top:15px;left:15px;right:15px;width:auto;height:auto;padding:0;color:#000;/* font-weight:normal; */font-size:16px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +.w2window.w2popup_window .w2window_header .w2window_header_control{width:40px;height:40px;} +.w2window.w2popup_window .w2window_header .w2window_close, +.w2window.w2popup_window .w2window_header .w2window_close_user{display:block;width:20px;height:20px;top:-30px;left:auto;right:0;font-size:0;line-height:0;background:url(../../cm/images/btn_popup_close_white.png) no-repeat center center;background-size:100% auto;} +.w2window.w2popup_window .w2window_body{top:50px;padding:0px;background-color:#fff;} +.w2window.w2popup_window .w2window_body .w2window_content{border:none;left:0px;right:0px;bottom:0px;} +.w2window.w2popup_window .w2window_body .poparea > .content{overflow:hidden;overflow-y:auto;width:100%;/* height:100%; */height:auto;padding-bottom:45px;} +.w2window.w2popup_window{} +/* openpop - END */ + + + +/* text decoration - START */ +.tdu{text-decoration:underline !important} +.ellip{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +.tal{text-align:left !important;} +.tar{text-align:right !important;} +.tac{text-align:center !important;} +.fs10{font-size:10px !important;} +.fs11{font-size:11px !important;} +.fs12{font-size:12px !important;} +.fs13{font-size:13px !important;} +.fs14{font-size:14px !important;} +.fs15{font-size:15px !important;} +.fs16{font-size:16px !important;} +.fs17{font-size:17px !important;} +.fs18{font-size:18px !important;} +.fs19{font-size:19px !important;} +.fs20{font-size:20px !important;} +.fs21{font-size:21px !important;} +.fs22{font-size:22px !important;} +.fs23{font-size:23px !important;} +.fs24{font-size:24px !important;} +.fs25{font-size:25px !important;} +.fs26{font-size:26px !important;} +.fs27{font-size:27px !important;} +.fs28{font-size:28px !important;} +.fs29{font-size:29px !important;} +.fs30{font-size:30px !important;} +.fc_green{color:#0065b2 !important;} +.fc_black{color:#000 !important;} +.fc_red{color:#c42012 !important;} +.fc_blue{color:#0065b2 !important;} +.fwb{font-weight:bold !important;} +.fwn{font-weight:normal !important;} +.f_vd{font-family:verdana;} +/* text decoration - END */ + +/* form deco - START */ +.fl{float:left !important} +.fr{float:right !important} +.nofl *{float:none !important;} +.fln{float:none !important;} +.dib{display:inline-block !important;} +.din{display:inline !important;} +.dbl{display:block !important;} +.bdno{border:none !important;} +.blno{border-left:none !important;} +.brno{border-right:none !important;} +.bbno{border-bottom:none !important;} +.btno{border-top:none !important;} +.bt{border-top:1px solid #e5e8eb;} +.bb{border-bottom:1px solid #e5e8eb;} +.bl{border-left:1px solid #e5e8eb;} +.br{border-right:1px solid #e5e8eb;} +.rel{display:relative;} +.tablecell{display:table;width:100%;} +.tablecell .cell{vertical-align:middle;display:table-cell;} +.vat{vertical-align:top !important;} +.vam{vertical-align:middle !important;} +.vab{vertical-align:bottom !important;} +.bgnon{background:none !important;} +.blind{position:absolute;left:0;top:0;visibility:hidden;overflow:hidden;height:0;width:0;margin:0;padding:0;line-height:0;font-size:0;} +.abs{position:absolute !important;display:block !important;} +.rel{position:relative !important;} +.bg_gray{background-color:#f3f3f5;} +.bg_green{background-color:#00a05f;} + +.per100{width:100% !important;} +.per95{width:95% !important;} +.per90{width:90% !important;} +.per85{width:85% !important;} +.per80{width:80% !important;} +.per75{width:75% !important;} +.per70{width:70% !important;} +.per65{width:65% !important;} +.per60{width:60% !important;} +.per55{width:55% !important;} +.per50{width:50% !important;} +.per45{width:45% !important;} +.per40{width:40% !important;} +.per35{width:35% !important;} +.per30{width:30% !important;} +.per25{width:25% !important;} +.per20{width:20% !important;} +.per15{width:15% !important;} +.per10{width:10% !important;} +.per5{width:5% !important;} +.lh12{line-height:12px !important;} +.lh13{line-height:13px !important;} +.lh14{line-height:14px !important;} +.lh15{line-height:15px !important;} +.lh16{line-height:16px !important;} +.lh17{line-height:17px !important;} +.lh18{line-height:18px !important;} +.lh19{line-height:19px !important;} +.lh20{line-height:20px !important;} +/* form deco - END */ + +/* padding, margin - START */ +.pt0 {padding-top: 0px !important;} .pr0 {padding-right: 0px !important;} .pb0 {padding-bottom: 0px !important;} .pl0 {padding-left: 0px !important;} +.pt5 {padding-top: 5px !important;} .pr5 {padding-right: 5px !important;} .pb5 {padding-bottom: 5px !important;} .pl5 {padding-left: 5px !important;} +.pt10{padding-top:10px !important;} .pr10{padding-right:10px !important;} .pb10{padding-bottom:10px !important;} .pl10{padding-left:10px !important;} +.pt15{padding-top:15px !important;} .pr15{padding-right:15px !important;} .pb15{padding-bottom:15px !important;} .pl15{padding-left:15px !important;} +.pt20{padding-top:20px !important;} .pr20{padding-right:20px !important;} .pb20{padding-bottom:20px !important;} .pl20{padding-left:20px !important;} +.pt25{padding-top:25px !important;} .pr25{padding-right:25px !important;} .pb25{padding-bottom:25px !important;} .pl25{padding-left:25px !important;} +.pt30{padding-top:30px !important;} .pr30{padding-right:30px !important;} .pb30{padding-bottom:30px !important;} .pl30{padding-left:30px !important;} +.pt35{padding-top:35px !important;} .pr35{padding-right:35px !important;} .pb35{padding-bottom:35px !important;} .pl35{padding-left:35px !important;} +.pt40{padding-top:40px !important;} .pr40{padding-right:40px !important;} .pb40{padding-bottom:40px !important;} .pl40{padding-left:40px !important;} +.pt45{padding-top:45px !important;} .pr45{padding-right:45px !important;} .pb45{padding-bottom:45px !important;} .pl45{padding-left:45px !important;} +.pt50{padding-top:50px !important;} .pr50{padding-right:50px !important;} .pb50{padding-bottom:50px !important;} .pl50{padding-left:50px !important;} +.pt55{padding-top:55px !important;} .pr55{padding-right:55px !important;} .pb55{padding-bottom:55px !important;} .pl55{padding-left:55px !important;} +.pt60{padding-top:60px !important;} .pr60{padding-right:60px !important;} .pb60{padding-bottom:60px !important;} .pl60{padding-left:60px !important;} + +.mt0 {margin-top: 0px !important;} .mr0 {margin-right: 0px !important;} .mb0 {margin-bottom: 0px !important;} .ml0 {margin-left: 0px !important;} +.mt2 {margin-top: 2px !important;} .mr2 {margin-right: 2px !important;} .mb2 {margin-bottom: 2px !important;} .ml2 {margin-left: 2px !important;} +.mt5 {margin-top: 5px !important;} .mr5 {margin-right: 5px !important;} .mb5 {margin-bottom: 5px !important;} .ml5 {margin-left: 5px !important;} +.mt10{margin-top:10px !important;} .mr10{margin-right:10px !important;} .mb10{margin-bottom:10px !important;} .ml10{margin-left:10px !important;} +.mt15{margin-top:15px !important;} .mr15{margin-right:15px !important;} .mb15{margin-bottom:15px !important;} .ml15{margin-left:15px !important;} +.mt20{margin-top:20px !important;} .mr20{margin-right:20px !important;} .mb20{margin-bottom:20px !important;} .ml20{margin-left:20px !important;} +.mt25{margin-top:25px !important;} .mr25{margin-right:25px !important;} .mb25{margin-bottom:25px !important;} .ml25{margin-left:25px !important;} +.mt30{margin-top:30px !important;} .mr30{margin-right:30px !important;} .mb30{margin-bottom:30px !important;} .ml30{margin-left:30px !important;} +.mt35{margin-top:35px !important;} .mr35{margin-right:35px !important;} .mb35{margin-bottom:35px !important;} .ml35{margin-left:35px !important;} +.mt40{margin-top:40px !important;} .mr40{margin-right:40px !important;} .mb40{margin-bottom:40px !important;} .ml40{margin-left:40px !important;} +.mt45{margin-top:45px !important;} .mr45{margin-right:45px !important;} .mb45{margin-bottom:45px !important;} .ml45{margin-left:45px !important;} +.mt50{margin-top:50px !important;} .mr50{margin-right:50px !important;} .mb50{margin-bottom:50px !important;} .ml50{margin-left:50px !important;} +.mt55{margin-top:55px !important;} .mr55{margin-right:55px !important;} .mb55{margin-bottom:55px !important;} .ml55{margin-left:55px !important;} +.mt60{margin-top:60px !important;} .mr60{margin-right:60px !important;} .mb60{margin-bottom:60px !important;} .ml60{margin-left:60px !important;} +.mt65{margin-top:65px !important;} .mr65{margin-right:65px !important;} .mb65{margin-bottom:65px !important;} .ml65{margin-left:65px !important;} +.mt70{margin-top:70px !important;} .mr70{margin-right:70px !important;} .mb70{margin-bottom:70px !important;} .ml70{margin-left:70px !important;} +/* padding, margin - END */ + +/* width - START */ +.w10 {width:10px !important;} .w15 {width:15px !important;} .w20 {width:20px !important;} .w25 {width:25px !important;} .w30 {width:30px !important;} +.w35 {width:35px !important;} .w40 {width:40px !important;} .w45 {width:45px !important;} .w50 {width:50px !important;} .w55 {width:55px !important;} +.w60 {width:60px !important;} .w65 {width:65px !important;} .w70 {width:70px !important;} .w75 {width:75px !important;} .w80 {width:80px !important;} +.w85 {width:85px !important;} .w90 {width:90px !important;} .w95 {width:95px !important;} .w100 {width:100px !important;} .w105 {width:105px !important;} +.w110 {width:110px !important;} .w115 {width:115px !important;} .w120 {width:120px !important;} .w125 {width:125px !important;} .w130 {width:130px !important;} +.w135 {width:135px !important;} .w140 {width:140px !important;} .w145 {width:145px !important;} .w150 {width:150px !important;} .w155 {width:155px !important;} +.w160 {width:160px !important;} .w165 {width:165px !important;} .w170 {width:170px !important;} .w175 {width:175px !important;} .w180 {width:180px !important;} +.w185 {width:185px !important;} .w190 {width:190px !important;} .w195 {width:195px !important;} .w200 {width:200px !important;} .w205 {width:205px !important;} +.w210 {width:210px !important;} .w215 {width:215px !important;} .w220 {width:220px !important;} .w225 {width:225px !important;} .w230 {width:230px !important;} +.w235 {width:235px !important;} .w240 {width:240px !important;} .w245 {width:245px !important;} .w250 {width:250px !important;} .w255 {width:255px !important;} +.w260 {width:260px !important;} .w265 {width:265px !important;} .w270 {width:270px !important;} .w275 {width:275px !important;} .w280 {width:280px !important;} +.w285 {width:285px !important;} .w290 {width:290px !important;} .w295 {width:295px !important;} .w300 {width:300px !important;} .w305 {width:305px !important;} +.w310 {width:310px !important;} .w315 {width:315px !important;} .w320 {width:320px !important;} .w325 {width:325px !important;} .w330 {width:330px !important;} +.w335 {width:335px !important;} .w340 {width:340px !important;} .w345 {width:345px !important;} .w350 {width:350px !important;} .w355 {width:355px !important;} +.w360 {width:360px !important;} .w365 {width:365px !important;} .w370 {width:370px !important;} .w375 {width:375px !important;} .w380 {width:380px !important;} +.w385 {width:385px !important;} .w390 {width:390px !important;} .w395 {width:395px !important;} .w400 {width:400px !important;} .w405 {width:405px !important;} +.w410 {width:410px !important;} .w415 {width:415px !important;} .w420 {width:420px !important;} .w425 {width:425px !important;} .w430 {width:430px !important;} +.w435 {width:435px !important;} .w440 {width:440px !important;} .w445 {width:445px !important;} .w450 {width:450px !important;} .w455 {width:455px !important;} +.w460 {width:460px !important;} .w465 {width:465px !important;} .w470 {width:470px !important;} .w475 {width:475px !important;} .w480 {width:480px !important;} +.w485 {width:485px !important;} .w490 {width:490px !important;} .w495 {width:495px !important;} .w500 {width:500px !important;} +/* width - END */ + +/* height - START */ +.h10 {height:10px !important;} .h15 {height:15px !important;} .h20 {height:20px !important;} .h25 {height:25px !important;} .h30 {height:30px !important;} +.h35 {height:35px !important;} .h40 {height:40px !important;} .h45 {height:45px !important;} .h50 {height:50px !important;} .h55 {height:55px !important;} +.h60 {height:60px !important;} .h65 {height:65px !important;} .h70 {height:70px !important;} .h75 {height:75px !important;} .h80 {height:80px !important;} +.h85 {height:85px !important;} .h90 {height:90px !important;} .h95 {height:95px !important;} .h100 {height:100px !important;} .h105 {height:105px !important;} +.h110 {height:110px !important;} .h115 {height:115px !important;} .h120 {height:120px !important;} .h125 {height:125px !important;} .h130 {height:130px !important;} +.h135 {height:135px !important;} .h140 {height:140px !important;} .h145 {height:145px !important;} .h150 {height:150px !important;} .h155 {height:155px !important;} +.h160 {height:160px !important;} .h165 {height:165px !important;} .h170 {height:170px !important;} .h175 {height:175px !important;} .h180 {height:180px !important;} +.h185 {height:185px !important;} .h190 {height:190px !important;} .h195 {height:195px !important;} .h200 {height:200px !important;} .h205 {height:205px !important;} +.h210 {height:210px !important;} .h215 {height:215px !important;} .h220 {height:220px !important;} .h225 {height:225px !important;} .h230 {height:230px !important;} +.h235 {height:235px !important;} .h240 {height:240px !important;} .h245 {height:245px !important;} .h250 {height:250px !important;} .h255 {height:255px !important;} +.h260 {height:260px !important;} .h265 {height:265px !important;} .h270 {height:270px !important;} .h275 {height:275px !important;} .h280 {height:280px !important;} +.h285 {height:285px !important;} .h290 {height:290px !important;} .h295 {height:295px !important;} .h300 {height:300px !important;} .h305 {height:305px !important;} +.h310 {height:310px !important;} .h315 {height:315px !important;} .h320 {height:320px !important;} .h325 {height:325px !important;} .h330 {height:330px !important;} +.h335 {height:335px !important;} .h340 {height:340px !important;} .h345 {height:345px !important;} .h350 {height:350px !important;} .h355 {height:355px !important;} +.h360 {height:360px !important;} .h365 {height:365px !important;} .h370 {height:370px !important;} .h375 {height:375px !important;} .h380 {height:380px !important;} +.h385 {height:385px !important;} .h390 {height:390px !important;} .h395 {height:395px !important;} .h400 {height:400px !important;} .h405 {height:405px !important;} +.h410 {height:410px !important;} .h415 {height:415px !important;} .h420 {height:420px !important;} .h425 {height:425px !important;} .h430 {height:430px !important;} +.h435 {height:435px !important;} .h440 {height:440px !important;} .h445 {height:445px !important;} .h450 {height:450px !important;} .h455 {height:455px !important;} +.h460 {height:460px !important;} .h465 {height:465px !important;} .h470 {height:470px !important;} .h475 {height:475px !important;} .h480 {height:480px !important;} +.h485 {height:485px !important;} .h490 {height:490px !important;} .h495 {height:495px !important;} .h500 {height:500px !important;} +/* height - END */ + +.pop_a_x {left:50%; transform:translateX(-50%);} +.pop_a_y {top:50%; transform:translateY(-50%);} + + + diff --git a/src/main/webapp/cm/css/content.css b/src/main/webapp/cm/css/content.css new file mode 100644 index 0000000..6cc4494 --- /dev/null +++ b/src/main/webapp/cm/css/content.css @@ -0,0 +1,1181 @@ +@charset "utf-8"; + +/* main - START */ +.m_content.main{background-color:#f3f3f5;} +.m_content.main .contarea{padding:18px;} +.m_content.main .weather{position:relative;height:50px;padding:0 18px;background-color:#fff;} +.m_content.main .weather:before{content:"";display:block;position:absolute;left:0;bottom:5px;width:100%;height:1px;background-color:#e0e0e0;} +.m_content.main .weather:after{content:"";display:block;position:absolute;left:0;bottom:0;width:100%;height:5px;background-color:#ececee;} +.m_content.main .weather .city{display:inline-block;width:45px;height:25px;line-height:25px;margin-right:10px;font-weight:bold;vertical-align:middle;text-align:center;border-radius:4px;font-size:11px;color:#000;background-color:#f3f3f5;} +.m_content.main .weather .ondo{display:inline-block;height:45px;line-height:45px;font-size:20px;color:#000;font-weight:bold;letter-spacing:1.5px;vertical-align:middle;} +.m_content.main .weather .dust{min-width:70px;max-width:100px;height:36px;margin-top:5px;float:right;font-size:11px;} +.m_content.main .weather .dust span{display:inline-block;height:18px;line-height:18px;} +.m_content.main .weather .dust .dust_tit{width:55px;color:#666;} +.m_content.main .weather .dust .dust_status{min-width:20px;max-width:45px;} +.m_content.main .weather .dust .dust_status.level1{color:#00c73c;} +.m_content.main .weather .dust .dust_status.level2{color:#fda870;} +.m_content.main .weather .dust .dust_status.level3{color:#ff5959;} + +.mtemp{} +.mtemp .marea{position:relative;width:100%;overflow:hidden;border-radius:8px;text-align:left;box-sizing:border-box;/*border:1px solid #dadadc;*/box-shadow:0px 0px 6px 0px #b3b3b3;} +.mtemp .marea .mtop{position:relative;width:100%;height:60px;} +.mtemp .marea .mtop .btn_mtop{display:inline-block;height:60px;line-height:60px;font-size:16px;letter-spacing:1px;text-align:center;color:#fff;background:transparent;} +.mtemp .marea .mtop .btn_mtop:after{content:"";display:inline-block;width:7px;height:11px;margin-left:5px;background:url(../../cm/images/ico_main_btn_mtop.png) no-repeat;background-size:100%;} +.mtemp .marea .mbtm{position:relative;overflow:hidden;width:100%;height:186px;} +.mtemp .marea .mbtm .mb_tx{margin-top:20px;font-size:16px;text-align:center;} +.mtemp .marea .mbtm .mb_stx{position:relative;font-size:12px;line-height:18px;padding-top:15px;text-align:center;} + +.mtemp .marea.mainareaT{} +.mtemp .marea.mainareaT .mtop{background-color:#00a05f;} +.mtemp .marea.mainareaT .mtop .mtx{background:url(../../cm/images/bg_main_mtop01_tit.png) no-repeat left 7px top;} +.mtemp .marea.mainareaT .mtop .btn_mtop{width:100%;} +.mtemp .marea.mainareaT .mbtm{background:url(../../cm/images/bg_main_mbtm01.png) no-repeat;background-size:cover;background-position: center;} +.mtemp .marea.mainareaT .mbtm .mb_tx{color:#000;} +.mtemp .marea.mainareaT .mbtm .mb_stx{color:#000;} +.mtemp .marea.mainareaT .mbtm .mb_cont{margin:0 auto; margin-top:10px;text-align:center; display:table;} +.mtemp .marea.mainareaT .mbtm .mb_cont li{position:relative;display:table-cell;width:75px;height:75px;padding-left:25px;text-align:center;vertical-align:middle;font-size:12px;color:#fff;line-height:15px; background:url(../../cm/images/bg_main_mbtm02_cont01.png) no-repeat right center;background-size:75px;} +.mtemp .marea.mainareaT .mbtm .mb_cont li:before{content:"";position:absolute;top:50%;left:9px;width:8px;height:8px;margin-top:-4px;background:url(../../cm/images/ico_main_plus.png) no-repeat;background-size:100%;} +.mtemp .marea.mainareaT .mbtm .mb_cont li:first-child{padding:0;} +.mtemp .marea.mainareaT .mbtm .mb_cont li:first-child:before{display:none;} + +.mtemp .marea.mainareaB{margin-top:18px;} +.mtemp .marea.mainareaB .mtop{background-color:#008d9e} +.mtemp .marea.mainareaB .mtop .btn_mtop{width:50%;} +.mtemp .marea.mainareaB .mtop .btn_mtop + .btn_mtop{background-color:#0065b2;} + +.mtemp .marea.mainareaB .mbtm{background:url(../../cm/images/bg_main_mbtm02.png) no-repeat;background-size:cover;background-position: bottom center;} +.mtemp .marea.mainareaB .mbtm .mb_tx{color:#fff;} +.mtemp .marea.mainareaB .mbtm .mb_stx{color:#d9d9d9;} + + +/*나의 이용 현황*/ +.mystatus{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#00a05f;} +.mystatus .status_titarea{position:relative;height:48px;padding:12px 14px 0 14px;} +.mystatus .status_tit{font-size:16px; font-weight:bold; color:#fff;} +.mystatus .status_date{margin-top:4px;font-size:11px;color:#fff;} +.mystatus .status_btn{position:absolute;top:16px;right:14px;display:block;width:30px;height:27px;font-size:0;line-height:0;background:url(../../cm/images/ico_main_mystatus.png) no-repeat;background-size:100% auto;} +.mystatus .status_cont{position:absolute;top:60px;left:14px;right:14px;bottom:14px;padding:10px 14px;background-color:#fff;} +.mystatus .status_cont .area{width:100%;padding-top:5px;border-top:1px solid #e0e0e0;} +.mystatus .status_cont .area:first-child{border-top:0;padding-top:0;padding-bottom:4px;} + +.mystatuslist_tit{width:60px;padding-top:5px;vertical-align:top;color:#00a05f;font-size:12px !important;font-weight:bold;} +.mystatuslist{} +.mystatuslist li{position:relative;overflow:hidden;_padding:5px 0;text-align:left;} +.mystatuslist li:first-child:before{border-top:0;} +.mystatuslist li .w2textbox, .mystatuslist .w2span{height:23px;line-height:23px;} +.mystatuslist li .money{margin-right:5px;font-size:13px;color:#000;font-weight:bold;} + +.btn_flooting{z-index:1;display:block;position:fixed;bottom:25px;right:25px;width:70px;height:70px;line-height:96px;color:#fff;text-align:center;border-radius:70px;background:#00a05f url(../../cm/images/ico_flooting.png) no-repeat center 16px;background-size:18px;} +.btn_flooting:hover{text-decoration:underline;} +/* main - END */ + + + +/* layout - START */ +.tbcell{display:table !important;table-layout:fixed;width:100%;} +.tbcell .cell{display:table-cell;} + +.flex_row{display:flex !important;flex-direction:row;width:100%;} +.flex_row > *{flex:1;} +.flex_row > .noflex{flex:none;} +.flex_row > .dash{display:inline-block;padding:8px 0;} +.flex_row > .btn, .flex_row > .btn.big{min-width:auto; font-weight:bold} + +/* .flex_row{display:table !important;_table-layout:fixed;width:100%;} +.flex_row > *{display:table-cell;} +.flex_row > .noflex{flex:none;} */ + +/* layout - END */ + +/* location - START */ +.location{display:block;padding-left:15px;background:url(../../cm/images/ico_location_home.png) no-repeat;} +.location li{display:inline-block;color:#888;} +.location li:before{content:"";display:inline-block;width:8px;height:13px;float:left;margin:0 6px 0 8px;background:url(../../cm/images/ico_location_arr.png) no-repeat;} +.location li:last-child{color:#000;} +/* location - END */ + +/* template - text START */ +.w2textbox{font-size:inherit;word-break:break-word;} + +.titlearea{padding-top:20px;padding-bottom:6px;} +.contarea > .titlearea {padding-top:0;} +.titlearea.mb0{padding-bottom:0;} +/* .titlearea + .searcharea{border-top:0;} */ +.titlearea:after{display:block;visibility:hidden;clear:both;height:0;font-size:0;line-height:0;content: '.'} +.titlearea .title{display:inline-block;vertical-align:middle;color:#000;font-weight:normal;} +.titlearea .bt_more {height:16px; line-height:16px; font-weight:bold;} + +h2.title{position:relative;height:50px;font-size:17px;color:#000;text-align:center;line-height:45px;font-weight:bold;} +h2.title:before{content:"";display:block;position:absolute;left:0;bottom:4px;width:100%;height:1px;background-color:#e0e0e0;} +h2.title:after{content:"";display:block;position:absolute;left:0;bottom:0;width:100%;height:4px;background-color:#f3f3f5;} +h2.title + .contarea{/*padding-top:0;*/} + +.titlearea h3.title{font-size:14px;font-weight:bold;padding-top:0px;} +.titlearea h3.title + .sst {margin-top:10px; line-height: 17px;} +.titlearea h4.title{font-size:20px;} +.titlearea .page{line-height:32px;} +.titlearea .page span{margin:0 3px;} +.titlearea .h3subtx{display:inline-block;font-size:14px;color:#000;/* padding-top:9px; */vertical-align:middle;} +.location + .contarea > .titlearea:first-child, .contarea:first-child > .titlearea{border-bottom:1px solid #2f3947;} +.location + .titlearea{margin-top:70px;} +.titlearea.noline{border-bottom:0 !important;} +.titlearea.line{border-bottom:1px solid #2f3947;} +.titlearea > .w2textbox.fr{/*padding-top:9px;*/} + +.txt_help {font-size: 14px; text-align: center; color:#0065b2; padding:10px 0 ;} + +.info_cont1 {margin:10px 20px; text-align: center} +.info_cont1 > * {display:inline-block;} +.info_cont1 img {width: 100%;height: 100%;} +.info_cont1 .obj1 {width:100%; margin:0 auto; margin-top:15px; } +.info_cont1 .obj2 * {} +.info_cont1 .obj1 > ul {margin-top:20px;} +.info_cont1 .obj1 > ul li {position:relative; display:inline-block; padding-left:30px; text-align: center; } +.info_cont1 .obj1 > ul li:before{content:""; position:absolute; left:0; top:17px; width:26px; height:26px; background:url(../../cm/images/ico_info_plus.png) no-repeat center center; background-size: auto 15px;} +.info_cont1 .obj1 > ul li:first-child {padding-left:0;} +.info_cont1 .obj1 > ul li:last-child {margin-right:0;} +.info_cont1 .obj1 > ul li:first-child:before {display: none;} +.info_cont1 .obj1 > ul li .w2textbox {width: 60px; height:60px; border-radius:60px; font-size: 0;} +.info_cont1 .obj1 > ul li .w2span {display:inline-block; padding-top:10px; font-size: 12px; color:#575757; font-weight: bold;} +.info_cont1 .obj1 > ul li:nth-child(1) .w2textbox {background:#f3f3f5 url(../../cm/images/ico_info_price1.png) no-repeat center center; background-size: auto 30px;} +.info_cont1 .obj1 > ul li:nth-child(2) .w2textbox {background:#f3f3f5 url(../../cm/images/ico_info_price2.png) no-repeat center center; background-size: auto 30px;} +.info_cont1 .obj1 > ul li:nth-child(3) .w2textbox {background:#f3f3f5 url(../../cm/images/ico_info_price3.png) no-repeat center center; background-size: auto 30px;} +.info_cont1 .obj1 .sst {font-size: 14px; color:#000; font-weight: bold; text-align: center;} +.info_cont2 {border:1px solid #e0e0e0;height:100%;margin-bottom:10px;} +.info_cont2 > *{} +.info_cont2 > .info_map {width:100%; height:200px; background:#f3f3f5 url(../../cm/images/img_info_map.png) no-repeat center center; font-size: 0; background-size: auto 190px;} +.info_cont2 .obj1 {font-size: 12px;} +.info_cont2 .obj1 .sst {margin:20px; margin-bottom:10px; text-align:center; color:#0065b2; font-weight: bold;} +.info_cont2 .obj1 > ul li {margin-bottom:9px; text-align: center;} +.info_cont2 .obj1 > ul li:last-child {margin-bottom:20px;} +.info_cont2 .obj1 .sst2 {margin-bottom:19px; font-size: 20px; color:#0065b2; line-height: 20px; font-weight: bold;} +.info_cont2 .obj1 .cont_more {padding:20px; font-size: 11px; background-color: #f3f3f5;} +.info_cont2 .obj1 .cont_more .stit {color:#000; font-weight: bold; margin-bottom: 1px;} +.info_cont2 .obj1 .cont_more > ul {margin-top: 5px;} +.info_cont2 .obj1 .cont_more > ul li {margin-bottom:7px;background: url(../../cm/images/ico_bullet.png) no-repeat left 8px; } +.info_cont2 .obj1 .cont_more > ul li:last-child {margin-bottom:0;} +.info_cont2 .obj1 .cont_more > ul li:last-child :last-child{margin-bottom:0;} +.info_cont2 .obj1 .cont_more > ul li > .tit1 {color:#000; margin-bottom:7px;} +.info_cont2 .obj1 .cont_more > ul li > .tit2 {} + + +.info_cont3 {border:1px solid #e0e0e0; border-width:1px 0;} +.info_cont3 > ul li {display:block; border-bottom:1px solid #e0e0e0;padding:15px 0; box-sizing: border-box;} +.info_cont3 > ul li:last-child {border-bottom:0;} +.info_cont3 > ul li .sst1 {color: #000; margin-bottom:5px; font-weight: bold;} +.info_cont3 > ul li .sst2 {font-size: 16px; color: #00a05f; margin-bottom:8px} +.info_cont3 > ul li .sst3 {margin-bottom:7px;} +.info_cont3 > ul li .sst4 {margin-bottom:7px;} +.info_cont3 > ul li .w2textbox:last-child {margin-bottom:0} +.info_cont4 {} +.info_cont4 > ul {margin-top:10px} +.info_cont4 > ul > li {display:table; margin-bottom:15px;} +.info_cont4 > ul > li:last-child {margin-bottom:0;} +.info_cont4 > ul > li > .imgbox, .info_cont4 > ul > li > ul {display:table-cell; vertical-align:middle} +.info_cont4 > ul li > ul {} +.info_cont4 > ul li > ul li {display:inline-block; line-height: 16px; padding-left:7px} +.info_cont4 > ul li > ul li .sst1 { color: #000; padding-bottom: 5px;} +.info_cont4 > ul li > ul li .sst2 {} +.info_cont4 > ul li > ul li .sst3 {padding-left: 10px;} +.info_cont4 > ul li .imgbox .img {display:block;vertical-align: middle; width: 60px; height: 60px; background: #f3f3f5; border-radius: 60px; font-size:0;} +.info_cont4 > ul li .imgbox .img > .w2textbox{background-size: auto 30px;} + +.info_cont4 > ul li:nth-child(1) .img {background:#f3f3f5 url(../../cm/images/ico_info_discounts1.png) no-repeat center center; background-size:auto 30px} +.info_cont4 > ul li:nth-child(2) .img {background:#f3f3f5 url(../../cm/images/ico_info_discounts2.png) no-repeat center center; background-size:auto 30px} +.info_cont4 > ul li:nth-child(3) .img {background:#f3f3f5 url(../../cm/images/ico_info_discounts3.png) no-repeat center center; background-size:auto 30px} +.info_cont4 > ul li:nth-child(4) .img {background:#f3f3f5 url(../../cm/images/ico_info_discounts4.png) no-repeat center center; background-size:auto 30px} +.info_cont4 > ul li:nth-child(5) .img {background:#f3f3f5 url(../../cm/images/ico_info_discounts5.png) no-repeat center center; background-size:auto 30px} + + +/*이용절차 : 바로녹색서비스이용절차*/ +.process_cont1 {} +.process_cont1 .obj1 {padding:20px 0; border:1px solid #e0e0e0; vertical-align: top; text-align: center} +.process_cont1 .obj1 .sst {font-size: 14px; font-weight: bold; color:#000;} +.process_cont1 .obj1 > ul {} +.process_cont1 .obj1 > ul li {position:relative; padding-top:26px; margin-bottom:20px; text-align: center;} +.process_cont1 .obj1 > ul li:before{content:""; position:absolute; left:0; right:0; top:0; width:100%; height:6px; background:url(../../cm/images/ico_location_arr.png) no-repeat center center;} +.process_cont1 .obj1 > ul li:first-child:before {display: none;} +.process_cont1 .obj1 > ul li:last-child {margin-bottom:0;} +.process_cont1 .obj1 > ul li .ico {width: 100%; height:25px; font-size: 0; background-size:contain; background-repeat:no-repeat; background-position:center center;} +.process_cont1 .obj1 > ul li .txt2 { margin-top: 10px;} +.process_cont1 .obj1 > ul li .w2span {display:inline-block; padding-top:10px; font-weight: bold;} +.process_cont1 .obj1 > ul li:nth-child(1) .ico {height:27px; background-image: url(../../cm/images/ico_process_01.png); } +.process_cont1 .obj1 > ul li:nth-child(2) .ico {height:23px; background-image: url(../../cm/images/ico_process_02.png);} +.process_cont1 .obj1 > ul li:nth-child(3) .ico {background-image: url(../../cm/images/ico_process_03.png); } +.process_cont1 .obj1 > ul li:nth-child(4) .ico {background-image: url(../../cm/images/ico_process_04.png); } +.process_cont1 .obj1 > ul li:nth-child(5) .ico {background-image: url(../../cm/images/ico_process_05.png); } + +/*이용절차 : 조회및 납부*/ +.process_cont2 {border-bottom:1px solid #e0e0e0; margin-bottom:10px; } +.process_cont2 > ul {margin-top:10px} +.process_cont2 > ul li {display:table; margin-bottom:15px;} +.process_cont2 > ul > li:last-child {margin-bottom:0;} +.process_cont2 > ul > li > .imgbox, .process_cont2 > ul > li > ul {display:table-cell; vertical-align:middle} +.process_cont2 > ul li > ul li {display:inline-block; line-height: 16px; padding-left:7px} +.process_cont2 > ul li > ul li .sst1 {color: #000; font-weight: bold; padding-bottom: 5px;} +.process_cont2 > ul li > ul li .sst2 {} +.process_cont2 > ul li .imgbox .img {display:inline-block;vertical-align: top; width: 60px; height: 60px; background: #f3f3f5; border-radius: 60px; font-size:0;} +.process_cont2 > ul li:nth-child(1) .imgbox .img {background:#f3f3f5 url(../../cm/images/ico_process_06.png) no-repeat center center; background-size:auto 30px;} +.process_cont2 > ul li:nth-child(2) .imgbox .img {background:#f3f3f5 url(../../cm/images/ico_process_07.png) no-repeat center center; background-size:auto 30px;} + + +/* .titlearea{position:relative;padding:30px 0 15px 0;} +.titlearea .title{display:inline-block;vertical-align:middle;} */ +/* .titlearea .title + .w2anchor2[class*="btn_"]{vertical-align:middle;margin-top:-4px;} */ +/* .titlearea .tooltiparea + .fr{position:absolute !important;top:30px;right:0;} */ +/* .content .contarea:first-child .titlearea .tooltiparea + .fr{top:5px;} */ +/* .titlearea + .txt_agreebox{margin-top:15px} */ + +.listdash, .listdot, .listacc{overflow:hidden;} +.listdash > li, .listdot > li, .listacc > li{position:relative;margin-top:4px;} +.listacc > li{padding-left:15px !important} +.listdash > li:before{content:"-";position:absolute;top:0px;left:0px;} +.listdot > li:before{content:"⋅";position:absolute;top:0px;left:0px;} +.listacc > li:before{content:"※";position:absolute;top:0px;left:0px;} +.listdash > li .w2textbox, .listdot > li .w2textbox, .listacc > li .w2textbox{display:block;} + +.txdash, .txdot, .txacc, .txnoti{position:relative;padding-left:10px !important;/* margin-top:5px; */} +.txdash:before{content:"-";position:absolute;top:0px;left:0px;} +.txdot:before{content:"⋅";position:absolute;top:0px;left:0px;} +.txacc:before{content:"※";position:absolute;top:0px;left:0px;} +.txacc{padding-left:15px !important;} + +.listnum{counter-reset:num} +.listnum > li{position:relative;padding-left:13px;margin-top:5px;} +.listnum > li:before{counter-increment:num;content:counter(num) ". ";position:absolute;top:0px;left:0px;} +.listnum > li:nth-child(n+10){padding-left:22px} +.listnum li > .w2textbox{display:block;} +.listnum.boldnum > li:before{font-weight:bold;} + +.ganada > li{position:relative;padding-left:20px;margin-top:5px;} +.ganada > li:before{content:"";position:absolute;top:0px;left:0px;} +.ganada > li > .w2textbox + .w2textbox{} +.ganada > li:nth-child(1):before{content:"가.";} +.ganada > li:nth-child(2):before{content:"나.";} +.ganada > li:nth-child(3):before{content:"다.";} +.ganada > li:nth-child(4):before{content:"라.";} +.ganada > li:nth-child(5):before{content:"마.";} +.ganada > li:nth-child(6):before{content:"바.";} +.ganada > li:nth-child(7):before{content:"사.";} +.ganada > li:nth-child(8):before{content:"아.";} +.ganada > li:nth-child(9):before{content:"자.";} +.ganada > li:nth-child(10):before{content:"차.";} + +.roundnum > li{position:relative;padding-left:16px;margin-top:5px;} +.roundnum > li:before{content:"";position:absolute;top:-1px;left:0px;font-weight:bold;} +.roundnum > li > .w2textbox + .w2textbox{} +.roundnum > li:nth-child(1):before{content:"①";} +.roundnum > li:nth-child(2):before{content:"②";} +.roundnum > li:nth-child(3):before{content:"③";} +.roundnum > li:nth-child(4):before{content:"④";} +.roundnum > li:nth-child(5):before{content:"⑤";} +.roundnum > li:nth-child(6):before{content:"⑥";} +.roundnum > li:nth-child(7):before{content:"⑦";} +.roundnum > li:nth-child(8):before{content:"⑧";} +.roundnum > li:nth-child(9):before{content:"⑨";} +.roundnum > li:nth-child(10):before{content:"⑩";} +.roundnum > li:nth-child(11):before{content:"⑪";} +/* template - text END */ + +/* template form - START */ +.formbox {/*margin-top:20px;*/} + +.formbox li{overflow:hidden;/*padding-top:5px*/;text-align:left;} +.formbox li:first-child {/*padding-top:0*/} +/* .formbox:before, .formbox:after{display:block;visibility:hidden;clear:both;height:0px;font-size:0;line-height:0;content: '.'} */ +.formbox.line{border:1px solid #e0e0e0;padding:20px;} +.formbox.line li:first-child .titlearea{padding-top:0;} + +.formbox.line.list{padding:15px;} +.formbox.line.list li{position:relative;} +.formbox.line.list li:before{content:"";display:block;margin-left:-15px;margin-right:-15px;border-top:1px solid #e0e0e0;} +.formbox.line.list li:first-child:before{border-top:0;} +.formbox2 {padding:20px 18px;} +.formbox2 + .formbox2 {padding-top:0;} +.formbox2 > li:first-child .titlearea{padding-top:0;} + +.formbox > li > [class*="w2"] + [class*="w2"], .formbox > li > .w2group > [class*="w2"] + [class*="w2"]{margin-left:10px;} +.formbox > li > .w2group, .formbox > li > .w2textbox, .formbox > li > .w2group > .w2textbox{display:inline-block;} +.formbox > li > [class*="w2"], .formbox > li > div > div[class*="w2"]{vertical-align:middle;} +.formbox > li .w2textbox{display:inline-block; padding:10px 0 6px 0;} +.formbox > li.info_text {margin-top: 12px; border-top:1px solid #e0e0e0;} +.formbox > li.info_text > * {display: block !important; margin-left:0 !important;} +.formbox > li.info_text > .w2textbox {padding-top:10px; padding-bottom:0;} +.formbox > li.info_text > .w2textbox + .w2textbox {padding-top:8px;} +.formbox .titlearea + [class*="w2"]{margin-left:0 !important;} +.formbox .titlearea{display:block !important;padding-top:20px} +.formbox .titlearea > h3.title{padding:0;line-height:inherit; font-size:12px} + +/* 조회조건 formbox*/ +.msearch {padding:20px 18px; border-bottom:1px solid #e0e0e0} +.msearch .formbox > li {margin-bottom:10px} +.msearch .formbox > li:last-child {margin-bottom:0;} +.guidebox + .msearch {padding-top:0;} + +/* Slide Up, Down용 조회조건 formbox*/ +.schtogglearea .schtoggle_cont {padding:20px 18px; border-bottom:1px solid #e0e0e0} +.schtogglearea .schtoggle_cont .formbox > li {margin-bottom:10px} +.schtogglearea .schtoggle_cont .formbox > li:last-child {margin-bottom:0;} + + + + +/*li 내 .flex_row 간 간격조정*/ +.formbox > li > .w2group.flex_row {margin-bottom:10px;margin-left:0;} +.formbox > li > .w2group.flex_row:last-child {margin-bottom:0;} + + +.w2input, .w2inputCalendar_divInput, .w2textarea{/* width:100%; */width:135px;min-width:35px;height:32px;font-size:12px;color:#575757;padding:0 8px;border-radius:4px;border-color:#e0e0e0;box-sizing:border-box;-moz-box-sizing:border-box;background-color:#fff;} +.w2input[type=password]{font-family:NanumBarunGothic, Verdana,Dotum,Helvetica;text-indent:0px;letter-spacing:1px;background:#fff !important;color:#575757 !important;} +.w2input[type=password]::-webkit-input-placeholder{font-family:NanumBarunGothic;} +.w2input.error, .w2textarea.error{display:block;border-color:#c42012;} +.errortx{display:none !important;margin-left:0 !important;color:#c42012; padding-top:6px !important;} +.w2input.error + .errortx{display:block !important;margin-top:5px;} +.w2input.error + .errortx + .txt{display:none !important;} + +.w2selectbox{width:135px !important;height:32px !important;border:1px solid #e0e0e0;border-radius:4px;box-sizing:border-box;} +.w2selectbox .w2selectbox_label{line-height:32px;padding-left:12px;font-size:14px;color:#575757;} +.w2selectbox .w2selectbox_col_button{width:22px;background-position:left center;} +.w2table_sb{/* width:135px !important; */border-color:#e0e0e0;border-radius:4px;/* border:1px solid #e0e0e0;border-radius:4px;box-sizing:border-box;-moz-box-sizing:border-box; */} +.w2table_sb .w2table_sb_main{width:100% !important;} +.w2table_sb .w2table_sb_col{padding:6px 0;font-size:14px;color:#575757;border-top:0;} +.w2table_sb .w2table_sb_col_over{color:#fff;background-color:#1ab26b;} + +.w2selectbox_native{/* width:135px; */width:100%;height:32px;border:0;} +.w2selectbox_native option{text-align:right;padding:10px 0;line-height:32px;border:1px solid #ff0000;} +.w2selectbox_native .w2selectbox_native_select{height:32px;font-size:12px;color:#575757;padding:0 20px 0 10px;border:1px solid #e0e0e0;border-radius:4px;box-sizing:border-box;-moz-box-sizing:border-box;background:url(../../cm/images/ico_select.png) no-repeat right 10px center;appearace:none;-webkit-appearance:none;-moz-appearance:none;} +.w2selectbox_native select.w2selectbox_native_select::-ms-expand {display: none;} +.w2selectbox_native.error{display:block;border-color:#c42012;} + +.w2input:-ms-input-placeholder, .w2textarea:-ms-input-placeholder, +.w2input::-webkit-input-placeholder, .w2textarea::-webkit-input-placeholder, +.w2input::-moz-placeholder, .w2textarea::-moz-placeholder{color:#888;} +.w2input_disabled,.w2inputCalendar_readOnly{background-color:#f5f6f8;} + +.w2textarea{height:auto;word-break:break-all;overflow-y:auto;/* font-size:14px; */line-height:20px;/* font-family:NanumBarunGothic,Verdana,Dotum,Helvetica; */} +.w2textarea.noline{border:0;padding:0;} + +.w2inputCalendar_div{width:120px;height:32px;border-radius:4px;} +.w2inputCalendar_div.time{width:175px;} +.w2inputCalendar_div_input{padding-right:0;width:calc(100% - 32px) !important;} +.w2inputCalendar_div_img{width:32px;background-color:#888;border-bottom-right-radius:4px;border-top-right-radius:4px;} +.w2inputCalendar_divInput{width:100% !important;height:32px !important;padding-right:0;border-bottom-left-radius:4px;border-top-left-radius:4px;border-right:0; letter-spacing:-0.5px;font-family:inherit;box-sizing:border-box;-moz-box-sizing:border-box;} +.w2inputCalendar_divInput{border-top-right-radius:0;border-bottom-right-radius:0;} +.w2inputCalendar_button{width:32px;height:32px;background:url(../../cm/images/btn_calender.png) no-repeat center center !important;} +.w2inputCalendar_button.w2inputCalendar_img_readOnly{cursor:default;opacity:0.5;} + +.w2checkbox{min-width:22px;min-height:21px;} +.w2checkbox .w2checkbox_item{position:relative;display:inline-block;margin:2px 0;} +.w2checkbox .w2checkbox_item + .w2checkbox_item{margin:2px 0 2px 20px;} +.w2checkbox .w2checkbox_item .w2checkbox_input{position:absolute;top:0;left:0;opacity:0;width:17px;height:17px;} +.w2checkbox .w2checkbox_item .w2checkbox_input:focus + .w2checkbox .w2checkbox_item .w2checkbox_label{color:#ff000;} +.w2checkbox .w2checkbox_item .w2checkbox_label{position:relative;display:block;min-height:17px;line-height:17px;padding-left:22px;font-size:11px;vertical-align:middle !important;} +.w2checkbox .w2checkbox_item .w2checkbox_label:before{content:"";position:absolute;top:0;left:0;width:17px;height:17px;background:url(../../cm/images/ico_check.png) no-repeat;background-size:17px;} +.w2checkbox .w2checkbox_item .w2checkbox_label.w2checkbox_disabled{color:#e0e0e0;} +.w2checkbox .w2checkbox_item input[type="checkbox"]:checked + .w2checkbox_label:before{background:url(../../cm/images/ico_check.png) no-repeat 0 -17px;background-size:17px;} +.w2checkbox .w2checkbox_item input[type="checkbox"]:checked + .w2checkbox_label.w2checkbox_disabled:before{background:url(../../cm/images/ico_check.png) no-repeat 0 -34px;background-size:17px;} +.w2checkbox.list .w2checkbox_item{display:block;} +.w2checkbox.nolabel .w2checkbox_item{margin:0;} +.w2checkbox.nolabel .w2checkbox_item .w2checkbox_label{font-size:0;line-height:0;padding-left:20px;} +.w2checkbox.chk_singleLine {margin-top:9px;}/*한줄에 체크박스 한개만 있을 때*/ + +.w2radio{min-width:22px;min-height:21px;} +.w2radio .w2radio_item{position:relative;display:inline-block;margin:2px 0;} +.w2radio .w2radio_item + .w2radio_item{margin:2px 0 2px 20px;} +.w2radio .w2radio_item .w2radio_input{position:absolute;top:0;left:0;opacity:0;visibility:hidden;width:17px;height:17px;} +.w2radio .w2radio_item .w2radio_label{position:relative;display:block;height:17px;line-height:17px;padding-left:22px;font-size:11px;vertical-align:middle !important;} +.w2radio .w2radio_item .w2radio_label:before{content:"";position:absolute;top:0;left:0;width:17px;height:17px;background:url(../../cm/images/ico_radio.png) no-repeat;background-size:17px;} +.w2radio .w2radio_item .w2radio_label.w2radio_disabled{color:#e0e0e0;} +.w2radio .w2radio_item input[type="radio"]:checked + .w2radio_label:before{background:url(../../cm/images/ico_radio.png) no-repeat 0 -17px;background-size:17px;} +.w2radio .w2radio_item input[type="radio"]:checked + .w2radio_label.w2radio_disabled:before{background:url(../../cm/images/ico_radio.png) no-repeat 0 -34px;background-size:17px;} +.w2radio.list .w2checkbox_item{display:block;} + +.w2radio.btnty_radio{/* display:inline-flex;flex-direction:row; */width:100%;} +.w2radio.btnty_radio .w2radio_item{/* width:80px; */width:16.666%;margin:0;} +.w2radio.btnty_radio .w2radio_item .w2radio_label{height:32px;line-height:32px;padding-left:0;text-align:center;border:1px solid #e0e0e0;border-left-width:0;font-size:12px;box-sizing:border-box;-moz-box-sizing:border-box;background-color:#fff;} +.w2radio.btnty_radio .w2radio_item .w2radio_label:before{display:none;} +.w2radio.btnty_radio .w2radio_item:first-child .w2radio_label{border-left-width:1px;border-top-left-radius:4px;border-bottom-left-radius:4px;} +.w2radio.btnty_radio .w2radio_item:last-child .w2radio_label{border-top-right-radius:4px;border-bottom-right-radius:4px;} +.w2radio.btnty_radio .w2radio_item input[type="radio"]:checked + .w2radio_label{margin-left:-1px;color:#fff;border-left-width:1px;border-color:#0065b2;background-color:#0065b2;} + +/* .w2radio.btnty_radio.multi{display:block;} +.w2radio.btnty_radio.multi .w2radio_item{display:inline-block;width:33.333%;margin-top:-1px;} +.w2radio.btnty_radio.multi .w2radio_item:nth-child(1) .w2radio_label{border-top-left-radius:5px;} +.w2radio.btnty_radio.multi .w2radio_item:nth-child(4) .w2radio_label{border-left-width:1px;border-bottom-left-radius:5px;} +.w2radio.btnty_radio.multi .w2radio_item:nth-child(3) .w2radio_label{border-top-right-radius:5px;} +.w2radio.btnty_radio.multi .w2radio_item:nth-child(6) .w2radio_label{border-bottom-right-radius:5px;} +.w2radio.btnty_radio.multi .w2radio_item .w2radio_label{border-radius:0;} +.w2radio.btnty_radio.multi .w2radio_item input[type="radio"]:checked + .w2radio_label{z-index:1;} */ + +.pagelist{margin-top:20px;text-align:center;} +.w2pageList_ul{display:inline-block;} +.w2pageList_ul li{display:inline-block;width:14px;padding:0;margin:0 5px;vertical-align:middle;} +.w2pageList_ul li a{display: inline-block;width: 14px; height:16px;/* margin: 0 5px; */vertical-align: middle;color:#575757;font-size:12px;box-sizing:border-box;} +.w2pageList_ul li a.w2pageList_label_selected{color:#575757;font-weight:bold;border-bottom:2px solid #0065b2;} +.w2pageList_ul li a.w2pageList_label_over{font-weight:normal;} +.w2pageList_ul li .w2pageList_input{width: 18px;height: auto;margin-left: 6px;border:0;background-color:transparent;pointer-events: none;font-size:16px;text-align:right;color:#8a9db4;vertical-align:bottom;} +.w2pageList_ul li span{font-size:16px;padding-right:10px;color:#8a9db4;vertical-align:bottom;} +.w2pageList_ul li span:first-child{padding-right:0;padding-left:10px} +.w2pageList_col_prev, .w2pageList_col_next, .w2pageList_col_prevPage, .w2pageList_col_nextPage {height:15px;} +.w2pageList_control_pagePrev.w2pageList_col_prevPage a img, +.w2pageList_control_prev.w2pageList_col_prev a img, +.w2pageList_control_next.w2pageList_col_next a img, +.w2pageList_control_pageNext.w2pageList_col_nextPage a img{display:none;} +.w2pageList_control_pagePrev.w2pageList_col_prevPage a, .w2pageList_ul li.w2pageList_col_prevPage a{width:14px;height:11px;border:0;background:url(../../cm/images/btn_pagelist_first.png) no-repeat center center;} +.w2pageList_control_prev.w2pageList_col_prev a, .w2pageList_ul li.w2pageList_col_prev a{width:14px;height:11px;border:0;background:url(../../cm/images/btn_pagelist_prev.png) no-repeat center center;} +.w2pageList_control_next.w2pageList_col_next a, .w2pageList_ul li.w2pageList_col_next a{width:14px;height:11px;border:0;background:url(../../cm/images/btn_pagelist_next.png) no-repeat center center;} +.w2pageList_control_pageNext.w2pageList_col_nextPage a, .w2pageList_ul li.w2pageList_col_nextPage a{width:14px;height:11px;border:0;background:url(../../cm/images/btn_pagelist_last.png) no-repeat center center;} +/* template form - END */ + +/* template - button START */ +.btn{position:relative;height:32px;min-width:117px; padding:0 20px;_margin-left:10px;font-size:13px;color:#fff;border:0;border-radius:4px;background-color:#0aa35c;} +.btn + .btn{margin-left:10px;} +.btnarea.flex_row .btn + .btn{margin-left:14px;} +.btn.bg{border:none;color:#fff;background-color:#0aa35c;} +.btn.big{height:40px;_line-height:40px;min-width:200px;background-color:#0065b2;} +.btn.big.line{color:#0065b2;border:1px solid #0065b2;background:#fff;} +.btn.login{width:100%;color:#fff !important;padding-left:40px;border:0 !important;font-size:13px;background:#0065b2 url(../../cm/images/btn_login.png) no-repeat center center;background-size:15px auto;background-position:left 43% center;} +.btn.bgred{background-color:#c42012;} +.btn.tbline{min-width:60px;padding:0 10px;color:#000;border:1px solid #888;box-sizing:border-box;background-color:#fff;} + +.titlearea .btn.tbline{border-color:#0065b2;} + + +.btn.ico{min-width:auto;height:32px;/* padding-left:44px; */color:#000;border:1px solid #0065b2;background-color:#fff;background-position:20px center;background-repeat:no-repeat;} +.btn.ico.bg{border:none;color:#fff;background-color:#0aa35c;} +.btn.ico:before{content:"";display:block;position:absolute;top:11px;left:20px;width:18px;height:18px;} +/* .btn.ico:hover{color:#fff;background-color:#0065b2;} */ + +.btn.ico.type2 {border-color:#888;} + +.btn.ico.search{background-image:url(../../cm/images/btn_search.png);} +.btn.ico.search.notx{padding:0 16px;font-size:0;line-height:0;background-position:center;background-color:#0065b2;} +/* .btn.ico.select{background-image:url(../../cm/images/btn_select.png);} */ +/* .btn.ico.down{background-image:url(../../cm/images/btn_down.png);} */ +/* .btn.ico.regist{background-image:url(../../cm/images/btn_regist.png);} */ +/* .btn.ico.chkdelete{background-image:url(../../cm/images/btn_chkdelete.png);} */ + +/* .btn.ico.search:hover{} +.btn.ico.select:hover{background-image:url(../../cm/images/btn_select_hover.png);} +.btn.ico.down:hover{background-image:url(../../cm/images/btn_down_hover.png);} +.btn.ico.regist:hover{background-image:url(../../cm/images/btn_regist_hover.png);} +.btn.ico.chkdelete:hover{background-image:url(../../cm/images/btn_chkdelete_hover.png);} */ + +.btn.w2trigger_disabled{color:#fff;background-color:#888 !important;} +.btn.ico.search.w2trigger_disabled{background-color:#888 !important;background-image:url(../../cm/images/btn_search_hover.png);} +.btn.ico.select.w2trigger_disabled{background-color:#888 !important;/* background-image:url(../../cm/images/btn_select_hover.png); */} +.btn.ico.down.w2trigger_disabled{background-color:#888 !important;background-image:url(../../cm/images/btn_down_hover.png);} +.btn.ico.regist.w2trigger_disabled{background-color:#888 !important;background-image:url(../../cm/images/btn_regist_hover.png);} +.btn.ico.chkdelete.w2trigger_disabled{background-color:#888 !important;background-image:url(../../cm/images/btn_chkdelete_hover.png);} +.btn.ico.w2trigger_disabled{border-color:#888 !important;} + +.btnarea{margin-top:20px;text-align:center;} +.m_content > .btnarea.flex_row{width:auto;margin:0 17px;} +/* template - button END */ + + + + +/* template - tab START */ +.w2tabcontrol{} +.w2tabcontrol:before, .w2tabcontrol:after{display:block;visibility:hidden;clear:both;height:0px;font-size:0;line-height:0;content: '.'} +.w2tabcontrol.nocont .w2tabcontrol_container{display:none;} +.w2tabcontrol.nopointer .w2tabcontrol_tabhost li a{cursor:default;pointer-events: none;} + +.w2tabcontrol .w2tabcontrol_tabhost{height:39px;display:table;table-layout:fixed;float:none;/* border-left:1px solid #e0e0e0;box-sizing:border-box; *//* float:none;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-moz-flex;display:-webkit-flex;justify-content:center;justify-content:space-between; */} +.w2tabcontrol .w2tabcontrol_tabhost .w2tabcontrol_tab_right, +.w2tabcontrol .w2tabcontrol_tabhost .w2tabcontrol_tab_left, +.w2tabcontrol .w2tabcontrol_tabhost .w2tabcontrol_over .w2tabcontrol_tab_right, +.w2tabcontrol .w2tabcontrol_tabhost .w2tabcontrol_over .w2tabcontrol_tab_left, +.w2tabcontrol .w2tabcontrol_tabhost .w2tabcontrol_active .w2tabcontrol_tab_right, +.w2tabcontrol .w2tabcontrol_tabhost .w2tabcontrol_active .w2tabcontrol_tab_left{display:none;} +.w2tabcontrol .w2tabcontrol_tabhost .w2tabcontrol_tab_center, +.w2tabcontrol .w2tabcontrol_tabhost .w2tabcontrol_over .w2tabcontrol_tab_center, +.w2tabcontrol .w2tabcontrol_tabhost .w2tabcontrol_active .w2tabcontrol_tab_center{background-image:none;} +.w2tabcontrol .w2tabcontrol_tabhost li{display:table-cell;overflow:hidden;/* width:100%; */height:39px;float:none;margin-right:0;} +.w2tabcontrol .w2tabcontrol_tabhost li a{position:relative;top:0;width:inherit;height:39px;margin:0;padding:0;border:1px solid #e0e0e0;border-left:0;border-right:0;border-top:0;background-color:#fff;font-size:12px;/*font-weight:normal;*/line-height:39px;color:#575757;} + +/* .w2tabcontrol .w2tabcontrol_tabhost li:first-child a{border-left:1px solid #e0e0e0;} */ +.w2tabcontrol .w2tabcontrol_tabhost li.w2tabcontrol_active a{z-index:2;/* border-bottom:0; */color:#000;/* line-height:38px; *//* border-color:#3579d4;background-color:#3579d4;color:#fff; */} +.w2tabcontrol .w2tabcontrol_tabhost li.w2tabcontrol_active a:before{content:'';display:block;position:absolute;z-index:10;/* width:100%; */left:10px;right:10px;bottom:-1px;height:2px;background-color:#000;} +.w2tabcontrol .w2tabcontrol_container{position:relative;border:0;height:auto !important;background:none;/* border:solid #e0e0e0;border-width:1px 0 0; */} +.w2tabcontrol .w2tabcontrol_contents{/* height:auto; */} +/* template - tab END */ + +/* box - START */ +.guidebox{text-align:center;padding:20px 10px;} +/* box - END */ + + +/* search - START */ +.searcharea{padding:15px 0;border-top:1px solid #2f3947;border-bottom:1px solid #2f3947;} +.titlearea + .searcharea{border-top:0;} +.tbl_search{width:100%;border:none;} +.tbl_search .w2tb_th{width:150px !important;height:46px;padding:0;padding-right:5px;font-size:14px;color:#000;text-align:left;border:none;background:none;} +.tbl_search .w2tb_td{height:46px;padding:0;/* padding-left:5px; */font-size:14px;border:none;} + +.schtogglearea{position:relative;} +.schtogglearea .btn_schtoggle{display:block;height:40px;text-align:center;font-size:14px;line-height:40px;color:#000;font-weight:bold;box-sizing:border-box;border-bottom:1px solid #0065b2;} +.schtogglearea .btn_schtoggle.on{border-bottom:1px solid #e0e0e0;} +.schtogglearea .btn_schtoggle:after{content:"";display:inline-block;margin:10px 8px;width:8px;height:5px;vertical-align:middle;background:url(../../cm/images/ico_schtoggle_open.png) no-repeat;background-size:100%;} +.schtogglearea .btn_schtoggle.on:after{background:url(../../cm/images/ico_schtoggle_close.png) no-repeat;background-size:100%;} +.schtogglearea .schtoggle_cont{z-index:1;position:absolute;top:40px;left:0;right:0;padding:20px 18px;border-bottom:1px solid #0065b2;background:#fff;} + + + + + + +/* search - END */ + +/* table_input - START */ +/* .table_datainputarea{padding:15px 0;border-top:1px solid #2f3947;border-bottom:1px solid #2f3947;} */ +.tbl_input tbody tr:first-child .w2tb_th, .tbl_input tbody tr:first-child .w2tb_td{border-top:1px solid #2f3947;} +.tbl_input{width:100%;border-left:1px hidden #fff;border-right:1px hidden #fff;_border:none;} +.tbl_input .w2tb_th{width:150px !important;height:32px;padding:0;padding-right:5px;font-size:12px;font-weight:normal;color:#000;text-align:left;border:none;border-bottom:1px solid #e0e0e0;background:none;} +.tbl_input .w2tb_td{height:32px;padding:4px 0;/* padding-left:5px; */font-size:12px;border:none;border-bottom:1px solid #e0e0e0;} +.tbl_input.noline .w2tb_th, .tbl_input.noline .w2tb_td{border:0 !important; /*padding:5px 0;*/} +.tbl_input.noline .w2tb_th{color:#000;} +/* table_input - END */ + + +/* table - START */ +.tbl{width:100%;border-left:1px hidden #fff;border-right:1px hidden #fff; } +.tbl + .tbl {margin-top:20px} +.tbl thead th.w2tb_th, .tbl thead + tbody td.w2tb_td{text-align:center;} +.tbl th.w2tb_th{width:85px;height:24px;padding:8px;text-align:left;/* font-weight:normal; */font-size:12px;color:#000;border-color:#e0e0e0;background-color:#f5f6f8;} +.tbl td.w2tb_td{height:24px;padding:8px;border-color:#e0e0e0;} +.tbl thead th.w2tb_th{width:auto;} + +.w2tb .w2tb_td > div{display:inline-block;} +.w2tb .w2tb_td .w2textbox{display:inline-block; padding:4px 0;line-height:14px;/* height:32px;line-height:32px; */} +.w2tb .w2tb_td > div[class*="w2"], .w2tb .w2tb_td > div > div[class*="w2"]{vertical-align:middle;} +.w2tb .w2tb_td > [class*="w2"] + [class*="w2"], +.w2tb .w2tb_td > .w2group > [class*="w2"] + [class*="w2"]{margin-left:8px;} +.w2tb .w2tb_td .per100, .w2tb .w2tb_td .dbl{margin-left:0 !important;} +.w2tb th.w2tb_th.result, .w2tb td.w2tb_td.result{background-color:#00a05f;color:#fff;} + +.w2tb .btn{height:32px;padding:0 10px;color:#000;border:1px solid #888;box-sizing:border-box;background-color:#fff;} +.w2tb .btn.ico{/* min-width:120px; */padding:0 20px 0 44px;} +.w2tb .btn.ico.search{margin:0;float:right;padding:0 30px 0 54px;background-position:30px center;} +.w2tb .btn.bg{border:none;color:#fff;background-color:#0aa35c;} +.w2tb .btn.w2trigger_disabled{color:#888;background-color:#f5f6f8;} + +.w2tb .grp_files .w2anchor2.file{position:relative;display:inline-block;padding:3px 0 3px 0;margin-right:20px;margin-left:0 !important;font-size:17px;} +.w2tb .grp_files .w2anchor2.file:hover{color:#000;text-decoration:underline;} +.w2tb .grp_files .w2anchor2.file:after{content:",";position:absolute;bottom:5px;/* left:-19px; */display:inline-block;} +.w2tb .grp_files .w2anchor2.file:last-child:after{display:none;} +.w2tb .grp_files{margin-left:10px;} + +/* table - END */ + + +/* grid - START */ +.grd{width:100%;/*min-height:101px;*/min-height:79px;border-top:0;border-bottom:1px solid #e0e0e0} + +/* .grd tr:nth-child(even) {background: #ff0000} colmerge */ +/* .grd tr:nth-child(even) {background: #ccc} +.grd [colmerge*="true"]{background:#fff;} */ +/* .grd [colmerge*="true"][border-top-width*="0px"]{background:#fff;} */ + +.grd.twoheader{/*min-height:140px;*/min-height:118px;} +.grd .gridHeaderTableDefault{border-left:1px hidden #fff;border-right:1px hidden #fff;} +.grd th.gridHeaderTDDefault, .grd td.gridBodyDefault{height:38px !important;border-color:#e0e0e0;} +.grd th.gridHeaderTDDefault nobr {padding:0;} +.grd .w2checkbox_input{position:absolute;top:0;left:0;opacity:0;width:20px;height:20px;} +.grd .w2checkbox_label{position:relative;display:inline-block;width:17px;height:17px;font-size:0;line-height:0;background:url(../../cm/images/ico_check.png) no-repeat;background-size:17px;} +/**/ +.grd input[type="checkbox"]{visibility:hidden;width:1px;height:1px;} +.grd input[type="checkbox"]:checked + .w2checkbox_label{background:url(../../cm/images/ico_check.png) no-repeat 0 -17px;background-size:17px;} +.grd input[type="checkbox"][disabled=true]:checked + .w2checkbox_label{background:url(../../cm/images/ico_check.png) no-repeat 0 -34px;background-size:17px;} + +.grd > .w2input{padding:0 2px;box-sizing:content-box;} +.grd tbody tr:last-child td.gridBodyDefault {border-bottom:1px solid #fff} + +.grd th.gridHeaderTDDefault{font-size:12px;color:#000;font-weight:normal;background:none;background-color:#f5f6f8;} + +.grd td.gridBodyDefault, +.grd td.gridBodyDefault_rowNumber{font-size:12px;_background-color:#fff !important;} +.grd td.gridBodyDefault button{width:auto !important;height:32px !important;padding:0 10px;min-width:70px;border-radius:4px;cursor:pointer;background:#fff;} +.grd td.gridBodyDefault.w2grid_default_disabled > button{cursor:default;border:0;background:none;} +.grd td.gridBodyDefault.w2grid_default_disabled > nobr > button{color:inherit;font-size:inherit;cursor:default;border:none;} +.grd td.gridBodyDefault.multiline{white-space:normal;text-overflow:inherit;} +.grd td.gridBodyDefault.multiline nobr{white-space:normal;word-break:break-all} +.grd td.gridBodyDefault.cell_header {background-color:#f5f6f8 !important;} + + +.grd td.gridBodyDefault.gridBodyDefault_select{background:none;} +.grd td.gridBodyDefault.gridBodyDefault_select nobr{/* max-width:135px; */width:90% !important;height:32px;line-height:32px;margin:0 auto;padding:0 20px 0 10px;border:1px solid #e0e0e0;border-radius:4px;box-sizing:border-box;-moz-box-sizing:border-box;background:url(../../cm/images/ico_select.png) no-repeat right 10px center;} +.grd td.gridBodyDefault.gridBodyDefault_select .w2selectbox{width:90% !important;} + +/* .grd td.gridBodyDefault.w2grid_default_readonly > button{cursor:default;border:0;background:none;} */ + +.grd .grid_body_row:hover td.gridBodyDefault{background-color:#f6fdf8 !important;} +.grd_noresult{width:100% !important;height:38px !important;top:auto !important;left:0 !important;bottom:0;line-height:48px;padding:0 0 7px 0 !important; color:#575757 !important;text-align:center;border:0 !important;background:none !important;} + + + +.grd_noresult.h_row2 { top:80px !important} +/* grid - END */ + + +/* notice - START */ +.noticearea{border-top:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0;} +.noticearea li{padding:10px 0;border-top:1px solid #e0e0e0;} +.noticearea li:first-child{border-top:0;} +.noticearea li .num{width:30px;font-size:12px;color:#575757;vertical-align:middle;} +.noticearea li .num + .grp_img{padding-right:40px;display:none;} +.noticearea li .grp_cont{width:100%;vertical-align:top; } +.noticearea li .grp_cont .tit{font-weight:bold;font-size:13px;color:#000;} +.noticearea li .grp_cont .date{margin-top:7px;} +.noticearea li .grp_cont .cont{margin-top:7px;max-height:48px;text-overflow:ellipsis;white-space:nowrap; overflow: hidden; text-overflow:ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; word-wrap:break-word; } +.noticearea li .grp_img{width:250px;} +.noticearea li .grp_img + .grp_cont{padding-right:0;} +.noticearea li .grp_img .imgbox{display:none;width:250px;height:160px;overflow:hidden;vertical-align:top;background-color:#f5f6f8;} +.noticearea li .num + .grp_img .imgbox{display:block;} +.noticearea li .grp_cont .tit.qu{position:relative;padding:4px 0 0 30px;font-size:12px;} +.noticearea li .grp_cont .tit.qu:before{content:"Q";position:absolute;top:0;left:0;width:19px;height:19px;color:#fff;text-align:center;line-height:20px;font-weight:normal;border-radius:19px;background-color:#0065b2;} +.noticearea li .grp_cont .tit.an, .noticearea li .grp_cont .cont.an{position:relative;padding:3px 0 0 30px;margin-top:10px;/*height:55p;*/ min-height:16px;font-size:12px;line-height:14px;color:inherit;font-weight:normal;white-space:normal;text-overflow:inherit; overflow: hidden; text-overflow:ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; word-wrap:break-word; } +.noticearea li .grp_cont .tit.an, .noticearea li .grp_cont .cont.an > p {margin-left:0 !important; text-indent:0 !important;} +.noticearea li .grp_cont .tit.an, .noticearea li .grp_cont .cont.an * {font-size:12px !important; line-height:inherit !important;} +.noticearea li .grp_cont .tit.an:before, .noticearea li .grp_cont .cont.an:before{content:"A";position:absolute;top:0;left:0;font-size:11px !important;text-align:center;line-height:20px;width:19px;height:19px;border-radius:19px;background-color:#f3f3f5;} + + + +.msearchlist{border-top:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0;} +.msearchlist li{padding:15px 0 12px 0;border-top:1px solid #e0e0e0;} +.msearchlist li .cell{vertical-align:middle;} +.msearchlist li:first-child{border-top:0;} +.msearchlist li .grp_cont{vertical-align:top;} +.msearchlist li .grp_cont .cont01{display:inline-block;min-width:30px;height:22px;line-height:22px;padding:0 15px;margin-bottom:5px;font-size:11px;color:#fff;text-align:center;background-color:#008d9e;} +.msearchlist li .grp_cont .cont01.mb15{margin-top:5px;margin-bottom:5px !important;} +.msearchlist li .grp_cont .cont02, .msearchlist li .grp_cont .cont03{height:20px;line-height:20px;font-size:11px;color:#000;} +.msearchlist li .grp_cont .cont04, .msearchlist li .grp_cont .cont05{height:20px;line-height:20px;font-size:11px;text-align:right;} +.msearchlist li .grp_cont .btn{margin-bottom:5px;} +.msearchlist li .grp_cont .btn.w2trigger_disabled{color:#888;background-color:#f5f6f8 !important;} +.msearchlist_noresult{height:50px;line-height:50px;margin-top:-1px;border-bottom:1px solid #e0e0e0;color:#000;text-align:center;background-color:#fff;} + + +/* .noticearea.files li{display:flex !important;} */ +.noticearea.files li .num{flex:none;vertical-align:middle;} +.noticearea.files li .grp_cont{padding-right:0;width:auto;} +.noticearea.files li .grp_cont:hover{text-decoration:underline;} +.noticearea.files li .grp_cont .cont, .noticearea.files li .grp_cont .tit{display:block;} +.noticearea.files li .grp_cont .cont{line-height:inherit;color:inherit;} + +.notice_nodata{border-top:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0;padding:20px 0;} +.noticearea + .notice_nodata {border-top:0;} +.notice_nodata .grp_nodata{display:inline-block;margin:0 auto;} +.notice_nodata .ico_nodata{display:block;width:60px;height:60px;margin:0 auto;background:url(../../cm/images/ico_notice_nodata.png) no-repeat;background-size:100%;} +.notice_nodata .txt_nodata{display:block;font-size:12px;text-align:center;margin-top:20px;} +.notice_nodata .info_nodata{margin-top:90px;padding:10px 20px;border-top:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0;} +.notice_nodata .info_nodata li{position:relative;padding:8px 15px;} +.notice_nodata .info_nodata li:before{content:"";display:block;width:3px;height:3px;position:absolute;top:14px;left:0;background-color:#2f3947;} + + +.noticeviewarea{} +.noticeviewarea .view_top{width:100%;padding:0px 0 10px 0;/* border-top:1px solid #2f3947; */border-bottom:1px solid #e0e0e0;} +.noticeviewarea .view_top .tit{font-weight:bold;font-size:13px;color:#000;} +.noticeviewarea .view_top .date{margin-top:6px;} +.noticeviewarea .view_top .cont{margin-top:5px;} +.noticeviewarea .view_cont{min-height:160px;/*max-height:800px;*/padding:10px;overflow-y:auto;box-sizing:border-box;/* background-color:#f5f6f8; */} +.noticeviewarea .view_cont > p {text-indent:0!important; margin:0 !important; } +.noticeviewarea .view_cont * {font-size:12px !important; font-family:inherit !important; line-height:inherit !important} + +.noticeviewarea .view_nextprev{border-top:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0;} +.noticeviewarea .view_nextprev li{height:40px;border-top:1px solid #e0e0e0;} +.noticeviewarea .view_nextprev li:first-child{border-top:0;} +.noticeviewarea .view_nextprev li .cell{/* line-height:40px; */} +.noticeviewarea .view_nextprev li .cell.tit{width:100%;padding-left:10px;} +.noticeviewarea .view_nextprev li .cell.tit a{display:block;padding:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +.noticeviewarea .view_nextprev li .cell.tit a:hover{text-decoration:underline;} +.noticeviewarea .view_nextprev li .cell:first-child{width:50px;height:40px;line-height:40px;} +.noticeviewarea .view_nextprev li.prev .cell:first-child{background:url(../../cm/images/ico_notice_up.png) no-repeat right center;background-size:11px auto;} +.noticeviewarea .view_nextprev li.next .cell:first-child{background:url(../../cm/images/ico_notice_down.png) no-repeat right center;background-size:11px auto;} +.noticeviewarea.files .file{position:relative;display:inline-block;padding:3px 0 3px 0;margin-right:20px;font-size:12px;} +.noticeviewarea.files .file:hover{color:#000;text-decoration:underline;} +.noticeviewarea.files .file:before{content:",";position:absolute;bottom:5px;left:-19px;display:inline-block;} +.noticeviewarea.files .file:first-child:before{display:none;} +/* notice - END */ + + + + + + + + + + +/* member - START */ +.member_guidebox{padding-bottom:20px;text-align:center;} +.formbox + .member_guidebox {margin-top:20px} +.member_guidebox.line{border-bottom:1px solid #e0e0e0;} +.member_guidebox .tx01{font-size:16px;color:#000; line-height:1} +.member_guidebox .tx02{margin-top:10px;font-size:12px;} +.member_guidebox .tx01 + .tx02 {margin-top:6px;} +.member_guidebox .tx03{} +.member_guidebox .tbl_input.noline{margin:0 auto;margin-top:20px;} + +.member_joinbox{display:block;table-layout:fixed;width:100%;border:1px solid #e0e0e0;box-sizing:border-box;background-color:#fff;} +.member_joinbox + .member_joinbox{margin-top:20px;} +.member_joinbox:first-child{/*margin-top:20px;*/} +.member_joinbox > li{position:relative;display:block;height:auto;padding:20px;text-align:center;box-sizing:border-box;} +.member_joinbox > li:before{content:"";position:absolute;top:0px;left:20px;right:20px;height:1px;background-color:#e0e0e0;} +.member_joinbox > li > .formbox:first-child > li > .titlearea{padding-top:0;} +.member_joinbox > li > .formbox > li:first-child > .titlearea{padding-top:0;} + +.member_joinbox > li:first-child:before{display:none;} +.member_joinbox > li .tit{font-size:16px;display:block;} +.member_joinbox > li .ico{width:40px;height:50px;margin:0 auto;background-size:contain !important;} +.member_joinbox > li .tx{margin-top:20px;font-size:12px;color:#575757;text-align:center;font-weight:bold;} +.member_joinbox > li .tx.comp{font-size:12px;color:#575757;font-weight:normal;} +.member_joinbox > li .stx{display:block;margin-top:5px;font-size:12px;} +.member_joinbox > li > .btn{margin:20px 10px 0 10px; /*margin-left:0;*/ } +.member_joinbox > li .tbl_input{margin:0 auto;} +.member_joinbox > li.join01 .ico{width:34px; height:33px;background:url(../../cm/images/ico_member_join01.png) no-repeat center center;} +.member_joinbox > li.join02 .ico{width:35px; height:34px;background:url(../../cm/images/ico_member_join02.png) no-repeat center center;} +.member_joinbox > li.join03 .ico{width:35px; height:33px;background:url(../../cm/images/ico_member_join03.png) no-repeat center center;} +.member_joinbox > li.cert01 .ico{width:35px;height:40px;background:url(../../cm/images/ico_member_cert01.png) no-repeat center center;} +.member_joinbox > li.cert02 .ico{width:39px;height:37px;background:url(../../cm/images/ico_member_cert02.png) no-repeat center center;} +.member_joinbox > li.cert_comp .ico{width:60px;height:60px;border-radius:50%;background:#f5f6f8 url(../../cm/images/ico_member_cert_comp.png) no-repeat center center;background-size:50% !important;} +.member_joinbox > li.cert_company .tbcell{/* width:460px; */margin:0 auto;margin-top:10px;} +.member_joinbox > li.cert_company .tbcell:first-child{margin-top:0;} +.member_joinbox > li.cert_company .ico{width:60px;height:60px;border-radius:50%;background:#f5f6f8 url(../../cm/images/ico_member_company_comp.png) no-repeat center center;background-size:50% !important;} +.member_joinbox > li.ceo_comp .ico{width:60px;height:60px;border-radius:50%;background:#f5f6f8 url(../../cm/images/ico_member_ceo_comp.png) no-repeat center center;background-size:50% !important;} +.member_joinbox > li.memberetc .ico{width:60px;height:60px;border-radius:50%;background:#f5f6f8 url(../../cm/images/ico_memberetc.png) no-repeat center center;background-size:50% !important;} + +.member_joinbox > li.join_comp .tx{font-size:20px;font-weight:normal;color:#000;} +.member_joinbox > li.join_comp .stx{font-size:11px;/*color:#000;*/} +.member_joinbox > li.join_comp .ico{width:60px;height:60px;border-radius:50%;background:#f5f6f8 url(../../cm/images/ico_member_complete.png) no-repeat center center;background-size:50% !important;} + + +.member_protect{margin-top:0px;} +.member_protect .ico{width:45px;height:45px;vertical-align:middle;border-radius:90px;background:#fff url(../../cm/images/ico_member_protect.png) no-repeat center center;background-size:50% !important;} +.member_protect .ico.fax{background:#fff url(../../cm/images/ico_member_fax.png) no-repeat center center;background-size:50%;} +.member_protect .ico.email{background:#fff url(../../cm/images/ico_member_email.png) no-repeat center center;background-size:50%;} +.member_protect .txt{width:100%;padding-left:8px;padding-top:2px;/* font-size:11px; */line-height:14px;vertical-align:middle; color:#000;} +.member_protect .fwb{font-weight:normal !important;} +/* .member_protect .txt .tx01{font-size:16px;color:#000;} +.member_protect .txt .tx02{margin-top:10px;} */ +/* .mobile_wrap .mprotect{background-color:#f3f3f5;} +.mobile_wrap .mprotect .member_protect{margin-top:0;} +.mobile_wrap .mprotect .ico{width:45px;height:45px;background-color:#fff;background-size:50%;} +.mobile_wrap .mprotect .txt{font-size:11px;line-height:14px;} */ + + +.member_flow{padding:30px 0;text-align:center;/* border-top:1px solid #2f3947; */border-bottom:1px solid #2f3947;} +.member_flow li{display:inline-block;margin:0 25px;font-size:16px;line-height:30px;color:#000;} +.member_flow li:before{content:"";display:inline-block;width:30px;height:30px;text-align:center;line-height:34px;border-radius:30px;margin-right:10px;font-size:16px;color:#fff;background-color:#888;} +.member_flow li.on:before{background-color:#0aa35c;} +.member_flow li.on{color:#0aa35c;} +.member_flow li.on:after{content:"";width:5px;height:7px;display:inline-block;margin-left:5px;background:url(../../cm/images/ico_member_flow_arr.png) no-repeat center center;} +.member_flow li.flow01:before{content:"1";} +.member_flow li.flow02:before{content:"2";} +.member_flow li.flow03:before{content:"3";} +.member_flow li.flow04:before{content:"4";} +.member_flow li.flow05:before{content:"5";} +/* .member_flow + .member_guidebox{border-top:0;} */ + +.member_agreebox{border:1px solid #e0e0e0;box-sizing:border-box;margin-bottom:30px;} +.member_agreebox .agreetitle{height:24px;padding:14px;border-bottom:1px solid #e0e0e0;_box-sizing:border-box;} +.member_agreebox .agreetitle .w2checkbox{color:#000;} +.member_agreebox .agreecont{height:210px;padding:20px;overflow:auto;} +.member_agreebox .agreecont .agreearea dl:first-child{margin-top:0;} +.member_agreecont{padding:20px;} +.bt_agree{float:right;padding:4px 0;color:#0aa35c;text-decoration:underline;} + +.member_txcarbox{height:42px;line-height:42px;text-align:center;font-size:13px; font-weight:bold; color:#0065b2;border:2px solid #0065b2;background-color:#fff; margin-bottom:20px} +.member_txregistercar{height:48px;line-height:48px;text-align:center;border-bottom:1px solid #e0e0e0;} +.member_txcarbox2{border:1px solid #e0e0e0; margin-top:20px; padding:20px;} +.member_txcarbox2 > .sst1 {font-size: 12px; text-align:center; margin-bottom:20px} +.member_txcarbox2 > .sst2 {font-size: 11px; margin-bottom:5px; font-weight:bold; color:#000} +.member_txcarbox2 > .sst3 {font-size: 10px; margin-bottom:10px; } +.member_txcarbox2 > .w2textbox:last-child {margin-bottom:0;} +.imgbox_round {margin:0 auto; margin-bottom:20px; width:30px; height:30px; border:solid 15px #f3f3f5; text-align:center; vertical-align:middle; border-radius:50%;} + +/* member - END */ + + +/* agree - START */ +.agreearea{padding:20px;} +.agreearea:before, .agreearea:after{display:block;visibility:hidden;clear:both;height:0px;font-size:0;line-height:0;content: '.'} +.agreearea .sst {line-height: 20px} +.agreearea dl{margin-top:30px;} +.agreearea dl:first-child{margin-top:0;} +.agreearea dl dt{font-size:17px;color:#000;} +.agreearea dl dt.box{border:2px solid #0065b2;padding:20px;font-weight:normal;font-size:12px;color:#575757; text-align:center; word-break:keep-all;} +.agreearea dl dd, .agreearea dl dd > ul{overflow:hidden;} +.agreearea dl dd > ul > li{/*margin-top:25px;*/margin-top:20px;} +.agreearea dl dd > ul > li > .stit{/*margin-bottom:15px;*/margin-bottom:10px; margin-top:30px; font-size:13px;font-weight:bold;color:#000;} +.agreearea dl dd > ul > li > .stit + .w2textbox {/*line-height: 20px;*/} +.agreearea .tbl th.w2tb_th{font-weight:bold;} +.agreearea .tbl th.w2tb_th, .agreearea .tbl td.w2tb_td{height:24px;} +/* agree - END */ + + +/* login - START */ +.login_member{padding:60px 25px;text-align:center;} +.login_member .tit{margin-bottom:60px;font-size:20px;color:#000;} +.login_member .tbcell{width:460px;margin:0 auto;margin-top:10px;} +.login_member .tbcell:first-child{margin-top:0;} +.bt_idfind, .bt_pwfind{margin-right:10px;padding-right:10px;font-size:12px;background:url(../../cm/images/ico_login_arr.png) no-repeat right center;} +.bt_idfind:hover, .bt_pwfind:hover{text-decoration:underline;} +.login_member .tbl_input{width:580px;margin:0 auto;} +.login_member .tbl_input .w2tb_th, .login_member .tbl_input .w2tb_td{border:0 !important;padding:5px 0;} +.login_member .tbl_input .w2tb_th{color:#000;} +.bt_join{display:inline-block;color:#1ab26b !important;padding-right:10px;font-size:12px;background:url(../../cm/images/ico_login_arrgreen.png) no-repeat right center;} +.bt_join:hover{text-decoration:underline;} +.bt_more{display:inline-block;color:#0065b2 !important;padding-right:10px; /*margin:5px 0;*/font-size:12px;background:url(../../cm/images/ico_more_arr.png) no-repeat right center; background-size: auto 8px} +.bt_more:hover{text-decoration:underline;} + + +.login_nonmember{margin-bottom:20px;} +.login_nonmember .tit{font-size:20px;color:#000;} + +.member_joinbox > li.idfind .tx{font-size:20px;font-weight:normal;color:#000;} +.member_joinbox > li.idfind .stx{font-size:12px;color:#000;} +.member_joinbox > li.idfind .ico{width:60px;height:60px;border-radius:50%;background:#f5f6f8 url(../../cm/images/ico_login_idfindno.png) no-repeat center center;} +.member_joinbox > li.idfind .btn{margin:20px 5px 0 5px;} +/* login - END */ + + +/* popup - START */ +.poparea{padding:15px;overflow:auto;height:calc(100% - 40px); box-sizing:border-box;} /*팝업 약관 스크롤 영역 수정*/ +/*.poparea{position:absolute;top:0;left:0;right:0;bottom:40px;padding:15px;overflow:auto;}*/ +.poparea .tbx_message {text-align:center;} +.poparea.nofixbtn{bottom:0;} +.poparea .member_joinbox > li{padding:20px;} +.poparea .popguidebox{padding-bottom:15px;text-align:center;} +.poparea .poplinebox{padding:15px;/* margin-top:20px; */text-align:center;border:1px solid #e0e0e0;} +.poparea .poplinebox > .btn{margin-top:20px;} +.poparea .tbl_input + .poplinebox{margin-top:15px;} +.poparea .btnarea{padding-top:15px;margin-top:15px;} +.poparea .contarea.bg_gray{margin:20px -15px 0 -15px;padding:15px;} + +.btnarea.flex_row.pop{position:absolute;bottom:0;margin:0;} +.btnarea.flex_row.pop .btn.big{border-radius:0;margin:0;} +.btnarea.flex_row.pop .btn.big + .btn.big{border-left:1px solid #004c86;} +.btnarea.flex_row.pop .btn.big.line{border:0;border-top:1px solid #004c86;} +.btnarea.flex_row.pop .btn.big.line + .btn.big{border-left:0;} + +.pop_agreerwrap {} +.pop_agreerwrap .obj1 { border:1px solid #e0e0e0; padding:20px;} +.pop_agreerwrap .agreetitle{padding:0 10px 10px 10px;} +.pop_agreerwrap .agreetitle .w2checkbox{color:#000;} +.pop_agreeregbox .agreecont{padding:15px;border:1px solid #e0e0e0;box-sizing:border-box;} +.pop_agreeregbox .agreecont .listdash{font-size:13px;} + +.pop_agreecont{/*bottom:80px;*/padding:0px;height:calc(100% - 40px);} /*팝업 약관 스크롤 영역 수정*/ +.pop_agreechk{position:absolute;bottom:40px;width:100%;height:40px;border-top:1px solid #e0e0e0;box-sizing:border-box;} +.pop_agreechk .w2checkbox{margin:10px 0 0 20px;} + +.card_regist{display:flex;flex-wrap:wrap; border-top:1px solid #e0e0e0;border-left:1px solid #e0e0e0;} +.card_regist li{width:33.333%; min-height:50px; overflow:hidden; display:block; text-align:center; } +.card_regist li a {padding:8px 7px; width:100%; height:100%; box-sizing:border-box; display:flex; border-right:1px solid #e0e0e0; border-bottom:1px solid #e0e0e0; flex-direction: column; + justify-content: center;} +.card_regist li a img {width:100%; max-width:126px; margin:0 auto;} +.card_regist li a .cardname{display:block;width:100%; font-size:11px; font-weight:bold;} +.card_regist li a img + .cardname{margin-top:7px;} + +.pop_agreecont .agreearea{padding:18px;} +/* popup - END */ + + +/* car photo - START */ +.carphoto{display:block;} +.carphoto li{display:inline-block;width:50%;height:auto;margin:-1px 0 0 -1px;vertical-align:top;} +.carphoto li .cpbox{position:relative;display:block;/* width:100%;height:auto; */padding:5px;text-align:center;border:1px solid #e0e0e0;box-sizing:border-box;} +.carphoto li .cpbox img{width:100%;height:auto;} +/* .carphoto li .bt_card.chk:before{content:"";display:block;position:absolute;top:0;left:0;width:100%;height:100%;border:2px solid #0aa35c;box-sizing:border-box;} +.carphoto li .bt_card .cardlogo{position:absolute;top:25px;left:50%;width:93px;margin-left:-46px;} */ +/* car photo - END */ + +/* mygreentrafic_main - START */ +.gt_main{background-color:#00a05f; padding:20px 18px;} +.gt_main .tx01, .gt_main .tx02{color:#fff; line-height:1;} +.gt_main .tx01 + .tx02 {margin-top:7px} + + +.gt_main{display:block; border-bottom:4px solid #f3f3f5} +.gt_main .grp_gtm{margin-top:18px;} +.gt_main .grp_gtm li{display:inline-block;width:50%;height:32px;vertical-align:top; box-sizing:border-box; margin-bottom:10px} + +.gt_main .grp_gtm li .bt_gt{z-index:1;position:relative;display:block;width:100%;height:32px;padding-left:10px;line-height:32px;text-align:left;font-size:12px;color:#00a05f; border-radius:5px;box-sizing:border-box;background:#fff url(../../cm/images/ico_member_arr.png) no-repeat right 10px center;background-size:5px 8px;font-weight: bold;} +.gt_main .grp_gtm li:nth-child(1), .gt_main .grp_gtm li:nth-child(3) {padding-right:5px;} +.gt_main .grp_gtm li:nth-child(2), .gt_main .grp_gtm li:nth-child(4) {padding-left:5px;} +.gt_main .grp_gtm li:nth-child(3), .gt_main .grp_gtm li:nth-child(4) {margin-bottom:0;} + + + +/* .card_regist li .bt_card.chk:before{content:"";display:block;position:absolute;top:0;left:0;width:100%;height:100%;border:2px solid #0aa35c;box-sizing:border-box;} +.card_regist li .bt_card .cardlogo{position:absolute;top:25px;left:50%;width:93px;margin-left:-46px;} +.card_regist li .bt_card .cardname{display:block;width:100%;margin-top:20px;margin-top:60px;} +.card_regist li.nocard .cardlogo, .card_regist li.nocard .cardname{display:none;} */ + +/* mygreentrafic_main - END */ + + +/* address - START */ +.poparea.address_pop {padding-top:0;} +.address_pop{top:40px;} +.address_search{position:relative;height:40px;border-bottom:1px solid #0065b2;} +.address_search .w2input{width:100%;height:40px;border:0;padding-right:70px;} +.address_search .btn_address_clear{display:block;position:absolute;top:0;right:45px;width:15px;height:40px;font-size:0;line-height:0;background:url(../../cm/images/ic-pop-del.png) no-repeat center center;background-size:10px;} +.address_search .btn_address_search{display:block;position:absolute;top:0;right:15px;width:25px;height:40px;font-size:0;line-height:0;background:url(../../cm/images/ico_address_search.png) no-repeat center center;background-size:18px;} +.address_tit{height:40px;line-height:40px;text-align:center;font-size:13px;color:#000;} +.addressarea{/* border-top:1px solid #e0e0e0; */} +.addressarea li{padding:10px 0;border-top:1px solid #e0e0e0;} +/* .addressarea li:first-child{border-top:0;} */ +.addressarea li .grp_cont{width:100%;padding-right:10px;vertical-align:top;} +.addressarea li .grp_cont .num{font-weight:bold;font-size:12px;color:#000;} +.addressarea li .grp_cont .cont{position:relative;height:22px;margin-top:7px;padding-left:60px;margin-top:8px;font-size:11px;line-height:14px;color:inherit;font-weight:normal;white-space:normal;text-overflow:inherit;} +.addressarea li .grp_cont .cont .tx{display:table-cell;height:22px;vertical-align:middle;} +.addressarea li .grp_cont .cont.tag:before{position:absolute;top:0;left:0;font-size:11px !important;text-align:center;color:#fff;line-height:22px;width:50px;height:22px;} +.addressarea li .grp_cont .cont.tag.ty01:before{content:"도로명";background-color:#00a05f;} +.addressarea li .grp_cont .cont.tag.ty02:before{content:"지번";background-color:#888888;} +.address_pagelist{position:absolute;bottom:0;left:0;right:0;padding:20px 0;margin:0;border-top:1px solid #e0e0e0;background-color:#fff;} +/* address - END */ + + + + +/* MOBILE - START */ +.mobile_wrap .mprotect{background-color:#f3f3f5;} +.mobile_wrap .mprotect .member_protect{margin-top:0;} +.mobile_wrap .mprotect .ico{width:45px;height:45px;background-color:#fff;background-size:50%;} +.mobile_wrap .mprotect .txt{font-size:11px;line-height:14px;} +/* MOBILE - END */ + + + +/* etc penaltyinfo - STARt */ +.paneltyinfo{overflow:hidden;background-color:#0065b2;} +.paneltyinfo .contarea{overflow:hidden;} + +.paneltyinfobox{position:relative;margin:0 18px 31px 18px;padding-bottom:20px;box-shadow:0px 0px 10px 0px #004479;background-color:#fff;} +.paneltyinfobox:after{content:"";display:block;position:absolute;bottom:-10px;left:0;right:0;height:15px;background:#fff url(../../cm/images/bg_penalty_contbtm.png) repeat-x left bottom; background-size:18px 10px;} +.paneltyinfobox .grp_name{height:50px;line-height:50px;text-align:center;font-size:17px;color:#000;} +.paneltyinfobox .grp_name .carname{color:#0065b2;} +.paneltyinfobox .grp_carphoto{text-align:center;} +.paneltyinfobox .grp_carphoto img{width:100%;height:auto;} +.paneltyinfobox .formbox{padding:20px;} +.paneltyinfobox .formbox li{padding:0;} +.paneltyinfobox .formbox .fl{} +.paneltyinfobox .formbox .fr{font-weight:bold;color:#000;} +.paneltyinfobox .formbox .penelty_money{margin-top:10px;padding:10px 0;border-top:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0;} +.paneltyinfobox .formbox .penelty_money .fl{font-weight:bold;} +.paneltyinfobox .btnarea{width:auto;padding:0 20px;margin-top:0;} +.paneltyinfobox .btnarea .btn{margin:0;padding:0;border-radius:40px;display:inline-flex; align-items:center;justify-content :center;} +.paneltyinfobox .btnarea .btn.leftround{border-top-right-radius:0px;border-bottom-right-radius:0px;} +.paneltyinfobox .btnarea .btn.rightround{border-top-left-radius:0px;border-bottom-left-radius:0px;} +.paneltyinfobox .btnarea.flex_row .btn + .btn {margin-left: 0;} + +.paneltyinfobox .paneltyinfo_over{padding:0 18px 20px 18px;margin-bottom:10px;text-align:center;border-bottom:1px solid #e0e0e0;} +.paneltyinfobox .paneltyinfo_over .titbox{height:42px;line-height:42px;font-size:14px;text-align:center;border:2px solid #0065b2;color:#0065b2; font-weight:bold} +.paneltyinfobox .paneltyinfo_over .ico{width:60px;height:60px;margin:20px auto;border-radius:60px;background:#f3f3f5 url(../../cm/images/ico_penaltyinfo_over.png) no-repeat center center;background-size:50%;} +.paneltyinfobox .paneltyinfo_over .tx01{font-size:13px;color:#000;font-weight:bold;} +.paneltyinfobox .paneltyinfo_over .tx02{margin-top:10px;color:#575757;} + + +.paneltyinfo. .bg_green {} +.paneltyinfo .ex_tit{font-size:11px;color:#fff; margin-bottom:5px;font-weight:bold;} +.paneltyinfo .ex_tit.ico01 {background:url(../../cm/images/ic-sale.png) no-repeat left center; background-size:25px 20px; padding-left:30px; line-height:20px} +.paneltyinfo .bg_green{font-size:12px; color:#fff;} + +.paneltyinfo .txacc{color:#fff;margin-top:8px;line-height:16px;} + +.paneltyinfo .greenbox{padding:20px 18px;background-color:#00a05f;} +.paneltyinfo .greenbox .img{display:inline-block; width:30px; height:30px; background: url(../../cm/images/ico_penaltyinfo_sale.png) no-repeat left top;background-size:auto 18px;} +.paneltyinfo .greenbox .grp_txt{vertical-align:middle;padding-left:5px;} +.paneltyinfo .greenbox .grp_txt .tx01{display:inline-block; color:#fff;font-size:13px; vertical-align: top;} +.paneltyinfo .greenbox .grp_txt .tx02{font-size:11px;line-height:14px;color:#fff;} + +/* etc penaltyinfo - END */ + + +/* files list - START */ +.grp_fileslist{} +.grp_fileslist li:first-child {margin-top:7px} +.grp_fileslist li:last-child {padding-bottom:0;} +.grp_fileslist li{position:relative;height:15px;padding:5px;} +.grp_fileslist .file_del{display:inline-block;position:absolute;top:5px;left:0;width:15px;height:15px;vertical-align:middle;font-size:0;line-height:0;background:url(../../cm/images/btn_file_delete.png) no-repeat center center;background-size:100%;} +.grp_fileslist .file_name{display:inline-block;height:15px;line-height:16px;vertical-align:middle;margin-left:15px;} +.grp_fileslist .file_name:hover{text-decoration:underline;} +.grp_fileslist .file_name.down{padding-left:20px;margin-left:0;background:url(../../cm/images/btn_file_down.png) no-repeat left center;background-size:15px;} + +.grp_btn_files{position:relative;} +.grp_btn_files .w2multiupload_uploader{position:absolute;top:0;left:0;width:69px !important;margin-left:0 !important;height:32px !important;/* visibility:hidden; */} +.grp_btn_files .w2multiupload_uploader input{cursor:pointer;} + +/*운행제한 제외대상 확인하기*/ +.grp_agree_cont {} +.m_content .contarea.bg_gray .grp_agree_cont{margin-top:-18px;} +.grp_agree_cont > .sst {margin:0 0 10px 0; height:45px; line-height:45px; font-size:14px; border-bottom: 1px solid #fff; text-align: center;} +.grp_agree_cont .cb {margin-bottom:10px;} + +.grp_agree_cont .cb .fl.txt{height:21px; line-height:21px;} +.grp_agree_cont .cb .bt_more {height:21px; line-height:21px;} +.grp_agree_cont .cb.btns {margin-bottom:0;} +.grp_agree_cont .cb.btns .btn {margin-top:5px;} +.grp_agree_cont .grp_Info {margin-top:10px; padding-top:10px; border-top:1px solid #ffffff; text-align:left;} + +/* files list - END */ + + +/* 모바일사이즈 - 320이하일때 */ +@media all and (max-width:320px){ +} + +/* 모바일사이즈 - 768이상일때 */ +@media all and (min-width:768px){ +} + +/* PC사이즈 - 1024이상일때 */ +@media all and (min-width:1034px){ +} + + +@media all and (min-height:600px){ +/* .main_wrap .main_autofixed{position:fixed;left:0;right:0;bottom:0;top:inherit;} */ +} + + +/* 현장장비관리 : height 100%, footer 하단 고정 */ +.m_FE_wrap {width:100%; ; display:flex;flex-direction:column; + -ms-flex-pack: justify; height:auto; min-height:100%; position:relative;} +.m_FE_wrap * {font-family:NanumSquareR; color:#555} +.m_FE_wrap .m_content {flex: 1 1 auto;} +.m_FE_wrap .field_login {flex: 1 1 auto;} + + +/* 현장장비관리 : 로그인 */ +.field_login {background:#fff url(../../cm/images/field_equipment/img-login-720.png) no-repeat center bottom ; background-size:100%; min-height:419px } +.field_login h1 {margin-top:15%; margin-bottom:13.5%; /*height:109px;*/text-align:center; display:table; width:100%;} +.field_login h1 .alignbox {display:table-cell; vertical-align:middle;} + +.field_login .form_login {padding:0 18px; } +.field_login .form_login li.con_id, .field_login .form_login li.con_pw{height:30px; border-bottom:1px solid #000000; display:table; width:100%;} +.field_login .form_login li.con_id {margin-bottom:20px;} +.field_login .form_login li.con_id > *, .field_login .form_login li.con_pw > * {display: table-cell;} +.field_login .form_login li .label {width:93px; line-height:29px;height:29px; color:#555; font-size:14px} +.field_login .form_login li .w2input {color:#000; font-size:14px;padding:0; border:0; background:none !important;} +.field_login .form_login li.con_chk {padding-top:10px} +.field_login .w2checkbox .w2checkbox_item input[type="checkbox"]:checked + .w2checkbox_label:before{background:url(../../cm/images/ico_check_2.png) no-repeat 0 -17px;background-size:17px;} +.field_login .w2checkbox .w2checkbox_item input[type="checkbox"]:checked + .w2checkbox_label.w2checkbox_disabled:before{background:url(../../cm/images/ico_check_2.png) no-repeat 0 -34px;background-size:17px;} +.field_login .w2checkbox .w2checkbox_item .w2checkbox_label {color:#555;} + +.field_login .btnarea {padding:0 18px;} +.field_login .btn_login {height:40px; line-height:40px; width:100%; font-size:16px; color:#fff; background-color:#0065b2; border-radius:20px; border:0;} + +/* 모바일사이즈 - 320이하일때 */ +@media all and (max-width:320px){ + .field_login {background-size:110%;} +} + +@media all and (max-width:320px){ + .field_login {background-size:110%;} +} + +/* 가로모드일때 */ +@media all and (orientation:landscape) { + .field_login {min-height:320px} + .field_login h1 {margin-top:0; margin-bottom:0; height:109px;} + .field_login .form_login {padding:0 25%;} + .field_login .btnarea {padding:0 25%;} +} + + + +/* 현장장비관리 : 헤더 */ +.m_FE_header {padding:16px 18px; background:#0065b2; color:#fff; position:fixed; left:0; top:0; right:0; z-index:999} +.m_FE_header h1 {width:110px; height:17px; margin:0 auto; margin-bottom:16px} +.m_FE_header .btn_home {position:absolute; right:18px; top:16px; width:18px; height:16px; background:url(../../cm/images/ic-logout.png) no-repeat right top ; background-size:cover; border:0; text-indent:-999px; overflow:hidden;} + +/*헤더 다음에 오는 .m_content에 헤더 높이만큼 여백 확보*/ +.m_FE_header + .m_content {padding-top:100px} + +/*헤더 : 라디오 버튼*/ +.m_FE_header .w2radio {height:34px; width:100%; border:1px solid #fff; background-color:#fff; border-radius:17px; box-sizing:border-box; display:flex; overflow:hidden;} +.m_FE_header .w2radio .w2radio_item{flex: 1; margin:0} +.m_FE_header .w2radio .w2radio_item + .w2radio_item {margin:0} +.m_FE_header .w2radio .w2radio_item .w2radio_label{margin-left:-1px; height:34px;line-height:34px;padding-left:0;text-align:center;font-size:14px;box-sizing:border-box;-moz-box-sizing:border-box;background-color:#0065b2; border-right:2px solid #fff; font-family:NanumSquareB; color:#fff} +.m_FE_header .w2radio .w2radio_item:last-child .w2radio_label {border-right:0;} +.m_FE_header .w2radio .w2radio_item .w2radio_label:before{display:none;} +.m_FE_header .w2radio .w2radio_item input[type="radio"]:checked + .w2radio_label{color:#0065b2;background-color:#fff;} + + +/* 현장장비관리 : 푸터 */ +.m_FE_footer {background:#f3f3f5; color:#555; padding:30px 15px; text-align:center; font-size:10px} +.m_FE_footer .btns {font-size:12px; letter-spacing: normal; margin-bottom:30px} +.m_FE_footer .btns .w2anchor2 {padding:0 10px; color:#000;border-right:1px solid #e1e1e1; font-family:NanumSquareB;} +.m_FE_footer .btns .w2anchor2:last-child {border-right:0; font-family:NanumSquareR;} +.m_FE_footer .copyright .w2textbox {margin-bottom:10px; font-family:NanumSquareR;} +.m_FE_footer .copyright .w2textbox:last-child {margin-bottom:0;} + + +/* 현장장비관리 : 검색 */ +.grp_src {margin-bottom:20px; border-bottom:1px solid #000; position:relative} +.grp_src .edt_src {border:0; background:none; height:30px; width:100%; padding-left:0; padding-right:70px; box-sizing:border-box; font-size:14px; font-family:NanumSquareB;} +.grp_src .btn_src, .grp_src .btn_clear {position:absolute; top:0; width:30px; height:30px; text-indent:-999px; background-repeat:no-repeat; background-position: center; } +.grp_src .btn_src { right:-6px;background-image:url(../../cm/images/field_equipment/ic-search.png);background-size:15px 15px} +.grp_src .btn_clear{right:24px; background-image:url(../../cm/images/field_equipment/ic-del.png);background-size:16px 14px} + +/*현장장비관리 : 이전페이지 버튼 */ +.grp_btns {margin-bottom:15px;} +.btn_prevPage {width:18px; height:14px;background:url(../../cm/images/field_equipment/ic-back.png) no-repeat center center;background-size:100%; border:0; text-indent:-999px; overflow:hidden;} + + +/*현장장비관리 : 타이틀 */ +.m_FE_wrap .titlearea {padding-bottom:0; margin-bottom:15px; border-bottom:0 !important;} +.m_FE_wrap .titlearea .title {font-size:19px; height:28px; line-height:28px; color:#000; font-family:NanumSquareB;} +/*타이틀 영역 버튼*/ +.m_FE_wrap .titlearea .btn {height:28px;line-height:28px; padding:0 22px; min-width:auto; background:#fff; border:1px solid #0065b2; color:#000; font-size:14px; font-family: NanumSquareB;border-radius:14px;} + + +/* 현장장비관리 : 정상, 장애 범례 */ +.grp_remarks {float:right; margin-top:3px} +.grp_remarks [class*="ico_"] {margin-left:15px; color:#555; font-size:14px; } +.grp_remarks [class*="ico_"]:before {content:''; background:#00cb00; display:inline-block; width:17px; height:17px; margin-right:7px; border-radius:50%;vertical-align:text-bottom; } +.grp_remarks .ico_error:before {background:#f40000} +/* 현장장비관리 : 정상, 장애 범례 - 그리드 내 아이콘*/ +.status_normal, .status_error {display:inline-block; width:17px; height:17px;border-radius:50%; text-indent:-999px; overflow:hidden; vertical-align:middle;} +.status_normal {background:#00cb00;} +.status_error {background:#f40000;} + +/*현장장비관리 : 그리드 */ +.grd_no_h_line {border:0; border-top:1px solid #000; } +.grd_no_h_line .gridHeaderTableDefault {border:0} +.grd_no_h_line th.gridHeaderTDDefault {border:0; background:#f8f8f8;font-size:14px; color:#000 } +.grd_no_h_line td.gridBodyDefault {border:0; border-bottom:1px solid #dfdfe3;font-size:14px; color:#555} +.grd_no_h_line .w2grid_textarea {padding:10px 4px;} +.grd_no_h_line nobr {padding:0;} +.grd_no_h_line .grd_noresult {border-bottom:1px solid #dfdfe3 !important; } + +/*현장장비관리 : TableLayout */ +.tbl_line {border-top:1px solid #000; font-size:14px; border-bottom:1px solid #dfdfe3} +.tbl_line .w2tb_th {background:none; text-align:left; padding-left:0; border:0;color:#000;} +.tbl_line .w2tb_td {border:0; border-bottom:1px solid #dfdfe3; padding:10px 7px; color:#555;} +.tbl_line tbody tr:last-child .w2tb_td {border-bottom:0} + +/*TableLayout 내부 버튼*/ +.tbl_line .btn {height:32px; background:#555555; border-radius:0;border:0; color:#fff; font-family:NanumSquareB; font-weight:normal; font-size:14px; padding:0 11px;} + + +/* 현장장비관리 : Input 요소 컴포넌트 */ +.m_FE_wrap .w2input, +.m_FE_wrap .w2inputCalendar_divInput, +.m_FE_wrap .w2inputCalendar_div, +.m_FE_wrap .w2textarea, +.m_FE_wrap .w2selectbox, +.m_FE_wrap .w2selectbox_native .w2selectbox_native_select +{border-radius:0; font-size:14px; color:#555; border-color:#dfdfe3} +.m_FE_wrap .w2inputCalendar_div {max-width:250px;} +.m_FE_wrap .w2inputCalendar_div_input {width: calc(100% - 40px) !important; } +.m_FE_wrap .w2inputCalendar_divInput {border:1px solid #dfdfe3; text-align:center; padding:0 8px} + +/* 현장장비관리 : 화면 하단 버튼 */ + +.m_FE_wrap .btn.big{height:28px;line-height:28px; background:#fff; border:1px solid #0065b2; color:#000; font-size:14px; font-family: NanumSquareB;border-radius:14px;} +.m_FE_wrap .btn.big.line {border-color:#555} + diff --git a/src/main/webapp/cm/font/NanumBarunGothic.woff b/src/main/webapp/cm/font/NanumBarunGothic.woff new file mode 100644 index 0000000..96891c7 Binary files /dev/null and b/src/main/webapp/cm/font/NanumBarunGothic.woff differ diff --git a/src/main/webapp/cm/font/NanumSquareB.eot b/src/main/webapp/cm/font/NanumSquareB.eot new file mode 100644 index 0000000..08f6dfe Binary files /dev/null and b/src/main/webapp/cm/font/NanumSquareB.eot differ diff --git a/src/main/webapp/cm/font/NanumSquareB.ttf b/src/main/webapp/cm/font/NanumSquareB.ttf new file mode 100644 index 0000000..7711cac Binary files /dev/null and b/src/main/webapp/cm/font/NanumSquareB.ttf differ diff --git a/src/main/webapp/cm/font/NanumSquareB.woff b/src/main/webapp/cm/font/NanumSquareB.woff new file mode 100644 index 0000000..c2b4c76 Binary files /dev/null and b/src/main/webapp/cm/font/NanumSquareB.woff differ diff --git a/src/main/webapp/cm/font/NanumSquareB.woff2 b/src/main/webapp/cm/font/NanumSquareB.woff2 new file mode 100644 index 0000000..7c6b17c Binary files /dev/null and b/src/main/webapp/cm/font/NanumSquareB.woff2 differ diff --git a/src/main/webapp/cm/font/NanumSquareR.eot b/src/main/webapp/cm/font/NanumSquareR.eot new file mode 100644 index 0000000..900dc7a Binary files /dev/null and b/src/main/webapp/cm/font/NanumSquareR.eot differ diff --git a/src/main/webapp/cm/font/NanumSquareR.ttf b/src/main/webapp/cm/font/NanumSquareR.ttf new file mode 100644 index 0000000..9564297 Binary files /dev/null and b/src/main/webapp/cm/font/NanumSquareR.ttf differ diff --git a/src/main/webapp/cm/font/NanumSquareR.woff b/src/main/webapp/cm/font/NanumSquareR.woff new file mode 100644 index 0000000..60c3869 Binary files /dev/null and b/src/main/webapp/cm/font/NanumSquareR.woff differ diff --git a/src/main/webapp/cm/font/NanumSquareR.woff2 b/src/main/webapp/cm/font/NanumSquareR.woff2 new file mode 100644 index 0000000..9b82fd4 Binary files /dev/null and b/src/main/webapp/cm/font/NanumSquareR.woff2 differ diff --git a/src/main/webapp/cm/images/authCheck/home.png b/src/main/webapp/cm/images/authCheck/home.png new file mode 100644 index 0000000..a8812d9 Binary files /dev/null and b/src/main/webapp/cm/images/authCheck/home.png differ diff --git a/src/main/webapp/cm/images/authCheck/logout.png b/src/main/webapp/cm/images/authCheck/logout.png new file mode 100644 index 0000000..304816f Binary files /dev/null and b/src/main/webapp/cm/images/authCheck/logout.png differ diff --git a/src/main/webapp/cm/images/authCheck/noAuth.png b/src/main/webapp/cm/images/authCheck/noAuth.png new file mode 100644 index 0000000..b6348f6 Binary files /dev/null and b/src/main/webapp/cm/images/authCheck/noAuth.png differ diff --git a/src/main/webapp/cm/images/bg_main.png b/src/main/webapp/cm/images/bg_main.png new file mode 100644 index 0000000..703bf83 Binary files /dev/null and b/src/main/webapp/cm/images/bg_main.png differ diff --git a/src/main/webapp/cm/images/bg_main_mbtm01.png b/src/main/webapp/cm/images/bg_main_mbtm01.png new file mode 100644 index 0000000..fc14802 Binary files /dev/null and b/src/main/webapp/cm/images/bg_main_mbtm01.png differ diff --git a/src/main/webapp/cm/images/bg_main_mbtm02.png b/src/main/webapp/cm/images/bg_main_mbtm02.png new file mode 100644 index 0000000..0ebc03c Binary files /dev/null and b/src/main/webapp/cm/images/bg_main_mbtm02.png differ diff --git a/src/main/webapp/cm/images/bg_main_mbtm02_cont01.png b/src/main/webapp/cm/images/bg_main_mbtm02_cont01.png new file mode 100644 index 0000000..e359d5b Binary files /dev/null and b/src/main/webapp/cm/images/bg_main_mbtm02_cont01.png differ diff --git a/src/main/webapp/cm/images/bg_main_mtop01.png b/src/main/webapp/cm/images/bg_main_mtop01.png new file mode 100644 index 0000000..2bcab5b Binary files /dev/null and b/src/main/webapp/cm/images/bg_main_mtop01.png differ diff --git a/src/main/webapp/cm/images/bg_main_mtop01_tit.png b/src/main/webapp/cm/images/bg_main_mtop01_tit.png new file mode 100644 index 0000000..0342db5 Binary files /dev/null and b/src/main/webapp/cm/images/bg_main_mtop01_tit.png differ diff --git a/src/main/webapp/cm/images/bg_main_mtop02.png b/src/main/webapp/cm/images/bg_main_mtop02.png new file mode 100644 index 0000000..d68100a Binary files /dev/null and b/src/main/webapp/cm/images/bg_main_mtop02.png differ diff --git a/src/main/webapp/cm/images/bg_main_mtop02_tit.png b/src/main/webapp/cm/images/bg_main_mtop02_tit.png new file mode 100644 index 0000000..0c34aff Binary files /dev/null and b/src/main/webapp/cm/images/bg_main_mtop02_tit.png differ diff --git a/src/main/webapp/cm/images/bg_main_statuscont.png b/src/main/webapp/cm/images/bg_main_statuscont.png new file mode 100644 index 0000000..3158e85 Binary files /dev/null and b/src/main/webapp/cm/images/bg_main_statuscont.png differ diff --git a/src/main/webapp/cm/images/bg_penalty_contbtm.png b/src/main/webapp/cm/images/bg_penalty_contbtm.png new file mode 100644 index 0000000..09c4c14 Binary files /dev/null and b/src/main/webapp/cm/images/bg_penalty_contbtm.png differ diff --git a/src/main/webapp/cm/images/btn_allmenu.png b/src/main/webapp/cm/images/btn_allmenu.png new file mode 100644 index 0000000..3b76edb Binary files /dev/null and b/src/main/webapp/cm/images/btn_allmenu.png differ diff --git a/src/main/webapp/cm/images/btn_allmenu_close.png b/src/main/webapp/cm/images/btn_allmenu_close.png new file mode 100644 index 0000000..9089eb4 Binary files /dev/null and b/src/main/webapp/cm/images/btn_allmenu_close.png differ diff --git a/src/main/webapp/cm/images/btn_allmenu_home.png b/src/main/webapp/cm/images/btn_allmenu_home.png new file mode 100644 index 0000000..31ac994 Binary files /dev/null and b/src/main/webapp/cm/images/btn_allmenu_home.png differ diff --git a/src/main/webapp/cm/images/btn_calender.png b/src/main/webapp/cm/images/btn_calender.png new file mode 100644 index 0000000..28b4b2d Binary files /dev/null and b/src/main/webapp/cm/images/btn_calender.png differ diff --git a/src/main/webapp/cm/images/btn_chkdelete.png b/src/main/webapp/cm/images/btn_chkdelete.png new file mode 100644 index 0000000..6d607cf Binary files /dev/null and b/src/main/webapp/cm/images/btn_chkdelete.png differ diff --git a/src/main/webapp/cm/images/btn_chkdelete_hover.png b/src/main/webapp/cm/images/btn_chkdelete_hover.png new file mode 100644 index 0000000..7a2915c Binary files /dev/null and b/src/main/webapp/cm/images/btn_chkdelete_hover.png differ diff --git a/src/main/webapp/cm/images/btn_down.png b/src/main/webapp/cm/images/btn_down.png new file mode 100644 index 0000000..ba4d23a Binary files /dev/null and b/src/main/webapp/cm/images/btn_down.png differ diff --git a/src/main/webapp/cm/images/btn_down_hover.png b/src/main/webapp/cm/images/btn_down_hover.png new file mode 100644 index 0000000..0c4f8ea Binary files /dev/null and b/src/main/webapp/cm/images/btn_down_hover.png differ diff --git a/src/main/webapp/cm/images/btn_file_delete.png b/src/main/webapp/cm/images/btn_file_delete.png new file mode 100644 index 0000000..fae5073 Binary files /dev/null and b/src/main/webapp/cm/images/btn_file_delete.png differ diff --git a/src/main/webapp/cm/images/btn_file_down.png b/src/main/webapp/cm/images/btn_file_down.png new file mode 100644 index 0000000..75966a6 Binary files /dev/null and b/src/main/webapp/cm/images/btn_file_down.png differ diff --git a/src/main/webapp/cm/images/btn_ico.png b/src/main/webapp/cm/images/btn_ico.png new file mode 100644 index 0000000..31963c7 Binary files /dev/null and b/src/main/webapp/cm/images/btn_ico.png differ diff --git a/src/main/webapp/cm/images/btn_login.png b/src/main/webapp/cm/images/btn_login.png new file mode 100644 index 0000000..4b91a27 Binary files /dev/null and b/src/main/webapp/cm/images/btn_login.png differ diff --git a/src/main/webapp/cm/images/btn_pagelist_first.png b/src/main/webapp/cm/images/btn_pagelist_first.png new file mode 100644 index 0000000..ab54b52 Binary files /dev/null and b/src/main/webapp/cm/images/btn_pagelist_first.png differ diff --git a/src/main/webapp/cm/images/btn_pagelist_last.png b/src/main/webapp/cm/images/btn_pagelist_last.png new file mode 100644 index 0000000..f5b0757 Binary files /dev/null and b/src/main/webapp/cm/images/btn_pagelist_last.png differ diff --git a/src/main/webapp/cm/images/btn_pagelist_next.png b/src/main/webapp/cm/images/btn_pagelist_next.png new file mode 100644 index 0000000..a5a7805 Binary files /dev/null and b/src/main/webapp/cm/images/btn_pagelist_next.png differ diff --git a/src/main/webapp/cm/images/btn_pagelist_prev.png b/src/main/webapp/cm/images/btn_pagelist_prev.png new file mode 100644 index 0000000..405da3c Binary files /dev/null and b/src/main/webapp/cm/images/btn_pagelist_prev.png differ diff --git a/src/main/webapp/cm/images/btn_popup_close.png b/src/main/webapp/cm/images/btn_popup_close.png new file mode 100644 index 0000000..785994a Binary files /dev/null and b/src/main/webapp/cm/images/btn_popup_close.png differ diff --git a/src/main/webapp/cm/images/btn_popup_close_white.png b/src/main/webapp/cm/images/btn_popup_close_white.png new file mode 100644 index 0000000..9089eb4 Binary files /dev/null and b/src/main/webapp/cm/images/btn_popup_close_white.png differ diff --git a/src/main/webapp/cm/images/btn_regist.png b/src/main/webapp/cm/images/btn_regist.png new file mode 100644 index 0000000..7cdcb6f Binary files /dev/null and b/src/main/webapp/cm/images/btn_regist.png differ diff --git a/src/main/webapp/cm/images/btn_regist_hover.png b/src/main/webapp/cm/images/btn_regist_hover.png new file mode 100644 index 0000000..8c30337 Binary files /dev/null and b/src/main/webapp/cm/images/btn_regist_hover.png differ diff --git a/src/main/webapp/cm/images/btn_search.png b/src/main/webapp/cm/images/btn_search.png new file mode 100644 index 0000000..0a9533f Binary files /dev/null and b/src/main/webapp/cm/images/btn_search.png differ diff --git a/src/main/webapp/cm/images/btn_search_hover.png b/src/main/webapp/cm/images/btn_search_hover.png new file mode 100644 index 0000000..b6d76b5 Binary files /dev/null and b/src/main/webapp/cm/images/btn_search_hover.png differ diff --git a/src/main/webapp/cm/images/btn_select.png b/src/main/webapp/cm/images/btn_select.png new file mode 100644 index 0000000..776948b Binary files /dev/null and b/src/main/webapp/cm/images/btn_select.png differ diff --git a/src/main/webapp/cm/images/btn_select_hover.png b/src/main/webapp/cm/images/btn_select_hover.png new file mode 100644 index 0000000..660a4e2 Binary files /dev/null and b/src/main/webapp/cm/images/btn_select_hover.png differ diff --git a/src/main/webapp/cm/images/card/002.png b/src/main/webapp/cm/images/card/002.png new file mode 100644 index 0000000..d382fc4 Binary files /dev/null and b/src/main/webapp/cm/images/card/002.png differ diff --git a/src/main/webapp/cm/images/card/003.png b/src/main/webapp/cm/images/card/003.png new file mode 100644 index 0000000..6f02df9 Binary files /dev/null and b/src/main/webapp/cm/images/card/003.png differ diff --git a/src/main/webapp/cm/images/card/004.png b/src/main/webapp/cm/images/card/004.png new file mode 100644 index 0000000..5c589d9 Binary files /dev/null and b/src/main/webapp/cm/images/card/004.png differ diff --git a/src/main/webapp/cm/images/card/007.png b/src/main/webapp/cm/images/card/007.png new file mode 100644 index 0000000..c3330cd Binary files /dev/null and b/src/main/webapp/cm/images/card/007.png differ diff --git a/src/main/webapp/cm/images/card/011.png b/src/main/webapp/cm/images/card/011.png new file mode 100644 index 0000000..a5e7410 Binary files /dev/null and b/src/main/webapp/cm/images/card/011.png differ diff --git a/src/main/webapp/cm/images/card/012.png b/src/main/webapp/cm/images/card/012.png new file mode 100644 index 0000000..26378c4 Binary files /dev/null and b/src/main/webapp/cm/images/card/012.png differ diff --git a/src/main/webapp/cm/images/card/020.png b/src/main/webapp/cm/images/card/020.png new file mode 100644 index 0000000..8ffa428 Binary files /dev/null and b/src/main/webapp/cm/images/card/020.png differ diff --git a/src/main/webapp/cm/images/card/023.png b/src/main/webapp/cm/images/card/023.png new file mode 100644 index 0000000..79f56f1 Binary files /dev/null and b/src/main/webapp/cm/images/card/023.png differ diff --git a/src/main/webapp/cm/images/card/031.png b/src/main/webapp/cm/images/card/031.png new file mode 100644 index 0000000..25f2cc1 Binary files /dev/null and b/src/main/webapp/cm/images/card/031.png differ diff --git a/src/main/webapp/cm/images/card/032.png b/src/main/webapp/cm/images/card/032.png new file mode 100644 index 0000000..3efb79a Binary files /dev/null and b/src/main/webapp/cm/images/card/032.png differ diff --git a/src/main/webapp/cm/images/card/034.png b/src/main/webapp/cm/images/card/034.png new file mode 100644 index 0000000..e57c753 Binary files /dev/null and b/src/main/webapp/cm/images/card/034.png differ diff --git a/src/main/webapp/cm/images/card/035.png b/src/main/webapp/cm/images/card/035.png new file mode 100644 index 0000000..88cf347 Binary files /dev/null and b/src/main/webapp/cm/images/card/035.png differ diff --git a/src/main/webapp/cm/images/card/037.png b/src/main/webapp/cm/images/card/037.png new file mode 100644 index 0000000..239ed9b Binary files /dev/null and b/src/main/webapp/cm/images/card/037.png differ diff --git a/src/main/webapp/cm/images/card/039.png b/src/main/webapp/cm/images/card/039.png new file mode 100644 index 0000000..84408ee Binary files /dev/null and b/src/main/webapp/cm/images/card/039.png differ diff --git a/src/main/webapp/cm/images/card/045.png b/src/main/webapp/cm/images/card/045.png new file mode 100644 index 0000000..d526fcf Binary files /dev/null and b/src/main/webapp/cm/images/card/045.png differ diff --git a/src/main/webapp/cm/images/card/048.png b/src/main/webapp/cm/images/card/048.png new file mode 100644 index 0000000..1008ba4 Binary files /dev/null and b/src/main/webapp/cm/images/card/048.png differ diff --git a/src/main/webapp/cm/images/card/071.png b/src/main/webapp/cm/images/card/071.png new file mode 100644 index 0000000..d43bc87 Binary files /dev/null and b/src/main/webapp/cm/images/card/071.png differ diff --git a/src/main/webapp/cm/images/card/081.png b/src/main/webapp/cm/images/card/081.png new file mode 100644 index 0000000..0715ac2 Binary files /dev/null and b/src/main/webapp/cm/images/card/081.png differ diff --git a/src/main/webapp/cm/images/card/088.png b/src/main/webapp/cm/images/card/088.png new file mode 100644 index 0000000..2bd7c25 Binary files /dev/null and b/src/main/webapp/cm/images/card/088.png differ diff --git a/src/main/webapp/cm/images/card/089.png b/src/main/webapp/cm/images/card/089.png new file mode 100644 index 0000000..4a216e4 Binary files /dev/null and b/src/main/webapp/cm/images/card/089.png differ diff --git a/src/main/webapp/cm/images/card/BCC.png b/src/main/webapp/cm/images/card/BCC.png new file mode 100644 index 0000000..5272950 Binary files /dev/null and b/src/main/webapp/cm/images/card/BCC.png differ diff --git a/src/main/webapp/cm/images/card/HDC.png b/src/main/webapp/cm/images/card/HDC.png new file mode 100644 index 0000000..deb7e75 Binary files /dev/null and b/src/main/webapp/cm/images/card/HDC.png differ diff --git a/src/main/webapp/cm/images/card/HNC.png b/src/main/webapp/cm/images/card/HNC.png new file mode 100644 index 0000000..6654bd5 Binary files /dev/null and b/src/main/webapp/cm/images/card/HNC.png differ diff --git a/src/main/webapp/cm/images/card/KBC.png b/src/main/webapp/cm/images/card/KBC.png new file mode 100644 index 0000000..6773e34 Binary files /dev/null and b/src/main/webapp/cm/images/card/KBC.png differ diff --git a/src/main/webapp/cm/images/card/LTC.png b/src/main/webapp/cm/images/card/LTC.png new file mode 100644 index 0000000..6dfa701 Binary files /dev/null and b/src/main/webapp/cm/images/card/LTC.png differ diff --git a/src/main/webapp/cm/images/card/NHC.png b/src/main/webapp/cm/images/card/NHC.png new file mode 100644 index 0000000..7233d19 Binary files /dev/null and b/src/main/webapp/cm/images/card/NHC.png differ diff --git a/src/main/webapp/cm/images/card/SHC.png b/src/main/webapp/cm/images/card/SHC.png new file mode 100644 index 0000000..f76c961 Binary files /dev/null and b/src/main/webapp/cm/images/card/SHC.png differ diff --git a/src/main/webapp/cm/images/card/SSC.png b/src/main/webapp/cm/images/card/SSC.png new file mode 100644 index 0000000..de7bcfc Binary files /dev/null and b/src/main/webapp/cm/images/card/SSC.png differ diff --git a/src/main/webapp/cm/images/field_equipment/cb-ck-ico.png b/src/main/webapp/cm/images/field_equipment/cb-ck-ico.png new file mode 100644 index 0000000..e681945 Binary files /dev/null and b/src/main/webapp/cm/images/field_equipment/cb-ck-ico.png differ diff --git a/src/main/webapp/cm/images/field_equipment/cb-ck.png b/src/main/webapp/cm/images/field_equipment/cb-ck.png new file mode 100644 index 0000000..5bec458 Binary files /dev/null and b/src/main/webapp/cm/images/field_equipment/cb-ck.png differ diff --git a/src/main/webapp/cm/images/field_equipment/ic-back.png b/src/main/webapp/cm/images/field_equipment/ic-back.png new file mode 100644 index 0000000..ba56c13 Binary files /dev/null and b/src/main/webapp/cm/images/field_equipment/ic-back.png differ diff --git a/src/main/webapp/cm/images/field_equipment/ic-btn-calendar.png b/src/main/webapp/cm/images/field_equipment/ic-btn-calendar.png new file mode 100644 index 0000000..01ee3c7 Binary files /dev/null and b/src/main/webapp/cm/images/field_equipment/ic-btn-calendar.png differ diff --git a/src/main/webapp/cm/images/field_equipment/ic-del.png b/src/main/webapp/cm/images/field_equipment/ic-del.png new file mode 100644 index 0000000..e24a43b Binary files /dev/null and b/src/main/webapp/cm/images/field_equipment/ic-del.png differ diff --git a/src/main/webapp/cm/images/field_equipment/ic-home.png b/src/main/webapp/cm/images/field_equipment/ic-home.png new file mode 100644 index 0000000..982cb61 Binary files /dev/null and b/src/main/webapp/cm/images/field_equipment/ic-home.png differ diff --git a/src/main/webapp/cm/images/field_equipment/ic-search.png b/src/main/webapp/cm/images/field_equipment/ic-search.png new file mode 100644 index 0000000..fcc7898 Binary files /dev/null and b/src/main/webapp/cm/images/field_equipment/ic-search.png differ diff --git a/src/main/webapp/cm/images/field_equipment/ic-select-arrow-open.png b/src/main/webapp/cm/images/field_equipment/ic-select-arrow-open.png new file mode 100644 index 0000000..1ee5b33 Binary files /dev/null and b/src/main/webapp/cm/images/field_equipment/ic-select-arrow-open.png differ diff --git a/src/main/webapp/cm/images/field_equipment/img-login-720.png b/src/main/webapp/cm/images/field_equipment/img-login-720.png new file mode 100644 index 0000000..b801756 Binary files /dev/null and b/src/main/webapp/cm/images/field_equipment/img-login-720.png differ diff --git a/src/main/webapp/cm/images/field_equipment/img-logo-title.png b/src/main/webapp/cm/images/field_equipment/img-logo-title.png new file mode 100644 index 0000000..4a7ea29 Binary files /dev/null and b/src/main/webapp/cm/images/field_equipment/img-logo-title.png differ diff --git a/src/main/webapp/cm/images/field_equipment/img-logo.png b/src/main/webapp/cm/images/field_equipment/img-logo.png new file mode 100644 index 0000000..dece603 Binary files /dev/null and b/src/main/webapp/cm/images/field_equipment/img-logo.png differ diff --git a/src/main/webapp/cm/images/ic-logout.png b/src/main/webapp/cm/images/ic-logout.png new file mode 100644 index 0000000..1cf04a0 Binary files /dev/null and b/src/main/webapp/cm/images/ic-logout.png differ diff --git a/src/main/webapp/cm/images/ico_address_search.png b/src/main/webapp/cm/images/ico_address_search.png new file mode 100644 index 0000000..411f2cb Binary files /dev/null and b/src/main/webapp/cm/images/ico_address_search.png differ diff --git a/src/main/webapp/cm/images/ico_allmenu_close.png b/src/main/webapp/cm/images/ico_allmenu_close.png new file mode 100644 index 0000000..0f41a6e Binary files /dev/null and b/src/main/webapp/cm/images/ico_allmenu_close.png differ diff --git a/src/main/webapp/cm/images/ico_allmenu_open.png b/src/main/webapp/cm/images/ico_allmenu_open.png new file mode 100644 index 0000000..28a3bda Binary files /dev/null and b/src/main/webapp/cm/images/ico_allmenu_open.png differ diff --git a/src/main/webapp/cm/images/ico_check.png b/src/main/webapp/cm/images/ico_check.png new file mode 100644 index 0000000..fc9724a Binary files /dev/null and b/src/main/webapp/cm/images/ico_check.png differ diff --git a/src/main/webapp/cm/images/ico_check_2.png b/src/main/webapp/cm/images/ico_check_2.png new file mode 100644 index 0000000..2a2a132 Binary files /dev/null and b/src/main/webapp/cm/images/ico_check_2.png differ diff --git a/src/main/webapp/cm/images/ico_checkbox.png b/src/main/webapp/cm/images/ico_checkbox.png new file mode 100644 index 0000000..e72a2cd Binary files /dev/null and b/src/main/webapp/cm/images/ico_checkbox.png differ diff --git a/src/main/webapp/cm/images/ico_flooting.png b/src/main/webapp/cm/images/ico_flooting.png new file mode 100644 index 0000000..1f5ca35 Binary files /dev/null and b/src/main/webapp/cm/images/ico_flooting.png differ diff --git a/src/main/webapp/cm/images/ico_info_discounts1.png b/src/main/webapp/cm/images/ico_info_discounts1.png new file mode 100644 index 0000000..e752c20 Binary files /dev/null and b/src/main/webapp/cm/images/ico_info_discounts1.png differ diff --git a/src/main/webapp/cm/images/ico_info_discounts2.png b/src/main/webapp/cm/images/ico_info_discounts2.png new file mode 100644 index 0000000..814879d Binary files /dev/null and b/src/main/webapp/cm/images/ico_info_discounts2.png differ diff --git a/src/main/webapp/cm/images/ico_info_discounts3.png b/src/main/webapp/cm/images/ico_info_discounts3.png new file mode 100644 index 0000000..5958fda Binary files /dev/null and b/src/main/webapp/cm/images/ico_info_discounts3.png differ diff --git a/src/main/webapp/cm/images/ico_info_discounts4.png b/src/main/webapp/cm/images/ico_info_discounts4.png new file mode 100644 index 0000000..09c362c Binary files /dev/null and b/src/main/webapp/cm/images/ico_info_discounts4.png differ diff --git a/src/main/webapp/cm/images/ico_info_discounts5.png b/src/main/webapp/cm/images/ico_info_discounts5.png new file mode 100644 index 0000000..d9fe8d5 Binary files /dev/null and b/src/main/webapp/cm/images/ico_info_discounts5.png differ diff --git a/src/main/webapp/cm/images/ico_info_plus.png b/src/main/webapp/cm/images/ico_info_plus.png new file mode 100644 index 0000000..2a5d99e Binary files /dev/null and b/src/main/webapp/cm/images/ico_info_plus.png differ diff --git a/src/main/webapp/cm/images/ico_info_price1.png b/src/main/webapp/cm/images/ico_info_price1.png new file mode 100644 index 0000000..d695618 Binary files /dev/null and b/src/main/webapp/cm/images/ico_info_price1.png differ diff --git a/src/main/webapp/cm/images/ico_info_price2.png b/src/main/webapp/cm/images/ico_info_price2.png new file mode 100644 index 0000000..4bdf692 Binary files /dev/null and b/src/main/webapp/cm/images/ico_info_price2.png differ diff --git a/src/main/webapp/cm/images/ico_info_price3.png b/src/main/webapp/cm/images/ico_info_price3.png new file mode 100644 index 0000000..cd05e37 Binary files /dev/null and b/src/main/webapp/cm/images/ico_info_price3.png differ diff --git a/src/main/webapp/cm/images/ico_location_arr.png b/src/main/webapp/cm/images/ico_location_arr.png new file mode 100644 index 0000000..bb42ac3 Binary files /dev/null and b/src/main/webapp/cm/images/ico_location_arr.png differ diff --git a/src/main/webapp/cm/images/ico_location_home.png b/src/main/webapp/cm/images/ico_location_home.png new file mode 100644 index 0000000..addb0ff Binary files /dev/null and b/src/main/webapp/cm/images/ico_location_home.png differ diff --git a/src/main/webapp/cm/images/ico_login_arr.png b/src/main/webapp/cm/images/ico_login_arr.png new file mode 100644 index 0000000..4323cd3 Binary files /dev/null and b/src/main/webapp/cm/images/ico_login_arr.png differ diff --git a/src/main/webapp/cm/images/ico_login_arrgreen.png b/src/main/webapp/cm/images/ico_login_arrgreen.png new file mode 100644 index 0000000..023366a Binary files /dev/null and b/src/main/webapp/cm/images/ico_login_arrgreen.png differ diff --git a/src/main/webapp/cm/images/ico_login_idfindno.png b/src/main/webapp/cm/images/ico_login_idfindno.png new file mode 100644 index 0000000..2469832 Binary files /dev/null and b/src/main/webapp/cm/images/ico_login_idfindno.png differ diff --git a/src/main/webapp/cm/images/ico_main_btn_mtop.png b/src/main/webapp/cm/images/ico_main_btn_mtop.png new file mode 100644 index 0000000..b31b6d7 Binary files /dev/null and b/src/main/webapp/cm/images/ico_main_btn_mtop.png differ diff --git a/src/main/webapp/cm/images/ico_main_mystatus.png b/src/main/webapp/cm/images/ico_main_mystatus.png new file mode 100644 index 0000000..8cb1e86 Binary files /dev/null and b/src/main/webapp/cm/images/ico_main_mystatus.png differ diff --git a/src/main/webapp/cm/images/ico_main_plus.png b/src/main/webapp/cm/images/ico_main_plus.png new file mode 100644 index 0000000..adb4c26 Binary files /dev/null and b/src/main/webapp/cm/images/ico_main_plus.png differ diff --git a/src/main/webapp/cm/images/ico_member_arr.png b/src/main/webapp/cm/images/ico_member_arr.png new file mode 100644 index 0000000..2c76242 Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_arr.png differ diff --git a/src/main/webapp/cm/images/ico_member_ceo_comp.png b/src/main/webapp/cm/images/ico_member_ceo_comp.png new file mode 100644 index 0000000..7968313 Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_ceo_comp.png differ diff --git a/src/main/webapp/cm/images/ico_member_cert01.png b/src/main/webapp/cm/images/ico_member_cert01.png new file mode 100644 index 0000000..e66c873 Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_cert01.png differ diff --git a/src/main/webapp/cm/images/ico_member_cert02.png b/src/main/webapp/cm/images/ico_member_cert02.png new file mode 100644 index 0000000..c4eed9f Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_cert02.png differ diff --git a/src/main/webapp/cm/images/ico_member_cert_comp.png b/src/main/webapp/cm/images/ico_member_cert_comp.png new file mode 100644 index 0000000..af14c0a Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_cert_comp.png differ diff --git a/src/main/webapp/cm/images/ico_member_company_comp.png b/src/main/webapp/cm/images/ico_member_company_comp.png new file mode 100644 index 0000000..62a2858 Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_company_comp.png differ diff --git a/src/main/webapp/cm/images/ico_member_complete.png b/src/main/webapp/cm/images/ico_member_complete.png new file mode 100644 index 0000000..f5d07e0 Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_complete.png differ diff --git a/src/main/webapp/cm/images/ico_member_email.png b/src/main/webapp/cm/images/ico_member_email.png new file mode 100644 index 0000000..ad9c8fb Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_email.png differ diff --git a/src/main/webapp/cm/images/ico_member_fax.png b/src/main/webapp/cm/images/ico_member_fax.png new file mode 100644 index 0000000..25a4792 Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_fax.png differ diff --git a/src/main/webapp/cm/images/ico_member_flow_arr.png b/src/main/webapp/cm/images/ico_member_flow_arr.png new file mode 100644 index 0000000..41891ed Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_flow_arr.png differ diff --git a/src/main/webapp/cm/images/ico_member_join01.png b/src/main/webapp/cm/images/ico_member_join01.png new file mode 100644 index 0000000..e281ab4 Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_join01.png differ diff --git a/src/main/webapp/cm/images/ico_member_join02.png b/src/main/webapp/cm/images/ico_member_join02.png new file mode 100644 index 0000000..5255ee2 Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_join02.png differ diff --git a/src/main/webapp/cm/images/ico_member_join03.png b/src/main/webapp/cm/images/ico_member_join03.png new file mode 100644 index 0000000..24d9f3b Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_join03.png differ diff --git a/src/main/webapp/cm/images/ico_member_protect.png b/src/main/webapp/cm/images/ico_member_protect.png new file mode 100644 index 0000000..ba0b0a6 Binary files /dev/null and b/src/main/webapp/cm/images/ico_member_protect.png differ diff --git a/src/main/webapp/cm/images/ico_memberetc.png b/src/main/webapp/cm/images/ico_memberetc.png new file mode 100644 index 0000000..48e71cb Binary files /dev/null and b/src/main/webapp/cm/images/ico_memberetc.png differ diff --git a/src/main/webapp/cm/images/ico_more_arr.png b/src/main/webapp/cm/images/ico_more_arr.png new file mode 100644 index 0000000..f62023c Binary files /dev/null and b/src/main/webapp/cm/images/ico_more_arr.png differ diff --git a/src/main/webapp/cm/images/ico_noimage.png b/src/main/webapp/cm/images/ico_noimage.png new file mode 100644 index 0000000..507db3a Binary files /dev/null and b/src/main/webapp/cm/images/ico_noimage.png differ diff --git a/src/main/webapp/cm/images/ico_notice_down.png b/src/main/webapp/cm/images/ico_notice_down.png new file mode 100644 index 0000000..9ae7913 Binary files /dev/null and b/src/main/webapp/cm/images/ico_notice_down.png differ diff --git a/src/main/webapp/cm/images/ico_notice_nodata.png b/src/main/webapp/cm/images/ico_notice_nodata.png new file mode 100644 index 0000000..ff709fe Binary files /dev/null and b/src/main/webapp/cm/images/ico_notice_nodata.png differ diff --git a/src/main/webapp/cm/images/ico_notice_up.png b/src/main/webapp/cm/images/ico_notice_up.png new file mode 100644 index 0000000..7af9fe0 Binary files /dev/null and b/src/main/webapp/cm/images/ico_notice_up.png differ diff --git a/src/main/webapp/cm/images/ico_penaltyinfo_over.png b/src/main/webapp/cm/images/ico_penaltyinfo_over.png new file mode 100644 index 0000000..ca785c5 Binary files /dev/null and b/src/main/webapp/cm/images/ico_penaltyinfo_over.png differ diff --git a/src/main/webapp/cm/images/ico_penaltyinfo_parking.png b/src/main/webapp/cm/images/ico_penaltyinfo_parking.png new file mode 100644 index 0000000..e31a390 Binary files /dev/null and b/src/main/webapp/cm/images/ico_penaltyinfo_parking.png differ diff --git a/src/main/webapp/cm/images/ico_penaltyinfo_sale.png b/src/main/webapp/cm/images/ico_penaltyinfo_sale.png new file mode 100644 index 0000000..0b91f34 Binary files /dev/null and b/src/main/webapp/cm/images/ico_penaltyinfo_sale.png differ diff --git a/src/main/webapp/cm/images/ico_process_01.png b/src/main/webapp/cm/images/ico_process_01.png new file mode 100644 index 0000000..5db7189 Binary files /dev/null and b/src/main/webapp/cm/images/ico_process_01.png differ diff --git a/src/main/webapp/cm/images/ico_process_02.png b/src/main/webapp/cm/images/ico_process_02.png new file mode 100644 index 0000000..ccf9980 Binary files /dev/null and b/src/main/webapp/cm/images/ico_process_02.png differ diff --git a/src/main/webapp/cm/images/ico_process_03.png b/src/main/webapp/cm/images/ico_process_03.png new file mode 100644 index 0000000..95193d1 Binary files /dev/null and b/src/main/webapp/cm/images/ico_process_03.png differ diff --git a/src/main/webapp/cm/images/ico_process_04.png b/src/main/webapp/cm/images/ico_process_04.png new file mode 100644 index 0000000..ca10b5b Binary files /dev/null and b/src/main/webapp/cm/images/ico_process_04.png differ diff --git a/src/main/webapp/cm/images/ico_process_05.png b/src/main/webapp/cm/images/ico_process_05.png new file mode 100644 index 0000000..7067c46 Binary files /dev/null and b/src/main/webapp/cm/images/ico_process_05.png differ diff --git a/src/main/webapp/cm/images/ico_process_06.png b/src/main/webapp/cm/images/ico_process_06.png new file mode 100644 index 0000000..3abbcc1 Binary files /dev/null and b/src/main/webapp/cm/images/ico_process_06.png differ diff --git a/src/main/webapp/cm/images/ico_process_07.png b/src/main/webapp/cm/images/ico_process_07.png new file mode 100644 index 0000000..cd95415 Binary files /dev/null and b/src/main/webapp/cm/images/ico_process_07.png differ diff --git a/src/main/webapp/cm/images/ico_radio.png b/src/main/webapp/cm/images/ico_radio.png new file mode 100644 index 0000000..df770d0 Binary files /dev/null and b/src/main/webapp/cm/images/ico_radio.png differ diff --git a/src/main/webapp/cm/images/ico_schtoggle_close.png b/src/main/webapp/cm/images/ico_schtoggle_close.png new file mode 100644 index 0000000..7fb6542 Binary files /dev/null and b/src/main/webapp/cm/images/ico_schtoggle_close.png differ diff --git a/src/main/webapp/cm/images/ico_schtoggle_open.png b/src/main/webapp/cm/images/ico_schtoggle_open.png new file mode 100644 index 0000000..5ba9f86 Binary files /dev/null and b/src/main/webapp/cm/images/ico_schtoggle_open.png differ diff --git a/src/main/webapp/cm/images/ico_select.png b/src/main/webapp/cm/images/ico_select.png new file mode 100644 index 0000000..c2138e9 Binary files /dev/null and b/src/main/webapp/cm/images/ico_select.png differ diff --git a/src/main/webapp/cm/images/ico_white_arr.png b/src/main/webapp/cm/images/ico_white_arr.png new file mode 100644 index 0000000..b31b6d7 Binary files /dev/null and b/src/main/webapp/cm/images/ico_white_arr.png differ diff --git a/src/main/webapp/cm/images/img-info-map.png b/src/main/webapp/cm/images/img-info-map.png new file mode 100644 index 0000000..fcdef06 Binary files /dev/null and b/src/main/webapp/cm/images/img-info-map.png differ diff --git a/src/main/webapp/cm/images/img_info_01.png b/src/main/webapp/cm/images/img_info_01.png new file mode 100644 index 0000000..9f83f47 Binary files /dev/null and b/src/main/webapp/cm/images/img_info_01.png differ diff --git a/src/main/webapp/cm/images/img_info_map.png b/src/main/webapp/cm/images/img_info_map.png new file mode 100644 index 0000000..fcdef06 Binary files /dev/null and b/src/main/webapp/cm/images/img_info_map.png differ diff --git a/src/main/webapp/cm/images/img_service_info.png b/src/main/webapp/cm/images/img_service_info.png new file mode 100644 index 0000000..6ab5889 Binary files /dev/null and b/src/main/webapp/cm/images/img_service_info.png differ diff --git a/src/main/webapp/cm/images/m_ico_logo.png b/src/main/webapp/cm/images/m_ico_logo.png new file mode 100644 index 0000000..478ae9d Binary files /dev/null and b/src/main/webapp/cm/images/m_ico_logo.png differ diff --git a/src/main/webapp/cm/images/temp_carphoto.png b/src/main/webapp/cm/images/temp_carphoto.png new file mode 100644 index 0000000..48d4695 Binary files /dev/null and b/src/main/webapp/cm/images/temp_carphoto.png differ diff --git a/src/main/webapp/cm/images/temp_footer.png b/src/main/webapp/cm/images/temp_footer.png new file mode 100644 index 0000000..1789e3b Binary files /dev/null and b/src/main/webapp/cm/images/temp_footer.png differ diff --git a/src/main/webapp/cm/images/temp_footer_bg.png b/src/main/webapp/cm/images/temp_footer_bg.png new file mode 100644 index 0000000..0ef6e6e Binary files /dev/null and b/src/main/webapp/cm/images/temp_footer_bg.png differ diff --git a/src/main/webapp/cm/images/temp_header.png b/src/main/webapp/cm/images/temp_header.png new file mode 100644 index 0000000..f412526 Binary files /dev/null and b/src/main/webapp/cm/images/temp_header.png differ diff --git a/src/main/webapp/cm/images/temp_header_bg.png b/src/main/webapp/cm/images/temp_header_bg.png new file mode 100644 index 0000000..e49b23e Binary files /dev/null and b/src/main/webapp/cm/images/temp_header_bg.png differ diff --git a/src/main/webapp/cm/images/temp_logo_ct.png b/src/main/webapp/cm/images/temp_logo_ct.png new file mode 100644 index 0000000..014b0aa Binary files /dev/null and b/src/main/webapp/cm/images/temp_logo_ct.png differ diff --git a/src/main/webapp/cm/js/common.js b/src/main/webapp/cm/js/common.js new file mode 100644 index 0000000..d8ec5e0 --- /dev/null +++ b/src/main/webapp/cm/js/common.js @@ -0,0 +1,3635 @@ +requires("uiplugin.popup"); + +/** + * 전체 Scope에서 공유되는 Global 전역 변수, 상수, 공통 함수를 정의한다. + * + * gcm 객체는 WFrame Scope이 고려될 필요가 없고, 업무 개발자가 호출할 필요한 공통 함수나 속성만을 생성한다. + * gcm 객체는 WFrame Scope별로 생성되지 않고, 전역 객체로 1개만 생성된다. + * + * @author 박상규 + * @type gcm + * @class gcm + * @namespace gcm + */ + + +var gcm = { + // 서버 통신 서비스 호출을 위한 Context Path + CONTEXT_PATH: "", + + // 서버 통신 서비스 호출을 위한 Service Url (Context Path 이하 경로) + SERVICE_URL: "", + + // 서버 통신 기본 모드 ( "asynchronous" / "synchronous") + DEFAULT_OPTIONS_MODE: "asynchronous", + + // 서버 통신 기본 미디어 타입 + DEFAULT_OPTIONS_MEDIATYPE: "application/json", + + // 통신 상태 코드 + MESSAGE_CODE: { + STATUS_ERROR: "E", + STATUS_SUCCESS: "S", + STATUS_WARNING: "W" + }, + + // 공통 코드 저장을 위한 DataList 속성 정보 + DATA_PREFIX: "dlt_commonCode", + + COMMON_CODE_INFO: { + LABEL: "DET_CODE_NM", + VALUE: "DET_CODE", + FILED_ARR: ["CODE_GRP_ID", "DET_CODE", "DET_CODE_NM"] + }, + + // 유효성 검사 상태 정보 저장 + valStatus: { + isValid: true, + objectType: "", // 유효성 검사를 수행하는 컴포넌트 타입 : gridView, group + objectName: "", + columnId: "", + rowIndex: 0, + message: "" + }, + + // 업무 화면 오픈 Frame Mode 설정 ("iframe", "wframe") + FRAME_MODE: "wframe", + + // 메세지 알림 콜백 Function 정보 저장 + CB_FUNCTION_MANAGER: { + cbFuncIdx: 0, //정보 저장 Index Key + cbFuncSave: {} //정보 저장 객체. + } +}; + + + +/** + * 유효성 검사 실패에 대한 Alert 메시지 창이 닫힌 후에 수행되는 콜백 함수이다. + * $p + * @date 2018.04.15 + * @private + * @memberOf + * @author 박상규 + * @returns + */ +gcm._groupValidationCallback = function () { + if ((gcm.valStatus.objectName !== "") && (gcm.valStatus.isValid === false)) { + var obj = $p.getComponentById(gcm.valStatus.objectName); + if (gcm.valStatus.objectType === "gridView") { + obj.setFocusedCell(gcm.valStatus.rowIndex, gcm.valStatus.columnId, true); + } else if (gcm.valStatus.objectType === "group") { + obj.focus(); + } + } +}; + + +/** + * submission의 공통 설정에서 사용. + * submisison 통신 직전 호출. + * return true일 경우 통신 수행, return false일 경우 통신 중단 + * + * @date 2016.11.11 + * @private + * @param {Object} sbmObj 서브미션 객체 + * @memberOf + * @author 박상규 + * @return {Boolean} true or false + */ +gcm._sbm_preSubmission = function (sbmObj) { + if (sbmObj.action.indexOf(gcm.CONTEXT_PATH) === -1) { + sbmObj.action = gcm.CONTEXT_PATH + sbmObj.action; + } +}; + +/** + * 모든 submission의 defaultCallback - com.sbm_errorHandler 보다 먼저 수행됨. (400 Error) + * config.xml에 설정 + * + * @private + * @date 2016.11.15 + * @param {Object} resObj responseData 객체 + * @param {Object} subObj Submission 객체 + * @memberOf + * @author 박상규 + */ +gcm._sbm_defCallbackSubmission = function (resObj, subObj) { + var scopeCom = gcm._getScope(subObj).com; + + //server와 연결을 할 수 없을 경우 responseStatusCode가 0으로 발생. + if (resObj.responseStatusCode == 0) { + var detailStr = "HTTP STATUS INFO"; + detailStr += resObj.responseStatusCode; + detailStr += "URI:"; + detailStr += resObj.resourceUri; + + var msgObj = { + statusCode: "E", + errorCode: "E9998", + message: "서버와 연결할 수 없습니다. 자세한 내용은 관리자에게 문의하시기 바랍니다.", + messageDetail: detailStr + }; + + scopeCom.resultMsg(msgObj); + return false; + } + + var rsJSON = resObj.responseJSON || null; + + if (rsJSON && rsJSON.rsMsg) { + scopeCom.resultMsg(rsJSON.rsMsg); + } +}; + +/** + * submission중 에러가 발생한 경우 호출되는 함수 - 서버 오류(500 error) + * + * @date 2016.11.15 + * @private + * @param {Object} resObj responseData 객체 + * @memberOf + * @author 박상규 + */ +gcm._sbm_errorHandler = function (resObj) { + var scopeCom = gcm._getScope(resObj.id).com; + + var detailStr = "HTTP STATUS INFO"; + detailStr += resObj.responseReasonPhrase; + detailStr += " "; + detailStr += resObj.responseStatusCode; + detailStr += "URI:"; + detailStr += resObj.resourceUri; + detailStr += resObj.responseBody; + + var msgObj = { + statusCode: "E", + errorCode: "E9998", + message: "서버 오류입니다. 자세한 내용은 관리자에게 문의하시기 바랍니다.", + messageDetail: detailStr + }; + + scopeCom.resultMsg(msgObj); +}; + +/** + * 다국어 처리함수 + * + * @date 2016.08.02 + * @private + * @param {String} xmlUrl 전체 URL중 w2xPath이하의 경로 + * @memberOf + * @author 박상규 + * @example + * com.getI18NUrl( "/ui/DEV/result.xml" ); + * //return 예시)"/websquare/I18N?w2xPath=/ui/DEV/result.xml" + * gcm._getI18NUrl( "/ui/SW/request.xml" ); + * //return 예시)"/websquare/I18N?w2xPath=/ui/SW/request.xml" + */ +gcm._getI18NUrl = function (xmlUrl) { + var baseURL = gcm.CONTEXT_PATH + "/I18N"; // org"/websquare/engine/servlet/I18N.jsp?w2xPath="; + var rsUrl; + var locale = WebSquare.cookie.getCookie("locale"); + var bXml = "/blank.xml"; + xmlUrl = xmlUrl.replace(/\?.*/, ''); + xmlUrl = xmlUrl.replace(gcm.CONTEXT_PATH, ''); + + if (xmlUrl.search(bXml) > -1 && xmlUrl.search(WebSquare.baseURI) == -1) { + xmlUrl = WebSquare.baseURI + "/blank.xml"; + } + rsURL = baseURL + "?w2xPath=" + xmlUrl; + + if (locale != null && locale != '') { + rsURL = rsURL + "&locale=" + unescape(locale); + } + + return rsURL; +}; + +/** + * 특정 컴포넌트가 속한 WFrame Scope을 반환한다. + * + * @date 2018.06.11 + * @private + * @param {Object} 컴포넌트 객체 또는 아이디(WFrame Scope 경로를 포함한 Full Path Id) + * @memberOf + * @author 박상규 + */ +gcm._getScope = function (comObj) { + if (typeof comObj === "string") { + var scopeObj = $p.getComponentById(comObj); + if (scopeObj !== null) { + return scopeObj.getScopeWindow(); + } + } else { + return comObj.getScopeWindow(); + } +}; + + +/** + * 전체 공통 코드 데이터를 가져와서 gcm.commonCodeList 객체에 저장한다. + * + * @date 2019.05.15 + * @param {requestCallback} callbackFunc 콜백 함수 + * @memberOf gcm + * @author 박상규 + * @example + * gcm._initCommonCode(scwin.setInitPage); + */ +gcm._initCommonCode = function(com, callbackFunc) { + var searchCodeGrpOption = { + id: "sbm_getCommonCode", + action: "/common/getCommonCode.do", + method: "get", + isShowMeg: false + }; + + searchCodeGrpOption.submitDoneHandler = function (e) { + + if (e.responseJSON.result.rsMsg.statusCode === "S") { + var codeList = e.responseJSON.result.code; + var codeCount = codeList.length; + var commonCodeList = []; + for (var idx = 0; idx < codeCount; idx++) { + + if (typeof commonCodeList[codeList[idx].CODE_GRP_ID] === "undefined") { + commonCodeList[codeList[idx].CODE_GRP_ID] = []; + } + + commonCodeList[codeList[idx].CODE_GRP_ID].push(codeList[idx]); + } + + $p.top().scwin.commonCodeList = commonCodeList; + + if (typeof callbackFunc === "function") { + callbackFunc(); + } + } + + }; + + com.executeSubmission_dynamic(searchCodeGrpOption); +}; + +/** + * 브라우저 Back, Forward 발생 시 onPopState 이벤트 처리를 수행한다. + * + * @date 2019.05.22 + * @memberOf gcm + * @author 박상규 + * @example + * gcm._setHistory(); + */ +gcm._setHistory = function() { + History.Adapter.bind(window,'statechange', function() { + var state = History.getState(); + gcm._setPage(state.data.link, state.data.data); + }); +}; + +/** + * Window.onBeforeUnload 이벤트를 추가한다. + * + * @date 2019.06.12 + * @memberOf gcm + * @author 박상규 + * @example + * gcm._addEventOnBeforeUnload(); + */ +gcm._addEventOnBeforeUnload = function() { + if (window.addEventListener) { + window.addEventListener("beforeunload", gcm._setOnBeforeUnload); + } else { + window.attachEvent("onbeforeunload", gcm._setOnBeforeUnload); + } +}; + +/** + * Window.onBeforeUnload 이벤트를 삭제한다. + * + * @date 2019.06.12 + * @memberOf gcm + * @author 박상규 + * @example + * gcm._removeEventOnBeforeUnload(); + */ +gcm._removeEventOnBeforeUnload = function() { + if (window.removeEventListener) { + window.removeEventListener("beforeunload", gcm._setOnBeforeUnload); + } else { + window.detachEvent("onbeforeunload", gcm._setOnBeforeUnload); + } +}; + +/** + * Window.onBeforeUnload 이벤트 발생 시 페이지를 떠날 것인지 확인한다. + * + * @date 2019.06.12 + * @memberOf gcm + * @author 박상규 + * @example + * gcm._setOnBeforeUnload(); + */ +gcm._setOnBeforeUnload = function(e) { + var e = e || window.event; + + // For IE and Firefox + if (e) { + //e.returnValue = 'Leaving the page'; + e.returnValue = '가입 중 F5(새로고침) 클릭시 등록한 내용이 사라집니다.'; + } + + // For Safari + //return 'Leaving the page'; + return '가입 중 F5(새로고침) 클릭시 등록한 내용이 사라집니다.'; +}; + +/** + * Container 영역의 URL을 이동한다. + * + * @date 2019.05.23 + * @memberOf gcm + * @param {String} link Container 영역에 오픈할 URL + * @param {Object} data 화면 오픈 시 전달할 Data 객체 + * @author 박상규 + * @example + * gcm._setPage("/ui/fee/money_msearch_view1.xml"); + * + * var data = {}; + * data.dataInfo = rowData; + * data.searchParam = dma_searchParam.getJSON(); + * gcm._setPage("/ui/fee/money_msearch_view3.xml", data); // 새로 열리는 화면에 data 객체 전달 + */ +gcm._setPage = function(link, data) { + com.closeAllPopup(); + gcm._removeEventOnBeforeUnload(); + + if (com.isEmpty(data)) { + $p.top().container.setSrc(gcm.CONTEXT_PATH + link); + } else { + var options = { + dataObject: { + type: "json", + name: "param", + data: data + } + }; + $p.top().container.setSrc(gcm.CONTEXT_PATH + link, options); + } +}; + +/** + * 각 WFrame Scope별로 공유되는 Scope 전역 변수와 공통 함수를 정의한다. + * + * com 객체는 WFrame Scope 업무 개발자가 호출해야할 공통 함수나 속성을 정의한다. + * com 객체는 WFrame Scope 별로 생성되기 때문에 com 객체 내에 정의된 함수에서의 선언된 $p 객체는 + * 해당 함수를 호출한 화면의 WFrame Scope 내의 $p를 참조하게 된다. + * + * @author 박상규 + * @type com + * @class com + * @namespace com + */ +var com = { + // Message Box ID 생성을 위한 순번 + MESSAGE_BOX_SEQ: 1 +}; + +com.initPub = function(link) { + if( (link !="") && (link != "sub.xml") && (link != "main.xml") ){ + $p.top().container.setSrc(gcm.CONTEXT_PATH + link); + } else { + link = '/cm/login/login.xml'; + $p.top().container.setSrc(gcm.CONTEXT_PATH + link); + } +}; + +/** + * Container 영역의 URL을 이동한다. + * + * @date 2019.05.22 + * @memberOf com + * @param {String} link Container 영역에 오픈할 URL + * @param {Object} data 화면 오픈 시 전달할 Data 객체 + * @param {Boolean} isHistory Browser History에 해당 URL의 기록 여부 (Default : true) + * @author 박상규 + * @example + * com.setPage("/ui/fee/money_msearch_view1.xml"); + * + * com.setPage("/ui/fee/money_msearch_view2.xml", null, false); // History에 기록하지 않음 + * + * var data = {}; + * data.dataInfo = rowData; + * data.searchParam = dma_searchParam.getJSON(); + * com.setPage("/ui/fee/money_msearch_view3.xml", data); // 새로 열리는 화면에 data 객체 전달 + */ +com.setPage = function(link, data, isHistory) { + + if ((typeof isHistory === "undefined") || (isHistory === true)) { + var url = ""; + + // WebSquare.util.browserVersion()는 비공개 함수로 공통 JS 파일 안에서만 한정적으로 사용해야 함. + if (parseInt(WebSquare.util.browserVersion()) < 10) { + url = "/"; + } + + var randomKey = Math.random() * 1000000000000000000; + if (com.isEmpty(data)) { + History.pushState({ link : link, key : randomKey }, "", url); + } else { + History.pushState({ link : link, data : data, key : randomKey }, "", url); + } + } else { + if (com.isEmpty(data)) { + gcm._setPage(link); + } else { + gcm._setPage(link, data); + } + } + $('html').scrollTop(0); +}; + + + +/** + * File Upload WFrame을 초기화한다. + * + * @date 2019.05.30 + * @memberOf com + * @param {Object} fileUploadFrame File Upload WFrame 객체 + * @param {Object} option File Upload 옵션 정보 + * @param {Function} callbackUploadDoneFunc 파일 업로드 완료 후 콜백 함수 + * @author 박상규 + * @example + * // 첨부 파일 업로드 모듈 초기 설정 옵션 + * // - option.maxFileCount : 업로드 가능한 첨부 파일 개수 + * // - option.maxFileSize : 업로드 가능한 첨부 파일 크기 + * // - option.subDir : websquare.xml 에 정의된 sub 저장 경로 키 (정의하지 않으면 baseDir에 저장됨) + * var option = { + * maxFileCount : 3, + * maxFileSize : 10485, + * subDir : "sub1" + * }; + * + * // 수정 화면에서 기존에 등록된 파일이 있을 경우 기존 첨부 파일 정보] + * // (서버에서 기존 업로드된 첨부 정보를 아래와 같은 형식으로 반환해야 함) + * // - option[].filedId : 첨부 파일 아이디 + * // - option[].localFileName : 로컬 첨부 파일 이름 + * option.oldFiles = [ + * { fileId : "1", localFileName : "기존등록된민원접수이미지1.png" } + * ]; + + * // 첨부 파일 업로드 모듈 초기 설정 + * // - fileUploadFrame File Upload WFrame 객체 + * // - option File Upload 옵션 정보 + * // - callbackUploadDoneFunc 파일 업로드 완료 후 콜백 함수 + * // 실제 DB에 내용과 첨부 파일 정보 저장 처리를 callbackUploadDoneFunc에 정의된 콜백함수에서 처리해야 한다. + * com.setFileUpload(wfm_fileUpload, option, scwin.callbackUploadDone); + */ +com.setFileUpload = function(fileUploadFrame, option, callbackUploadDoneFunc) { + var oldFiles = option.oldFiles; + var oldFileCount = oldFiles.length; + + fileUploadFrame.setSrc(gcm.CONTEXT_PATH + "/cm/common/fileUpload.xml"); + var fileUploadWindow = fileUploadFrame.getWindow(); + + for (var idx = 0; idx < oldFileCount; idx++) { + fileUploadWindow.scwin.insertOldFile(oldFiles[idx].fileId, oldFiles[idx].localFileName); + } + + fileUploadWindow.scwin.setOldFiles(); + fileUploadWindow.scwin.maxFileCount = option.maxFileCount; + fileUploadWindow.mpd_multiFileUpload.setMaxFileCount(option.maxFileCount - oldFileCount); + fileUploadWindow.mpd_multiFileUpload.setMaxFileSize(option.maxFileSize); + fileUploadWindow.mpd_multiFileUpload.setSubDir(option.subDir); + fileUploadWindow.scwin.callBackUploadDoneFunc = callbackUploadDoneFunc; +}; + +/** + * File Download WFrame을 초기화한다. + * + * @date 2019.06.03 + * @memberOf com + * @param {Object} fileDownloadFrame File Download WFrame 객체 + * @param {Object} option File Download 옵션 정보 + * @author 박상규 + * @example + * // 첨부 파일 다운로드 모듈 초기 설정 옵션 + * var option = { }; + * + * // 수정 화면에서 기존에 등록된 파일이 있을 경우 기존 첨부 파일 정보 + * // (서버에서 기존 업로드된 첨부 정보를 아래와 같은 형식으로 반환해야 함) + * // - option[].filedId : 첨부 파일 아이디 + * // - option[].localFileName : 로컬 첨부 파일 이름 + * option.files = [ + * { fileId : "1", localFileName : "사전등록결제_매뉴얼1.pdf" }, + * { fileId : "2", localFileName : "사전등록결제_매뉴얼2.pdf" } + * ]; + * + * // 첨부 파일 다운로드 모듈 초기 설정 + * // - fileDownloadFrame File Download WFrame 객체 + * // - option File Download 옵션 정보 + * com.setFileDownload(wfm_fileDownload, option); + */ +com.setFileDownload = function(fileDownloadFrame, option) { + var files = option.files; + var fileCount = files.length; + + fileDownloadFrame.setSrc(gcm.CONTEXT_PATH + "/cm/common/fileDownload.xml"); + var fileDownloadWindow = fileDownloadFrame.getWindow(); + + for (var idx = 0; idx < fileCount; idx++) { + fileDownloadWindow.scwin.insertFile(files[idx].fileId, files[idx].localFileName,files[idx].fileSeq,files[idx].atchFileTy); + } + + fileDownloadWindow.scwin.setFiles(); +}; + +com.setFileDownloadBbs = function(fileDownloadFrame, option) { + var files = option.files; + var fileCount = files.length; + + fileDownloadFrame.setSrc(gcm.CONTEXT_PATH + "/cm/common/fileDownloadBbs.xml"); + var fileDownloadWindow = fileDownloadFrame.getWindow(); + + for (var idx = 0; idx < fileCount; idx++) { + fileDownloadWindow.scwin.insertFile(files[idx].fileId, files[idx].localFileName,files[idx].fileSeq,files[idx].atchFileTy); + } + + fileDownloadWindow.scwin.setFiles(); +}; + + + +/** + * File Upload를 시작한다. + * + * @date 2019.05.31 + * @memberOf com + * @param {Object} fileViewFrame File View WFrame 객체 + * @example + * com.startUpload(wfm_fileUpload); + */ +com.startUpload = function(fileUploadFrame) { + var fileUploadWindow = fileUploadFrame.getWindow(); + + if (fileUploadWindow.mpd_multiFileUpload.getFileInfos().length > 0) { + fileUploadWindow.mpd_multiFileUpload.startUpload(); + } else { + var deletedFiles = fileUploadWindow.scwin.getDeletedFiles(); + fileUploadWindow.scwin.callBackUploadDoneFunc(deletedFiles); + fileUploadWindow.scwin.clearFiles(); + } +}; + +/** + * Window.onBeforeUnload 이벤트를 추가한다. + * + * @date 2019.06.12 + * @memberOf gcm + * @author 박상규 + * @example + * com.addEventOnBeforeUnload(); + */ +com.addEventOnBeforeUnload = function() { + gcm._addEventOnBeforeUnload(); +}; + + +/** + * 메인 화면에서 업무 화면을 오픈하는 Frame Mode 정보를 반환한다. + * + * @date 2018.11.14 + * @memberOf com + * @author 박상규 + */ +com.getFrameMode = function () { + return gcm.FRAME_MODE; +}; + +/** + * 사용자의 권한에 따른 화면 컴포넌트 제어를 한다. + * + * @date 2018.12.07 + * @memberOf com + * @author 박상규 + */ +com._setProgramAuthority = function () { + var param = com.getParameter(); + if ((typeof param !== "undefined") && (typeof param.menuCode !== "undefined") && (param.menuCode.trim() !== "")) { + var menuCd = param.menuCode; + var menuInfoList = $p.top().wfm_side.getWindow().dlt_menu.getMatchedJSON("MENU_CD", menuCd); + + if (menuInfoList.length > 0) { + var programAuthorityList = $p.top().wfm_side.getWindow().dlt_programAuthority.getMatchedJSON("PROGRAM_CD", menuInfoList[0].PROGRAM_CD); + + if (programAuthorityList.length > 0) { + var programAuthority = programAuthorityList[0]; + var objArr = WebSquare.util.getChildren($p.getFrame(), { + excludePlugin: "group trigger textbox output calendar image span", + recursive: true + }); + + for (var i = 0; i < objArr.length; i++) { + if ((objArr[i].getPluginName() === "anchor") || (objArr[i].getPluginName() === "trigger")) { + if (objArr[i].getOriginalID().indexOf("btn_search") > -1) { + if (programAuthority.IS_AUTH_SELECT !== "Y") { + objArr[i].hide(); + } + } else if (objArr[i].getOriginalID().indexOf("btn_add") > -1) { + if (programAuthority.IS_AUTH_SAVE !== "Y") { + objArr[i].hide(); + } + } else if (objArr[i].getOriginalID().indexOf("btn_cancel") > -1) { + if (programAuthority.IS_AUTH_SAVE !== "Y") { + objArr[i].hide(); + } + } else if (objArr[i].getOriginalID().indexOf("btn_save") > -1) { + if (programAuthority.IS_AUTH_SAVE !== "Y") { + objArr[i].hide(); + } + } else if (objArr[i].getOriginalID().indexOf("btn_excel") > -1) { + if (programAuthority.IS_AUTH_EXCEL !== "Y") { + objArr[i].hide(); + } + } + } + } + } + } + } +}; + + +/** + * 로그인한 사용자가 시스템 관리자 인지의 여부를 반환한다. + * + * @date 2018.12.01 + * @memberOf com + * @author 박상규 + */ +com.isAdmin = function () { + scwin.isAdmin = $p.top().wfm_side.getWindow().dma_defInfo.get("IS_ADMIN"); + if (scwin.isAdmin === "Y") { + return true; + } else { + return false; + } +}; + +/** + * 현재 클라이언트 브라우저 환경의 모바일 여부를 반환한다. + * + * @date 2019.06.05 + * @memberOf com + * @author 박상규 + */ +com.isMobile = function () { + return WebSquare.util.isMobile(); +}; + +/** + * 로그인된 상태인지 여부를 검사한다. + * + * @date 2019.05.27 + * @memberOf com + * @author 박상규 + */ +com.isLogin = function () { + return $p.top().dma_defInfo.getJSON().IS_LOGIN; +}; + +/** + * 비회원 상태인지 여부를 검사한다. + * + * @date 2019.05.31 + * @memberOf com + * @author 이승현 + */ +com.isTempUser = function () { + return $p.top().dma_defInfo.getJSON().IS_TEMPMBER; +}; + +/** + * 로그인한 사용자의 아이디(사원번호)를 반환한다. + * + * @date 2018.12.01 + * @memberOf com + * @author 박상규 + */ +com.getLoginUserId = function () { + return $p.top().wfm_side.getWindow().dma_defInfo.get("MBER_ID"); +}; + +/** + * Submission를 실행합니다. + * + * @date 2019.05.29 + * @param {Object} options com.createSubmission의 options 참고 + * @param {Object} requestData 요청 데이터 + * @param {Object} obj 전송중 disable시킬 컴퍼넌트 + * @memberOf com + * @author 박상규 + * @example + * var searchCodeGrpOption = { + * id : "sbm_searchCodeGrp", + * action : "serviceId=CD0001&action=R", + * target : 'data:json,{"id":"dlt_codeGrp","key":"data"}', + * submitDoneHandler : scwin.searchCodeGrpCallback, isShowMeg : false }; + * com.executeSubmission_dynamic(searchCodeGrpOption); + */ +com.executeSubmission_dynamic = function (options, requestData, obj) { + var submissionObj = $p.getSubmission(options.id); + + if (submissionObj === null) { + com.createSubmission(options); + submissionObj = $p.getSubmission(options.id); + } else { + $p.deleteSubmission(options.id); + com.createSubmission(options); + submissionObj = $p.getSubmission(options.id); + } + + com.executeSubmission(submissionObj, requestData, obj); +}; + +/** + * Submission 객체를 동적으로 생성한다. + * + * @date 2019.05.29 + * @param {Object} options Submission 생성 옵션 JSON 객체 + * @param {String} options.id submission 객체의 ID. 통신 모듈 실행 시 필요. + * @param {String} options.ref 서버로 보낼(request) DataCollection의 조건 표현식.(조건에 때라 표현식이 복잡하다) 또는 Instance Data의 XPath. + * @param {String} options.target 서버로 응답(response) 받은 데이터가 위치 할 DataCollection의 조건 표현식. 또는 Instance Data의 XPath. + * @param {String} options.action 통신 할 서버 측 URI.(브라우저 보안 정책으로 crossDomain은 지원되지 않는다.) + * @param {String} options.method [default: get, post, urlencoded-post] + * - get : 파라메타를 url에 붙이는 방식 (HTML과 동일). + * - post : 파라메타를 body 구간에 담는 방식 (HTML과 동일) + * - urlencoded-post : urlencoded-post. + * @param {String} options.mediatype [default: application/xml, text/xml, application/json, application/x-www-form-urlencoded] + * application/x-www-form-urlencoded 웹 form 방식(HTML방식). application/json : json 방식. application/xml : XML 방식. text/xml : xml방식 + * (두 개 차이는 http://stackoverflow._com/questions/4832357 참조) + * @param {String} options.mode [default: synchronous, synchronous] 서버와의 통신 방식. asynchronous:비동기식. synchronous:동기식 + * @param {String} options.encoding [default: utf-8, euc-kr, utf-16] 서버 측 encoding 타입 설정 (euc-kr/utf-16/utf-8) + * @param {String} options.replace [default: none, all, instance] action으로부터 받은 response data를 적용 구분 값. + * - all : 문서 전체를 서버로부터 온 응답데이터로 교체. + * - instance : 해당되는 데이터 구간. + * - none : 교체안함. + * @param {String} options.processMsg submission 통신 중 보여줄 메세지. + * @param {String} options.errorHandler submission오류 발생 시 실행 할 함수명. + * @param {String} options.customHandler submssion호출 시 실행 할 함수명. + * @param {requestCallback} options.submitHandler {script type="javascript" ev:event="xforms-submit"} 에 대응하는 함수. + * @param {requestCallback} options.submitDoneHandler {script type="javascript" ev:event="xforms-submit-done"} 에 대응하는 함수 + * @param {requestCallback} options.submitErrorHandler {script type="javascript" ev:event="xforms-submit-error"} 에 대응하는 함수 + * @memberOf com + * @author 박상규 + * @example + * com.createSubmission(options); + */ +com.createSubmission = function (options) { + var ref = options.ref || ""; + var target = options.target || ""; + var action = gcm.SERVICE_URL + options.action; //ajax 요청주소 + var mode = options.mode || gcm.DEFAULT_OPTIONS_MODE; //asynchronous(default)/synchronous + var mediatype = options.mediatype || gcm.DEFAULT_OPTIONS_MEDIATYPE; //application/x-www-form-urlencoded + var method = (options.method || "post").toLowerCase(); //get/post/put/delete + var processMsg = options.processMsg || ""; + var instance = options.instance || "none"; + + var submitHandler = (typeof options.submitHandler === "function") ? options.submitHandler + : ((typeof options.submitHandler === "string") ? $p.id + options.submitHandler : ""); + var submitDoneHandler = (typeof options.submitDoneHandler === "function") ? options.submitDoneHandler + : ((typeof options.submitDoneHandler === "string") ? $p.id + options.submitDoneHandler : ""); + var submitErrorHandler = (typeof options.submitErrorHandler === "function") ? options.submitErrorHandler + : ((typeof options.submitErrorHandler === "string") ? $p.id + options.submitErrorHandler : ""); + + var isShowMeg = false; + var resJson = null; + + if ((options.isProcessMsg === true) && (processMsg === "")) { + processMsg = "해당 작업을 처리중입니다"; + } + + if (typeof options.isShowMeg !== "undefined") { + isShowMeg = options.isShowMeg; + } + + var submissionObj = { + "id": options.id, //submission 객체의 ID. 통신 모듈 실행 시 필요. + "ref": ref, //서버로 보낼(request) DataCollection의 조건 표현식.(조건에 때라 표현식이 복잡하다) 또는 Instance Data의 XPath. + "target": target, //서버로 응답(response) 받은 데이터가 위치 할 DataCollection의 조건 표현식. 또는 Instance Data의 XPath. + "action": action, //통신 할 서버 측 URI.(브라우저 보안 정책으로 crossDomain은 지원되지 않는다.) + "method": method, //[default: post, get, urlencoded-post] get:파라메타를 url에 붙이는 방식 (HTML과 동일). + // post:파라메타를 body 구간에 담는 방식 (HTML과 동일). urlencoded-post:urlencoded-post. + "mediatype": mediatype, //application/json + "encoding": "UTF-8", //[default: utf-8, euc-kr, utf-16] 서버 측 encoding 타입 설정 (euc-kr/utf-16/utf-8) + "mode": mode, //[default: synchronous, synchronous] 서버와의 통신 방식. asynchronous:비동기식. synchronous:동기식 + "processMsg": processMsg, //submission 통신 중 보여줄 메세지. + "submitHandler": submitHandler, + "submitDoneHandler": submitDoneHandler, + "submitErrorHandler": submitErrorHandler + }; + + $p.createSubmission(submissionObj); +}; + +/** + * 서버 통신 확장 모듈, Submission를 실행합니다. + * + * @date 2019.05.29 + * @param {Object} sbmObj submission 객체 + * @param {Object} requestData [Default : null, JSON, XML] 요청 데이터로 submission에 등록된 ref를 무시하고 현재의 값이 할당된다. + * @param {Object} compObj [Default : null] 전송중 disable시킬 컴퍼넌트 + * @memberOf com + * @author 박상규 + * @example + * // Submission ID : sbm_init 존재할 경우 + * com.executeSubmission(sbm_Init); + * // return 예시) sbm_init 통신 실행 + * + * // Submission ID : sbm_init 존재하지 않을 경우 + * com.executeSubmission(sbm_Init); + * // return 예시) alert - submission 객체[sbm_init]가 존재하지 않습니다. + */ +com.executeSubmission = function (sbmObj, requestData, compObj) { + $p.executeSubmission(sbmObj, requestData, compObj); +}; + +/** + * 서버에서 전송한 통신 결과 코드를 반환한다. + * 화면에 정의한 submission의 submitdone이벤트에서 호출하여 사용한다. + * + * @date 2019.05.29 + * @param {Object} e submission 후 callback의 상태값 + * @memberOf com + * @author 박상규 + * @return {String} 상태 코드 + * @example + * // 통신결과 코드가 있을 경우 + * com.getResultCode(e); + * // return 예시) E || S || W + * + * // 통신결과 코드가 없을 경우 + * com.getResultCode(e); + * // return 예시) 웹스퀘어5 로그창 - 결과 상태 메세지가 없습니다.: com.getResultCode + */ +com.getResultCode = function (e) { + var rsCode = gcm.MESSAGE_CODE.STATUS_ERROR; + try { + rsCode = e.responseJSON.rsMsg.statusCode; + } catch (ex) { + $p.log("결과 상태 메세지가 없습니다.: com.getResultCode"); + } + + return rsCode; +}; + +/** + * statusCode값에 따라 message를 출력한다. + * + * @private + * @date 2019.05.29 + * @param {Object} resultData 상태코드값 및 메시지가 담긴 JSON. + * @param {String} resultData.message 메시지 + * @param {String} resultData.statusCode 상태코드값 + * @memberOf com + * @author 박상규 + */ +com.resultMsg = function (resultData) { + resultData.message = resultData.message || ""; + var msgCode = gcm.MESSAGE_CODE; + + switch (resultData.statusCode) { + case msgCode.STATUS_ERROR: + if (resultData.errorCode == "E0001") { + com.alert(resultData.message + " 로그인 화면으로 이동하겠습니다.", "com.login"); + } else { + com.alert(resultData.message); + } + break; + case "N": + resultData.statusCode = msgCode.STATUS_ERROR; + resultData.message = "서버가 정지된 상태입니다. 자세한 내용은 관리자에게 문의하시기 바랍니다."; + break; + default: + } + + if (typeof $p.top().scwin.setResultMessage == "function") { + $p.top().scwin.setResultMessage(resultData); + } +}; + +/** + * 코드성 데이터와 컴포넌트의 nodeSet(아이템 리스트)연동 기능을 제공한다. + * code별로 JSON객체를 생성하여 array에 담아 첫번째 파라메터로 넘겨준다. + * + * @date 2019.05.14 + * @param {Object} codeOptions {"code" : "코드그룹아이디", "compID" : "적용할 컴포넌트명"} + * @param {requestCallback} callbackFunc 콜백 함수 + * @memberOf com + * @author 박상규 + * @example + * var codeOptions = [ { code : "BRS_001", compID : "sbx_memberType" }, + * { code : "BRS_002", compID : "sbx_clauseType" }, + * { code : "BRS_002", compID : "sbx_clauseType1, sbx_clauseType2"}, + * { code : "BRS_002", compID : "grd_CommCodeSample:CLAUSE_TYPE"}, + * { code : "BRS_001", compID : "sbx_memberType, grd_CommCodeSample:MEMBER_TYPE"} ]; + * com.setCommonCode(codeOptions); + */ +com.setCommonCode = function(codeOptions, callbackFunc) { + + var codeOptionsLen = 0; + + if (codeOptions) { + codeOptionsLen = codeOptions.length; + } else { + $p.log("=== com.setCommonCode Parameter Type Error ===\nex) com.setCommonCode([{\"code:\":\"04\",\"compID\":\"sbx_Gender\"}],\"scwin.callbackFunction\")\n==================================="); + return; + } + + var i, j, codeObj, dltId, dltIdArr = [], paramCode = "", compArr, compArrLen, tmpIdArr; + var dataListOption = _getCodeDataListOptions(gcm.COMMON_CODE_INFO.FILED_ARR); + + for (i = 0; i < codeOptionsLen; i++) { + codeObj = codeOptions[i]; + + try { + dltId = gcm.DATA_PREFIX + codeObj.code; + var codeStr = $p.top().scwin.getCommonCode(codeObj.code); + + if (codeStr !== null) { + dataListOption.id = dltId; + $p.data.create(dataListOption); + var dataListObj = $p.getComponentById(dataListOption.id); + + var codeJson = com.getJSON(codeStr); + dataListObj.setJSON(codeJson); + } else { + $p.log("[" + codeObj.code + "]는 존재하지 않는 코드그룹 입니다."); + } + + if (codeObj.compID) { + compArr = (codeObj.compID).replaceAll(" ", "").split(","); + compArrLen = compArr.length; + for (j = 0; j < compArrLen; j++) { + tmpIdArr = compArr[j].split(":"); + + // 기본 컴포넌트에 대한 Node Setting 설정 + if (tmpIdArr.length === 1) { + var comp = $p.getComponentById(tmpIdArr[0]); + comp.setNodeSet("data:" + dltId, gcm.COMMON_CODE_INFO.LABEL, gcm.COMMON_CODE_INFO.VALUE); + + // gridView 컴포넌트에 대한 Node Setting 설정 + } else { + var gridObj = $p.getComponentById(tmpIdArr[0]); + gridObj.setColumnNodeSet(tmpIdArr[1], "data:" + dltId, gcm.COMMON_CODE_INFO.LABEL, gcm.COMMON_CODE_INFO.VALUE); + } + } + } + } catch (ex) { + $p.log("com.setCommonCode Error"); + $p.log(JSON.stringify(codeObj)); + $p.log(ex); + + } + } + + if (typeof callbackFunc === "function") { + callbackFunc(); + } + + // dataList를 동적으로 생성하기 위한 옵션 정보를 반환한다. + function _getCodeDataListOptions(infoArr) { + var option = { + "type": "dataList", + "option": {"baseNode": "list", "repeatNode": "map"}, + "columnInfo": [] + }; + + for (var idx in infoArr) { + option.columnInfo.push({"id": infoArr[idx]}); + } + return option; + } +}; + +com.getCommonCode; + +/** + * 특정 코드그룹 데이터를 JSON 객체로 반환한다. + * + * @date 2019.05.22 + * @param {String} codeGrpId "코드그룹아이디" + * @param {requestCallback} callbackFunc 콜백 함수 + * @memberOf com + * @author 박상규 + * @example + * var codeObj = com.getCommonCode("BRS_001"); + */ +com.getCommonCode = function(codeGrpId, callbackFunc) { + var codeStr = $p.top().scwin.getCommonCode(codeGrpId); + + if (typeof callbackFunc === "function") { + callbackFunc(); + } + + return com.getJSON(codeStr); +}; + +/** + * GridView Row 삭제를 위한 CheckBox 동작을 세팅한다. + * GridView에 삭제용 CheckBox가 있을 경우 onPageLoad 이벤트에서 com.setGridViewDelCheckBox 함수를 호출한다. + * 이 함수가 정상 동작하려면 GridView의 Delete 처리용 CheckBox의 ColumnId와 Header Id를 "chk"로 설정해야 한다. + * + * @date 2018.11.26 + * @memberOf com + * @author 박상규 + * @param {Array} gridViewObj GridView 객체 배열 + * @example + * com.setGridViewDelCheckBox(grd_OrganizationBasic); + * com.setGridViewDelCheckBox([grd_Menu, grd_MenuAccess]); + */ +com.setGridViewDelCheckBox = function (gridViewObjArr) { + try { + if (com.getObjectType(gridViewObjArr) === "array") { + for (idx in gridViewObjArr) { + setGridViewDelCheckBox(gridViewObjArr[idx]); + } + } else { + setGridViewDelCheckBox(gridViewObjArr); + } + + function setGridViewDelCheckBox(gridViewObj) { + gridViewObj.bind("oncellclick", + function (row, col) { + var columnId = gridViewObj.getColumnID(col); + if (columnId == "chk") { + var dltObj = com.getGridViewDataList(this); + var realRowIndex = this.getRealRowIndex(row); + var newValue = dltObj.getCellData(realRowIndex, columnId); + + dltObj.setBroadcast(false); + com._setGridViewRowCheckBox(this, realRowIndex, newValue === "1" ? true : false); + dltObj.setBroadcast(true, true); + } + } + ); + gridViewObj.bind("onheaderclick", + function (headerId) { + if (headerId == "chk") { + var newValue = this.getHeaderValue(headerId); + var dltObj = com.getGridViewDataList(this); + var rowCount = dltObj.getRowCount(); + + dltObj.setBroadcast(false); + for (var rowIdx = 0; rowIdx < rowCount; rowIdx++) { + com._deleteGridViewRow(this, rowIdx, newValue); + } + dltObj.setBroadcast(true, true); + } + } + ); + } + } catch (e) { + $p.log("[com.setGridViewDelCheckBox] Exception :: " + e.message); + } +}; + +com._setGridViewRowCheckBox = function (gridViewObj, rowIndex, newValue) { + var rowIndexArr = gridViewObj.getChildrenRowIndexArray(rowIndex); + var dltObj = com.getGridViewDataList(gridViewObj); + + for (var idx in rowIndexArr) { + var childRowIndexArr = gridViewObj.getChildrenRowIndexArray(rowIndexArr[idx]); + + if (childRowIndexArr.length > 0) { + com._setGridViewRowCheckBox(gridViewObj, rowIndexArr[idx], newValue); + } else { + com._deleteGridViewRow(gridViewObj, rowIndexArr[idx], newValue); + } + } + + com._deleteGridViewRow(gridViewObj, rowIndex, newValue); +}; + +com._deleteGridViewRow = function (gridViewObj, rowIndex, newValue) { + gridViewObj.setCellChecked(rowIndex, "chk", newValue); + var dltObj = com.getGridViewDataList(gridViewObj); + + if (newValue) { + var rowStatus = dltObj.getRowStatus(rowIndex); + if (rowStatus == "C") { + dltObj.removeRow(rowIndex); + } else { + dltObj.deleteRow(rowIndex); + } + } else { + dltObj.undoRow(rowIndex); + } +}; + +/** + * 특정 컴포넌트의 자식 컴포넌트를 배열로 반환한다. + * + * @date 2019.06.10 + * @memberOf com + * @param {Object} comObj 컴포넌트 객체 + * @param {Object} options 하위 컴포넌트 검색 옵션 정보 + * @param {String} options.includeId 포함할 컴포넌트 id. 인자가 여러 개일 경우 공백을 구분자로 사용함. + * @param {String} options.includePlugin 포함 컴포넌트 플러그인 이름. 인자가 여러 개일 경우 공백을 구분자로 사용함. + * @author 박상규 + * @example + * com.getChildren(grp_content); + * com.getChildren(grp_content, {includeId : "ibx_name sbx_payTy"}); + * com.getChildren(grp_content, {includePlugin : "selectbox"}); + * com.getChildren(grp_content, {includeId : "ibx_name sbx_payTy", includePlugin : "input selectbox"}); + */ +com.getChildren = function(comObj, options) { + try { + var target = comObj.getAllChildren(); + + if ((typeof options !== "undefined") && options) { + var ret = []; + var _includeId = options.includeId ? (" " + options.includeId + " ") : false; + var _includePlugin = options.includePlugin ? (" " + options.includePlugin + " ") : false; + for (var i = 0; i < target.length; i++) { + if ((!_includeId || _includeId.indexOf(" " + target[i].getOriginalID() + " ") > -1) + && (!_includePlugin || _includePlugin.indexOf(" " + target[i].getPluginName() + " ") > -1)) { + ret.push(target[i]); + } + } + return ret; + } else { + return target; + } + } catch (ex) { + $p.log(ex); + } +}; + +/** + * GridView와 바인딩된 DataList 객체를 반환한다. + * + * @date 2018.01.11 + * @param {Object} gridViewObj 바인딩 된 DataList가 존재하는지 검증할 GridView 객체 + * @memberOf com + * @author 박상규 + * @return {Object} 바인딩 된 DataList 객체 반환 (바인된 객체가 없을 경우 null 반환) + * @example + * // 바인딩 되어있는 경우 + * com.getGridViewDataList(grd_First); + * // return 예시) "dlt_first" + * + * // 바인딩 되어있지 않은 경우 + * com.getGridViewDataList(grd_First); + * // return 예시) undefined + */ +com.getGridViewDataList = function (gridViewObj) { + var dataListId = gridViewObj.getDataList(); + + if (dataListId !== "") { + var dataList = $p.getComponentById(dataListId); + if ((typeof dataList === "undefined") || (dataList === null)) { + $p.log("DataList(" + dataListId + ")를 찾을 수 없습니다."); + return null; + } else { + return dataList; + } + } else { + $p.log(gridViewObj.getID() + "는 DataList가 세팅되어 있지 않습니다."); + return null; + } +}; + +/** + * 특정 컴포넌트에 바인된 DataList나 DataMap의 컬럼 이름을 반환한다. + * + * @date 2018.01.15 + * @memberOf com + * @param {Object} comObj 컴포넌트 객체 + * @return {String} 컬럼명 + */ +com.getColumnName = function (comObj) { + try { + if ((typeof comObj.getRef) === "function") { + var ref = comObj.getRef(); + var refArray = ref.substring(5).split("."); + var dataCollectionName = refArray[0]; + var columnId = refArray[1]; + + if ((typeof refArray !== "undefined") && (refArray.length === 2)) { + var dataCollection = comObj.getScopeWindow().$p.getComponentById(dataCollectionName); + var dataType = dataCollection.getObjectType().toLowerCase(); + if (dataType === "datamap") { + return dataCollection.getName(columnId); + } else if (dataType === 'datalist') { + return dataCollection.getColumnName(columnId); + } + } else { + return ""; + } + } + } catch (e) { + $p.log("[com.getColumnName] Exception :: " + e.message); + } finally { + dataCollection = null; + } +}; + +/** + * 특정 컴포넌트에 바인된 DataList나 DataMap의 정보를 반환한다. + * + * @date 2018.01.15 + * @memberOf com + * @param {Object} comObj callerObj 컴포넌트 객체 + * @returns {Object} dataCollection정보 + */ +com.getDataCollection = function (comObj) { + try { + if ((typeof comObj !== "undefined") && (typeof comObj.getRef === "function")) { + var ref = comObj.options.ref; + if ((typeof ref !== "undefined") && (ref !== "")) { + var refArray = ref.substring(5).split("."); + if ((typeof refArray !== "undefined") && (refArray.length === 2)) { + var dataObjInfo = {}; + dataObjInfo.runtimeDataCollectionId = comObj.getScope().id + "_" + refArray[0]; + dataObjInfo.dataColletionId = refArray[0]; + dataObjInfo.columnId = refArray[1]; + return dataObjInfo; + } else { + return null; + } + } else { + return null; + } + } + } catch (e) { + console.log("[com.getDataCollection] Exception :: " + e.message); + } finally { + dataCollection = null; + } +}; + +/** + * DataCollection 객체의 변경된 데이터가 있는지 검사한다. + * + * @date 2018.01.16 + * @memberOf com + * @param {Object} dcObjArr DataCollection 또는 배열 + * @author 박상규 + * @returns {Boolean} 검사결과 (true or false) + */ +com.checkModified = function (dcObjArr) { + if (com.getObjectType(dcObjArr) === "array") { + for (var dcObj in dcObjArr) { + if (com.getObjectType(dcObj) === "object") { + if (checkModfied(dcObj) === false) { + return false; + } + } + } + } else if (com.getObjectType(dcObjArr) === "object") { + return checkModfied(dcObj); + } + + return true; + + function checkModfied(dcObj) { + if ((typeof dcObj !== "undefined") && (typeof dcObj !== null)) { + var modifiedIndex = dcObj.getModifiedIndex(); + if (modifiedIndex.length === 0) { + com.alert("변경된 데이터가 없습니다."); + return false; + } else { + return true; + } + } else { + return true; + } + } +}; + +/** + * DataList의 데이터를 엑셀 파일로 저장한다. + * + * @date 2019.04.05 + * @param {Object} options.common JSON형태로 저장된 dataList의 엑셀 다운로드 옵션 + * @param {String} options.common.fileName [default: excel.xls] 다운로드하려는 파일의 이름 + * @param {Boolean} options.common.showProcess [default: true] 다운로드 시 프로세스 창을 보여줄지 여부 + * @param {String} options.common.multipleSheet [default: true] 다운로드시 dataList별 sheet분리 출력유무 + * @param {Object} options.common.printSet JSON형태로 저장된 Excel Print관련 설정 + * @param {String} options.common.printSet.fitToPage [default: false] 엑셀 프린터 출력시 쪽맞춤 사용 유무 + * @param {String} options.common.printSet.landScape [default: false] 엑셀 프린터 출력시 가로 방향 출력 유무 + * @param {String} options.common.printSet.fitWidth [default: 1] 엑셀 프린터 출력시 용지너비 + * @param {String} options.common.printSet.fitHeight [default: 1] 엑셀 프린터 출력시 용지높이 + * @param {String} options.common.printSet.scale [default: 100] 엑셀 프린터 출력시 확대/축소 배율, scale을 사용할 경우 fitToPage는 false로 설정 해야 한다. + * @param {String} options.common.printSet.pageSize [default: A4] 엑셀 프린터 출력시 인쇄 용지 크기 (예: "A3", "A4", "A5", "B4") 단, fitToPage: true 인 경우에만 유효. + * @param {Array} [options.excelInfo] JSON형태로 저장된 dataList의 옵션 정보 + * @param {String} options.excelInfo.dataListId [default: 없음] excel의 sheet에 저장한 DataList의 아이디 + * @param {String} options.excelInfo.sheetName [default: sheet] excel의 sheet의 이름 + * @param {String} options.excelInfo.removeColumns [default: 없음] 다운로드시 excel에서 삭제하려는 열의 번호(여러 개일 경우 ,로 구분) + * @param {String} options.excelInfo.foldColumns [default: 없음] 다운로드시 excel에서 fold하려는 열의 번호(여러 개일 경우 ,로 구분) + * @param {Number} options.excelInfo.startRowIndex [default: 0] excel파일에서 dataList의 데이터가 시작되는 행의 번호(헤더 포함) + * @param {Number} options.excelInfo.startColumnIndex [default: 0] excel파일에서 dataList의 데이터가 시작되는 열의 번호(헤더 포함) + * @param {String} options.excelInfo.headerColor [default: #33CCCC] excel파일에서 dataList의 header부분의 색 + * @param {String} options.excelInfo.headerFontName [default: 없음] excel파일에서 dataList의 header부분의 font name + * @param {String} options.excelInfo.wframeId [default: 현재 WFrame Id] DataList가 위치한 WFrame Id 정보 + * @param {Array} options.excelInfo.infoArr dataList에 대한 내용을 추가로 다른 셀에 표현하는 경우 사용하는 배열 + * @param {Number} options.excelInfo.infoArr.rowIndex 내용을 표시할 행번호 + * @param {Number} options.excelInfo.infoArr.colIndex 내용을 표시할 열번호 + * @param {Number} options.excelInfo.infoArr.rowSpan 병합할 행의 수 + * @param {Number} options.excelInfo.infoArr.colSpan 병합할 열의 수 + * @param {String} options.excelInfo.infoArr.text 표시할 내용 + * @param {String} options.excelInfo.infoArr.textAlign 표시할 내용의 정렬 방법 (left, center, right) + * @param {String} options.excelInfo.infoArr.fontSize font size 설정 ( ex) "20px" ) + * @param {String} options.excelInfo.infoArr.fontName font name 설정 + * @param {String} options.excelInfo.infoArr.color font color 설정 ( ex) "red" ) + * @param {String} options.excelInfo.infoArr.fontWeight font weight 설정 ( ex) "bold" ) + * @param {String} options.excelInfo.infoArr.drawBorder cell의 border 지정 ( ex) true ) + * @param {String} options.excelInfo.infoArr.wordWrap cell의 줄 바꿈 기능 ( ex) "true" ) + * + * @memberOf com + * @author 박상규 + * @example + * + * // id가 a,b,c,d,e인 5개 컬럼이 존재하는 DataList + * var options = { + * common: { + * fileName : "excel_data.xlsx", + * showProcess : true, + * multipleSheet : true, + * printSet : { + * landScape : "true", + * fitToPage : "true", + * fitWidth : "1", + * fitHeight : "1", + * scale : "222" + * } + * }, + * excelInfo: [ + * { + * dataListId : "dlt_data1", + * sheetName : "첫번째 sheet", + * removeColumns : "1,3", + * foldColumns : "2", + * startRowIndex : 3, + * startColumnIndex : 0, + * headerColor : "#DBEEF3", + * bodyColor : "#92CDDC", + * wframeId : "wframe1", + * infoArr : [ + * { + * rowIndex : 1, colIndex : 3, rowSpan : 1, colSpan : 2, text : "데이터표시" , textAlign : "center" + * } + * ] + * }, + * { + * dataListId : "dlt_data2", + * sheetName : "두번째 sheet", + * removeColumns : "1,3", + * foldColumns : "2", + * startRowIndex : 3, + * startColumnIndex : 0, + * headerColor : "#DBEEF3", + * bodyColor : "#92CDDC", + * wframeId : "wframe1", + * infoArr : [ + * { + * rowIndex : 1, colIndex : 3, rowSpan : 1, colSpan : 2, text : "데이터표시" , textAlign : "center" + * } + * ] + * } + * ] + * }; + * com.dataListDownload(options); + * + */ +com.dataListDownload = function(optionsParam, infoArrParam) { + var options = { + common: { + fileName : optionsParam.common.fileName || "dataList.xlsx", + showProcess : optionsParam.common.showProcess || true, + autoSizeColumn : optionsParam.common.autoSizeColumn || true, + multipleSheet : optionsParam.common.multipleSheet || true, + printSet : optionsParam.common.printSet || {}, + }, + excelInfo: [] + }; + + if (optionsParam.excelInfo.length > 0) { + var excelInfoCount = optionsParam.excelInfo.length; + + for (var idx = 0; idx < excelInfoCount; idx++) { + var wframeId = optionsParam.excelInfo[idx].wframeId || $p.getFrameId(); + var dataListId = optionsParam.excelInfo[idx].dataListId; + + var dataListObj = $p.getComponentById(wframeId + "_"+ dataListId); + if (typeof dataListObj === "undefined") { + $p.log("[com.dataListDownload] excelInfo.dataListId에 설정된 " + dataListId + " DataList를 찾을 수 없습니다."); + return; + } + + var excelInfo = { + dataListId : dataListId, + sheetName : optionsParam.excelInfo[idx].sheetName || dataListId, + removeColumns : optionsParam.excelInfo[idx].removeColumns || "", + foldColumns : optionsParam.excelInfo[idx].foldColumns || "", + startRowIndex : optionsParam.excelInfo[idx].startRowIndex || 0, + startColumnIndex : optionsParam.excelInfo[idx].startColumnIndex || 0, + headerColor : optionsParam.excelInfo[idx].headerColor || "#33CCCC", + bodyColor : optionsParam.excelInfo[idx].bodyColor || "#FFFFFF", + wframeId : wframeId, + infoArr : optionsParam.excelInfo[idx].infoArr + }; + + options.excelInfo.push(excelInfo); + } + } else { + $p.log("[com.dataListDownload] options.excelInfo 정보가 입력되지 않았습니다."); + return; + } + + WebSquare.util.multipleDataListDownload(options, infoArrParam); +}; + +/** + * 엑셀 다운로드 옵션을 설정하고 확장자 별로 다른 함수(downLoadCSV || downLoadExcel)를 호출한다. + * + * @date 2016.11.16 + * @param {Object} grdObj GridView Object + * @param {Array} options JSON형태로 저장된 그리드의 엑셀 다운로드 옵션 + * @param {Array} infoArr 그리드에 대한 내용을 추가로 다른 셀에 표현하는 경우 사용하는 배열 + * @memberOf com + * @author 박상규 + * @example + * var options = { + * fileName : "gridDataDownLoad.xlsx" // [defalut: excel.xlsx] 다운로드하려는 파일의 이름으로 필수 입력 값 (지원하는 타입 => xls, xlsx, csv) + * }; + * + * com.gridDataDownLoad(grd_advancedExcel, options); + * + * var options = { + * fileName : "gridDataDownLoad.xlsx", // [defalut: excel.xlsx] 다운로드하려는 파일의 이름으로 필수 입력 값 (지원하는 타입 => xls, xlsx, csv) + * removeColumns : "0" + * }; + * + * var infoArr = {}; + * + * com.gridDataDownLoad(grd_advancedExcel, options, infoArr); + * + */ +com.gridDataDownLoad = function (grdObj, options, infoArr) { + var title = ""; + var fileName = options.fileName; + if (fileName.length == 0) { + options.fileName = "excel.xlsx"; + } else { + fileName = fileName.toLowerCase(); + if (fileName.indexOf(".csv") > -1) { + com.gridDataDownLoadCSV(grdObj, options); + } else if (fileName.indexOf(".xlsx") > -1 || fileName.indexOf(".xls") > -1) { + com.gridDataDownLoadExcel(grdObj, options, infoArr); + } else { + com.alert("알수없는 파일 형식입니다"); + } + } +}; + +/** + * 설정된 옵션으로 엑셀을 다운로드 한다. + * + * @date 2019.04.05 + * @param {Object} grdObj GridView 객체 + * @param {Object} options JSON형태로 저장된 그리드의 엑셀 다운로드 옵션 + * @param {String} options.fileName [default: excel.xls] 다운로드하려는 파일의 이름으로 필수 입력 값이다. + * @param {String} options.sheetName [default: sheet] excel의 sheet의 이름 + * @param {String} options.type [default: 0] type이 0인 경우 실제 데이터 1인 경우 눈에 보이는 데이터를 2이면 들어가 있는 data 그대로(filter무시 expression 타입의 셀은 나오지 않음) + * @param {String} options.removeColumns [default: 없음] 다운로드시 excel에서 삭제하려는 열의 번호(여러 개일 경우 ,로 구분) + * @param {String} options.removeHeaderRows [default: 없음] 다운로드시 excel에서 삭제하려는 Header의 row index(여러 개일 경우 ,로 구분) + * @param {String} options.foldColumns [default: 없음] 다운로드시 excel에서 fold하려는 열의 번호(여러 개일 경우 ,로 구분) + * @param {Number} options.startRowIndex [default: 0] excel파일에서 그리드의 데이터가 시작되는 행의 번호(헤더 포함) + * @param {Number} options.startColumnIndex [default: 0] excel파일에서 그리드의 데이터가 시작되는 열의 번호(헤더 포함) + * @param {String} options.headerColor [default: #33CCCC] excel파일에서 그리드의 header부분의 색 + * @param {String} options.headerFontName [default: 없음] excel파일에서 그리드의 header부분의 font name + * @param {String} options.headerFontSize [default: 10] excel파일에서 그리드의 header부분의 font size + * @param {String} options.headerFontColor [default: 없음] excel파일에서 그리드의 header부분의 font색 + * @param {String} options.bodyColor [default: #FFFFFF] excel파일에서 그리드의 body부분의 색 + * @param {String} options.bodyFontName [default: 없음] excel파일에서 그리드의 body부분의 font name + * @param {String} options.bodyFontSize [default: 10] excel파일에서 그리드의 body부분의 font size + * @param {String} options.bodyFontColor [default: 없음] excel파일에서 그리드의 body부분의 font색 + * @param {String} options.subTotalColor [default: #CCFFCC] excel파일에서 그리드의 subtotal부분의 색 + * @param {String} options.subTotalFontName [default: 없음] excel파일에서 그리드의 subtotal부분의 font name + * @param {String} options.subTotalFontSize [default: 10] excel파일에서 그리드의 subtotal부분의 font size + * @param {String} options.subTotalFontColor [default: 없음] excel파일에서 그리드의 subtotal부분의 font색 + * @param {String} options.footerColor [default: #008000] excel파일에서 그리드의 footer부분의 색 + * @param {String} options.footerFontName [default: 없음] excel파일에서 그리드의 footer부분의 font name + * @param {String} options.footerFontSize [default: 10] excel파일에서 그리드의 footer부분의 font size + * @param {String} options.footerFontColor [default: 없음] excel파일에서 그리드의 footer부분의 font색 + * @param {String} options.oddRowBackgroundColor [default: 없음] excel파일에서 그리드 body의 홀수줄의 배경색 + * @param {String} options.evenRowBackgroundColor [default: 없음] excel파일에서 그리드 body의 짝수줄의 배경색 + * @param {String} options.rowNumHeaderColor [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 header 영역의 배경색 + * @param {String} options.rowNumHeaderFontName [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 header 영역의 폰트이름 + * @param {String} options.rowNumHeaderFontSize [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 header 영역의 폰트크기 + * @param {String} options.rowNumHeaderFontColor [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 header 영역의 폰트색상 + * @param {String} options.rowNumBodyColor [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 Body 영역의 배경색 + * @param {String} options.rowNumBodyFontName [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 Body 영역의 폰트이름 + * @param {String} options.rowNumBodyFontSize [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 Body 영역의 폰트크기 + * @param {String} options.rowNumBodyFontColor [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 Body 영역의 폰트색상 + * @param {String} options.rowNumFooterColor [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 Footer 영역의 배경색 + * @param {String} options.rowNumFooterFontName [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 Footer 영역의 폰트이름 + * @param {String} options.rowNumFooterFontSize [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 Footer 영역의 폰트크기 + * @param {String} options.rowNumFooterFontColor [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 Footer 영역의 폰트색상 + * @param {String} options.rowNumSubTotalColor [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 Subtotal 영역의 배경색 + * @param {String} options.rowNumSubTotalFontName [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 Subtotal 영역의 폰트이름 + * @param {String} options.rowNumSubTotalFontSize [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 Subtotal 영역의 폰트크기 + * @param {String} options.rowNumSubTotalFontColor [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 Subtotal 영역의 폰트색상 + * @param {String} options.rowNumHeaderValue [default: 없음] rowNumVisible 속성이 true인 경우 순서출력 Header 영역의 출력값 + * @param {String} options.rowNumVisible [default: false] 순서출력 유무 + * @param {Boolean} options.showProcess [default: true] 다운로드 시 프로세스 창을 보여줄지 여부 + * @param {Boolean} options.massStorage [default: true] 대용량 다운로드 여부 (default는 true 이 옵션을 true로 하고 showConfirm을 false로 한 경우에 IE에서 신뢰할만한 사이트를 체크하는 옵션이 뜬다.) + * @param {Boolean} options.numberToText [default: false] numberExtraction="true"이고 dataType="number"로 설정된 열의 데이터를 Excel 파일로 다운로드할 때 콤마 등 포맷에 포함된 기호를 유지. + * @param {Boolean} options.showConfirm [default: false] 다운로드 확인창을 띄울지 여부(옵션을 킨 경우 advancedExcelDownload를 호출후 사용자가 window의 버튼을 한번더 클릭해야 한다. massStorage는 자동으로 true가 된다) + * @param {String} options.dataProvider [default: 없음] 대량데이터 처리 및 사용자 데이터를 가공할 수 있는 Provider Package + * @param {String} options.splitProvider [default: 없음] 대량데이터 처리를 위해 데이터를 분할해서 처리할 수 있는 Provider Package + * @param {String} options.providerRequestXml [default: 없음] Provider 내부에서 사용할 XML 문자열 + * @param {String} options.userDataXml [default: 없음] 사용자가 서버모듈 개발 시 필요한 데이터를 전송 할 수 있는 변수 + * @param {Boolean} options.bodyWordwrap [default: false] 다운로드시 body의 줄 바꿈 기능 + * @param {Boolean} options.subtotalWordwrap [default: false] 다운로드시 subtotal의 줄 바꿈 기능 + * @param {Boolean} options.footerWordwrap [default: false] 다운로드시 footer의 줄 바꿈 기능 + * @param {String} options.useEuroLocale [default: false] 다운로드시 유로화 처리 기능(,와 .이 반대인 경우처리) + * @param {String} options.useHeader [default: true] 다운로드시 Header를 출력 할지 여부( "true"인경우 출력, "false"인경우 미출력) + * @param {String} options.useSubTotal [default: false] 다운로드시 SubTotal을 출력 할지 여부( "true"인경우 출력, "false"인경우 미출력), expression을 지정한 경우 avg,sum,min,max,targetColValue,숫자를 지원 함. + * @param {String} options.useFooter [default: true] 다운로드시 Footer를 출력 할지 여부( "true"인경우 출력, "false"인경우 미출력) + * @param {String} options.useHeaderCheckBoxLabel [default: false] 다운로드시 header가 checkbox인 경우 checked 값 대신 label을 출력 할지 여부( "true"인경우 header column value 출력, "false"인경우 checked값 출력) + * @param {String} options.separator [default: ,] 다운로드시 서버로 데이터 전송할때, 데이터를 구분짓는 구분자, default는 comma(,) + * @param {Number} options.subTotalScale [default: -1] 다운로드시 subTotal 평균계산시 소수점 자리수를 지정 + * @param {String} options.subTotalRoundingMode [default: 없음] 다운로드시 subTotal 평균계산시 Round를 지정 한다. ("CEILING","FLOOR","HALF_UP") + * @param {String} options.useStyle [default: false] 다운로드시 css를 제외한, style을 excel에도 적용할 지 여부 (배경색,폰트) + * @param {String} options.freezePane [default: ""] 틀고정을 위한 좌표값 및 좌표값의 오픈셋 ( ex) freezePane="3,4" X축 3, Y축 4에서 틀고정, freezePane="0,1,0,5" X축 0, Y축 1에서 X축으로 0, Y축으로 5로 틀공정 ) + * @param {String} options.autoSizeColumn [default: false] 너비자동맞춤 설정 유무 + * @param {String} options.displayGridlines [default: false] 엑셀 전체 셀의 눈금선 제거 유무 + * @param {String} options.colMerge [default: false] colMerge된 컬럼을 Merge해서 출력 할 지 여부 + * @param {String} options.colMergeTextAlign [default: center] colMerge된 컬럼의 textAlign설정 (bottom, center, top 설정) + * @param {String} options.mergeCell [default: false] gridView mergeCell API로 cell 머지시, excel에도 동일하게 머지되어 다운로드 할지 여부 + * @param {String} options.useDataFormat [default: 없음] "true"인 경우 dataType에 따라 Excel 파일에 표시 형식을 출력. dataType="text"인 셀은 Excel의 표시형식에 '텍스트' 출력, dataType="number" 혹은 "bigDecimal" 셀은 "숫자" 출력. + * @param {String} options.indent [default: 없음] 그리드 dataType이 drilldown인 경우, indent 표시를 위한 공백 삽입 개수, default값은 0 + * @param {String} options.columnMove [default: false] 그리드 컬럼이동시 이동된 상태로 다운로드 유무 ( "true"인경우 컬럼이동 순서대로 출력 ) + * @param {String} options.columnOrder [default: 없음] 엑셀 다운로드시 다운로드되는 컬럼 순서를 지정 할 수 있는 속성 ( ex) "0,3,2,1"로 지정시 지정한 순서로 다운로드된다 ) + * @param {String} options.columnMoveWithFooter [default: 없음] 그리드 컬럼이동시 Footer영역이 이동된 상태로 다운로드 유무 + * @param {String} options.optionParam [default: 없음] DRM 연계시 사용자 정의 class에 HashMap 인자로 전달할 값. key는 "optionParam"으로 참조한다. + * @param {String} options.rowHeight [default: 없음] 엑셀 파일로 다운로드 할 때 엑셀의 셀 높이. (단위: pixel) + * @param {String} options.pwd [default: 없음] 엑셀 파일로 다운로드할 때 비밀번호를 설정. 사용 조건: (1) 비밀번호는 BASE64로 인코딩후 전송해야 함. (2) websquare.xml에 을 설정해야 함. (3) POI 3.10으로 업그레이드 필요. + * @param {String} options.maxCellCount [default: 없음] 엑셀 다운로드를 제한할 셀 개수 ( ex) 1000 설정시 grid의 셀 개수가 1000개를 넘어가면 서버로 요청을 보내지 않는다. ) + * @param {String} options.maxRowCount [default: 없음] 엑셀 다운로드를 제한할 행 개수 ( ex) 1000 설정시 grid의 행 개수가 1000개를 넘어가면 서버로 요청을 보내지 않는다. ) + * @param {String} options.headerAutoFilter [default: false] Header에 filter를 적용할지 여부 + * @param {String} options.filterRowIndex [default: -1] filter를 적용할 header의 row Index + * @param {Object} options.printSet JSON형태로 저장된 Excel Print관련 설정 + * @param {String} options.printSet.fitToPage [default: false] 엑셀 프린터 출력시 쪽맞춤 사용 유무 + * @param {String} options.printSet.landScape [default: false] 엑셀 프린터 출력시 가로 방향 출력 유무 + * @param {String} options.printSet.fitWidth [default: 1] 엑셀 프린터 출력시 용지너비 + * @param {String} options.printSet.fitHeight [default: 1] 엑셀 프린터 출력시 용지높이 + * @param {String} options.printSet.scale [default: 100] 엑셀 프린터 출력시 확대/축소 배율, scale을 사용할 경우 fitToPage는 false로 설정 해야 한다. + * @param {String} options.printSet.pageSize [default: A4] 엑셀 프린터 출력시 인쇄 용지 크기 (예: "A3", "A4", "A5", "B4") 단, fitToPage: true 인 경우에만 유효. + * @param {Number} options.timeout [default: 없음] 요청 최대 대기시간. millisecond 단위. timeout까지 응답이 오지 않을 시 다운로드를 fail 처리한다. + * @param {Number} options.checkInterval [default: 1000] 응답 확인 간격. millisecond 단위. 지정된 주기마다 응답을 확인한다. + * @param {Function} options.onSuccessCallback [default: 없음] 요청 성공 시 불리는 callback 함수. + * @param {Function} options.onFailureCallback [default: 없음] 요청 실패 시 불리는 callback 함수. + * + * @param {Object[]} [infoArr] subTotalFontName 그리드에 대한 내용을 추가로 다른 셀에 표현하는 경우 사용하는 배열 + * @param {Number} infoArr.rowIndex 내용을 표시할 행번호 + * @param {Number} infoArr.colIndex 내용을 표시할 열번호 + * @param {Number} infoArr.rowSpan 병합할 행의 수 + * @param {Number} infoArr.colSpan 병합할 열의 수 + * @param {String} infoArr.text 표시할 내용 + * @param {String} infoArr.textAlign 표시할 내용의 정렬 방법 (left, center, right) + * @param {String} infoArr.fontSize font size 설정 ( ex) "20px" ) + * @param {String} infoArr.fontName font name 설정 + * @param {String} infoArr.color font color 설정 ( ex) "red" ) + * @param {String} infoArr.fontWeight font weight 설정 ( ex) "bold" ) + * @param {String} infoArr.drawBorder cell의 border 지정 ( ex) true ) + * @param {String} infoArr.borderColor cell의 border color를 지정 ( ex) "#FF0000", "red" ) + * @param {String} infoArr.borderWidth cell의 border width 지정 ( "thin", "medium", "thick" ) + * @param {String} infoArr.wordWrap cell의 줄 바꿈 기능 ( ex) "true" ) + * @param {String} infoArr.bgColor cell의 배경 color 설정 ( ex) "red" ) + * + * @memberOf com + * @return {file} Excel file + * @author 박상규 + * @example + * var gridId = "grd_AdvancedExcel"; + * var infoArr = {}; + * var options = { + * fileName : "downLoadExcel.xlsx" //[default : excel.xlsx] options.fileName 값이 없을 경우 default값 세팅 + * }; + * com.gridDataDownLoadExcel(grdObj, options, infoArr ); + */ +com.gridDataDownLoadExcel = function (grdObj, options, infoArr) { + + if (typeof options === "undefined") { + options = { + hiddenVisible: false, + fileName: "excel.xlsx" + } + } + + if (typeof infoArr === "undefined") { + infoArr = {}; + } + + // excel 다운로드시 기본 설정으로 화면내의 hidden컬럼을 removeColumns에 포함시킨다. + // 이를 원치 않을 경우 options.hiddenVisible = 'true' 로 설정한다. + if (!options.hiddenVisible) { + var grdCnt = grdObj.getTotalCol(); + + var hiddenColIndex = []; + for (var idx = 0; idx < grdCnt; idx++) { + if (!grdObj.getColumnVisible(idx)) { + hiddenColIndex.push(idx); + } + } + // hidden 컬럼이 있는 경우만 추가할 수 있도록 (2016.10.28 추가) + if (hiddenColIndex.length > 0) { + if (options.removeColumns.length > 0) { + options.removeColumns = options.removeColumns + "," + hiddenColIndex.join(','); + } else { + options.removeColumns = hiddenColIndex.join(','); + } + + // 중복 요소 제거 + var _removeColumnArr = options.removeColumns.split(","); + options.removeColumns = _removeColumnArr.reduce(function (a, b) { + if (a.indexOf(b) < 0) { + a.push(b); + } + return a; + }, []).join(','); + } + } + + var options = { + fileName: options.fileName || "excel.xlsx", //String, [defalut: excel.xlsx] 다운로드하려는 파일의 이름으로 필수 입력 값이다. + sheetName: options.sheetName || "sheet", //String, [defalut: sheet] excel의 sheet의 이름 + type: options.type || "0", //String, [defalut: 0] type이 0인 경우 실제 데이터 1인 경우 눈에 보이는 데이터를 2이면 들어가 있는 data 그대로(filter무시 expression 타입의 셀은 나오지 않음) + removeColumns: options.removeColumns || "", //String, [defalut: 없음] 다운로드시 excel에서 삭제하려는 열의 번호(여러 개일 경우 ,로 구분) + removeHeaderRows: options.removeHeaderRows || "", //String, [defalut: 없음] 다운로드시 excel에서 삭제하려는 Header의 row index(여러 개일 경우 ,로 구분) + foldColumns: options.foldColumns || "", //String, [defalut: 없음] 다운로드시 excel에서 fold하려는 열의 번호(여러 개일 경우 ,로 구분) + startRowIndex: options.startRowIndex || 0, //Number, excel파일에서 그리드의 데이터가 시작되는 행의 번호(헤더 포함) + startColumnIndex: options.startColumnIndex || 0, //Number, excel파일에서 그리드의 데이터가 시작되는 열의 번호(헤더 포함) + headerColor: options.headerColor || "#33CCCC", //String, excel파일에서 그리드의 header부분의 색 + headerFontName: options.headerFontName || "", //String, [defalut: 없음] excel파일에서 그리드의 header부분의 font name + headerFontSize: options.headerFontSize || "10", //String, excel파일에서 그리드의 header부분의 font size + headerFontColor: options.headerFontColor || "", //String, excel파일에서 그리드의 header부분의 font색 + bodyColor: options.bodyColor || "#FFFFFF", //String, excel파일에서 그리드의 body부분의 색 + bodyFontName: options.bodyFontName || "", //String, [defalut: 없음] excel파일에서 그리드의 body부분의 font name + bodyFontSize: options.bodyFontSize || "10", //String, excel파일에서 그리드의 body부분의 font size + bodyFontColor: options.bodyFontColor || "", //String, excel파일에서 그리드의 body부분의 font색 + subTotalColor: options.subTotalColor || "#CCFFCC", //String, [defalut: #CCFFCC] excel파일에서 그리드의 subtotal부분의 색 + subTotalFontName: options.subTotalFontName || "", //String, [defalut: 없음] excel파일에서 그리드의 subtotal부분의 font name + subTotalFontSize: options.subTotalFontSize || "10", //String, [defalut: 10] excel파일에서 그리드의 subtotal부분의 font size + subTotalFontColor: options.subTotalFontColor || "", //String, [defalut: 없음] excel파일에서 그리드의 subtotal부분의 font색 + footerColor: options.footerColor || "#008000", //String, [defalut: #008000] excel파일에서 그리드의 footer부분의 색 + footerFontName: options.footerFontName || "", //String, [defalut: 없음] excel파일에서 그리드의 footer부분의 font name + footerFontSize: options.footerFontSize || "10", //String, [defalut: 10] excel파일에서 그리드의 footer부분의 font size + footerFontColor: options.footerFontColor || "", //String, [defalut: 없음] excel파일에서 그리드의 footer부분의 font색 + oddRowBackgroundColor: options.oddRowBackgroundColor || "", //String, excel파일에서 그리드 body의 홀수줄의 배경색 + evenRowBackgroundColor: options.evenRowBackgroundColor || "", //String, [defalut: 없음] excel파일에서 그리드 body의 짝수줄의 배경색 + rowNumHeaderColor: options.rowNumHeaderColor || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 header 영역의 배경색 + rowNumHeaderFontName: options.rowNumHeaderFontName || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 header 영역의 폰트이름 + rowNumHeaderFontSize: options.rowNumHeaderFontSize || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 header 영역의 폰트크기 + rowNumHeaderFontColor: options.rowNumHeaderFontColor || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 header 영역의 폰트색상 + rowNumBodyColor: options.rowNumBodyColor || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 Body 영역의 배경색 + rowNumBodyFontName: options.rowNumBodyFontName || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 Body 영역의 폰트이름 + rowNumBodyFontSize: options.rowNumBodyFontSize || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 Body 영역의 폰트크기 + rowNumBodyFontColor: options.rowNumBodyFontColor || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 Body 영역의 폰트색상 + rowNumFooterColor: options.rowNumFooterColor || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 Footer 영역의 배경색 + rowNumFooterFontName: options.rowNumFooterFontName || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 Footer 영역의 폰트이름 + rowNumFooterFontSize: options.rowNumFooterFontSize || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 Footer 영역의 폰트크기 + rowNumFooterFontColor: options.rowNumFooterFontColor || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 Footer 영역의 폰트색상 + rowNumSubTotalColor: options.rowNumSubTotalColor || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 Subtotal 영역의 배경색 + rowNumSubTotalFontName: options.rowNumSubTotalFontName || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 Subtotal 영역의 폰트이름 + rowNumSubTotalFontSize: options.rowNumSubTotalFontSize || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 Subtotal 영역의 폰트크기 + rowNumSubTotalFontColor: options.rowNumSubTotalFontColor || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 Subtotal 영역의 폰트색상 + rowNumHeaderValue: options.rowNumHeaderValue || "", //String, [defalut: 없음] rowNumVisible 속성이 true인 경우 순서출력 Header 영역의 출력값 + rowNumVisible: options.rowNumVisible || "false", //String, [defalut: false] 순서출력 유무 + showProcess: WebSquare.util.getBoolean(options.showProcess) || true, //Boolean, [defalut: true] 다운로드 시 프로세스 창을 보여줄지 여부 + massStorage: WebSquare.util.getBoolean(options.massStorage) || true, //Boolean, [defalut: true] 대용량 다운로드 여부 (default는 true 이 옵션을 true로 하고 showConfirm을 false로 한 경우에 IE에서 신뢰할만한 사이트를 체크하는 옵션이 뜬다.) + showConfirm: WebSquare.util.getBoolean(options.showConfirm) || false, //Boolean, [defalut: false] 다운로드 확인창을 띄울지 여부(옵션을 킨 경우 advancedExcelDownload를 호출후 사용자가 window의 버튼을 한번더 클릭해야 한다. massStorage는 자동으로 true가 된다) + dataProvider: options.dataProvider || "", //String, [defalut: 없음] 대량데이터 처리 및 사용자 데이터를 가공할 수 있는 Provider Package + providerRequestXml: options.providerRequestXml || "", //String, [defalut: 없음] Provider 내부에서 사용할 XML 문자열 + userDataXml: options.userDataXml || "", //String, [defalut: 없음] 사용자가 서버모듈 개발 시 필요한 데이터를 전송 할 수 있는 변수 + bodyWordwrap: WebSquare.util.getBoolean(options.bodyWordwrap) || false, //Boolean, [defalut: false] 다운로드시 바디의 줄 바꿈 기능 + useEuroLocale: options.useEuroLocale || "false", //String, [defalut: false] 다운로드시 유로화 처리 기능(,와 .이 반대인 경우처리) + useHeader: options.useHeader || "true", //String, [defalut: true] 다운로드시 Header를 출력 할지 여부( "true"인경우 출력, "false"인경우 미출력) + useSubTotal: options.useSubTotal || "false", //String, [defalut: false] 다운로드시 SubTotal을 출력 할지 여부( "true"인경우 출력, "false"인경우 미출력), expression을 지정한 경우 avg,sum,min,max,targetColValue,숫자를 지원 함. + useFooter: options.useFooter || "true", //String, [defalut: true] 다운로드시 Footer를 출력 할지 여부( "true"인경우 출력, "false"인경우 미출력) + separator: options.separator || ",", //String, [defalut: ,] 다운로드시 서버로 데이터 전송할때, 데이터를 구분짓는 구분자, default는 comma(,) + subTotalScale: options.subTotalScale || -1, //Number, [defalut: -1] 다운로드시 subTotal 평균계산시 소수점 자리수를 지정 + subTotalRoundingMode: options.subTotalRoundingMode || "", //String, [defalut: 없음] 다운로드시 subTotal 평균계산시 Round를 지정 한다. ("CEILING","FLOOR","HALF_UP") + useStyle: options.useStyle || "", //String, [defalut: false] 다운로드시 css를 제외한, style을 excel에도 적용할 지 여부 (배경색,폰트) + freezePane: options.freezePane || "", //String, [defalut: ""] 틀고정을 위한 좌표값 및 좌표값의 오픈셋 ( ex) freezePane="3,4" X축 3, Y축 4에서 틀고정, freezePane="0,1,0,5" X축 0, Y축 1에서 X축으로 0, Y축으로 5로 틀공정 ) + autoSizeColumn: options.autoSizeColumn || "true", //String, [defalut: false] 너비자동맞춤 설정 유무 - 2016.08.18 옵션 설정을 true로 변경 + displayGridlines: options.displayGridlines || "", //String, [defalut: false] 엑셀 전체 셀의 눈금선 제거 유무 + colMerge: options.colMerge || "", //String, [defalut: false] colMerge된 컬럼을 Merge해서 출력 할 지 여부 + useDataFormat: options.useDataFormat || "", //String, [defalut: 없음] 그리드 dataType이 text인 경우, 엑셀의 표시형식 '텍스트' 출력 유무( "true"인 경우 표시형식 텍스트, "false"인 경우 표시형식 일반 출력) + indent: options.indent || "", //String, [defalut: 없음] 그리드 dataType이 drilldown인 경우, indent 표시를 위한 공백 삽입 개수, default값은 0 + columnMove: options.columnMove || "", //String, [defalut: false] 그리드 컬럼이동시 이동된 상태로 다운로드 유무 ( "true"인경우 컬럼이동 순서대로 출력 ) + columnOrder: options.columnOrder || "", //String, [defalut: 없음] 엑셀 다운로드시 다운로드되는 컬럼 순서를 지정 할 수 있는 속성 ( ex) "0,3,2,1"로 지정시 지정한 순서로 다운로드된다 ) + fitToPage: options.fitToPage || "false", //String, [defalut: false] 엑셀 프린터 출력시 쪽맞춤 사용 유무 + landScape: options.landScape || "false", //String, [defalut: false] 엑셀 프린터 출력시 가로 방향 출력 유무 + fitWidth: options.fitWidth || "1", //String, [defalut: 1] 엑셀 프린터 출력시 용지너비 + fitHeight: options.fitHeight || "1", //String, [defalut: 1] 엑셀 프린터 출력시 용지높이 + scale: options.scale || "100", //String, [defalut: 100] 엑셀 프린터 출력시 확대/축소 배율, scale을 사용할 경우 fitToPage는 false로 설정 해야 한다. + pageSize: options.pageSize || "A4" //String, [defalut: A4] 엑셀 프린터 출력시 인쇄용지 설정 ( ex) "A3", "A4", "A5", "B4" ) + }; + + var infoArr = { + rowIndex: infoArr.rowIndex || 0, //Number, 내용을 표시할 행번호 + colIndex: infoArr.colIndex || 0, //Number, 내용을 표시할 열번호 + rowSpan: infoArr.rowSpan || 0, //Number, 병합할 행의 수 + colSpan: infoArr.colSpan || 0, //Number, 병합할 열의 수 + text: infoArr.text || "", //String, 표시할 내용 + textAlign: infoArr.textAlign || "right", //String, 표시할 내용의 정렬 방법 left, center, right + fontSize: infoArr.fontSize || "10px", //String, font size 설정 20px, 10px, 5px + fontName: infoArr.fontName || "", //String, font name 설정 + color: infoArr.color || "", //String, font color 설정 red, blue, green + fontWeight: infoArr.fontWeight || "", //String, font weight 설정 bold + drawBorder: infoArr.drawBorder || "true", //String, cell의 border지정 true, false + wordWrap: infoArr.wordWrap || "", //String, cell의 줄 바꿈 기능 true, false + bgColor: infoArr.bgColor || "" //String, cell의 배경 color 설정 red, blue, green + }; + + grdObj.advancedExcelDownload(options, infoArr); +}; + +/** + * 설정된 옵션으로 CSV파일을 다운로드 한다. + * + * @date 2019.04.05 + * @param {Object} grdObj GridView Object + * @param {Object[]} options JSON형태로 저장된 그리드의 엑셀 다운로드 옵션 + * @param {String} options.fileName [default: csvfile.csv] 엑셀파일 선택 대화상자가 나타날 때 기본으로 지정 될 파일 이름 + * @param {String} options.type [default: 1, 0] Grid 저장 형태 (0이면 데이터 형태,1이면 표시 방식) + * @param {String} options.delim [default: ';'] CSV 파일에서 데이터를 구분할 구분자 + * @param {String} options.removeColumns [default: 없음] 저장 하지 않을 columns index, 여러컬럼인 경우 콤마(,)로 구분해서 정의 한다. + * @param {String} options.header [default: 1, 0] Grid의 숨겨진 Column에 대한 저장 여부(0이면 저장 하지 않음,1이면 저장) + * @param {Number} options.hidden [default: 0, 1] Grid의 숨겨진 Column에 대한 저장 여부(0이면 저장 하지 않음,1이면 저장) + * @param {String} options.checkButton [default: 1, 0] Grid의 Control(Check, Radio, Button) Column에 대해 히든 여부 (0이면 control Coliumn히든,1이면 보여줌) + * @param {Array} options.saveList [default: 없음] hidden에 관계없이 최우선순위로 저장할 column id들의 array + * @param {String} options.columnMove [default: false] 그리드 컬럼이동시 이동된 상태로 다운로드 유무 ( "true"인경우 컬럼이동 순서대로 출력 ) + * @param {String} options.columnOrder [default: 없음] csv 다운로드시 다운로드되는 컬럼 순서를 지정 할 수 있는 속성 ( ex) "0,3,2,1"로 지정시 지정한 순서로 다운로드된다 ) + * @param {String} options.spanAll [default: false] drilldown gridView인 경우 전체목록을 펼쳐서 다운로드 할 수 있는 속성. (true이면 전체출력, false면 보여지는 목록만 출력) + * @param {String} options.aposPrefixOnNum [default: 0, 1] dataType이 number이고 length가 12자리이상인 경우 '(apos)를 붙일지 여부 (0 이면 apos를 붙이지않음, 1이면 붙임) + * @param {String} options.ignoreSpan [default: 0, 1] span되어 있는 경우 span을 무시하고 데이터를 채울지 여부 (0이면 저장하지 않음, 1이면 저장) + * @param {String} options.removeQuotation [default: 0, 1] value에 ", ' 가 들어있는 경우 ", '를 지울지 여부 (0이면 지원지 않음, 1이면 지움) + * @param {String} options.removeNewLine [default: 1, 0] value내에 \r\n이 있을 경우 삭제유무 (0이면 지원지 않음, 1이면 지움) + * @param {String} options.optionParam [default: 없음] DRM 연계시 사용자 정의 class에 HashMap 인자로 전달할 값. key는 "optionParam"으로 참조한다. + * @memberOf com + * @return {file} CSV file + * @author 박상규 + * @example + * var gridId = "grd_AdvancedExcel"; + * var options = { +* fileName : "downLoadCSV.csv" //[default : excel.csv] options.fileName 값이 없을 경우 default값 세팅 +* }; + * com.gridDataDownLoadCSV(grdObj, options); + * //return 예시) 엑셀 파일 다운로드 + */ +com.gridDataDownLoadCSV = function (grdObj, options) { + var options = { + fileName: options.fileName || "excel.csv", //[default: excel.csv] 저장 될 파일 이름 + type: options.type || "1", //[default: 1] Grid 저장 형태 (0이면 데이터 형태,1이면 표시 방식) + delim: options.delim || ",", //[default: ,] CSV 파일에서 데이터를 구분할 구분자 + removeColumns: options.removeColumns || "", //[default: 없음] 저장 하지 않을 columns index, 여러컬럼인 경우 콤마(,)로 구분해서 정의 한다. + header: options.header || "1", //[default: 1] Grid의 숨겨진 Column에 대한 저장 여부(0이면 저장 하지 않음,1이면 저장) + hidden: options.hidden || 0, //[defalut: 0] Grid의 숨겨진 Column에 대한 저장 여부(0이면 저장 하지 않음,1이면 저장) + checkButton: options.checkButton || "1", //[default: 1] Grid의 Control(Check, Radio, Button) Column에 대해 히든 여부 (0이면 control Column히든,1이면 보여줌) + saveList: options.saveList || "" //[default: 없음] hidden에 관계없이 저장할 column id들의 array + }; + grdObj.saveCSV(options); +}; + +/** + * 엑셀 업로드 옵션을 설정하고 확장자 별로 다른 함수(uploadCSV || uploadExcel)를 호출한다. + * + * @date 2017.11.30 + * @param {Object} grdObj 그리드뷰 아이디 + * @param {Array} options JSON형태로 저장된 그리드의 엑셀 업로드 옵션 + * @param {String} type 타입(xls, xlsx, csv)을 구분 후, 적합한 API를 사용하여 업로드 한다. + * @memberOf com + * @author 박상규 + * @example + * var gridId = "grd_AdvancedExcel"; + * var type = "xlsx"; + * var options = { +* fileName : "gridDataUpload.xlsx" // default값이 존재하지 않으므로 꼭 fileName 값을 넣어야 한다. +* }; + * com.gridDataUpload(grdObj, type, options); + * //return 예시) com.js의 다른 함수(uploadCSV, uploadExcel)로 이동하거나 alert 발생 + */ +com.gridDataUpload = function (grdObj, type, options) { + type = type.toLowerCase(); + + if (type == "csv") { + com.gridDataUploadCSV(grdObj, options); + } else if (type == "xls" || type == "xlsx") { + com.gridDataUploadExcel(grdObj, options); + } else { + com.alert("지원하지 않는 파일 형식입니다."); + } +}; + +/** + * 엑셀 xls, xlsx 업로드 + * + * @date 2019.04.05 + * @param {Object} grdObj GridView Object + * @param {Object} options JSON형태로 저장된 그리드의 엑셀 업로드 옵션 + * + * @param {String} options.type [default: 0] 1이면 엑셀 파일이 그리드의 보이는 결과로 만들어져있을때 0이면 엑셀 파일이 그리드의 실제 데이터로 구성되어있을때 + * @param {Number} options.sheetNo [default: 0] excel파일에서 그리드의 데이터가 있는 sheet번호 + * @param {Number} options.startRowIndex [default: 0] excel파일에서 그리드의 데이터가 시작되는 행의 번호(헤더 포함) + * @param {Number} options.startColumnIndex [default: 0] excel파일에서 그리드의 데이터가 시작되는 열의 번호 + * @param {Number} options.endColumnIndex [default: 0] excel파일에서 그리드의 데이터가 끝나는 열의 index ( 엑셀컬럼수가 그리드컬럼수 보다 작은 경우 그리드 컬러수를 설정) + * @param {String} options.headerExist [default: 0] excel파일에서 그리드의 데이터에 header가 있는지 여부(1이면 header 존재 0이면 없음) + * @param {String} options.footerExist [default: 1] excel파일에서 그리드의 데이터에 footer가 있는지 여부(1이면 footer 존재 0이면 없음 기본값은 1 그리드에 footer가 없으면 적용되지 않음) + * @param {String} options.append [default: 0] excel파일에서 가져온 데이터를 그리드에 append시킬지 여부(1이면 현재 그리드에 데이터를 추가로 넣어줌 0이면 현재 그리드의 데이터를 삭제하고 넣음) + * @param {String} options.hidden [default: 0] 읽어들이려는 엑셀파일에 hidden column이 저장되어 있는지 여부를 설정하는 int형 숫자(0이면 엑셀파일에 hidden 데이터가 없으므로 그리드 hidden column에 빈 데이터를 삽입 1 : 엑셀파일에 hidden 데이터가 있으므로 엑셀 파일로부터 hidden 데이터를 삽입 ) + * @param {String} options.fillHidden [default: 0] Grid에 hiddenColumn에 빈 값을 넣을지를 결정하기 위한 int형 숫자(1이면 hidden Column에 빈 값을 저장하지 않음,0이면 hidden column이 저장되어있지 않은 Excel File이라 간주하고 hidden Column에 빈 값을 넣어줌)(hidden이 0인 경우에는 fillhidden은 영향을 끼치지 않음) + * @param {String} options.skipSpace [default: 0] 공백무시 여부(1이면 무시 0이면 포함) + * @param {Array} options.insertColumns radio, checkbox와 같은 컬럼을 엑셀에서 받아 오지 않고, 사용자 컬럼 설정 으로 업로드 ( 데이터 구조 : [ { columnIndex:1, columnValue:"1" } ] ) + * @param {String} options.removeColumns [default: 없음] 저장 하지 않을 column index, 여러컬럼인 경우 콤마(,)로 구분해서 정의 한다. + * @param {String} options.popupUrl 업로드시에 호출할 popup의 url + * @param {String} options.delim 업로드시 데이터를 구분하는 구분자 (default: , ) + * @param {String} options.status [default: R]업로드된 데이터의 초기 상태값, 설정하지 않으면 "R"로 설정되며 "C"값을 설정 할 수 있다. + * @param {String} options.pwd 엑셀파일에 암호가 걸려 있는 경우, 비밀번호 + * @param {String} options.optionParam [default: 없음] DRM 연계시 사용자 정의 class에 HashMap 인자로 전달할 값. key는 "optionParam"으로 참조한다. + * @param {String} options.cellDataConvertor [default: true] 컬럼값을 사용자가 수정할수 있는 연계 클래스의 전체 패키지명. (AbstractCellDataProvider class를 상속후 convertValue method를 구현해야 함. + * @param {String} options.decimal [default: 4] 셀의 데이터가 소수인 경우, 최종 소수점 자리수. (기본값: 4) (예: 3인경우 4자리에서 반올림해서 3자리를 최종 표시.) + * @param {String} options.useModalDisable [default: false] 업로드 팝업창이 활성화 될때 부모창의 컴포넌트 disabled 처리 유무. + * @param {String} options.useMaxByteLength [default: false] ignoreChar 속성으로 설정한 문자를 제외하고 maxByteLength 속성으로 설정한 길이만큼의 데이터만 업로드. + * @param {String} options.dateFormat [default: yyyy-MM-dd] 엑셀의 셀포맷이 날짜형식으로 되어 있는경우 format. 기본값은 "yyyy-MM-dd" + * @param {String} options.byteCheckEncoding [default: EUC-KR] useMaxByteLength 설정되어 있는경우 byte처리시 지정할 인코딩. EUC-KR인경우 2byte처리 UTF-8일경우 3byte처리한다. (default는 EUC-KR) + * @param {String} options.features upload화면이 뜰 때 string 형식의 스타일 정보. 지정되지 않은경우 upload창이 기본 스타일로 생성 + * @memberOf com + * @author 박상규 + * @example + * var options = { +* type : "0" +* ,sheetNo : 0 +* }; + * com.gridDataUploadExcel(grd_basicInfo, options); + */ +com.gridDataUploadExcel = function (grdObj, options) { + var options = { + type: options.type || "0", //String, 1이면 엑셀 파일이 그리드의 보이는 결과로 만들어져있을때 0이면 엑셀 파일이 그리드의 실제 데이터로 구성되어있을때 + sheetNo: options.sheetNo || 0, //Number, excel파일에서 그리드의 데이터가 있는 sheet번호 + startRowIndex: options.startRowIndex || 1, //Number, [defalut:0] excel파일에서 그리드의 데이터가 시작되는 행의 번호(헤더 포함) + startColumnIndex: options.startColumnIndex || 0, //Number, [defalut:0] excel파일에서 그리드의 데이터가 시작되는 열의 번호 + endColumnIndex: options.endColumnIndex || 0, //Number, [defalut: 0] excel파일에서 그리드의 데이터가 끝나는 열의 index + //( 엑셀컬럼수가 그리드컬럼수 보다 작은 경우 그리드 컬러수를 설정) + headerExist: options.headerExist || "0", //String, [defalut:0] excel파일에서 그리드의 데이터에 header가 있는지 여부 + //(1이면 header 존재 0이면 없음) + footerExist: options.footerExist || "1", //String, [defalut: 1] excel파일에서 그리드의 데이터에 footer가 있는지 여부 + //(1이면 footer 존재 0이면 없음 기본값은 1 그리드에 footer가 없으면 적용되지 않음) + append: options.append || "0", //String, [defalut: 0] excel파일에서 가져온 데이터를 그리드에 append시킬지 여부 + // (1이면 현재 그리드에 데이터를 추가로 넣어줌 0이면 현재 그리드의 데이터를 삭제하고 넣음) + hidden: options.hidden || "0", //String, [defalut: 0] 읽어들이려는 엑셀파일에 hidden column이 저장되어 있는지 여부를 설정하는 int형 숫자(0이면 + // 엑셀파일에 hidden 데이터가 없으므로 그리드 hidden column에 빈 데이터를 삽입 + // 1 : 엑셀파일에 hidden 데이터가 있으므로 엑셀 파일로부터 hidden 데이터를 삽입 ) + fillHidden: options.fillHidden || "0", //String, [defalut: 0] Grid에 hiddenColumn에 빈 값을 넣을지를 결정하기 + // 위한 int형 숫자(1이면 hidden Column에 빈 값을 저장하지 않음,0이면 hidden + // column이 저장되어있지 않은 Excel File이라 간주하고 hidden Column에 빈 + // 값을 넣어줌)(hidden이 0인 경우에는 fillhidden은 영향을 끼치지 않음) + skipSpace: options.skipSpace || "0", //String, [defalut: 0] 공백무시 여부(1이면 무시 0이면 포함) + insertColumns: options.insertColumns || "",//Array, radio, checkbox와 같은 컬럼을 엑셀에서 받아 오지 않고 + //사용자 컬럼 설정 으로 업로드 ( 데이터 구조 : [ { columnIndex:1, columnValue:"1" } ] ) + popupUrl: options.popupUrl || "", //String, 업로드시에 호출할 popup의 url + status: options.status || "R", //String, [defalut: R]업로드된 데이터의 초기 상태값, 설정하지 않으면 "R"로 설정되며 "C"값을 설정 할 수 있다. + pwd: options.pwd || "" //String, 엑셀파일에 암호가 걸려 있는 경우, 비밀번호 + }; + + grdObj.advancedExcelUpload(options); + +}; + +/** + * 엑셀 CSV 업로드 + * + * @date 2019.04.05 + * @param {String} options.type [default: 1, 0]데이터 형태 (0이면 실 데이터 형태,1이면 display 표시 방식) + * @param {String} options.header [default: 1, 0]Grid header 존재 유무 (0이면 header row수를 무시하고 전부 업로드하고 1이면 header row수 만큼 skip한다.) + * @param {String} options.delim [default: ',']CSV 파일에서 데이터를 구분할 구분자 + * @param {String} options.escapeChar CSV 데이터에서 제거해야 되는 문자셋 ( ex) '\'' ) + * @param {Number} options.startRowIndex [default: 0] csv파일에서 그리드의 데이터가 시작되는 행의 번호, startRowIndex가 설정되면, header 설정은 무시된다. + * @param {String} options.append [default: 0, 1]csv파일에서 가져온 데이터를 그리드에 append시킬지 여부(1이면 현재 그리드에 데이터를 추가로 넣어줌 0이면 현재 그리드의 데이터를 삭제하고 넣음) + * @param {Number} options.hidden [default: 0, 1]hidden Column에 대한 저장 여부(0이면 저장하지않음,1이면 저장) + * @param {String} options.fillHidden [default: 0, 1]hidden Column에 빈 값을 넣을지를 결정하기 위한 int형 숫자(1이면 hidden Column에 빈 값을 저장하지 않음,0이면 hidden column이 저장되어있지 않은 csv File이라 간주하고 hidden Column에 빈 값을 넣어줌)(hidden이 0인 경우에는 fillhidden은 영향을 끼치지 않음) + * @param {String} options.skipSpace [default: 0, 1]공백무시 여부(1이면 무시 0이면 포함) + * @param {String} options.expression [default: 1, 0]expression 컬럼 데이터를 포함하고 있는지 여부, 기본값은 미포함(1이면 미포함, 0이면 포함) + * @param {String} options.popupUrl 업로드시에 호출할 popup의 url + * @param {String} options.status [default: R]업로드된 데이터의 초기 상태값, 설정하지 않으면 "R"로 설정되며 "C"값을 설정 할 수 있다. + * @param {String} options.ignoreSpan [default: 0, 1] span되어 있는 경우 span을 무시하고 데이터를 읽을지 여부 (0이면 머지되어 있는 컬럼을 하나로 본다, 1이면 머지되어 있는 컬럼을 각각읽는다) + * @param {String} options.optionParam [default: 없음] DRM 연계시 사용자 정의 class에 HashMap 인자로 전달할 값. key는 "optionParam"으로 참조한다. + * @memberOf com + * @author 박상규 + * @example + * var gridId = "grd_AdvancedExcel"; + * var options = {}; + * com.gridDataUploadCSV( gridId, options); + * //return 예시) 엑셀 파일(.CSV) 업로드 + */ +com.gridDataUploadCSV = function (grdObj, options) { + var options = { + type: options.type || "0", //String, [default: 1, 0]데이터 형태 (0이면 실 데이터 형태,1이면 display 표시 방식) + header: options.header || "0", //String, [default: 1, 0]Grid header 존재 유무 (0이면 header row수를 무시하고 전부 업로드하고 1이면 header row수 만큼 skip한다.) + delim: options.delim || ",", //String, [default: ',']CSV 파일에서 데이터를 구분할 구분자 + escapeChar: options.escapeChar || "", //String, CSV 데이터에서 제거해야 되는 문자셋 ( ex) '\'' ) + startRowIndex: options.startRowIndex || 0, //Number, [defalut: 0] csv파일에서 그리드의 데이터가 시작되는 행의 번호, startRowIndex가 설정되면, header 설정은 무시된다. + append: options.append || "0", //String, [defalut: 0, 1]csv파일에서 가져온 데이터를 그리드에 append시킬지 여부(1이면 현재 그리드에 데이터를 추가로 넣어줌 0이면 현재 그리드의 데이터를 삭제하고 넣음) + hidden: options.hidden || 1, //Number, [defalut: 0, 1]hidden Column에 대한 저장 여부(0이면 저장하지않음,1이면 저장) + fillHidden: options.fillHidden || "0", //String, [defalut: 0, 1]hidden Column에 빈 값을 넣을지를 결정하기 위한 int형 숫자(1이면 hidden Column에 빈 값을 저장하지 않음,0이면 hidden column이 저장되어있지 않은 csv File이라 간주하고 hidden Column에 빈 값을 넣어줌)(hidden이 0인 경우에는 fillhidden은 영향을 끼치지 않음) + skipSpace: options.skipSpace || "0", //String, [defalut: 0, 1]공백무시 여부(1이면 무시 0이면 포함) + expression: options.expression || "1", //String, [defalut: 1, 0]expression 컬럼 데이터를 포함하고 있는지 여부, 기본값은 미포함(1이면 미포함, 0이면 포함) + popupUrl: options.popupUrl || "" //String, 업로드시에 호출할 popup의 url + }; + grdObj.readCSV(options); +}; + +/** + * 해당 그룹 안의 컴포넌트에서 엔터키가 발생하면 해당 컴포넌트의 값을 DataColletion에 저장하고 objFunc 함수를 실행한다. + * + * @date 2018.02.15 + * @param {Object} grpObj 그룹 객체 + * @param {Object} objFunc 함수 객체 + * @param {Number} rowIndex DataList가 바인딩된 gridView인 경우 ==> 현재 포커스된 focusedRowIndex [ex. gridViewId.getFocusedRowIndex()] + *
아닌 경우 ==> rowIndex는 생략 + * @memberOf com + * @author 박상규 + * @example + * com.setEnterKeyEvent(grp_AuthorityDetail, scwin.search); + * // return 예시) "엔터키가 발생 -> 해당 함수 실행 및 DataColletion에 UI 컴포넌트에 입력된 데이터를 DataCollection에 저장" + */ +com.setEnterKeyEvent = function (grpObj, objFunc) { + var objArr = WebSquare.util.getChildren(grpObj, { + excludePlugin: "group trigger textbox output calendar image span", + recursive: true + }); + + try { + for (var i = 0; i < objArr.length; i++) { + try { + if (typeof objFunc === "function") { + objArr[i].bind("onkeyup", function (e) { + if (e.keyCode === 13) { + if (typeof this.getRef === "function") { + var ref = this.getRef(); + var refArray = ref.substring(5).split("."); + if ((typeof refArray !== "undefined") && (refArray.length === 2)) { + var dataCollectionName = refArray[0]; + var columnId = refArray[1]; + var dataCollection = this.getScopeWindow().$p.getComponentById(dataCollectionName); + var dataType = dataCollection.getObjectType().toLowerCase(); + if (dataType === "datamap") { + dataCollection.set(columnId, this.getValue()); + } else if ((dataType === 'datalist') && (typeof rowIndex !== "undefined")) { + dataCollection.setCellData(dataCollection.getRowPosition(), columnId, this.getValue()); + } + } + objFunc(); + } + } + }); + } + } catch (e) { + $p.log("[com.setEnterKeyEvent] Exception :: " + e.message); + } finally { + dataCollection = null; + } + } + } catch (e) { + $p.log("[com.setEnterKeyEvent] Exception :: " + e.message); + } finally { + objArr = null; + } +}; + + +/** + * Alert 메시지 창을 호출한다. + * + * @date 2017.12.30 + * @memberOf com + * @param {String} messageStr 메시지 + * @param {String} closeCallbackFncName 콜백 함수명 + * @author Inswave Systems + * @example + * com.alert("우편번호를 선택하시기 바랍니다."); + * com.alert("우편번호를 선택하시기 바랍니다.", "scwin.alertCallBack"); + */ +com.alert = function (messageStr, closeCallbackFncName) { + console.log(closeCallbackFncName); + com.messagBox("alert", messageStr, closeCallbackFncName); +}; + + +/** + * 메세지 팝업을 호출한다. + * + * @date 2017.12.30 + * @param {String} messageType 팝업창 타입 (alert || confirm) + * @param {String} messageStr 메시지 + * @param {String} closeCallbackFncName 콜백 함수명 + * @param {Boolean} isReturnValue Confirm 창인 경우 선택 결과(boolean)을 반환할지 여부 + * @param {String} title 팝업창 타이틀 + * @memberOf com + * @author Inswave Systems + * @example + * //alert창을 띄울 경우 + * scwin.callback = function(){ +* console.log("콜백 함수입니다."); +* }; + * com.messagBox("alert", "보낼 메시지", "callback", false, "팝업 타이틀"); + * + * //confirm창을 띄울 경우 + * scwin.callback = function(){ +* console.log("콜백 함수입니다."); +* }; + * com.messagBox("confirm", "보낼 메시지", "callback", true, "팝업 타이틀"); //isReturnValue속성에 false 사용가능 + */ +com.messagBox = function (messageType, messageStr, closeCallbackFncName, isReturnValue, title) { + var messageStr = messageStr || ""; + var messageType = messageType || "alert"; + var defaultTitle = null; + var popId = messageType || "Tmp"; + + popId = popId + com.MESSAGE_BOX_SEQ++; + + if (messageType === "alert") { + defaultTitle = "알림"; + } else { + defaultTitle = "확인"; + } + + if (typeof isReturnValue === "undefined") { + isReturnValue = false; + } + + //closeCallBackFnc 정보관리 + if (typeof closeCallbackFncName == "function") { + var cbFuncIdx = ++gcm.CB_FUNCTION_MANAGER["cbFuncIdx"]; + var idx = "__close_callback_Func__" + new Date().getTime() + "_" + cbFuncIdx; + gcm.CB_FUNCTION_MANAGER["cbFuncSave"][$p.id + idx] = closeCallbackFncName; + closeCallbackFncName = idx; + } + + + var data = { + "message": messageStr, + "callbackFn": closeCallbackFncName, + "isReturnValue": isReturnValue, + "messageType": messageType, + "id": popId + }; + + var popupHeight = 0; + if (com.isMobile()) { + popupHeight = 264; + } else { + popupHeight = 320; + } + + var options = { + id: popId, + popupName: defaultTitle, + title: title || defaultTitle, + width: 440, + height: popupHeight + }; + com.openPopup("/cm/common/messageBox.xml", options, data); +}; + +/** + * Confirm 메시지 창을 호출한다. + * + * @date 2016.10.09 + * @memberOf com + * @param {String} messageStr 메시지 + * @param {String} closeCallbackFncName 콜백 함수명 + * @author Inswave Systems + * @example + * com.confirm("변경된 코드 그룹 정보를 저장하시겠습니까?", "scwin.saveCodeGrpConfirmCallback"); + * com.confirm("하위에 새로운 조직을 추가하시겠습니까?", "scwin.insertConfirmCallBack"); + */ +com.confirm = function (messageStr, closeCallbackFncName) { + com.messagBox("confirm", messageStr, closeCallbackFncName); +}; + +/** + * 팝업창을 닫는다. + * callbackStr을 이용하여 부모창의 callback함수를 호출한다. + * + * @date 2019.05.29 + * @memberOf com + * @param {String} popId popup창 id로 값이 없을 경우 현재창의 아이디(this.popupID) close. + * @param {String} [callbackStr] callbackFunction명으로 부모 객체는 opener || parent으로 참조한다. opener || parent가 없을 경우 window 참조. + * @param {String} [returnValue] callbackFunction에 넘겨줄 파라메터로 String타입을 권장한다. + * @author 박상규 + * @example + * com.closePopup(); + * com.closePopup("scwin.zipPopupCallback" , '{message:"정상처리되었습니다"}'); + * com.closePopup("scwin.zipPopupCallback" , '정상처리되었습니다.'); + */ +com.closePopup = function (callbackFnStr, retObj, callbackYn, selectedIdx) { + com._closePopup($p.getPopupId(), callbackFnStr, com.strSerialize(retObj), window); + // IFrame일 경우, 메모리릭을 없애기 위한 코딩. (부모/자식 간 페이지로 객체 파라미터 전달 방식은 비권장. 문자열 전달 권장.) +}; + +com._closePopup = function (popId, callbackFnStr, retStr, winObj) { + if ((typeof callbackFnStr !== "undefined") && (callbackFnStr !== "")) { + var func; + if (callbackFnStr.indexOf("__close_callback_Func__") > -1) { + func = gcm.CB_FUNCTION_MANAGER["cbFuncSave"][callbackFnStr]; + delete gcm.CB_FUNCTION_MANAGER["cbFuncSave"][callbackFnStr]; + } else { + func = winObj.WebSquare.util.getGlobalFunction(callbackFnStr); + } + + if (func) { + $p.closePopup(popId); + func(com.getJSON(retStr)); + } else { + var parentObj = opener || parent; + if (winObj.$p.getParameter("w2xPath") !== parentObj.$p.getParameter("w2xPath")) { + com._closePopup(popId, callbackFnStr, retStr, parentObj); + return; + } + $p.closePopup(popId); + } + } else { + $p.closePopup(popId); + } +}; + +/** + * 현재 오픈된 전체 팝업창을 닫는다. + * callbackStr을 이용하여 부모창의 callback함수를 호출한다. + * + * @date 2019.05.29 + * @memberOf com + * @author 박상규 + * @example + * com.closeAllPopup(); + */ +com.closeAllPopup = function() { + // WebSquare.uiplugin.popup.popupList 속성은 엔진 내 비공개 속성으로 공통에서만 제한적으로 사용함(업무 화면 소스 사용 금지) + var popupList = WebSquare.uiplugin.popup.popupList; + for (var idx = 0; idx < popupList.length; idx++) { + $p.closePopup(WebSquare.uiplugin.popup.popupList[idx].id); + } +}; + +/** + * + * 팝업창을 연다. + * + * @date 2016.10.09 + * @param {String} url url 화면경로 + * @param {Array} options Popup창 옵션 + * @param {String} [options.id] Popup창 아이디 + * @param {String} [options.type] 화면 오픈 타입 ("iframePopup", "wframePopup", "browserPopup") + * @param {String} [options.width] Popup창 넓이 + * @param {String} [options.height] Popup창 높이 + * @param {String} [options.popupName] useIframe : true시 popup 객체의 이름으로 popup 프레임의 표시줄에 나타납니다. + * @param {String} [options.useIFrame] [default : false] true : IFrame 을 사용하는 WebSquare popup / false: window.open 을 사용하는 popup + * @param {String} [options.style] Popup의 스타일을 지정합니다. 값이 있으면 left top width height는 적용되지 않습니다. + * @param {String} [options.resizable] [default : false] + * @param {String} [options.modal] [default : false] + * @param {String} [options.scrollbars] [default : false] + * @param {String} [options.title] [default : false] + * @param {String} [options.notMinSize] [default : false] + * @memberOf com + * @author Inswave Systems + * @example + * var data = { data : dma_authority.getJSON(), callbackFn : "scwin.insertMember" }; + * var options = { id : "AuthorityMemberPop", +* popupName : "직원 조회", +* modal : true, +* width : 560, height: 400 }; + * com.openPopup("/ui/BM/BM002P01.xml", options, data); + */ +com.openPopup = function (url, opt, data) { + com._openPopup(url, opt, data); +}; + +com._openPopup = function(url, opt, data) { + + var _dataObj = { + type : "json", + data : data, + name : "param" + }; + + var width = opt.width || 500; + var height = opt.height || 500; + try { + var deviceWidth = parseFloat($("body").css("width")); + var deviceHeight = parseFloat($("body").css("height")); + if (!opt.notMinSize) { + if (deviceWidth > 0 && width > deviceWidth) { + width = deviceWidth - 4; // 팝업 border 고려 + } + + if (deviceHeight > 0 && height > deviceHeight) { + height = deviceHeight - 4; // 팝업 border 고려 + } + } + } catch (e) { + } + + var top = ((document.body.offsetHeight / 2) - (parseInt(height) / 2) + $(document).scrollTop()) + "px"; + var left = ((document.body.offsetWidth / 2) - (parseInt(width) / 2) + $(document).scrollLeft()) + "px"; + + if (typeof _dataObj.data !== "undefined") { + if (typeof _dataObj.data.callbackFn === "undefined") { + _dataObj.data.callbackFn = ""; + } else if (_dataObj.data.callbackFn.indexOf("gcm") !== 0) { + _dataObj.data.callbackFn = $p.id + _dataObj.data.callbackFn; + } + } + + var options = { + id : opt.id, + popupName : opt.popupName || "", + type : opt.type || "wframePopup", + width : width + "px", + height : height + "px", + top : opt.top || top || "140px", + left : opt.left || left || "500px", + modal : (opt.modal == false) ? false : true, + dataObject : _dataObj, + alwaysOnTop : opt.alwaysOnTop || false, + useModalStack : (opt.useModalStack == false) ? false : true, + resizable : (opt.resizable == false) ? false : true, + useMaximize : opt.useMaximize || false + }; + + $p.openPopup(gcm.CONTEXT_PATH + url, options); +}; + +/** + * 그룹안에 포함된 컴포넌트의 입력 값에 대한 유효성을 검사한다. + * 컴포넌트 속성 유효성 검사를 수행하고, valInfoArr 유효성 검사 옵션에 대해서 유효성 검사를 수행한다. + * valInfoArr 유효성 검사 옵션 파라미터를 전달하지 않은 경우 컴포넌트 속성(mandatory, allowChar, ignoreChar, maxLength, maxByteLength, minLength, minByteLength)에 대해서만 유효성 검사를 수행한다. + * + * @date 2018.01.19 + * @memberOf com + * @param {Object} grpObj 그룹 컴포넌트 객체 + * @param {Object[]} options 유효성 검사 옵션
+ * @param {String} options[].id : 유효성 검사 대상 DataCollection 컬럼 아이디
+ * @param {Boolean} options[].mandatory : 필수 입력 값 여부
+ * @param {Number} options[].minLength : 최소 입력 자리수
+ * @param {Number} options[].minByteLength : 최소 입력 자리수 (Byte 단위)
+ * @param {requestCallback} options[].valFunc : 사용자 유효성 검사 함수
+ * @param {String} tacId 그룹이 포함된 TabControl 컴포넌트 아이디 + * @param {String} tabId 그룹이 포함된 TabControl 컴포넌트의 Tab 아이디 + * @returns {Boolean} 유효성 검사 결과 + * @since 2015.08.05 + * @example + * + * if (com.validateGroup(grp_LoginInfo)) { + * if (confirm("변경된 데이터를 저장하시겠습니까?")) { + * com.executeSubmission("WS0201U04"); + * } + * } + * + * var valInfo = [ { id : "grpCd", mandatory : true, minLength : 5 }, + * { id : "grpNm", mandatory : true } ]; + * + * if (com.validateGroup(grp_LoginInfo, valInfo)) { + * if (confirm("변경된 데이터를 저장하시겠습니까?")) { + * com.executeSubmission("WS0201U04"); + * } + * } + * + * var valInfo = [ { id : "totWeight", mandatory : true }, + * { id : "totWeightPwr", mandatory : true }, + * { id : "totWeightPwr", mandatory : true }, + * { id : "ibxWeight1", mandatory : true, + * valFunc : function(value) { + * if (numLib.parseInt(ibxTotWeight.getValue()) < numLib.parseInt(ibxWeight1.getValue())) { + * return "총 중량이 세부 중량보다 커야 합니다."; + * } + * } }, + * { id : "winding", mandatory : true } ]; + * + * if (com.validateGroup(grpCsInfo, valInfo, tacCsInfo, "tabCsInfo1") == false) { + * return false; + * } + * + * var valInfo = [ { id : "prntMenuCd", mandatory : true }, + * { id : "menuCd", mandatory : true, + * valFunc : function(value) { + * if (dmaMenu.get("prntMenuCd") == dmaMenu.get("menuCd")) { + * return "상위 메뉴 코드와 메뉴 코드가 같아서는 안됩니다."; + * } + * } }, + * { id : "menuNm", mandatory : true }, + * { id : "menuLevel", mandatory : true }, + * { id : "menuSeq", mandatory : true }, + * { id : "urlPath", mandatory : true }, + * { id : "isUse", mandatory : true } ]; + * + * if (com.validateGroup(tblMenuInfo, valInfo, tacMenuInfo, "tabMenuInfo1") == false) { + * return false; + * } + * + * @description + * ※ 필수 입력, 입력 허용 문자, 입력 허용 불가 문자, 최대, 최소 입력 문자수 설정은 컴포넌트의 속성에서 설정한다.
+ * - mandatory : 필수 입력 항목 여부
+ * - allowChar : 입력 허용 문자
+ * - ignoreChar : 입력 허용 불가 문자
+ * - maxLength : 최대 입력 문자수
+ * - maxByteLength : 최대 입력 바이트수
+ * - minLength : 최소 입력 문자수
+ * - minByteLength : 최소 입력 바이트수
+ */ +com.validateGroup = function (grpObj, valInfoArr, tacObj, tabId) { + var objArr = WebSquare.util.getChildren(grpObj, { + excludePlugin: "group trigger textbox output calendar image span anchor pageInherit wframe itemTable", + recursive: true + }); + + var valStatus = { + isValid: true, + message: "", + error: [] // { columnId: "", comObjId: "", columnNam : "", message: "" } + }; + + try { + for (var objIdx in objArr) { + var obj = objArr[objIdx]; + + if ((typeof objArr[objIdx].validate === "function") && (objArr[objIdx].validate() === false)) { + return false; + } + + var dataObjInfo = com.getDataCollection(obj); + var dataCollection = null; + var columnId = null; + var value = null; + + if ((dataObjInfo !== undefined) && (dataObjInfo !== null)) { + dataCollection = WebSquare.util.getComponentById(dataObjInfo.runtimeDataCollectionId); + columnId = dataObjInfo.columnId; + } + + if ((dataCollection !== null) && (dataCollection.getObjectType() === "dataMap")) { + value = dataCollection.get(dataObjInfo.columnId).trim(); + } else { + var tempIdArr = obj.getID().split("_"); + if (obj.getPluginName() !== "editor") { + if ((typeof obj.getValue === "function") && (typeof obj.getValue().trim === "function")) { + value = obj.getValue().trim(); + } else { + continue; + } + } else { + value = obj.getText().trim(); + } + } + + for (var valIdx in valInfoArr) { + var valInfo = valInfoArr[valIdx]; + if ((typeof valInfo.id !== "undefined") && (valInfo.id === columnId)) { + if ((typeof valInfo.mandatory !== "undefined") && (valInfo.mandatory === true) && (value.length === 0)) { + _setResult(dataCollection, valInfo.id, obj.getID(), "필수 입력 항목 입니다."); + } else if ((typeof valInfo.minLength !== "undefined") && (valInfo.minLength > 0) && (value.length < valInfo.minLength)) { + _setResult(dataCollection, valInfo.id, obj.getID(), "최소 길이 " + valInfo.minLength + "자리 이상으로 입력해야 합니다."); + } else if ((typeof valInfo.minByteLength !== "undefined") && (valInfo.minByteLength > 0) && (WebSquare.util.getStringByteSize(value) < valInfo.minByteLength)) { + _setResult(dataCollection, valInfo.id, obj.getID(), "최소 길이 " + valInfo.minByteLength + "자리 이상으로 입력해야 합니다."); + } else if (typeof valInfo.valFunc === "function") { + var resultMsg = valInfo.valFunc(value); + if ((typeof resultMsg !== "undefined") && (resultMsg !== "")) { + _setResult(dataCollection, valInfo.id, obj.getID(), resultMsg, "2"); + } + } + } + } + } + + if (valStatus.error.length > 0) { + valStatus.isValid = false; + valStatus.message = "유효하지 않은 값이 입력 되었습니다"; + + if ((typeof tacObj !== "undefined") && (typeof tabId !== "undefined") && (tabId !== "")) { + var tabIndex = tacObj.getTabIndex(tabId); + tacObj.setSelectedTabIndex(tabIndex); + } + + gcm.valStatus.objectType = "group"; + gcm.valStatus.isValid = false; + gcm.valStatus.objectName = valStatus.error[0].comObjId; + + com.alert(valStatus.error[0].message, "gcm._groupValidationCallback"); + } + + return valStatus.isValid; + + function _setResult(dataCollection, columnId, comObjId, message, messageType) { + var scope = gcm._getScope(dataCollection); + + var errIdx = valStatus.error.length; + valStatus.error[errIdx] = {}; + valStatus.error[errIdx].columnId = columnId; + valStatus.error[errIdx].comObjId = comObjId; + + if (dataCollection !== null) { + var comObj = scope.$p.getComponentById(comObjId); + valStatus.error[errIdx].columnName = scope.com.getColumnName(comObj); + } else { + valStatus.error[errIdx].columnName = comObj.getInvalidMessage(); + } + + if ((typeof messageType !== "undefined") && (messageType == "2")) { + valStatus.error[errIdx].message = message; + } else { + valStatus.error[errIdx].message = scope.com.attachPostposition(valStatus.error[errIdx].columnName) + " " + message; + } + } + } catch (e) { + console.log("[com.validateGroup] Exception :: Object Id : " + obj.getID() + ", Plug-in Name: " + obj.getPluginName() + ", " + e.message); + } finally { + objArr = null; + } +}; + +/** + * GridView를 통해서 입력된 데이터에 대해서 유효성을 검증한다. + * + * @date 2018.01.19 + * @memberOf com + * @param {Object} gridViewObj GridView 객체 + * @param {Object[]} options 데이터 유효성 검증 옵션 + * @param {String} options[].id 유효성 검사 대상 DataCollection 컬럼 아이디 + * @param {Boolean} options[].mandatory 필수 입력 값 여부 + * @param {Number} options[].minLength 최소 입력 자리수 + * @param {requestCallback} options[].valFunc 사용자 유효성 검사 함수 + * @param {Object} tacObj GridView가 포함된 TabControl 컴포넌트 객체 + * @param {String} tabId GridView가 포함된 TabControl 컴포넌트의 Tab 아이디 + * @returns {Boolean} 유효성검사 결과 + * @since 2015.08.05 + * @example + * var valInfo = [ {id: "grpCd", mandatory: true, minLength: 5}, + * {id: "grpNm", mandatory: true} ]; + * + * if (com.validateGridView(grd_MenuAuthority, valInfo)) { + * if (confirm("변경된 데이터를 저장하시겠습니까?")) { + * scwin.saveGroup(); + * } + * } + * + * var valInfo = [ { id : "prntMenuCd", mandatory : true }, + * { id : "menuCd", mandatory : true, + * valFunc : function() { + * if (dmaMenu.get("prntMenuCd") == dmaMenu.get("menuCd")) { + * return "상위 메뉴 코드와 메뉴 코드가 같아서는 안됩니다."; + * } + * } }, + * { id : "menuNm", mandatory : true }, + * { id : "menuLevel", mandatory : true }, + * { id : "menuSeq", mandatory : true }, + * { id : "urlPath", mandatory : true }, + * { id : "isUse", mandatory : true } ]; + * + * if (com.validateGridView(grd_MenuAuthority, valInfo, tacMenuInfo, "tabMenuInfo1") == false) { + * return false; + * } + * @description + * * 입력 허용 문자, 입력 허용 불가 문자, 최대 입력 문자수 설정은 GridView의 Column의 속성에서 설정한다.
+ * - allowChar : 입력 허용 문자
+ * - ignoreChar : 입력 허용 불가 문자
+ * - maxLength : 최대 입력 문자수
+ */ +com.validateGridView = function (gridViewObj, valInfoArr, tacObj, tabId) { + + if (gridViewObj === null) { + return false; + } + + var dataList = com.getGridViewDataList(gridViewObj); + if (dataList === null) { + $p.log("Can not find the datalist of '" + gridViewObjId + "' object."); + return false; + } + + var valStatus = { + isValid: true, + message: "", + error: [] // { columnId: "", columnName: "", rowIndex: 0, message: "" } + }; + + try { + var modifiedIdx = dataList.getModifiedIndex(); + + for (var dataIdx = 0; dataIdx < modifiedIdx.length; dataIdx++) { + var modifiedData = dataList.getRowJSON(modifiedIdx[dataIdx]); + if (modifiedData.rowStatus === "D") { + continue; + } + for (var valIdx in valInfoArr) { + var valInfo = valInfoArr[valIdx]; + if ((typeof valInfo.id !== "undefined") && (typeof modifiedData[valInfo.id] !== "undefined")) { + var value = modifiedData[valInfo.id].trim(); + if ((typeof valInfo.mandatory !== "undefined") && (valInfo.mandatory === true) && (value.length === 0)) { + _setResult(modifiedIdx[dataIdx], dataList, gridViewObj.getID(), valInfo.id, "필수 입력 항목 입니다."); + } else if ((typeof valInfo.minLength !== "undefined") && (valInfo.minLength > 0) && (value.length < valInfo.minLength)) { + _setResult(modifiedIdx[dataIdx], dataList, gridViewObj.getID(), valInfo.id, "최소 길이 " + valInfo.minLength + "자리 이상으로 입력해야 합니다."); + } else if ((typeof valInfo.minByteLength !== "undefined") && (valInfo.minByteLength > 0) && (WebSquare.util.getStringByteSize(value) < valInfo.minByteLength)) { + _setResult(modifiedIdx[dataIdx], dataList, gridViewObj.getID(), valInfo.id, "최소 길이 " + valInfo.minByteLength + "자리 이상으로 입력해야 합니다."); + } else if (typeof valInfo.valFunc === "function") { + var resultMsg = valInfo.valFunc(value, modifiedData); + if ((typeof resultMsg !== "undefined") && (resultMsg !== "")) { + _setResult(modifiedIdx[dataIdx], dataList, gridViewObj.getID(), valInfo.id, resultMsg, "2"); + } + } + } + + if (valStatus.error.length > 0) { + break; + } + } + } + + if (valStatus.error.length > 0) { + valStatus.isValid = false; + valStatus.message = "유효하지 않은 값이 입력 되었습니다"; + + if ((typeof tacObj !== "undefined") && (typeof tabId !== "undefined") && (tabId !== "")) { + var tabIndex = tacObj.getTabIndex(tabId); + tacObj.setSelectedTabIndex(tabIndex); + } + + gcm.valStatus.isValid = false; + gcm.valStatus.objectType = "gridView"; + gcm.valStatus.objectName = valStatus.error[0].comObjId; + gcm.valStatus.columnId = valStatus.error[0].columnId; + gcm.valStatus.rowIndex = valStatus.error[0].rowIndex; + + com.alert(valStatus.error[0].message, "gcm._groupValidationCallback"); + } + + return valStatus.isValid; + + function _setResult(rowIndex, dataList, gridViewObjId, columnId, message, messageType) { + var errIdx = valStatus.error.length; + valStatus.error[errIdx] = {}; + valStatus.error[errIdx].columnId = columnId; + valStatus.error[errIdx].comObjId = gridViewObjId; + valStatus.error[errIdx].columnName = dataList.getColumnName(columnId); + valStatus.error[errIdx].rowIndex = rowIndex; + + if ((typeof messageType !== "undefined") && (messageType == "2")) { + valStatus.error[errIdx].message = message; + } else { + valStatus.error[errIdx].message = com.attachPostposition(valStatus.error[errIdx].columnName) + " " + message; + } + } + } catch (e) { + $p.log("[com.validateGridView] Exception :: " + e.message); + } finally { + modifiedData = null; + modifiedIdx = null; + dataList = null; + gridViewObj = null; + } +}; + +/** + * 유효성 검사 실패시 출력할 메시지를 반환한다. + * + * @date 2014.12.10 + * @private + * @memberOf com + * @author 박상규 + * @returns {String} 유효성 검사 결과 메시지 + */ +com.validateMsg = function () { + var msg = ""; + var invalidType = this.getType(); // invalid 타입 + var invalidValue = this.getValue(); // invalid 타입별 설정값 + + var callerObj = null; + if (typeof this.getCaller === "function") { + callerObj = this.getCaller(); + } else if (typeof this.userFunc !== "undefined") { + callerObj = $p.getComponentById(this.userFunc.arguments[1]); + } else { + return; + } + + var scopeCom = gcm._getScope(callerObj).com; + var columnName = scopeCom.getColumnName(callerObj); + + switch (invalidType) { + case "mandatory": + msg = scopeCom.attachPostposition(columnName) + "필수 입력 항목 입니다."; + break; + case "minLength": + msg = scopeCom.attachPostposition(columnName) + "최소 길이 " + invalidValue + "자리 이상으로 입력해야 합니다."; + break; + case "minByteLength": + msg = scopeCom.attachPostposition(columnName) + "최소 길이 " + invalidValue + "바이트 이상으로 입력해야 합니다."; + break; + default : + msg = scopeCom.attachPostposition(columnName) + "유효하지 않은 값이 입력 되었습니다."; + break; + } + + if (msg !== "") { + gcm.valStatus.isValid = false; + } + + gcm.valStatus.objectType = "group"; + gcm.valStatus.objectName = callerObj.getID(); + + scopeCom.alert(msg, "gcm._groupValidationCallback"); + return msg; +}; + +/** + * 파라미터를 읽어 온다. + * + * @date 2019.03.11 + * @memberOf com + * @param {String} 파라미터 키 + * @author 박상규 + * @return {Object} 파라미터 값 + * @example + * var code = com.getParameter("code"); // 특정 파라미터 값을 얻어오기 + * var param = com.getParameter(); // 전체 파라미터 값을 얻어오기 + */ +com.getParameter = function (paramKey) { + try { + if (typeof paramKey !== "undefined") { + param = $p.getParameter(paramKey); + if ((typeof param !== "undefined") && (param !== "")) { + return param; + } + var param = $p.getParameter("param"); + if ((typeof param !== "undefined") && (param !== "")) { + return param[paramKey]; + } + + return param; + } else { + return $p.getParameter("param"); + } + } catch (ex) { + return ""; + } +}; + +/** + * 현재 화면의 웹스퀘어 page 경로를 반환한다. + * + * @date 2016.07.19 + * @memberOf com + * @author 박상규 + * @return {String} 현재 페이지의 경로 + * @example + * com.getPageUrl(); + * // return 예시) "/ui/BM/BM001M01.xml" + */ +com.getPageUrl = function () { + var pArr = document.location.href.split("w2xPath="); + var oArr = pArr[1].split("&"); + return oArr[0]; +}; + +/** + * 최상위 page를 index화면으로 이동 (/) + * + * @date 2019.05.25 + * @memberOf com + * @author 박상규 + */ +com.setStartPage = function () { + //var link = "/cm/main/main.xml"; + var link = "/cm/login/login.xml"; + var url = ""; + + // WebSquare.util.browserVersion()는 비공개 함수로 공통 JS 파일 안에서만 한정적으로 사용해야 함. + if (parseInt(WebSquare.util.browserVersion()) < 10) { + url = "/"; + } + + var randomKey = Math.random() * 1000000000000000000; + History.replaceState({ link : link, key : randomKey }, "", url); +}; + +/** + * 최상위 page를 index화면으로 이동한다. + * + * @date 2019.05.21 + * @memberOf com + * @author 박상규 + */ +com.goHome = function () { + $p.top().m_wrap.hide(); + com.setStartPage(); + if (gcm.CONTEXT_PATH == "") { + top.window.location.href = "/"; + } else { + top.window.location.href = gcm.CONTEXT_PATH; + } +}; + +/** + * content 영역을 login 페이지로 이동한다. + */ +com.login = function () { + com.closeAllPopup(); + com.setPage("/cm/login/login.xml", null); +}; + +/** +* 비정상접근 이동페이지 +* */ +com.auth_check = function () { + com.closeAllPopup(); + com.setPage("/cm/main/auth_check.xml", null); +}; +/** + * 로그아웃으로 WAS의 사용자 session을 삭제한다. + * 정상 처리 : /로 이동. + * 오류 발생 : 기존 화면으로 오류 메세지 전송 + * + * @date 2016.08.08 + * @memberOf com + * @author 박상규 + * @example + * com.logout(); + */ +com.logout = function () { + var logoutGrpOption = { + id: "sbm_Logout", + action: "/login/logout.do", + target: "", + submitDoneHandler: "com.goHome", isShowMeg: true + }; + com.executeSubmission_dynamic(logoutGrpOption); +}; + +/** + * contextRoot가 포함된 path를 반환한다. + * + * @date 2016.11.16 + * @memberOf com + * @param {String} path 파일경로(Context가 포함되지 않은) + * @return {String} Context가 포함된 파일경로 + * @example + * // context가 /sample 인경우 + * com.getFullPath("/ui/SP/Parameter/confirm.xml"); + * // return 예시) "/sample/ui/SP/Parameter/confirm.xml" + */ +com.getFullPath = function (path) { + var rtn_path = ""; + if (gcm.CONTEXT_PATH == "") { + rtn_path = path; + } else { + rtn_path = gcm.CONTEXT_PATH + path; + } + return rtn_path; +}; + +/** + * 문자열 왼쪽에 일정길이(maxLen) 만큼 '0'으로 채우기 + * + * @date 2014.12.10 + * @param {String} str 포멧터를 적용할 문자열 + * @param {Number} maxLen 0 으로 채울 길이 + * @memberOf com + * @author 박상규 + * @return {String} 일정길이 만큼 0 으로 채워진 문자열 + * @example + * com.fillZero("24", 4); + * // return 예시) "0024" + * + * com.fillZero("11321", 8); + * // return 예시) "00011321" + */ +com.fillZero = function (str, maxLen) { + var len = str; + var zero = ""; + + if (typeof str == 'number') len = '' + str; + + if (len.length < maxLen) { + for (var i = len.length; i < maxLen; i++) { + zero += "0"; + } + } + return (zero + '' + str); +}; + +/** + * JSON Object로 변환해서 반환한다. + * + * @date 2014.12.09 + * @param {String} str JSON 문자열 + * @memberOf com + * @author 박상규 + * @return {Object} JSON 객체 or null + * @example + * // 유효하지 않은 JSON 문자열 일 경우 + * com.getJSON(""); + * // return 예시) null + * + * // 유효한 JSON 문자열 + * var json = '{"tbx_sPrjNm":"1","tbx_sPrtLv":"2","tbx_sReqLv":"3"}'; + * com.getJSON(json); + * // return 예시) {tbx_sPrjNm: "1", tbx_sPrtLv: "2", tbx_sReqLv: "3"} + */ +com.getJSON = function (str) { + try { + return JSON.parse(str); + } catch (e) { + return str; + } +}; + +/** + * XML, JSON 객체를 String 타입으로 반환한다. + * + * @date 2014.12.09 + * @param {Object} object String으로 변환할 JSON 객체 + * @memberOf com + * @author 박상규 + * @return {String} String으로 변환된 객체 + */ +com.strSerialize = function (object) { + if (typeof object == 'string') { + return object; + } else if (com.isJSON(object)) { + return JSON.stringify(object); + } else if (com.isXmlDoc(object)) { + return WebSquare.xml.serialize(object); + } else { + return object; + } +}; + +/** + * JSON Object인지 여부를 검사한다. + * + * @date 2014.12.09 + * @param {Object} jsonObj JSON Object가 맞는지 검사할 JSON Object + * @memberOf com + * @author 박상규 + * @return {Boolean} true or false + * @example + * com.isJSON(""); + * // return 예시) false + * com.isJSON( {"tbx_sPrjNm": "1", "tbx_sPrtLv": "2", "tbx_sReqLv": "3"} ); + * // return 예시) true + */ +com.isJSON = function (jsonObj) { + if (typeof jsonObj !== 'object') + return false; + try { + JSON.stringify(jsonObj); + return true; + } catch (e) { + return false; + } +}; + +/** + * XML Document 객체인지 여부를 검사한다. + * + * @date 2014.12.09 + * @memberOf com + * @param {Object} data XML Document 객체인지 여부를 검사한다. + * @author 박상규 + * @return {Boolean} true or false + */ +com.isXmlDoc = function (data) { + if (typeof data != 'object') + return false; + if ((typeof data.documentElement != 'undefined' && data.nodeType == 9) || (typeof data.documentElement == 'undefined' && data.nodeType == 1)) { + return true; + } + return false; +}; + + +/** + * 값이 Empty 상태(undefined, null, "")인지 판별한다. + * @date 2019.05.21 + * @memberOf com + * @param value Empty 여부를 판단할 값 + * @return Empty 여부 (true : Empty, false : Not Empty) + * @example + * if (com.isEmpty(empCd) === false) { + * $p.log("empCd : " + empCd); + * } + */ +com.isEmpty = function(value) { + if ((typeof value === "undefined") || (value === null) || (value === "")) { + return true; + } else { + return false; + } +}; + +/** + * 객체의 typeof 값을 반환하며 typeof의 값이 object인 경우 array, json, xml, null로 체크하여 반환한다. + * + * @date 2016.12.20 + * @param {Object} obj type을 반환 받을 객체(string,boolean,number,object 등) + * @author 박상규 + * @return {String} 객체의 타입으로 typeof가 object인 경우 array, json, xml, null로 세분화하여 반환한다. 그외 object타입이 아닌경우 원래의 type(string,boolean,number 등)을 반환한다. + * @example + * com.getObjectType("WebSquare"); + * // return 예시) "string" + * com.getObjectType({"name":"WebSquare"}); + * // return 예시) "json" + * com.getObjectType(["1","2"]); + * // return 예시) "array" + */ +com.getObjectType = function (obj) { + var objType = typeof obj; + if (objType !== 'object') { + return objType; + } else if (obj.constructor === {}.constructor) { + return 'json'; + } else if (obj.constructor === [].constructor) { + return 'array'; + } else if (obj === null) { + return 'null'; + } else { + var tmpDoc = WebSquare.xml.parse(""); + if (obj.constructor === tmpDoc.constructor || obj.constructor === tmpDoc.firstElementChild.constructor) { + return 'xml'; + } else { + return objType; + } + } +}; + +/** + * 주민번호 문자열에 Formatter(######-#######)를 적용하여 반환한다. + * + * @date 2016.08.02 + * @param {String} str 주민번호 문자열 + * @memberOf com + * @author 박상규 + * @return {String} 포멧터가 적용된 주민번호 문자열 + * @example + * com.transIdNum("1234561234567"); + * // return 예시) "123456-1234567" + */ +com.transIdNum = function (str) { + var front = String(str).substr(0, 6); + var back = String(str).substr(6, 7); + var output = front + "-" + back; + + return output; +}; + +/** + * 전화번호, setDisplayFormat("###-####-####") - 입력된 str에 포메터를 적용하여 반환한다. + * + * @date 2016.08.02 + * @param {String} str 포멧터를 적용할 문자열 + * @memberOf com + * @author 박상규 + * @return {String} 포멧터가 적용된 문자열 + * @example + * com.transPhone("0212345678"); + * // return 예시) "02-1234-5678" + * com.transPhone("021234567"); + * // return 예시) "02-123-4567" + * com.transPhone("03112345678"); + * // return 예시) "031-1234-5678" + * com.transPhone("0311234567"); + * // return 예시) "031-123-4567" + */ +com.transPhone = function (str) { + return str.replace(/^(01[016789]{1}|02|0[3-9]{1}[0-9]{1})-?([0-9]{3,4})-?([0-9]{4})$/, "$1-$2-$3"); +}; + +/** + * 시간 - 입력된 String 또는 Number에 포메터를 적용하여 반환한다. + * + * @date 2016.08.02 + * @param {String} value 시간 Formatter를 적용한 값 (String 또는 Number 타입 지원) + * @memberOf com + * @author 박상규 + * @return {String} 포멧터가 적용된 문자열 + * @example + * com.transTime("123402"); + * // return 예시) "12:34:02" + */ +com.transTime = function (value) { + var hour = String(value).substr(0, 2); + var minute = String(value).substr(2, 2); + var second = String(value).substr(4, 2); + var output = hour + ":" + minute + ":" + second; + + return output; +}; + +/** + * 소수점 2자리에서 반올림 처리를 한다. + * + * @date 2016.08.02 + * @param {String} value 소수점 2자리 반올림 처리를 할 값 (String 또는 Number 타입 지원) + * @memberOf com + * @author 박상규 + * @return {String} 소숫점 2자리 반올림 처리를 한 숫자 값 + * @example + * com.transRound( "23.4567" ); + * // return 예시) "23.46" + */ +com.transRound = function (value) { + return Math.round(Number(value) * 100) / 100; +}; + +/** + * 소수점 2자리에서 내림 처리를 한다. + * + * @date 2016.08.02 + * @param {String} value 소수점 2자리 내림 처리를 할 값 (String 또는 Number 타입 지원) + * @memberOf com + * @author 박상규 + * @return {Number} 소숫점 2자리 내림 처리를 한 숫자 값 + * @example + * com.transFloor(23.4567); + * // return 예시) 23.45 + */ +com.transFloor = function (value) { + return Math.floor(Number(str) * value) / 100; +}; + +/** + * 소수점 2자리에서 반올림 후 퍼센트(%)를 붙여서 반환한다. + * + * @date 2016.08.02 + * @param {String} value Percent(%) 포맷터를 적용할 값 (String 또는 Number 타입 지원) + * @param {String} type 적용할 포멧터 형식 + * @memberOf com + * @author 박상규 + * @return {String} 포멧터가 적용된 문자열 + * @example + * com.transCeil(23.4567); + * // return 예시) 23.46 + * com.transCeil(78.567, "percent"); + * // return 예시) 78.57% + */ +com.transCeil = function (value, type) { + var output = ""; + if (type == "percent") { + output = Math.ceil(Number(value) * 100) / 100 + "%"; + } else { + output = Math.ceil(Number(value) * 100) / 100; + } + return output; +}; + +/** + * ex)세번째자리마다 콤마 표시, 금액, setDisplayFormat("#,###.##0", "fn_userFormatter2") - 입력된 str에 포메터를 적용하여 반환한다.

+ * + * @date 2016.08.02 + * @param {String} value String or Number 포멧터를 적용할 값 (String 또는 Number 타입 지원) + * @param {String} type 적용할 포멧터 형식(Default:null,dollar,plusZero,won) + * @memberOf com + * @author 박상규 + * @return {String} 포멧터가 적용된 문자열 + * @example + * com.transComma("12345"); + * // return 예시) 12,345 + * com.transComma("12345", "dollar"); + * // return 예시) $12,345 + * com.transComma("12345", "plusZero"); + * // return 예시) 123,450 + * com.transComma("12345", "won"); + * // return 예시) 12,345원 + */ +com.transComma = function (value, type) { + var amount; + + if (type == "plusZero") { + amount = String(value) + "0"; + } else { + amount = String(value); + } + + amount = amount.split("."); + + var amount1 = amount[0].split("").reverse(); + var amount2 = amount[1]; + + var output = ""; + for (var i = 0; i <= amount1.length - 1; i++) { + output = amount1[i] + output; + if ((i + 1) % 3 == 0 && (amount1.length - 1) !== i) + output = ',' + output; + } + + if (type == "dollar") { + if (!amount2) { + output = "$ " + output; + } else { + output = "$ " + output + "." + amount2; + } + } else if (type == "won") { + if (!amount2) { + output = output + "원"; + } else { + output = output + "." + amount2 + "원"; + } + } else { + if (!amount2) { + output = output; + } else { + output = output + "." + amount2; + } + } + + return output; +}; + +/** + * 텍스트 - 입력된 str에 포메터를 적용하여 반환한다. + * + * @date 2016.08.02 + * @param {String} str String or Number 포멧터를 적용할 값 + * @memberOf com + * @author 박상규 + * @return {String} 포멧터가 적용된 문자열 + * @example + * com.transText("1"); + * // return 예시) 1 + * com.transText("12"); + * // return 예시) 12 + * com.transText("123"); + * // return 예시) 1.23 + * com.transText("1234"); + * // return 예시) 12.34 + * com.transText("12345"); + * // return 예시) 123.345 + * com.transText("123456"); + * // return 예시) 1234.56 + * com.transText("1234567"); + * // return 예시) 12345.67 + */ +com.transText = function (str) { + var amount = String(str); + var result; + + if (amount.length < 3) { + result = amount.substr(0, amount.length); + } else { + result = amount.substr(0, amount.length - 2) + "." + amount.substr(amount.length - 2, amount.length); + } + return result; +}; + +/** + * 날짜 - 입력된 str에 포메터를 적용하여 반환한다. + * + * @date 2016.08.02 + * @param {String} str 포멧터를 적용할 파라메터 (String 또는 Number 타입 지원) + * @param {String} type 적용할 포멧터 형식 Default:null,slash,date + * @memberOf com + * @author 박상규 + * @return {String} 포멧터가 적용된 문자열 + * @example + * com.transDate(20120319, "slash"); + * // return 예시) 12/03/19 + * com.transDate(20120319, "date"); + * // return 예시) 2012/03/19 + * com.transDate(20120319, "colon"); + * // return 예시) 2012:03:19 + * com.transDate(20120319); + * // return 예시) 2012년 03월 19일 + */ +com.transDate = function (str, type) { + var output = ""; + var date = String(str); + + if (type == "slash") { + date = date.substring(2, date.length); + for (var i = 0; i <= date.length - 1; i++) { + output = output + date[i]; + if ((i + 1) % 2 == 0 && (date.length - 1) !== i) + output = output + "/"; + } + } else if (type == "date") { + if (date.length == 8) { + output = date.substr(0, 4) + "/" + date.substr(4, 2) + "/" + date.substr(6, 2); + } + } else if (type == "colon") { + if (date.length == 8) { + output = date.substr(0, 4) + ":" + date.substr(4, 2) + ":" + date.substr(6, 2); + } + } else { + var year = date.substr(0, 4); + var month = date.substr(4, 2); + var day = date.substr(6, 2); + var output = year + "년 " + month + "월 " + day + "일"; + } + return output; +}; + +/** + * displayFormatter - 입력된 str에 포메터를 적용하여 반환한다. + * + * @date 2016.08.03 + * @param {String} str 포멧터를 적용할 문자열 + * @memberOf com + * @author 박상규 + * @return {String} 포멧터가 적용된 문자열 + * @example + * com.transUpper("google.com"); + * // return 예시) "GOOGLE.COM" + */ +com.transUpper = function (str) { + return str.toUpperCase(); +}; + +/** + * 문자(char)의 유형을 리턴한다. + * + * @date 2016 08.02 + * @param {String} str 어떤 유형인지 리턴받을 문자 + * @memberOf com + * @author 박상규 + * @return {Number} 유니코드 기준

+ * 한글음절[ 44032 ~ 55203 ] => 1
+ * 한글자모[ 4352 ~ 4601 ] => 2
+ * 숫자[ 48 ~ 57 ] => 4
+ * 특수문자[ 32 ~ 47 || 58 ~ 64 || 91 ~ 96 || 123 ~ 126 ] => 8
+ * 영문대[ 65 ~ 90 ] => 16
+ * 영문소[ 97 ~ 122 ] => 32
+ * 기타[그외 나머지] => 48 + * @example + * com.getLocale("가"); + * // return 예시)1 + * com.getLocale("ㅏ"); + * // return 예시)2 + * com.getLocale("1"); + * // return 예시)4 + * com.getLocale("!"); + * // return 예시)8 + * com.getLocale("A"); + * // return 예시)16 + * com.getLocale("a"); + * // return 예시)32 + * com.getLocale("¿"); + * // return 예시)48 + */ +com.getLocale = function (str) { + var locale = 0; + if (str.length > 0) { + var charCode = str.charCodeAt(0); + + if (charCode >= 0XAC00 && charCode <= 0XD7A3) { // 한글음절.[ 44032 ~ 55203 ] + locale = 0X1; // 1 + } else if ((charCode >= 0X1100 && charCode <= 0X11F9) || (charCode >= 0X3131 && charCode <= 0X318E)) { // 한글자모.[ 4352 ~ 4601 ] + locale = 0X2; // 2 + } else if (charCode >= 0X30 && charCode <= 0X39) { // 숫자.[ 48 ~ 57 ] + locale = 0X4; // 4 + } else if ((charCode >= 0X20 && charCode <= 0X2F) || (charCode >= 0X3A && charCode <= 0X40) || (charCode >= 0X5B && charCode <= 0X60) + || (charCode >= 0X7B && charCode <= 0X7E)) { // 특수문자 + locale = 0X8; // 8 + } else if (charCode >= 0X41 && charCode <= 0X5A) { // 영문 대.[ 65 ~ 90 ] + locale = 0X10; // 16 + } else if (charCode >= 0X61 && charCode <= 0X7A) { // 영문 소.[ 97 ~ 122 ] + locale = 0X20; // 32 + } else { // 기타 + locale = 0X30; // 48 + } + } + return locale; +}; + +/** + * 입력받은 문자열이 한글이면 true, 아니면 false를 리턴한다. + * + * @date 2016.08.02 + * @param {String} str 한글 유형인지 검증할 문자열 + * @memberOf com + * @author 박상규 + * @return {Boolean} true or false + * @example + * com.isKorean(""); + * // return 예시) false + * com.isKorean("무궁화꽃이"); + * // return 예시) true + */ +com.isKorean = function (str) { + if (str != null && str.length > 0) { + var locale = 0; + for (var i = 0; i < str.length; i++) { + locale = com.getLocale(str.charAt(i)); + } + if ((locale & ~0x3) == 0) { + return true; + } + } + return false; +}; + +/** + * 종성이 존재하는지 여부를 검사한다. + * + * @date 2016.08.02 + * @param {String} str 종성의 여부를 검사할 문자열 + * @memberOf com + * @author 박상규 + * @return {Boolean} true or false + * @example + * com.isFinalConsonant("종서") + * // return 예시) false + * com.isFinalConsonant("종성") + * // return 예시) true + * com.isFinalConsonant("입니다") + * // return 예시) false + * com.isFinalConsonant("입니당") + * // return 예시) true + */ +com.isFinalConsonant = function (str) { + var code = str.charCodeAt(str.length - 1); + if ((code < 44032) || (code > 55197)) { + return false; + } + if ((code - 16) % 28 == 0) { + return false; + } + return true; +}; + +/** + * 단어 뒤에 '은'이나 '는'을 붙여서 반환한다. + * + * @date 2016.08.02 + * @param {String} str 은, 는 붙일 문자열 + * @memberOf com + * @author 박상규 + * @return {String} 변환된 문자열 + * @example + * com.attachPostposition("나"); + * // return 예시)"나는" + * com.attachPostposition("나와 너"); + * // return 예시)"나와 너는" + * com.attachPostposition("그래서"); + * // return 예시)"그래서는" + * com.attachPostposition("그랬습니다만"); + * // return 예시)"그랬습니다만은" + */ +com.attachPostposition = function (str) { + if (com.isFinalConsonant(str)) { + str = str + "은 "; + } else { + str = str + "는 "; + } + return str; +}; + +/** + * 입력받은 문자열에 한글이 포함되어 있으면 true, 아니면 false를 리턴한다. + * + * @date 2016.08.02 + * @param {String} str 한글이 포함되어 있는지 검증 받을 문자열 + * @memberOf com + * @author 박상규 + * @return {Boolean} true or false + * @example + * com.isKoreanWord("abcd무궁화"); //return 예시) true + * com.isKoreanWord("abcd"); //return 예시) false + */ +com.isKoreanWord = function (str) { + var c; + for (var i = 0; i < str.length; i++) { + c = str.charAt(i); + if (com.isKorean(c)) { + return true; + } + } + return false; +}; + +/** + * 사업자번호 유효성을 검사한다. + * + * @date 2014.12.10 + * @memberOf com + * @param {String} str 사업자번호 문자열 + * @returns {Boolean} 올바른 번호가 아닌경우 false + * @example com.checkBizID("1102112345"); + */ +com.checkBizID = function (str) { + var sum = 0; + var aBizID = new Array(10); + var checkID = ["1", "3", "7", "1", "3", "7", "1", "3", "5"]; + + for (var i = 0; i < 10; i++) { + aBizID[i] = str.substring(i, i + 1); + } + for (var i = 0; i < 9; i++) { + sum += aBizID[i] * checkID[i]; + } + sum = sum + parseInt((aBizID[8] * 5) / 10); + temp = sum % 10; + temp1 = 0; + + if (temp != 0) { + temp1 = 10 - temp; + } else { + temp1 = 0; + } + if (temp1 != aBizID[9]) { + return false; + } + return true; +}; + +/** + * 법인등록번호 유효성을 검사한다. + * + * @date 2014. 12. 10. + * @memberOf com + * @param {String} str 문자열 + * @returns {Boolean} 올바른 번호가 아닌경우 false + * @example com.checkCorpID("110211234567"); + */ +com.checkCorpID = function (str) { + var checkID = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]; + var sCorpNo = str; + var lV1 = 0; + var nV2 = 0; + var nV3 = 0; + + for (var i = 0; i < 12; i++) { + lV1 = parseInt(sCorpNo.substring(i, i + 1)) * checkID[i]; + + if (lV1 >= 10) { + nV2 += lV1 % 10; + } else { + nV2 += lV1; + } + } + nV3 = nV2 % 10; + + if (nV3 > 0) { + nV3 = 10 - nV3; + } else { + nV3 = 0; + } + if (sCorpNo.substring(12, 13) != nV3) { + return false; + } + return true; +}; + +/** + * 내외국인 주민등록번호 유효성을 검사한다. + * + * @date 2014. 12. 10. + * @memberOf com + * @param {String} str 문자열 + * @returns {Boolean} 올바른 번호가 아닌경우 false + * @example com.checkPersonID("9701011234567"); + */ +com.checkPersonID = function (str) { + var checkID = [2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5]; + var i = 0, sum = 0; + var temp = 0; + var yy = ""; + + if (str.length != 13) { + return false; + } + for (i = 0; i < 13; i++) { + if (str.charAt(i) < '0' || str.charAt(i) > '9') { + return false; + } + } + + // foreigner PersonID Pass + if (str.substring(6, 13) == "5000000" || str.substring(6, 13) == "6000000" || str.substring(6, 13) == "7000000" + || str.substring(6, 13) == "8000000") { + return true; + } + for (i = 0; i < 12; i++) { + sum += str.charAt(i) * checkID[i]; + } + temp = sum - Math.floor(sum / 11) * 11; + temp = 11 - temp; + temp = temp - Math.floor(temp / 10) * 10; + + // 나이 (-) 체크 + if (str.charAt(6) == '1' || str.charAt(6) == '2' || str.charAt(6) == '5' || str.charAt(6) == '6') { + yy = "19"; + } else { + yy = "20"; + } + + if (parseInt(common_util.getCurrentDate('yyyy')) - parseInt(yy + str.substring(0, 2)) < 0) { + return false; + } + + // 외국인 주민번호 체크로직 추가 + if (str.charAt(6) != '5' && str.charAt(6) != '6' && str.charAt(6) != '7' && str.charAt(6) != '8') { + if (temp == eval(str.charAt(12))) { + return true; + } else { + return false; + } + } else { + if ((temp + 2) % 10 == eval(str.charAt(12))) { + return true; + } else { + return false; + } + } + return false; +}; + + +/** + * 메일주소 체크한다. + * + * @date 2014.12.10 + * @memberOf com + * @param {String} str 메일주소 + * @return {Boolean} 정상이면 공백("")을 반환, 그외는 에러 메시지 반환 + * @example com.isEmail("emailTest@email.com") + */ +com.checkEmail = function (str) { + if (typeof str != "undefined" && str != "") { + var format = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; + + if (format.test(str)) { + return true; + } else { + return false; + } + } + return true; +}; + +/** + * 서버 날짜 반환한다. (default format: yyyyMMdd) + * @date 2019.05.21 + * @memberOf com + * @param {String:N} sDateFormat 날짜 포맷
+ * y Year 1996; 96
+ * M Month in year 07
+ * d Day in month 10
+ * H Hour in day (0-23) 0
+ * m Minute in hour 30
+ * s Second in minute 55
+ * S Millisecond 978
+ * @return String 현재날짜 + * @example + * com.getServerDate("yyyy-MM-dd HH:mm:ss SSS"); + * com.getServerDate("yyyy-MM-dd"); + * com.getServerDate(); + */ +com.getServerDate = function (sDateFormat) { + if (com.isEmpty(sDateFormat)) { + sFormat = "yyyyMMdd"; + } + + return WebSquare.date.getCurrentServerDate(sDateFormat); +}; + +com.refreshPage = function () { + var searchCodeGrpOption = { + id: "sbm_refreshPage", + action: "/refreshPage.do", + method: "post", + mediatype: "application/json", + mode: "asynchronous", + isShowMeg: false + }; + var link = $p.top().container.getSrc(); + link = link.replaceAll(gcm.CONTEXT_PATH,''); + com.executeSubmission_dynamic(searchCodeGrpOption,{link:link}); +}; + +com.initTempData = function () { + var searchCodeGrpOption = { + id: "sbm_initTempData", + action: "/initTempData.do", + method: "post", + mediatype: "application/json", + mode: "asynchronous", + isShowMeg: false + }; + com.executeSubmission_dynamic(searchCodeGrpOption); +}; \ No newline at end of file diff --git a/src/main/webapp/cm/js/jquery.history.js b/src/main/webapp/cm/js/jquery.history.js new file mode 100644 index 0000000..9e18d9e --- /dev/null +++ b/src/main/webapp/cm/js/jquery.history.js @@ -0,0 +1 @@ +typeof JSON!="object"&&(JSON={}),function(){"use strict";function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n")&&n[0]);return e>4?e:!1}();return e},h.isInternetExplorer=function(){var e=h.isInternetExplorer.cached=typeof h.isInternetExplorer.cached!="undefined"?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return e},h.options.html4Mode?h.emulated={pushState:!0,hashChange:!0}:h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(i.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(i.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in r)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},h.cloneObject=function(e){var t,n;return e?(t=l.stringify(e),n=l.parse(t)):n={},n},h.getRootUrl=function(){var e=r.location.protocol+"//"+(r.location.hostname||r.location.host);if(r.location.port||!1)e+=":"+r.location.port;return e+="/",e},h.getBaseHref=function(){var e=r.getElementsByTagName("base"),t=null,n="";return e.length===1&&(t=e[0],n=t.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},h.getBaseUrl=function(){var e=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return e},h.getPageUrl=function(){var e=h.getState(!1,!1),t=(e||{}).url||h.getLocationHref(),n;return n=t.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,n){return/\./.test(e)?e:e+"/"}),n},h.getBasePageUrl=function(){var e=h.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,n){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},h.getFullUrl=function(e,t){var n=e,r=e.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(e)||(r==="/"?n=h.getRootUrl()+e.replace(/^\/+/,""):r==="#"?n=h.getPageUrl().replace(/#.*/,"")+e:r==="?"?n=h.getPageUrl().replace(/[\?#].*/,"")+e:t?n=h.getBaseUrl()+e.replace(/^(\.\/)+/,""):n=h.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),n.replace(/\#$/,"")},h.getShortUrl=function(e){var t=e,n=h.getBaseUrl(),r=h.getRootUrl();return h.emulated.pushState&&(t=t.replace(n,"")),t=t.replace(r,"/"),h.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),t},h.getLocationHref=function(e){return e=e||r,e.URL===e.location.href?e.location.href:e.location.href===decodeURIComponent(e.URL)?e.URL:e.location.hash&&decodeURIComponent(e.location.href.replace(/^[^#]+/,""))===e.location.hash?e.location.href:e.URL.indexOf("#")==-1&&e.location.href.indexOf("#")!=-1?e.location.href:e.URL||e.location.href},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(e,t){typeof e=="undefined"&&(e=!0),typeof t=="undefined"&&(t=!0);var n=h.getLastSavedState();return!n&&t&&(n=h.createStateObject()),e&&(n=h.cloneObject(n),n.url=n.cleanUrl||n.url),n},h.getIdByState=function(e){var t=h.extractId(e.url),n;if(!t){n=h.getStateString(e);if(typeof h.stateToId[n]!="undefined")t=h.stateToId[n];else if(typeof h.store.stateToId[n]!="undefined")t=h.store.stateToId[n];else{for(;;){t=(new Date).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof h.idToState[t]=="undefined"&&typeof h.store.idToState[t]=="undefined")break}h.stateToId[n]=t,h.idToState[t]=e}}return t},h.normalizeState=function(e){var t,n;if(!e||typeof e!="object")e={};if(typeof e.normalized!="undefined")return e;if(!e.data||typeof e.data!="object")e.data={};return t={},t.normalized=!0,t.title=e.title||"",t.url=h.getFullUrl(e.url?e.url:h.getLocationHref()),t.hash=h.getShortUrl(t.url),t.data=h.cloneObject(e.data),t.id=h.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,n=!h.isEmptyObject(t.data),(t.title||n)&&h.options.disableSuid!==!0&&(t.hash=h.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=h.getFullUrl(t.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t},h.createStateObject=function(e,t,n){var r={data:e,title:t,url:n};return r=h.normalizeState(r),r},h.getStateById=function(e){e=String(e);var n=h.idToState[e]||h.store.idToState[e]||t;return n},h.getStateString=function(e){var t,n,r;return t=h.normalizeState(e),n={data:t.data,title:e.title,url:e.url},r=l.stringify(n),r},h.getStateId=function(e){var t,n;return t=h.normalizeState(e),n=t.id,n},h.getHashByState=function(e){var t,n;return t=h.normalizeState(e),n=t.hash,n},h.extractId=function(e){var t,n,r,i;return e.indexOf("#")!=-1?i=e.split("#")[0]:i=e,n=/(.*)\&_suid=([0-9]+)$/.exec(i),r=n?n[1]||e:e,t=n?String(n[2]||""):"",t||!1},h.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},h.extractState=function(e,t){var n=null,r,i;return t=t||!1,r=h.extractId(e),r&&(n=h.getStateById(r)),n||(i=h.getFullUrl(e),r=h.getIdByUrl(i)||!1,r&&(n=h.getStateById(r)),!n&&t&&!h.isTraditionalAnchor(e)&&(n=h.createStateObject(null,null,i))),n},h.getIdByUrl=function(e){var n=h.urlToId[e]||h.store.urlToId[e]||t;return n},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||t},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||t},h.hasUrlDuplicate=function(e){var t=!1,n;return n=h.extractState(e.url),t=n&&n.id!==e.id,t},h.storeState=function(e){return h.urlToId[e.url]=e.id,h.storedStates.push(h.cloneObject(e)),e},h.isLastSavedState=function(e){var t=!1,n,r,i;return h.savedStates.length&&(n=e.id,r=h.getLastSavedState(),i=r.id,t=n===i),t},h.saveState=function(e){return h.isLastSavedState(e)?!1:(h.savedStates.push(h.cloneObject(e)),!0)},h.getStateByIndex=function(e){var t=null;return typeof e=="undefined"?t=h.savedStates[h.savedStates.length-1]:e<0?t=h.savedStates[h.savedStates.length+e]:t=h.savedStates[e],t},h.getCurrentIndex=function(){var e=null;return h.savedStates.length<1?e=0:e=h.savedStates.length-1,e},h.getHash=function(e){var t=h.getLocationHref(e),n;return n=h.getHashByUrl(t),n},h.unescapeHash=function(e){var t=h.normalizeHash(e);return t=decodeURIComponent(t),t},h.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},h.setHash=function(e,t){var n,i;return t!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:t}),!1):(h.busy(!0),n=h.extractState(e,!0),n&&!h.emulated.pushState?h.pushState(n.data,n.title,n.url,!1):h.getHash()!==e&&(h.bugs.setHash?(i=h.getPageUrl(),h.pushState(null,null,i+"#"+e,!1)):r.location.hash=e),h)},h.escapeHash=function(t){var n=h.normalizeHash(t);return n=e.encodeURIComponent(n),h.bugs.hashEscape||(n=n.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),n},h.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=h.unescapeHash(t),t},h.setTitle=function(e){var t=e.title,n;t||(n=h.getStateByIndex(0),n&&n.url===e.url&&(t=n.title||h.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","<").replace(">",">").replace(" & "," & ")}catch(i){}return r.title=t,h},h.queues=[],h.busy=function(e){typeof e!="undefined"?h.busy.flag=e:typeof h.busy.flag=="undefined"&&(h.busy.flag=!1);if(!h.busy.flag){u(h.busy.timeout);var t=function(){var e,n,r;if(h.busy.flag)return;for(e=h.queues.length-1;e>=0;--e){n=h.queues[e];if(n.length===0)continue;r=n.shift(),h.fireQueueItem(r),h.busy.timeout=o(t,h.options.busyDelay)}};h.busy.timeout=o(t,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(e){return e.callback.apply(e.scope||h,e.args||[])},h.pushQueue=function(e){return h.queues[e.queue||0]=h.queues[e.queue||0]||[],h.queues[e.queue||0].push(e),h},h.queue=function(e,t){return typeof e=="function"&&(e={callback:e}),typeof t!="undefined"&&(e.queue=t),h.busy()?h.pushQueue(e):h.fireQueueItem(e),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(u(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(e){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=o(function(){return h.doubleCheckClear(),h.stateChanged||e(),!0},h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var t=h.extractState(h.getLocationHref()),n;if(!h.isLastSavedState(t))return n=t,n||(n=h.createStateObject()),h.Adapter.trigger(e,"popstate"),h;return},h.back=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.back(!1)}),p.go(-1),!0)},h.forward=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.forward(!1)}),p.go(1),!0)},h.go=function(e,t){var n;if(e>0)for(n=1;n<=e;++n)h.forward(t);else{if(!(e<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(n=-1;n>=e;--n)h.back(t)}return h};if(h.emulated.pushState){var v=function(){};h.pushState=h.pushState||v,h.replaceState=h.replaceState||v}else h.onPopState=function(t,n){var r=!1,i=!1,s,o;return h.doubleCheckComplete(),s=h.getHash(),s?(o=h.extractState(s||h.getLocationHref(),!0),o?h.replaceState(o.data,o.title,o.url,!1):(h.Adapter.trigger(e,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):(r=h.Adapter.extractEventData("state",t,n)||!1,r?i=h.getStateById(r):h.expectedStateId?i=h.getStateById(h.expectedStateId):i=h.extractState(h.getLocationHref()),i||(i=h.createStateObject(null,null,h.getLocationHref())),h.expectedStateId=!1,h.isLastSavedState(i)?(h.busy(!1),!1):(h.storeState(i),h.saveState(i),h.setTitle(i),h.Adapter.trigger(e,"statechange"),h.busy(!1),!0))},h.Adapter.bind(e,"popstate",h.onPopState),h.pushState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.pushState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0},h.replaceState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.replaceState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0};if(s){try{h.store=l.parse(s.getItem("History.store"))||{}}catch(m){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(e,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(h.getLocationHref(),!0))),s&&(h.onUnload=function(){var e,t,n;try{e=l.parse(s.getItem("History.store"))||{}}catch(r){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in h.idToState){if(!h.idToState.hasOwnProperty(t))continue;e.idToState[t]=h.idToState[t]}for(t in h.urlToId){if(!h.urlToId.hasOwnProperty(t))continue;e.urlToId[t]=h.urlToId[t]}for(t in h.stateToId){if(!h.stateToId.hasOwnProperty(t))continue;e.stateToId[t]=h.stateToId[t]}h.store=e,h.normalizeStore(),n=l.stringify(e);try{s.setItem("History.store",n)}catch(i){if(i.code!==DOMException.QUOTA_EXCEEDED_ERR)throw i;s.length&&(s.removeItem("History.store"),s.setItem("History.store",n))}},h.intervalList.push(a(h.onUnload,h.options.storeInterval)),h.Adapter.bind(e,"beforeunload",h.onUnload),h.Adapter.bind(e,"unload",h.onUnload));if(!h.emulated.pushState){h.bugs.safariPoll&&h.intervalList.push(a(h.safariStatePoll,h.options.safariPollInterval));if(i.vendor==="Apple Computer, Inc."||(i.appCodeName||"")==="Mozilla")h.Adapter.bind(e,"hashchange",function(){h.Adapter.trigger(e,"popstate")}),h.getHash()&&h.Adapter.onDomLoad(function(){h.Adapter.trigger(e,"hashchange")})}},(!h.options||!h.options.delayInit)&&h.init()}(window) \ No newline at end of file diff --git a/src/main/webapp/cm/login/login.xml b/src/main/webapp/cm/login/login.xml new file mode 100644 index 0000000..f2eaa8e --- /dev/null +++ b/src/main/webapp/cm/login/login.xml @@ -0,0 +1,172 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/_footer.xml b/src/main/webapp/cm/main/_footer.xml new file mode 100644 index 0000000..19bb591 --- /dev/null +++ b/src/main/webapp/cm/main/_footer.xml @@ -0,0 +1,53 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/_header.xml b/src/main/webapp/cm/main/_header.xml new file mode 100644 index 0000000..adac5ed --- /dev/null +++ b/src/main/webapp/cm/main/_header.xml @@ -0,0 +1,38 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree01.xml b/src/main/webapp/cm/main/agree01.xml new file mode 100644 index 0000000..79ea925 --- /dev/null +++ b/src/main/webapp/cm/main/agree01.xml @@ -0,0 +1,35 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree01_cont.xml b/src/main/webapp/cm/main/agree01_cont.xml new file mode 100644 index 0000000..0182ecd --- /dev/null +++ b/src/main/webapp/cm/main/agree01_cont.xml @@ -0,0 +1,583 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree02.xml b/src/main/webapp/cm/main/agree02.xml new file mode 100644 index 0000000..9241fc1 --- /dev/null +++ b/src/main/webapp/cm/main/agree02.xml @@ -0,0 +1,594 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 데이터테이블 + + + + + + + + + + + + + 순번 + + col + + + + 구분 + + col + + + + 홈페이지명 + + col + + + + 주소(URL) + + col + + + + 개인정보파일명 + + row + + + + 보유기간 + + row + + + + 비고 + + row + + + + + + + 1 + 대표 + + 서울시&nbsp;바로녹색결제&nbsp;홈페이지 + + + + + + + + 서울시&nbsp;바로녹색결제&nbsp;홈페이지&nbsp;통합회원&nbsp;파일 + + + + 2년 + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 데이터테이블 + + + + + + + + + + 구분 + + col + + + + 부서명 + + col + + + + 성명 + + col + + + + 연락처 + + col + + + + + + + 개인정보&nbsp;보호책임자 + + OOOOO + OOO + + + + + 개인정보&nbsp;보호담당자 + + row + + + + OOOO + + + + OOO + + + + 전화&nbsp;:&nbsp;02-1111-2222 +
+ 이메일&nbsp;:&nbsp;ㅇㅇㅇㅇ@seoul.go.kr +
+ FAX&nbsp;:&nbsp;02-1111-2222 + +
+
+
+
+
+ + + + + + +
+
+
+
+
+ + + diff --git a/src/main/webapp/cm/main/agree02_cont.xml b/src/main/webapp/cm/main/agree02_cont.xml new file mode 100644 index 0000000..2c3d643 --- /dev/null +++ b/src/main/webapp/cm/main/agree02_cont.xml @@ -0,0 +1,293 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 데이터테이블 + + + + + + + + + + 회원구분 + + col + 1 + 2 + + + + 필수항목 + + col + 2 + 1 + + + + 선택항목 + + row + + + + + + 실명인증정보 + + row + + + + 가입정보 + + row + + + + 가입정보 + + row + + + + + + + 내국인 + + 이름,&nbsp;실명인증생년월일,&nbsp;중복가입확인정보(DI) + + 아이디,&nbsp;비밀번호,&nbsp;차랑번호,&nbsp;납부정보(계좌이체,&nbsp;신용카드) + 1 + 2 + + + 모바일전송&nbsp;수신설정 + + 1 + 2 + + + + + + 외국인 + + + + 이름,&nbsp;실명인증생년월일,&nbsp;중복가입확인정보(DI) + + + + + + 기업 + + + + 기업명,&nbsp;사업자등록번호 + + + 아이디,&nbsp;비밀번호,&nbsp;담당자정보,&nbsp;차랑번호,&nbsp;납부정보(계좌이체,&nbsp;신용카드) + 1 + 1 + + + 모바일전송&nbsp;수신설정 + + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 데이터테이블 + + + + + + + + + 수집하는&nbsp;개인정보의&nbsp;항목 + + row + + + + 개인정보의&nbsp;수집,&nbsp;이용&nbsp;목적 + + row + + + + 개인정보의&nbsp;보유&nbsp;및&nbsp;이용기간 + + row + + + + + + + + 아이디,&nbsp;비밀번호,&nbsp;이름(가입자명)&nbsp;생년월일,&nbsp;연락처(휴대폰),&nbsp;기업회원(기업명,&nbsp;사업자등록번호,&nbsp;담당자정보) + + + 홈페이지&nbsp;서비스&nbsp;이용&nbsp;및&nbsp;회원관리,&nbsp;불량회원의&nbsp;부정&nbsp;이용&nbsp;방지,&nbsp;비인가&nbsp;사용방지,&nbsp;민원&nbsp;신청&nbsp;및&nbsp;처리,&nbsp;고지사항&nbsp;전달,&nbsp;게시물&nbsp;등록,&nbsp;자료&nbsp;다운로드,&nbsp;원활한&nbsp;의사소통&nbsp;경로의&nbsp;확보,&nbsp;공공행사&nbsp;및&nbsp;공공서비스&nbsp;이용안내,&nbsp;설문&nbsp;등의&nbsp;목적으로&nbsp;서울시&nbsp;패밀리&nbsp;사이트에서&nbsp;공동&nbsp;이용 + + 1 + 1 + + + + 회원&nbsp;탈퇴시까지(2년마다&nbsp;재동의가&nbsp;요구됨) + + 1 + 2 + + + + + + 모바일전송&nbsp;수신설정 + + + + 고객&nbsp;이용료/과태료&nbsp;고지&nbsp;서비스&nbsp;제공&nbsp;(이&nbsp;정보는&nbsp;선택적&nbsp;기입&nbsp;정보로서&nbsp;고객께서&nbsp;입력하지&nbsp;않으셔도&nbsp;서비스&nbsp;이용&nbsp;제한은&nbsp;없음) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree03_cont.xml b/src/main/webapp/cm/main/agree03_cont.xml new file mode 100644 index 0000000..384c105 --- /dev/null +++ b/src/main/webapp/cm/main/agree03_cont.xml @@ -0,0 +1,64 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree04_cont.xml b/src/main/webapp/cm/main/agree04_cont.xml new file mode 100644 index 0000000..5f5aa2b --- /dev/null +++ b/src/main/webapp/cm/main/agree04_cont.xml @@ -0,0 +1,400 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree05_cont.xml b/src/main/webapp/cm/main/agree05_cont.xml new file mode 100644 index 0000000..0eff852 --- /dev/null +++ b/src/main/webapp/cm/main/agree05_cont.xml @@ -0,0 +1,188 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 데이터테이블 + + + + + + + + 활용대상 + + row + + + + 정보제공기관 + + row + + + + + + + + 국가유공자&nbsp;차량 + + 1 + 3 + + + + 국가보훈처 + + 1 + 3 + + + + + + + + 장애인&nbsp;차량 + + + + 보건복지부 + + + + + + 환경친화적(저공해&nbsp;등)&nbsp;차량 + + + + 한국환경공단 + + + + + + 경차 + + + + 국토교통부 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree3.xml b/src/main/webapp/cm/main/agree3.xml new file mode 100644 index 0000000..d60c5dc --- /dev/null +++ b/src/main/webapp/cm/main/agree3.xml @@ -0,0 +1,33 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree4.xml b/src/main/webapp/cm/main/agree4.xml new file mode 100644 index 0000000..0669a1d --- /dev/null +++ b/src/main/webapp/cm/main/agree4.xml @@ -0,0 +1,33 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree5.xml b/src/main/webapp/cm/main/agree5.xml new file mode 100644 index 0000000..ee810f9 --- /dev/null +++ b/src/main/webapp/cm/main/agree5.xml @@ -0,0 +1,33 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree_cont01.xml b/src/main/webapp/cm/main/agree_cont01.xml new file mode 100644 index 0000000..0608afb --- /dev/null +++ b/src/main/webapp/cm/main/agree_cont01.xml @@ -0,0 +1,70 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree_cont02.xml b/src/main/webapp/cm/main/agree_cont02.xml new file mode 100644 index 0000000..56a2c7b --- /dev/null +++ b/src/main/webapp/cm/main/agree_cont02.xml @@ -0,0 +1,67 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree_cont03.xml b/src/main/webapp/cm/main/agree_cont03.xml new file mode 100644 index 0000000..dac72db --- /dev/null +++ b/src/main/webapp/cm/main/agree_cont03.xml @@ -0,0 +1,67 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree_cont04.xml b/src/main/webapp/cm/main/agree_cont04.xml new file mode 100644 index 0000000..cebe4c0 --- /dev/null +++ b/src/main/webapp/cm/main/agree_cont04.xml @@ -0,0 +1,67 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/agree_cont05.xml b/src/main/webapp/cm/main/agree_cont05.xml new file mode 100644 index 0000000..aa5c31b --- /dev/null +++ b/src/main/webapp/cm/main/agree_cont05.xml @@ -0,0 +1,67 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/cm/main/auth_check.xml b/src/main/webapp/cm/main/auth_check.xml new file mode 100644 index 0000000..8fa0634 --- /dev/null +++ b/src/main/webapp/cm/main/auth_check.xml @@ -0,0 +1,85 @@ + + + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +
+
+
+
+ + diff --git a/src/main/webapp/cm/main/index.xml b/src/main/webapp/cm/main/index.xml new file mode 100644 index 0000000..5a86336 --- /dev/null +++ b/src/main/webapp/cm/main/index.xml @@ -0,0 +1,485 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/resource/common/error.jsp b/src/main/webapp/resource/common/error.jsp new file mode 100644 index 0000000..8e208a2 --- /dev/null +++ b/src/main/webapp/resource/common/error.jsp @@ -0,0 +1,22 @@ +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + + +ERROR + + + + + + +
+ + + +
오류발생 알림화면(허용되지 않는 요청을 하셨습니다)
+ + \ No newline at end of file diff --git a/src/main/webapp/resource/js/common/common.js b/src/main/webapp/resource/js/common/common.js new file mode 100644 index 0000000..654360c --- /dev/null +++ b/src/main/webapp/resource/js/common/common.js @@ -0,0 +1,116 @@ +function errorHandler(res) { + //console.log("errorHandler"); + var resJSON = JSON.stringify(res); + console.log(res); + console.log(res.rsMsg); + /*if(res.rsMsg != undefined){ + if(res.rsMsg.statusCode == 'W'){ + alert(res.rsMsg.message); + $w.url("/cm/main/auth_check.xml"); + return true; + } + }*/ + + /*$w.url("/cm/main/auth_check.xml"); + return true;*/ + + /*if(res.rsMsg.errorCode == 'E0001'){ + $w.url("/cm/main/auth_check.xml"); + return true; + } + if(res.isLogin == false){ // 유효하지 않은 접근이라면 + $w.url("/cm/login/login.xml"); + return true; + } +*/ +} + +function sendAjax(url, tempData, beforeSend, callBackSuccess, error, header){ + var options = {}; + options.action = url; + options.mode = "synchronous"; + options.mediatype = "application/json"; + options.method = "POST"; + options.requestData = JSON.stringify(tempData); + options.requestHeader = JSON.stringify(header); + //options.timeout = 100000; + options.beforeAjax = beforeSend; + options.success = callBackSuccess; //정의 된 function 객체 + options.error = error; + + $p.ajax(options); +} +/* +function sendAjax(url, tempData, beforeSend, callBackSuccess, error, header) { + //var tempData = {id:'user1',pw:'user1',tempCarInfos:[{vhcleManageNo:'BRSC1555294116901',vhclePosesnTy:'003',vhcleNo:'11가1111',vhcleSttusTy:'Y',setleAgreTy:'Y'}]}; + $w.ajax({ + action: url, + mode: "synchronous", + mediatype: "application/json", + method: "post", + requestData: JSON.stringify(tempData), + type: "xml", + beforeSend: beforeSend, + success: callBackSuccess, + error: error, + requestHeader: header + }); +}*/ + +function beforeSend() { + console.log('beforeSend'); +} + +function callBackSuccess(data) { + console.log(data); + //e는 웹스퀘어 엔진에서 통신 후 결과를 담을 JSON 객체이다. + //e.resourceUri - 통신 URI 반환 + //e.responseHeaders - Response Headers 내용 반환 + //e.responseStatusCode - Response Status Code 반환 + //e.responseReasonPhrase - Response Status Text 반환 + //e.responseBody - Response Data를 XML 데이터로 parse 한 XML 객체 반환.( Response Content-Type이 JSON 인 경우 json객체를 XML로 parse) + //e.responseText - Response Data 원본으로 String 형태 반환 + + //responseText를 alert으로 출력. + //alert("success\n"+e.responseText); +} + +function error(e) { + console.log(e); +} + + + +var authTimer; +var smsVerifyBool = false; + +function $ComTimer() { + +} + +$ComTimer.prototype = { + comSecond: "" + , fnCallback: function () { + } + , timer: "" + , domId: "" + , fnTimer: function () { + var m = Math.floor(this.comSecond / 60) + "분 " + (this.comSecond % 60) + "초"; // 남은 시간 계산 + this.comSecond--; // 1초씩 감소 + console.log(m); + this.domId.innerText = m; + if (this.comSecond < 0) { // 시간이 종료 되었으면.. + clearInterval(this.timer); // 타이머 해제 + alert("인증시간이 초과하였습니다. 다시 인증해주시기 바랍니다.") + } + } + , fnStop: function () { + this.comSecond = 180; + var m = Math.floor(this.comSecond / 60) + "분 " + (this.comSecond % 60) + "초"; // 남은 시간 계산 + this.domId.innerText = m; + clearInterval(this.timer); + } +} + + +//history.replaceState({}, null, location.pathname); \ No newline at end of file diff --git a/src/main/webapp/ui/manager/anpr_list.xml b/src/main/webapp/ui/manager/anpr_list.xml new file mode 100644 index 0000000..c062c06 --- /dev/null +++ b/src/main/webapp/ui/manager/anpr_list.xml @@ -0,0 +1,208 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/ui/manager/anpr_view.xml b/src/main/webapp/ui/manager/anpr_view.xml new file mode 100644 index 0000000..02d25ac --- /dev/null +++ b/src/main/webapp/ui/manager/anpr_view.xml @@ -0,0 +1,329 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ID + + row + + + + + + + + + 지점 + + row + + + + + + + + + CCTV명 + + row + + + + + + + + + 유형 + + row + + + + + + + + + + 모델명 + + row + + + + + + + + + + 제조사 + + row + + + + + + + + + + 화소수 + + row + + + + + + + + + + URL + + row + + + + + + + + + + 접속ID + + row + + + + + + + + + + IP주소 + + row + + + + + + + + + + 접속비밀번호 + + row + + + + + + + + + + 접속포트 + + row + + + + + + + + + + 설치일자 + + row + + + + + + + + + + 사용여부 + + row + + + + + + + + + + NVR&nbsp;ID + + row + + + + + + + + + + 비고 + + row + + + + + + + + + + + + + diff --git a/src/main/webapp/ui/manager/cctv_list.xml b/src/main/webapp/ui/manager/cctv_list.xml new file mode 100644 index 0000000..aef1bdb --- /dev/null +++ b/src/main/webapp/ui/manager/cctv_list.xml @@ -0,0 +1,210 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/ui/manager/cctv_view.xml b/src/main/webapp/ui/manager/cctv_view.xml new file mode 100644 index 0000000..d591d9f --- /dev/null +++ b/src/main/webapp/ui/manager/cctv_view.xml @@ -0,0 +1,331 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ID + + row + + + + + + + + + 지점 + + row + + + + + + + + + CCTV명 + + row + + + + + + + + + 유형 + + row + + + + + + + + + + 모델명 + + row + + + + + + + + + + 제조사 + + row + + + + + + + + + + 화소수 + + row + + + + + + + + + + URL + + row + + + + + + + + + + 접속ID + + row + + + + + + + + + + IP주소 + + row + + + + + + + + + + 접속비밀번호 + + row + + + + + + + + + + 접속포트 + + row + + + + + + + + + + 설치일자 + + row + + + + + + + + + + 사용여부 + + row + + + + + + + + + + NVR&nbsp;ID + + row + + + + + + + + + + 비고 + + row + + + + + + + + + + + + + diff --git a/src/main/webapp/ui/manager/cctv_vms_main.xml b/src/main/webapp/ui/manager/cctv_vms_main.xml new file mode 100644 index 0000000..fe87cda --- /dev/null +++ b/src/main/webapp/ui/manager/cctv_vms_main.xml @@ -0,0 +1,307 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/ui/manager/error_action_memo_save.xml b/src/main/webapp/ui/manager/error_action_memo_save.xml new file mode 100644 index 0000000..1d1f89d --- /dev/null +++ b/src/main/webapp/ui/manager/error_action_memo_save.xml @@ -0,0 +1,775 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 장애구분 + + row + + + + + + + + + 장비명/ID + + row + + + + + + + + + + 장애유형 + + row + + + + + + + + + + 장애일시 + + row + + + + + + + + + *&nbsp;장애내용 + + row + + + + + + + + + *&nbsp;처리내용 + + row + + + + + + + + + + 비고 + + row + + + + + + + + + + 장애접수일시 + + row + + + + + + + + + + *&nbsp;조치예정일 + + row + + + + + + + + + + + *&nbsp;조치완료일 + + row + + + + + + + + + + *&nbsp;조치업체명 + + row + + + + + + + + + *&nbsp;조치자명 + + row + + + + + + + + + *&nbsp;조치자전화번호 + + row + + + + + + + + + *&nbsp;조치상태 + + row + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 전원관리 + + row + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/ui/manager/vms_list.xml b/src/main/webapp/ui/manager/vms_list.xml new file mode 100644 index 0000000..46c4671 --- /dev/null +++ b/src/main/webapp/ui/manager/vms_list.xml @@ -0,0 +1,202 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/ui/manager/vms_view.xml b/src/main/webapp/ui/manager/vms_view.xml new file mode 100644 index 0000000..2fc0b73 --- /dev/null +++ b/src/main/webapp/ui/manager/vms_view.xml @@ -0,0 +1,333 @@ + + + + DEFAULT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ID + + row + + + + + + + + + 지점 + + row + + + + + + + + 구분 + row + + + + + + + 화면유형 + row + + + + + + + + 장비종류 + row + + + + + + + + 설치유형 + row + + + + + + + + 화면구성&nbsp;행 + row + + + + + + + + 화면구성&nbsp;열 + row + + + + + + + + 모듈규격 + row + + + + + + + + 모듈사이트 + row + + + + + + + + 설치위치구분 + row + + + + + + + + VMS명 + row + + + + + + + + 제작사 + row + + + + + + + + 사용용도 + row + + + + + + + + 제어PC&nbsp;OS + row + + + + + + + + 제어PC&nbsp;CPU + row + + + + + + + + 제어PC&nbsp;메모리 + row + + + + + + + + IP주소 + row + + + + + + + + 사용여부 + row + + + + + + + + 비고 + row + + + + + + + + + + + + diff --git a/src/main/webapp/websquare/blank.html b/src/main/webapp/websquare/blank.html new file mode 100644 index 0000000..d6d78ae --- /dev/null +++ b/src/main/webapp/websquare/blank.html @@ -0,0 +1,10 @@ + + + + + +blank + + + + \ No newline at end of file diff --git a/src/main/webapp/websquare/blank.xml b/src/main/webapp/websquare/blank.xml new file mode 100644 index 0000000..375271e --- /dev/null +++ b/src/main/webapp/websquare/blank.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/websquare/config.js b/src/main/webapp/websquare/config.js new file mode 100644 index 0000000..23f5b99 --- /dev/null +++ b/src/main/webapp/websquare/config.js @@ -0,0 +1,292 @@ +{ + "WebSquare": { + "docType": { + "@value": "quirk" + }, + "debug": { + "@value": "true", + "@remoteConsole": "false" + }, + "debugKey": { + "@value": "" + }, + "language": { + "@value": "ko" + }, + "exceptionHandler": { + "@value": "websquare" + }, + "debugMenu": { + "@value": "use" + }, + "welcome-file": {}, + "forcedValueSetting": { + "@value": "true" + }, + "processMsgHeight": { + "@value": "80" + }, + "processMsgWidth": { + "@value": "180" + }, + "processMsgBackground": { + "@value": "true", + "@backgroundColor": "#112233" + }, + "byteCheckEncoding": { + "@value": "euc-kr" + }, + "initScript": { + "@value": "false" + }, + "clearMemory": { + "@value": "false" + }, + "stylesheet": { + "@value": "stylesheet.css" + }, + "engine": {}, + "ModelUtil": { + "copyChildrenNodes": { + "@refresh": "false" + } + }, + "preProcessor": {}, + "submission": { + "processMsg": { + "@value": "" + }, + "showSubmissionTime": { + "@value": "true" + }, + "preSubmitFunction": { + "@value": "presubmit" + }, + "callbackSubmitFunction": { + "@value": "" + }, + "requestID": { + "@value": "" + } + }, + "visibleHelper": { + "targetHandler": { + "@value": "" + } + }, + "engineCache": { + "@compression": "true", + "@enable": "false", + "@postfix": "month" + }, + "environment": { + "@mode": "production", + "@cache": "nocache", + "@postfix": "day" + }, + "engineLoadingMode": { + "@ie": "0", + "@moz": "0", + "@opera": "0", + "@android": "0", + "@iphone": "0", + "@chrome": "0", + "@safari": "0" + }, + "grid": { + "fastScroll": { + "@value": "true" + }, + "dataType": { + "date": { + "@displayFormat": "yyyy-MM-dd" + } + }, + "editType": { + "@value": "focus" + }, + "rowNumBackgroundColor": { + "@value": "#e5eff7" + }, + "selectedRowColor": { + "@value": "#ffebd1" + }, + "oddEvenColorDisplay": { + "@value": "true" + }, + "evenRowBackgroundColor": { + "@value": "#f1f7fe" + }, + "oddRowBackgroundColor": { + "@value": "#ffffff" + }, + "rowMouseOver": { + "@value": "true" + }, + "rowMouseOverColor": { + "@value": "#cce2ff" + }, + "tooltipStyle": { + "@value": "padding-left:5px; padding-right:5px; font-size:11px; border:2px solid #FCA73C; background-color:#FFF7D1;" + }, + "noResultMessageVisible": { + "@value": "true" + }, + "noResultMessage": { + "@value": "데이터가 없음" + }, + "noResultMessageStyle": { + "@value": "position:absolute; left:30%; width:40%; top:40%; border:2px solid #7BAFE4; color:#000000; font-size:12px; padding-top:5px; text-align:center;" + }, + "column": [{ + "@inputType": "text", + "editType": { + "@value": "select" + } + }, { + "@inputType": "select", + "chooseOptionLabel": { + "@value": "-선택-" + } + }, { + "@inputType": "calendar", + "dataType": { + "@value": "date" + }, + "displayFormat": { + "@value": "yyyy-MM-dd" + } + }] + }, + "gridView": { + "fastScroll": { + "@value": "true" + }, + "dataType": { + "date": { + "@displayFormat": "yyyy-MM-dd" + } + }, + "editType": { + "@value": "focus" + }, + "rowNumBackgroundColor": { + "@value": "#e5eff7" + }, + "selectedRowColor": { + "@value": "#ffebd1" + }, + "oddEvenColorDisplay": { + "@value": "true" + }, + "evenRowBackgroundColor": { + "@value": "#f1f7fe" + }, + "oddRowBackgroundColor": { + "@value": "#ffffff" + }, + "rowMouseOver": { + "@value": "true" + }, + "rowMouseOverColor": { + "@value": "#cce2ff" + }, + "tooltipStyle": { + "@value": "padding-left:5px; padding-right:5px; font-size:11px; border:2px solid #FCA73C; background-color:#FFF7D1;" + }, + "noResultMessageVisible": { + "@value": "true" + }, + "noResultMessage": { + "@value": "데이터가 없음" + }, + "noResultMessageStyle": { + "@value": "position:absolute; left:30%; width:40%; top:40%; border:2px solid #7BAFE4; color:#000000; font-size:12px; padding-top:5px; text-align:center;" + }, + "column": [{ + "@inputType": "text", + "editType": { + "@value": "select" + } + }, { + "@inputType": "select", + "chooseOptionLabel": { + "@value": "-선택-" + } + }, { + "@inputType": "calendar", + "dataType": { + "@value": "date" + }, + "displayFormat": { + "@value": "yyyy-MM-dd" + } + }] + }, + "inputCalendar": { + "validCheck": { + "@value": "false" + }, + "dataType": { + "@value": "date" + }, + "delimiter": { + "@value": "-" + }, + "mask": { + "@value": "MM-dd-yyyy" + }, + "delimiterLocaleKey": { + "@value": "IC_Delimiter" + }, + "maskLocaleKey": { + "@value": "IC_Mask" + } + }, + "input": { + "focusStyle": { + "@value": "" + }, + "dateMask": { + "@value": "yyyy-MM-dd" + }, + "timeMask": { + "@value": "HH:mm" + } + }, + "calendar": { + "minYear": { + "@value": "1978" + }, + "maxYear": { + "@value": "2030" + } + }, + "selectbox": { + "visibleRowNum": { + "@value": "5" + } + }, + "body": { + "toolTipSec": { + "@value": "1" + } + }, + "languagePack": { + "@useLanguagePack": "false", + "url": [{ + "@lang": "ko", + "@value": "/langpack/ko.js" + }, { + "@lang": "en", + "@value": "/langpack/en.js" + }, { + "@lang": "ch", + "@value": "/langpack/ch.js" + }] + }, + "license": { + "@value": "false" + } + } +} \ No newline at end of file diff --git a/src/main/webapp/websquare/config.xml b/src/main/webapp/websquare/config.xml new file mode 100644 index 0000000..e5e0934 --- /dev/null +++ b/src/main/webapp/websquare/config.xml @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/websquare/devicePreview.html b/src/main/webapp/websquare/devicePreview.html new file mode 100644 index 0000000..4d8d5fe --- /dev/null +++ b/src/main/webapp/websquare/devicePreview.html @@ -0,0 +1,121 @@ + + + + WebSquare Device Preview + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+ + diff --git a/src/main/webapp/websquare/engine/servlet/advancedMultiUpload.jsp b/src/main/webapp/websquare/engine/servlet/advancedMultiUpload.jsp new file mode 100644 index 0000000..d6dcf16 --- /dev/null +++ b/src/main/webapp/websquare/engine/servlet/advancedMultiUpload.jsp @@ -0,0 +1,555 @@ +<%@ page contentType="text/html; charset=UTF-8" language="java" errorPage="" %><% +String ref = request.getHeader("referer"); +String param = request.getParameter("gridID"); +if(ref == null || ref.equals("") || param == null || param.equals("")) { + response.setStatus(HttpServletResponse.SC_NOT_FOUND); + return; +} +// 사용자 세션 정보를 이용한 접근제거 필요한 경우 아래 추가 + +%> + + + + + + +FILE UPLOAD + + + + + + +

+
+
+

File Upload

+
+
+
+ +
+
+ +
+

+ +
+ +
+ + +
+ + \ No newline at end of file diff --git a/src/main/webapp/websquare/engine/servlet/advancedfileUpload.jsp b/src/main/webapp/websquare/engine/servlet/advancedfileUpload.jsp new file mode 100644 index 0000000..b3f0a93 --- /dev/null +++ b/src/main/webapp/websquare/engine/servlet/advancedfileUpload.jsp @@ -0,0 +1,873 @@ +<%@ page contentType="text/html; charset=UTF-8" language="java" errorPage="" %><% +String ref = request.getHeader("referer"); +String param = request.getParameter("gridID"); +if(ref == null || ref.equals("") || param == null || param.equals("")) { + response.setStatus(HttpServletResponse.SC_NOT_FOUND); + return; +} +// 사용자 세션 정보를 이용한 접근제거 필요한 경우 아래 추가 + +%> + + + + + + +FILE UPLOAD + + + + + + +
+ +
+
+

File Upload

+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
파일 업로드 고급설정
+ + + +
+ + +
+ +
+ + + +
+
+ +
+

+ +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ + + \ No newline at end of file diff --git a/src/main/webapp/websquare/engine/servlet/csvfileUpload.jsp b/src/main/webapp/websquare/engine/servlet/csvfileUpload.jsp new file mode 100644 index 0000000..1048c67 --- /dev/null +++ b/src/main/webapp/websquare/engine/servlet/csvfileUpload.jsp @@ -0,0 +1,662 @@ +<%@ page contentType="text/html; charset=UTF-8" language="java" errorPage="" %><% +String ref = request.getHeader("referer"); +String param = request.getParameter("gridID"); +if(ref == null || ref.equals("") || param == null || param.equals("")) { + response.setStatus(HttpServletResponse.SC_NOT_FOUND); + return; +} +// 사용자 세션 정보를 이용한 접근제거 필요한 경우 아래 추가 + +%> + + + + + + +FILE UPLOAD + + + + + + +
+ +
+
+

File Upload

+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + +
파일 업로드 고급설정
+ + + + +
+ + + +
+ +
+
+ +
+

+ +
+ +
+ + + + + + + + + + + + + + +
+ + + \ No newline at end of file diff --git a/src/main/webapp/websquare/engine/servlet/fileUpload.jsp b/src/main/webapp/websquare/engine/servlet/fileUpload.jsp new file mode 100644 index 0000000..dd5c9ed --- /dev/null +++ b/src/main/webapp/websquare/engine/servlet/fileUpload.jsp @@ -0,0 +1,186 @@ +<%@ page contentType="text/html; charset=UTF-8" language="java" errorPage="" %><% +String ref = request.getHeader("referer"); +String param = request.getParameter("gridID"); +if(ref == null || ref.equals("") || param == null || param.equals("")) { + response.setStatus(HttpServletResponse.SC_NOT_FOUND); + return; +} +// 사용자 세션 정보를 이용한 접근제거 필요한 경우 아래 추가 + +%> + + + + + + +FILE UPLOAD + + + + + +
+ + + + + + + + + +
+ +
+ 옵션: + + +
+ + + + + + + + + + + +
+ + \ No newline at end of file diff --git a/src/main/webapp/websquare/engine/system/image/llsh.gif b/src/main/webapp/websquare/engine/system/image/llsh.gif new file mode 100644 index 0000000..5e33db4 Binary files /dev/null and b/src/main/webapp/websquare/engine/system/image/llsh.gif differ diff --git a/src/main/webapp/websquare/engine/system/image/logo.png b/src/main/webapp/websquare/engine/system/image/logo.png new file mode 100644 index 0000000..b27501a Binary files /dev/null and b/src/main/webapp/websquare/engine/system/image/logo.png differ diff --git a/src/main/webapp/websquare/engine/system/image/teaser.gif b/src/main/webapp/websquare/engine/system/image/teaser.gif new file mode 100644 index 0000000..e1b9825 Binary files /dev/null and b/src/main/webapp/websquare/engine/system/image/teaser.gif differ diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/aes-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/aes-min.js new file mode 100644 index 0000000..8b34064 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/aes-min.js @@ -0,0 +1,10 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){for(var q=CryptoJS,x=q.lib.BlockCipher,r=q.algo,j=[],y=[],z=[],A=[],B=[],C=[],s=[],u=[],v=[],w=[],g=[],k=0;256>k;k++)g[k]=128>k?k<<1:k<<1^283;for(var n=0,l=0,k=0;256>k;k++){var f=l^l<<1^l<<2^l<<3^l<<4,f=f>>>8^f&255^99;j[n]=f;y[f]=n;var t=g[n],D=g[t],E=g[D],b=257*g[f]^16843008*f;z[n]=b<<24|b>>>8;A[n]=b<<16|b>>>16;B[n]=b<<8|b>>>24;C[n]=b;b=16843009*E^65537*D^257*t^16843008*n;s[f]=b<<24|b>>>8;u[f]=b<<16|b>>>16;v[f]=b<<8|b>>>24;w[f]=b;n?(n=t^g[g[g[E^t]]],l^=g[g[l]]):n=l=1}var F=[0,1,2,4,8, +16,32,64,128,27,54],r=r.AES=x.extend({_doReset:function(){for(var c=this._key,e=c.words,a=c.sigBytes/4,c=4*((this._nRounds=a+6)+1),b=this._keySchedule=[],h=0;h>>24]<<24|j[d>>>16&255]<<16|j[d>>>8&255]<<8|j[d&255]):(d=d<<8|d>>>24,d=j[d>>>24]<<24|j[d>>>16&255]<<16|j[d>>>8&255]<<8|j[d&255],d^=F[h/a|0]<<24);b[h]=b[h-a]^d}e=this._invKeySchedule=[];for(a=0;aa||4>=h?d:s[j[d>>>24]]^u[j[d>>>16&255]]^v[j[d>>> +8&255]]^w[j[d&255]]},encryptBlock:function(c,e){this._doCryptBlock(c,e,this._keySchedule,z,A,B,C,j)},decryptBlock:function(c,e){var a=c[e+1];c[e+1]=c[e+3];c[e+3]=a;this._doCryptBlock(c,e,this._invKeySchedule,s,u,v,w,y);a=c[e+1];c[e+1]=c[e+3];c[e+3]=a},_doCryptBlock:function(c,e,a,b,h,d,j,m){for(var n=this._nRounds,f=c[e]^a[0],g=c[e+1]^a[1],k=c[e+2]^a[2],p=c[e+3]^a[3],l=4,t=1;t>>24]^h[g>>>16&255]^d[k>>>8&255]^j[p&255]^a[l++],r=b[g>>>24]^h[k>>>16&255]^d[p>>>8&255]^j[f&255]^a[l++],s= +b[k>>>24]^h[p>>>16&255]^d[f>>>8&255]^j[g&255]^a[l++],p=b[p>>>24]^h[f>>>16&255]^d[g>>>8&255]^j[k&255]^a[l++],f=q,g=r,k=s;q=(m[f>>>24]<<24|m[g>>>16&255]<<16|m[k>>>8&255]<<8|m[p&255])^a[l++];r=(m[g>>>24]<<24|m[k>>>16&255]<<16|m[p>>>8&255]<<8|m[f&255])^a[l++];s=(m[k>>>24]<<24|m[p>>>16&255]<<16|m[f>>>8&255]<<8|m[g&255])^a[l++];p=(m[p>>>24]<<24|m[f>>>16&255]<<16|m[g>>>8&255]<<8|m[k&255])^a[l++];c[e]=q;c[e+1]=r;c[e+2]=s;c[e+3]=p},keySize:8});q.AES=x._createHelper(r)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/aes.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/aes.js new file mode 100644 index 0000000..7ba1054 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/aes.js @@ -0,0 +1,213 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } + + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; + + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; + + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6 + + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; + + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + var t = keySchedule[ksRow - 1]; + + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); + + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } + + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, + + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; + + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; + + // Key schedule row counter + var ksRow = 4; + + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + + keySize: 256/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/cipher-core-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/cipher-core-min.js new file mode 100644 index 0000000..917939c --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/cipher-core-min.js @@ -0,0 +1,14 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.lib.Cipher||function(u){var g=CryptoJS,f=g.lib,k=f.Base,l=f.WordArray,q=f.BufferedBlockAlgorithm,r=g.enc.Base64,v=g.algo.EvpKDF,n=f.Cipher=q.extend({cfg:k.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c);this._xformMode=a;this._key=b;this.reset()},reset:function(){q.reset.call(this);this._doReset()},process:function(a){this._append(a); +return this._process()},finalize:function(a){a&&this._append(a);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(a){return{encrypt:function(b,c,d){return("string"==typeof c?s:j).encrypt(a,b,c,d)},decrypt:function(b,c,d){return("string"==typeof c?s:j).decrypt(a,b,c,d)}}}});f.StreamCipher=n.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var m=g.mode={},t=function(a,b,c){var d=this._iv;d?this._iv=u:d=this._prevBlock;for(var e= +0;e>>2]&255}};f.BlockCipher=n.extend({cfg:n.cfg.extend({mode:m,padding:h}),reset:function(){n.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1; +this._mode=c.call(a,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var p=f.CipherParams=k.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),m=(g.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt; +return(a?l.create([1398893684,1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=l.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return p.create({ciphertext:a,salt:c})}},j=f.SerializableCipher=k.extend({cfg:k.extend({format:m}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return p.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding, +blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),g=(g.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=l.random(8));a=v.create({keySize:b+c}).compute(a,d);c=l.create(a.words.slice(b),4*c);a.sigBytes=4*b;return p.create({key:a,iv:c,salt:d})}},s=f.PasswordBasedCipher=j.extend({cfg:j.cfg.extend({kdf:g}),encrypt:function(a, +b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=c.iv;a=j.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=c.iv;return j.decrypt.call(this,a,b,c.key,d)}})}(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/cipher-core.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/cipher-core.js new file mode 100644 index 0000000..2ec8eb5 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/cipher-core.js @@ -0,0 +1,863 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** + * Cipher core components. + */ +CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; + + // Set initial values + this.reset(); + }, + + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-cipher logic + this._doReset(); + }, + + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); + + // Process available blocks + return this._process(); + }, + + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } + + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); + + return finalProcessedData; + }, + + keySize: 128/32, + + ivSize: 128/32, + + _ENC_XFORM_MODE: 1, + + _DEC_XFORM_MODE: 2, + + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); + + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); + + return finalProcessedBlocks; + }, + + blockSize: 1 + }); + + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); + + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function xorBlock(words, offset, blockSize) { + // Shortcut + var iv = this._iv; + + // Choose mixing block + if (iv) { + var block = iv; + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var block = this._prevBlock; + } + + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } + + return CBC; + }()); + + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; + + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + + // Add padding + data.concat(padding); + }, + + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + + reset: function () { + // Reset cipher + Cipher.reset.call(this); + + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + var modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + var modeCreator = mode.createDecryptor; + + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + this._mode = modeCreator.call(mode, this, iv && iv.words); + }, + + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, + + _doFinalize: function () { + // Shortcut + var padding = this.cfg.padding; + + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + + // Unpad data + padding.unpad(finalProcessedBlocks); + } + + return finalProcessedBlocks; + }, + + blockSize: 128/32 + }); + + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, + + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + + /** + * Format namespace. + */ + var C_format = C.format = {}; + + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + + // Format + if (salt) { + var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + var wordArray = ciphertext; + } + + return wordArray.toString(Base64); + }, + + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); + + // Shortcut + var ciphertextWords = ciphertext.words; + + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + var salt = WordArray.create(ciphertextWords.slice(2, 4)); + + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; + + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + + // Shortcut + var cipherCfg = encryptor.cfg; + + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + + return plaintext; + }, + + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; + + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + + // Derive key and IV + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; + + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + + // Mix in derived params + ciphertext.mixIn(derivedParams); + + return ciphertext; + }, + + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/core-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/core-min.js new file mode 100644 index 0000000..3f191b4 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/core-min.js @@ -0,0 +1,13 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(h,r){var k={},l=k.lib={},n=function(){},f=l.Base={extend:function(a){n.prototype=this;var b=new n;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +j=l.WordArray=f.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=r?b:4*a.length},toString:function(a){return(a||s).stringify(this)},concat:function(a){var b=this.words,d=a.words,c=this.sigBytes;a=a.sigBytes;this.clamp();if(c%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((c+e)%4);else if(65535>>2]=d[e>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< +32-8*(b%4);a.length=h.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],d=0;d>>2]>>>24-8*(c%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>3]|=parseInt(a.substr(c, +2),16)<<24-4*(c%8);return new j.init(d,b/2)}},p=m.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new j.init(d,b)}},t=m.Utf8={stringify:function(a){try{return decodeURIComponent(escape(p.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return p.parse(unescape(encodeURIComponent(a)))}}, +q=l.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new j.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=t.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,c=b.sigBytes,e=this.blockSize,f=c/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;c=h.min(4*a,c);if(a){for(var g=0;g>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else if (thatWords.length > 0xffff) { + // Copy one word at a time + for (var i = 0; i < thatSigBytes; i += 4) { + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + } + } else { + // Copy all words at once + thisWords.push.apply(thisWords, thatWords); + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + for (var i = 0; i < nBytes; i += 4) { + words.push((Math.random() * 0x100000000) | 0); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + var processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; +}(Math)); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/enc-base64-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/enc-base64-min.js new file mode 100644 index 0000000..7ab054d --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/enc-base64-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var h=CryptoJS,j=h.lib.WordArray;h.enc.Base64={stringify:function(b){var e=b.words,f=b.sigBytes,c=this._map;b.clamp();b=[];for(var a=0;a>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d< +e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/enc-base64.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/enc-base64.js new file mode 100644 index 0000000..739f4a8 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/enc-base64.js @@ -0,0 +1,109 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex != -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = map.indexOf(base64Str.charAt(i - 1)) << ((i % 4) * 2); + var bits2 = map.indexOf(base64Str.charAt(i)) >>> (6 - (i % 4) * 2); + words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + + return WordArray.create(words, nBytes); + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/enc-utf16-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/enc-utf16-min.js new file mode 100644 index 0000000..b84d401 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/enc-utf16-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var e=CryptoJS,f=e.lib.WordArray,e=e.enc;e.Utf16=e.Utf16BE={stringify:function(b){var d=b.words;b=b.sigBytes;for(var c=[],a=0;a>>2]>>>16-8*(a%4)&65535));return c.join("")},parse:function(b){for(var d=b.length,c=[],a=0;a>>1]|=b.charCodeAt(a)<<16-16*(a%2);return f.create(c,2*d)}};e.Utf16LE={stringify:function(b){var d=b.words;b=b.sigBytes;for(var c=[],a=0;a>>2]>>>16-8*(a%4)&65535)<<8&4278255360|(d[a>>> +2]>>>16-8*(a%4)&65535)>>>8&16711935));return c.join("")},parse:function(b){for(var d=b.length,c=[],a=0;a>>1,j=e[g],h=b.charCodeAt(a)<<16-16*(a%2);e[g]=j|h<<8&4278255360|h>>>8&16711935}return f.create(c,2*d)}}})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/enc-utf16.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/enc-utf16.js new file mode 100644 index 0000000..295d24e --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/enc-utf16.js @@ -0,0 +1,135 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * UTF-16 BE encoding strategy. + */ + var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { + /** + * Converts a word array to a UTF-16 BE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 BE string. + * + * @static + * + * @example + * + * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 BE string to a word array. + * + * @param {string} utf16Str The UTF-16 BE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + /** + * UTF-16 LE encoding strategy. + */ + C_enc.Utf16LE = { + /** + * Converts a word array to a UTF-16 LE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 LE string. + * + * @static + * + * @example + * + * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 LE string to a word array. + * + * @param {string} utf16Str The UTF-16 LE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + function swapEndian(word) { + return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); + } +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/evpkdf-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/evpkdf-min.js new file mode 100644 index 0000000..6c914b6 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/evpkdf-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var b=CryptoJS,a=b.lib,f=a.Base,k=a.WordArray,a=b.algo,l=a.EvpKDF=f.extend({cfg:f.extend({keySize:4,hasher:a.MD5,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),g=k.create(),f=g.words,h=c.keySize,c=c.iterations;f.lengthe&&(b=a.finalize(b));b.clamp();for(var f=this._oKey=b.clone(),g=this._iKey=b.clone(),h=f.words,j=g.words,d=0;d hasherBlockSizeBytes) { + key = hasher.finalize(key); + } + + // Clamp excess bits + key.clamp(); + + // Clone key for inner and outer pads + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); + + // Shortcuts + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + + // XOR keys with pad constants + for (var i = 0; i < hasherBlockSize; i++) { + oKeyWords[i] ^= 0x5c5c5c5c; + iKeyWords[i] ^= 0x36363636; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + + // Set initial values + this.reset(); + }, + + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function () { + // Shortcut + var hasher = this._hasher; + + // Reset + hasher.reset(); + hasher.update(this._iKey); + }, + + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function (messageUpdate) { + this._hasher.update(messageUpdate); + + // Chainable + return this; + }, + + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Shortcut + var hasher = this._hasher; + + // Compute HMAC + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + + return hmac; + } + }); +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/lib-typedarrays-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/lib-typedarrays-min.js new file mode 100644 index 0000000..7eee4b2 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/lib-typedarrays-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){if("function"==typeof ArrayBuffer){var b=CryptoJS.lib.WordArray,e=b.init;(b.init=function(a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));if(a instanceof Int8Array||a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);if(a instanceof Uint8Array){for(var b=a.byteLength,d=[],c=0;c>>2]|=a[c]<< +24-8*(c%4);e.call(this,d,b)}else e.apply(this,arguments)}).prototype=b}})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/lib-typedarrays.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/lib-typedarrays.js new file mode 100644 index 0000000..f83758b --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/lib-typedarrays.js @@ -0,0 +1,62 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Check if typed arrays are supported + if (typeof ArrayBuffer != 'function') { + return; + } + + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + + // Reference original home + var superInit = WordArray.init; + + // Augment WordArray.home to handle typed arrays + var subInit = WordArray.init = function (typedArray) { + // Convert buffers to uint8 + if (typedArray instanceof ArrayBuffer) { + typedArray = new Uint8Array(typedArray); + } + + // Convert other array views to uint8 + if ( + typedArray instanceof Int8Array || + typedArray instanceof Uint8ClampedArray || + typedArray instanceof Int16Array || + typedArray instanceof Uint16Array || + typedArray instanceof Int32Array || + typedArray instanceof Uint32Array || + typedArray instanceof Float32Array || + typedArray instanceof Float64Array + ) { + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + } + + // Handle Uint8Array + if (typedArray instanceof Uint8Array) { + // Shortcut + var typedArrayByteLength = typedArray.byteLength; + + // Extract bytes + var words = []; + for (var i = 0; i < typedArrayByteLength; i++) { + words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); + } + + // Initialize this word array + superInit.call(this, words, typedArrayByteLength); + } else { + // Else call normal home + superInit.apply(this, arguments); + } + }; + + subInit.prototype = WordArray; +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/md5-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/md5-min.js new file mode 100644 index 0000000..ac725fc --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/md5-min.js @@ -0,0 +1,12 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(E){function h(a,f,g,j,p,h,k){a=a+(f&g|~f&j)+p+k;return(a<>>32-h)+f}function k(a,f,g,j,p,h,k){a=a+(f&j|g&~j)+p+k;return(a<>>32-h)+f}function l(a,f,g,j,h,k,l){a=a+(f^g^j)+h+l;return(a<>>32-k)+f}function n(a,f,g,j,h,k,l){a=a+(g^(f|~j))+h+l;return(a<>>32-k)+f}for(var r=CryptoJS,q=r.lib,F=q.WordArray,s=q.Hasher,q=r.algo,a=[],t=0;64>t;t++)a[t]=4294967296*E.abs(E.sin(t+1))|0;q=q.MD5=s.extend({_doReset:function(){this._hash=new F.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(m,f){for(var g=0;16>g;g++){var j=f+g,p=m[j];m[j]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}var g=this._hash.words,j=m[f+0],p=m[f+1],q=m[f+2],r=m[f+3],s=m[f+4],t=m[f+5],u=m[f+6],v=m[f+7],w=m[f+8],x=m[f+9],y=m[f+10],z=m[f+11],A=m[f+12],B=m[f+13],C=m[f+14],D=m[f+15],b=g[0],c=g[1],d=g[2],e=g[3],b=h(b,c,d,e,j,7,a[0]),e=h(e,b,c,d,p,12,a[1]),d=h(d,e,b,c,q,17,a[2]),c=h(c,d,e,b,r,22,a[3]),b=h(b,c,d,e,s,7,a[4]),e=h(e,b,c,d,t,12,a[5]),d=h(d,e,b,c,u,17,a[6]),c=h(c,d,e,b,v,22,a[7]), +b=h(b,c,d,e,w,7,a[8]),e=h(e,b,c,d,x,12,a[9]),d=h(d,e,b,c,y,17,a[10]),c=h(c,d,e,b,z,22,a[11]),b=h(b,c,d,e,A,7,a[12]),e=h(e,b,c,d,B,12,a[13]),d=h(d,e,b,c,C,17,a[14]),c=h(c,d,e,b,D,22,a[15]),b=k(b,c,d,e,p,5,a[16]),e=k(e,b,c,d,u,9,a[17]),d=k(d,e,b,c,z,14,a[18]),c=k(c,d,e,b,j,20,a[19]),b=k(b,c,d,e,t,5,a[20]),e=k(e,b,c,d,y,9,a[21]),d=k(d,e,b,c,D,14,a[22]),c=k(c,d,e,b,s,20,a[23]),b=k(b,c,d,e,x,5,a[24]),e=k(e,b,c,d,C,9,a[25]),d=k(d,e,b,c,r,14,a[26]),c=k(c,d,e,b,w,20,a[27]),b=k(b,c,d,e,B,5,a[28]),e=k(e,b, +c,d,q,9,a[29]),d=k(d,e,b,c,v,14,a[30]),c=k(c,d,e,b,A,20,a[31]),b=l(b,c,d,e,t,4,a[32]),e=l(e,b,c,d,w,11,a[33]),d=l(d,e,b,c,z,16,a[34]),c=l(c,d,e,b,C,23,a[35]),b=l(b,c,d,e,p,4,a[36]),e=l(e,b,c,d,s,11,a[37]),d=l(d,e,b,c,v,16,a[38]),c=l(c,d,e,b,y,23,a[39]),b=l(b,c,d,e,B,4,a[40]),e=l(e,b,c,d,j,11,a[41]),d=l(d,e,b,c,r,16,a[42]),c=l(c,d,e,b,u,23,a[43]),b=l(b,c,d,e,x,4,a[44]),e=l(e,b,c,d,A,11,a[45]),d=l(d,e,b,c,D,16,a[46]),c=l(c,d,e,b,q,23,a[47]),b=n(b,c,d,e,j,6,a[48]),e=n(e,b,c,d,v,10,a[49]),d=n(d,e,b,c, +C,15,a[50]),c=n(c,d,e,b,t,21,a[51]),b=n(b,c,d,e,A,6,a[52]),e=n(e,b,c,d,r,10,a[53]),d=n(d,e,b,c,y,15,a[54]),c=n(c,d,e,b,p,21,a[55]),b=n(b,c,d,e,w,6,a[56]),e=n(e,b,c,d,D,10,a[57]),d=n(d,e,b,c,u,15,a[58]),c=n(c,d,e,b,B,21,a[59]),b=n(b,c,d,e,s,6,a[60]),e=n(e,b,c,d,z,10,a[61]),d=n(d,e,b,c,q,15,a[62]),c=n(c,d,e,b,x,21,a[63]);g[0]=g[0]+b|0;g[1]=g[1]+c|0;g[2]=g[2]+d|0;g[3]=g[3]+e|0},_doFinalize:function(){var a=this._data,f=a.words,g=8*this._nDataBytes,j=8*a.sigBytes;f[j>>>5]|=128<<24-j%32;var h=E.floor(g/ +4294967296);f[(j+64>>>9<<4)+15]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;f[(j+64>>>9<<4)+14]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;a.sigBytes=4*(f.length+1);this._process();a=this._hash;f=a.words;for(g=0;4>g;g++)j=f[g],f[g]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360;return a},clone:function(){var a=s.clone.call(this);a._hash=this._hash.clone();return a}});r.MD5=s._createHelper(q);r.HmacMD5=s._createHmacHelper(q)})(Math); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/md5.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/md5.js new file mode 100644 index 0000000..e589458 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/md5.js @@ -0,0 +1,254 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working varialbes + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); +}(Math)); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/mode-cfb-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/mode-cfb-min.js new file mode 100644 index 0000000..da0da21 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/mode-cfb-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.mode.CFB=function(){function g(c,b,e,a){var d=this._iv;d?(d=d.slice(0),this._iv=void 0):d=this._prevBlock;a.encryptBlock(d,0);for(a=0;a>24&255)){var c=a>>16&255,b=a>>8&255,e=a&255;255===c?(c=0,255===b?(b=0,255===e?e=0:++e):++b):++c;a=0+(c<<16)+(b<<8);a+=e}else a+=16777216;return a}var g=CryptoJS.lib.BlockCipherMode.extend(),j=g.Encryptor=g.extend({processBlock:function(a,c){var b=this._cipher,e=b.blockSize,d=this._iv,f=this._counter;d&&(f=this._counter=d.slice(0),this._iv=void 0);d=f;if(0===(d[0]=h(d[0])))d[1]=h(d[1]);f=f.slice(0);b.encryptBlock(f,0);for(b=0;b> 24) & 0xff) === 0xff) { //overflow + var b1 = (word >> 16)&0xff; + var b2 = (word >> 8)&0xff; + var b3 = word & 0xff; + + if (b1 === 0xff) // overflow b1 + { + b1 = 0; + if (b2 === 0xff) + { + b2 = 0; + if (b3 === 0xff) + { + b3 = 0; + } + else + { + ++b3; + } + } + else + { + ++b2; + } + } + else + { + ++b1; + } + + word = 0; + word += (b1 << 16); + word += (b2 << 8); + word += b3; + } + else + { + word += (0x01 << 24); + } + return word; + } + + function incCounter(counter) + { + if ((counter[0] = incWord(counter[0])) === 0) + { + // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 + counter[1] = incWord(counter[1]); + } + return counter; + } + + var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + + incCounter(counter); + + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTRGladman.Decryptor = Encryptor; + + return CTRGladman; +}()); + + diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/mode-ctr-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/mode-ctr-min.js new file mode 100644 index 0000000..dfa8b1f --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/mode-ctr-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.mode.CTR=function(){var b=CryptoJS.lib.BlockCipherMode.extend(),g=b.Encryptor=b.extend({processBlock:function(b,f){var a=this._cipher,e=a.blockSize,c=this._iv,d=this._counter;c&&(d=this._counter=c.slice(0),this._iv=void 0);c=d.slice(0);a.encryptBlock(c,0);d[e-1]=d[e-1]+1|0;for(a=0;a>>2]|=c<<24-8*(b%4);a.sigBytes+=c},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}}; diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-ansix923.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-ansix923.js new file mode 100644 index 0000000..440126f --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-ansix923.js @@ -0,0 +1,35 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** + * ANSI X.923 padding strategy. + */ +CryptoJS.pad.AnsiX923 = { + pad: function (data, blockSize) { + // Shortcuts + var dataSigBytes = data.sigBytes; + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; + + // Compute last byte position + var lastBytePos = dataSigBytes + nPaddingBytes - 1; + + // Pad + data.clamp(); + data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); + data.sigBytes += nPaddingBytes; + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } +}; diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-iso10126-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-iso10126-min.js new file mode 100644 index 0000000..adef4b3 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-iso10126-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.pad.Iso10126={pad:function(a,c){var b=4*c,b=b-a.sigBytes%b;a.concat(CryptoJS.lib.WordArray.random(b-1)).concat(CryptoJS.lib.WordArray.create([b<<24],1))},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}}; diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-iso10126.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-iso10126.js new file mode 100644 index 0000000..87885e7 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-iso10126.js @@ -0,0 +1,30 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** + * ISO 10126 padding strategy. + */ +CryptoJS.pad.Iso10126 = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Pad + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). + concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } +}; diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-iso97971-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-iso97971-min.js new file mode 100644 index 0000000..1edf02d --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-iso97971-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.pad.Iso97971={pad:function(a,b){a.concat(CryptoJS.lib.WordArray.create([2147483648],1));CryptoJS.pad.ZeroPadding.pad(a,b)},unpad:function(a){CryptoJS.pad.ZeroPadding.unpad(a);a.sigBytes--}}; diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-iso97971.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-iso97971.js new file mode 100644 index 0000000..4c00b9f --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-iso97971.js @@ -0,0 +1,26 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** + * ISO/IEC 9797-1 Padding Method 2. + */ +CryptoJS.pad.Iso97971 = { + pad: function (data, blockSize) { + // Add 0x80 byte + data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); + + // Zero pad the rest + CryptoJS.pad.ZeroPadding.pad(data, blockSize); + }, + + unpad: function (data) { + // Remove zero padding + CryptoJS.pad.ZeroPadding.unpad(data); + + // Remove one more byte -- the 0x80 byte + data.sigBytes--; + } +}; diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-nopadding-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-nopadding-min.js new file mode 100644 index 0000000..6f5eb59 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-nopadding-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.pad.NoPadding={pad:function(){},unpad:function(){}}; diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-nopadding.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-nopadding.js new file mode 100644 index 0000000..b168370 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-nopadding.js @@ -0,0 +1,16 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** + * A noop padding strategy. + */ +CryptoJS.pad.NoPadding = { + pad: function () { + }, + + unpad: function () { + } +}; diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-zeropadding-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-zeropadding-min.js new file mode 100644 index 0000000..18f43ef --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-zeropadding-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.pad.ZeroPadding={pad:function(a,c){var b=4*c;a.clamp();a.sigBytes+=b-(a.sigBytes%b||b)},unpad:function(a){for(var c=a.words,b=a.sigBytes-1;!(c[b>>>2]>>>24-8*(b%4)&255);)b--;a.sigBytes=b+1}}; diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-zeropadding.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-zeropadding.js new file mode 100644 index 0000000..d420118 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/pad-zeropadding.js @@ -0,0 +1,31 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** + * Zero padding strategy. + */ +CryptoJS.pad.ZeroPadding = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Pad + data.clamp(); + data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); + }, + + unpad: function (data) { + // Shortcut + var dataWords = data.words; + + // Unpad + var i = data.sigBytes - 1; + while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { + i--; + } + data.sigBytes = i + 1; + } +}; diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/pbkdf2-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/pbkdf2-min.js new file mode 100644 index 0000000..2f0941c --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/pbkdf2-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var b=CryptoJS,a=b.lib,d=a.Base,m=a.WordArray,a=b.algo,q=a.HMAC,l=a.PBKDF2=d.extend({cfg:d.extend({keySize:4,hasher:a.SHA1,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,f=q.create(c.hasher,a),g=m.create(),d=m.create([1]),l=g.words,r=d.words,n=c.keySize,c=c.iterations;l.lengthc;c++)f[c]=d[c];d[0]=d[0]+1295307597+this._b|0;d[1]=d[1]+3545052371+(d[0]>>>0>>0?1:0)|0;d[2]=d[2]+886263092+(d[1]>>>0>>0?1:0)|0;d[3]=d[3]+1295307597+(d[2]>>>0>>0?1:0)|0;d[4]=d[4]+3545052371+(d[3]>>>0>>0?1:0)|0;d[5]=d[5]+886263092+(d[4]>>>0>>0?1:0)|0;d[6]=d[6]+1295307597+(d[5]>>>0>>0?1:0)|0;d[7]=d[7]+3545052371+(d[6]>>>0>>0?1:0)|0;this._b=d[7]>>>0>>0?1:0;for(c=0;8>c;c++){var h=a[c]+d[c],e=h&65535, +g=h>>>16;b[c]=((e*e>>>17)+e*g>>>15)+g*g^((h&4294901760)*h|0)+((h&65535)*h|0)}a[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0;a[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0;a[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0;a[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0;a[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0;a[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0;a[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0;a[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}var j=CryptoJS,k=j.lib.StreamCipher,e=[],f=[],b=[],l=j.algo.RabbitLegacy= +k.extend({_doReset:function(){for(var a=this._key.words,d=this.cfg.iv,c=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],a=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[0]&65535],b=this._b=0;4>b;b++)g.call(this);for(b=0;8>b;b++)a[b]^=c[b+4&7];if(d){var c=d.words,d=c[0],c=c[1],d=(d<<8|d>>>24)&16711935|(d<< +24|d>>>8)&4278255360,c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,b=d>>>16|c&4294901760,e=c<<16|d&65535;a[0]^=d;a[1]^=b;a[2]^=c;a[3]^=e;a[4]^=d;a[5]^=b;a[6]^=c;a[7]^=e;for(b=0;4>b;b++)g.call(this)}},_doProcessBlock:function(a,b){var c=this._X;g.call(this);e[0]=c[0]^c[5]>>>16^c[3]<<16;e[1]=c[2]^c[7]>>>16^c[5]<<16;e[2]=c[4]^c[1]>>>16^c[7]<<16;e[3]=c[6]^c[3]>>>16^c[1]<<16;for(c=0;4>c;c++)e[c]=(e[c]<<8|e[c]>>>24)&16711935|(e[c]<<24|e[c]>>>8)&4278255360,a[b+c]^=e[c]},blockSize:4,ivSize:2});j.RabbitLegacy= +k._createHelper(l)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/rabbit-legacy.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/rabbit-legacy.js new file mode 100644 index 0000000..82a07f2 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/rabbit-legacy.js @@ -0,0 +1,176 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm. + * + * This is a legacy version that neglected to convert the key to little-endian. + * This error doesn't affect the cipher's security, + * but it does affect its compatibility with other implementations. + */ + var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); + */ + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/rabbit-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/rabbit-min.js new file mode 100644 index 0000000..1289431 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/rabbit-min.js @@ -0,0 +1,11 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){function g(){for(var b=this._X,d=this._C,a=0;8>a;a++)f[a]=d[a];d[0]=d[0]+1295307597+this._b|0;d[1]=d[1]+3545052371+(d[0]>>>0>>0?1:0)|0;d[2]=d[2]+886263092+(d[1]>>>0>>0?1:0)|0;d[3]=d[3]+1295307597+(d[2]>>>0>>0?1:0)|0;d[4]=d[4]+3545052371+(d[3]>>>0>>0?1:0)|0;d[5]=d[5]+886263092+(d[4]>>>0>>0?1:0)|0;d[6]=d[6]+1295307597+(d[5]>>>0>>0?1:0)|0;d[7]=d[7]+3545052371+(d[6]>>>0>>0?1:0)|0;this._b=d[7]>>>0>>0?1:0;for(a=0;8>a;a++){var h=b[a]+d[a],e=h&65535, +g=h>>>16;c[a]=((e*e>>>17)+e*g>>>15)+g*g^((h&4294901760)*h|0)+((h&65535)*h|0)}b[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0;b[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0;b[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0;b[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0;b[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0;b[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0;b[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0;b[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var j=CryptoJS,k=j.lib.StreamCipher,e=[],f=[],c=[],l=j.algo.Rabbit= +k.extend({_doReset:function(){for(var b=this._key.words,d=this.cfg.iv,a=0;4>a;a++)b[a]=(b[a]<<8|b[a]>>>24)&16711935|(b[a]<<24|b[a]>>>8)&4278255360;for(var c=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],b=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>>16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535],a=this._b=0;4>a;a++)g.call(this);for(a=0;8> +a;a++)b[a]^=c[a+4&7];if(d){var a=d.words,d=a[0],a=a[1],d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,c=d>>>16|a&4294901760,e=a<<16|d&65535;b[0]^=d;b[1]^=c;b[2]^=a;b[3]^=e;b[4]^=d;b[5]^=c;b[6]^=a;b[7]^=e;for(a=0;4>a;a++)g.call(this)}},_doProcessBlock:function(b,c){var a=this._X;g.call(this);e[0]=a[0]^a[5]>>>16^a[3]<<16;e[1]=a[2]^a[7]>>>16^a[5]<<16;e[2]=a[4]^a[1]>>>16^a[7]<<16;e[3]=a[6]^a[3]>>>16^a[1]<<16;for(a=0;4>a;a++)e[a]=(e[a]<<8|e[a]>>>24)& +16711935|(e[a]<<24|e[a]>>>8)&4278255360,b[c+a]^=e[a]},blockSize:4,ivSize:2});j.Rabbit=k._createHelper(l)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/rabbit.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/rabbit.js new file mode 100644 index 0000000..fe3b9a4 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/rabbit.js @@ -0,0 +1,178 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm + */ + var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Swap endian + for (var i = 0; i < 4; i++) { + K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | + (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); + } + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); + */ + C.Rabbit = StreamCipher._createHelper(Rabbit); +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/rc4-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/rc4-min.js new file mode 100644 index 0000000..e14e018 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/rc4-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){function l(){for(var a=this._S,d=this._i,c=this._j,b=0,e=0;4>e;e++){var d=(d+1)%256,c=(c+a[d])%256,f=a[d];a[d]=a[c];a[c]=f;b|=a[(a[d]+a[c])%256]<<24-8*e}this._i=d;this._j=c;return b}var g=CryptoJS,k=g.lib.StreamCipher,h=g.algo,j=h.RC4=k.extend({_doReset:function(){for(var a=this._key,d=a.words,a=a.sigBytes,c=this._S=[],b=0;256>b;b++)c[b]=b;for(var e=b=0;256>b;b++){var f=b%a,e=(e+c[b]+(d[f>>>2]>>>24-8*(f%4)&255))%256,f=c[b];c[b]=c[e];c[e]=f}this._i=this._j=0},_doProcessBlock:function(a, +d){a[d]^=l.call(this)},keySize:8,ivSize:0});g.RC4=k._createHelper(j);h=h.RC4Drop=j.extend({cfg:j.cfg.extend({drop:192}),_doReset:function(){j._doReset.call(this);for(var a=this.cfg.drop;0>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; + + j = (j + S[i] + keyByte) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + } + + // Counters + this._i = this._j = 0; + }, + + _doProcessBlock: function (M, offset) { + M[offset] ^= generateKeystreamWord.call(this); + }, + + keySize: 256/32, + + ivSize: 0 + }); + + function generateKeystreamWord() { + // Shortcuts + var S = this._S; + var i = this._i; + var j = this._j; + + // Generate keystream word + var keystreamWord = 0; + for (var n = 0; n < 4; n++) { + i = (i + 1) % 256; + j = (j + S[i]) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + + keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); + } + + // Update counters + this._i = i; + this._j = j; + + return keystreamWord; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); + */ + C.RC4 = StreamCipher._createHelper(RC4); + + /** + * Modified RC4 stream cipher algorithm. + */ + var RC4Drop = C_algo.RC4Drop = RC4.extend({ + /** + * Configuration options. + * + * @property {number} drop The number of keystream words to drop. Default 192 + */ + cfg: RC4.cfg.extend({ + drop: 192 + }), + + _doReset: function () { + RC4._doReset.call(this); + + // Drop + for (var i = this.cfg.drop; i > 0; i--) { + generateKeystreamWord.call(this); + } + } + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); + */ + C.RC4Drop = StreamCipher._createHelper(RC4Drop); +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/ripemd160-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/ripemd160-min.js new file mode 100644 index 0000000..a291651 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/ripemd160-min.js @@ -0,0 +1,22 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/* + +(c) 2012 by C?dric Mesnil. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +(function(){var q=CryptoJS,d=q.lib,n=d.WordArray,p=d.Hasher,d=q.algo,x=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),y=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),z=n.create([11,14,15,12, +5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),A=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),B=n.create([0,1518500249,1859775393,2400959708,2840853838]),C=n.create([1352829926,1548603684,1836072691, +2053994217,0]),d=d.RIPEMD160=p.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,v){for(var b=0;16>b;b++){var c=v+b,f=e[c];e[c]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360}var c=this._hash.words,f=B.words,d=C.words,n=x.words,q=y.words,p=z.words,w=A.words,t,g,h,j,r,u,k,l,m,s;u=t=c[0];k=g=c[1];l=h=c[2];m=j=c[3];s=r=c[4];for(var a,b=0;80>b;b+=1)a=t+e[v+n[b]]|0,a=16>b?a+((g^h^j)+f[0]):32>b?a+((g&h|~g&j)+f[1]):48>b? +a+(((g|~h)^j)+f[2]):64>b?a+((g&j|h&~j)+f[3]):a+((g^(h|~j))+f[4]),a|=0,a=a<>>32-p[b],a=a+r|0,t=r,r=j,j=h<<10|h>>>22,h=g,g=a,a=u+e[v+q[b]]|0,a=16>b?a+((k^(l|~m))+d[0]):32>b?a+((k&m|l&~m)+d[1]):48>b?a+(((k|~l)^m)+d[2]):64>b?a+((k&l|~k&m)+d[3]):a+((k^l^m)+d[4]),a|=0,a=a<>>32-w[b],a=a+s|0,u=s,s=m,m=l<<10|l>>>22,l=k,k=a;a=c[1]+h+m|0;c[1]=c[2]+j+s|0;c[2]=c[3]+r+u|0;c[3]=c[4]+t+k|0;c[4]=c[0]+g+l|0;c[0]=a},_doFinalize:function(){var e=this._data,d=e.words,b=8*this._nDataBytes,c=8*e.sigBytes; +d[c>>>5]|=128<<24-c%32;d[(c+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;e.sigBytes=4*(d.length+1);this._process();e=this._hash;d=e.words;for(b=0;5>b;b++)c=d[b],d[b]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return e},clone:function(){var d=p.clone.call(this);d._hash=this._hash.clone();return d}});q.RIPEMD160=p._createHelper(d);q.HmacRIPEMD160=p._createHmacHelper(d)})(Math); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/ripemd160.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/ripemd160.js new file mode 100644 index 0000000..4acab8b --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/ripemd160.js @@ -0,0 +1,253 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** @preserve +(c) 2012 by Cédric Mesnil. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +(function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var _zl = WordArray.create([ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); + var _zr = WordArray.create([ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); + var _sl = WordArray.create([ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); + var _sr = WordArray.create([ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + + var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); + var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); + + /** + * RIPEMD160 hash algorithm. + */ + var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ + _doReset: function () { + this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); + }, + + _doProcessBlock: function (M, offset) { + + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + // Swap + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + // Shortcut + var H = this._hash.words; + var hl = _hl.words; + var hr = _hr.words; + var zl = _zl.words; + var zr = _zr.words; + var sl = _sl.words; + var sr = _sr.words; + + // Working variables + var al, bl, cl, dl, el; + var ar, br, cr, dr, er; + + ar = al = H[0]; + br = bl = H[1]; + cr = cl = H[2]; + dr = dl = H[3]; + er = el = H[4]; + // Computation + var t; + for (var i = 0; i < 80; i += 1) { + t = (al + M[offset+zl[i]])|0; + if (i<16){ + t += f1(bl,cl,dl) + hl[0]; + } else if (i<32) { + t += f2(bl,cl,dl) + hl[1]; + } else if (i<48) { + t += f3(bl,cl,dl) + hl[2]; + } else if (i<64) { + t += f4(bl,cl,dl) + hl[3]; + } else {// if (i<80) { + t += f5(bl,cl,dl) + hl[4]; + } + t = t|0; + t = rotl(t,sl[i]); + t = (t+el)|0; + al = el; + el = dl; + dl = rotl(cl, 10); + cl = bl; + bl = t; + + t = (ar + M[offset+zr[i]])|0; + if (i<16){ + t += f5(br,cr,dr) + hr[0]; + } else if (i<32) { + t += f4(br,cr,dr) + hr[1]; + } else if (i<48) { + t += f3(br,cr,dr) + hr[2]; + } else if (i<64) { + t += f2(br,cr,dr) + hr[3]; + } else {// if (i<80) { + t += f1(br,cr,dr) + hr[4]; + } + t = t|0; + t = rotl(t,sr[i]) ; + t = (t+er)|0; + ar = er; + er = dr; + dr = rotl(cr, 10); + cr = br; + br = t; + } + // Intermediate hash value + t = (H[1] + cl + dr)|0; + H[1] = (H[2] + dl + er)|0; + H[2] = (H[3] + el + ar)|0; + H[3] = (H[4] + al + br)|0; + H[4] = (H[0] + bl + cr)|0; + H[0] = t; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ); + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 5; i++) { + // Shortcut + var H_i = H[i]; + + // Swap + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + + function f1(x, y, z) { + return ((x) ^ (y) ^ (z)); + + } + + function f2(x, y, z) { + return (((x)&(y)) | ((~x)&(z))); + } + + function f3(x, y, z) { + return (((x) | (~(y))) ^ (z)); + } + + function f4(x, y, z) { + return (((x) & (z)) | ((y)&(~(z)))); + } + + function f5(x, y, z) { + return ((x) ^ ((y) |(~(z)))); + + } + + function rotl(x,n) { + return (x<>>(32-n)); + } + + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.RIPEMD160('message'); + * var hash = CryptoJS.RIPEMD160(wordArray); + */ + C.RIPEMD160 = Hasher._createHelper(RIPEMD160); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacRIPEMD160(message, key); + */ + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); +}(Math)); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/sha1-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha1-min.js new file mode 100644 index 0000000..3ae0311 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha1-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var k=CryptoJS,b=k.lib,m=b.WordArray,l=b.Hasher,d=[],b=k.algo.SHA1=l.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(n,p){for(var a=this._hash.words,e=a[0],f=a[1],h=a[2],j=a[3],b=a[4],c=0;80>c;c++){if(16>c)d[c]=n[p+c]|0;else{var g=d[c-3]^d[c-8]^d[c-14]^d[c-16];d[c]=g<<1|g>>>31}g=(e<<5|e>>>27)+b+d[c];g=20>c?g+((f&h|~f&j)+1518500249):40>c?g+((f^h^j)+1859775393):60>c?g+((f&h|f&j|h&j)-1894007588):g+((f^h^ +j)-899497514);b=j;j=h;h=f<<30|f>>>2;f=e;e=g}a[0]=a[0]+e|0;a[1]=a[1]+f|0;a[2]=a[2]+h|0;a[3]=a[3]+j|0;a[4]=a[4]+b|0},_doFinalize:function(){var b=this._data,d=b.words,a=8*this._nDataBytes,e=8*b.sigBytes;d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=Math.floor(a/4294967296);d[(e+64>>>9<<4)+15]=a;b.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var b=l.clone.call(this);b._hash=this._hash.clone();return b}});k.SHA1=l._createHelper(b);k.HmacSHA1=l._createHmacHelper(b)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/sha1.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha1.js new file mode 100644 index 0000000..e10a9a2 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha1.js @@ -0,0 +1,136 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Reusable object + var W = []; + + /** + * SHA-1 hash algorithm. + */ + var SHA1 = C_algo.SHA1 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476, + 0xc3d2e1f0 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + + // Computation + for (var i = 0; i < 80; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; + W[i] = (n << 1) | (n >>> 31); + } + + var t = ((a << 5) | (a >>> 27)) + e + W[i]; + if (i < 20) { + t += ((b & c) | (~b & d)) + 0x5a827999; + } else if (i < 40) { + t += (b ^ c ^ d) + 0x6ed9eba1; + } else if (i < 60) { + t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; + } else /* if (i < 80) */ { + t += (b ^ c ^ d) - 0x359d3e2a; + } + + e = d; + d = c; + c = (b << 30) | (b >>> 2); + b = a; + a = t; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA1('message'); + * var hash = CryptoJS.SHA1(wordArray); + */ + C.SHA1 = Hasher._createHelper(SHA1); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA1(message, key); + */ + C.HmacSHA1 = Hasher._createHmacHelper(SHA1); +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/sha224-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha224-min.js new file mode 100644 index 0000000..b0bc65d --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha224-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var b=CryptoJS,d=b.lib.WordArray,a=b.algo,c=a.SHA256,a=a.SHA224=c.extend({_doReset:function(){this._hash=new d.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=c._doFinalize.call(this);a.sigBytes-=4;return a}});b.SHA224=c._createHelper(a);b.HmacSHA224=c._createHmacHelper(a)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/sha224.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha224.js new file mode 100644 index 0000000..b572fe5 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha224.js @@ -0,0 +1,66 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + + /** + * SHA-224 hash algorithm. + */ + var SHA224 = C_algo.SHA224 = SHA256.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 + ]); + }, + + _doFinalize: function () { + var hash = SHA256._doFinalize.call(this); + + hash.sigBytes -= 4; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA224('message'); + * var hash = CryptoJS.SHA224(wordArray); + */ + C.SHA224 = SHA256._createHelper(SHA224); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA224(message, key); + */ + C.HmacSHA224 = SHA256._createHmacHelper(SHA224); +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/sha256-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha256-min.js new file mode 100644 index 0000000..e0fe209 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha256-min.js @@ -0,0 +1,9 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(k){for(var g=CryptoJS,h=g.lib,v=h.WordArray,j=h.Hasher,h=g.algo,s=[],t=[],u=function(q){return 4294967296*(q-(q|0))|0},l=2,b=0;64>b;){var d;a:{d=l;for(var w=k.sqrt(d),r=2;r<=w;r++)if(!(d%r)){d=!1;break a}d=!0}d&&(8>b&&(s[b]=u(k.pow(l,0.5))),t[b]=u(k.pow(l,1/3)),b++);l++}var n=[],h=h.SHA256=j.extend({_doReset:function(){this._hash=new v.init(s.slice(0))},_doProcessBlock:function(q,h){for(var a=this._hash.words,c=a[0],d=a[1],b=a[2],k=a[3],f=a[4],g=a[5],j=a[6],l=a[7],e=0;64>e;e++){if(16>e)n[e]= +q[h+e]|0;else{var m=n[e-15],p=n[e-2];n[e]=((m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3)+n[e-7]+((p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10)+n[e-16]}m=l+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&g^~f&j)+t[e]+n[e];p=((c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22))+(c&d^c&b^d&b);l=j;j=g;g=f;f=k+m|0;k=b;b=d;d=c;c=m+p|0}a[0]=a[0]+c|0;a[1]=a[1]+d|0;a[2]=a[2]+b|0;a[3]=a[3]+k|0;a[4]=a[4]+f|0;a[5]=a[5]+g|0;a[6]=a[6]+j|0;a[7]=a[7]+l|0},_doFinalize:function(){var d=this._data,b=d.words,a=8*this._nDataBytes,c=8*d.sigBytes; +b[c>>>5]|=128<<24-c%32;b[(c+64>>>9<<4)+14]=k.floor(a/4294967296);b[(c+64>>>9<<4)+15]=a;d.sigBytes=4*b.length;this._process();return this._hash},clone:function(){var b=j.clone.call(this);b._hash=this._hash.clone();return b}});g.SHA256=j._createHelper(h);g.HmacSHA256=j._createHmacHelper(h)})(Math); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/sha256.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha256.js new file mode 100644 index 0000000..a3790b0 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha256.js @@ -0,0 +1,185 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; + + /** + * SHA-256 hash algorithm. + */ + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; + + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); + + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); + + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); + + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); + */ + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); +}(Math)); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/sha3-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha3-min.js new file mode 100644 index 0000000..9783779 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha3-min.js @@ -0,0 +1,11 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(y){for(var p=CryptoJS,m=p.lib,z=m.WordArray,q=m.Hasher,s=p.x64.Word,m=p.algo,v=[],w=[],x=[],c=1,d=0,l=0;24>l;l++){v[c+5*d]=(l+1)*(l+2)/2%64;var r=(2*c+3*d)%5,c=d%5,d=r}for(c=0;5>c;c++)for(d=0;5>d;d++)w[c+5*d]=d+5*((2*c+3*d)%5);c=1;for(d=0;24>d;d++){for(var t=r=l=0;7>t;t++){if(c&1){var u=(1<u?r^=1<c;c++)j[c]=s.create();m=m.SHA3=q.extend({cfg:q.cfg.extend({outputLength:512}),_doReset:function(){for(var c=this._state= +[],n=0;25>n;n++)c[n]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(c,n){for(var h=this._state,d=this.blockSize/2,b=0;b>>24)&16711935|(e<<24|e>>>8)&4278255360,f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,a=h[b];a.high^=f;a.low^=e}for(d=0;24>d;d++){for(b=0;5>b;b++){for(var k=e=0,g=0;5>g;g++)a=h[b+5*g],e^=a.high,k^=a.low;a=j[b];a.high=e;a.low=k}for(b=0;5>b;b++){a=j[(b+4)%5];e=j[(b+1)%5];f=e.high;g=e.low;e=a.high^ +(f<<1|g>>>31);k=a.low^(g<<1|f>>>31);for(g=0;5>g;g++)a=h[b+5*g],a.high^=e,a.low^=k}for(f=1;25>f;f++)a=h[f],b=a.high,a=a.low,g=v[f],32>g?(e=b<>>32-g,k=a<>>32-g):(e=a<>>64-g,k=b<>>64-g),a=j[w[f]],a.high=e,a.low=k;a=j[0];b=h[0];a.high=b.high;a.low=b.low;for(b=0;5>b;b++)for(g=0;5>g;g++)f=b+5*g,a=h[f],e=j[f],f=j[(b+1)%5+5*g],k=j[(b+2)%5+5*g],a.high=e.high^~f.high&k.high,a.low=e.low^~f.low&k.low;a=h[0];b=x[d];a.high^=b.high;a.low^=b.low}},_doFinalize:function(){var c=this._data, +d=c.words,h=8*c.sigBytes,j=32*this.blockSize;d[h>>>5]|=1<<24-h%32;d[(y.ceil((h+1)/j)*j>>>5)-1]|=128;c.sigBytes=4*d.length;this._process();for(var c=this._state,d=this.cfg.outputLength/8,h=d/8,j=[],b=0;b>>24)&16711935|(f<<24|f>>>8)&4278255360,e=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;j.push(e);j.push(f)}return new z.init(j,d)},clone:function(){for(var c=q.clone.call(this),d=c._state=this._state.slice(0),h=0;25>h;h++)d[h]=d[h].clone();return c}}); +p.SHA3=q._createHelper(m);p.HmacSHA3=q._createHmacHelper(m)})(Math); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/sha3.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha3.js new file mode 100644 index 0000000..5324576 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha3.js @@ -0,0 +1,309 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var C_algo = C.algo; + + // Constants tables + var RHO_OFFSETS = []; + var PI_INDEXES = []; + var ROUND_CONSTANTS = []; + + // Compute Constants + (function () { + // Compute rho offset constants + var x = 1, y = 0; + for (var t = 0; t < 24; t++) { + RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; + + var newX = y % 5; + var newY = (2 * x + 3 * y) % 5; + x = newX; + y = newY; + } + + // Compute pi index constants + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; + } + } + + // Compute round constants + var LFSR = 0x01; + for (var i = 0; i < 24; i++) { + var roundConstantMsw = 0; + var roundConstantLsw = 0; + + for (var j = 0; j < 7; j++) { + if (LFSR & 0x01) { + var bitPosition = (1 << j) - 1; + if (bitPosition < 32) { + roundConstantLsw ^= 1 << bitPosition; + } else /* if (bitPosition >= 32) */ { + roundConstantMsw ^= 1 << (bitPosition - 32); + } + } + + // Compute next LFSR + if (LFSR & 0x80) { + // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 + LFSR = (LFSR << 1) ^ 0x71; + } else { + LFSR <<= 1; + } + } + + ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); + } + }()); + + // Reusable objects for temporary values + var T = []; + (function () { + for (var i = 0; i < 25; i++) { + T[i] = X64Word.create(); + } + }()); + + /** + * SHA-3 hash algorithm. + */ + var SHA3 = C_algo.SHA3 = Hasher.extend({ + /** + * Configuration options. + * + * @property {number} outputLength + * The desired number of bits in the output hash. + * Only values permitted are: 224, 256, 384, 512. + * Default: 512 + */ + cfg: Hasher.cfg.extend({ + outputLength: 512 + }), + + _doReset: function () { + var state = this._state = [] + for (var i = 0; i < 25; i++) { + state[i] = new X64Word.init(); + } + + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var state = this._state; + var nBlockSizeLanes = this.blockSize / 2; + + // Absorb + for (var i = 0; i < nBlockSizeLanes; i++) { + // Shortcuts + var M2i = M[offset + 2 * i]; + var M2i1 = M[offset + 2 * i + 1]; + + // Swap endian + M2i = ( + (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | + (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) + ); + M2i1 = ( + (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | + (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) + ); + + // Absorb message into state + var lane = state[i]; + lane.high ^= M2i1; + lane.low ^= M2i; + } + + // Rounds + for (var round = 0; round < 24; round++) { + // Theta + for (var x = 0; x < 5; x++) { + // Mix column lanes + var tMsw = 0, tLsw = 0; + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + tMsw ^= lane.high; + tLsw ^= lane.low; + } + + // Temporary values + var Tx = T[x]; + Tx.high = tMsw; + Tx.low = tLsw; + } + for (var x = 0; x < 5; x++) { + // Shortcuts + var Tx4 = T[(x + 4) % 5]; + var Tx1 = T[(x + 1) % 5]; + var Tx1Msw = Tx1.high; + var Tx1Lsw = Tx1.low; + + // Mix surrounding columns + var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); + var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + lane.high ^= tMsw; + lane.low ^= tLsw; + } + } + + // Rho Pi + for (var laneIndex = 1; laneIndex < 25; laneIndex++) { + // Shortcuts + var lane = state[laneIndex]; + var laneMsw = lane.high; + var laneLsw = lane.low; + var rhoOffset = RHO_OFFSETS[laneIndex]; + + // Rotate lanes + if (rhoOffset < 32) { + var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); + var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); + } else /* if (rhoOffset >= 32) */ { + var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); + var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); + } + + // Transpose lanes + var TPiLane = T[PI_INDEXES[laneIndex]]; + TPiLane.high = tMsw; + TPiLane.low = tLsw; + } + + // Rho pi at x = y = 0 + var T0 = T[0]; + var state0 = state[0]; + T0.high = state0.high; + T0.low = state0.low; + + // Chi + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + // Shortcuts + var laneIndex = x + 5 * y; + var lane = state[laneIndex]; + var TLane = T[laneIndex]; + var Tx1Lane = T[((x + 1) % 5) + 5 * y]; + var Tx2Lane = T[((x + 2) % 5) + 5 * y]; + + // Mix rows + lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); + lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); + } + } + + // Iota + var lane = state[0]; + var roundConstant = ROUND_CONSTANTS[round]; + lane.high ^= roundConstant.high; + lane.low ^= roundConstant.low;; + } + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + var blockSizeBits = this.blockSize * 32; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); + dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var state = this._state; + var outputLengthBytes = this.cfg.outputLength / 8; + var outputLengthLanes = outputLengthBytes / 8; + + // Squeeze + var hashWords = []; + for (var i = 0; i < outputLengthLanes; i++) { + // Shortcuts + var lane = state[i]; + var laneMsw = lane.high; + var laneLsw = lane.low; + + // Swap endian + laneMsw = ( + (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | + (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) + ); + laneLsw = ( + (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | + (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) + ); + + // Squeeze state to retrieve hash + hashWords.push(laneLsw); + hashWords.push(laneMsw); + } + + // Return final computed hash + return new WordArray.init(hashWords, outputLengthBytes); + }, + + clone: function () { + var clone = Hasher.clone.call(this); + + var state = clone._state = this._state.slice(0); + for (var i = 0; i < 25; i++) { + state[i] = state[i].clone(); + } + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA3('message'); + * var hash = CryptoJS.SHA3(wordArray); + */ + C.SHA3 = Hasher._createHelper(SHA3); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA3(message, key); + */ + C.HmacSHA3 = Hasher._createHmacHelper(SHA3); +}(Math)); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/sha384-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha384-min.js new file mode 100644 index 0000000..d29bb20 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha384-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var c=CryptoJS,a=c.x64,b=a.Word,e=a.WordArray,a=c.algo,d=a.SHA512,a=a.SHA384=d.extend({_doReset:function(){this._hash=new e.init([new b.init(3418070365,3238371032),new b.init(1654270250,914150663),new b.init(2438529370,812702999),new b.init(355462360,4144912697),new b.init(1731405415,4290775857),new b.init(2394180231,1750603025),new b.init(3675008525,1694076839),new b.init(1203062813,3204075428)])},_doFinalize:function(){var a=d._doFinalize.call(this);a.sigBytes-=16;return a}});c.SHA384= +d._createHelper(a);c.HmacSHA384=d._createHmacHelper(a)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/sha384.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha384.js new file mode 100644 index 0000000..927e2b4 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha384.js @@ -0,0 +1,69 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + var SHA512 = C_algo.SHA512; + + /** + * SHA-384 hash algorithm. + */ + var SHA384 = C_algo.SHA384 = SHA512.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), + new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), + new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), + new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) + ]); + }, + + _doFinalize: function () { + var hash = SHA512._doFinalize.call(this); + + hash.sigBytes -= 16; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA384('message'); + * var hash = CryptoJS.SHA384(wordArray); + */ + C.SHA384 = SHA512._createHelper(SHA384); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA384(message, key); + */ + C.HmacSHA384 = SHA512._createHmacHelper(SHA384); +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/sha512-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha512-min.js new file mode 100644 index 0000000..5df4b70 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha512-min.js @@ -0,0 +1,15 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){function a(){return d.create.apply(d,arguments)}for(var n=CryptoJS,r=n.lib.Hasher,e=n.x64,d=e.Word,T=e.WordArray,e=n.algo,ea=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317), +a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291, +2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899), +a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470, +3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],v=[],w=0;80>w;w++)v[w]=a();e=e.SHA512=r.extend({_doReset:function(){this._hash=new T.init([new d.init(1779033703,4089235720),new d.init(3144134277,2227873595),new d.init(1013904242,4271175723),new d.init(2773480762,1595750129),new d.init(1359893119,2917565137),new d.init(2600822924,725511199),new d.init(528734635,4215389547),new d.init(1541459225,327033209)])},_doProcessBlock:function(a,d){for(var f=this._hash.words, +F=f[0],e=f[1],n=f[2],r=f[3],G=f[4],H=f[5],I=f[6],f=f[7],w=F.high,J=F.low,X=e.high,K=e.low,Y=n.high,L=n.low,Z=r.high,M=r.low,$=G.high,N=G.low,aa=H.high,O=H.low,ba=I.high,P=I.low,ca=f.high,Q=f.low,k=w,g=J,z=X,x=K,A=Y,y=L,U=Z,B=M,l=$,h=N,R=aa,C=O,S=ba,D=P,V=ca,E=Q,m=0;80>m;m++){var s=v[m];if(16>m)var j=s.high=a[d+2*m]|0,b=s.low=a[d+2*m+1]|0;else{var j=v[m-15],b=j.high,p=j.low,j=(b>>>1|p<<31)^(b>>>8|p<<24)^b>>>7,p=(p>>>1|b<<31)^(p>>>8|b<<24)^(p>>>7|b<<25),u=v[m-2],b=u.high,c=u.low,u=(b>>>19|c<<13)^(b<< +3|c>>>29)^b>>>6,c=(c>>>19|b<<13)^(c<<3|b>>>29)^(c>>>6|b<<26),b=v[m-7],W=b.high,t=v[m-16],q=t.high,t=t.low,b=p+b.low,j=j+W+(b>>>0

>>0?1:0),b=b+c,j=j+u+(b>>>0>>0?1:0),b=b+t,j=j+q+(b>>>0>>0?1:0);s.high=j;s.low=b}var W=l&R^~l&S,t=h&C^~h&D,s=k&z^k&A^z&A,T=g&x^g&y^x&y,p=(k>>>28|g<<4)^(k<<30|g>>>2)^(k<<25|g>>>7),u=(g>>>28|k<<4)^(g<<30|k>>>2)^(g<<25|k>>>7),c=ea[m],fa=c.high,da=c.low,c=E+((h>>>14|l<<18)^(h>>>18|l<<14)^(h<<23|l>>>9)),q=V+((l>>>14|h<<18)^(l>>>18|h<<14)^(l<<23|h>>>9))+(c>>>0>>0?1: +0),c=c+t,q=q+W+(c>>>0>>0?1:0),c=c+da,q=q+fa+(c>>>0>>0?1:0),c=c+b,q=q+j+(c>>>0>>0?1:0),b=u+T,s=p+s+(b>>>0>>0?1:0),V=S,E=D,S=R,D=C,R=l,C=h,h=B+c|0,l=U+q+(h>>>0>>0?1:0)|0,U=A,B=y,A=z,y=x,z=k,x=g,g=c+b|0,k=q+s+(g>>>0>>0?1:0)|0}J=F.low=J+g;F.high=w+k+(J>>>0>>0?1:0);K=e.low=K+x;e.high=X+z+(K>>>0>>0?1:0);L=n.low=L+y;n.high=Y+A+(L>>>0>>0?1:0);M=r.low=M+B;r.high=Z+U+(M>>>0>>0?1:0);N=G.low=N+h;G.high=$+l+(N>>>0>>0?1:0);O=H.low=O+C;H.high=aa+R+(O>>>0>>0?1:0);P=I.low=P+D; +I.high=ba+S+(P>>>0>>0?1:0);Q=f.low=Q+E;f.high=ca+V+(Q>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,d=a.words,f=8*this._nDataBytes,e=8*a.sigBytes;d[e>>>5]|=128<<24-e%32;d[(e+128>>>10<<5)+30]=Math.floor(f/4294967296);d[(e+128>>>10<<5)+31]=f;a.sigBytes=4*d.length;this._process();return this._hash.toX32()},clone:function(){var a=r.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});n.SHA512=r._createHelper(e);n.HmacSHA512=r._createHmacHelper(e)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/sha512.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha512.js new file mode 100644 index 0000000..14a16ac --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/sha512.js @@ -0,0 +1,309 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + + function X64Word_create() { + return X64Word.create.apply(X64Word, arguments); + } + + // Constants + var K = [ + X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), + X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), + X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), + X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), + X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), + X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), + X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), + X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), + X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), + X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), + X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), + X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), + X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), + X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), + X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), + X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), + X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), + X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), + X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), + X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), + X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), + X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), + X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), + X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), + X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), + X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), + X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), + X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), + X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), + X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), + X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), + X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), + X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), + X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), + X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), + X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), + X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), + X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), + X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), + X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) + ]; + + // Reusable objects + var W = []; + (function () { + for (var i = 0; i < 80; i++) { + W[i] = X64Word_create(); + } + }()); + + /** + * SHA-512 hash algorithm. + */ + var SHA512 = C_algo.SHA512 = Hasher.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), + new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), + new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), + new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var H = this._hash.words; + + var H0 = H[0]; + var H1 = H[1]; + var H2 = H[2]; + var H3 = H[3]; + var H4 = H[4]; + var H5 = H[5]; + var H6 = H[6]; + var H7 = H[7]; + + var H0h = H0.high; + var H0l = H0.low; + var H1h = H1.high; + var H1l = H1.low; + var H2h = H2.high; + var H2l = H2.low; + var H3h = H3.high; + var H3l = H3.low; + var H4h = H4.high; + var H4l = H4.low; + var H5h = H5.high; + var H5l = H5.low; + var H6h = H6.high; + var H6l = H6.low; + var H7h = H7.high; + var H7l = H7.low; + + // Working variables + var ah = H0h; + var al = H0l; + var bh = H1h; + var bl = H1l; + var ch = H2h; + var cl = H2l; + var dh = H3h; + var dl = H3l; + var eh = H4h; + var el = H4l; + var fh = H5h; + var fl = H5l; + var gh = H6h; + var gl = H6l; + var hh = H7h; + var hl = H7l; + + // Rounds + for (var i = 0; i < 80; i++) { + // Shortcut + var Wi = W[i]; + + // Extend message + if (i < 16) { + var Wih = Wi.high = M[offset + i * 2] | 0; + var Wil = Wi.low = M[offset + i * 2 + 1] | 0; + } else { + // Gamma0 + var gamma0x = W[i - 15]; + var gamma0xh = gamma0x.high; + var gamma0xl = gamma0x.low; + var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); + var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); + + // Gamma1 + var gamma1x = W[i - 2]; + var gamma1xh = gamma1x.high; + var gamma1xl = gamma1x.low; + var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); + var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7 = W[i - 7]; + var Wi7h = Wi7.high; + var Wi7l = Wi7.low; + + var Wi16 = W[i - 16]; + var Wi16h = Wi16.high; + var Wi16l = Wi16.low; + + var Wil = gamma0l + Wi7l; + var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); + var Wil = Wil + gamma1l; + var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); + var Wil = Wil + Wi16l; + var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); + + Wi.high = Wih; + Wi.low = Wil; + } + + var chh = (eh & fh) ^ (~eh & gh); + var chl = (el & fl) ^ (~el & gl); + var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); + var majl = (al & bl) ^ (al & cl) ^ (bl & cl); + + var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); + var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); + var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); + var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); + + // t1 = h + sigma1 + ch + K[i] + W[i] + var Ki = K[i]; + var Kih = Ki.high; + var Kil = Ki.low; + + var t1l = hl + sigma1l; + var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); + var t1l = t1l + chl; + var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); + var t1l = t1l + Kil; + var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); + var t1l = t1l + Wil; + var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); + + // t2 = sigma0 + maj + var t2l = sigma0l + majl; + var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); + + // Update working variables + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + el = (dl + t1l) | 0; + eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + al = (t1l + t2l) | 0; + ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; + } + + // Intermediate hash value + H0l = H0.low = (H0l + al); + H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); + H1l = H1.low = (H1l + bl); + H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); + H2l = H2.low = (H2l + cl); + H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); + H3l = H3.low = (H3l + dl); + H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); + H4l = H4.low = (H4l + el); + H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); + H5l = H5.low = (H5l + fl); + H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); + H6l = H6.low = (H6l + gl); + H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); + H7l = H7.low = (H7l + hl); + H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Convert hash to 32-bit word array before returning + var hash = this._hash.toX32(); + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + }, + + blockSize: 1024/32 + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA512('message'); + * var hash = CryptoJS.SHA512(wordArray); + */ + C.SHA512 = Hasher._createHelper(SHA512); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA512(message, key); + */ + C.HmacSHA512 = Hasher._createHmacHelper(SHA512); +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/tripledes-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/tripledes-min.js new file mode 100644 index 0000000..a669dd3 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/tripledes-min.js @@ -0,0 +1,26 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){function j(b,c){var a=(this._lBlock>>>b^this._rBlock)&c;this._rBlock^=a;this._lBlock^=a<>>b^this._lBlock)&c;this._lBlock^=a;this._rBlock^=a<a;a++){var f=q[a]-1;c[a]=b[f>>>5]>>>31-f%32&1}b=this._subKeys=[];for(f=0;16>f;f++){for(var d=b[f]=[],e=r[f],a=0;24>a;a++)d[a/6|0]|=c[(p[a]-1+e)%28]<<31-a%6,d[4+(a/6|0)]|=c[28+(p[a+24]-1+e)%28]<<31-a%6;d[0]=d[0]<<1|d[0]>>>31;for(a=1;7>a;a++)d[a]>>>= +4*(a-1)+3;d[7]=d[7]<<5|d[7]>>>27}c=this._invSubKeys=[];for(a=0;16>a;a++)c[a]=b[15-a]},encryptBlock:function(b,c){this._doCryptBlock(b,c,this._subKeys)},decryptBlock:function(b,c){this._doCryptBlock(b,c,this._invSubKeys)},_doCryptBlock:function(b,c,a){this._lBlock=b[c];this._rBlock=b[c+1];j.call(this,4,252645135);j.call(this,16,65535);l.call(this,2,858993459);l.call(this,8,16711935);j.call(this,1,1431655765);for(var f=0;16>f;f++){for(var d=a[f],e=this._lBlock,h=this._rBlock,g=0,k=0;8>k;k++)g|=s[k][((h^ +d[k])&t[k])>>>0];this._lBlock=h;this._rBlock=e^g}a=this._lBlock;this._lBlock=this._rBlock;this._rBlock=a;j.call(this,1,1431655765);l.call(this,8,16711935);l.call(this,2,858993459);j.call(this,16,65535);j.call(this,4,252645135);b[c]=this._lBlock;b[c+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});h.DES=e._createHelper(m);g=g.TripleDES=e.extend({_doReset:function(){var b=this._key.words;this._des1=m.createEncryptor(n.create(b.slice(0,2)));this._des2=m.createEncryptor(n.create(b.slice(2,4)));this._des3= +m.createEncryptor(n.create(b.slice(4,6)))},encryptBlock:function(b,c){this._des1.encryptBlock(b,c);this._des2.decryptBlock(b,c);this._des3.encryptBlock(b,c)},decryptBlock:function(b,c){this._des3.decryptBlock(b,c);this._des2.encryptBlock(b,c);this._des1.decryptBlock(b,c)},keySize:6,ivSize:2,blockSize:2});h.TripleDES=e._createHelper(g)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/tripledes.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/tripledes.js new file mode 100644 index 0000000..0606b74 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/tripledes.js @@ -0,0 +1,756 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Permuted Choice 1 constants + var PC1 = [ + 57, 49, 41, 33, 25, 17, 9, 1, + 58, 50, 42, 34, 26, 18, 10, 2, + 59, 51, 43, 35, 27, 19, 11, 3, + 60, 52, 44, 36, 63, 55, 47, 39, + 31, 23, 15, 7, 62, 54, 46, 38, + 30, 22, 14, 6, 61, 53, 45, 37, + 29, 21, 13, 5, 28, 20, 12, 4 + ]; + + // Permuted Choice 2 constants + var PC2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ]; + + // Cumulative bit shift constants + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; + + // SBOXes and round permutation constants + var SBOX_P = [ + { + 0x0: 0x808200, + 0x10000000: 0x8000, + 0x20000000: 0x808002, + 0x30000000: 0x2, + 0x40000000: 0x200, + 0x50000000: 0x808202, + 0x60000000: 0x800202, + 0x70000000: 0x800000, + 0x80000000: 0x202, + 0x90000000: 0x800200, + 0xa0000000: 0x8200, + 0xb0000000: 0x808000, + 0xc0000000: 0x8002, + 0xd0000000: 0x800002, + 0xe0000000: 0x0, + 0xf0000000: 0x8202, + 0x8000000: 0x0, + 0x18000000: 0x808202, + 0x28000000: 0x8202, + 0x38000000: 0x8000, + 0x48000000: 0x808200, + 0x58000000: 0x200, + 0x68000000: 0x808002, + 0x78000000: 0x2, + 0x88000000: 0x800200, + 0x98000000: 0x8200, + 0xa8000000: 0x808000, + 0xb8000000: 0x800202, + 0xc8000000: 0x800002, + 0xd8000000: 0x8002, + 0xe8000000: 0x202, + 0xf8000000: 0x800000, + 0x1: 0x8000, + 0x10000001: 0x2, + 0x20000001: 0x808200, + 0x30000001: 0x800000, + 0x40000001: 0x808002, + 0x50000001: 0x8200, + 0x60000001: 0x200, + 0x70000001: 0x800202, + 0x80000001: 0x808202, + 0x90000001: 0x808000, + 0xa0000001: 0x800002, + 0xb0000001: 0x8202, + 0xc0000001: 0x202, + 0xd0000001: 0x800200, + 0xe0000001: 0x8002, + 0xf0000001: 0x0, + 0x8000001: 0x808202, + 0x18000001: 0x808000, + 0x28000001: 0x800000, + 0x38000001: 0x200, + 0x48000001: 0x8000, + 0x58000001: 0x800002, + 0x68000001: 0x2, + 0x78000001: 0x8202, + 0x88000001: 0x8002, + 0x98000001: 0x800202, + 0xa8000001: 0x202, + 0xb8000001: 0x808200, + 0xc8000001: 0x800200, + 0xd8000001: 0x0, + 0xe8000001: 0x8200, + 0xf8000001: 0x808002 + }, + { + 0x0: 0x40084010, + 0x1000000: 0x4000, + 0x2000000: 0x80000, + 0x3000000: 0x40080010, + 0x4000000: 0x40000010, + 0x5000000: 0x40084000, + 0x6000000: 0x40004000, + 0x7000000: 0x10, + 0x8000000: 0x84000, + 0x9000000: 0x40004010, + 0xa000000: 0x40000000, + 0xb000000: 0x84010, + 0xc000000: 0x80010, + 0xd000000: 0x0, + 0xe000000: 0x4010, + 0xf000000: 0x40080000, + 0x800000: 0x40004000, + 0x1800000: 0x84010, + 0x2800000: 0x10, + 0x3800000: 0x40004010, + 0x4800000: 0x40084010, + 0x5800000: 0x40000000, + 0x6800000: 0x80000, + 0x7800000: 0x40080010, + 0x8800000: 0x80010, + 0x9800000: 0x0, + 0xa800000: 0x4000, + 0xb800000: 0x40080000, + 0xc800000: 0x40000010, + 0xd800000: 0x84000, + 0xe800000: 0x40084000, + 0xf800000: 0x4010, + 0x10000000: 0x0, + 0x11000000: 0x40080010, + 0x12000000: 0x40004010, + 0x13000000: 0x40084000, + 0x14000000: 0x40080000, + 0x15000000: 0x10, + 0x16000000: 0x84010, + 0x17000000: 0x4000, + 0x18000000: 0x4010, + 0x19000000: 0x80000, + 0x1a000000: 0x80010, + 0x1b000000: 0x40000010, + 0x1c000000: 0x84000, + 0x1d000000: 0x40004000, + 0x1e000000: 0x40000000, + 0x1f000000: 0x40084010, + 0x10800000: 0x84010, + 0x11800000: 0x80000, + 0x12800000: 0x40080000, + 0x13800000: 0x4000, + 0x14800000: 0x40004000, + 0x15800000: 0x40084010, + 0x16800000: 0x10, + 0x17800000: 0x40000000, + 0x18800000: 0x40084000, + 0x19800000: 0x40000010, + 0x1a800000: 0x40004010, + 0x1b800000: 0x80010, + 0x1c800000: 0x0, + 0x1d800000: 0x4010, + 0x1e800000: 0x40080010, + 0x1f800000: 0x84000 + }, + { + 0x0: 0x104, + 0x100000: 0x0, + 0x200000: 0x4000100, + 0x300000: 0x10104, + 0x400000: 0x10004, + 0x500000: 0x4000004, + 0x600000: 0x4010104, + 0x700000: 0x4010000, + 0x800000: 0x4000000, + 0x900000: 0x4010100, + 0xa00000: 0x10100, + 0xb00000: 0x4010004, + 0xc00000: 0x4000104, + 0xd00000: 0x10000, + 0xe00000: 0x4, + 0xf00000: 0x100, + 0x80000: 0x4010100, + 0x180000: 0x4010004, + 0x280000: 0x0, + 0x380000: 0x4000100, + 0x480000: 0x4000004, + 0x580000: 0x10000, + 0x680000: 0x10004, + 0x780000: 0x104, + 0x880000: 0x4, + 0x980000: 0x100, + 0xa80000: 0x4010000, + 0xb80000: 0x10104, + 0xc80000: 0x10100, + 0xd80000: 0x4000104, + 0xe80000: 0x4010104, + 0xf80000: 0x4000000, + 0x1000000: 0x4010100, + 0x1100000: 0x10004, + 0x1200000: 0x10000, + 0x1300000: 0x4000100, + 0x1400000: 0x100, + 0x1500000: 0x4010104, + 0x1600000: 0x4000004, + 0x1700000: 0x0, + 0x1800000: 0x4000104, + 0x1900000: 0x4000000, + 0x1a00000: 0x4, + 0x1b00000: 0x10100, + 0x1c00000: 0x4010000, + 0x1d00000: 0x104, + 0x1e00000: 0x10104, + 0x1f00000: 0x4010004, + 0x1080000: 0x4000000, + 0x1180000: 0x104, + 0x1280000: 0x4010100, + 0x1380000: 0x0, + 0x1480000: 0x10004, + 0x1580000: 0x4000100, + 0x1680000: 0x100, + 0x1780000: 0x4010004, + 0x1880000: 0x10000, + 0x1980000: 0x4010104, + 0x1a80000: 0x10104, + 0x1b80000: 0x4000004, + 0x1c80000: 0x4000104, + 0x1d80000: 0x4010000, + 0x1e80000: 0x4, + 0x1f80000: 0x10100 + }, + { + 0x0: 0x80401000, + 0x10000: 0x80001040, + 0x20000: 0x401040, + 0x30000: 0x80400000, + 0x40000: 0x0, + 0x50000: 0x401000, + 0x60000: 0x80000040, + 0x70000: 0x400040, + 0x80000: 0x80000000, + 0x90000: 0x400000, + 0xa0000: 0x40, + 0xb0000: 0x80001000, + 0xc0000: 0x80400040, + 0xd0000: 0x1040, + 0xe0000: 0x1000, + 0xf0000: 0x80401040, + 0x8000: 0x80001040, + 0x18000: 0x40, + 0x28000: 0x80400040, + 0x38000: 0x80001000, + 0x48000: 0x401000, + 0x58000: 0x80401040, + 0x68000: 0x0, + 0x78000: 0x80400000, + 0x88000: 0x1000, + 0x98000: 0x80401000, + 0xa8000: 0x400000, + 0xb8000: 0x1040, + 0xc8000: 0x80000000, + 0xd8000: 0x400040, + 0xe8000: 0x401040, + 0xf8000: 0x80000040, + 0x100000: 0x400040, + 0x110000: 0x401000, + 0x120000: 0x80000040, + 0x130000: 0x0, + 0x140000: 0x1040, + 0x150000: 0x80400040, + 0x160000: 0x80401000, + 0x170000: 0x80001040, + 0x180000: 0x80401040, + 0x190000: 0x80000000, + 0x1a0000: 0x80400000, + 0x1b0000: 0x401040, + 0x1c0000: 0x80001000, + 0x1d0000: 0x400000, + 0x1e0000: 0x40, + 0x1f0000: 0x1000, + 0x108000: 0x80400000, + 0x118000: 0x80401040, + 0x128000: 0x0, + 0x138000: 0x401000, + 0x148000: 0x400040, + 0x158000: 0x80000000, + 0x168000: 0x80001040, + 0x178000: 0x40, + 0x188000: 0x80000040, + 0x198000: 0x1000, + 0x1a8000: 0x80001000, + 0x1b8000: 0x80400040, + 0x1c8000: 0x1040, + 0x1d8000: 0x80401000, + 0x1e8000: 0x400000, + 0x1f8000: 0x401040 + }, + { + 0x0: 0x80, + 0x1000: 0x1040000, + 0x2000: 0x40000, + 0x3000: 0x20000000, + 0x4000: 0x20040080, + 0x5000: 0x1000080, + 0x6000: 0x21000080, + 0x7000: 0x40080, + 0x8000: 0x1000000, + 0x9000: 0x20040000, + 0xa000: 0x20000080, + 0xb000: 0x21040080, + 0xc000: 0x21040000, + 0xd000: 0x0, + 0xe000: 0x1040080, + 0xf000: 0x21000000, + 0x800: 0x1040080, + 0x1800: 0x21000080, + 0x2800: 0x80, + 0x3800: 0x1040000, + 0x4800: 0x40000, + 0x5800: 0x20040080, + 0x6800: 0x21040000, + 0x7800: 0x20000000, + 0x8800: 0x20040000, + 0x9800: 0x0, + 0xa800: 0x21040080, + 0xb800: 0x1000080, + 0xc800: 0x20000080, + 0xd800: 0x21000000, + 0xe800: 0x1000000, + 0xf800: 0x40080, + 0x10000: 0x40000, + 0x11000: 0x80, + 0x12000: 0x20000000, + 0x13000: 0x21000080, + 0x14000: 0x1000080, + 0x15000: 0x21040000, + 0x16000: 0x20040080, + 0x17000: 0x1000000, + 0x18000: 0x21040080, + 0x19000: 0x21000000, + 0x1a000: 0x1040000, + 0x1b000: 0x20040000, + 0x1c000: 0x40080, + 0x1d000: 0x20000080, + 0x1e000: 0x0, + 0x1f000: 0x1040080, + 0x10800: 0x21000080, + 0x11800: 0x1000000, + 0x12800: 0x1040000, + 0x13800: 0x20040080, + 0x14800: 0x20000000, + 0x15800: 0x1040080, + 0x16800: 0x80, + 0x17800: 0x21040000, + 0x18800: 0x40080, + 0x19800: 0x21040080, + 0x1a800: 0x0, + 0x1b800: 0x21000000, + 0x1c800: 0x1000080, + 0x1d800: 0x40000, + 0x1e800: 0x20040000, + 0x1f800: 0x20000080 + }, + { + 0x0: 0x10000008, + 0x100: 0x2000, + 0x200: 0x10200000, + 0x300: 0x10202008, + 0x400: 0x10002000, + 0x500: 0x200000, + 0x600: 0x200008, + 0x700: 0x10000000, + 0x800: 0x0, + 0x900: 0x10002008, + 0xa00: 0x202000, + 0xb00: 0x8, + 0xc00: 0x10200008, + 0xd00: 0x202008, + 0xe00: 0x2008, + 0xf00: 0x10202000, + 0x80: 0x10200000, + 0x180: 0x10202008, + 0x280: 0x8, + 0x380: 0x200000, + 0x480: 0x202008, + 0x580: 0x10000008, + 0x680: 0x10002000, + 0x780: 0x2008, + 0x880: 0x200008, + 0x980: 0x2000, + 0xa80: 0x10002008, + 0xb80: 0x10200008, + 0xc80: 0x0, + 0xd80: 0x10202000, + 0xe80: 0x202000, + 0xf80: 0x10000000, + 0x1000: 0x10002000, + 0x1100: 0x10200008, + 0x1200: 0x10202008, + 0x1300: 0x2008, + 0x1400: 0x200000, + 0x1500: 0x10000000, + 0x1600: 0x10000008, + 0x1700: 0x202000, + 0x1800: 0x202008, + 0x1900: 0x0, + 0x1a00: 0x8, + 0x1b00: 0x10200000, + 0x1c00: 0x2000, + 0x1d00: 0x10002008, + 0x1e00: 0x10202000, + 0x1f00: 0x200008, + 0x1080: 0x8, + 0x1180: 0x202000, + 0x1280: 0x200000, + 0x1380: 0x10000008, + 0x1480: 0x10002000, + 0x1580: 0x2008, + 0x1680: 0x10202008, + 0x1780: 0x10200000, + 0x1880: 0x10202000, + 0x1980: 0x10200008, + 0x1a80: 0x2000, + 0x1b80: 0x202008, + 0x1c80: 0x200008, + 0x1d80: 0x0, + 0x1e80: 0x10000000, + 0x1f80: 0x10002008 + }, + { + 0x0: 0x100000, + 0x10: 0x2000401, + 0x20: 0x400, + 0x30: 0x100401, + 0x40: 0x2100401, + 0x50: 0x0, + 0x60: 0x1, + 0x70: 0x2100001, + 0x80: 0x2000400, + 0x90: 0x100001, + 0xa0: 0x2000001, + 0xb0: 0x2100400, + 0xc0: 0x2100000, + 0xd0: 0x401, + 0xe0: 0x100400, + 0xf0: 0x2000000, + 0x8: 0x2100001, + 0x18: 0x0, + 0x28: 0x2000401, + 0x38: 0x2100400, + 0x48: 0x100000, + 0x58: 0x2000001, + 0x68: 0x2000000, + 0x78: 0x401, + 0x88: 0x100401, + 0x98: 0x2000400, + 0xa8: 0x2100000, + 0xb8: 0x100001, + 0xc8: 0x400, + 0xd8: 0x2100401, + 0xe8: 0x1, + 0xf8: 0x100400, + 0x100: 0x2000000, + 0x110: 0x100000, + 0x120: 0x2000401, + 0x130: 0x2100001, + 0x140: 0x100001, + 0x150: 0x2000400, + 0x160: 0x2100400, + 0x170: 0x100401, + 0x180: 0x401, + 0x190: 0x2100401, + 0x1a0: 0x100400, + 0x1b0: 0x1, + 0x1c0: 0x0, + 0x1d0: 0x2100000, + 0x1e0: 0x2000001, + 0x1f0: 0x400, + 0x108: 0x100400, + 0x118: 0x2000401, + 0x128: 0x2100001, + 0x138: 0x1, + 0x148: 0x2000000, + 0x158: 0x100000, + 0x168: 0x401, + 0x178: 0x2100400, + 0x188: 0x2000001, + 0x198: 0x2100000, + 0x1a8: 0x0, + 0x1b8: 0x2100401, + 0x1c8: 0x100401, + 0x1d8: 0x400, + 0x1e8: 0x2000400, + 0x1f8: 0x100001 + }, + { + 0x0: 0x8000820, + 0x1: 0x20000, + 0x2: 0x8000000, + 0x3: 0x20, + 0x4: 0x20020, + 0x5: 0x8020820, + 0x6: 0x8020800, + 0x7: 0x800, + 0x8: 0x8020000, + 0x9: 0x8000800, + 0xa: 0x20800, + 0xb: 0x8020020, + 0xc: 0x820, + 0xd: 0x0, + 0xe: 0x8000020, + 0xf: 0x20820, + 0x80000000: 0x800, + 0x80000001: 0x8020820, + 0x80000002: 0x8000820, + 0x80000003: 0x8000000, + 0x80000004: 0x8020000, + 0x80000005: 0x20800, + 0x80000006: 0x20820, + 0x80000007: 0x20, + 0x80000008: 0x8000020, + 0x80000009: 0x820, + 0x8000000a: 0x20020, + 0x8000000b: 0x8020800, + 0x8000000c: 0x0, + 0x8000000d: 0x8020020, + 0x8000000e: 0x8000800, + 0x8000000f: 0x20000, + 0x10: 0x20820, + 0x11: 0x8020800, + 0x12: 0x20, + 0x13: 0x800, + 0x14: 0x8000800, + 0x15: 0x8000020, + 0x16: 0x8020020, + 0x17: 0x20000, + 0x18: 0x0, + 0x19: 0x20020, + 0x1a: 0x8020000, + 0x1b: 0x8000820, + 0x1c: 0x8020820, + 0x1d: 0x20800, + 0x1e: 0x820, + 0x1f: 0x8000000, + 0x80000010: 0x20000, + 0x80000011: 0x800, + 0x80000012: 0x8020020, + 0x80000013: 0x20820, + 0x80000014: 0x20, + 0x80000015: 0x8020000, + 0x80000016: 0x8000000, + 0x80000017: 0x8000820, + 0x80000018: 0x8020820, + 0x80000019: 0x8000020, + 0x8000001a: 0x8000800, + 0x8000001b: 0x0, + 0x8000001c: 0x20800, + 0x8000001d: 0x820, + 0x8000001e: 0x20020, + 0x8000001f: 0x8020800 + } + ]; + + // Masks that select the SBOX input + var SBOX_MASK = [ + 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, + 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f + ]; + + /** + * DES block cipher algorithm. + */ + var DES = C_algo.DES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Select 56 bits according to PC1 + var keyBits = []; + for (var i = 0; i < 56; i++) { + var keyBitPos = PC1[i] - 1; + keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; + } + + // Assemble 16 subkeys + var subKeys = this._subKeys = []; + for (var nSubKey = 0; nSubKey < 16; nSubKey++) { + // Create subkey + var subKey = subKeys[nSubKey] = []; + + // Shortcut + var bitShift = BIT_SHIFTS[nSubKey]; + + // Select 48 bits according to PC2 + for (var i = 0; i < 24; i++) { + // Select from the left 28 key bits + subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); + + // Select from the right 28 key bits + subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); + } + + // Since each subkey is applied to an expanded 32-bit input, + // the subkey can be broken into 8 values scaled to 32-bits, + // which allows the key to be used without expansion + subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); + for (var i = 1; i < 7; i++) { + subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); + } + subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); + } + + // Compute inverse subkeys + var invSubKeys = this._invSubKeys = []; + for (var i = 0; i < 16; i++) { + invSubKeys[i] = subKeys[15 - i]; + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._subKeys); + }, + + decryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._invSubKeys); + }, + + _doCryptBlock: function (M, offset, subKeys) { + // Get input + this._lBlock = M[offset]; + this._rBlock = M[offset + 1]; + + // Initial permutation + exchangeLR.call(this, 4, 0x0f0f0f0f); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeRL.call(this, 2, 0x33333333); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeLR.call(this, 1, 0x55555555); + + // Rounds + for (var round = 0; round < 16; round++) { + // Shortcuts + var subKey = subKeys[round]; + var lBlock = this._lBlock; + var rBlock = this._rBlock; + + // Feistel function + var f = 0; + for (var i = 0; i < 8; i++) { + f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; + } + this._lBlock = rBlock; + this._rBlock = lBlock ^ f; + } + + // Undo swap from last round + var t = this._lBlock; + this._lBlock = this._rBlock; + this._rBlock = t; + + // Final permutation + exchangeLR.call(this, 1, 0x55555555); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeRL.call(this, 2, 0x33333333); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeLR.call(this, 4, 0x0f0f0f0f); + + // Set output + M[offset] = this._lBlock; + M[offset + 1] = this._rBlock; + }, + + keySize: 64/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + // Swap bits across the left and right words + function exchangeLR(offset, mask) { + var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; + this._rBlock ^= t; + this._lBlock ^= t << offset; + } + + function exchangeRL(offset, mask) { + var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; + this._lBlock ^= t; + this._rBlock ^= t << offset; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); + */ + C.DES = BlockCipher._createHelper(DES); + + /** + * Triple-DES block cipher algorithm. + */ + var TripleDES = C_algo.TripleDES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Create DES instances + this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))); + this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))); + this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))); + }, + + encryptBlock: function (M, offset) { + this._des1.encryptBlock(M, offset); + this._des2.decryptBlock(M, offset); + this._des3.encryptBlock(M, offset); + }, + + decryptBlock: function (M, offset) { + this._des3.decryptBlock(M, offset); + this._des2.encryptBlock(M, offset); + this._des1.decryptBlock(M, offset); + }, + + keySize: 192/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); + */ + C.TripleDES = BlockCipher._createHelper(TripleDES); +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/components/x64-core-min.js b/src/main/webapp/websquare/externalJS/CryptoJS/components/x64-core-min.js new file mode 100644 index 0000000..0566f06 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/components/x64-core-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(g){var a=CryptoJS,f=a.lib,e=f.Base,h=f.WordArray,a=a.x64={};a.Word=e.extend({init:function(b,c){this.high=b;this.low=c}});a.WordArray=e.extend({init:function(b,c){b=this.words=b||[];this.sigBytes=c!=g?c:8*b.length},toX32:function(){for(var b=this.words,c=b.length,a=[],d=0;d>> (32 - n)); + // var low = this.low << n; + // } else { + // var high = this.low << (n - 32); + // var low = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the right. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftR(7); + */ + // shiftR: function (n) { + // if (n < 32) { + // var low = (this.low >>> n) | (this.high << (32 - n)); + // var high = this.high >>> n; + // } else { + // var low = this.high >>> (n - 32); + // var high = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Rotates this word n bits to the left. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotL(25); + */ + // rotL: function (n) { + // return this.shiftL(n).or(this.shiftR(64 - n)); + // }, + + /** + * Rotates this word n bits to the right. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotR(7); + */ + // rotR: function (n) { + // return this.shiftR(n).or(this.shiftL(64 - n)); + // }, + + /** + * Adds this word with the passed word. + * + * @param {X64Word} word The x64-Word to add with this word. + * + * @return {X64Word} A new x64-Word object after adding. + * + * @example + * + * var added = x64Word.add(anotherX64Word); + */ + // add: function (word) { + // var low = (this.low + word.low) | 0; + // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; + // var high = (this.high + word.high + carry) | 0; + + // return X64Word.create(high, low); + // } + }); + + /** + * An array of 64-bit words. + * + * @property {Array} words The array of CryptoJS.x64.Word objects. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var X64WordArray = C_x64.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.x64.WordArray.create(); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ]); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ], 10); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 8; + } + }, + + /** + * Converts this 64-bit word array to a 32-bit word array. + * + * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. + * + * @example + * + * var x32WordArray = x64WordArray.toX32(); + */ + toX32: function () { + // Shortcuts + var x64Words = this.words; + var x64WordsLength = x64Words.length; + + // Convert + var x32Words = []; + for (var i = 0; i < x64WordsLength; i++) { + var x64Word = x64Words[i]; + x32Words.push(x64Word.high); + x32Words.push(x64Word.low); + } + + return X32WordArray.create(x32Words, this.sigBytes); + }, + + /** + * Creates a copy of this word array. + * + * @return {X64WordArray} The clone. + * + * @example + * + * var clone = x64WordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + + // Clone "words" array + var words = clone.words = this.words.slice(0); + + // Clone each X64Word object + var wordsLength = words.length; + for (var i = 0; i < wordsLength; i++) { + words[i] = words[i].clone(); + } + + return clone; + } + }); +}()); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/rollups/aes.js b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/aes.js new file mode 100644 index 0000000..827503c --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/aes.js @@ -0,0 +1,35 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(u,p){var d={},l=d.lib={},s=function(){},t=l.Base={extend:function(a){s.prototype=this;var c=new s;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +r=l.WordArray=t.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=p?c:4*a.length},toString:function(a){return(a||v).stringify(this)},concat:function(a){var c=this.words,e=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var k=0;k>>2]|=(e[k>>>2]>>>24-8*(k%4)&255)<<24-8*((j+k)%4);else if(65535>>2]=e[k>>>2];else c.push.apply(c,e);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=u.ceil(c/4)},clone:function(){var a=t.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],e=0;e>>2]>>>24-8*(j%4)&255;e.push((k>>>4).toString(16));e.push((k&15).toString(16))}return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j>>3]|=parseInt(a.substr(j, +2),16)<<24-4*(j%8);return new r.init(e,c/2)}},b=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var e=[],j=0;j>>2]>>>24-8*(j%4)&255));return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new r.init(e,c)}},x=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(b.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return b.parse(unescape(encodeURIComponent(a)))}}, +q=l.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=x.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,e=c.words,j=c.sigBytes,k=this.blockSize,b=j/(4*k),b=a?u.ceil(b):u.max((b|0)-this._minBufferSize,0);a=b*k;j=u.min(4*a,j);if(a){for(var q=0;q>>2]>>>24-8*(r%4)&255)<<16|(l[r+1>>>2]>>>24-8*((r+1)%4)&255)<<8|l[r+2>>>2]>>>24-8*((r+2)%4)&255,v=0;4>v&&r+0.75*v>>6*(3-v)&63));if(l=t.charAt(64))for(;d.length%4;)d.push(l);return d.join("")},parse:function(d){var l=d.length,s=this._map,t=s.charAt(64);t&&(t=d.indexOf(t),-1!=t&&(l=t));for(var t=[],r=0,w=0;w< +l;w++)if(w%4){var v=s.indexOf(d.charAt(w-1))<<2*(w%4),b=s.indexOf(d.charAt(w))>>>6-2*(w%4);t[r>>>2]|=(v|b)<<24-8*(r%4);r++}return p.create(t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); +(function(u){function p(b,n,a,c,e,j,k){b=b+(n&a|~n&c)+e+k;return(b<>>32-j)+n}function d(b,n,a,c,e,j,k){b=b+(n&c|a&~c)+e+k;return(b<>>32-j)+n}function l(b,n,a,c,e,j,k){b=b+(n^a^c)+e+k;return(b<>>32-j)+n}function s(b,n,a,c,e,j,k){b=b+(a^(n|~c))+e+k;return(b<>>32-j)+n}for(var t=CryptoJS,r=t.lib,w=r.WordArray,v=r.Hasher,r=t.algo,b=[],x=0;64>x;x++)b[x]=4294967296*u.abs(u.sin(x+1))|0;r=r.MD5=v.extend({_doReset:function(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(q,n){for(var a=0;16>a;a++){var c=n+a,e=q[c];q[c]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360}var a=this._hash.words,c=q[n+0],e=q[n+1],j=q[n+2],k=q[n+3],z=q[n+4],r=q[n+5],t=q[n+6],w=q[n+7],v=q[n+8],A=q[n+9],B=q[n+10],C=q[n+11],u=q[n+12],D=q[n+13],E=q[n+14],x=q[n+15],f=a[0],m=a[1],g=a[2],h=a[3],f=p(f,m,g,h,c,7,b[0]),h=p(h,f,m,g,e,12,b[1]),g=p(g,h,f,m,j,17,b[2]),m=p(m,g,h,f,k,22,b[3]),f=p(f,m,g,h,z,7,b[4]),h=p(h,f,m,g,r,12,b[5]),g=p(g,h,f,m,t,17,b[6]),m=p(m,g,h,f,w,22,b[7]), +f=p(f,m,g,h,v,7,b[8]),h=p(h,f,m,g,A,12,b[9]),g=p(g,h,f,m,B,17,b[10]),m=p(m,g,h,f,C,22,b[11]),f=p(f,m,g,h,u,7,b[12]),h=p(h,f,m,g,D,12,b[13]),g=p(g,h,f,m,E,17,b[14]),m=p(m,g,h,f,x,22,b[15]),f=d(f,m,g,h,e,5,b[16]),h=d(h,f,m,g,t,9,b[17]),g=d(g,h,f,m,C,14,b[18]),m=d(m,g,h,f,c,20,b[19]),f=d(f,m,g,h,r,5,b[20]),h=d(h,f,m,g,B,9,b[21]),g=d(g,h,f,m,x,14,b[22]),m=d(m,g,h,f,z,20,b[23]),f=d(f,m,g,h,A,5,b[24]),h=d(h,f,m,g,E,9,b[25]),g=d(g,h,f,m,k,14,b[26]),m=d(m,g,h,f,v,20,b[27]),f=d(f,m,g,h,D,5,b[28]),h=d(h,f, +m,g,j,9,b[29]),g=d(g,h,f,m,w,14,b[30]),m=d(m,g,h,f,u,20,b[31]),f=l(f,m,g,h,r,4,b[32]),h=l(h,f,m,g,v,11,b[33]),g=l(g,h,f,m,C,16,b[34]),m=l(m,g,h,f,E,23,b[35]),f=l(f,m,g,h,e,4,b[36]),h=l(h,f,m,g,z,11,b[37]),g=l(g,h,f,m,w,16,b[38]),m=l(m,g,h,f,B,23,b[39]),f=l(f,m,g,h,D,4,b[40]),h=l(h,f,m,g,c,11,b[41]),g=l(g,h,f,m,k,16,b[42]),m=l(m,g,h,f,t,23,b[43]),f=l(f,m,g,h,A,4,b[44]),h=l(h,f,m,g,u,11,b[45]),g=l(g,h,f,m,x,16,b[46]),m=l(m,g,h,f,j,23,b[47]),f=s(f,m,g,h,c,6,b[48]),h=s(h,f,m,g,w,10,b[49]),g=s(g,h,f,m, +E,15,b[50]),m=s(m,g,h,f,r,21,b[51]),f=s(f,m,g,h,u,6,b[52]),h=s(h,f,m,g,k,10,b[53]),g=s(g,h,f,m,B,15,b[54]),m=s(m,g,h,f,e,21,b[55]),f=s(f,m,g,h,v,6,b[56]),h=s(h,f,m,g,x,10,b[57]),g=s(g,h,f,m,t,15,b[58]),m=s(m,g,h,f,D,21,b[59]),f=s(f,m,g,h,z,6,b[60]),h=s(h,f,m,g,C,10,b[61]),g=s(g,h,f,m,j,15,b[62]),m=s(m,g,h,f,A,21,b[63]);a[0]=a[0]+f|0;a[1]=a[1]+m|0;a[2]=a[2]+g|0;a[3]=a[3]+h|0},_doFinalize:function(){var b=this._data,n=b.words,a=8*this._nDataBytes,c=8*b.sigBytes;n[c>>>5]|=128<<24-c%32;var e=u.floor(a/ +4294967296);n[(c+64>>>9<<4)+15]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;n[(c+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;b.sigBytes=4*(n.length+1);this._process();b=this._hash;n=b.words;for(a=0;4>a;a++)c=n[a],n[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return b},clone:function(){var b=v.clone.call(this);b._hash=this._hash.clone();return b}});t.MD5=v._createHelper(r);t.HmacMD5=v._createHmacHelper(r)})(Math); +(function(){var u=CryptoJS,p=u.lib,d=p.Base,l=p.WordArray,p=u.algo,s=p.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:p.MD5,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,r){for(var p=this.cfg,s=p.hasher.create(),b=l.create(),u=b.words,q=p.keySize,p=p.iterations;u.length>>2]&255}};d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:q}),reset:function(){v.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a, +this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var n=d.CipherParams=l.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),b=(p.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?s.create([1398893684, +1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=s.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return n.create({ciphertext:a,salt:c})}},a=d.SerializableCipher=l.extend({cfg:l.extend({format:b}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var l=a.createEncryptor(c,d);b=l.finalize(b);l=l.cfg;return n.create({ciphertext:b,key:c,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})}, +decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),p=(p.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=s.random(8));a=w.create({keySize:b+c}).compute(a,d);c=s.create(a.words.slice(b),4*c);a.sigBytes=4*b;return n.create({key:a,iv:c,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:p}),encrypt:function(b,c,d,l){l=this.cfg.extend(l);d=l.kdf.execute(d, +b.keySize,b.ivSize);l.iv=d.iv;b=a.encrypt.call(this,b,c,d.key,l);b.mixIn(d);return b},decrypt:function(b,c,d,l){l=this.cfg.extend(l);c=this._parse(c,l.format);d=l.kdf.execute(d,b.keySize,b.ivSize,c.salt);l.iv=d.iv;return a.decrypt.call(this,b,c,d.key,l)}})}(); +(function(){for(var u=CryptoJS,p=u.lib.BlockCipher,d=u.algo,l=[],s=[],t=[],r=[],w=[],v=[],b=[],x=[],q=[],n=[],a=[],c=0;256>c;c++)a[c]=128>c?c<<1:c<<1^283;for(var e=0,j=0,c=0;256>c;c++){var k=j^j<<1^j<<2^j<<3^j<<4,k=k>>>8^k&255^99;l[e]=k;s[k]=e;var z=a[e],F=a[z],G=a[F],y=257*a[k]^16843008*k;t[e]=y<<24|y>>>8;r[e]=y<<16|y>>>16;w[e]=y<<8|y>>>24;v[e]=y;y=16843009*G^65537*F^257*z^16843008*e;b[k]=y<<24|y>>>8;x[k]=y<<16|y>>>16;q[k]=y<<8|y>>>24;n[k]=y;e?(e=z^a[a[a[G^z]]],j^=a[a[j]]):e=j=1}var H=[0,1,2,4,8, +16,32,64,128,27,54],d=d.AES=p.extend({_doReset:function(){for(var a=this._key,c=a.words,d=a.sigBytes/4,a=4*((this._nRounds=d+6)+1),e=this._keySchedule=[],j=0;j>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255]):(k=k<<8|k>>>24,k=l[k>>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255],k^=H[j/d|0]<<24);e[j]=e[j-d]^k}c=this._invKeySchedule=[];for(d=0;dd||4>=j?k:b[l[k>>>24]]^x[l[k>>>16&255]]^q[l[k>>> +8&255]]^n[l[k&255]]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,t,r,w,v,l)},decryptBlock:function(a,c){var d=a[c+1];a[c+1]=a[c+3];a[c+3]=d;this._doCryptBlock(a,c,this._invKeySchedule,b,x,q,n,s);d=a[c+1];a[c+1]=a[c+3];a[c+3]=d},_doCryptBlock:function(a,b,c,d,e,j,l,f){for(var m=this._nRounds,g=a[b]^c[0],h=a[b+1]^c[1],k=a[b+2]^c[2],n=a[b+3]^c[3],p=4,r=1;r>>24]^e[h>>>16&255]^j[k>>>8&255]^l[n&255]^c[p++],s=d[h>>>24]^e[k>>>16&255]^j[n>>>8&255]^l[g&255]^c[p++],t= +d[k>>>24]^e[n>>>16&255]^j[g>>>8&255]^l[h&255]^c[p++],n=d[n>>>24]^e[g>>>16&255]^j[h>>>8&255]^l[k&255]^c[p++],g=q,h=s,k=t;q=(f[g>>>24]<<24|f[h>>>16&255]<<16|f[k>>>8&255]<<8|f[n&255])^c[p++];s=(f[h>>>24]<<24|f[k>>>16&255]<<16|f[n>>>8&255]<<8|f[g&255])^c[p++];t=(f[k>>>24]<<24|f[n>>>16&255]<<16|f[g>>>8&255]<<8|f[h&255])^c[p++];n=(f[n>>>24]<<24|f[g>>>16&255]<<16|f[h>>>8&255]<<8|f[k&255])^c[p++];a[b]=q;a[b+1]=s;a[b+2]=t;a[b+3]=n},keySize:8});u.AES=p._createHelper(d)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/rollups/hmac-md5.js b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/hmac-md5.js new file mode 100644 index 0000000..085eb4a --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/hmac-md5.js @@ -0,0 +1,21 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(q,r){var k={},g=k.lib={},p=function(){},t=g.Base={extend:function(b){p.prototype=this;var j=new p;b&&j.mixIn(b);j.hasOwnProperty("init")||(j.init=function(){j.$super.init.apply(this,arguments)});j.init.prototype=j;j.$super=this;return j},create:function(){var b=this.extend();b.init.apply(b,arguments);return b},init:function(){},mixIn:function(b){for(var j in b)b.hasOwnProperty(j)&&(this[j]=b[j]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}, +n=g.WordArray=t.extend({init:function(b,j){b=this.words=b||[];this.sigBytes=j!=r?j:4*b.length},toString:function(b){return(b||u).stringify(this)},concat:function(b){var j=this.words,a=b.words,l=this.sigBytes;b=b.sigBytes;this.clamp();if(l%4)for(var h=0;h>>2]|=(a[h>>>2]>>>24-8*(h%4)&255)<<24-8*((l+h)%4);else if(65535>>2]=a[h>>>2];else j.push.apply(j,a);this.sigBytes+=b;return this},clamp:function(){var b=this.words,j=this.sigBytes;b[j>>>2]&=4294967295<< +32-8*(j%4);b.length=q.ceil(j/4)},clone:function(){var b=t.clone.call(this);b.words=this.words.slice(0);return b},random:function(b){for(var j=[],a=0;a>>2]>>>24-8*(l%4)&255;h.push((m>>>4).toString(16));h.push((m&15).toString(16))}return h.join("")},parse:function(b){for(var a=b.length,h=[],l=0;l>>3]|=parseInt(b.substr(l, +2),16)<<24-4*(l%8);return new n.init(h,a/2)}},a=v.Latin1={stringify:function(b){var a=b.words;b=b.sigBytes;for(var h=[],l=0;l>>2]>>>24-8*(l%4)&255));return h.join("")},parse:function(b){for(var a=b.length,h=[],l=0;l>>2]|=(b.charCodeAt(l)&255)<<24-8*(l%4);return new n.init(h,a)}},s=v.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(h){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, +h=g.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new n.init;this._nDataBytes=0},_append:function(b){"string"==typeof b&&(b=s.parse(b));this._data.concat(b);this._nDataBytes+=b.sigBytes},_process:function(b){var a=this._data,h=a.words,l=a.sigBytes,m=this.blockSize,k=l/(4*m),k=b?q.ceil(k):q.max((k|0)-this._minBufferSize,0);b=k*m;l=q.min(4*b,l);if(b){for(var g=0;g>>32-l)+m}function k(a,m,b,j,g,l,k){a=a+(m&j|b&~j)+g+k;return(a<>>32-l)+m}function g(a,m,b,j,g,l,k){a=a+(m^b^j)+g+k;return(a<>>32-l)+m}function p(a,g,b,j,k,l,p){a=a+(b^(g|~j))+k+p;return(a<>>32-l)+g}for(var t=CryptoJS,n=t.lib,v=n.WordArray,u=n.Hasher,n=t.algo,a=[],s=0;64>s;s++)a[s]=4294967296*q.abs(q.sin(s+1))|0;n=n.MD5=u.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(h,m){for(var b=0;16>b;b++){var j=m+b,n=h[j];h[j]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var b=this._hash.words,j=h[m+0],n=h[m+1],l=h[m+2],q=h[m+3],t=h[m+4],s=h[m+5],u=h[m+6],v=h[m+7],w=h[m+8],x=h[m+9],y=h[m+10],z=h[m+11],A=h[m+12],B=h[m+13],C=h[m+14],D=h[m+15],c=b[0],d=b[1],e=b[2],f=b[3],c=r(c,d,e,f,j,7,a[0]),f=r(f,c,d,e,n,12,a[1]),e=r(e,f,c,d,l,17,a[2]),d=r(d,e,f,c,q,22,a[3]),c=r(c,d,e,f,t,7,a[4]),f=r(f,c,d,e,s,12,a[5]),e=r(e,f,c,d,u,17,a[6]),d=r(d,e,f,c,v,22,a[7]), +c=r(c,d,e,f,w,7,a[8]),f=r(f,c,d,e,x,12,a[9]),e=r(e,f,c,d,y,17,a[10]),d=r(d,e,f,c,z,22,a[11]),c=r(c,d,e,f,A,7,a[12]),f=r(f,c,d,e,B,12,a[13]),e=r(e,f,c,d,C,17,a[14]),d=r(d,e,f,c,D,22,a[15]),c=k(c,d,e,f,n,5,a[16]),f=k(f,c,d,e,u,9,a[17]),e=k(e,f,c,d,z,14,a[18]),d=k(d,e,f,c,j,20,a[19]),c=k(c,d,e,f,s,5,a[20]),f=k(f,c,d,e,y,9,a[21]),e=k(e,f,c,d,D,14,a[22]),d=k(d,e,f,c,t,20,a[23]),c=k(c,d,e,f,x,5,a[24]),f=k(f,c,d,e,C,9,a[25]),e=k(e,f,c,d,q,14,a[26]),d=k(d,e,f,c,w,20,a[27]),c=k(c,d,e,f,B,5,a[28]),f=k(f,c, +d,e,l,9,a[29]),e=k(e,f,c,d,v,14,a[30]),d=k(d,e,f,c,A,20,a[31]),c=g(c,d,e,f,s,4,a[32]),f=g(f,c,d,e,w,11,a[33]),e=g(e,f,c,d,z,16,a[34]),d=g(d,e,f,c,C,23,a[35]),c=g(c,d,e,f,n,4,a[36]),f=g(f,c,d,e,t,11,a[37]),e=g(e,f,c,d,v,16,a[38]),d=g(d,e,f,c,y,23,a[39]),c=g(c,d,e,f,B,4,a[40]),f=g(f,c,d,e,j,11,a[41]),e=g(e,f,c,d,q,16,a[42]),d=g(d,e,f,c,u,23,a[43]),c=g(c,d,e,f,x,4,a[44]),f=g(f,c,d,e,A,11,a[45]),e=g(e,f,c,d,D,16,a[46]),d=g(d,e,f,c,l,23,a[47]),c=p(c,d,e,f,j,6,a[48]),f=p(f,c,d,e,v,10,a[49]),e=p(e,f,c,d, +C,15,a[50]),d=p(d,e,f,c,s,21,a[51]),c=p(c,d,e,f,A,6,a[52]),f=p(f,c,d,e,q,10,a[53]),e=p(e,f,c,d,y,15,a[54]),d=p(d,e,f,c,n,21,a[55]),c=p(c,d,e,f,w,6,a[56]),f=p(f,c,d,e,D,10,a[57]),e=p(e,f,c,d,u,15,a[58]),d=p(d,e,f,c,B,21,a[59]),c=p(c,d,e,f,t,6,a[60]),f=p(f,c,d,e,z,10,a[61]),e=p(e,f,c,d,l,15,a[62]),d=p(d,e,f,c,x,21,a[63]);b[0]=b[0]+c|0;b[1]=b[1]+d|0;b[2]=b[2]+e|0;b[3]=b[3]+f|0},_doFinalize:function(){var a=this._data,g=a.words,b=8*this._nDataBytes,j=8*a.sigBytes;g[j>>>5]|=128<<24-j%32;var k=q.floor(b/ +4294967296);g[(j+64>>>9<<4)+15]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360;g[(j+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;a.sigBytes=4*(g.length+1);this._process();a=this._hash;g=a.words;for(b=0;4>b;b++)j=g[b],g[b]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360;return a},clone:function(){var a=u.clone.call(this);a._hash=this._hash.clone();return a}});t.MD5=u._createHelper(n);t.HmacMD5=u._createHmacHelper(n)})(Math); +(function(){var q=CryptoJS,r=q.enc.Utf8;q.algo.HMAC=q.lib.Base.extend({init:function(k,g){k=this._hasher=new k.init;"string"==typeof g&&(g=r.parse(g));var p=k.blockSize,q=4*p;g.sigBytes>q&&(g=k.finalize(g));g.clamp();for(var n=this._oKey=g.clone(),v=this._iKey=g.clone(),u=n.words,a=v.words,s=0;s>>2]|=(B[b>>>2]>>>24-8*(b%4)&255)<<24-8*((f+b)%4);else if(65535>>2]=B[b>>>2];else d.push.apply(d,B);this.sigBytes+=a;return this},clamp:function(){var a=this.words,d=this.sigBytes;a[d>>>2]&=4294967295<< +32-8*(d%4);a.length=h.ceil(d/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var d=[],b=0;b>>2]>>>24-8*(f%4)&255;b.push((c>>>4).toString(16));b.push((c&15).toString(16))}return b.join("")},parse:function(a){for(var d=a.length,b=[],f=0;f>>3]|=parseInt(a.substr(f, +2),16)<<24-4*(f%8);return new m.init(b,d/2)}},w=v.Latin1={stringify:function(a){var d=a.words;a=a.sigBytes;for(var b=[],f=0;f>>2]>>>24-8*(f%4)&255));return b.join("")},parse:function(a){for(var b=a.length,c=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new m.init(c,b)}},k=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(w.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return w.parse(unescape(encodeURIComponent(a)))}}, +u=e.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new m.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,c=b.words,f=b.sigBytes,e=this.blockSize,k=f/(4*e),k=a?h.ceil(k):h.max((k|0)-this._minBufferSize,0);a=k*e;f=h.min(4*a,f);if(a){for(var u=0;ub;b++){var a=e+b,d=c[a];c[a]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360}var a=this._hash.words,d=x.words,h=w.words,f=A.words,j=l.words,E=m.words,F=v.words,C,n,p,q,y,D,r,s,t,z;D=C=a[0];r=n=a[1];s=p=a[2];t=q=a[3];z=y=a[4];for(var g,b=0;80>b;b+=1)g=C+c[e+f[b]]|0,g=16>b?g+((n^p^q)+d[0]):32>b?g+((n&p|~n&q)+d[1]):48>b? +g+(((n|~p)^q)+d[2]):64>b?g+((n&q|p&~q)+d[3]):g+((n^(p|~q))+d[4]),g|=0,g=g<>>32-E[b],g=g+y|0,C=y,y=q,q=p<<10|p>>>22,p=n,n=g,g=D+c[e+j[b]]|0,g=16>b?g+((r^(s|~t))+h[0]):32>b?g+((r&t|s&~t)+h[1]):48>b?g+(((r|~s)^t)+h[2]):64>b?g+((r&s|~r&t)+h[3]):g+((r^s^t)+h[4]),g|=0,g=g<>>32-F[b],g=g+z|0,D=z,z=t,t=s<<10|s>>>22,s=r,r=g;g=a[1]+p+t|0;a[1]=a[2]+q+z|0;a[2]=a[3]+y+D|0;a[3]=a[4]+C+r|0;a[4]=a[0]+n+s|0;a[0]=g},_doFinalize:function(){var c=this._data,e=c.words,b=8*this._nDataBytes,a=8*c.sigBytes; +e[a>>>5]|=128<<24-a%32;e[(a+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;c.sigBytes=4*(e.length+1);this._process();c=this._hash;e=c.words;for(b=0;5>b;b++)a=e[b],e[b]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;return c},clone:function(){var c=e.clone.call(this);c._hash=this._hash.clone();return c}});h.RIPEMD160=e._createHelper(j);h.HmacRIPEMD160=e._createHmacHelper(j)})(Math); +(function(){var h=CryptoJS,j=h.enc.Utf8;h.algo.HMAC=h.lib.Base.extend({init:function(c,e){c=this._hasher=new c.init;"string"==typeof e&&(e=j.parse(e));var h=c.blockSize,l=4*h;e.sigBytes>l&&(e=c.finalize(e));e.clamp();for(var m=this._oKey=e.clone(),v=this._iKey=e.clone(),x=m.words,w=v.words,k=0;k>>2]|=(q[b>>>2]>>>24-8*(b%4)&255)<<24-8*((f+b)%4);else if(65535>>2]=q[b>>>2];else c.push.apply(c,q);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=k.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(f%4)&255;b.push((d>>>4).toString(16));b.push((d&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>3]|=parseInt(a.substr(f, +2),16)<<24-4*(f%8);return new p.init(b,c/2)}},j=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],f=0;f>>2]>>>24-8*(f%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new p.init(b,c)}},h=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}}, +r=d.BufferedBlockAlgorithm=k.extend({reset:function(){this._data=new p.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=h.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,b=c.words,f=c.sigBytes,d=this.blockSize,e=f/(4*d),e=a?g.ceil(e):g.max((e|0)-this._minBufferSize,0);a=e*d;f=g.min(4*a,f);if(a){for(var k=0;ka;a++){if(16>a)m[a]=d[e+a]|0;else{var c=m[a-3]^m[a-8]^m[a-14]^m[a-16];m[a]=c<<1|c>>>31}c=(n<<5|n>>>27)+l+m[a];c=20>a?c+((j&h|~j&g)+1518500249):40>a?c+((j^h^g)+1859775393):60>a?c+((j&h|j&g|h&g)-1894007588):c+((j^h^ +g)-899497514);l=g;g=h;h=j<<30|j>>>2;j=n;n=c}b[0]=b[0]+n|0;b[1]=b[1]+j|0;b[2]=b[2]+h|0;b[3]=b[3]+g|0;b[4]=b[4]+l|0},_doFinalize:function(){var d=this._data,e=d.words,b=8*this._nDataBytes,g=8*d.sigBytes;e[g>>>5]|=128<<24-g%32;e[(g+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(g+64>>>9<<4)+15]=b;d.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=d.clone.call(this);e._hash=this._hash.clone();return e}});g.SHA1=d._createHelper(l);g.HmacSHA1=d._createHmacHelper(l)})(); +(function(){var g=CryptoJS,l=g.enc.Utf8;g.algo.HMAC=g.lib.Base.extend({init:function(e,d){e=this._hasher=new e.init;"string"==typeof d&&(d=l.parse(d));var g=e.blockSize,k=4*g;d.sigBytes>k&&(d=e.finalize(d));d.clamp();for(var p=this._oKey=d.clone(),b=this._iKey=d.clone(),n=p.words,j=b.words,h=0;h>>2]|=(f[g>>>2]>>>24-8*(g%4)&255)<<24-8*((b+g)%4);else if(65535>>2]=f[g>>>2];else d.push.apply(d,f);this.sigBytes+=a;return this},clamp:function(){var a=this.words,d=this.sigBytes;a[d>>>2]&=4294967295<< +32-8*(d%4);a.length=j.ceil(d/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var d=[],f=0;f>>2]>>>24-8*(b%4)&255;f.push((g>>>4).toString(16));f.push((g&15).toString(16))}return f.join("")},parse:function(a){for(var d=a.length,f=[],b=0;b>>3]|=parseInt(a.substr(b, +2),16)<<24-4*(b%8);return new r.init(f,d/2)}},n=s.Latin1={stringify:function(a){var d=a.words;a=a.sigBytes;for(var f=[],b=0;b>>2]>>>24-8*(b%4)&255));return f.join("")},parse:function(a){for(var d=a.length,f=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new r.init(f,d)}},h=s.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(d){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, +u=e.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=h.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var d=this._data,f=d.words,b=d.sigBytes,g=this.blockSize,c=b/(4*g),c=a?j.ceil(c):j.max((c|0)-this._minBufferSize,0);a=c*g;b=j.min(4*a,b);if(a){for(var e=0;en;){var h;a:{h=l;for(var u=j.sqrt(h),t=2;t<=u;t++)if(!(h%t)){h=!1;break a}h=!0}h&&(8>n&&(m[n]=s(j.pow(l,0.5))),r[n]=s(j.pow(l,1/3)),n++);l++}var a=[],c=c.SHA256=p.extend({_doReset:function(){this._hash=new e.init(m.slice(0))},_doProcessBlock:function(d,f){for(var b=this._hash.words,g=b[0],c=b[1],e=b[2],j=b[3],h=b[4],p=b[5],m=b[6],n=b[7],q=0;64>q;q++){if(16>q)a[q]= +d[f+q]|0;else{var k=a[q-15],l=a[q-2];a[q]=((k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3)+a[q-7]+((l<<15|l>>>17)^(l<<13|l>>>19)^l>>>10)+a[q-16]}k=n+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&p^~h&m)+r[q]+a[q];l=((g<<30|g>>>2)^(g<<19|g>>>13)^(g<<10|g>>>22))+(g&c^g&e^c&e);n=m;m=p;p=h;h=j+k|0;j=e;e=c;c=g;g=k+l|0}b[0]=b[0]+g|0;b[1]=b[1]+c|0;b[2]=b[2]+e|0;b[3]=b[3]+j|0;b[4]=b[4]+h|0;b[5]=b[5]+p|0;b[6]=b[6]+m|0;b[7]=b[7]+n|0},_doFinalize:function(){var a=this._data,c=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; +c[e>>>5]|=128<<24-e%32;c[(e+64>>>9<<4)+14]=j.floor(b/4294967296);c[(e+64>>>9<<4)+15]=b;a.sigBytes=4*c.length;this._process();return this._hash},clone:function(){var a=p.clone.call(this);a._hash=this._hash.clone();return a}});k.SHA256=p._createHelper(c);k.HmacSHA256=p._createHmacHelper(c)})(Math); +(function(){var j=CryptoJS,k=j.lib.WordArray,c=j.algo,e=c.SHA256,c=c.SHA224=e.extend({_doReset:function(){this._hash=new k.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=e._doFinalize.call(this);c.sigBytes-=4;return c}});j.SHA224=e._createHelper(c);j.HmacSHA224=e._createHmacHelper(c)})(); +(function(){var j=CryptoJS,k=j.enc.Utf8;j.algo.HMAC=j.lib.Base.extend({init:function(c,e){c=this._hasher=new c.init;"string"==typeof e&&(e=k.parse(e));var j=c.blockSize,m=4*j;e.sigBytes>m&&(e=c.finalize(e));e.clamp();for(var r=this._oKey=e.clone(),s=this._iKey=e.clone(),l=r.words,n=s.words,h=0;h>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, +2),16)<<24-4*(b%8);return new r.init(d,c/2)}},n=l.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new r.init(d,c)}},j=l.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, +u=g.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var g=0;gn;){var j;a:{j=k;for(var u=h.sqrt(j),t=2;t<=u;t++)if(!(j%t)){j=!1;break a}j=!0}j&&(8>n&&(m[n]=l(h.pow(k,0.5))),r[n]=l(h.pow(k,1/3)),n++);k++}var a=[],f=f.SHA256=q.extend({_doReset:function(){this._hash=new g.init(m.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],g=b[2],j=b[3],h=b[4],m=b[5],n=b[6],q=b[7],p=0;64>p;p++){if(16>p)a[p]= +c[d+p]|0;else{var k=a[p-15],l=a[p-2];a[p]=((k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3)+a[p-7]+((l<<15|l>>>17)^(l<<13|l>>>19)^l>>>10)+a[p-16]}k=q+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&m^~h&n)+r[p]+a[p];l=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&g^f&g);q=n;n=m;m=h;h=j+k|0;j=g;g=f;f=e;e=k+l|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+g|0;b[3]=b[3]+j|0;b[4]=b[4]+h|0;b[5]=b[5]+m|0;b[6]=b[6]+n|0;b[7]=b[7]+q|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; +d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=q.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=q._createHelper(f);s.HmacSHA256=q._createHmacHelper(f)})(Math); +(function(){var h=CryptoJS,s=h.enc.Utf8;h.algo.HMAC=h.lib.Base.extend({init:function(f,g){f=this._hasher=new f.init;"string"==typeof g&&(g=s.parse(g));var h=f.blockSize,m=4*h;g.sigBytes>m&&(g=f.finalize(g));g.clamp();for(var r=this._oKey=g.clone(),l=this._iKey=g.clone(),k=r.words,n=l.words,j=0;j>>2]|=(e[p>>>2]>>>24-8*(p%4)&255)<<24-8*((j+p)%4);else if(65535>>2]=e[p>>>2];else b.push.apply(b,e);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< +32-8*(b%4);a.length=q.ceil(b/4)},clone:function(){var a=s.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],e=0;e>>2]>>>24-8*(j%4)&255;e.push((p>>>4).toString(16));e.push((p&15).toString(16))}return e.join("")},parse:function(a){for(var b=a.length,e=[],j=0;j>>3]|=parseInt(a.substr(j, +2),16)<<24-4*(j%8);return new t.init(e,b/2)}},g=w.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var e=[],j=0;j>>2]>>>24-8*(j%4)&255));return e.join("")},parse:function(a){for(var b=a.length,e=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new t.init(e,b)}},n=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(g.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return g.parse(unescape(encodeURIComponent(a)))}}, +u=d.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new t.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=n.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,e=b.words,j=b.sigBytes,p=this.blockSize,c=j/(4*p),c=a?q.ceil(c):q.max((c|0)-this._minBufferSize,0);a=c*p;j=q.min(4*a,j);if(a){for(var g=0;gu;u++){t[g+5*n]=(u+1)*(u+2)/2%64;var x=(2*g+3*n)%5,g=n%5,n=x}for(g=0;5>g;g++)for(n=0;5>n;n++)w[g+5*n]=n+5*((2*g+3*n)%5);g=1;for(n=0;24>n;n++){for(var a=x=u=0;7>a;a++){if(g&1){var b=(1<b?x^=1<g;g++)e[g]=s.create();c=c.SHA3=v.extend({cfg:v.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state= +[],b=0;25>b;b++)a[b]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,g=this.blockSize/2,k=0;k>>24)&16711935|(d<<24|d>>>8)&4278255360,l=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,h=c[k];h.high^=l;h.low^=d}for(g=0;24>g;g++){for(k=0;5>k;k++){for(var f=d=0,m=0;5>m;m++)h=c[k+5*m],d^=h.high,f^=h.low;h=e[k];h.high=d;h.low=f}for(k=0;5>k;k++){h=e[(k+4)%5];d=e[(k+1)%5];l=d.high;m=d.low;d=h.high^ +(l<<1|m>>>31);f=h.low^(m<<1|l>>>31);for(m=0;5>m;m++)h=c[k+5*m],h.high^=d,h.low^=f}for(l=1;25>l;l++)h=c[l],k=h.high,h=h.low,m=t[l],32>m?(d=k<>>32-m,f=h<>>32-m):(d=h<>>64-m,f=k<>>64-m),h=e[w[l]],h.high=d,h.low=f;h=e[0];k=c[0];h.high=k.high;h.low=k.low;for(k=0;5>k;k++)for(m=0;5>m;m++)l=k+5*m,h=c[l],d=e[l],l=e[(k+1)%5+5*m],f=e[(k+2)%5+5*m],h.high=d.high^~l.high&f.high,h.low=d.low^~l.low&f.low;h=c[0];k=r[g];h.high^=k.high;h.low^=k.low}},_doFinalize:function(){var a=this._data, +b=a.words,c=8*a.sigBytes,e=32*this.blockSize;b[c>>>5]|=1<<24-c%32;b[(q.ceil((c+1)/e)*e>>>5)-1]|=128;a.sigBytes=4*b.length;this._process();for(var a=this._state,b=this.cfg.outputLength/8,c=b/8,e=[],g=0;g>>24)&16711935|(l<<24|l>>>8)&4278255360,f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360;e.push(f);e.push(l)}return new d.init(e,b)},clone:function(){for(var a=v.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}}); +f.SHA3=v._createHelper(c);f.HmacSHA3=v._createHmacHelper(c)})(Math); +(function(){var q=CryptoJS,f=q.enc.Utf8;q.algo.HMAC=q.lib.Base.extend({init:function(c,d){c=this._hasher=new c.init;"string"==typeof d&&(d=f.parse(d));var q=c.blockSize,s=4*q;d.sigBytes>s&&(d=c.finalize(d));d.clamp();for(var t=this._oKey=d.clone(),w=this._iKey=d.clone(),r=t.words,g=w.words,n=0;n>>2]|=(c[b>>>2]>>>24-8*(b%4)&255)<<24-8*((e+b)%4);else if(65535>>2]=c[b>>>2];else g.push.apply(g,c);this.sigBytes+=a;return this},clamp:function(){var C=this.words,g=this.sigBytes;C[g>>>2]&=4294967295<< +32-8*(g%4);C.length=a.ceil(g/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(C){for(var g=[],b=0;b>>2]>>>24-8*(e%4)&255;b.push((c>>>4).toString(16));b.push((c&15).toString(16))}return b.join("")},parse:function(a){for(var b=a.length,c=[],e=0;e>>3]|=parseInt(a.substr(e, +2),16)<<24-4*(e%8);return new u.init(c,b/2)}},x=k.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],e=0;e>>2]>>>24-8*(e%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],e=0;e>>2]|=(a.charCodeAt(e)&255)<<24-8*(e%4);return new u.init(c,b)}},y=k.Utf8={stringify:function(a){try{return decodeURIComponent(escape(x.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return x.parse(unescape(encodeURIComponent(a)))}}, +$=b.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new u.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=y.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,l=c.words,e=c.sigBytes,d=this.blockSize,f=e/(4*d),f=b?a.ceil(f):a.max((f|0)-this._minBufferSize,0);b=f*d;e=a.min(4*b,e);if(b){for(var k=0;km;m++)k[m]=a();b=b.SHA512=c.extend({_doReset:function(){this._hash=new l.init([new f.init(1779033703,4089235720),new f.init(3144134277,2227873595),new f.init(1013904242,4271175723),new f.init(2773480762,1595750129),new f.init(1359893119,2917565137),new f.init(2600822924,725511199),new f.init(528734635,4215389547),new f.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words, +d=c[0],f=c[1],g=c[2],l=c[3],e=c[4],m=c[5],L=c[6],c=c[7],Z=d.high,M=d.low,aa=f.high,N=f.low,ba=g.high,O=g.low,ca=l.high,P=l.low,da=e.high,Q=e.low,ea=m.high,R=m.low,fa=L.high,S=L.low,ga=c.high,T=c.low,r=Z,n=M,F=aa,D=N,G=ba,E=O,W=ca,H=P,s=da,p=Q,U=ea,I=R,V=fa,J=S,X=ga,K=T,t=0;80>t;t++){var z=k[t];if(16>t)var q=z.high=a[b+2*t]|0,h=z.low=a[b+2*t+1]|0;else{var q=k[t-15],h=q.high,v=q.low,q=(h>>>1|v<<31)^(h>>>8|v<<24)^h>>>7,v=(v>>>1|h<<31)^(v>>>8|h<<24)^(v>>>7|h<<25),B=k[t-2],h=B.high,j=B.low,B=(h>>>19|j<< +13)^(h<<3|j>>>29)^h>>>6,j=(j>>>19|h<<13)^(j<<3|h>>>29)^(j>>>6|h<<26),h=k[t-7],Y=h.high,A=k[t-16],w=A.high,A=A.low,h=v+h.low,q=q+Y+(h>>>0>>0?1:0),h=h+j,q=q+B+(h>>>0>>0?1:0),h=h+A,q=q+w+(h>>>0>>0?1:0);z.high=q;z.low=h}var Y=s&U^~s&V,A=p&I^~p&J,z=r&F^r&G^F&G,ja=n&D^n&E^D&E,v=(r>>>28|n<<4)^(r<<30|n>>>2)^(r<<25|n>>>7),B=(n>>>28|r<<4)^(n<<30|r>>>2)^(n<<25|r>>>7),j=u[t],ka=j.high,ha=j.low,j=K+((p>>>14|s<<18)^(p>>>18|s<<14)^(p<<23|s>>>9)),w=X+((s>>>14|p<<18)^(s>>>18|p<<14)^(s<<23|p>>>9))+(j>>>0< +K>>>0?1:0),j=j+A,w=w+Y+(j>>>0>>0?1:0),j=j+ha,w=w+ka+(j>>>0>>0?1:0),j=j+h,w=w+q+(j>>>0>>0?1:0),h=B+ja,z=v+z+(h>>>0>>0?1:0),X=V,K=J,V=U,J=I,U=s,I=p,p=H+j|0,s=W+w+(p>>>0>>0?1:0)|0,W=G,H=E,G=F,E=D,F=r,D=n,n=j+h|0,r=w+z+(n>>>0>>0?1:0)|0}M=d.low=M+n;d.high=Z+r+(M>>>0>>0?1:0);N=f.low=N+D;f.high=aa+F+(N>>>0>>0?1:0);O=g.low=O+E;g.high=ba+G+(O>>>0>>0?1:0);P=l.low=P+H;l.high=ca+W+(P>>>0>>0?1:0);Q=e.low=Q+p;e.high=da+s+(Q>>>0

>>0?1:0);R=m.low=R+I;m.high=ea+U+(R>>>0>>0?1:0); +S=L.low=S+J;L.high=fa+V+(S>>>0>>0?1:0);T=c.low=T+K;c.high=ga+X+(T>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,c=a.words,b=8*this._nDataBytes,d=8*a.sigBytes;c[d>>>5]|=128<<24-d%32;c[(d+128>>>10<<5)+30]=Math.floor(b/4294967296);c[(d+128>>>10<<5)+31]=b;a.sigBytes=4*c.length;this._process();return this._hash.toX32()},clone:function(){var a=c.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});d.SHA512=c._createHelper(b);d.HmacSHA512=c._createHmacHelper(b)})(); +(function(){var a=CryptoJS,d=a.x64,c=d.Word,b=d.WordArray,d=a.algo,f=d.SHA512,d=d.SHA384=f.extend({_doReset:function(){this._hash=new b.init([new c.init(3418070365,3238371032),new c.init(1654270250,914150663),new c.init(2438529370,812702999),new c.init(355462360,4144912697),new c.init(1731405415,4290775857),new c.init(2394180231,1750603025),new c.init(3675008525,1694076839),new c.init(1203062813,3204075428)])},_doFinalize:function(){var a=f._doFinalize.call(this);a.sigBytes-=16;return a}});a.SHA384= +f._createHelper(d);a.HmacSHA384=f._createHmacHelper(d)})(); +(function(){var a=CryptoJS,d=a.enc.Utf8;a.algo.HMAC=a.lib.Base.extend({init:function(a,b){a=this._hasher=new a.init;"string"==typeof b&&(b=d.parse(b));var f=a.blockSize,l=4*f;b.sigBytes>l&&(b=a.finalize(b));b.clamp();for(var u=this._oKey=b.clone(),k=this._iKey=b.clone(),m=u.words,x=k.words,y=0;y>>2]|=(M[b>>>2]>>>24-8*(b%4)&255)<<24-8*((e+b)%4);else if(65535>>2]=M[b>>>2];else d.push.apply(d,M);this.sigBytes+=a;return this},clamp:function(){var D=this.words,d=this.sigBytes;D[d>>>2]&=4294967295<< +32-8*(d%4);D.length=a.ceil(d/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(D){for(var d=[],b=0;b>>2]>>>24-8*(e%4)&255;b.push((c>>>4).toString(16));b.push((c&15).toString(16))}return b.join("")},parse:function(a){for(var d=a.length,b=[],e=0;e>>3]|=parseInt(a.substr(e, +2),16)<<24-4*(e%8);return new u.init(b,d/2)}},y=k.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],e=0;e>>2]>>>24-8*(e%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],e=0;e>>2]|=(a.charCodeAt(e)&255)<<24-8*(e%4);return new u.init(c,b)}},z=k.Utf8={stringify:function(a){try{return decodeURIComponent(escape(y.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return y.parse(unescape(encodeURIComponent(a)))}}, +x=b.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new u.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=z.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(b){var d=this._data,c=d.words,e=d.sigBytes,l=this.blockSize,k=e/(4*l),k=b?a.ceil(k):a.max((k|0)-this._minBufferSize,0);b=k*l;e=a.min(4*b,e);if(b){for(var x=0;xm;m++)k[m]=a();b=b.SHA512=c.extend({_doReset:function(){this._hash=new l.init([new f.init(1779033703,4089235720),new f.init(3144134277,2227873595),new f.init(1013904242,4271175723),new f.init(2773480762,1595750129),new f.init(1359893119,2917565137),new f.init(2600822924,725511199),new f.init(528734635,4215389547),new f.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words, +f=c[0],j=c[1],d=c[2],l=c[3],e=c[4],m=c[5],N=c[6],c=c[7],aa=f.high,O=f.low,ba=j.high,P=j.low,ca=d.high,Q=d.low,da=l.high,R=l.low,ea=e.high,S=e.low,fa=m.high,T=m.low,ga=N.high,U=N.low,ha=c.high,V=c.low,r=aa,n=O,G=ba,E=P,H=ca,F=Q,Y=da,I=R,s=ea,p=S,W=fa,J=T,X=ga,K=U,Z=ha,L=V,t=0;80>t;t++){var A=k[t];if(16>t)var q=A.high=a[b+2*t]|0,g=A.low=a[b+2*t+1]|0;else{var q=k[t-15],g=q.high,v=q.low,q=(g>>>1|v<<31)^(g>>>8|v<<24)^g>>>7,v=(v>>>1|g<<31)^(v>>>8|g<<24)^(v>>>7|g<<25),C=k[t-2],g=C.high,h=C.low,C=(g>>>19| +h<<13)^(g<<3|h>>>29)^g>>>6,h=(h>>>19|g<<13)^(h<<3|g>>>29)^(h>>>6|g<<26),g=k[t-7],$=g.high,B=k[t-16],w=B.high,B=B.low,g=v+g.low,q=q+$+(g>>>0>>0?1:0),g=g+h,q=q+C+(g>>>0>>0?1:0),g=g+B,q=q+w+(g>>>0>>0?1:0);A.high=q;A.low=g}var $=s&W^~s&X,B=p&J^~p&K,A=r&G^r&H^G&H,ka=n&E^n&F^E&F,v=(r>>>28|n<<4)^(r<<30|n>>>2)^(r<<25|n>>>7),C=(n>>>28|r<<4)^(n<<30|r>>>2)^(n<<25|r>>>7),h=u[t],la=h.high,ia=h.low,h=L+((p>>>14|s<<18)^(p>>>18|s<<14)^(p<<23|s>>>9)),w=Z+((s>>>14|p<<18)^(s>>>18|p<<14)^(s<<23|p>>>9))+(h>>> +0>>0?1:0),h=h+B,w=w+$+(h>>>0>>0?1:0),h=h+ia,w=w+la+(h>>>0>>0?1:0),h=h+g,w=w+q+(h>>>0>>0?1:0),g=C+ka,A=v+A+(g>>>0>>0?1:0),Z=X,L=K,X=W,K=J,W=s,J=p,p=I+h|0,s=Y+w+(p>>>0>>0?1:0)|0,Y=H,I=F,H=G,F=E,G=r,E=n,n=h+g|0,r=w+A+(n>>>0>>0?1:0)|0}O=f.low=O+n;f.high=aa+r+(O>>>0>>0?1:0);P=j.low=P+E;j.high=ba+G+(P>>>0>>0?1:0);Q=d.low=Q+F;d.high=ca+H+(Q>>>0>>0?1:0);R=l.low=R+I;l.high=da+Y+(R>>>0>>0?1:0);S=e.low=S+p;e.high=ea+s+(S>>>0

>>0?1:0);T=m.low=T+J;m.high=fa+W+(T>>>0>>0?1: +0);U=N.low=U+K;N.high=ga+X+(U>>>0>>0?1:0);V=c.low=V+L;c.high=ha+Z+(V>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,f=8*a.sigBytes;b[f>>>5]|=128<<24-f%32;b[(f+128>>>10<<5)+30]=Math.floor(c/4294967296);b[(f+128>>>10<<5)+31]=c;a.sigBytes=4*b.length;this._process();return this._hash.toX32()},clone:function(){var a=c.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});j.SHA512=c._createHelper(b);j.HmacSHA512=c._createHmacHelper(b)})(); +(function(){var a=CryptoJS,j=a.enc.Utf8;a.algo.HMAC=a.lib.Base.extend({init:function(a,b){a=this._hasher=new a.init;"string"==typeof b&&(b=j.parse(b));var f=a.blockSize,l=4*f;b.sigBytes>l&&(b=a.finalize(b));b.clamp();for(var u=this._oKey=b.clone(),k=this._iKey=b.clone(),m=u.words,y=k.words,z=0;z>>2]|=(a[g>>>2]>>>24-8*(g%4)&255)<<24-8*((j+g)%4);else if(65535>>2]=a[g>>>2];else h.push.apply(h,a);this.sigBytes+=b;return this},clamp:function(){var b=this.words,h=this.sigBytes;b[h>>>2]&=4294967295<< +32-8*(h%4);b.length=s.ceil(h/4)},clone:function(){var b=r.clone.call(this);b.words=this.words.slice(0);return b},random:function(b){for(var h=[],a=0;a>>2]>>>24-8*(j%4)&255;g.push((k>>>4).toString(16));g.push((k&15).toString(16))}return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j>>3]|=parseInt(b.substr(j, +2),16)<<24-4*(j%8);return new q.init(g,a/2)}},a=v.Latin1={stringify:function(b){var a=b.words;b=b.sigBytes;for(var g=[],j=0;j>>2]>>>24-8*(j%4)&255));return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j>>2]|=(b.charCodeAt(j)&255)<<24-8*(j%4);return new q.init(g,a)}},u=v.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(g){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, +g=l.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(b){"string"==typeof b&&(b=u.parse(b));this._data.concat(b);this._nDataBytes+=b.sigBytes},_process:function(b){var a=this._data,g=a.words,j=a.sigBytes,k=this.blockSize,m=j/(4*k),m=b?s.ceil(m):s.max((m|0)-this._minBufferSize,0);b=m*k;j=s.min(4*b,j);if(b){for(var l=0;l>>32-j)+k}function m(a,k,b,h,l,j,m){a=a+(k&h|b&~h)+l+m;return(a<>>32-j)+k}function l(a,k,b,h,l,j,m){a=a+(k^b^h)+l+m;return(a<>>32-j)+k}function n(a,k,b,h,l,j,m){a=a+(b^(k|~h))+l+m;return(a<>>32-j)+k}for(var r=CryptoJS,q=r.lib,v=q.WordArray,t=q.Hasher,q=r.algo,a=[],u=0;64>u;u++)a[u]=4294967296*s.abs(s.sin(u+1))|0;q=q.MD5=t.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(g,k){for(var b=0;16>b;b++){var h=k+b,w=g[h];g[h]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var b=this._hash.words,h=g[k+0],w=g[k+1],j=g[k+2],q=g[k+3],r=g[k+4],s=g[k+5],t=g[k+6],u=g[k+7],v=g[k+8],x=g[k+9],y=g[k+10],z=g[k+11],A=g[k+12],B=g[k+13],C=g[k+14],D=g[k+15],c=b[0],d=b[1],e=b[2],f=b[3],c=p(c,d,e,f,h,7,a[0]),f=p(f,c,d,e,w,12,a[1]),e=p(e,f,c,d,j,17,a[2]),d=p(d,e,f,c,q,22,a[3]),c=p(c,d,e,f,r,7,a[4]),f=p(f,c,d,e,s,12,a[5]),e=p(e,f,c,d,t,17,a[6]),d=p(d,e,f,c,u,22,a[7]), +c=p(c,d,e,f,v,7,a[8]),f=p(f,c,d,e,x,12,a[9]),e=p(e,f,c,d,y,17,a[10]),d=p(d,e,f,c,z,22,a[11]),c=p(c,d,e,f,A,7,a[12]),f=p(f,c,d,e,B,12,a[13]),e=p(e,f,c,d,C,17,a[14]),d=p(d,e,f,c,D,22,a[15]),c=m(c,d,e,f,w,5,a[16]),f=m(f,c,d,e,t,9,a[17]),e=m(e,f,c,d,z,14,a[18]),d=m(d,e,f,c,h,20,a[19]),c=m(c,d,e,f,s,5,a[20]),f=m(f,c,d,e,y,9,a[21]),e=m(e,f,c,d,D,14,a[22]),d=m(d,e,f,c,r,20,a[23]),c=m(c,d,e,f,x,5,a[24]),f=m(f,c,d,e,C,9,a[25]),e=m(e,f,c,d,q,14,a[26]),d=m(d,e,f,c,v,20,a[27]),c=m(c,d,e,f,B,5,a[28]),f=m(f,c, +d,e,j,9,a[29]),e=m(e,f,c,d,u,14,a[30]),d=m(d,e,f,c,A,20,a[31]),c=l(c,d,e,f,s,4,a[32]),f=l(f,c,d,e,v,11,a[33]),e=l(e,f,c,d,z,16,a[34]),d=l(d,e,f,c,C,23,a[35]),c=l(c,d,e,f,w,4,a[36]),f=l(f,c,d,e,r,11,a[37]),e=l(e,f,c,d,u,16,a[38]),d=l(d,e,f,c,y,23,a[39]),c=l(c,d,e,f,B,4,a[40]),f=l(f,c,d,e,h,11,a[41]),e=l(e,f,c,d,q,16,a[42]),d=l(d,e,f,c,t,23,a[43]),c=l(c,d,e,f,x,4,a[44]),f=l(f,c,d,e,A,11,a[45]),e=l(e,f,c,d,D,16,a[46]),d=l(d,e,f,c,j,23,a[47]),c=n(c,d,e,f,h,6,a[48]),f=n(f,c,d,e,u,10,a[49]),e=n(e,f,c,d, +C,15,a[50]),d=n(d,e,f,c,s,21,a[51]),c=n(c,d,e,f,A,6,a[52]),f=n(f,c,d,e,q,10,a[53]),e=n(e,f,c,d,y,15,a[54]),d=n(d,e,f,c,w,21,a[55]),c=n(c,d,e,f,v,6,a[56]),f=n(f,c,d,e,D,10,a[57]),e=n(e,f,c,d,t,15,a[58]),d=n(d,e,f,c,B,21,a[59]),c=n(c,d,e,f,r,6,a[60]),f=n(f,c,d,e,z,10,a[61]),e=n(e,f,c,d,j,15,a[62]),d=n(d,e,f,c,x,21,a[63]);b[0]=b[0]+c|0;b[1]=b[1]+d|0;b[2]=b[2]+e|0;b[3]=b[3]+f|0},_doFinalize:function(){var a=this._data,k=a.words,b=8*this._nDataBytes,h=8*a.sigBytes;k[h>>>5]|=128<<24-h%32;var l=s.floor(b/ +4294967296);k[(h+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;k[(h+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;a.sigBytes=4*(k.length+1);this._process();a=this._hash;k=a.words;for(b=0;4>b;b++)h=k[b],k[b]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;return a},clone:function(){var a=t.clone.call(this);a._hash=this._hash.clone();return a}});r.MD5=t._createHelper(q);r.HmacMD5=t._createHmacHelper(q)})(Math); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/rollups/pbkdf2.js b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/pbkdf2.js new file mode 100644 index 0000000..fdc7b4f --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/pbkdf2.js @@ -0,0 +1,19 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(g,j){var e={},d=e.lib={},m=function(){},n=d.Base={extend:function(a){m.prototype=this;var c=new m;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +q=d.WordArray=n.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=j?c:4*a.length},toString:function(a){return(a||l).stringify(this)},concat:function(a){var c=this.words,p=a.words,f=this.sigBytes;a=a.sigBytes;this.clamp();if(f%4)for(var b=0;b>>2]|=(p[b>>>2]>>>24-8*(b%4)&255)<<24-8*((f+b)%4);else if(65535>>2]=p[b>>>2];else c.push.apply(c,p);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=n.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(f%4)&255;b.push((d>>>4).toString(16));b.push((d&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>3]|=parseInt(a.substr(f, +2),16)<<24-4*(f%8);return new q.init(b,c/2)}},k=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],f=0;f>>2]>>>24-8*(f%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new q.init(b,c)}},h=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(k.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return k.parse(unescape(encodeURIComponent(a)))}}, +u=d.BufferedBlockAlgorithm=n.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=h.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,f=b.sigBytes,l=this.blockSize,e=f/(4*l),e=a?g.ceil(e):g.max((e|0)-this._minBufferSize,0);a=e*l;f=g.min(4*a,f);if(a){for(var h=0;ha;a++){if(16>a)m[a]=d[e+a]|0;else{var c=m[a-3]^m[a-8]^m[a-14]^m[a-16];m[a]=c<<1|c>>>31}c=(l<<5|l>>>27)+j+m[a];c=20>a?c+((k&h|~k&g)+1518500249):40>a?c+((k^h^g)+1859775393):60>a?c+((k&h|k&g|h&g)-1894007588):c+((k^h^ +g)-899497514);j=g;g=h;h=k<<30|k>>>2;k=l;l=c}b[0]=b[0]+l|0;b[1]=b[1]+k|0;b[2]=b[2]+h|0;b[3]=b[3]+g|0;b[4]=b[4]+j|0},_doFinalize:function(){var d=this._data,e=d.words,b=8*this._nDataBytes,l=8*d.sigBytes;e[l>>>5]|=128<<24-l%32;e[(l+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(l+64>>>9<<4)+15]=b;d.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=d.clone.call(this);e._hash=this._hash.clone();return e}});g.SHA1=d._createHelper(j);g.HmacSHA1=d._createHmacHelper(j)})(); +(function(){var g=CryptoJS,j=g.enc.Utf8;g.algo.HMAC=g.lib.Base.extend({init:function(e,d){e=this._hasher=new e.init;"string"==typeof d&&(d=j.parse(d));var g=e.blockSize,n=4*g;d.sigBytes>n&&(d=e.finalize(d));d.clamp();for(var q=this._oKey=d.clone(),b=this._iKey=d.clone(),l=q.words,k=b.words,h=0;h>>2]|=(m[r>>>2]>>>24-8*(r%4)&255)<<24-8*((n+r)%4);else if(65535>>2]=m[r>>>2];else b.push.apply(b,m);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< +32-8*(b%4);a.length=q.ceil(b/4)},clone:function(){var a=c.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],m=0;m>>2]>>>24-8*(n%4)&255;m.push((r>>>4).toString(16));m.push((r&15).toString(16))}return m.join("")},parse:function(a){for(var b=a.length,m=[],n=0;n>>3]|=parseInt(a.substr(n, +2),16)<<24-4*(n%8);return new s.init(m,b/2)}},a=b.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var m=[],n=0;n>>2]>>>24-8*(n%4)&255));return m.join("")},parse:function(a){for(var b=a.length,m=[],n=0;n>>2]|=(a.charCodeAt(n)&255)<<24-8*(n%4);return new s.init(m,b)}},t=b.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, +u=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new s.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=t.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,m=b.words,n=b.sigBytes,r=this.blockSize,c=n/(4*r),c=a?q.ceil(c):q.max((c|0)-this._minBufferSize,0);a=c*r;n=q.min(4*a,n);if(a){for(var u=0;u>>2]>>>24-8*(k%4)&255)<<16|(l[k+1>>>2]>>>24-8*((k+1)%4)&255)<<8|l[k+2>>>2]>>>24-8*((k+2)%4)&255,d=0;4>d&&k+0.75*d>>6*(3-d)&63));if(l=c.charAt(64))for(;e.length%4;)e.push(l);return e.join("")},parse:function(e){var l=e.length,p=this._map,c=p.charAt(64);c&&(c=e.indexOf(c),-1!=c&&(l=c));for(var c=[],s=0,b=0;b< +l;b++)if(b%4){var d=p.indexOf(e.charAt(b-1))<<2*(b%4),a=p.indexOf(e.charAt(b))>>>6-2*(b%4);c[s>>>2]|=(d|a)<<24-8*(s%4);s++}return k.create(c,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); +(function(q){function k(a,b,c,d,m,n,r){a=a+(b&c|~b&d)+m+r;return(a<>>32-n)+b}function e(a,b,c,d,m,n,r){a=a+(b&d|c&~d)+m+r;return(a<>>32-n)+b}function l(a,b,c,d,m,n,r){a=a+(b^c^d)+m+r;return(a<>>32-n)+b}function p(a,b,c,d,m,n,r){a=a+(c^(b|~d))+m+r;return(a<>>32-n)+b}for(var c=CryptoJS,s=c.lib,b=s.WordArray,d=s.Hasher,s=c.algo,a=[],t=0;64>t;t++)a[t]=4294967296*q.abs(q.sin(t+1))|0;s=s.MD5=d.extend({_doReset:function(){this._hash=new b.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(b,c){for(var d=0;16>d;d++){var t=c+d,m=b[t];b[t]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var d=this._hash.words,t=b[c+0],m=b[c+1],n=b[c+2],r=b[c+3],x=b[c+4],s=b[c+5],q=b[c+6],y=b[c+7],z=b[c+8],A=b[c+9],B=b[c+10],C=b[c+11],D=b[c+12],E=b[c+13],F=b[c+14],G=b[c+15],f=d[0],g=d[1],h=d[2],j=d[3],f=k(f,g,h,j,t,7,a[0]),j=k(j,f,g,h,m,12,a[1]),h=k(h,j,f,g,n,17,a[2]),g=k(g,h,j,f,r,22,a[3]),f=k(f,g,h,j,x,7,a[4]),j=k(j,f,g,h,s,12,a[5]),h=k(h,j,f,g,q,17,a[6]),g=k(g,h,j,f,y,22,a[7]), +f=k(f,g,h,j,z,7,a[8]),j=k(j,f,g,h,A,12,a[9]),h=k(h,j,f,g,B,17,a[10]),g=k(g,h,j,f,C,22,a[11]),f=k(f,g,h,j,D,7,a[12]),j=k(j,f,g,h,E,12,a[13]),h=k(h,j,f,g,F,17,a[14]),g=k(g,h,j,f,G,22,a[15]),f=e(f,g,h,j,m,5,a[16]),j=e(j,f,g,h,q,9,a[17]),h=e(h,j,f,g,C,14,a[18]),g=e(g,h,j,f,t,20,a[19]),f=e(f,g,h,j,s,5,a[20]),j=e(j,f,g,h,B,9,a[21]),h=e(h,j,f,g,G,14,a[22]),g=e(g,h,j,f,x,20,a[23]),f=e(f,g,h,j,A,5,a[24]),j=e(j,f,g,h,F,9,a[25]),h=e(h,j,f,g,r,14,a[26]),g=e(g,h,j,f,z,20,a[27]),f=e(f,g,h,j,E,5,a[28]),j=e(j,f, +g,h,n,9,a[29]),h=e(h,j,f,g,y,14,a[30]),g=e(g,h,j,f,D,20,a[31]),f=l(f,g,h,j,s,4,a[32]),j=l(j,f,g,h,z,11,a[33]),h=l(h,j,f,g,C,16,a[34]),g=l(g,h,j,f,F,23,a[35]),f=l(f,g,h,j,m,4,a[36]),j=l(j,f,g,h,x,11,a[37]),h=l(h,j,f,g,y,16,a[38]),g=l(g,h,j,f,B,23,a[39]),f=l(f,g,h,j,E,4,a[40]),j=l(j,f,g,h,t,11,a[41]),h=l(h,j,f,g,r,16,a[42]),g=l(g,h,j,f,q,23,a[43]),f=l(f,g,h,j,A,4,a[44]),j=l(j,f,g,h,D,11,a[45]),h=l(h,j,f,g,G,16,a[46]),g=l(g,h,j,f,n,23,a[47]),f=p(f,g,h,j,t,6,a[48]),j=p(j,f,g,h,y,10,a[49]),h=p(h,j,f,g, +F,15,a[50]),g=p(g,h,j,f,s,21,a[51]),f=p(f,g,h,j,D,6,a[52]),j=p(j,f,g,h,r,10,a[53]),h=p(h,j,f,g,B,15,a[54]),g=p(g,h,j,f,m,21,a[55]),f=p(f,g,h,j,z,6,a[56]),j=p(j,f,g,h,G,10,a[57]),h=p(h,j,f,g,q,15,a[58]),g=p(g,h,j,f,E,21,a[59]),f=p(f,g,h,j,x,6,a[60]),j=p(j,f,g,h,C,10,a[61]),h=p(h,j,f,g,n,15,a[62]),g=p(g,h,j,f,A,21,a[63]);d[0]=d[0]+f|0;d[1]=d[1]+g|0;d[2]=d[2]+h|0;d[3]=d[3]+j|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;var m=q.floor(c/ +4294967296);b[(d+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360;b[(d+64>>>9<<4)+14]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;a.sigBytes=4*(b.length+1);this._process();a=this._hash;b=a.words;for(c=0;4>c;c++)d=b[c],b[c]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;return a},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a}});c.MD5=d._createHelper(s);c.HmacMD5=d._createHmacHelper(s)})(Math); +(function(){var q=CryptoJS,k=q.lib,e=k.Base,l=k.WordArray,k=q.algo,p=k.EvpKDF=e.extend({cfg:e.extend({keySize:4,hasher:k.MD5,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,e){for(var b=this.cfg,d=b.hasher.create(),a=l.create(),k=a.words,p=b.keySize,b=b.iterations;k.length>>2]&255}};e.BlockCipher=d.extend({cfg:d.cfg.extend({mode:a,padding:u}),reset:function(){d.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a, +this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var w=e.CipherParams=l.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),a=(k.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?p.create([1398893684, +1701076831]).concat(a).concat(b):b).toString(s)},parse:function(a){a=s.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=p.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return w.create({ciphertext:a,salt:c})}},v=e.SerializableCipher=l.extend({cfg:l.extend({format:a}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return w.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding,blockSize:a.blockSize,formatter:d.format})}, +decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),k=(k.kdf={}).OpenSSL={execute:function(a,c,d,e){e||(e=p.random(8));a=b.create({keySize:c+d}).compute(a,e);d=p.create(a.words.slice(c),4*d);a.sigBytes=4*c;return w.create({key:a,iv:d,salt:e})}},H=e.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:k}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c, +a.keySize,a.ivSize);d.iv=c.iv;a=v.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=c.iv;return v.decrypt.call(this,a,b,c.key,d)}})}(); +(function(){function q(){for(var b=this._X,d=this._C,a=0;8>a;a++)p[a]=d[a];d[0]=d[0]+1295307597+this._b|0;d[1]=d[1]+3545052371+(d[0]>>>0>>0?1:0)|0;d[2]=d[2]+886263092+(d[1]>>>0>>0?1:0)|0;d[3]=d[3]+1295307597+(d[2]>>>0>>0?1:0)|0;d[4]=d[4]+3545052371+(d[3]>>>0>>0?1:0)|0;d[5]=d[5]+886263092+(d[4]>>>0>>0?1:0)|0;d[6]=d[6]+1295307597+(d[5]>>>0>>0?1:0)|0;d[7]=d[7]+3545052371+(d[6]>>>0>>0?1:0)|0;this._b=d[7]>>>0>>0?1:0;for(a=0;8>a;a++){var e=b[a]+d[a],k=e&65535, +l=e>>>16;c[a]=((k*k>>>17)+k*l>>>15)+l*l^((e&4294901760)*e|0)+((e&65535)*e|0)}b[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0;b[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0;b[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0;b[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0;b[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0;b[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0;b[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0;b[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var k=CryptoJS,e=k.lib.StreamCipher,l=[],p=[],c=[],s=k.algo.RabbitLegacy= +e.extend({_doReset:function(){for(var b=this._key.words,c=this.cfg.iv,a=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],b=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>>16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535],e=this._b=0;4>e;e++)q.call(this);for(e=0;8>e;e++)b[e]^=a[e+4&7];if(c){var a=c.words,c=a[0],a=a[1],c=(c<<8|c>>>24)&16711935|(c<< +24|c>>>8)&4278255360,a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,e=c>>>16|a&4294901760,k=a<<16|c&65535;b[0]^=c;b[1]^=e;b[2]^=a;b[3]^=k;b[4]^=c;b[5]^=e;b[6]^=a;b[7]^=k;for(e=0;4>e;e++)q.call(this)}},_doProcessBlock:function(b,c){var a=this._X;q.call(this);l[0]=a[0]^a[5]>>>16^a[3]<<16;l[1]=a[2]^a[7]>>>16^a[5]<<16;l[2]=a[4]^a[1]>>>16^a[7]<<16;l[3]=a[6]^a[3]>>>16^a[1]<<16;for(a=0;4>a;a++)l[a]=(l[a]<<8|l[a]>>>24)&16711935|(l[a]<<24|l[a]>>>8)&4278255360,b[c+a]^=l[a]},blockSize:4,ivSize:2});k.RabbitLegacy= +e._createHelper(s)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/rollups/rabbit.js b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/rabbit.js new file mode 100644 index 0000000..5ea717e --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/rabbit.js @@ -0,0 +1,36 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(q,k){var e={},l=e.lib={},p=function(){},c=l.Base={extend:function(a){p.prototype=this;var b=new p;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +s=l.WordArray=c.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=k?b:4*a.length},toString:function(a){return(a||d).stringify(this)},concat:function(a){var b=this.words,m=a.words,n=this.sigBytes;a=a.sigBytes;this.clamp();if(n%4)for(var r=0;r>>2]|=(m[r>>>2]>>>24-8*(r%4)&255)<<24-8*((n+r)%4);else if(65535>>2]=m[r>>>2];else b.push.apply(b,m);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< +32-8*(b%4);a.length=q.ceil(b/4)},clone:function(){var a=c.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],m=0;m>>2]>>>24-8*(n%4)&255;m.push((r>>>4).toString(16));m.push((r&15).toString(16))}return m.join("")},parse:function(a){for(var b=a.length,m=[],n=0;n>>3]|=parseInt(a.substr(n, +2),16)<<24-4*(n%8);return new s.init(m,b/2)}},a=b.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var m=[],n=0;n>>2]>>>24-8*(n%4)&255));return m.join("")},parse:function(a){for(var b=a.length,m=[],n=0;n>>2]|=(a.charCodeAt(n)&255)<<24-8*(n%4);return new s.init(m,b)}},u=b.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, +t=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new s.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=u.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,m=b.words,n=b.sigBytes,r=this.blockSize,c=n/(4*r),c=a?q.ceil(c):q.max((c|0)-this._minBufferSize,0);a=c*r;n=q.min(4*a,n);if(a){for(var t=0;t>>2]>>>24-8*(k%4)&255)<<16|(l[k+1>>>2]>>>24-8*((k+1)%4)&255)<<8|l[k+2>>>2]>>>24-8*((k+2)%4)&255,d=0;4>d&&k+0.75*d>>6*(3-d)&63));if(l=c.charAt(64))for(;e.length%4;)e.push(l);return e.join("")},parse:function(e){var l=e.length,p=this._map,c=p.charAt(64);c&&(c=e.indexOf(c),-1!=c&&(l=c));for(var c=[],s=0,b=0;b< +l;b++)if(b%4){var d=p.indexOf(e.charAt(b-1))<<2*(b%4),a=p.indexOf(e.charAt(b))>>>6-2*(b%4);c[s>>>2]|=(d|a)<<24-8*(s%4);s++}return k.create(c,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); +(function(q){function k(a,b,c,d,m,n,r){a=a+(b&c|~b&d)+m+r;return(a<>>32-n)+b}function e(a,b,c,d,m,n,r){a=a+(b&d|c&~d)+m+r;return(a<>>32-n)+b}function l(a,b,c,d,m,n,r){a=a+(b^c^d)+m+r;return(a<>>32-n)+b}function p(a,b,c,d,m,n,r){a=a+(c^(b|~d))+m+r;return(a<>>32-n)+b}for(var c=CryptoJS,s=c.lib,b=s.WordArray,d=s.Hasher,s=c.algo,a=[],u=0;64>u;u++)a[u]=4294967296*q.abs(q.sin(u+1))|0;s=s.MD5=d.extend({_doReset:function(){this._hash=new b.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(b,c){for(var d=0;16>d;d++){var s=c+d,m=b[s];b[s]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var d=this._hash.words,s=b[c+0],m=b[c+1],n=b[c+2],r=b[c+3],x=b[c+4],u=b[c+5],q=b[c+6],y=b[c+7],z=b[c+8],A=b[c+9],B=b[c+10],C=b[c+11],D=b[c+12],E=b[c+13],F=b[c+14],G=b[c+15],f=d[0],g=d[1],h=d[2],j=d[3],f=k(f,g,h,j,s,7,a[0]),j=k(j,f,g,h,m,12,a[1]),h=k(h,j,f,g,n,17,a[2]),g=k(g,h,j,f,r,22,a[3]),f=k(f,g,h,j,x,7,a[4]),j=k(j,f,g,h,u,12,a[5]),h=k(h,j,f,g,q,17,a[6]),g=k(g,h,j,f,y,22,a[7]), +f=k(f,g,h,j,z,7,a[8]),j=k(j,f,g,h,A,12,a[9]),h=k(h,j,f,g,B,17,a[10]),g=k(g,h,j,f,C,22,a[11]),f=k(f,g,h,j,D,7,a[12]),j=k(j,f,g,h,E,12,a[13]),h=k(h,j,f,g,F,17,a[14]),g=k(g,h,j,f,G,22,a[15]),f=e(f,g,h,j,m,5,a[16]),j=e(j,f,g,h,q,9,a[17]),h=e(h,j,f,g,C,14,a[18]),g=e(g,h,j,f,s,20,a[19]),f=e(f,g,h,j,u,5,a[20]),j=e(j,f,g,h,B,9,a[21]),h=e(h,j,f,g,G,14,a[22]),g=e(g,h,j,f,x,20,a[23]),f=e(f,g,h,j,A,5,a[24]),j=e(j,f,g,h,F,9,a[25]),h=e(h,j,f,g,r,14,a[26]),g=e(g,h,j,f,z,20,a[27]),f=e(f,g,h,j,E,5,a[28]),j=e(j,f, +g,h,n,9,a[29]),h=e(h,j,f,g,y,14,a[30]),g=e(g,h,j,f,D,20,a[31]),f=l(f,g,h,j,u,4,a[32]),j=l(j,f,g,h,z,11,a[33]),h=l(h,j,f,g,C,16,a[34]),g=l(g,h,j,f,F,23,a[35]),f=l(f,g,h,j,m,4,a[36]),j=l(j,f,g,h,x,11,a[37]),h=l(h,j,f,g,y,16,a[38]),g=l(g,h,j,f,B,23,a[39]),f=l(f,g,h,j,E,4,a[40]),j=l(j,f,g,h,s,11,a[41]),h=l(h,j,f,g,r,16,a[42]),g=l(g,h,j,f,q,23,a[43]),f=l(f,g,h,j,A,4,a[44]),j=l(j,f,g,h,D,11,a[45]),h=l(h,j,f,g,G,16,a[46]),g=l(g,h,j,f,n,23,a[47]),f=p(f,g,h,j,s,6,a[48]),j=p(j,f,g,h,y,10,a[49]),h=p(h,j,f,g, +F,15,a[50]),g=p(g,h,j,f,u,21,a[51]),f=p(f,g,h,j,D,6,a[52]),j=p(j,f,g,h,r,10,a[53]),h=p(h,j,f,g,B,15,a[54]),g=p(g,h,j,f,m,21,a[55]),f=p(f,g,h,j,z,6,a[56]),j=p(j,f,g,h,G,10,a[57]),h=p(h,j,f,g,q,15,a[58]),g=p(g,h,j,f,E,21,a[59]),f=p(f,g,h,j,x,6,a[60]),j=p(j,f,g,h,C,10,a[61]),h=p(h,j,f,g,n,15,a[62]),g=p(g,h,j,f,A,21,a[63]);d[0]=d[0]+f|0;d[1]=d[1]+g|0;d[2]=d[2]+h|0;d[3]=d[3]+j|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;var m=q.floor(c/ +4294967296);b[(d+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360;b[(d+64>>>9<<4)+14]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;a.sigBytes=4*(b.length+1);this._process();a=this._hash;b=a.words;for(c=0;4>c;c++)d=b[c],b[c]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;return a},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a}});c.MD5=d._createHelper(s);c.HmacMD5=d._createHmacHelper(s)})(Math); +(function(){var q=CryptoJS,k=q.lib,e=k.Base,l=k.WordArray,k=q.algo,p=k.EvpKDF=e.extend({cfg:e.extend({keySize:4,hasher:k.MD5,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,e){for(var b=this.cfg,d=b.hasher.create(),a=l.create(),k=a.words,p=b.keySize,b=b.iterations;k.length>>2]&255}};e.BlockCipher=d.extend({cfg:d.cfg.extend({mode:a,padding:t}),reset:function(){d.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a, +this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var w=e.CipherParams=l.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),a=(k.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?p.create([1398893684, +1701076831]).concat(a).concat(b):b).toString(s)},parse:function(a){a=s.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=p.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return w.create({ciphertext:a,salt:c})}},v=e.SerializableCipher=l.extend({cfg:l.extend({format:a}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return w.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding,blockSize:a.blockSize,formatter:d.format})}, +decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),k=(k.kdf={}).OpenSSL={execute:function(a,c,d,e){e||(e=p.random(8));a=b.create({keySize:c+d}).compute(a,e);d=p.create(a.words.slice(c),4*d);a.sigBytes=4*c;return w.create({key:a,iv:d,salt:e})}},H=e.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:k}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c, +a.keySize,a.ivSize);d.iv=c.iv;a=v.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=c.iv;return v.decrypt.call(this,a,b,c.key,d)}})}(); +(function(){function q(){for(var b=this._X,d=this._C,a=0;8>a;a++)p[a]=d[a];d[0]=d[0]+1295307597+this._b|0;d[1]=d[1]+3545052371+(d[0]>>>0>>0?1:0)|0;d[2]=d[2]+886263092+(d[1]>>>0>>0?1:0)|0;d[3]=d[3]+1295307597+(d[2]>>>0>>0?1:0)|0;d[4]=d[4]+3545052371+(d[3]>>>0>>0?1:0)|0;d[5]=d[5]+886263092+(d[4]>>>0>>0?1:0)|0;d[6]=d[6]+1295307597+(d[5]>>>0>>0?1:0)|0;d[7]=d[7]+3545052371+(d[6]>>>0>>0?1:0)|0;this._b=d[7]>>>0>>0?1:0;for(a=0;8>a;a++){var e=b[a]+d[a],k=e&65535, +l=e>>>16;c[a]=((k*k>>>17)+k*l>>>15)+l*l^((e&4294901760)*e|0)+((e&65535)*e|0)}b[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0;b[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0;b[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0;b[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0;b[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0;b[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0;b[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0;b[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var k=CryptoJS,e=k.lib.StreamCipher,l=[],p=[],c=[],s=k.algo.Rabbit= +e.extend({_doReset:function(){for(var b=this._key.words,c=this.cfg.iv,a=0;4>a;a++)b[a]=(b[a]<<8|b[a]>>>24)&16711935|(b[a]<<24|b[a]>>>8)&4278255360;for(var e=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],b=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>>16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535],a=this._b=0;4>a;a++)q.call(this);for(a=0;8> +a;a++)b[a]^=e[a+4&7];if(c){var a=c.words,c=a[0],a=a[1],c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,e=c>>>16|a&4294901760,k=a<<16|c&65535;b[0]^=c;b[1]^=e;b[2]^=a;b[3]^=k;b[4]^=c;b[5]^=e;b[6]^=a;b[7]^=k;for(a=0;4>a;a++)q.call(this)}},_doProcessBlock:function(b,c){var a=this._X;q.call(this);l[0]=a[0]^a[5]>>>16^a[3]<<16;l[1]=a[2]^a[7]>>>16^a[5]<<16;l[2]=a[4]^a[1]>>>16^a[7]<<16;l[3]=a[6]^a[3]>>>16^a[1]<<16;for(a=0;4>a;a++)l[a]=(l[a]<<8|l[a]>>>24)& +16711935|(l[a]<<24|l[a]>>>8)&4278255360,b[c+a]^=l[a]},blockSize:4,ivSize:2});k.Rabbit=e._createHelper(s)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/rollups/rc4.js b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/rc4.js new file mode 100644 index 0000000..aba420f --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/rc4.js @@ -0,0 +1,33 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(s,l){var e={},n=e.lib={},p=function(){},b=n.Base={extend:function(c){p.prototype=this;var a=new p;c&&a.mixIn(c);a.hasOwnProperty("init")||(a.init=function(){a.$super.init.apply(this,arguments)});a.init.prototype=a;a.$super=this;return a},create:function(){var c=this.extend();c.init.apply(c,arguments);return c},init:function(){},mixIn:function(c){for(var a in c)c.hasOwnProperty(a)&&(this[a]=c[a]);c.hasOwnProperty("toString")&&(this.toString=c.toString)},clone:function(){return this.init.prototype.extend(this)}}, +d=n.WordArray=b.extend({init:function(c,a){c=this.words=c||[];this.sigBytes=a!=l?a:4*c.length},toString:function(c){return(c||q).stringify(this)},concat:function(c){var a=this.words,m=c.words,f=this.sigBytes;c=c.sigBytes;this.clamp();if(f%4)for(var r=0;r>>2]|=(m[r>>>2]>>>24-8*(r%4)&255)<<24-8*((f+r)%4);else if(65535>>2]=m[r>>>2];else a.push.apply(a,m);this.sigBytes+=c;return this},clamp:function(){var c=this.words,a=this.sigBytes;c[a>>>2]&=4294967295<< +32-8*(a%4);c.length=s.ceil(a/4)},clone:function(){var c=b.clone.call(this);c.words=this.words.slice(0);return c},random:function(c){for(var a=[],m=0;m>>2]>>>24-8*(f%4)&255;m.push((r>>>4).toString(16));m.push((r&15).toString(16))}return m.join("")},parse:function(c){for(var a=c.length,m=[],f=0;f>>3]|=parseInt(c.substr(f, +2),16)<<24-4*(f%8);return new d.init(m,a/2)}},a=t.Latin1={stringify:function(c){var a=c.words;c=c.sigBytes;for(var m=[],f=0;f>>2]>>>24-8*(f%4)&255));return m.join("")},parse:function(c){for(var a=c.length,m=[],f=0;f>>2]|=(c.charCodeAt(f)&255)<<24-8*(f%4);return new d.init(m,a)}},v=t.Utf8={stringify:function(c){try{return decodeURIComponent(escape(a.stringify(c)))}catch(u){throw Error("Malformed UTF-8 data");}},parse:function(c){return a.parse(unescape(encodeURIComponent(c)))}}, +u=n.BufferedBlockAlgorithm=b.extend({reset:function(){this._data=new d.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=v.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var u=this._data,m=u.words,f=u.sigBytes,r=this.blockSize,e=f/(4*r),e=a?s.ceil(e):s.max((e|0)-this._minBufferSize,0);a=e*r;f=s.min(4*a,f);if(a){for(var b=0;b>>2]>>>24-8*(d%4)&255)<<16|(n[d+1>>>2]>>>24-8*((d+1)%4)&255)<<8|n[d+2>>>2]>>>24-8*((d+2)%4)&255,q=0;4>q&&d+0.75*q>>6*(3-q)&63));if(n=b.charAt(64))for(;e.length%4;)e.push(n);return e.join("")},parse:function(e){var n=e.length,p=this._map,b=p.charAt(64);b&&(b=e.indexOf(b),-1!=b&&(n=b));for(var b=[],d=0,t=0;t< +n;t++)if(t%4){var q=p.indexOf(e.charAt(t-1))<<2*(t%4),a=p.indexOf(e.charAt(t))>>>6-2*(t%4);b[d>>>2]|=(q|a)<<24-8*(d%4);d++}return l.create(b,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); +(function(s){function l(a,b,c,e,m,f,r){a=a+(b&c|~b&e)+m+r;return(a<>>32-f)+b}function e(a,b,c,e,m,f,r){a=a+(b&e|c&~e)+m+r;return(a<>>32-f)+b}function n(a,b,c,e,m,f,r){a=a+(b^c^e)+m+r;return(a<>>32-f)+b}function p(a,b,c,e,m,f,r){a=a+(c^(b|~e))+m+r;return(a<>>32-f)+b}for(var b=CryptoJS,d=b.lib,t=d.WordArray,q=d.Hasher,d=b.algo,a=[],v=0;64>v;v++)a[v]=4294967296*s.abs(s.sin(v+1))|0;d=d.MD5=q.extend({_doReset:function(){this._hash=new t.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(b,d){for(var c=0;16>c;c++){var q=d+c,m=b[q];b[q]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var c=this._hash.words,q=b[d+0],m=b[d+1],f=b[d+2],r=b[d+3],x=b[d+4],t=b[d+5],s=b[d+6],v=b[d+7],y=b[d+8],z=b[d+9],A=b[d+10],B=b[d+11],C=b[d+12],D=b[d+13],E=b[d+14],F=b[d+15],g=c[0],h=c[1],j=c[2],k=c[3],g=l(g,h,j,k,q,7,a[0]),k=l(k,g,h,j,m,12,a[1]),j=l(j,k,g,h,f,17,a[2]),h=l(h,j,k,g,r,22,a[3]),g=l(g,h,j,k,x,7,a[4]),k=l(k,g,h,j,t,12,a[5]),j=l(j,k,g,h,s,17,a[6]),h=l(h,j,k,g,v,22,a[7]), +g=l(g,h,j,k,y,7,a[8]),k=l(k,g,h,j,z,12,a[9]),j=l(j,k,g,h,A,17,a[10]),h=l(h,j,k,g,B,22,a[11]),g=l(g,h,j,k,C,7,a[12]),k=l(k,g,h,j,D,12,a[13]),j=l(j,k,g,h,E,17,a[14]),h=l(h,j,k,g,F,22,a[15]),g=e(g,h,j,k,m,5,a[16]),k=e(k,g,h,j,s,9,a[17]),j=e(j,k,g,h,B,14,a[18]),h=e(h,j,k,g,q,20,a[19]),g=e(g,h,j,k,t,5,a[20]),k=e(k,g,h,j,A,9,a[21]),j=e(j,k,g,h,F,14,a[22]),h=e(h,j,k,g,x,20,a[23]),g=e(g,h,j,k,z,5,a[24]),k=e(k,g,h,j,E,9,a[25]),j=e(j,k,g,h,r,14,a[26]),h=e(h,j,k,g,y,20,a[27]),g=e(g,h,j,k,D,5,a[28]),k=e(k,g, +h,j,f,9,a[29]),j=e(j,k,g,h,v,14,a[30]),h=e(h,j,k,g,C,20,a[31]),g=n(g,h,j,k,t,4,a[32]),k=n(k,g,h,j,y,11,a[33]),j=n(j,k,g,h,B,16,a[34]),h=n(h,j,k,g,E,23,a[35]),g=n(g,h,j,k,m,4,a[36]),k=n(k,g,h,j,x,11,a[37]),j=n(j,k,g,h,v,16,a[38]),h=n(h,j,k,g,A,23,a[39]),g=n(g,h,j,k,D,4,a[40]),k=n(k,g,h,j,q,11,a[41]),j=n(j,k,g,h,r,16,a[42]),h=n(h,j,k,g,s,23,a[43]),g=n(g,h,j,k,z,4,a[44]),k=n(k,g,h,j,C,11,a[45]),j=n(j,k,g,h,F,16,a[46]),h=n(h,j,k,g,f,23,a[47]),g=p(g,h,j,k,q,6,a[48]),k=p(k,g,h,j,v,10,a[49]),j=p(j,k,g,h, +E,15,a[50]),h=p(h,j,k,g,t,21,a[51]),g=p(g,h,j,k,C,6,a[52]),k=p(k,g,h,j,r,10,a[53]),j=p(j,k,g,h,A,15,a[54]),h=p(h,j,k,g,m,21,a[55]),g=p(g,h,j,k,y,6,a[56]),k=p(k,g,h,j,F,10,a[57]),j=p(j,k,g,h,s,15,a[58]),h=p(h,j,k,g,D,21,a[59]),g=p(g,h,j,k,x,6,a[60]),k=p(k,g,h,j,B,10,a[61]),j=p(j,k,g,h,f,15,a[62]),h=p(h,j,k,g,z,21,a[63]);c[0]=c[0]+g|0;c[1]=c[1]+h|0;c[2]=c[2]+j|0;c[3]=c[3]+k|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;var m=s.floor(c/ +4294967296);b[(d+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360;b[(d+64>>>9<<4)+14]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;a.sigBytes=4*(b.length+1);this._process();a=this._hash;b=a.words;for(c=0;4>c;c++)d=b[c],b[c]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;return a},clone:function(){var a=q.clone.call(this);a._hash=this._hash.clone();return a}});b.MD5=q._createHelper(d);b.HmacMD5=q._createHmacHelper(d)})(Math); +(function(){var s=CryptoJS,l=s.lib,e=l.Base,n=l.WordArray,l=s.algo,p=l.EvpKDF=e.extend({cfg:e.extend({keySize:4,hasher:l.MD5,iterations:1}),init:function(b){this.cfg=this.cfg.extend(b)},compute:function(b,d){for(var e=this.cfg,q=e.hasher.create(),a=n.create(),l=a.words,p=e.keySize,e=e.iterations;l.length>>2]&255}};e.BlockCipher=q.extend({cfg:q.cfg.extend({mode:a,padding:u}),reset:function(){q.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a, +this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var w=e.CipherParams=n.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),a=(l.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?p.create([1398893684, +1701076831]).concat(a).concat(b):b).toString(d)},parse:function(a){a=d.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=p.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return w.create({ciphertext:a,salt:c})}},c=e.SerializableCipher=n.extend({cfg:n.extend({format:a}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return w.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding,blockSize:a.blockSize,formatter:d.format})}, +decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),l=(l.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=p.random(8));a=t.create({keySize:b+c}).compute(a,d);c=p.create(a.words.slice(b),4*c);a.sigBytes=4*b;return w.create({key:a,iv:c,salt:d})}},G=e.PasswordBasedCipher=c.extend({cfg:c.cfg.extend({kdf:l}),encrypt:function(a,b,d,e){e=this.cfg.extend(e);d=e.kdf.execute(d, +a.keySize,a.ivSize);e.iv=d.iv;a=c.encrypt.call(this,a,b,d.key,e);a.mixIn(d);return a},decrypt:function(a,b,d,e){e=this.cfg.extend(e);b=this._parse(b,e.format);d=e.kdf.execute(d,a.keySize,a.ivSize,b.salt);e.iv=d.iv;return c.decrypt.call(this,a,b,d.key,e)}})}(); +(function(){function s(){for(var b=this._S,d=this._i,e=this._j,q=0,a=0;4>a;a++){var d=(d+1)%256,e=(e+b[d])%256,l=b[d];b[d]=b[e];b[e]=l;q|=b[(b[d]+b[e])%256]<<24-8*a}this._i=d;this._j=e;return q}var l=CryptoJS,e=l.lib.StreamCipher,n=l.algo,p=n.RC4=e.extend({_doReset:function(){for(var b=this._key,d=b.words,b=b.sigBytes,e=this._S=[],l=0;256>l;l++)e[l]=l;for(var a=l=0;256>l;l++){var n=l%b,a=(a+e[l]+(d[n>>>2]>>>24-8*(n%4)&255))%256,n=e[l];e[l]=e[a];e[a]=n}this._i=this._j=0},_doProcessBlock:function(b, +d){b[d]^=s.call(this)},keySize:8,ivSize:0});l.RC4=e._createHelper(p);n=n.RC4Drop=p.extend({cfg:p.cfg.extend({drop:192}),_doReset:function(){p._doReset.call(this);for(var b=this.cfg.drop;0>>2]|=(h[b>>>2]>>>24-8*(b%4)&255)<<24-8*((d+b)%4);else if(65535>>2]=h[b>>>2];else c.push.apply(c,h);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=j.ceil(c/4)},clone:function(){var a=t.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(d%4)&255;b.push((g>>>4).toString(16));b.push((g&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],d=0;d>>3]|=parseInt(a.substr(d, +2),16)<<24-4*(d%8);return new u.init(b,c/2)}},A=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],d=0;d>>2]>>>24-8*(d%4)&255));return b.join("")},parse:function(a){for(var b=a.length,h=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<<24-8*(d%4);return new u.init(h,b)}},g=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(A.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return A.parse(unescape(encodeURIComponent(a)))}}, +v=l.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new u.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=g.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,h=b.words,d=b.sigBytes,g=this.blockSize,v=d/(4*g),v=a?j.ceil(v):j.max((v|0)-this._minBufferSize,0);a=v*g;d=j.min(4*a,d);if(a){for(var e=0;eb;b++){var a=e+b,c=g[a];g[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360}var a=this._hash.words,c=D.words,h=A.words,d=z.words,j=t.words,k=u.words,l=w.words,B,m,n,p,x,C,q,r,s,y;C=B=a[0];q=m=a[1];r=n=a[2];s=p=a[3];y=x=a[4];for(var f,b=0;80>b;b+=1)f=B+g[e+d[b]]|0,f=16>b?f+((m^n^p)+c[0]):32>b?f+((m&n|~m&p)+c[1]):48>b? +f+(((m|~n)^p)+c[2]):64>b?f+((m&p|n&~p)+c[3]):f+((m^(n|~p))+c[4]),f|=0,f=f<>>32-k[b],f=f+x|0,B=x,x=p,p=n<<10|n>>>22,n=m,m=f,f=C+g[e+j[b]]|0,f=16>b?f+((q^(r|~s))+h[0]):32>b?f+((q&s|r&~s)+h[1]):48>b?f+(((q|~r)^s)+h[2]):64>b?f+((q&r|~q&s)+h[3]):f+((q^r^s)+h[4]),f|=0,f=f<>>32-l[b],f=f+y|0,C=y,y=s,s=r<<10|r>>>22,r=q,q=f;f=a[1]+n+s|0;a[1]=a[2]+p+y|0;a[2]=a[3]+x+C|0;a[3]=a[4]+B+q|0;a[4]=a[0]+m+r|0;a[0]=f},_doFinalize:function(){var g=this._data,e=g.words,b=8*this._nDataBytes,a=8*g.sigBytes; +e[a>>>5]|=128<<24-a%32;e[(a+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;g.sigBytes=4*(e.length+1);this._process();g=this._hash;e=g.words;for(b=0;5>b;b++)a=e[b],e[b]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;return g},clone:function(){var e=l.clone.call(this);e._hash=this._hash.clone();return e}});j.RIPEMD160=l._createHelper(k);j.HmacRIPEMD160=l._createHmacHelper(k)})(Math); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha1.js b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha1.js new file mode 100644 index 0000000..d0d589f --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha1.js @@ -0,0 +1,15 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(e,m){var p={},j=p.lib={},l=function(){},f=j.Base={extend:function(a){l.prototype=this;var c=new l;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +n=j.WordArray=f.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=m?c:4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var c=this.words,q=a.words,d=this.sigBytes;a=a.sigBytes;this.clamp();if(d%4)for(var b=0;b>>2]|=(q[b>>>2]>>>24-8*(b%4)&255)<<24-8*((d+b)%4);else if(65535>>2]=q[b>>>2];else c.push.apply(c,q);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=e.ceil(c/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(d%4)&255;b.push((f>>>4).toString(16));b.push((f&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],d=0;d>>3]|=parseInt(a.substr(d, +2),16)<<24-4*(d%8);return new n.init(b,c/2)}},g=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],d=0;d>>2]>>>24-8*(d%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<<24-8*(d%4);return new n.init(b,c)}},r=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(g.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return g.parse(unescape(encodeURIComponent(a)))}}, +k=j.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new n.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=r.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,b=c.words,d=c.sigBytes,f=this.blockSize,h=d/(4*f),h=a?e.ceil(h):e.max((h|0)-this._minBufferSize,0);a=h*f;d=e.min(4*a,d);if(a){for(var g=0;ga;a++){if(16>a)l[a]=f[n+a]|0;else{var c=l[a-3]^l[a-8]^l[a-14]^l[a-16];l[a]=c<<1|c>>>31}c=(h<<5|h>>>27)+j+l[a];c=20>a?c+((g&e|~g&k)+1518500249):40>a?c+((g^e^k)+1859775393):60>a?c+((g&e|g&k|e&k)-1894007588):c+((g^e^ +k)-899497514);j=k;k=e;e=g<<30|g>>>2;g=h;h=c}b[0]=b[0]+h|0;b[1]=b[1]+g|0;b[2]=b[2]+e|0;b[3]=b[3]+k|0;b[4]=b[4]+j|0},_doFinalize:function(){var f=this._data,e=f.words,b=8*this._nDataBytes,h=8*f.sigBytes;e[h>>>5]|=128<<24-h%32;e[(h+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(h+64>>>9<<4)+15]=b;f.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=j.clone.call(this);e._hash=this._hash.clone();return e}});e.SHA1=j._createHelper(m);e.HmacSHA1=j._createHmacHelper(m)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha224.js b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha224.js new file mode 100644 index 0000000..e1653c9 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha224.js @@ -0,0 +1,17 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(g,l){var f={},k=f.lib={},h=function(){},m=k.Base={extend:function(a){h.prototype=this;var c=new h;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +q=k.WordArray=m.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=l?c:4*a.length},toString:function(a){return(a||s).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, +2),16)<<24-4*(b%8);return new q.init(d,c/2)}},n=t.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new q.init(d,c)}},j=t.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, +w=k.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?g.ceil(f):g.max((f|0)-this._minBufferSize,0);a=f*e;b=g.min(4*a,b);if(a){for(var u=0;un;){var j;a:{j=s;for(var w=g.sqrt(j),v=2;v<=w;v++)if(!(j%v)){j=!1;break a}j=!0}j&&(8>n&&(m[n]=t(g.pow(s,0.5))),q[n]=t(g.pow(s,1/3)),n++);s++}var a=[],f=f.SHA256=h.extend({_doReset:function(){this._hash=new k.init(m.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],g=b[2],k=b[3],h=b[4],l=b[5],m=b[6],n=b[7],p=0;64>p;p++){if(16>p)a[p]= +c[d+p]|0;else{var j=a[p-15],r=a[p-2];a[p]=((j<<25|j>>>7)^(j<<14|j>>>18)^j>>>3)+a[p-7]+((r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10)+a[p-16]}j=n+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&l^~h&m)+q[p]+a[p];r=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&g^f&g);n=m;m=l;l=h;h=k+j|0;k=g;g=f;f=e;e=j+r|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+g|0;b[3]=b[3]+k|0;b[4]=b[4]+h|0;b[5]=b[5]+l|0;b[6]=b[6]+m|0;b[7]=b[7]+n|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; +d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=g.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=h.clone.call(this);a._hash=this._hash.clone();return a}});l.SHA256=h._createHelper(f);l.HmacSHA256=h._createHmacHelper(f)})(Math); +(function(){var g=CryptoJS,l=g.lib.WordArray,f=g.algo,k=f.SHA256,f=f.SHA224=k.extend({_doReset:function(){this._hash=new l.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var f=k._doFinalize.call(this);f.sigBytes-=4;return f}});g.SHA224=k._createHelper(f);g.HmacSHA224=k._createHmacHelper(f)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha256.js b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha256.js new file mode 100644 index 0000000..529db30 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha256.js @@ -0,0 +1,16 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(h,s){var f={},t=f.lib={},g=function(){},j=t.Base={extend:function(a){g.prototype=this;var c=new g;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +q=t.WordArray=j.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=s?c:4*a.length},toString:function(a){return(a||u).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=j.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, +2),16)<<24-4*(b%8);return new q.init(d,c/2)}},k=v.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new q.init(d,c)}},l=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(k.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return k.parse(unescape(encodeURIComponent(a)))}}, +x=t.BufferedBlockAlgorithm=j.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=l.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var m=0;mk;){var l;a:{l=u;for(var x=h.sqrt(l),w=2;w<=x;w++)if(!(l%w)){l=!1;break a}l=!0}l&&(8>k&&(j[k]=v(h.pow(u,0.5))),q[k]=v(h.pow(u,1/3)),k++);u++}var a=[],f=f.SHA256=g.extend({_doReset:function(){this._hash=new t.init(j.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],m=b[2],h=b[3],p=b[4],j=b[5],k=b[6],l=b[7],n=0;64>n;n++){if(16>n)a[n]= +c[d+n]|0;else{var r=a[n-15],g=a[n-2];a[n]=((r<<25|r>>>7)^(r<<14|r>>>18)^r>>>3)+a[n-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+a[n-16]}r=l+((p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25))+(p&j^~p&k)+q[n]+a[n];g=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&m^f&m);l=k;k=j;j=p;p=h+r|0;h=m;m=f;f=e;e=r+g|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+m|0;b[3]=b[3]+h|0;b[4]=b[4]+p|0;b[5]=b[5]+j|0;b[6]=b[6]+k|0;b[7]=b[7]+l|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; +d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=g.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=g._createHelper(f);s.HmacSHA256=g._createHmacHelper(f)})(Math); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha3.js b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha3.js new file mode 100644 index 0000000..652505c --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha3.js @@ -0,0 +1,19 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(v,p){var d={},u=d.lib={},r=function(){},f=u.Base={extend:function(a){r.prototype=this;var b=new r;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +s=u.WordArray=f.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=p?b:4*a.length},toString:function(a){return(a||y).stringify(this)},concat:function(a){var b=this.words,c=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var n=0;n>>2]|=(c[n>>>2]>>>24-8*(n%4)&255)<<24-8*((j+n)%4);else if(65535>>2]=c[n>>>2];else b.push.apply(b,c);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< +32-8*(b%4);a.length=v.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],c=0;c>>2]>>>24-8*(j%4)&255;c.push((n>>>4).toString(16));c.push((n&15).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],j=0;j>>3]|=parseInt(a.substr(j, +2),16)<<24-4*(j%8);return new s.init(c,b/2)}},e=x.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],j=0;j>>2]>>>24-8*(j%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new s.init(c,b)}},q=x.Utf8={stringify:function(a){try{return decodeURIComponent(escape(e.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return e.parse(unescape(encodeURIComponent(a)))}}, +t=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new s.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=q.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,c=b.words,j=b.sigBytes,n=this.blockSize,e=j/(4*n),e=a?v.ceil(e):v.max((e|0)-this._minBufferSize,0);a=e*n;j=v.min(4*a,j);if(a){for(var f=0;ft;t++){s[e+5*q]=(t+1)*(t+2)/2%64;var w=(2*e+3*q)%5,e=q%5,q=w}for(e=0;5>e;e++)for(q=0;5>q;q++)x[e+5*q]=q+5*((2*e+3*q)%5);e=1;for(q=0;24>q;q++){for(var a=w=t=0;7>a;a++){if(e&1){var b=(1<b?w^=1<e;e++)c[e]=f.create();d=d.SHA3=r.extend({cfg:r.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state= +[],b=0;25>b;b++)a[b]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var e=this._state,f=this.blockSize/2,h=0;h>>24)&16711935|(l<<24|l>>>8)&4278255360,m=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,g=e[h];g.high^=m;g.low^=l}for(f=0;24>f;f++){for(h=0;5>h;h++){for(var d=l=0,k=0;5>k;k++)g=e[h+5*k],l^=g.high,d^=g.low;g=c[h];g.high=l;g.low=d}for(h=0;5>h;h++){g=c[(h+4)%5];l=c[(h+1)%5];m=l.high;k=l.low;l=g.high^ +(m<<1|k>>>31);d=g.low^(k<<1|m>>>31);for(k=0;5>k;k++)g=e[h+5*k],g.high^=l,g.low^=d}for(m=1;25>m;m++)g=e[m],h=g.high,g=g.low,k=s[m],32>k?(l=h<>>32-k,d=g<>>32-k):(l=g<>>64-k,d=h<>>64-k),g=c[x[m]],g.high=l,g.low=d;g=c[0];h=e[0];g.high=h.high;g.low=h.low;for(h=0;5>h;h++)for(k=0;5>k;k++)m=h+5*k,g=e[m],l=c[m],m=c[(h+1)%5+5*k],d=c[(h+2)%5+5*k],g.high=l.high^~m.high&d.high,g.low=l.low^~m.low&d.low;g=e[0];h=y[f];g.high^=h.high;g.low^=h.low}},_doFinalize:function(){var a=this._data, +b=a.words,c=8*a.sigBytes,e=32*this.blockSize;b[c>>>5]|=1<<24-c%32;b[(v.ceil((c+1)/e)*e>>>5)-1]|=128;a.sigBytes=4*b.length;this._process();for(var a=this._state,b=this.cfg.outputLength/8,c=b/8,e=[],h=0;h>>24)&16711935|(f<<24|f>>>8)&4278255360,d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;e.push(d);e.push(f)}return new u.init(e,b)},clone:function(){for(var a=r.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}}); +p.SHA3=r._createHelper(d);p.HmacSHA3=r._createHmacHelper(d)})(Math); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha384.js b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha384.js new file mode 100644 index 0000000..dec5f58 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha384.js @@ -0,0 +1,25 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(a,c){var d={},j=d.lib={},f=function(){},m=j.Base={extend:function(a){f.prototype=this;var b=new f;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +B=j.WordArray=m.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=c?b:4*a.length},toString:function(a){return(a||y).stringify(this)},concat:function(a){var b=this.words,g=a.words,e=this.sigBytes;a=a.sigBytes;this.clamp();if(e%4)for(var k=0;k>>2]|=(g[k>>>2]>>>24-8*(k%4)&255)<<24-8*((e+k)%4);else if(65535>>2]=g[k>>>2];else b.push.apply(b,g);this.sigBytes+=a;return this},clamp:function(){var n=this.words,b=this.sigBytes;n[b>>>2]&=4294967295<< +32-8*(b%4);n.length=a.ceil(b/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(n){for(var b=[],g=0;g>>2]>>>24-8*(e%4)&255;g.push((k>>>4).toString(16));g.push((k&15).toString(16))}return g.join("")},parse:function(a){for(var b=a.length,g=[],e=0;e>>3]|=parseInt(a.substr(e, +2),16)<<24-4*(e%8);return new B.init(g,b/2)}},F=v.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var g=[],e=0;e>>2]>>>24-8*(e%4)&255));return g.join("")},parse:function(a){for(var b=a.length,g=[],e=0;e>>2]|=(a.charCodeAt(e)&255)<<24-8*(e%4);return new B.init(g,b)}},ha=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(F.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return F.parse(unescape(encodeURIComponent(a)))}}, +Z=j.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new B.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=ha.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(n){var b=this._data,g=b.words,e=b.sigBytes,k=this.blockSize,m=e/(4*k),m=n?a.ceil(m):a.max((m|0)-this._minBufferSize,0);n=m*k;e=a.min(4*n,e);if(n){for(var c=0;cy;y++)v[y]=a();j=j.SHA512=d.extend({_doReset:function(){this._hash=new m.init([new f.init(1779033703,4089235720),new f.init(3144134277,2227873595),new f.init(1013904242,4271175723),new f.init(2773480762,1595750129),new f.init(1359893119,2917565137),new f.init(2600822924,725511199),new f.init(528734635,4215389547),new f.init(1541459225,327033209)])},_doProcessBlock:function(a,c){for(var d=this._hash.words, +f=d[0],j=d[1],b=d[2],g=d[3],e=d[4],k=d[5],m=d[6],d=d[7],y=f.high,M=f.low,$=j.high,N=j.low,aa=b.high,O=b.low,ba=g.high,P=g.low,ca=e.high,Q=e.low,da=k.high,R=k.low,ea=m.high,S=m.low,fa=d.high,T=d.low,s=y,p=M,G=$,D=N,H=aa,E=O,W=ba,I=P,t=ca,q=Q,U=da,J=R,V=ea,K=S,X=fa,L=T,u=0;80>u;u++){var z=v[u];if(16>u)var r=z.high=a[c+2*u]|0,h=z.low=a[c+2*u+1]|0;else{var r=v[u-15],h=r.high,w=r.low,r=(h>>>1|w<<31)^(h>>>8|w<<24)^h>>>7,w=(w>>>1|h<<31)^(w>>>8|h<<24)^(w>>>7|h<<25),C=v[u-2],h=C.high,l=C.low,C=(h>>>19|l<< +13)^(h<<3|l>>>29)^h>>>6,l=(l>>>19|h<<13)^(l<<3|h>>>29)^(l>>>6|h<<26),h=v[u-7],Y=h.high,A=v[u-16],x=A.high,A=A.low,h=w+h.low,r=r+Y+(h>>>0>>0?1:0),h=h+l,r=r+C+(h>>>0>>0?1:0),h=h+A,r=r+x+(h>>>0>>0?1:0);z.high=r;z.low=h}var Y=t&U^~t&V,A=q&J^~q&K,z=s&G^s&H^G&H,ja=p&D^p&E^D&E,w=(s>>>28|p<<4)^(s<<30|p>>>2)^(s<<25|p>>>7),C=(p>>>28|s<<4)^(p<<30|s>>>2)^(p<<25|s>>>7),l=B[u],ka=l.high,ga=l.low,l=L+((q>>>14|t<<18)^(q>>>18|t<<14)^(q<<23|t>>>9)),x=X+((t>>>14|q<<18)^(t>>>18|q<<14)^(t<<23|q>>>9))+(l>>>0< +L>>>0?1:0),l=l+A,x=x+Y+(l>>>0>>0?1:0),l=l+ga,x=x+ka+(l>>>0>>0?1:0),l=l+h,x=x+r+(l>>>0>>0?1:0),h=C+ja,z=w+z+(h>>>0>>0?1:0),X=V,L=K,V=U,K=J,U=t,J=q,q=I+l|0,t=W+x+(q>>>0>>0?1:0)|0,W=H,I=E,H=G,E=D,G=s,D=p,p=l+h|0,s=x+z+(p>>>0>>0?1:0)|0}M=f.low=M+p;f.high=y+s+(M>>>0

>>0?1:0);N=j.low=N+D;j.high=$+G+(N>>>0>>0?1:0);O=b.low=O+E;b.high=aa+H+(O>>>0>>0?1:0);P=g.low=P+I;g.high=ba+W+(P>>>0>>0?1:0);Q=e.low=Q+q;e.high=ca+t+(Q>>>0>>0?1:0);R=k.low=R+J;k.high=da+U+(R>>>0>>0?1:0); +S=m.low=S+K;m.high=ea+V+(S>>>0>>0?1:0);T=d.low=T+L;d.high=fa+X+(T>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,f=8*a.sigBytes;c[f>>>5]|=128<<24-f%32;c[(f+128>>>10<<5)+30]=Math.floor(d/4294967296);c[(f+128>>>10<<5)+31]=d;a.sigBytes=4*c.length;this._process();return this._hash.toX32()},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});c.SHA512=d._createHelper(j);c.HmacSHA512=d._createHmacHelper(j)})(); +(function(){var a=CryptoJS,c=a.x64,d=c.Word,j=c.WordArray,c=a.algo,f=c.SHA512,c=c.SHA384=f.extend({_doReset:function(){this._hash=new j.init([new d.init(3418070365,3238371032),new d.init(1654270250,914150663),new d.init(2438529370,812702999),new d.init(355462360,4144912697),new d.init(1731405415,4290775857),new d.init(2394180231,1750603025),new d.init(3675008525,1694076839),new d.init(1203062813,3204075428)])},_doFinalize:function(){var a=f._doFinalize.call(this);a.sigBytes-=16;return a}});a.SHA384= +f._createHelper(c);a.HmacSHA384=f._createHmacHelper(c)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha512.js b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha512.js new file mode 100644 index 0000000..ecbffee --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/sha512.js @@ -0,0 +1,23 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(a,m){var r={},f=r.lib={},g=function(){},l=f.Base={extend:function(a){g.prototype=this;var b=new g;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +p=f.WordArray=l.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=m?b:4*a.length},toString:function(a){return(a||q).stringify(this)},concat:function(a){var b=this.words,d=a.words,c=this.sigBytes;a=a.sigBytes;this.clamp();if(c%4)for(var j=0;j>>2]|=(d[j>>>2]>>>24-8*(j%4)&255)<<24-8*((c+j)%4);else if(65535>>2]=d[j>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var n=this.words,b=this.sigBytes;n[b>>>2]&=4294967295<< +32-8*(b%4);n.length=a.ceil(b/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(n){for(var b=[],d=0;d>>2]>>>24-8*(c%4)&255;d.push((j>>>4).toString(16));d.push((j&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>3]|=parseInt(a.substr(c, +2),16)<<24-4*(c%8);return new p.init(d,b/2)}},G=y.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new p.init(d,b)}},fa=y.Utf8={stringify:function(a){try{return decodeURIComponent(escape(G.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return G.parse(unescape(encodeURIComponent(a)))}}, +h=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new p.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=fa.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(n){var b=this._data,d=b.words,c=b.sigBytes,j=this.blockSize,l=c/(4*j),l=n?a.ceil(l):a.max((l|0)-this._minBufferSize,0);n=l*j;c=a.min(4*n,c);if(n){for(var h=0;hq;q++)y[q]=a();f=f.SHA512=r.extend({_doReset:function(){this._hash=new l.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(a,f){for(var h=this._hash.words, +g=h[0],n=h[1],b=h[2],d=h[3],c=h[4],j=h[5],l=h[6],h=h[7],q=g.high,m=g.low,r=n.high,N=n.low,Z=b.high,O=b.low,$=d.high,P=d.low,aa=c.high,Q=c.low,ba=j.high,R=j.low,ca=l.high,S=l.low,da=h.high,T=h.low,v=q,s=m,H=r,E=N,I=Z,F=O,W=$,J=P,w=aa,t=Q,U=ba,K=R,V=ca,L=S,X=da,M=T,x=0;80>x;x++){var B=y[x];if(16>x)var u=B.high=a[f+2*x]|0,e=B.low=a[f+2*x+1]|0;else{var u=y[x-15],e=u.high,z=u.low,u=(e>>>1|z<<31)^(e>>>8|z<<24)^e>>>7,z=(z>>>1|e<<31)^(z>>>8|e<<24)^(z>>>7|e<<25),D=y[x-2],e=D.high,k=D.low,D=(e>>>19|k<<13)^ +(e<<3|k>>>29)^e>>>6,k=(k>>>19|e<<13)^(k<<3|e>>>29)^(k>>>6|e<<26),e=y[x-7],Y=e.high,C=y[x-16],A=C.high,C=C.low,e=z+e.low,u=u+Y+(e>>>0>>0?1:0),e=e+k,u=u+D+(e>>>0>>0?1:0),e=e+C,u=u+A+(e>>>0>>0?1:0);B.high=u;B.low=e}var Y=w&U^~w&V,C=t&K^~t&L,B=v&H^v&I^H&I,ha=s&E^s&F^E&F,z=(v>>>28|s<<4)^(v<<30|s>>>2)^(v<<25|s>>>7),D=(s>>>28|v<<4)^(s<<30|v>>>2)^(s<<25|v>>>7),k=p[x],ia=k.high,ea=k.low,k=M+((t>>>14|w<<18)^(t>>>18|w<<14)^(t<<23|w>>>9)),A=X+((w>>>14|t<<18)^(w>>>18|t<<14)^(w<<23|t>>>9))+(k>>>0>> +0?1:0),k=k+C,A=A+Y+(k>>>0>>0?1:0),k=k+ea,A=A+ia+(k>>>0>>0?1:0),k=k+e,A=A+u+(k>>>0>>0?1:0),e=D+ha,B=z+B+(e>>>0>>0?1:0),X=V,M=L,V=U,L=K,U=w,K=t,t=J+k|0,w=W+A+(t>>>0>>0?1:0)|0,W=I,J=F,I=H,F=E,H=v,E=s,s=k+e|0,v=A+B+(s>>>0>>0?1:0)|0}m=g.low=m+s;g.high=q+v+(m>>>0>>0?1:0);N=n.low=N+E;n.high=r+H+(N>>>0>>0?1:0);O=b.low=O+F;b.high=Z+I+(O>>>0>>0?1:0);P=d.low=P+J;d.high=$+W+(P>>>0>>0?1:0);Q=c.low=Q+t;c.high=aa+w+(Q>>>0>>0?1:0);R=j.low=R+K;j.high=ba+U+(R>>>0>>0?1:0);S=l.low= +S+L;l.high=ca+V+(S>>>0>>0?1:0);T=h.low=T+M;h.high=da+X+(T>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,f=a.words,h=8*this._nDataBytes,g=8*a.sigBytes;f[g>>>5]|=128<<24-g%32;f[(g+128>>>10<<5)+30]=Math.floor(h/4294967296);f[(g+128>>>10<<5)+31]=h;a.sigBytes=4*f.length;this._process();return this._hash.toX32()},clone:function(){var a=r.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});m.SHA512=r._createHelper(f);m.HmacSHA512=r._createHmacHelper(f)})(); diff --git a/src/main/webapp/websquare/externalJS/CryptoJS/rollups/tripledes.js b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/tripledes.js new file mode 100644 index 0000000..ba24108 --- /dev/null +++ b/src/main/webapp/websquare/externalJS/CryptoJS/rollups/tripledes.js @@ -0,0 +1,51 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(u,l){var d={},n=d.lib={},p=function(){},s=n.Base={extend:function(a){p.prototype=this;var c=new p;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +q=n.WordArray=s.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=l?c:4*a.length},toString:function(a){return(a||v).stringify(this)},concat:function(a){var c=this.words,m=a.words,f=this.sigBytes;a=a.sigBytes;this.clamp();if(f%4)for(var t=0;t>>2]|=(m[t>>>2]>>>24-8*(t%4)&255)<<24-8*((f+t)%4);else if(65535>>2]=m[t>>>2];else c.push.apply(c,m);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=u.ceil(c/4)},clone:function(){var a=s.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],m=0;m>>2]>>>24-8*(f%4)&255;m.push((t>>>4).toString(16));m.push((t&15).toString(16))}return m.join("")},parse:function(a){for(var c=a.length,m=[],f=0;f>>3]|=parseInt(a.substr(f, +2),16)<<24-4*(f%8);return new q.init(m,c/2)}},b=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var m=[],f=0;f>>2]>>>24-8*(f%4)&255));return m.join("")},parse:function(a){for(var c=a.length,m=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new q.init(m,c)}},x=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(b.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return b.parse(unescape(encodeURIComponent(a)))}}, +r=n.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=x.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,m=c.words,f=c.sigBytes,t=this.blockSize,b=f/(4*t),b=a?u.ceil(b):u.max((b|0)-this._minBufferSize,0);a=b*t;f=u.min(4*a,f);if(a){for(var e=0;e>>2]>>>24-8*(q%4)&255)<<16|(n[q+1>>>2]>>>24-8*((q+1)%4)&255)<<8|n[q+2>>>2]>>>24-8*((q+2)%4)&255,v=0;4>v&&q+0.75*v>>6*(3-v)&63));if(n=s.charAt(64))for(;d.length%4;)d.push(n);return d.join("")},parse:function(d){var n=d.length,p=this._map,s=p.charAt(64);s&&(s=d.indexOf(s),-1!=s&&(n=s));for(var s=[],q=0,w=0;w< +n;w++)if(w%4){var v=p.indexOf(d.charAt(w-1))<<2*(w%4),b=p.indexOf(d.charAt(w))>>>6-2*(w%4);s[q>>>2]|=(v|b)<<24-8*(q%4);q++}return l.create(s,q)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); +(function(u){function l(b,e,a,c,m,f,t){b=b+(e&a|~e&c)+m+t;return(b<>>32-f)+e}function d(b,e,a,c,m,f,t){b=b+(e&c|a&~c)+m+t;return(b<>>32-f)+e}function n(b,e,a,c,m,f,t){b=b+(e^a^c)+m+t;return(b<>>32-f)+e}function p(b,e,a,c,m,f,t){b=b+(a^(e|~c))+m+t;return(b<>>32-f)+e}for(var s=CryptoJS,q=s.lib,w=q.WordArray,v=q.Hasher,q=s.algo,b=[],x=0;64>x;x++)b[x]=4294967296*u.abs(u.sin(x+1))|0;q=q.MD5=v.extend({_doReset:function(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(r,e){for(var a=0;16>a;a++){var c=e+a,m=r[c];r[c]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var a=this._hash.words,c=r[e+0],m=r[e+1],f=r[e+2],t=r[e+3],y=r[e+4],q=r[e+5],s=r[e+6],w=r[e+7],v=r[e+8],u=r[e+9],x=r[e+10],z=r[e+11],A=r[e+12],B=r[e+13],C=r[e+14],D=r[e+15],g=a[0],h=a[1],j=a[2],k=a[3],g=l(g,h,j,k,c,7,b[0]),k=l(k,g,h,j,m,12,b[1]),j=l(j,k,g,h,f,17,b[2]),h=l(h,j,k,g,t,22,b[3]),g=l(g,h,j,k,y,7,b[4]),k=l(k,g,h,j,q,12,b[5]),j=l(j,k,g,h,s,17,b[6]),h=l(h,j,k,g,w,22,b[7]), +g=l(g,h,j,k,v,7,b[8]),k=l(k,g,h,j,u,12,b[9]),j=l(j,k,g,h,x,17,b[10]),h=l(h,j,k,g,z,22,b[11]),g=l(g,h,j,k,A,7,b[12]),k=l(k,g,h,j,B,12,b[13]),j=l(j,k,g,h,C,17,b[14]),h=l(h,j,k,g,D,22,b[15]),g=d(g,h,j,k,m,5,b[16]),k=d(k,g,h,j,s,9,b[17]),j=d(j,k,g,h,z,14,b[18]),h=d(h,j,k,g,c,20,b[19]),g=d(g,h,j,k,q,5,b[20]),k=d(k,g,h,j,x,9,b[21]),j=d(j,k,g,h,D,14,b[22]),h=d(h,j,k,g,y,20,b[23]),g=d(g,h,j,k,u,5,b[24]),k=d(k,g,h,j,C,9,b[25]),j=d(j,k,g,h,t,14,b[26]),h=d(h,j,k,g,v,20,b[27]),g=d(g,h,j,k,B,5,b[28]),k=d(k,g, +h,j,f,9,b[29]),j=d(j,k,g,h,w,14,b[30]),h=d(h,j,k,g,A,20,b[31]),g=n(g,h,j,k,q,4,b[32]),k=n(k,g,h,j,v,11,b[33]),j=n(j,k,g,h,z,16,b[34]),h=n(h,j,k,g,C,23,b[35]),g=n(g,h,j,k,m,4,b[36]),k=n(k,g,h,j,y,11,b[37]),j=n(j,k,g,h,w,16,b[38]),h=n(h,j,k,g,x,23,b[39]),g=n(g,h,j,k,B,4,b[40]),k=n(k,g,h,j,c,11,b[41]),j=n(j,k,g,h,t,16,b[42]),h=n(h,j,k,g,s,23,b[43]),g=n(g,h,j,k,u,4,b[44]),k=n(k,g,h,j,A,11,b[45]),j=n(j,k,g,h,D,16,b[46]),h=n(h,j,k,g,f,23,b[47]),g=p(g,h,j,k,c,6,b[48]),k=p(k,g,h,j,w,10,b[49]),j=p(j,k,g,h, +C,15,b[50]),h=p(h,j,k,g,q,21,b[51]),g=p(g,h,j,k,A,6,b[52]),k=p(k,g,h,j,t,10,b[53]),j=p(j,k,g,h,x,15,b[54]),h=p(h,j,k,g,m,21,b[55]),g=p(g,h,j,k,v,6,b[56]),k=p(k,g,h,j,D,10,b[57]),j=p(j,k,g,h,s,15,b[58]),h=p(h,j,k,g,B,21,b[59]),g=p(g,h,j,k,y,6,b[60]),k=p(k,g,h,j,z,10,b[61]),j=p(j,k,g,h,f,15,b[62]),h=p(h,j,k,g,u,21,b[63]);a[0]=a[0]+g|0;a[1]=a[1]+h|0;a[2]=a[2]+j|0;a[3]=a[3]+k|0},_doFinalize:function(){var b=this._data,e=b.words,a=8*this._nDataBytes,c=8*b.sigBytes;e[c>>>5]|=128<<24-c%32;var m=u.floor(a/ +4294967296);e[(c+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360;e[(c+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;b.sigBytes=4*(e.length+1);this._process();b=this._hash;e=b.words;for(a=0;4>a;a++)c=e[a],e[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return b},clone:function(){var b=v.clone.call(this);b._hash=this._hash.clone();return b}});s.MD5=v._createHelper(q);s.HmacMD5=v._createHmacHelper(q)})(Math); +(function(){var u=CryptoJS,l=u.lib,d=l.Base,n=l.WordArray,l=u.algo,p=l.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:l.MD5,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,l){for(var p=this.cfg,v=p.hasher.create(),b=n.create(),u=b.words,r=p.keySize,p=p.iterations;u.length>>2]&255}};d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:r}),reset:function(){v.reset.call(this);var a=this.cfg,c=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var b=a.createEncryptor;else b=a.createDecryptor,this._minBufferSize=1;this._mode=b.call(a, +this,c&&c.words)},_doProcessBlock:function(a,c){this._mode.processBlock(a,c)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var c=this._process(!0)}else c=this._process(!0),a.unpad(c);return c},blockSize:4});var e=d.CipherParams=n.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),b=(l.format={}).OpenSSL={stringify:function(a){var c=a.ciphertext;a=a.salt;return(a?p.create([1398893684, +1701076831]).concat(a).concat(c):c).toString(q)},parse:function(a){a=q.parse(a);var c=a.words;if(1398893684==c[0]&&1701076831==c[1]){var b=p.create(c.slice(2,4));c.splice(0,4);a.sigBytes-=16}return e.create({ciphertext:a,salt:b})}},a=d.SerializableCipher=n.extend({cfg:n.extend({format:b}),encrypt:function(a,c,b,d){d=this.cfg.extend(d);var l=a.createEncryptor(b,d);c=l.finalize(c);l=l.cfg;return e.create({ciphertext:c,key:b,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})}, +decrypt:function(a,c,b,e){e=this.cfg.extend(e);c=this._parse(c,e.format);return a.createDecryptor(b,e).finalize(c.ciphertext)},_parse:function(a,c){return"string"==typeof a?c.parse(a,this):a}}),l=(l.kdf={}).OpenSSL={execute:function(a,c,b,d){d||(d=p.random(8));a=w.create({keySize:c+b}).compute(a,d);b=p.create(a.words.slice(c),4*b);a.sigBytes=4*c;return e.create({key:a,iv:b,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:l}),encrypt:function(c,b,e,d){d=this.cfg.extend(d);e=d.kdf.execute(e, +c.keySize,c.ivSize);d.iv=e.iv;c=a.encrypt.call(this,c,b,e.key,d);c.mixIn(e);return c},decrypt:function(c,b,e,d){d=this.cfg.extend(d);b=this._parse(b,d.format);e=d.kdf.execute(e,c.keySize,c.ivSize,b.salt);d.iv=e.iv;return a.decrypt.call(this,c,b,e.key,d)}})}(); +(function(){function u(b,a){var c=(this._lBlock>>>b^this._rBlock)&a;this._rBlock^=c;this._lBlock^=c<>>b^this._lBlock)&a;this._lBlock^=c;this._rBlock^=c<c;c++){var d=q[c]-1;a[c]=b[d>>>5]>>>31-d%32&1}b=this._subKeys=[];for(d=0;16>d;d++){for(var f=b[d]=[],l=v[d],c=0;24>c;c++)f[c/6|0]|=a[(w[c]-1+l)%28]<<31-c%6,f[4+(c/6|0)]|=a[28+(w[c+24]-1+l)%28]<<31-c%6;f[0]=f[0]<<1|f[0]>>>31;for(c=1;7>c;c++)f[c]>>>= +4*(c-1)+3;f[7]=f[7]<<5|f[7]>>>27}a=this._invSubKeys=[];for(c=0;16>c;c++)a[c]=b[15-c]},encryptBlock:function(b,a){this._doCryptBlock(b,a,this._subKeys)},decryptBlock:function(b,a){this._doCryptBlock(b,a,this._invSubKeys)},_doCryptBlock:function(e,a,c){this._lBlock=e[a];this._rBlock=e[a+1];u.call(this,4,252645135);u.call(this,16,65535);l.call(this,2,858993459);l.call(this,8,16711935);u.call(this,1,1431655765);for(var d=0;16>d;d++){for(var f=c[d],n=this._lBlock,p=this._rBlock,q=0,r=0;8>r;r++)q|=b[r][((p^ +f[r])&x[r])>>>0];this._lBlock=p;this._rBlock=n^q}c=this._lBlock;this._lBlock=this._rBlock;this._rBlock=c;u.call(this,1,1431655765);l.call(this,8,16711935);l.call(this,2,858993459);u.call(this,16,65535);u.call(this,4,252645135);e[a]=this._lBlock;e[a+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});d.DES=n._createHelper(r);s=s.TripleDES=n.extend({_doReset:function(){var b=this._key.words;this._des1=r.createEncryptor(p.create(b.slice(0,2)));this._des2=r.createEncryptor(p.create(b.slice(2,4)));this._des3= +r.createEncryptor(p.create(b.slice(4,6)))},encryptBlock:function(b,a){this._des1.encryptBlock(b,a);this._des2.decryptBlock(b,a);this._des3.encryptBlock(b,a)},decryptBlock:function(b,a){this._des3.decryptBlock(b,a);this._des2.encryptBlock(b,a);this._des1.decryptBlock(b,a)},keySize:6,ivSize:2,blockSize:2});d.TripleDES=n._createHelper(s)})(); diff --git a/src/main/webapp/websquare/externalJS/FusionCharts3.11.0/FusionCharts_all.js b/src/main/webapp/websquare/externalJS/FusionCharts3.11.0/FusionCharts_all.js new file mode 100644 index 0000000..e215cfc --- /dev/null +++ b/src/main/webapp/websquare/externalJS/FusionCharts3.11.0/FusionCharts_all.js @@ -0,0 +1,2796 @@ +/* + FusionCharts JavaScript Library + Copyright FusionCharts Technologies LLP + License Information at + + @version 3.11.0 + FusionCharts JavaScript Library + Copyright FusionCharts Technologies LLP + License Information at + + @version 3.11.0 + FusionCharts JavaScript Library + Copyright FusionCharts Technologies LLP + License Information at + FusionCharts JavaScript Library + Copyright FusionCharts Technologies LLP + License Information at + + @version 3.11.0 + + @attributions (infers respective third-party copyrights) + Raphael 2.1.0 (modified as 'Red Raphael') + JSON v2 + Firebug Lite 1.3.0 +*/ +(function(){if(!window.FusionCharts||!window.FusionCharts.version){var k=window,m=k.document,C=k.navigator,r={window:k},e=r.modules={},a=r.interpreters={},M=Object.prototype.toString,J=/msie/i.test(C.userAgent)&&!k.opera,I=/loaded|complete/,n=!1,z=function(){var a=r.ready;r.ready=!0;r.raiseEvent&&(r.readyNotified=!0,r.raiseEvent("ready",{version:r.core.version,now:!a},r.core));r.readyNow=!a},G=function(a,e){var c,p;if(e instanceof Array)for(c=0;c\x3c/script>'):m.write('")');}return l&&new g(l.contentWindow.document);},copyAttributes:function(l,m){var s=this;var n=s.$.attributes;m=m||{};for(var o=0;o0&&m)m=m.childNodes[l.shift()];return m?new d.node(m):null;},getChildCount:function(){return this.$.childNodes.length;},disableContextMenu:function(){this.on('contextmenu',function(l){if(!l.data.getTarget().hasClass('cke_enable_context_menu'))l.data.preventDefault();});},getDirection:function(l){var m=this;return l?m.getComputedStyle('direction')||m.getDirection()||m.getDocument().$.dir||m.getDocument().getBody().getDirection(1):m.getStyle('direction')||m.getAttribute('dir');},data:function(l,m){l='data-'+l;if(m===undefined)return this.getAttribute(l);else if(m===false)this.removeAttribute(l);else this.setAttribute(l,m);return null;}});var i={width:['border-left-width','border-right-width','padding-left','padding-right'],height:['border-top-width','border-bottom-width','padding-top','padding-bottom']}; +function j(l){var m=['top','left','right','bottom'],n;if(l=='border')n=['color','style','width'];var o=[];for(var p=0;p',bodyId:'',bodyClass:'',fullPage:false,height:200,plugins:'about,a11yhelp,basicstyles,bidi,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,dialogadvtab,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,iframe,image,indent,justify,keystrokes,link,list,liststyle,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,showblocks,showborders,smiley,sourcearea,specialchar,stylescombo,tab,table,tabletools,templates,toolbar,undo,wsc,wysiwygarea',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'',baseFloatZIndex:10000}; +var i=a.config;a.focusManager=function(j){if(j.focusManager)return j.focusManager;this.hasFocus=false;this._={editor:j};return this;};a.focusManager.prototype={focus:function(){var k=this;if(k._.timer)clearTimeout(k._.timer);if(!k.hasFocus){if(a.currentInstance)a.currentInstance.focusManager.forceBlur();var j=k._.editor;j.container.getChild(1).addClass('cke_focus');k.hasFocus=true;j.fire('focus');}},blur:function(){var j=this;if(j._.timer)clearTimeout(j._.timer);j._.timer=setTimeout(function(){delete j._.timer;j.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var j=this._.editor;j.container.getChild(1).removeClass('cke_focus');this.hasFocus=false;j.fire('blur');}}};(function(){var j={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-gb':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,sk:1,sl:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(k,l,m){if(!k||!a.lang.languages[k])k=this.detect(l,k);if(!this[k])a.scriptLoader.load(a.getUrl('lang/'+k+'.js'),function(){m(k,this[k]);},this);else m(k,this[k]);},detect:function(k,l){var m=this.languages;l=l||navigator.userLanguage||navigator.language||k;var n=l.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),o=n[1],p=n[2];if(m[o+'-'+p])o=o+'-'+p;else if(!m[o])o=null;a.lang.detect=o?function(){return o;}:function(q){return q;};return o||k;}};})();a.scriptLoader=(function(){var j={},k={};return{load:function(l,m,n,o){var p=typeof l=='string';if(p)l=[l];if(!n)n=a;var q=l.length,r=[],s=[],t=function(y){if(m)if(p)m.call(n,y);else m.call(n,r,s);};if(q===0){t(true);return;}var u=function(y,z){(z?r:s).push(y);if(--q<=0){o&&a.document.getDocumentElement().removeStyle('cursor');t(z);}},v=function(y,z){j[y]=1;var A=k[y];delete k[y];for(var B=0;B1)return;var A=new h('script');A.setAttributes({type:'text/javascript',src:y});if(m)if(c)A.$.onreadystatechange=function(){if(A.$.readyState=='loaded'||A.$.readyState=='complete'){A.$.onreadystatechange=null;v(y,true);}};else{A.$.onload=function(){setTimeout(function(){v(y,true);},0);};A.$.onerror=function(){v(y,false);};}A.appendTo(a.document.getHead());};o&&a.document.getDocumentElement().setStyle('cursor','wait');for(var x=0;x1)return;var w=!p.css||!p.css.length,x=!p.js||!p.js.length,y=function(){if(w&&x){p._isLoaded=1;for(var B=0;B=0?x.langCode:J[0];if(!I.langEntries||!I.langEntries[L])G.push(a.getUrl(K+'lang/'+L+'.js'));else{e.extend(x.lang,I.langEntries[L]);L=null;}}F.push(L);E.push(I);}a.scriptLoader.load(G,function(){var M=['beforeInit','init','afterInit'];for(var N=0;N]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))",'g')};};(function(){var l=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,m={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};a.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(n){var A=this;var o,p,q=0,r;while(o=A._.htmlPartsRegex.exec(n)){var s=o.index;if(s>q){var t=n.substring(q,s);if(r)r.push(t);else A.onText(t);}q=A._.htmlPartsRegex.lastIndex;if(p=o[1]){p=p.toLowerCase();if(r&&f.$cdata[p]){A.onCDATA(r.join(''));r=null;}if(!r){A.onTagClose(p);continue;}}if(r){r.push(o[0]);continue;}if(p=o[3]){p=p.toLowerCase();if(/="/.test(p))continue; +var u={},v,w=o[4],x=!!(w&&w.charAt(w.length-1)=='/');if(w)while(v=l.exec(w)){var y=v[1].toLowerCase(),z=v[2]||v[3]||v[4]||'';if(!z&&m[y])u[y]=y;else u[y]=z;}A.onTagOpen(p,u,x);if(!r&&f.$cdata[p])r=[];continue;}if(p=o[2])A.onComment(p);}if(n.length>q)A.onText(n.substring(q,n.length));}};})();a.htmlParser.comment=function(l){this.value=l;this._={isBlockLike:false};};a.htmlParser.comment.prototype={type:8,writeHtml:function(l,m){var n=this.value;if(m){if(!(n=m.onComment(n,this)))return;if(typeof n!='string'){n.parent=this.parent;n.writeHtml(l,m);return;}}l.comment(n);}};(function(){a.htmlParser.text=function(l){this.value=l;this._={isBlockLike:false};};a.htmlParser.text.prototype={type:3,writeHtml:function(l,m){var n=this.value;if(m&&!(n=m.onText(n,this)))return;l.text(n);}};})();(function(){a.htmlParser.cdata=function(l){this.value=l;};a.htmlParser.cdata.prototype={type:3,writeHtml:function(l){l.write(this.value);}};})();a.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false};};(function(){var l=e.extend({table:1,ul:1,ol:1,dl:1},f.table,f.ul,f.ol,f.dl),m=c&&b.version<8?{dd:1,dt:1}:{},n={ol:1,ul:1},o=e.extend({},{html:1},f.html,f.body,f.head,{style:1,script:1});function p(q){return q.name=='a'&&q.attributes.href||f.$removeEmpty[q.name];};a.htmlParser.fragment.fromHtml=function(q,r,s){var t=new a.htmlParser(),u=s||new a.htmlParser.fragment(),v=[],w=[],x=u,y=false,z=false;function A(D){var E;if(v.length>0)for(var F=0;F=0;E--){if(D==v[E].name){v.splice(E,1);return;}}var F=[],G=[],H=x;while(H!=u&&H.name!=D){if(!H._.isBlockLike)G.unshift(H);F.push(H);H=H.returnPoint||H.parent;}if(H!=u){for(E=0;E0?t.children[r-1]:null;if(s){if(q._.isBlockLike&&s.type==3){s.value=e.rtrim(s.value);if(s.value.length===0){t.children.pop();t.add(q);return;}}s.next=q;}q.previous=s;q.parent=t;t.children.splice(r,0,q);t._.hasInlineStarted=q.type==3||q.type==1&&!q._.isBlockLike;},writeHtml:function(q,r){var s;this.filterChildren=function(){var t=new a.htmlParser.basicWriter();this.writeChildrenHtml.call(this,t,r,true);var u=t.getHtml();this.children=new a.htmlParser.fragment.fromHtml(u).children;s=1;};!this.name&&r&&r.onFragment(this);this.writeChildrenHtml(q,s?null:r);},writeChildrenHtml:function(q,r){for(var s=0;sn?1:0;};a.htmlParser.element.prototype={type:1,add:a.htmlParser.fragment.prototype.add,clone:function(){return new a.htmlParser.element(this.name,this.attributes);},writeHtml:function(m,n){var o=this.attributes,p=this,q=p.name,r,s,t,u;p.filterChildren=function(){if(!u){var B=new a.htmlParser.basicWriter();a.htmlParser.fragment.prototype.writeChildrenHtml.call(p,B,n);p.children=new a.htmlParser.fragment.fromHtml(B.getHtml(),0,p.clone()).children;u=1;}};if(n){for(;;){if(!(q=n.onElementName(q)))return;p.name=q;if(!(p=n.onElement(p)))return;p.parent=this.parent;if(p.name==q)break;if(p.type!=1){p.writeHtml(m,n);return;}q=p.name;if(!q){for(var v=0,w=this.children.length;v=0;u--){var x=r[u];if(x){x.pri=s;q.splice(t,0,x);}}}};function n(q,r,s){if(r)for(var t in r){var u=q[t];q[t]=o(u,r[t],s);if(!u)q.$length++;}};function o(q,r,s){if(r){r.pri=s;if(q){if(!q.splice){if(q.pri>s)q=[r,q];else q=[q,r];q.filter=p;}else m(q,r,s);return q;}else{r.filter=r;return r;}}};function p(q){var r=q.type||q instanceof a.htmlParser.fragment;for(var s=0;s');else this._.output.push('>');},attribute:function(l,m){if(typeof m=='string')m=e.htmlEncodeAttr(m);this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){this._.output.push('');},text:function(l){this._.output.push(l);},comment:function(l){this._.output.push('');},write:function(l){this._.output.push(l); +},reset:function(){this._.output=[];this._.indent=false;},getHtml:function(l){var m=this._.output.join('');if(l)this.reset();return m;}}});delete a.loadFullCore;a.instances={};a.document=new g(document);a.add=function(l){a.instances[l.name]=l;l.on('focus',function(){if(a.currentInstance!=l){a.currentInstance=l;a.fire('currentInstance');}});l.on('blur',function(){if(a.currentInstance==l){a.currentInstance=null;a.fire('currentInstance');}});};a.remove=function(l){delete a.instances[l.name];};a.on('instanceDestroyed',function(){if(e.isEmpty(this.instances))a.fire('reset');});a.TRISTATE_ON=1;a.TRISTATE_OFF=2;a.TRISTATE_DISABLED=0;d.comment=function(l,m){if(typeof l=='string')l=(m?m.$:document).createComment(l);d.domObject.call(this,l);};d.comment.prototype=new d.node();e.extend(d.comment.prototype,{type:8,getOuterHtml:function(){return '';}});(function(){var l={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1,legend:1,caption:1},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,form:1,fieldset:1},n=function(o){var p=o.getChildren();for(var q=0,r=p.count();q0)v=v.getChild(z-1);else v=A(v,true)===false?null:v.getPreviousSourceNode(true,C,A);}else{v=w;if(v.type==1)if(!(v=v.getChild(y)))v=A(w,true)===false?null:w.getNextSourceNode(true,C,A);}if(v&&A(v)===false)v=null;}while(v&&!this._.end){this.current=v;if(!this.evaluator||this.evaluator(v)!==false){if(!t)return v;}else if(t&&this.evaluator)return false;v=v[D](false,C,A);}this.end();return this.current=null;};function m(s){var t,u=null;while(t=l.call(this,s))u=t;return u;};d.walker=e.createClass({$:function(s){this.range=s;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,1);},checkForward:function(){return l.call(this,0,1)!==false;},checkBackward:function(){return l.call(this,1,1)!==false;},lastForward:function(){return m.call(this);},lastBackward:function(){return m.call(this,1);},reset:function(){delete this.current;this._={};}}});var n={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1};h.prototype.isBlockBoundary=function(s){var t=s?e.extend({},f.$block,s||{}):f.$block; +return this.getComputedStyle('float')=='none'&&n[this.getComputedStyle('display')]||t[this.getName()];};d.walker.blockBoundary=function(s){return function(t,u){return!(t.type==1&&t.isBlockBoundary(s));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmark=function(s,t){function u(v){return v&&v.getName&&v.getName()=='span'&&v.data('cke-bookmark');};return function(v){var w,x;w=v&&!v.getName&&(x=v.getParent())&&u(x);w=s?w:w||u(v);return!!(t^w);};};d.walker.whitespaces=function(s){return function(t){var u;if(t&&t.type==3)u=!e.trim(t.getText())||b.webkit&&t.getText()=='​';return!!(s^u);};};d.walker.invisible=function(s){var t=d.walker.whitespaces();return function(u){var v;if(t(u))v=1;else{if(u.type==3)u=u.getParent();v=!u.$.offsetHeight;}return!!(s^v);};};d.walker.nodeType=function(s,t){return function(u){return!!(t^u.type==s);};};d.walker.bogus=function(s){function t(u){return!p(u)&&!q(u);};return function(u){var v=!c?u.is&&u.is('br'):u.getText&&o.test(u.getText());if(v){var w=u.getParent(),x=u.getNext(t);v=w.isBlockBoundary()&&(!x||x.type==1&&x.isBlockBoundary());}return!!(s^v);};};var o=/^[\t\r\n ]*(?: |\xa0)$/,p=d.walker.whitespaces(),q=d.walker.bookmark(),r=function(s){return q(s)||p(s)||s.type==1&&s.getName() in f.$inline&&!(s.getName() in f.$empty);};h.prototype.getBogus=function(){var s=this;do s=s.getPreviousSourceNode();while(r(s));if(s&&(!c?s.is&&s.is('br'):s.getText&&o.test(s.getText())))return s;return false;};})();d.range=function(l){var m=this;m.startContainer=null;m.startOffset=null;m.endContainer=null;m.endOffset=null;m.collapsed=true;m.document=l;};(function(){var l=function(v){v.collapsed=v.startContainer&&v.endContainer&&v.startContainer.equals(v.endContainer)&&v.startOffset==v.endOffset;},m=function(v,w,x,y){v.optimizeBookmark();var z=v.startContainer,A=v.endContainer,B=v.startOffset,C=v.endOffset,D,E;if(A.type==3)A=A.split(C);else if(A.getChildCount()>0)if(C>=A.getChildCount()){A=A.append(v.document.createText(''));E=true;}else A=A.getChild(C);if(z.type==3){z.split(B);if(z.equals(A))A=z.getNext();}else if(!B){z=z.getFirst().insertBeforeMe(v.document.createText(''));D=true;}else if(B>=z.getChildCount()){z=z.append(v.document.createText(''));D=true;}else z=z.getChild(B).getPrevious();var F=z.getParents(),G=A.getParents(),H,I,J;for(H=0;H0&&!L.equals(A))M=K.append(L.clone());if(!F[Q]||L.$.parentNode!=F[Q].$.parentNode){N=L.getPrevious();while(N){if(N.equals(F[Q])||N.equals(z))break;O=N.getPrevious();if(w==2)K.$.insertBefore(N.$.cloneNode(true),K.$.firstChild);else{N.remove();if(w==1)K.$.insertBefore(N.$,K.$.firstChild);}N=O;}}if(K)K=M;}if(w==2){var R=v.startContainer;if(R.type==3){R.$.data+=R.$.nextSibling.data;R.$.parentNode.removeChild(R.$.nextSibling);}var S=v.endContainer;if(S.type==3&&S.$.nextSibling){S.$.data+=S.$.nextSibling.data;S.$.parentNode.removeChild(S.$.nextSibling);}}else{if(I&&J&&(z.$.parentNode!=I.$.parentNode||A.$.parentNode!=J.$.parentNode)){var T=J.getIndex();if(D&&J.$.parentNode==z.$.parentNode)T--;if(y&&I.type==1){var U=h.createFromHtml(' ',v.document);U.insertAfter(I);I.mergeSiblings(false);v.moveToBookmark({startNode:U});}else v.setStart(J.getParent(),T);}v.collapse(true);}if(D)z.remove();if(E&&A.$.parentNode)A.remove();},n={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1};function o(){var v=false,w=d.walker.whitespaces(),x=d.walker.bookmark(true),y=d.walker.bogus();return function(z){if(x(z)||w(z))return true;if(y(z)&&!v){v=true;return true;}if(z.type==3&&(z.hasAscendant('pre')||e.trim(z.getText()).length))return false;if(z.type==1&&!n[z.getName()])return false;return true;};};var p=d.walker.bogus();function q(v){var w=d.walker.whitespaces(),x=d.walker.bookmark(1);return function(y){if(x(y)||w(y))return true;return!v&&p(y)||y.type==1&&y.getName() in f.$removeEmpty;};};var r=new d.walker.whitespaces(),s=new d.walker.bookmark(),t=/^[\t\r\n ]*(?: |\xa0)$/;function u(v){return!r(v)&&!s(v);};d.range.prototype={clone:function(){var w=this;var v=new d.range(w.document);v.startContainer=w.startContainer;v.startOffset=w.startOffset;v.endContainer=w.endContainer;v.endOffset=w.endOffset;v.collapsed=w.collapsed;return v;},collapse:function(v){var w=this;if(v){w.endContainer=w.startContainer;w.endOffset=w.startOffset;}else{w.startContainer=w.endContainer;w.startOffset=w.endOffset;}w.collapsed=true;},cloneContents:function(){var v=new d.documentFragment(this.document);if(!this.collapsed)m(this,2,v);return v;},deleteContents:function(v){if(this.collapsed)return; +m(this,0,null,v);},extractContents:function(v){var w=new d.documentFragment(this.document);if(!this.collapsed)m(this,1,w,v);return w;},createBookmark:function(v){var B=this;var w,x,y,z,A=B.collapsed;w=B.document.createElement('span');w.data('cke-bookmark',1);w.setStyle('display','none');w.setHtml(' ');if(v){y='cke_bm_'+e.getNextNumber();w.setAttribute('id',y+(A?'C':'S'));}if(!A){x=w.clone();x.setHtml(' ');if(v)x.setAttribute('id',y+'E');z=B.clone();z.collapse();z.insertNode(x);}z=B.clone();z.collapse(true);z.insertNode(w);if(x){B.setStartAfter(w);B.setEndBefore(x);}else B.moveToPosition(w,4);return{startNode:v?y+(A?'C':'S'):w,endNode:v?y+'E':x,serializable:v,collapsed:A};},createBookmark2:function(v){var D=this;var w=D.startContainer,x=D.endContainer,y=D.startOffset,z=D.endOffset,A=D.collapsed,B,C;if(!w||!x)return{start:0,end:0};if(v){if(w.type==1){B=w.getChild(y);if(B&&B.type==3&&y>0&&B.getPrevious().type==3){w=B;y=0;}if(B&&B.type==1)y=B.getIndex(1);}while(w.type==3&&(C=w.getPrevious())&&C.type==3){w=C;y+=C.getLength();}if(!A){if(x.type==1){B=x.getChild(z);if(B&&B.type==3&&z>0&&B.getPrevious().type==3){x=B;z=0;}if(B&&B.type==1)z=B.getIndex(1);}while(x.type==3&&(C=x.getPrevious())&&C.type==3){x=C;z+=C.getLength();}}}return{start:w.getAddress(v),end:A?null:x.getAddress(v),startOffset:y,endOffset:z,normalized:v,collapsed:A,is2:true};},moveToBookmark:function(v){var D=this;if(v.is2){var w=D.document.getByAddress(v.start,v.normalized),x=v.startOffset,y=v.end&&D.document.getByAddress(v.end,v.normalized),z=v.endOffset;D.setStart(w,x);if(y)D.setEnd(y,z);else D.collapse(true);}else{var A=v.serializable,B=A?D.document.getById(v.startNode):v.startNode,C=A?D.document.getById(v.endNode):v.endNode;D.setStartBefore(B);B.remove();if(C){D.setEndBefore(C);C.remove();}else D.collapse(true);}},getBoundaryNodes:function(){var A=this;var v=A.startContainer,w=A.endContainer,x=A.startOffset,y=A.endOffset,z;if(v.type==1){z=v.getChildCount();if(z>x)v=v.getChild(x);else if(z<1)v=v.getPreviousSourceNode();else{v=v.$;while(v.lastChild)v=v.lastChild;v=new d.node(v);v=v.getNextSourceNode()||v;}}if(w.type==1){z=w.getChildCount();if(z>y)w=w.getChild(y).getPreviousSourceNode(true);else if(z<1)w=w.getPreviousSourceNode();else{w=w.$;while(w.lastChild)w=w.lastChild;w=new d.node(w);}}if(v.getPosition(w)&2)v=w;return{startNode:v,endNode:w};},getCommonAncestor:function(v,w){var A=this;var x=A.startContainer,y=A.endContainer,z;if(x.equals(y)){if(v&&x.type==1&&A.startOffset==A.endOffset-1)z=x.getChild(A.startOffset); +else z=x;}else z=x.getCommonAncestor(y);return w&&!z.is?z.getParent():z;},optimize:function(){var x=this;var v=x.startContainer,w=x.startOffset;if(v.type!=1)if(!w)x.setStartBefore(v);else if(w>=v.getLength())x.setStartAfter(v);v=x.endContainer;w=x.endOffset;if(v.type!=1)if(!w)x.setEndBefore(v);else if(w>=v.getLength())x.setEndAfter(v);},optimizeBookmark:function(){var x=this;var v=x.startContainer,w=x.endContainer;if(v.is&&v.is('span')&&v.data('cke-bookmark'))x.setStartAt(v,3);if(w&&w.is&&w.is('span')&&w.data('cke-bookmark'))x.setEndAt(w,4);},trim:function(v,w){var D=this;var x=D.startContainer,y=D.startOffset,z=D.collapsed;if((!v||z)&&x&&x.type==3){if(!y){y=x.getIndex();x=x.getParent();}else if(y>=x.getLength()){y=x.getIndex()+1;x=x.getParent();}else{var A=x.split(y);y=x.getIndex()+1;x=x.getParent();if(D.startContainer.equals(D.endContainer))D.setEnd(A,D.endOffset-D.startOffset);else if(x.equals(D.endContainer))D.endOffset+=1;}D.setStart(x,y);if(z){D.collapse(true);return;}}var B=D.endContainer,C=D.endOffset;if(!(w||z)&&B&&B.type==3){if(!C){C=B.getIndex();B=B.getParent();}else if(C>=B.getLength()){C=B.getIndex()+1;B=B.getParent();}else{B.split(C);C=B.getIndex()+1;B=B.getParent();}D.setEnd(B,C);}},enlarge:function(v,w){switch(v){case 1:if(this.collapsed)return;var x=this.getCommonAncestor(),y=this.document.getBody(),z,A,B,C,D,E=false,F,G,H=this.startContainer,I=this.startOffset;if(H.type==3){if(I){H=!e.trim(H.substring(0,I)).length&&H;E=!!H;}if(H)if(!(C=H.getPrevious()))B=H.getParent();}else{if(I)C=H.getChild(I-1)||H.getLast();if(!C)B=H;}while(B||C){if(B&&!C){if(!D&&B.equals(x))D=true;if(!y.contains(B))break;if(!E||B.getComputedStyle('display')!='inline'){E=false;if(D)z=B;else this.setStartBefore(B);}C=B.getPrevious();}while(C){F=false;if(C.type==8){C=C.getPrevious();continue;}else if(C.type==3){G=C.getText();if(/[^\s\ufeff]/.test(G))C=null;F=/[\s\ufeff]$/.test(G);}else if((C.$.offsetWidth>0||w&&C.is('br'))&&!C.data('cke-bookmark'))if(E&&f.$removeEmpty[C.getName()]){G=C.getText();if(/[^\s\ufeff]/.test(G))C=null;else{var J=C.$.getElementsByTagName('*');for(var K=0,L;L=J[K++];){if(!f.$removeEmpty[L.nodeName.toLowerCase()]){C=null;break;}}}if(C)F=!!G.length;}else C=null;if(F)if(E){if(D)z=B;else if(B)this.setStartBefore(B);}else E=true;if(C){var M=C.getPrevious();if(!B&&!M){B=C;C=null;break;}C=M;}else B=null;}if(B)B=B.getParent();}H=this.endContainer;I=this.endOffset;B=C=null;D=E=false;if(H.type==3){H=!e.trim(H.substring(I)).length&&H;E=!(H&&H.getLength());if(H)if(!(C=H.getNext()))B=H.getParent(); +}else{C=H.getChild(I);if(!C)B=H;}while(B||C){if(B&&!C){if(!D&&B.equals(x))D=true;if(!y.contains(B))break;if(!E||B.getComputedStyle('display')!='inline'){E=false;if(D)A=B;else if(B)this.setEndAfter(B);}C=B.getNext();}while(C){F=false;if(C.type==3){G=C.getText();if(/[^\s\ufeff]/.test(G))C=null;F=/^[\s\ufeff]/.test(G);}else if(C.type==1){if((C.$.offsetWidth>0||w&&C.is('br'))&&!C.data('cke-bookmark'))if(E&&f.$removeEmpty[C.getName()]){G=C.getText();if(/[^\s\ufeff]/.test(G))C=null;else{J=C.$.getElementsByTagName('*');for(K=0;L=J[K++];){if(!f.$removeEmpty[L.nodeName.toLowerCase()]){C=null;break;}}}if(C)F=!!G.length;}else C=null;}else F=1;if(F)if(E)if(D)A=B;else this.setEndAfter(B);if(C){M=C.getNext();if(!B&&!M){B=C;C=null;break;}C=M;}else B=null;}if(B)B=B.getParent();}if(z&&A){x=z.contains(A)?A:z;this.setStartBefore(x);this.setEndAfter(x);}break;case 2:case 3:var N=new d.range(this.document);y=this.document.getBody();N.setStartAt(y,1);N.setEnd(this.startContainer,this.startOffset);var O=new d.walker(N),P,Q,R=d.walker.blockBoundary(v==3?{br:1}:null),S=function(Y){var Z=R(Y);if(!Z)P=Y;return Z;},T=function(Y){var Z=S(Y);if(!Z&&Y.is&&Y.is('br'))Q=Y;return Z;};O.guard=S;B=O.lastBackward();P=P||y;this.setStartAt(P,!P.is('br')&&(!B&&this.checkStartOfBlock()||B&&P.contains(B))?1:4);if(v==3){var U=this.clone();O=new d.walker(U);var V=d.walker.whitespaces(),W=d.walker.bookmark();O.evaluator=function(Y){return!V(Y)&&!W(Y);};var X=O.previous();if(X&&X.type==1&&X.is('br'))return;}N=this.clone();N.collapse();N.setEndAt(y,2);O=new d.walker(N);O.guard=v==3?T:S;P=null;B=O.lastForward();P=P||y;this.setEndAt(P,!B&&this.checkEndOfBlock()||B&&P.contains(B)?2:3);if(Q)this.setEndAfter(Q);}},shrink:function(v,w){if(!this.collapsed){v=v||2;var x=this.clone(),y=this.startContainer,z=this.endContainer,A=this.startOffset,B=this.endOffset,C=this.collapsed,D=1,E=1;if(y&&y.type==3)if(!A)x.setStartBefore(y);else if(A>=y.getLength())x.setStartAfter(y);else{x.setStartBefore(y);D=0;}if(z&&z.type==3)if(!B)x.setEndBefore(z);else if(B>=z.getLength())x.setEndAfter(z);else{x.setEndAfter(z);E=0;}var F=new d.walker(x),G=d.walker.bookmark();F.evaluator=function(K){return K.type==(v==1?1:3);};var H;F.guard=function(K,L){if(G(K))return true;if(v==1&&K.type==3)return false;if(L&&K.equals(H))return false;if(!L&&K.type==1)H=K;return true;};if(D){var I=F[v==1?'lastForward':'next']();I&&this.setStartAt(I,w?1:3);}if(E){F.reset();var J=F[v==1?'lastBackward':'previous']();J&&this.setEndAt(J,w?2:4);}return!!(D||E); +}},insertNode:function(v){var z=this;z.optimizeBookmark();z.trim(false,true);var w=z.startContainer,x=z.startOffset,y=w.getChild(x);if(y)v.insertBefore(y);else w.append(v);if(v.getParent().equals(z.endContainer))z.endOffset++;z.setStartBefore(v);},moveToPosition:function(v,w){this.setStartAt(v,w);this.collapse(true);},selectNodeContents:function(v){this.setStart(v,0);this.setEnd(v,v.type==3?v.getLength():v.getChildCount());},setStart:function(v,w){var x=this;if(v.type==1&&f.$empty[v.getName()])w=v.getIndex(),v=v.getParent();x.startContainer=v;x.startOffset=w;if(!x.endContainer){x.endContainer=v;x.endOffset=w;}l(x);},setEnd:function(v,w){var x=this;if(v.type==1&&f.$empty[v.getName()])w=v.getIndex()+1,v=v.getParent();x.endContainer=v;x.endOffset=w;if(!x.startContainer){x.startContainer=v;x.startOffset=w;}l(x);},setStartAfter:function(v){this.setStart(v.getParent(),v.getIndex()+1);},setStartBefore:function(v){this.setStart(v.getParent(),v.getIndex());},setEndAfter:function(v){this.setEnd(v.getParent(),v.getIndex()+1);},setEndBefore:function(v){this.setEnd(v.getParent(),v.getIndex());},setStartAt:function(v,w){var x=this;switch(w){case 1:x.setStart(v,0);break;case 2:if(v.type==3)x.setStart(v,v.getLength());else x.setStart(v,v.getChildCount());break;case 3:x.setStartBefore(v);break;case 4:x.setStartAfter(v);}l(x);},setEndAt:function(v,w){var x=this;switch(w){case 1:x.setEnd(v,0);break;case 2:if(v.type==3)x.setEnd(v,v.getLength());else x.setEnd(v,v.getChildCount());break;case 3:x.setEndBefore(v);break;case 4:x.setEndAfter(v);}l(x);},fixBlock:function(v,w){var z=this;var x=z.createBookmark(),y=z.document.createElement(w);z.collapse(v);z.enlarge(2);z.extractContents().appendTo(y);y.trim();if(!c)y.appendBogus();z.insertNode(y);z.moveToBookmark(x);return y;},splitBlock:function(v){var F=this;var w=new d.elementPath(F.startContainer),x=new d.elementPath(F.endContainer),y=w.blockLimit,z=x.blockLimit,A=w.block,B=x.block,C=null;if(!y.equals(z))return null;if(v!='br'){if(!A){A=F.fixBlock(true,v);B=new d.elementPath(F.endContainer).block;}if(!B)B=F.fixBlock(false,v);}var D=A&&F.checkStartOfBlock(),E=B&&F.checkEndOfBlock();F.deleteContents();if(A&&A.equals(B))if(E){C=new d.elementPath(F.startContainer);F.moveToPosition(B,4);B=null;}else if(D){C=new d.elementPath(F.startContainer);F.moveToPosition(A,3);A=null;}else{B=F.splitElement(A);if(!c&&!A.is('ul','ol'))A.appendBogus();}return{previousBlock:A,nextBlock:B,wasStartOfBlock:D,wasEndOfBlock:E,elementPath:C};},splitElement:function(v){var y=this; +if(!y.collapsed)return null;y.setEndAt(v,2);var w=y.extractContents(),x=v.clone(false);w.appendTo(x);x.insertAfter(v);y.moveToPosition(v,4);return x;},checkBoundaryOfElement:function(v,w){var x=w==1,y=this.clone();y.collapse(x);y[x?'setStartAt':'setEndAt'](v,x?1:2);var z=new d.walker(y);z.evaluator=q(x);return z[x?'checkBackward':'checkForward']();},checkStartOfBlock:function(){var B=this;var v=B.startContainer,w=B.startOffset;if(c&&w&&v.type==3){var x=e.ltrim(v.substring(0,w));if(t.test(x))B.trim(0,1);}var y=new d.elementPath(B.startContainer),z=B.clone();z.collapse(true);z.setStartAt(y.block||y.blockLimit,1);var A=new d.walker(z);A.evaluator=o();return A.checkBackward();},checkEndOfBlock:function(){var B=this;var v=B.endContainer,w=B.endOffset;if(c&&v.type==3){var x=e.rtrim(v.substring(w));if(t.test(x))B.trim(1,0);}var y=new d.elementPath(B.endContainer),z=B.clone();z.collapse(false);z.setEndAt(y.block||y.blockLimit,2);var A=new d.walker(z);A.evaluator=o();return A.checkForward();},getPreviousNode:function(v,w,x){var y=this.clone();y.collapse(1);y.setStartAt(x||this.document.getBody(),1);var z=new d.walker(y);z.evaluator=v;z.guard=w;return z.previous();},getNextNode:function(v,w,x){var y=this.clone();y.collapse();y.setEndAt(x||this.document.getBody(),2);var z=new d.walker(y);z.evaluator=v;z.guard=w;return z.next();},checkReadOnly:(function(){function v(w,x){while(w){if(w.type==1)if(w.getAttribute('contentEditable')=='false'&&!w.data('cke-editable'))return 0;else if(w.is('html')||w.getAttribute('contentEditable')=='true'&&(w.contains(x)||w.equals(x)))break;w=w.getParent();}return 1;};return function(){var w=this.startContainer,x=this.endContainer;return!(v(w,x)&&v(x,w));};})(),moveToElementEditablePosition:function(v,w){function x(z,A){var B;if(z.type==1&&z.isEditable(false))B=z[w?'getLast':'getFirst'](u);if(!A&&!B)B=z[w?'getPrevious':'getNext'](u);return B;};if(v.type==1&&!v.isEditable(false)){this.moveToPosition(v,w?4:3);return true;}var y=0;while(v){if(v.type==3){if(w&&this.checkEndOfBlock()&&t.test(v.getText()))this.moveToPosition(v,3);else this.moveToPosition(v,w?4:3);y=1;break;}if(v.type==1)if(v.isEditable()){this.moveToPosition(v,w?2:1);y=1;}else if(w&&v.is('br')&&this.checkEndOfBlock())this.moveToPosition(v,3);v=x(v,y);}return!!y;},moveToElementEditStart:function(v){return this.moveToElementEditablePosition(v);},moveToElementEditEnd:function(v){return this.moveToElementEditablePosition(v,true);},getEnclosedNode:function(){var v=this.clone();v.optimize(); +if(v.startContainer.type!=1||v.endContainer.type!=1)return null;var w=new d.walker(v),x=d.walker.bookmark(true),y=d.walker.whitespaces(true),z=function(B){return y(B)&&x(B);};v.evaluator=z;var A=w.next();w.reset();return A&&A.equals(w.previous())?A:null;},getTouchedStartNode:function(){var v=this.startContainer;if(this.collapsed||v.type!=1)return v;return v.getChild(this.startOffset)||v;},getTouchedEndNode:function(){var v=this.endContainer;if(this.collapsed||v.type!=1)return v;return v.getChild(this.endOffset-1)||v;}};})();a.POSITION_AFTER_START=1;a.POSITION_BEFORE_END=2;a.POSITION_BEFORE_START=3;a.POSITION_AFTER_END=4;a.ENLARGE_ELEMENT=1;a.ENLARGE_BLOCK_CONTENTS=2;a.ENLARGE_LIST_ITEM_CONTENTS=3;a.START=1;a.END=2;a.STARTEND=3;a.SHRINK_ELEMENT=1;a.SHRINK_TEXT=2;(function(){d.rangeList=function(n){if(n instanceof d.rangeList)return n;if(!n)n=[];else if(n instanceof d.range)n=[n];return e.extend(n,l);};var l={createIterator:function(){var n=this,o=d.walker.bookmark(),p=function(s){return!(s.is&&s.is('tr'));},q=[],r;return{getNextRange:function(s){r=r==undefined?0:r+1;var t=n[r];if(t&&n.length>1){if(!r)for(var u=n.length-1;u>=0;u--)q.unshift(n[u].createBookmark(true));if(s){var v=0;while(n[r+v+1]){var w=t.document,x=0,y=w.getById(q[v].endNode),z=w.getById(q[v+1].startNode),A;while(1){A=y.getNextSourceNode(false);if(!z.equals(A)){if(o(A)||A.type==1&&A.isBlockBoundary()){y=A;continue;}}else x=1;break;}if(!x)break;v++;}}t.moveToBookmark(q.shift());while(v--){A=n[++r];A.moveToBookmark(q.shift());t.setEnd(A.endContainer,A.endOffset);}}return t;}};},createBookmarks:function(n){var s=this;var o=[],p;for(var q=0;q',a.document);l.appendTo(a.document.getHead());try{b.hc=l.getComputedStyle('border-top-color')==l.getComputedStyle('border-right-color');}catch(m){b.hc=false;}if(b.hc)b.cssClass+=' cke_hc';l.remove();})();j.load(i.corePlugins.split(','),function(){a.status='loaded';a.fire('loaded');var l=a._.pending;if(l){delete a._.pending;for(var m=0;m0){z=A.shift();while(!z.getParent().equals(D))z=z.getParent();if(!z.equals(H))E.push(z);H=z;}while(E.length>0){z=E.shift();if(z.getName()=='blockquote'){var I=new d.documentFragment(q.document);while(z.getFirst()){I.append(z.getFirst().remove());A.push(I.getLast());}I.replace(z);}else A.push(z);}var J=q.document.createElement('blockquote');J.insertBefore(A[0]);while(A.length>0){z=A.shift();J.append(z);}}else if(r==1){var K=[],L={};while(z=y.getNextParagraph()){var M=null,N=null;while(z.getParent()){if(z.getParent().getName()=='blockquote'){M=z.getParent();N=z;break;}z=z.getParent();}if(M&&N&&!N.getCustomData('blockquote_moveout')){K.push(N);h.setMarker(L,N,'blockquote_moveout',true);}}h.clearAllMarkers(L);var O=[],P=[];L={};while(K.length>0){var Q=K.shift();J=Q.getParent();if(!Q.getPrevious())Q.remove().insertBefore(J);else if(!Q.getNext())Q.remove().insertAfter(J);else{Q.breakParent(Q.getParent());P.push(Q.getNext());}if(!J.getCustomData('blockquote_processed')){P.push(J);h.setMarker(L,J,'blockquote_processed',true);}O.push(Q);}h.clearAllMarkers(L);for(F=P.length-1;F>=0;F--){J=P[F];if(o(J))J.remove();}if(q.config.enterMode==2){var R=true;while(O.length){Q=O.shift();if(Q.getName()=='div'){I=new d.documentFragment(q.document);var S=R&&Q.getPrevious()&&!(Q.getPrevious().type==1&&Q.getPrevious().isBlockBoundary());if(S)I.append(q.document.createElement('br'));var T=Q.getNext()&&!(Q.getNext().type==1&&Q.getNext().isBlockBoundary());while(Q.getFirst())Q.getFirst().remove().appendTo(I);if(T)I.append(q.document.createElement('br'));I.replace(Q);R=false;}}}}s.selectBookmarks(u);q.focus();}};j.add('blockquote',{init:function(q){q.addCommand('blockquote',p);q.ui.addButton('Blockquote',{label:q.lang.blockquote,command:'blockquote'});q.on('selectionChange',n);},requires:['domiterator']});})();j.add('button',{beforeInit:function(m){m.ui.addHandler('button',k.button.handler);}});a.UI_BUTTON='button';k.button=function(m){e.extend(this,m,{title:m.label,className:m.className||m.command&&'cke_button_'+m.command||'',click:m.click||(function(n){n.execCommand(m.command); +})});this._={};};k.button.handler={create:function(m){return new k.button(m);}};(function(){k.button.prototype={render:function(m,n){var o=b,p=this._.id=e.getNextId(),q='',r=this.command,s;this._.editor=m;var t={id:p,button:this,editor:m,focus:function(){var z=a.document.getById(p);z.focus();},execute:function(){if(c&&b.version<7)e.setTimeout(function(){this.button.click(m);},0,this);else this.button.click(m);}},u=e.addFunction(function(z){if(t.onkey){z=new d.event(z);return t.onkey(t,z.getKeystroke())!==false;}}),v=e.addFunction(function(z){var A;if(t.onfocus)A=t.onfocus(t,new d.event(z))!==false;if(b.gecko&&b.version<10900)z.preventBubble();return A;});t.clickFn=s=e.addFunction(t.execute,t);if(this.modes){var w={};function x(){var z=m.mode;if(z){var A=this.modes[z]?w[z]!=undefined?w[z]:2:0;this.setState(m.readOnly&&!this.readOnly?0:A);}};m.on('beforeModeUnload',function(){if(m.mode&&this._.state!=0)w[m.mode]=this._.state;},this);m.on('mode',x,this);!this.readOnly&&m.on('readOnly',x,this);}else if(r){r=m.getCommand(r);if(r){r.on('state',function(){this.setState(r.state);},this);q+='cke_'+(r.state==1?'on':r.state==0?'disabled':'off');}}if(!r)q+='cke_off';if(this.className)q+=' '+this.className;n.push('','=10900&&!o.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'",'')+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+p+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(o.opera||o.gecko&&o.mac)n.push(' onkeypress="return false;"');if(o.gecko)n.push(' onblur="this.style.cssText = this.style.cssText;"');n.push(' onkeydown="return CKEDITOR.tools.callFunction(',u,', event);" onfocus="return CKEDITOR.tools.callFunction(',v,', event);" '+(c?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',s,', this); return false;"> ',this.label,'');if(this.hasArrow)n.push(''+(b.hc?'▼':' ')+'');n.push('','');if(this.onRender)this.onRender();return t;},setState:function(m){if(this._.state==m)return false;this._.state=m;var n=a.document.getById(this._.id);if(n){n.setState(m); +m==0?n.setAttribute('aria-disabled',true):n.removeAttribute('aria-disabled');m==1?n.setAttribute('aria-pressed',true):n.removeAttribute('aria-pressed');return true;}else return false;}};})();k.prototype.addButton=function(m,n){this.add(m,'button',n);};(function(){var m=function(y,z){var A=y.document,B=A.getBody(),C=false,D=function(){C=true;};B.on(z,D);(b.version>7?A.$:A.$.selection.createRange()).execCommand(z);B.removeListener(z,D);return C;},n=c?function(y,z){return m(y,z);}:function(y,z){try{return y.document.$.execCommand(z,false,null);}catch(A){return false;}},o=function(y){var z=this;z.type=y;z.canUndo=z.type=='cut';z.startDisabled=true;};o.prototype={exec:function(y,z){this.type=='cut'&&t(y);var A=n(y,this.type);if(!A)alert(y.lang.clipboard[this.type+'Error']);return A;}};var p={canUndo:false,exec:c?function(y){y.focus();if(!y.document.getBody().fire('beforepaste')&&!m(y,'paste')){y.fire('pasteDialog');return false;}}:function(y){try{if(!y.document.getBody().fire('beforepaste')&&!y.document.$.execCommand('Paste',false,null))throw 0;}catch(z){setTimeout(function(){y.fire('pasteDialog');},0);return false;}}},q=function(y){if(this.mode!='wysiwyg')return;switch(y.data.keyCode){case 1114112+86:case 2228224+45:var z=this.document.getBody();if(b.opera||b.gecko)z.fire('paste');return;case 1114112+88:case 2228224+46:var A=this;this.fire('saveSnapshot');setTimeout(function(){A.fire('saveSnapshot');},0);}};function r(y){y.cancel();};function s(y,z,A){var B=this.document;if(B.getById('cke_pastebin'))return;if(z=='text'&&y.data&&y.data.$.clipboardData){var C=y.data.$.clipboardData.getData('text/plain');if(C){y.data.preventDefault();A(C);return;}}var D=this.getSelection(),E=new d.range(B),F=new h(z=='text'?'textarea':b.webkit?'body':'div',B);F.setAttribute('id','cke_pastebin');b.webkit&&F.append(B.createText('\xa0'));B.getBody().append(F);F.setStyles({position:'absolute',top:D.getStartElement().getDocumentPosition().y+'px',width:'1px',height:'1px',overflow:'hidden'});F.setStyle(this.config.contentsLangDirection=='ltr'?'left':'right','-1000px');var G=D.createBookmarks();this.on('selectionChange',r,null,null,0);if(z=='text')F.$.focus();else{E.setStartAt(F,1);E.setEndAt(F,2);E.select(true);}var H=this;window.setTimeout(function(){H.document.getBody().focus();H.removeListener('selectionChange',r);if(b.ie7Compat){D.selectBookmarks(G);F.remove();}else{F.remove();D.selectBookmarks(G);}var I;F=b.webkit&&(I=F.getFirst())&&I.is&&I.hasClass('Apple-style-span')?I:F;A(F['get'+(z=='text'?'Value':'Html')]()); +},0);};function t(y){if(!c||b.quirks)return;var z=y.getSelection(),A;if(z.getType()==3&&(A=z.getSelectedElement())){var B=z.getRanges()[0],C=y.document.createText('');C.insertBefore(A);B.setStartBefore(C);B.setEndAfter(A);z.selectRanges([B]);setTimeout(function(){if(A.getParent()){C.remove();z.selectElement(A);}},0);}};var u,v;function w(y,z){var A;if(v&&y in {Paste:1,Cut:1})return 0;if(y=='Paste'){c&&(u=1);try{A=z.document.$.queryCommandEnabled(y)||b.webkit;}catch(D){}u=0;}else{var B=z.getSelection(),C=B&&B.getRanges();A=B&&!(C.length==1&&C[0].collapsed);}return A?2:0;};function x(){var z=this;if(z.mode!='wysiwyg')return;var y=w('Paste',z);z.getCommand('cut').setState(w('Cut',z));z.getCommand('copy').setState(w('Copy',z));z.getCommand('paste').setState(y);z.fire('pasteState',y);};j.add('clipboard',{requires:['dialog','htmldataprocessor'],init:function(y){y.on('paste',function(A){var B=A.data;if(B.html)y.insertHtml(B.html);else if(B.text)y.insertText(B.text);setTimeout(function(){y.fire('afterPaste');},0);},null,null,1000);y.on('pasteDialog',function(A){setTimeout(function(){y.openDialog('paste');},0);});y.on('pasteState',function(A){y.getCommand('paste').setState(A.data);});function z(A,B,C,D){var E=y.lang[B];y.addCommand(B,C);y.ui.addButton(A,{label:E,command:B});if(y.addMenuItems)y.addMenuItem(B,{label:E,command:B,group:'clipboard',order:D});};z('Cut','cut',new o('cut'),1);z('Copy','copy',new o('copy'),4);z('Paste','paste',p,8);a.dialog.add('paste',a.getUrl(this.path+'dialogs/paste.js'));y.on('key',q,y);y.on('contentDom',function(){var A=y.document.getBody();A.on(!c?'paste':'beforepaste',function(B){if(u)return;var C=B.data&&B.data.$;if(c&&C&&!C.ctrlKey)return;var D={mode:'html'};y.fire('beforePaste',D);s.call(y,B,D.mode,function(E){if(!(E=e.trim(E.replace(/]+data-cke-bookmark[^<]*?<\/span>/ig,''))))return;var F={};F[D.mode]=E;y.fire('paste',F);});});if(c){A.on('contextmenu',function(){u=1;setTimeout(function(){u=0;},0);});A.on('paste',function(B){if(!y.document.getById('cke_pastebin')){B.data.preventDefault();u=0;p.exec(y);}});}A.on('beforecut',function(){!u&&t(y);});A.on('mouseup',function(){setTimeout(function(){x.call(y);},0);},y);A.on('keyup',x,y);});y.on('selectionChange',function(A){v=A.data.selection.getRanges()[0].checkReadOnly();x.call(y);});if(y.contextMenu)y.contextMenu.addListener(function(A,B){var C=B.getRanges()[0].checkReadOnly();return{cut:w('Cut',y),copy:w('Copy',y),paste:w('Paste',y)};});}});})();j.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(m){var n=m.config,o=m.lang.colorButton,p; +if(!b.hc){q('TextColor','fore',o.textColorTitle);q('BGColor','back',o.bgColorTitle);}function q(t,u,v){var w=e.getNextId()+'_colorBox';m.ui.add(t,'panelbutton',{label:v,title:v,className:'cke_button_'+t.toLowerCase(),modes:{wysiwyg:1},panel:{css:m.skin.editor.css,attributes:{role:'listbox','aria-label':o.panelTitle}},onBlock:function(x,y){y.autoSize=true;y.element.addClass('cke_colorblock');y.element.setHtml(r(x,u,w));y.element.getDocument().getBody().setStyle('overflow','hidden');k.fire('ready',this);var z=y.keys,A=m.lang.dir=='rtl';z[A?37:39]='next';z[40]='next';z[9]='next';z[A?39:37]='prev';z[38]='prev';z[2228224+9]='prev';z[32]='click';},onOpen:function(){var x=m.getSelection(),y=x&&x.getStartElement(),z=new d.elementPath(y),A;y=z.block||z.blockLimit||m.document.getBody();do A=y&&y.getComputedStyle(u=='back'?'background-color':'color')||'transparent';while(u=='back'&&A=='transparent'&&y&&(y=y.getParent()));if(!A||A=='transparent')A='#ffffff';this._.panel._.iframe.getFrameDocument().getById(w).setStyle('background-color',A);}});};function r(t,u,v){var w=[],x=n.colorButton_colors.split(','),y=e.addFunction(function(E,F){if(E=='?'){var G=arguments.callee;function H(J){this.removeListener('ok',H);this.removeListener('cancel',H);J.name=='ok'&&G(this.getContentElement('picker','selectedColor').getValue(),F);};m.openDialog('colordialog',function(){this.on('ok',H);this.on('cancel',H);});return;}m.focus();t.hide(false);m.fire('saveSnapshot');new a.style(n['colorButton_'+F+'Style'],{color:'inherit'}).remove(m.document);if(E){var I=n['colorButton_'+F+'Style'];I.childRule=F=='back'?function(J){return s(J);}:function(J){return!(J.is('a')||J.getElementsByTag('a').count())||s(J);};new a.style(I,{color:E}).apply(m.document);}m.fire('saveSnapshot');});w.push('
',o.auto,'
');for(var z=0;z');var A=x[z].split('/'),B=A[0],C=A[1]||B;if(!A[1])B='#'+B.replace(/^(.)(.)(.)$/,'$1$1$2$2$3$3');var D=m.lang.colors[C]||C;w.push(''); +}if(n.colorButton_enableMore===undefined||n.colorButton_enableMore)w.push('');w.push('
',o.more,'
');return w.join('');};function s(t){return t.getAttribute('contentEditable')=='false'||t.getAttribute('data-nostyle');};}});i.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';i.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};i.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};j.colordialog={requires:['dialog'],init:function(m){m.addCommand('colordialog',new a.dialogCommand('colordialog'));a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);j.add('contextmenu',{requires:['menu'],onLoad:function(){j.contextMenu=e.createClass({base:a.menu,$:function(m){this.base.call(this,m,{panel:{className:m.skinClass+' cke_contextmenu',attributes:{'aria-label':m.lang.contextmenu.options}}});},proto:{addTarget:function(m,n){if(b.opera&&!('oncontextmenu' in document.body)){var o;m.on('mousedown',function(s){s=s.data;if(s.$.button!=2){if(s.getKeystroke()==1114112+1)m.fire('contextmenu',s);return;}if(n&&(b.mac?s.$.metaKey:s.$.ctrlKey))return;var t=s.getTarget();if(!o){var u=t.getDocument();o=u.createElement('input');o.$.type='button';u.getBody().append(o);}o.setAttribute('style','position:absolute;top:'+(s.$.clientY-2)+'px;left:'+(s.$.clientX-2)+'px;width:5px;height:5px;opacity:0.01');});m.on('mouseup',function(s){if(o){o.remove();o=undefined;m.fire('contextmenu',s.data);}});}m.on('contextmenu',function(s){var t=s.data;if(n&&(b.webkit?p:b.mac?t.$.metaKey:t.$.ctrlKey))return;t.preventDefault();var u=t.getTarget().getDocument().getDocumentElement(),v=t.$.clientX,w=t.$.clientY;e.setTimeout(function(){this.open(u,null,v,w);},c?200:0,this);},this);if(b.opera)m.on('keypress',function(s){var t=s.data;if(t.$.keyCode===0)t.preventDefault();});if(b.webkit){var p,q=function(s){p=b.mac?s.data.$.metaKey:s.data.$.ctrlKey;},r=function(){p=0;};m.on('keydown',q);m.on('keyup',r); +m.on('contextmenu',r);}},open:function(m,n,o,p){this.editor.focus();m=m||a.document.getDocumentElement();this.show(m,n,o,p);}}});},beforeInit:function(m){m.contextMenu=new j.contextMenu(m);m.addCommand('contextMenu',{exec:function(){m.contextMenu.open(m.document.getBody());}});}});(function(){function m(o){var p=this.att,q=o&&o.hasAttribute(p)&&o.getAttribute(p)||'';if(q!==undefined)this.setValue(q);};function n(){var o;for(var p=0;p ';j.add('elementspath',{requires:['selection'],init:function(o){var p='cke_path_'+o.name,q,r=function(){if(!q)q=a.document.getById(p);return q;},s='cke_elementspath_'+e.getNextNumber()+'_';o._.elementsPath={idBase:s,filters:[]};o.on('themeSpace',function(x){if(x.data.space=='bottom')x.data.html+=''+o.lang.elementsPath.eleLabel+''+'

'+n+'
';});function t(x){o.focus();var y=o._.elementsPath.list[x];if(y.is('body')){var z=new d.range(o.document);z.selectNodeContents(y);z.select();}else o.getSelection().selectElement(y);};var u=e.addFunction(t),v=e.addFunction(function(x,y){var z=o._.elementsPath.idBase,A;y=new d.event(y);var B=o.lang.dir=='rtl';switch(y.getKeystroke()){case B?39:37:case 9:A=a.document.getById(z+(x+1));if(!A)A=a.document.getById(z+'0');A.focus();return false;case B?37:39:case 2228224+9:A=a.document.getById(z+(x-1));if(!A)A=a.document.getById(z+(o._.elementsPath.list.length-1));A.focus();return false;case 27:o.focus();return false;case 13:case 32:t(x);return false;}return true;});o.on('selectionChange',function(x){var y=b,z=x.data.selection,A=z.getStartElement(),B=[],C=x.editor,D=C._.elementsPath.list=[],E=C._.elementsPath.filters;while(A){var F=0,G;if(A.data('cke-display-name'))G=A.data('cke-display-name');else if(A.data('cke-real-element-type'))G=A.data('cke-real-element-type');else G=A.getName();for(var H=0;H',G,''+L+'','');}if(G=='body')break;A=A.getParent();}var M=r();M.setHtml(B.join('')+n);C.fire('elementsPathUpdate',{space:M});});function w(){q&&q.setHtml(n);delete o._.elementsPath.list;};o.on('readOnly',w);o.on('contentDomUnload',w);o.addCommand('elementsPathFocus',m.toolbarFocus);}});})();(function(){j.add('enterkey',{requires:['keystrokes','indent'],init:function(t){t.addCommand('enter',{modes:{wysiwyg:1},editorFocus:false,exec:function(v){r(v);}});t.addCommand('shiftEnter',{modes:{wysiwyg:1},editorFocus:false,exec:function(v){q(v);}});var u=t.keystrokeHandler.keystrokes;u[13]='enter';u[2228224+13]='shiftEnter';}});j.enterkey={enterBlock:function(t,u,v,w){v=v||s(t);if(!v)return;var x=v.document,y=v.checkStartOfBlock(),z=v.checkEndOfBlock(),A=new d.elementPath(v.startContainer),B=A.block;if(y&&z){if(B&&(B.is('li')||B.getParent().is('li'))){t.execCommand('outdent');return;}if(B&&B.getParent().is('blockquote')){B.breakParent(B.getParent());if(!B.getPrevious().getFirst(d.walker.invisible(1)))B.getPrevious().remove();if(!B.getNext().getFirst(d.walker.invisible(1)))B.getNext().remove();v.moveToElementEditStart(B);v.select();return;}}else if(B&&B.is('pre')){if(!z){n(t,u,v,w);return;}}else if(B&&f.$captionBlock[B.getName()]){n(t,u,v,w);return;}var C=u==3?'div':'p',D=v.splitBlock(C);if(!D)return;var E=D.previousBlock,F=D.nextBlock,G=D.wasStartOfBlock,H=D.wasEndOfBlock,I;if(F){I=F.getParent();if(I.is('li')){F.breakParent(I);F.move(F.getNext(),1);}}else if(E&&(I=E.getParent())&&I.is('li')){E.breakParent(I);I=E.getNext();v.moveToElementEditStart(I);E.move(E.getPrevious());}if(!G&&!H){if(F.is('li')&&(I=F.getFirst(d.walker.invisible(true)))&&I.is&&I.is('ul','ol'))(c?x.createText('\xa0'):x.createElement('br')).insertBefore(I);if(F)v.moveToElementEditStart(F);}else{var J,K;if(E){if(E.is('li')||!(p.test(E.getName())||E.is('pre')))J=E.clone();}else if(F)J=F.clone();if(!J){if(I&&I.is('li'))J=I; +else{J=x.createElement(C);if(E&&(K=E.getDirection()))J.setAttribute('dir',K);}}else if(w&&!J.is('li'))J.renameNode(C);var L=D.elementPath;if(L)for(var M=0,N=L.elements.length;M0;v--)u[v].deleteContents();return u[0];};})();(function(){var m='nbsp,gt,lt,amp',n='quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro',o='Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml',p='Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv'; +function q(r,s){var t={},u=[],v={nbsp:'\xa0',shy:'­',gt:'>',lt:'<',amp:'&',apos:"'",quot:'"'};r=r.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(A,B){var C=s?'&'+B+';':v[B],D=s?v[B]:'&'+B+';';t[C]=D;u.push(C);return '';});if(!s&&r){r=r.split(',');var w=document.createElement('div'),x;w.innerHTML='&'+r.join(';&')+';';x=w.innerHTML;w=null;for(var y=0;y0;case 'checked':return!!q.$.checked;case 'value':var p=q.getAttribute('type');return p=='checkbox'||p=='radio'?q.$.value!='on':q.$.value;}return m.apply(q,arguments);};});(function(){var m={canUndo:false,exec:function(o){var p=o.document.createElement('hr');o.insertElement(p);}},n='horizontalrule';j.add(n,{init:function(o){o.addCommand(n,m);o.ui.addButton('HorizontalRule',{label:o.lang.horizontalrule,command:n});}});})();(function(){var m=/^[\t\r\n ]*(?: |\xa0)$/,n='{cke_protected}';function o(U){var V=U.children.length,W=U.children[V-1];while(W&&W.type==3&&!e.trim(W.value))W=U.children[--V];return W;};function p(U){var V=U.parent;return V?e.indexOf(V.children,U):-1;};function q(U,V){var W=U.children,X=o(U);if(X){if((V||!c)&&X.type==1&&X.name=='br')W.pop();if(X.type==3&&m.test(X.value))W.pop();}};function r(U,V,W){if(!V&&(!W||typeof W=='function'&&W(U)===false))return false;if(V&&c&&(document.documentMode>7||U.name in f.tr||U.name in f.$listItem))return false;var X=o(U);return!X||X&&(X.type==1&&X.name=='br'||U.name=='form'&&X.name=='input');};function s(U,V){return function(W){q(W,!U);if(r(W,!U,V))if(U||c)W.add(new a.htmlParser.text('\xa0'));else W.add(new a.htmlParser.element('br',{}));};};var t=f,u=['caption','colgroup','col','thead','tfoot','tbody'],v=e.extend({},t.$block,t.$listItem,t.$tableContent);for(var w in v){if(!('br' in t[w]))delete v[w];}delete v.pre;var x={elements:{},attributeNames:[[/^on/,'data-cke-pa-on']]},y={elements:{}};for(w in v)y.elements[w]=s();var z={elementNames:[[/^cke:/,''],[/^\?xml:namespace$/,'']],attributeNames:[[/^data-cke-(saved|pa)-/,''],[/^data-cke-.*/,''],['hidefocus','']],elements:{$:function(U){var V=U.attributes; +if(V){if(V['data-cke-temp'])return false;var W=['name','href','src'],X;for(var Y=0;Y-1&&Z>-1&&Y!=Z)){Y=p(W);Z=p(X);}return Y>Z?1:-1;});},embed:function(U){var V=U.parent;if(V&&V.name=='object'){var W=V.attributes.width,X=V.attributes.height;W&&(U.attributes.width=W);X&&(U.attributes.height=X);}},param:function(U){U.children=[];U.isEmpty=true;return U;},a:function(U){if(!(U.children.length||U.attributes.name||U.attributes['data-cke-saved-name']))return false;},span:function(U){if(U.attributes['class']=='Apple-style-span')delete U.name;},pre:function(U){c&&q(U);},html:function(U){delete U.attributes.contenteditable;delete U.attributes['class'];},body:function(U){delete U.attributes.spellcheck;delete U.attributes.contenteditable;},style:function(U){var V=U.children[0];V&&V.value&&(V.value=e.trim(V.value));if(!U.attributes.type)U.attributes.type='text/css';},title:function(U){var V=U.children[0];V&&(V.value=U.attributes['data-cke-title']||'');}},attributes:{'class':function(U,V){return e.ltrim(U.replace(/(?:^|\s+)cke_[^\s]*/g,''))||false;}}};if(c)z.attributes.style=function(U,V){return U.replace(/(^|;)([^\:]+)/g,function(W){return W.toLowerCase();});};function A(U){var V=U.attributes;if(V.contenteditable!='false')V['data-cke-editable']=V.contenteditable?'true':1;V.contenteditable='false';};function B(U){var V=U.attributes;switch(V['data-cke-editable']){case 'true':V.contenteditable='true';break;case '1':delete V.contenteditable;break;}};for(w in {input:1,textarea:1}){x.elements[w]=A;z.elements[w]=B;}var C=/<(a|area|img|input|source)\b([^>]*)>/gi,D=/\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,E=/(?:])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,F=/([^<]*)<\/cke:encoded>/gi,G=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,H=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,I=/]*?)\/?>(?!\s*<\/cke:\1)/gi;function J(U){return U.replace(C,function(V,W,X){return '<'+W+X.replace(D,function(Y,Z){if(!/^on/.test(Z)&&X.indexOf('data-cke-saved-'+Z)==-1)return ' data-cke-saved-'+Y+' data-cke-'+a.rnd+'-'+Y;return Y;})+'>';});};function K(U){return U.replace(E,function(V){return ''+encodeURIComponent(V)+'';});};function L(U){return U.replace(F,function(V,W){return decodeURIComponent(W); +});};function M(U){return U.replace(G,'$1cke:$2');};function N(U){return U.replace(H,'$1$2');};function O(U){return U.replace(I,'');};function P(U){return U.replace(/(]*>)(\r\n|\n)/g,'$1$2$2');};function Q(U){return U.replace(//g,function(V){return '';});};function R(U){return U.replace(//g,function(V,W){return decodeURIComponent(W);});};function S(U,V){var W=V._.dataStore;return U.replace(//g,function(X,Y){return decodeURIComponent(Y);}).replace(/\{cke_protected_(\d+)\}/g,function(X,Y){return W&&W[Y]||'';});};function T(U,V){var W=[],X=V.config.protectedSource,Y=V._.dataStore||(V._.dataStore={id:1}),Z=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,aa=[//gi,//gi].concat(X);U=U.replace(//g,function(ac){return '';});for(var ab=0;ab';});U=U.replace(Z,function(ac,ad,ae){return '';});return U.replace(/(['"]).*?\1/g,function(ac){return ac.replace(//g,function(ad,ae){Y[Y.id]=decodeURIComponent(ae);return '{cke_protected_'+Y.id++ +'}';});});};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(U){var V=U.dataProcessor=new a.htmlDataProcessor(U);V.writer.forceSimpleAmpersand=U.config.forceSimpleAmpersand;V.dataFilter.addRules(x);V.dataFilter.addRules(y);V.htmlFilter.addRules(z);var W={elements:{}};for(w in v)W.elements[w]=s(true,U.config.fillEmptyBlocks);V.htmlFilter.addRules(W);},onLoad:function(){!('fillEmptyBlocks' in i)&&(i.fillEmptyBlocks=1);}});a.htmlDataProcessor=function(U){var V=this;V.editor=U;V.writer=new a.htmlWriter();V.dataFilter=new a.htmlParser.filter();V.htmlFilter=new a.htmlParser.filter();};a.htmlDataProcessor.prototype={toHtml:function(U,V){U=T(U,this.editor);U=J(U);U=K(U);U=M(U);U=O(U);U=P(U);var W=new h('div');W.setHtml('a'+U);U=W.getHtml().substr(1);U=U.replace(new RegExp(' data-cke-'+a.rnd+'-','ig'),' ');U=N(U);U=L(U);U=R(U);var X=a.htmlParser.fragment.fromHtml(U,V),Y=new a.htmlParser.basicWriter();X.writeHtml(Y,this.dataFilter);U=Y.getHtml(true);U=Q(U); +return U;},toDataFormat:function(U,V){var W=this.writer,X=a.htmlParser.fragment.fromHtml(U,V);W.reset();X.writeHtml(W,this.htmlFilter);var Y=W.getHtml(true);Y=R(Y);Y=S(Y,this.editor);return Y;}};})();(function(){j.add('iframe',{requires:['dialog','fakeobjects'],init:function(m){var n='iframe',o=m.lang.iframe;a.dialog.add(n,this.path+'dialogs/iframe.js');m.addCommand(n,new a.dialogCommand(n));m.addCss('img.cke_iframe{background-image: url('+a.getUrl(this.path+'images/placeholder.png')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 80px;'+'height: 80px;'+'}');m.ui.addButton('Iframe',{label:o.toolbar,command:n});m.on('doubleclick',function(p){var q=p.data.element;if(q.is('img')&&q.data('cke-real-element-type')=='iframe')p.data.dialog='iframe';});if(m.addMenuItems)m.addMenuItems({iframe:{label:o.title,command:'iframe',group:'image'}});if(m.contextMenu)m.contextMenu.addListener(function(p,q){if(p&&p.is('img')&&p.data('cke-real-element-type')=='iframe')return{iframe:2};});},afterInit:function(m){var n=m.dataProcessor,o=n&&n.dataFilter;if(o)o.addRules({elements:{iframe:function(p){return m.createFakeParserElement(p,'cke_iframe','iframe',true);}}});}});})();(function(){j.add('image',{requires:['dialog'],init:function(o){var p='image';a.dialog.add(p,this.path+'dialogs/image.js');o.addCommand(p,new a.dialogCommand(p));o.ui.addButton('Image',{label:o.lang.common.image,command:p});o.on('doubleclick',function(q){var r=q.data.element;if(r.is('img')&&!r.data('cke-realelement')&&!r.isReadOnly())q.data.dialog='image';});if(o.addMenuItems)o.addMenuItems({image:{label:o.lang.image.menu,command:'image',group:'image'}});if(o.contextMenu)o.contextMenu.addListener(function(q,r){if(m(o,q))return{image:2};});},afterInit:function(o){p('left');p('right');p('center');p('block');function p(q){var r=o.getCommand('justify'+q);if(r){if(q=='left'||q=='right')r.on('exec',function(s){var t=m(o),u;if(t){u=n(t);if(u==q){t.removeStyle('float');if(q==n(t))t.removeAttribute('align');}else t.setStyle('float',q);s.cancel();}});r.on('refresh',function(s){var t=m(o),u;if(t){u=n(t);this.setState(u==q?1:q=='right'||q=='left'?2:0);s.cancel();}});}};}});function m(o,p){if(!p){var q=o.getSelection();p=q.getType()==3&&q.getSelectedElement();}if(p&&p.is('img')&&!p.data('cke-realelement')&&!p.isReadOnly())return p;};function n(o){var p=o.getStyle('float');if(p=='inherit'||p=='none')p=0;if(!p)p=o.getAttribute('align');return p;};})();i.image_removeLinkByEmptyURL=true; +(function(){var m={ol:1,ul:1},n=d.walker.whitespaces(true),o=d.walker.bookmark(false,true);function p(t){var B=this;if(t.editor.readOnly)return null;var u=t.editor,v=t.data.path,w=v&&v.contains(m),x=v.block||v.blockLimit;if(w)return B.setState(2);if(!B.useIndentClasses&&B.name=='indent')return B.setState(2);if(!x)return B.setState(0);if(B.useIndentClasses){var y=x.$.className.match(B.classNameRegex),z=0;if(y){y=y[1];z=B.indentClassMap[y];}if(B.name=='outdent'&&!z||B.name=='indent'&&z==u.config.indentClasses.length)return B.setState(0);return B.setState(2);}else{var A=parseInt(x.getStyle(r(x)),10);if(isNaN(A))A=0;if(A<=0)return B.setState(0);return B.setState(2);}};function q(t,u){var w=this;w.name=u;w.useIndentClasses=t.config.indentClasses&&t.config.indentClasses.length>0;if(w.useIndentClasses){w.classNameRegex=new RegExp('(?:^|\\s+)('+t.config.indentClasses.join('|')+')(?=$|\\s)');w.indentClassMap={};for(var v=0;v0){var Z=X[T].parent;X[T].parent=new h(Z.getName(),Z.getDocument());}}for(T=W.getCustomData('listarray_index')+1;TY;T++)X[T].indent+=U;var aa=j.list.arrayToList(X,v,null,t.config.enterMode,M.getDirection());if(u.name=='outdent'){var ab;if((ab=M.getParent())&&ab.is('li')){var ac=aa.listNode.getChildren(),ad=[],ae=ac.count(),af;for(T=ae-1;T>=0;T--){if((af=ac.getItem(T))&&af.is&&af.is('li'))ad.push(af);}}}if(aa)aa.listNode.replace(M);if(ad&&ad.length)for(T=0;T0)M.addClass(t.config.indentClasses[P-1]);}else{var Q=r(M,N),R=parseInt(M.getStyle(Q),10);if(isNaN(R))R=0;var S=t.config.indentOffset||40;R+=(u.name=='indent'?1:-1)*S;if(R<0)return false;R=Math.max(R,0);R=Math.ceil(R/S)*S;M.setStyle(Q,R?R+(t.config.indentUnit||'px'):'');if(M.getAttribute('style')==='')M.removeAttribute('style');}h.setMarker(v,M,'indent_processed',1);return true;};var z=t.getSelection(),A=z.createBookmarks(1),B=z&&z.getRanges(1),C,D=B.createIterator();while(C=D.getNextRange()){var E=C.getCommonAncestor(),F=E;while(F&&!(F.type==1&&m[F.getName()]))F=F.getParent();if(!F){var G=C.getEnclosedNode();if(G&&G.type==1&&G.getName() in m){C.setStartAt(G,1);C.setEndAt(G,2);F=G;}}if(F&&C.startContainer.type==1&&C.startContainer.getName() in m){var H=new d.walker(C);H.evaluator=s;C.startContainer=H.next();}if(F&&C.endContainer.type==1&&C.endContainer.getName() in m){H=new d.walker(C);H.evaluator=s;C.endContainer=H.previous();}if(F){var I=F.getFirst(s),J=!!I.getNext(s),K=C.startContainer,L=I.equals(K)||I.contains(K);if(!(L&&(u.name=='indent'||u.useIndentClasses||parseInt(F.getStyle(r(F)),10))&&y(F,!J&&I.getDirection())))w(F);}else x();}h.clearAllMarkers(v);t.forceNextSelectionCheck();z.selectBookmarks(A);}};j.add('indent',{init:function(t){var u=t.addCommand('indent',new q(t,'indent')),v=t.addCommand('outdent',new q(t,'outdent'));t.ui.addButton('Indent',{label:t.lang.indent,command:'indent'});t.ui.addButton('Outdent',{label:t.lang.outdent,command:'outdent'});t.on('selectionChange',e.bind(p,u));t.on('selectionChange',e.bind(p,v));if(b.ie6Compat||b.ie7Compat)t.addCss('ul,ol{\tmargin-left: 0px;\tpadding-left: 40px;}');t.on('dirChanged',function(w){var x=new d.range(t.document);x.setStartBefore(w.data.node);x.setEndAfter(w.data.node);var y=new d.walker(x),z;while(z=y.next()){if(z.type==1){if(!z.equals(w.data.node)&&z.getDirection()){x.setStartAfter(z);y=new d.walker(x);continue;}var A=t.config.indentClasses;if(A){var B=w.data.dir=='ltr'?['_rtl','']:['','_rtl']; +for(var C=0;C=0;z--){w=u[z].createIterator();w.enlargeBr=s!=2;while(x=w.getNextParagraph(s==1?'p':'div')){x.removeAttribute('align');x.removeStyle('text-align');var A=v&&(x.$.className=e.ltrim(x.$.className.replace(C.cssClassRegex,''))),B=C.state==2&&(!y||m(x,true)!=C.value);if(v){if(B)x.addClass(v);else if(!A)x.removeAttribute('class');}else if(B)x.setStyle('text-align',C.value);}}q.focus();q.forceNextSelectionCheck();r.selectBookmarks(t);},refresh:function(q){var r=q.block||q.blockLimit;this.setState(r.getName()!='body'&&m(r,this.editor.config.useComputedState)==this.value?1:2); +}};j.add('justify',{init:function(q){var r=new o(q,'justifyleft','left'),s=new o(q,'justifycenter','center'),t=new o(q,'justifyright','right'),u=new o(q,'justifyblock','justify');q.addCommand('justifyleft',r);q.addCommand('justifycenter',s);q.addCommand('justifyright',t);q.addCommand('justifyblock',u);q.ui.addButton('JustifyLeft',{label:q.lang.justify.left,command:'justifyleft'});q.ui.addButton('JustifyCenter',{label:q.lang.justify.center,command:'justifycenter'});q.ui.addButton('JustifyRight',{label:q.lang.justify.right,command:'justifyright'});q.ui.addButton('JustifyBlock',{label:q.lang.justify.block,command:'justifyblock'});q.on('selectionChange',e.bind(n,r));q.on('selectionChange',e.bind(n,t));q.on('selectionChange',e.bind(n,s));q.on('selectionChange',e.bind(n,u));q.on('dirChanged',p);},requires:['domiterator']});})();j.add('keystrokes',{beforeInit:function(m){m.keystrokeHandler=new a.keystrokeHandler(m);m.specialKeys={};},init:function(m){var n=m.config.keystrokes,o=m.config.blockedKeystrokes,p=m.keystrokeHandler.keystrokes,q=m.keystrokeHandler.blockedKeystrokes;for(var r=0;r7))Y.append(T.createText('\xa0'));Y.append(af.listNode);W=af.nextIndex;}else if(ac.indent==-1&&!P&&ad){if(m[ad.getName()]){Y=ac.element.clone(false,true);if(Z!=ad.getDirection(1))Y.setAttribute('dir',Z);}else Y=new d.documentFragment(T);var ag=ad.getDirection(1)!=Z,ah=ac.element,ai=ah.getAttribute('class'),aj=ah.getAttribute('style'),ak=Y.type==11&&(Q!=2||ag||aj||ai),al,am=ac.contents.length;for(S=0;SQ[S-1].indent+1){var W=Q[S-1].indent+1-Q[S].indent,X=Q[S].indent;while(Q[S]&&Q[S].indent>=X){Q[S].indent+=W;S++;}S--;}}var Y=j.list.arrayToList(Q,P,null,N.config.enterMode,O.root.getAttribute('dir')),Z=Y.listNode,aa,ab;function ac(ad){if((aa=Z[ad?'getFirst':'getLast']())&&!(aa.is&&aa.isBlockBoundary())&&(ab=O.root[ad?'getPrevious':'getNext'](d.walker.whitespaces(true)))&&!(ab.is&&ab.isBlockBoundary({br:1})))N.document.createElement('br')[ad?'insertBefore':'insertAfter'](aa); +};ac(true);ac();Z.replace(O.root);};function z(N,O){this.name=N;this.type=O;};var A=d.walker.nodeType(1);function B(N,O,P,Q){var R,S;while(R=N[Q?'getLast':'getFirst'](A)){if((S=R.getDirection(1))!==O.getDirection(1))R.setAttribute('dir',S);R.remove();P?R[Q?'insertBefore':'insertAfter'](P):O.append(R,Q);}};z.prototype={exec:function(N){var aq=this;var O=N.document,P=N.config,Q=N.getSelection(),R=Q&&Q.getRanges(true);if(!R||R.length<1)return;if(aq.state==2){var S=O.getBody();if(!S.getFirst(q)){P.enterMode==2?S.appendBogus():R[0].fixBlock(1,P.enterMode==1?'p':'div');Q.selectRanges(R);}else{var T=R.length==1&&R[0],U=T&&T.getEnclosedNode();if(U&&U.is&&aq.type==U.getName())aq.setState(1);}}var V=Q.createBookmarks(true),W=[],X={},Y=R.createIterator(),Z=0;while((T=Y.getNextRange())&&++Z){var aa=T.getBoundaryNodes(),ab=aa.startNode,ac=aa.endNode;if(ab.type==1&&ab.getName()=='td')T.setStartAt(aa.startNode,1);if(ac.type==1&&ac.getName()=='td')T.setEndAt(aa.endNode,2);var ad=T.createIterator(),ae;ad.forceBrBreak=aq.state==2;while(ae=ad.getNextParagraph()){if(ae.getCustomData('list_block'))continue;else h.setMarker(X,ae,'list_block',1);var af=new d.elementPath(ae),ag=af.elements,ah=ag.length,ai=null,aj=0,ak=af.blockLimit,al;for(var am=ah-1;am>=0&&(al=ag[am]);am--){if(m[al.getName()]&&ak.contains(al)){ak.removeCustomData('list_group_object_'+Z);var an=al.getCustomData('list_group_object');if(an)an.contents.push(ae);else{an={root:al,contents:[ae]};W.push(an);h.setMarker(X,al,'list_group_object',an);}aj=1;break;}}if(aj)continue;var ao=ak;if(ao.getCustomData('list_group_object_'+Z))ao.getCustomData('list_group_object_'+Z).contents.push(ae);else{an={root:ao,contents:[ae]};h.setMarker(X,ao,'list_group_object_'+Z,an);W.push(an);}}}var ap=[];while(W.length>0){an=W.shift();if(aq.state==2){if(m[an.root.getName()])v.call(aq,N,an,X,ap);else x.call(aq,N,an,ap);}else if(aq.state==1&&m[an.root.getName()])y.call(aq,N,an,X);}for(am=0;am0)for(var u=t.length-1;u>=0;u--){var v=t[u][0],w=t[u][1];if(w)v.insertBefore(w);else v.appendTo(s);}};function o(s,t){var u=m(s),v={},w=s.$;if(!t){v['class']=w.className||'';w.className='';}v.inline=w.style.cssText||'';if(!t)w.style.cssText='position: static; overflow: visible';n(u);return v;};function p(s,t){var u=m(s),v=s.$;if('class' in t)v.className=t['class'];if('inline' in t)v.style.cssText=t.inline;n(u);};function q(s){var t=a.instances;for(var u in t){var v=t[u];if(v.mode=='wysiwyg'&&!v.readOnly){var w=v.document.getBody();w.setAttribute('contentEditable',false);w.setAttribute('contentEditable',true);}}if(s.focusManager.hasFocus){s.toolbox.focus();s.focus();}};function r(s){if(!c||b.version>6)return null;var t=h.createFromHtml('');return s.append(t,true);};j.add('maximize',{init:function(s){var t=s.lang,u=a.document,v=u.getWindow(),w,x,y,z;function A(){var C=v.getViewPaneSize();z&&z.setStyles({width:C.width+'px',height:C.height+'px'});s.resize(C.width,C.height,null,true);};var B=2;s.addCommand('maximize',{modes:{wysiwyg:!b.iOS,source:!b.iOS},readOnly:1,editorFocus:false,exec:function(){var C=s.container.getChild(1),D=s.getThemeSpace('contents');if(s.mode=='wysiwyg'){var E=s.getSelection();w=E&&E.getRanges();x=v.getScrollPosition();}else{var F=s.textarea.$;w=!c&&[F.selectionStart,F.selectionEnd];x=[F.scrollLeft,F.scrollTop];}if(this.state==2){v.on('resize',A);y=v.getScrollPosition();var G=s.container;while(G=G.getParent()){G.setCustomData('maximize_saved_styles',o(G));G.setStyle('z-index',s.config.baseFloatZIndex-1);}D.setCustomData('maximize_saved_styles',o(D,true));C.setCustomData('maximize_saved_styles',o(C,true));var H={overflow:b.webkit?'':'hidden',width:0,height:0};u.getDocumentElement().setStyles(H);!b.gecko&&u.getDocumentElement().setStyle('position','fixed');!(b.gecko&&b.quirks)&&u.getBody().setStyles(H);c?setTimeout(function(){v.$.scrollTo(0,0);},0):v.$.scrollTo(0,0);C.setStyle('position',b.gecko&&b.quirks?'fixed':'absolute');C.$.offsetLeft;C.setStyles({'z-index':s.config.baseFloatZIndex-1,left:'0px',top:'0px'});z=r(C);C.addClass('cke_maximized');A();var I=C.getDocumentPosition();C.setStyles({left:-1*I.x+'px',top:-1*I.y+'px'}); +b.gecko&&q(s);}else if(this.state==1){v.removeListener('resize',A);var J=[D,C];for(var K=0;K ');s.children.length=0;s.add(u);var v=s.attributes;delete v['aria-label'];delete v.contenteditable;delete v.title;}return t;}}},5);if(p)p.addRules({elements:{div:function(r){var s=r.attributes,t=s&&s.style,u=t&&r.children.length==1&&r.children[0],v=u&&u.name=='span'&&u.attributes.style;if(v&&/page-break-after\s*:\s*always/i.test(t)&&/display\s*:\s*none/i.test(v)){s.contenteditable='false';s['class']='cke_pagebreak';s['data-cke-display-name']='pagebreak';s['aria-label']=n;s.title=n;r.children.length=0;}}}});},requires:['fakeobjects']});j.pagebreakCmd={exec:function(m){var n=m.lang.pagebreakAlt,o=h.createFromHtml('
'+'
',m.document),p=m.getSelection().getRanges(true);m.fire('saveSnapshot');for(var q,r=p.length-1;r>=0;r--){q=p[r];if(r1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.width*parseInt(n,10)/100,10);if(typeof o=='string'&&o.length>1&&o.substr(o.length-1,1)=='%')o=parseInt(window.screen.height*parseInt(o,10)/100,10);if(n<640)n=640;if(o<420)o=420;var q=parseInt((window.screen.height-o)/2,10),r=parseInt((window.screen.width-n)/2,10);p=(p||'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes')+',width='+n+',height='+o+',top='+q+',left='+r;var s=window.open('',null,p,true);if(!s)return false;try{var t=navigator.userAgent.toLowerCase();if(t.indexOf(' chrome/')==-1){s.moveTo(r,q);s.resizeTo(n,o);}s.focus();s.location.href=m;}catch(u){s=window.open(m,null,p,true);}return true;}});(function(){var m,n={modes:{wysiwyg:1,source:1},canUndo:false,readOnly:1,exec:function(p){var q,r=p.config,s=r.baseHref?'':'',t=b.isCustomDomain();if(r.fullPage)q=p.getData().replace(//,'$&'+s).replace(/[^>]*(?=<\/title>)/,'$& — '+p.lang.preview);else{var u=''+''+s+''+p.lang.preview+''+e.buildStyleHtml(p.config.contentsCss)+''+u+p.getData()+'';}var w=640,x=420,y=80;try{var z=window.screen;w=Math.round(z.width*0.8);x=Math.round(z.height*0.7);y=Math.round(z.width*0.1);}catch(D){}var A='';if(t){window._cke_htmlToLoad=q;A='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )'; +}if(b.gecko){window._cke_htmlToLoad=q;A=m+'preview.html';}var B=window.open(A,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+w+',height='+x+',left='+y);if(!t&&!b.gecko){var C=B.document;C.open();C.write(q);C.close();b.webkit&&setTimeout(function(){C.body.innerHTML+='';},0);}}},o='preview';j.add(o,{init:function(p){m=this.path;p.addCommand(o,n);p.ui.addButton('Preview',{label:p.lang.preview,command:o});}});})();j.add('print',{init:function(m){var n='print',o=m.addCommand(n,j.print);m.ui.addButton('Print',{label:m.lang.print,command:n});}});j.print={exec:function(m){if(b.opera)return;else if(b.gecko)m.window.$.print();else m.document.$.execCommand('Print');},canUndo:false,readOnly:1,modes:{wysiwyg:!b.opera}};j.add('removeformat',{requires:['selection'],init:function(m){m.addCommand('removeFormat',j.removeformat.commands.removeformat);m.ui.addButton('RemoveFormat',{label:m.lang.removeFormat,command:'removeFormat'});m._.removeFormat={filters:[]};}});j.removeformat={commands:{removeformat:{exec:function(m){var n=m._.removeFormatRegex||(m._.removeFormatRegex=new RegExp('^(?:'+m.config.removeFormatTags.replace(/,/g,'|')+')$','i')),o=m._.removeAttributes||(m._.removeAttributes=m.config.removeFormatAttributes.split(',')),p=j.removeformat.filter,q=m.getSelection().getRanges(1),r=q.createIterator(),s;while(s=r.getNextRange()){if(!s.collapsed)s.enlarge(1);var t=s.createBookmark(),u=t.startNode,v=t.endNode,w,x=function(z){var A=new d.elementPath(z),B=A.elements;for(var C=1,D;D=B[C];C++){if(D.equals(A.block)||D.equals(A.blockLimit))break;if(n.test(D.getName())&&p(m,D))z.breakParent(D);}};x(u);if(v){x(v);w=u.getNextSourceNode(true,1);while(w){if(w.equals(v))break;var y=w.getNextSourceNode(false,1);if(!(w.getName()=='img'&&w.data('cke-realelement'))&&p(m,w))if(n.test(w.getName()))w.remove(1);else{w.removeAttributes(o);m.fire('removeFormatCleanup',w);}w=y;}}s.moveToBookmark(t);}m.getSelection().selectRanges(q);}}},filter:function(m,n){var o=m._.removeFormat.filters;for(var p=0;pr.width&&(n.resize_minWidth=r.width);n.resize_minHeight>r.height&&(n.resize_minHeight=r.height);a.document.on('mousemove',u);a.document.on('mouseup',v);if(m.document){m.document.on('mousemove',u);m.document.on('mouseup',v);}});m.on('destroy',function(){e.removeFunction(w);});m.on('themeSpace',function(x){if(x.data.space=='bottom'){var y='';if(s&&!t)y=' cke_resizer_horizontal';if(!s&&t)y=' cke_resizer_vertical';var z='
';o=='ltr'&&y=='ltr'?x.data.html+=z:x.data.html=z+x.data.html;}},m,null,100);}}});(function(){var m={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(o){var p=o.element.$.form;if(p)try{p.submit();}catch(q){if(p.submit.click)p.submit.click();}}},n='save';j.add(n,{init:function(o){var p=o.addCommand(n,m);p.modes={wysiwyg:!!o.element.$.form};o.ui.addButton('Save',{label:o.lang.save,command:n});}});})();(function(){var m='scaytcheck',n='';function o(t,u){var v=0,w;for(w in u){if(u[w]==t){v=1;break;}}return v;};var p=function(){var t=this,u=function(){if(q.instances[t.name])q.instances[t.name].destroy();var y=t.config,z={};z.srcNodeRef=t.document.getWindow().$.frameElement;z.assocApp='CKEDITOR.'+a.version+'@'+a.revision;z.customerid=y.scayt_customerid||'1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';z.customDictionaryIds=y.scayt_customDictionaryIds||'';z.userDictionaryName=y.scayt_userDictionaryName||''; +z.sLang=y.scayt_sLang||'en_US';z.onLoad=function(){if(!(c&&b.version<8))this.addStyle(this.selectorCss(),'padding-bottom: 2px !important;');if(t.focusManager.hasFocus&&!q.isControlRestored(t))this.focus();};z.onBeforeChange=function(){if(q.getScayt(t)&&!t.checkDirty())setTimeout(function(){t.resetDirty();},0);};var A=window.scayt_custom_params;if(typeof A=='object')for(var B in A)z[B]=A[B];if(q.getControlId(t))z.id=q.getControlId(t);var C=new window.scayt(z);C.afterMarkupRemove.push(function(E){new h(E,C.document).mergeSiblings();});var D=q.instances[t.name];if(D){C.sLang=D.sLang;C.option(D.option());C.paused=D.paused;}q.instances[t.name]=C;try{C.setDisabled(q.isPaused(t)===false);}catch(E){}t.fire('showScaytState');};t.on('contentDom',function(y){u();});t.on('contentDomUnload',function(){var y=a.document.getElementsByTag('script'),z=/^dojoIoScript(\d+)$/i,A=/^https?:\/\/svc\.webspellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i;for(var B=0;B=0){this.setState(0);q.loadEngine(t);}}};j.add('scayt',{requires:['menubutton'],beforeInit:function(t){var u=t.config.scayt_contextMenuItemsOrder||'suggest|moresuggest|control',v='';u=u.split('|');if(u&&u.length)for(var w=0;w tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');n=o.replace(/%2/g,m).replace(/%1/g,'cke_show_borders ');var p={preserveState:true,editorFocus:false,readOnly:1,exec:function(q){this.toggleState();this.refresh(q);},refresh:function(q){if(q.document){var r=this.state==1?'addClass':'removeClass';q.document.getBody()[r]('cke_show_borders');}}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(q){var r=q.addCommand('showborders',p);r.canUndo=false;if(q.config.startupShowBorders!==false)r.setState(1);q.addCss(n);q.on('mode',function(){if(r.state!=0)r.refresh(q);},null,null,100);q.on('contentDom',function(){if(r.state!=0)r.refresh(q);});q.on('removeFormatCleanup',function(s){var t=s.data;if(q.getCommand('showborders').state==1&&t.is('table')&&(!t.hasAttribute('border')||parseInt(t.getAttribute('border'),10)<=0))t.addClass(m);});},afterInit:function(q){var r=q.dataProcessor,s=r&&r.dataFilter,t=r&&r.htmlFilter; +if(s)s.addRules({elements:{table:function(u){var v=u.attributes,w=v['class'],x=parseInt(v.border,10);if((!x||x<=0)&&(!w||w.indexOf(m)==-1))v['class']=(w||'')+' '+m;}}});if(t)t.addRules({elements:{table:function(u){var v=u.attributes,w=v['class'];w&&(v['class']=w.replace(m,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));}}});}});a.on('dialogDefinition',function(q){var r=q.data.name;if(r=='table'||r=='tableProperties'){var s=q.data.definition,t=s.getContents('info'),u=t.get('txtBorder'),v=u.commit;u.commit=e.override(v,function(y){return function(z,A){y.apply(this,arguments);var B=parseInt(this.getValue(),10);A[!B||B<=0?'addClass':'removeClass'](m);};});var w=s.getContents('advanced'),x=w&&w.get('advCSSClasses');if(x){x.setup=e.override(x.setup,function(y){return function(){y.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,''));};});x.commit=e.override(x.commit,function(y){return function(z,A){y.apply(this,arguments);if(!parseInt(A.getAttribute('border'),10))A.addClass('cke_show_border');};});}}});})();j.add('sourcearea',{requires:['editingblock'],init:function(m){var n=j.sourcearea,o=a.document.getWindow();m.on('editingBlockReady',function(){var p,q;m.addMode('source',{load:function(r,s){if(c&&b.version<8)r.setStyle('position','relative');m.textarea=p=new h('textarea');p.setAttributes({dir:'ltr',tabIndex:b.webkit?-1:m.tabIndex,role:'textbox','aria-label':m.lang.editorTitle.replace('%1',m.name)});p.addClass('cke_source');p.addClass('cke_enable_context_menu');m.readOnly&&p.setAttribute('readOnly','readonly');var t={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){q=function(){p.hide();p.setStyle('height',r.$.clientHeight+'px');p.setStyle('width',r.$.clientWidth+'px');p.show();};m.on('resize',q);o.on('resize',q);setTimeout(q,0);}r.setHtml('');r.append(p);p.setStyles(t);m.fire('ariaWidget',p);p.on('blur',function(){m.focusManager.blur();});p.on('focus',function(){m.focusManager.focus();});m.mayBeDirty=true;this.loadData(s);var u=m.keystrokeHandler;if(u)u.attach(p);setTimeout(function(){m.mode='source';m.fire('mode',{previousMode:m._.previousMode});},b.gecko||b.webkit?100:0);},loadData:function(r){p.setValue(r);m.fire('dataReady');},getData:function(){return p.getValue();},getSnapshotData:function(){return p.getValue();},unload:function(r){p.clearCustomData();m.textarea=p=null;if(q){m.removeListener('resize',q);o.removeListener('resize',q);}if(c&&b.version<8)r.removeStyle('position'); +},focus:function(){p.focus();}});});m.on('readOnly',function(){if(m.mode=='source')if(m.readOnly)m.textarea.setAttribute('readOnly','readonly');else m.textarea.removeAttribute('readOnly');});m.addCommand('source',n.commands.source);if(m.ui.addButton)m.ui.addButton('Source',{label:m.lang.source,command:'source'});m.on('mode',function(){m.getCommand('source').setState(m.mode=='source'?1:2);});}});j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:false,readOnly:1,exec:function(m){if(m.mode=='wysiwyg')m.fire('saveSnapshot');m.getCommand('source').setState(0);m.setMode(m.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(n){var o=n.config,p=n.lang.stylesCombo,q={},r=[],s;function t(u){n.getStylesSet(function(v){if(!r.length){var w,x;for(var y=0,z=v.length;y0)return;if(S.type==1&&m.test(S.getName())&&!S.getCustomData('selected_cell')){h.setMarker(J,S,'selected_cell',true);I.push(S);}};for(var L=0;L1&&V&&U[Y]==V[Y]){Z=U[Y];Z.rowSpan+=1;}else{Z=new h(U[Y]).clone();Z.removeAttribute('rowSpan');!c&&Z.appendBogus();X.append(Z);Z=Z.$;}Y+=Z.colSpan-1;}H?X.insertBefore(S):X.insertAfter(S);};function q(G){if(G instanceof d.selection){var H=n(G),I=H[0],J=I.getAscendant('table'),K=e.buildTableMap(J),L=H[0].getParent(),M=L.$.rowIndex,N=H[H.length-1],O=N.getParent().$.rowIndex+N.$.rowSpan-1,P=[]; +for(var Q=M;Q<=O;Q++){var R=K[Q],S=new h(J.$.rows[Q]);for(var T=0;T0?X[M-1]:null)||J.$.parentNode);for(Q=P.length;Q>=0;Q--)q(P[Q]);return Y;}else if(G instanceof h){J=G.getAscendant('table');if(J.$.rows.length==1)J.remove();else G.remove();}return null;};function r(G,H){var I=G.getParent(),J=I.$.cells,K=0;for(var L=0;LI)I=K;}return I;};function t(G,H){var I=n(G),J=I[0],K=J.getAscendant('table'),L=s(I,1),M=s(I),N=H?L:M,O=e.buildTableMap(K),P=[],Q=[],R=O.length;for(var S=0;S1&&Q[S]==P[S]){U=P[S];U.colSpan+=1;}else{U=new h(P[S]).clone();U.removeAttribute('colSpan');!c&&U.appendBogus();U[H?'insertBefore':'insertAfter'].call(U,new h(P[S]));U=U.$;}S+=U.rowSpan-1;}};function u(G){var H=n(G),I=H[0],J=H[H.length-1],K=I.getAscendant('table'),L=e.buildTableMap(K),M,N,O=[];for(var P=0,Q=L.length;P1){L=H[J-1]+1;break;}}if(!L)L=H[0]>0?H[0]-1:H[H.length-1]+1;var N=I.$.rows;for(J=0,K=N.length;J=0;K--)x(H[K]);if(J)z(J,true);else if(I)I.remove();}else if(G instanceof h){var L=G.getParent();if(L.getChildCount()==1)L.remove(); +else G.remove();}};function y(G){var H=G.getBogus();H&&H.remove();G.trim();};function z(G,H){var I=new d.range(G.getDocument());if(!I['moveToElementEdit'+(H?'End':'Start')](G)){I.selectNodeContents(G);I.collapse(H?false:true);}I.select(true);};function A(G,H,I){var J=G[H];if(typeof I=='undefined')return J;for(var K=0;J&&K1)J+=K[H].rowSpan-1;}return I;};function C(G,H,I){var J=n(G),K;if((H?J.length!=1:J.length<2)||(K=G.getCommonAncestor())&&K.type==1&&K.is('table'))return false;var L,M=J[0],N=M.getAscendant('table'),O=e.buildTableMap(N),P=O.length,Q=O[0].length,R=M.getParent().$.rowIndex,S=A(O,R,M);if(H){var T;try{var U=parseInt(M.getAttribute('rowspan'),10)||1,V=parseInt(M.getAttribute('colspan'),10)||1;T=O[H=='up'?R-U:H=='down'?R+U:R][H=='left'?S-V:H=='right'?S+V:S];}catch(an){return false;}if(!T||M.$==T)return false;J[H=='up'||H=='left'?'unshift':'push'](new h(T));}var W=M.getDocument(),X=R,Y=0,Z=0,aa=!I&&new d.documentFragment(W),ab=0;for(var ac=0;ac=Q)M.removeAttribute('rowSpan');else M.$.rowSpan=Y;if(Y>=P)M.removeAttribute('colSpan');else M.$.colSpan=Z;var ak=new d.nodeList(N.$.rows),al=ak.count();for(ac=al-1;ac>=0;ac--){var am=ak.getItem(ac);if(!am.$.cells.length){am.remove();al++;continue;}}return M;}else return Y*Z==ab;};function D(G,H){var I=n(G);if(I.length>1)return false;else if(H)return true;var J=I[0],K=J.getParent(),L=K.getAscendant('table'),M=e.buildTableMap(L),N=K.$.rowIndex,O=A(M,N,J),P=J.$.rowSpan,Q,R,S,T;if(P>1){R=Math.ceil(P/2);S=Math.floor(P/2);T=N+R;var U=new h(L.$.rows[T]),V=A(M,T),W;Q=J.clone();for(var X=0;XO){Q.insertBefore(new h(W));break;}else W=null;}if(!W)U.append(Q,true);}else{S=R=1;U=K.clone();U.insertAfter(K);U.append(Q=J.clone());var Y=A(M,N);for(var Z=0;Z1)return false;else if(H)return true;var J=I[0],K=J.getParent(),L=K.getAscendant('table'),M=e.buildTableMap(L),N=K.$.rowIndex,O=A(M,N,J),P=J.$.colSpan,Q,R,S;if(P>1){R=Math.ceil(P/2);S=Math.floor(P/2);}else{S=R=1;var T=B(M,O);for(var U=0;U0?2:0}; +}},tablecell_insertBefore:{label:H.cell.insertBefore,group:'tablecell',command:'cellInsertBefore',order:5},tablecell_insertAfter:{label:H.cell.insertAfter,group:'tablecell',command:'cellInsertAfter',order:10},tablecell_delete:{label:H.cell.deleteCell,group:'tablecell',command:'cellDelete',order:15},tablecell_merge:{label:H.cell.merge,group:'tablecell',command:'cellMerge',order:16},tablecell_merge_right:{label:H.cell.mergeRight,group:'tablecell',command:'cellMergeRight',order:17},tablecell_merge_down:{label:H.cell.mergeDown,group:'tablecell',command:'cellMergeDown',order:18},tablecell_split_horizontal:{label:H.cell.splitHorizontal,group:'tablecell',command:'cellHorizontalSplit',order:19},tablecell_split_vertical:{label:H.cell.splitVertical,group:'tablecell',command:'cellVerticalSplit',order:20},tablecell_properties:{label:H.cell.title,group:'tablecellproperties',command:'cellProperties',order:21},tablerow:{label:H.row.menu,group:'tablerow',order:1,getItems:function(){return{tablerow_insertBefore:2,tablerow_insertAfter:2,tablerow_delete:2};}},tablerow_insertBefore:{label:H.row.insertBefore,group:'tablerow',command:'rowInsertBefore',order:5},tablerow_insertAfter:{label:H.row.insertAfter,group:'tablerow',command:'rowInsertAfter',order:10},tablerow_delete:{label:H.row.deleteRow,group:'tablerow',command:'rowDelete',order:15},tablecolumn:{label:H.column.menu,group:'tablecolumn',order:1,getItems:function(){return{tablecolumn_insertBefore:2,tablecolumn_insertAfter:2,tablecolumn_delete:2};}},tablecolumn_insertBefore:{label:H.column.insertBefore,group:'tablecolumn',command:'columnInsertBefore',order:5},tablecolumn_insertAfter:{label:H.column.insertAfter,group:'tablecolumn',command:'columnInsertAfter',order:10},tablecolumn_delete:{label:H.column.deleteColumn,group:'tablecolumn',command:'columnDelete',order:15}});if(G.contextMenu)G.contextMenu.addListener(function(I,J){if(!I||I.isReadOnly())return null;while(I){if(I.getName() in F)return{tablecell:2,tablerow:2,tablecolumn:2};I=I.getParent();}return null;});},getSelectedCells:n};j.add('tabletools',j.tabletools);})();e.buildTableMap=function(m){var n=m.$.rows,o=-1,p=[];for(var q=0;qp&&(!s||!t||vt){s=v;t=u;}}else{if(q&&u==p){s=v;break;}if(ut)){s=v;t=u;}}}if(s)s.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(o){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));o.addCommand('templates',new a.dialogCommand('templates')); +o.ui.addButton('Templates',{label:o.lang.templates.button,command:'templates'});}});var m={},n={};a.addTemplates=function(o,p){m[o]=p;};a.getTemplates=function(o){return m[o];};a.loadTemplates=function(o,p){var q=[];for(var r=0,s=o.length;r':' style="display:none">');t.push('',o.lang.toolbars,'');var w=o.toolbox.toolbars,x=o.config.toolbar instanceof Array?o.config.toolbar:o.config['toolbar_'+o.config.toolbar];for(var y=0;y');v=0;}if(C==='/'){t.push('
');continue;}D=C.items||C;for(var E=0;E');B&&t.push('',B,'');t.push('');var I=w.push(A)-1;if(I>0){A.previous=w[I-1];A.previous.next=A;}}if(H){if(!v){t.push('');v=1;}}else if(v){t.push('');v=0;}var J=F.render(o,t);I=A.items.push(J)-1;if(I>0){J.previous=A.items[I-1];J.previous.next=J;}J.toolbar=A;J.onkey=q;J.onfocus=function(){if(!o.toolbox.focusCommandExecuted)o.focus();};}}if(v){t.push('');v=0;}if(A)t.push('');}t.push('');if(o.config.toolbarCanCollapse){var K=e.addFunction(function(){o.execCommand('toolbarCollapse');});o.on('destroy',function(){e.removeFunction(K);});var L=e.getNextId();o.addCommand('toolbarCollapse',{readOnly:1,exec:function(M){var N=a.document.getById(L),O=N.getPrevious(),P=M.getThemeSpace('contents'),Q=O.getParent(),R=parseInt(P.$.style.height,10),S=Q.$.offsetHeight,T=!O.isVisible();if(!T){O.hide();N.addClass('cke_toolbox_collapser_min');N.setAttribute('title',M.lang.toolbarExpand);}else{O.show();N.removeClass('cke_toolbox_collapser_min');N.setAttribute('title',M.lang.toolbarCollapse);}N.getFirst().setText(T?'▲':'◀');var U=Q.$.offsetHeight-S;P.setStyle('height',R-U+'px');M.fire('resize');},modes:{wysiwyg:1,source:1}});t.push('','','');}r.data.html+=t.join('');}});o.on('destroy',function(){var r,s=0,t,u,v;r=this.toolbox.toolbars;for(;s');return{};}};}});}});})();a.UI_SEPARATOR='separator';i.toolbarLocation='top';i.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];i.toolbar_Full=[{name:'document',items:['Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates']},{name:'clipboard',items:['Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo']},{name:'editing',items:['Find','Replace','-','SelectAll','-','SpellChecker','Scayt']},{name:'forms',items:['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField']},'/',{name:'basicstyles',items:['Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat']},{name:'paragraph',items:['NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl']},{name:'links',items:['Link','Unlink','Anchor']},{name:'insert',items:['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe']},'/',{name:'styles',items:['Styles','Format','Font','FontSize']},{name:'colors',items:['TextColor','BGColor']},{name:'tools',items:['Maximize','ShowBlocks','-','About']}]; +i.toolbar='Full';i.toolbarCanCollapse=true;(function(){j.add('undo',{requires:['selection','wysiwygarea'],init:function(s){var t=new o(s),u=s.addCommand('undo',{exec:function(){if(t.undo()){s.selectionChange();this.fire('afterUndo');}},state:0,canUndo:false}),v=s.addCommand('redo',{exec:function(){if(t.redo()){s.selectionChange();this.fire('afterRedo');}},state:0,canUndo:false});t.onChange=function(){u.setState(t.undoable()?2:0);v.setState(t.redoable()?2:0);};function w(x){if(t.enabled&&x.data.command.canUndo!==false)t.save();};s.on('beforeCommandExec',w);s.on('afterCommandExec',w);s.on('saveSnapshot',function(x){t.save(x.data&&x.data.contentOnly);});s.on('contentDom',function(){s.document.on('keydown',function(x){if(!x.data.$.ctrlKey&&!x.data.$.metaKey)t.type(x);});});s.on('beforeModeUnload',function(){s.mode=='wysiwyg'&&t.save(true);});s.on('mode',function(){t.enabled=s.readOnly?false:s.mode=='wysiwyg';t.onChange();});s.ui.addButton('Undo',{label:s.lang.undo,command:'undo'});s.ui.addButton('Redo',{label:s.lang.redo,command:'redo'});s.resetUndo=function(){t.reset();s.fire('saveSnapshot');};s.on('updateSnapshot',function(){if(t.currentImage)t.update();});}});j.undo={};var m=j.undo.Image=function(s){this.editor=s;s.fire('beforeUndoImage');var t=s.getSnapshot(),u=t&&s.getSelection();c&&t&&(t=t.replace(/\s+data-cke-expando=".*?"/g,''));this.contents=t;this.bookmarks=u&&u.createBookmarks2(true);s.fire('afterUndoImage');},n=/\b(?:href|src|name)="[^"]*?"/gi;m.prototype={equals:function(s,t){var u=this.contents,v=s.contents;if(c&&(b.ie7Compat||b.ie6Compat)){u=u.replace(n,'');v=v.replace(n,'');}if(u!=v)return false;if(t)return true;var w=this.bookmarks,x=s.bookmarks;if(w||x){if(!w||!x||w.length!=x.length)return false;for(var y=0;y25){this.save(false,null,false);this.modifiersCount=1;}}else if(!y){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1;}}},reset:function(){var s=this;s.lastKeystroke=0;s.snapshots=[];s.index=-1;s.limit=s.editor.config.undoStackSize||20;s.currentImage=null;s.hasUndo=false;s.hasRedo=false;s.resetType();},resetType:function(){var s=this;s.typing=false;delete s.lastKeystroke;s.typesCount=0;s.modifiersCount=0;},fireChange:function(){var s=this;s.hasUndo=!!s.getNextImage(true);s.hasRedo=!!s.getNextImage(false);s.resetType();s.onChange();},save:function(s,t,u){var w=this;var v=w.snapshots;if(!t)t=new m(w.editor);if(t.contents===false)return false;if(w.currentImage&&t.equals(w.currentImage,s))return false;v.splice(w.index+1,v.length-w.index-1);if(v.length==w.limit)v.shift();w.index=v.push(t)-1;w.currentImage=t;if(u!==false)w.fireChange();return true;},restoreImage:function(s){var w=this;var t=w.editor,u;if(s.bookmarks){t.focus();u=t.getSelection();}w.editor.loadSnapshot(s.contents);if(s.bookmarks)u.selectBookmarks(s.bookmarks);else if(c){var v=w.editor.document.getBody().$.createTextRange();v.collapse(true);v.select();}w.index=s.index;w.update();w.fireChange();},getNextImage:function(s){var x=this;var t=x.snapshots,u=x.currentImage,v,w;if(u)if(s)for(w=x.index-1;w>=0;w--){v=t[w];if(!u.equals(v,true)){v.index=w;return v;}}else for(w=x.index+1;w]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,n=d.walker.whitespaces(true),o=d.walker.bogus(true),p=function(E){return n(E)&&o(E);};function q(E){return E.isBlockBoundary()&&f.$empty[E.getName()];};function r(E){return function(F){if(this.mode=='wysiwyg'){this.focus(); +var G=this.getSelection(),H=G.isLocked;H&&G.unlock();this.fire('saveSnapshot');E.call(this,F.data);H&&this.getSelection().lock();var I=this;setTimeout(function(){try{I.fire('saveSnapshot');}catch(J){setTimeout(function(){I.fire('saveSnapshot');},200);}},0);}};};function s(E){var N=this;if(N.dataProcessor)E=N.dataProcessor.toHtml(E);if(!E)return;var F=N.getSelection(),G=F.getRanges()[0];if(G.checkReadOnly())return;if(b.opera){var H=new d.elementPath(G.startContainer);if(H.block){var I=a.htmlParser.fragment.fromHtml(E,false).children;for(var J=0,K=I.length;J'+Q+'';});I=I.replace(/\n/g,'
');if(!(H||c))I=I.replace(new RegExp('
(?=)'),function(O){return e.repeat(O,2);});if(b.gecko||b.webkit){var K=new d.elementPath(F.getStartElement()),L=[];for(var M=0;M/));else if(N in f.$block)break;}I=L.join('')+I;}s.call(this,I);};function u(E){var F=this.getSelection(),G=F.getRanges(),H=E.getName(),I=f.$block[H],J=F.isLocked;if(J)F.unlock();var K,L,M,N;for(var O=G.length-1;O>=0;O--){K=G[O];if(!K.checkReadOnly()){K.deleteContents(1);L=!O&&E||E.clone(1);var P,Q;if(I)while((P=K.getCommonAncestor(0,1))&&(Q=f[P.getName()])&&!(Q&&Q[H])){if(P.getName() in f.span)K.splitElement(P);else if(K.checkStartOfBlock()&&K.checkEndOfBlock()){K.setStartBefore(P);K.collapse(true);P.remove();}else K.splitBlock();}K.insertNode(L); +if(!M)M=L;}}if(M){K.moveToPosition(M,4);if(I){var R=M.getNext(p),S=R&&R.type==1&&R.getName();if(S&&f.$block[S]){if(f[S]['#'])K.moveToElementEditStart(R);else K.moveToElementEditEnd(M);}else if(!R){R=K.fixBlock(true,this.config.enterMode==3?'div':'p');K.moveToElementEditStart(R);}}}F.selectRanges([K]);if(J)this.getSelection().lock();};function v(E){if(!E.checkDirty())setTimeout(function(){E.resetDirty();},0);};var w=d.walker.whitespaces(true),x=d.walker.bookmark(false,true);function y(E){return w(E)&&x(E);};function z(E){return E.type==3&&e.trim(E.getText()).match(/^(?: |\xa0)$/);};function A(E){if(E.isLocked){E.unlock();setTimeout(function(){E.lock();},0);}};function B(E){return E.getOuterHtml().match(m);};w=d.walker.whitespaces(true);function C(E){var F=E.window,G=E.document,H=E.document.getBody(),I=H.getFirst(),J=H.getChildren().count();if(!J||J==1&&I.type==1&&I.hasAttribute('_moz_editor_bogus_node')){v(E);var K=E.element.getDocument(),L=K.getDocumentElement(),M=L.$.scrollTop,N=L.$.scrollLeft,O=G.$.createEvent('KeyEvents');O.initKeyEvent('keypress',true,true,F.$,false,false,false,false,0,32);G.$.dispatchEvent(O);if(M!=L.$.scrollTop||N!=L.$.scrollLeft)K.getWindow().$.scrollTo(N,M);J&&H.getFirst().remove();G.getBody().appendBogus();var P=new d.range(G);P.setStartAt(H,1);P.select();}};function D(E){var F=E.editor,G=E.data.path,H=G.blockLimit,I=E.data.selection,J=I.getRanges()[0],K=F.document.getBody(),L=F.config.enterMode;if(b.gecko){var M=G.block||G.blockLimit,N=M&&M.getLast(y);if(M&&M.isBlockBoundary()&&!(N&&N.type==1&&N.isBlockBoundary())&&!M.is('pre')&&!M.getBogus())M.appendBogus();}if(F.config.autoParagraph!==false&&L!=2&&J.collapsed&&H.getName()=='body'&&!G.block){var O=J.fixBlock(true,F.config.enterMode==3?'div':'p');if(c){var P=O.getFirst(y);P&&z(P)&&P.remove();}if(B(O)){var Q=O.getNext(w);if(Q&&Q.type==1&&!q(Q)){J.moveToElementEditStart(Q);O.remove();}else{Q=O.getPrevious(w);if(Q&&Q.type==1&&!q(Q)){J.moveToElementEditEnd(Q);O.remove();}}}J.select();E.cancel();}var R=new d.range(F.document);R.moveToElementEditEnd(F.document.getBody());var S=new d.elementPath(R.startContainer);if(!S.blockLimit.is('body')){var T;if(L!=2)T=K.append(F.document.createElement(L==1?'p':'div'));else T=K;if(!c)T.appendBogus();}};j.add('wysiwygarea',{requires:['editingblock'],init:function(E){var F=E.config.enterMode!=2&&E.config.autoParagraph!==false?E.config.enterMode==3?'div':'p':false,G=E.lang.editorTitle.replace('%1',E.name),H=E.lang.editorHelp;if(c)G+=', '+H;var I=a.document.getWindow(),J; +E.on('editingBlockReady',function(){var M,N,O,P,Q,R,S,T=b.isCustomDomain(),U=function(X){if(N)N.remove();var Y='document.open();'+(T?'document.domain="'+document.domain+'";':'')+'document.close();';Y=b.air?'javascript:void(0)':c?'javascript:void(function(){'+encodeURIComponent(Y)+'}())':'';var Z=e.getNextId();N=h.createFromHtml('');if(document.location.protocol=='chrome:')a.event.useCapture=true;N.on('load',function(aa){Q=1;aa.removeListener();var ab=N.getFrameDocument();ab.write(X);b.air&&W(ab.getWindow().$);});if(document.location.protocol=='chrome:')a.event.useCapture=false;M.append(h.createFromHtml(''+H+''));M.append(N);if(b.webkit){S=function(){M.setStyle('width','100%');N.hide();N.setSize('width',M.getSize('width'));M.removeStyle('width');N.show();};I.on('resize',S);}};J=e.addFunction(W);var V='';function W(X){if(!Q)return;Q=0;E.fire('ariaWidget',N);var Y=X.document,Z=Y.body,aa=Y.getElementById('cke_actscrpt');aa&&aa.parentNode.removeChild(aa);Z.spellcheck=!E.config.disableNativeSpellChecker;var ab=!E.readOnly;if(c){Z.hideFocus=true;Z.disabled=true;Z.contentEditable=ab;Z.removeAttribute('disabled');}else setTimeout(function(){if(b.gecko&&b.version>=10900||b.opera)Y.$.body.contentEditable=ab;else if(b.webkit)Y.$.body.parentNode.contentEditable=ab;else Y.$.designMode=ab?'off':'on';},0);ab&&b.gecko&&e.setTimeout(C,0,null,E);X=E.window=new d.window(X);Y=E.document=new g(Y);ab&&Y.on('dblclick',function(ag){var ah=ag.data.getTarget(),ai={element:ah,dialog:''};E.fire('doubleclick',ai);ai.dialog&&E.openDialog(ai.dialog);});c&&Y.on('click',function(ag){var ah=ag.data.getTarget();if(ah.is('input')){var ai=ah.getAttribute('type');if(ai=='submit'||ai=='reset')ag.data.preventDefault();}});if(!(c||b.opera))Y.on('mousedown',function(ag){var ah=ag.data.getTarget();if(ah.is('img','hr','input','textarea','select'))E.getSelection().selectElement(ah);});if(b.gecko)Y.on('mouseup',function(ag){if(ag.data.$.button==2){var ah=ag.data.getTarget();if(!ah.getOuterHtml().replace(m,'')){var ai=new d.range(Y);ai.moveToElementEditStart(ah);ai.select(true);}}}); +Y.on('click',function(ag){ag=ag.data;if(ag.getTarget().is('a')&&ag.$.button!=2)ag.preventDefault();});if(b.webkit){Y.on('mousedown',function(){ad=1;});Y.on('click',function(ag){if(ag.data.getTarget().is('input','select'))ag.data.preventDefault();});Y.on('mouseup',function(ag){if(ag.data.getTarget().is('input','textarea'))ag.data.preventDefault();});}var ac=c?N:X;ac.on('blur',function(){E.focusManager.blur();});var ad;ac.on('focus',function(){var ag=E.document;if(b.gecko||b.opera)ag.getBody().focus();else if(b.webkit)if(!ad){E.document.getDocumentElement().focus();ad=1;}E.focusManager.focus();});var ae=E.keystrokeHandler;ae.blockedKeystrokes[8]=!ab;ae.attach(Y);Y.getDocumentElement().addClass(Y.$.compatMode);E.on('key',function(ag){if(E.mode!='wysiwyg')return;var ah=ag.data.keyCode;if(ah in {8:1,46:1}){var ai=E.getSelection(),aj=ai.getSelectedElement(),ak=ai.getRanges()[0],al=new d.elementPath(ak.startContainer),am,an,ao,ap=ah==8;if(aj){E.fire('saveSnapshot');ak.moveToPosition(aj,3);aj.remove();ak.select();E.fire('saveSnapshot');ag.cancel();}else if(ak.collapsed)if((am=al.block)&&ak[ap?'checkStartOfBlock':'checkEndOfBlock']()&&(ao=am[ap?'getPrevious':'getNext'](n))&&ao.is('table')){E.fire('saveSnapshot');if(ak[ap?'checkEndOfBlock':'checkStartOfBlock']())am.remove();ak['moveToElementEdit'+(ap?'End':'Start')](ao);ak.select();E.fire('saveSnapshot');ag.cancel();}else if(al.blockLimit.is('td')&&(an=al.blockLimit.getAscendant('table'))&&ak.checkBoundaryOfElement(an,ap?1:2)&&(ao=an[ap?'getPrevious':'getNext'](n))){E.fire('saveSnapshot');ak['moveToElementEdit'+(ap?'End':'Start')](ao);if(ak.checkStartOfBlock()&&ak.checkEndOfBlock())ao.remove();else ak.select();E.fire('saveSnapshot');ag.cancel();}}if(ah==33||ah==34)if(b.gecko){var aq=Y.getBody();if(X.$.innerHeight>aq.$.offsetHeight){ak=new d.range(Y);ak[ah==33?'moveToElementEditStart':'moveToElementEditEnd'](aq);ak.select();ag.cancel();}}});if(c&&Y.$.compatMode=='CSS1Compat'){var af={33:1,34:1};Y.on('keydown',function(ag){if(ag.data.getKeystroke() in af)setTimeout(function(){E.getSelection().scrollIntoView();},0);});}if(c&&E.config.enterMode!=1)Y.on('selectionchange',function(){var ag=Y.getBody(),ah=E.getSelection(),ai=ah&&ah.getRanges()[0];if(ai&&ag.getHtml().match(/^

 <\/p>$/i)&&ai.startContainer.equals(ag))setTimeout(function(){ai=E.getSelection().getRanges()[0];if(!ai.startContainer.equals('body')){ag.getFirst().remove(1);ai.moveToElementEditEnd(ag);ai.select(1);}},0);});if(E.contextMenu)E.contextMenu.addTarget(Y,E.config.browserContextMenuOnCtrl!==false); +setTimeout(function(){E.fire('contentDom');if(R){E.mode='wysiwyg';E.fire('mode',{previousMode:E._.previousMode});R=false;}O=false;if(P){E.focus();P=false;}setTimeout(function(){E.fire('dataReady');},0);try{E.document.$.execCommand('2D-position',false,true);}catch(ag){}try{E.document.$.execCommand('enableInlineTableEditing',false,!E.config.disableNativeTableHandles);}catch(ah){}if(E.config.disableObjectResizing)try{E.document.$.execCommand('enableObjectResizing',false,false);}catch(ai){E.document.getBody().on(c?'resizestart':'resize',function(aj){aj.data.preventDefault();});}if(c)setTimeout(function(){if(E.document){var aj=E.document.$.body;aj.runtimeStyle.marginBottom='0px';aj.runtimeStyle.marginBottom='';}},1000);},0);};E.addMode('wysiwyg',{load:function(X,Y,Z){M=X;if(c&&b.quirks)X.setStyle('position','relative');E.mayBeDirty=true;R=true;if(Z)this.loadSnapshotData(Y);else this.loadData(Y);},loadData:function(X){O=true;E._.dataStore={id:1};var Y=E.config,Z=Y.fullPage,aa=Y.docType,ab='';!Z&&(ab=e.buildStyleHtml(E.config.contentsCss)+ab);var ac=Y.baseHref?'':'';if(Z)X=X.replace(/]*>/i,function(ad){E.docType=aa=ad;return '';}).replace(/<\?xml\s[^\?]*\?>/i,function(ad){E.xmlDeclaration=ad;return '';});if(E.dataProcessor)X=E.dataProcessor.toHtml(X,F);if(Z){if(!/]/.test(X))X=''+X;if(!/]/.test(X))X=''+X+'';if(!/]/.test(X))X=X.replace(/]*>/,'$&');else if(!/]/.test(X))X=X.replace(/]*>/,'$&');ac&&(X=X.replace(//,'$&'+ac));X=X.replace(/<\/head\s*>/,ab+'$&');X=aa+X;}else X=Y.docType+''+''+''+G+''+ac+ab+''+''+X+'';if(b.gecko)X=X.replace(/
(?=\s*<\/(:?html|body)>)/,'$&
');X+=V;this.onDispose();U(X);},getData:function(){var X=E.config,Y=X.fullPage,Z=Y&&E.docType,aa=Y&&E.xmlDeclaration,ab=N.getFrameDocument(),ac=Y?ab.getDocumentElement().getOuterHtml():ab.getBody().getHtml();if(b.gecko)ac=ac.replace(/
(?=\s*(:?$|<\/body>))/,'');if(E.dataProcessor)ac=E.dataProcessor.toDataFormat(ac,F);if(X.ignoreEmptyParagraph)ac=ac.replace(m,function(ad,ae){return ae;});if(aa)ac=aa+'\n'+ac;if(Z)ac=Z+'\n'+ac; +return ac;},getSnapshotData:function(){return N.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(X){N.getFrameDocument().getBody().setHtml(X);},onDispose:function(){if(!E.document)return;E.document.getDocumentElement().clearCustomData();E.document.getBody().clearCustomData();E.window.clearCustomData();E.document.clearCustomData();N.clearCustomData();N.remove();},unload:function(X){this.onDispose();if(S)I.removeListener('resize',S);E.window=E.document=N=M=P=null;E.fire('contentDomUnload');},focus:function(){var X=E.window;if(O)P=true;else if(X){var Y=E.getSelection(),Z=Y&&Y.getNative();if(Z&&Z.type=='Control')return;b.air?setTimeout(function(){X.focus();},0):X.focus();E.selectionChange();}}});E.on('insertHtml',r(s),null,null,20);E.on('insertElement',r(u),null,null,20);E.on('insertText',r(t),null,null,20);E.on('selectionChange',function(X){if(E.readOnly)return;var Y=E.getSelection();if(Y&&!Y.isLocked){var Z=E.checkDirty();E.fire('saveSnapshot',{contentOnly:1});D.call(this,X);E.fire('updateSnapshot');!Z&&E.resetDirty();}},null,null,1);});E.on('contentDom',function(){var M=E.document.getElementsByTag('title').getItem(0);M.data('cke-title',E.document.$.title);c&&(E.document.$.title=G);});E.on('readOnly',function(){if(E.mode=='wysiwyg'){var M=E.getMode();M.loadData(M.getData());}});if(a.document.$.documentMode>=8){E.addCss('html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}');var K=[];for(var L in f.$removeEmpty)K.push('html.CSS1Compat '+L+'[contenteditable=false]');E.addCss(K.join(',')+'{ display:inline-block;}');}else if(b.gecko){E.addCss('html { height: 100% !important; }');E.addCss('img:-moz-broken { -moz-force-broken-image-icon : 1;\tmin-width : 24px; min-height : 24px; }');}E.addCss('html {\t_overflow-y: scroll; cursor: text;\t*cursor:auto;}');E.addCss('img, input, textarea { cursor: default;}');E.on('insertElement',function(M){var N=M.data;if(N.type==1&&(N.is('input')||N.is('textarea'))){var O=N.getAttribute('contenteditable')=='false';if(!O){N.data('cke-editable',N.hasAttribute('contenteditable')?'true':'1');N.setAttribute('contenteditable',false);}}});}});if(b.gecko)(function(){var E=document.body;if(!E)window.addEventListener('load',arguments.callee,false);else{var F=E.getAttribute('onpageshow');E.setAttribute('onpageshow',(F?F+';':'')+'event.persisted && (function(){'+'var allInstances = CKEDITOR.instances, editor, doc;'+'for ( var i in allInstances )'+'{'+'\teditor = allInstances[ i ];'+'\tdoc = editor.document;'+'\tif ( doc )'+'\t{'+'\t\tdoc.$.designMode = "off";'+'\t\tdoc.$.designMode = "on";'+'\t}'+'}'+'})();'); +}})();})();i.disableObjectResizing=false;i.disableNativeTableHandles=true;i.disableNativeSpellChecker=true;i.ignoreEmptyParagraph=true;j.add('wsc',{requires:['dialog'],init:function(m){var n='checkspell',o=m.addCommand(n,new a.dialogCommand(n));o.modes={wysiwyg:!b.opera&&!b.air&&document.domain==window.location.hostname};m.ui.addButton('SpellChecker',{label:m.lang.spellCheck.toolbar,command:n});a.dialog.add(n,this.path+'dialogs/wsc.js');}});i.wsc_customerId=i.wsc_customerId||'1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk';i.wsc_customLoaderScript=i.wsc_customLoaderScript||null;a.DIALOG_RESIZE_NONE=0;a.DIALOG_RESIZE_WIDTH=1;a.DIALOG_RESIZE_HEIGHT=2;a.DIALOG_RESIZE_BOTH=3;(function(){var m=e.cssLength;function n(R){return!!this._.tabs[R][0].$.offsetHeight;};function o(){var V=this;var R=V._.currentTabId,S=V._.tabIdList.length,T=e.indexOf(V._.tabIdList,R)+S;for(var U=T-1;U>T-S;U--){if(n.call(V,V._.tabIdList[U%S]))return V._.tabIdList[U%S];}return null;};function p(){var V=this;var R=V._.currentTabId,S=V._.tabIdList.length,T=e.indexOf(V._.tabIdList,R);for(var U=T+1;U1){ah._.tabBarMode=true; +ah._.tabs[ah._.currentTabId][0].focus();Z=1;}else if((as==37||as==39)&&ah._.tabBarMode){aw=as==(at?39:37)?o.call(ah):p.call(ah);ah.selectPage(aw);ah._.tabs[aw][0].focus();Z=1;}else if((as==13||as==32)&&ah._.tabBarMode){ay.selectPage(ay._.currentTabId);ay._.tabBarMode=false;ay._.currentFocusIndex=-1;ak(1);Z=1;}else if(as==13){var ax=ar.data.getTarget();if(!ax.is('a','button','select','textarea')&&(!ax.is('input')||ax.$.type!='button')){au=ay.getButton('ok');au&&e.setTimeout(au.click,0,au);Z=1;}aa=1;}else if(as==27){au=ay.getButton('cancel');if(au)e.setTimeout(au.click,0,au);else if(ay.fire('cancel',{hide:true}).hide!==false)ay.hide();aa=1;}else return;am(ar);};function am(ar){if(Z)ar.data.preventDefault(1);else if(aa)ar.data.stopPropagation();};var an=this._.element;this.on('show',function(){an.on('keydown',al,this);if(b.opera||b.gecko)an.on('keypress',am,this);});this.on('hide',function(){an.removeListener('keydown',al);if(b.opera||b.gecko)an.removeListener('keypress',am);ai(function(ar){s.apply(ar);});});this.on('iframeAdded',function(ar){var as=new g(ar.data.iframe.$.contentWindow.document);as.on('keydown',al,this,null,0);});this.on('show',function(){var av=this;aj();if(R.config.dialog_startupFocusTab&&ah._.pageCount>1){ah._.tabBarMode=true;ah._.tabs[ah._.currentTabId][0].focus();}else if(!av._.hasFocus){av._.currentFocusIndex=-1;if(T.onFocus){var ar=T.onFocus.call(av);ar&&ar.focus();}else ak(1);if(av._.editor.mode=='wysiwyg'&&c){var as=R.document.$.selection,at=as.createRange();if(at)if(at.parentElement&&at.parentElement().ownerDocument==R.document.$||at.item&&at.item(0).ownerDocument==R.document.$){var au=document.body.createTextRange();au.moveToElementText(av.getElement().getFirst().$);au.collapse(true);au.select();}}}},this,null,4294967295);if(b.ie6Compat)this.on('load',function(ar){var as=this.getElement(),at=as.getFirst();at.remove();at.appendTo(as);},this);B(this);C(this);new d.text(T.title,a.document).appendTo(this.parts.title);for(Y=0;Y0?S:0)+'px'};aa[V?'right':'left']=(R>0?R:0)+'px';U.setStyles(aa);T&&(ab._.moved=1);},getPosition:function(){return e.extend({},this._.position);},show:function(){var R=this._.element,S=this.definition;if(!(R.getParent()&&R.getParent().equals(a.document.getBody())))R.appendTo(a.document.getBody());else R.setStyle('display','block');if(b.gecko&&b.version<10900){var T=this.parts.dialog;T.setStyle('position','absolute');setTimeout(function(){T.setStyle('position','fixed');},0);}this.resize(this._.contentSize&&this._.contentSize.width||S.width||S.minWidth,this._.contentSize&&this._.contentSize.height||S.height||S.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);if(a.dialog._.currentZIndex===null)a.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex; +this._.element.getFirst().setStyle('z-index',a.dialog._.currentZIndex+=10);if(a.dialog._.currentTop===null){a.dialog._.currentTop=this;this._.parentDialog=null;H(this._.editor);}else{this._.parentDialog=a.dialog._.currentTop;var U=this._.parentDialog.getElement().getFirst();U.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);a.dialog._.currentTop=this;}R.on('keydown',L);R.on(b.opera?'keypress':'keyup',M);this._.hasFocus=false;e.setTimeout(function(){this.layout();u(this);this.parts.dialog.setStyle('visibility','');this.fireOnce('load',{});k.fire('ready',this);this.fire('show',{});this._.editor.fire('dialogShow',this);this.foreach(function(V){V.setInitValue&&V.setInitValue();});},100,this);},layout:function(){var X=this;var R=X.parts.dialog,S=X.getSize(),T=a.document.getWindow(),U=T.getViewPaneSize(),V=(U.width-S.width)/2,W=(U.height-S.height)/2;if(!b.ie6Compat)if(S.height+(W>0?W:0)>U.height||S.width+(V>0?V:0)>U.width)R.setStyle('position','absolute');else R.setStyle('position','fixed');X.move(X._.moved?X._.position.x:V,X._.moved?X._.position.y:W);},foreach:function(R){var U=this;for(var S in U._.contents)for(var T in U._.contents[S])R.call(U,U._.contents[S][T]);return U;},reset:(function(){var R=function(S){if(S.reset)S.reset(1);};return function(){this.foreach(R);return this;};})(),setupContent:function(){var R=arguments;this.foreach(function(S){if(S.setup)S.setup.apply(S,R);});},commitContent:function(){var R=arguments;this.foreach(function(S){if(c&&this._.currentFocusIndex==S.focusIndex)S.getInputElement().$.blur();if(S.commit)S.commit.apply(S,R);});},hide:function(){if(!this.parts.dialog.isVisible())return;this.fire('hide',{});this._.editor.fire('dialogHide',this);this.selectPage(this._.tabIdList[0]);var R=this._.element;R.setStyle('display','none');this.parts.dialog.setStyle('visibility','hidden');O(this);while(a.dialog._.currentTop!=this)a.dialog._.currentTop.hide();if(!this._.parentDialog)I();else{var S=this._.parentDialog.getElement().getFirst();S.setStyle('z-index',parseInt(S.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2));}a.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){a.dialog._.currentZIndex=null;R.removeListener('keydown',L);R.removeListener(b.opera?'keypress':'keyup',M);var T=this._.editor;T.focus();if(T.mode=='wysiwyg'&&c){var U=T.getSelection();U&&U.unlock(true);}}else a.dialog._.currentZIndex-=10;delete this._.parentDialog;this.foreach(function(V){V.resetInitValue&&V.resetInitValue(); +});},addPage:function(R){var ad=this;var S=[],T=R.label?' title="'+e.htmlEncode(R.label)+'"':'',U=R.elements,V=a.dialog._.uiElementBuilders.vbox.build(ad,{type:'vbox',className:'cke_dialog_page_contents',children:R.elements,expand:!!R.expand,padding:R.padding,style:R.style||'width: 100%;height:100%'},S),W=h.createFromHtml(S.join(''));W.setAttribute('role','tabpanel');var X=b,Y='cke_'+R.id+'_'+e.getNextNumber(),Z=h.createFromHtml(['0?' cke_last':'cke_first',T,!!R.hidden?' style="display:none"':'',' id="',Y,'"',X.gecko&&X.version>=10900&&!X.hc?'':' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',R.label,''].join(''));W.setAttribute('aria-labelledby',Y);ad._.tabs[R.id]=[Z,W];ad._.tabIdList.push(R.id);!R.hidden&&ad._.pageCount++;ad._.lastTab=Z;ad.updateStyle();var aa=ad._.contents[R.id]={},ab,ac=V.getChild();while(ab=ac.shift()){aa[ab.id]=ab;if(typeof ab.getChild=='function')ac.push.apply(ac,ab.getChild());}W.setAttribute('name',R.id);W.appendTo(ad.parts.contents);Z.unselectable();ad.parts.tabs.append(Z);if(R.accessKey){N(ad,ad,'CTRL+'+R.accessKey,Q,P);ad._.accessKeyMap['CTRL+'+R.accessKey]=R.id;}},selectPage:function(R){if(this._.currentTabId==R)return;if(this.fire('selectPage',{page:R,currentPage:this._.currentTabId})===true)return;for(var S in this._.tabs){var T=this._.tabs[S][0],U=this._.tabs[S][1];if(S!=R){T.removeClass('cke_dialog_tab_selected');U.hide();}U.setAttribute('aria-hidden',S!=R);}var V=this._.tabs[R];V[0].addClass('cke_dialog_tab_selected');if(b.ie6Compat||b.ie7Compat){q(V[1]);V[1].show();setTimeout(function(){q(V[1],1);},0);}else V[1].show();this._.currentTabId=R;this._.currentTabIndex=e.indexOf(this._.tabIdList,R);},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?'add':'remove')+'Class']('cke_single_page');},hidePage:function(R){var T=this;var S=T._.tabs[R]&&T._.tabs[R][0];if(!S||T._.pageCount==1||!S.isVisible())return;else if(R==T._.currentTabId)T.selectPage(o.call(T));S.hide();T._.pageCount--;T.updateStyle();},showPage:function(R){var T=this;var S=T._.tabs[R]&&T._.tabs[R][0];if(!S)return;S.show();T._.pageCount++;T.updateStyle();},getElement:function(){return this._.element;},getName:function(){return this._.name;},getContentElement:function(R,S){var T=this._.contents[R];return T&&T[S];},getValueOf:function(R,S){return this.getContentElement(R,S).getValue();},setValueOf:function(R,S,T){return this.getContentElement(R,S).setValue(T);},getButton:function(R){return this._.buttons[R]; +},click:function(R){return this._.buttons[R].click();},disableButton:function(R){return this._.buttons[R].disable();},enableButton:function(R){return this._.buttons[R].enable();},getPageCount:function(){return this._.pageCount;},getParentEditor:function(){return this._.editor;},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement();},addFocusable:function(R,S){var U=this;if(typeof S=='undefined'){S=U._.focusList.length;U._.focusList.push(new t(U,R,S));}else{U._.focusList.splice(S,0,new t(U,R,S));for(var T=S+1;Tac.width-ab.width-W)ah=ac.width-ab.width+(V.lang.dir=='rtl'?0:X[1]);else ah=T.x;if(T.y+X[0]ac.height-ab.height-W)ai=ac.height-ab.height+X[2];else ai=T.y;R.move(ah,ai,1);aa.data.preventDefault();};function Z(aa){a.document.removeListener('mousemove',Y);a.document.removeListener('mouseup',Z);if(b.ie6Compat){var ab=F.getChild(0).getFrameDocument();ab.removeListener('mousemove',Y);ab.removeListener('mouseup',Z);}};R.parts.title.on('mousedown',function(aa){S={x:aa.data.$.screenX,y:aa.data.$.screenY};a.document.on('mousemove',Y);a.document.on('mouseup',Z);T=R.getPosition();if(b.ie6Compat){var ab=F.getChild(0).getFrameDocument();ab.on('mousemove',Y);ab.on('mouseup',Z);}aa.data.preventDefault();},R);};function C(R){var S=R.definition,T=S.resizable;if(T==0)return;var U=R.getParentEditor(),V,W,X,Y,Z,aa,ab=e.addFunction(function(ae){Z=R.getSize();var af=R.parts.contents,ag=af.$.getElementsByTagName('iframe').length;if(ag){aa=h.createFromHtml('

');af.append(aa);}W=Z.height-R.parts.contents.getSize('height',!(b.gecko||b.opera||c&&b.quirks));V=Z.width-R.parts.contents.getSize('width',1);Y={x:ae.screenX,y:ae.screenY};X=a.document.getWindow().getViewPaneSize();a.document.on('mousemove',ac);a.document.on('mouseup',ad);if(b.ie6Compat){var ah=F.getChild(0).getFrameDocument();ah.on('mousemove',ac);ah.on('mouseup',ad);}ae.preventDefault&&ae.preventDefault();});R.on('load',function(){var ae='';if(T==1)ae=' cke_resizer_horizontal';else if(T==2)ae=' cke_resizer_vertical';var af=h.createFromHtml('
'); +R.parts.footer.append(af,1);});U.on('destroy',function(){e.removeFunction(ab);});function ac(ae){var af=U.lang.dir=='rtl',ag=(ae.data.$.screenX-Y.x)*(af?-1:1),ah=ae.data.$.screenY-Y.y,ai=Z.width,aj=Z.height,ak=ai+ag*(R._.moved?1:2),al=aj+ah*(R._.moved?1:2),am=R._.element.getFirst(),an=af&&am.getComputedStyle('right'),ao=R.getPosition();if(ao.y+al>X.height)al=X.height-ao.y;if((af?an:ao.x)+ak>X.width)ak=X.width-(af?an:ao.x);if(T==1||T==3)ai=Math.max(S.minWidth||0,ak-V);if(T==2||T==3)aj=Math.max(S.minHeight||0,al-W);R.resize(ai,aj);if(!R._.moved)R.layout();ae.data.preventDefault();};function ad(){a.document.removeListener('mouseup',ad);a.document.removeListener('mousemove',ac);if(aa){aa.remove();aa=null;}if(b.ie6Compat){var ae=F.getChild(0).getFrameDocument();ae.removeListener('mouseup',ad);ae.removeListener('mousemove',ac);}};};var D,E={},F;function G(R){R.data.preventDefault(1);};function H(R){var S=a.document.getWindow(),T=R.config,U=T.dialog_backgroundCoverColor||'white',V=T.dialog_backgroundCoverOpacity,W=T.baseFloatZIndex,X=e.genKey(U,V,W),Y=E[X];if(!Y){var Z=['
'];if(b.ie6Compat){var aa=b.isCustomDomain(),ab="";Z.push('');}Z.push('
');Y=h.createFromHtml(Z.join(''));Y.setOpacity(V!=undefined?V:0.5);Y.on('keydown',G);Y.on('keypress',G);Y.on('keyup',G);Y.appendTo(a.document.getBody());E[X]=Y;}else Y.show();F=Y;var ac=function(){var af=S.getViewPaneSize();Y.setStyles({width:af.width+'px',height:af.height+'px'});},ad=function(){var af=S.getScrollPosition(),ag=a.dialog._.currentTop;Y.setStyles({left:af.x+'px',top:af.y+'px'});if(ag)do{var ah=ag.getPosition();ag.move(ah.x,ah.y);}while(ag=ag._.parentDialog)};D=ac;S.on('resize',ac);ac();if(!(b.mac&&b.webkit))Y.focus();if(b.ie6Compat){var ae=function(){ad();arguments.callee.prevScrollHandler.apply(this,arguments);};S.$.setTimeout(function(){ae.prevScrollHandler=window.onscroll||(function(){}); +window.onscroll=ae;},0);ad();}};function I(){if(!F)return;var R=a.document.getWindow();F.hide();R.removeListener('resize',D);if(b.ie6Compat)R.$.setTimeout(function(){var S=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=S||null;},0);D=null;};function J(){for(var R in E)E[R].remove();E={};};var K={},L=function(R){var S=R.data.$.ctrlKey||R.data.$.metaKey,T=R.data.$.altKey,U=R.data.$.shiftKey,V=String.fromCharCode(R.data.$.keyCode),W=K[(S?'CTRL+':'')+(T?'ALT+':'')+(U?'SHIFT+':'')+V];if(!W||!W.length)return;W=W[W.length-1];W.keydown&&W.keydown.call(W.uiElement,W.dialog,W.key);R.data.preventDefault();},M=function(R){var S=R.data.$.ctrlKey||R.data.$.metaKey,T=R.data.$.altKey,U=R.data.$.shiftKey,V=String.fromCharCode(R.data.$.keyCode),W=K[(S?'CTRL+':'')+(T?'ALT+':'')+(U?'SHIFT+':'')+V];if(!W||!W.length)return;W=W[W.length-1];if(W.keyup){W.keyup.call(W.uiElement,W.dialog,W.key);R.data.preventDefault();}},N=function(R,S,T,U,V){var W=K[T]||(K[T]=[]);W.push({uiElement:R,dialog:S,key:T,keyup:V||R.accessKeyUp,keydown:U||R.accessKeyDown});},O=function(R){for(var S in K){var T=K[S];for(var U=T.length-1;U>=0;U--){if(T[U].dialog==R||T[U].uiElement==R)T.splice(U,1);}if(T.length===0)delete K[S];}},P=function(R,S){if(R._.accessKeyMap[S])R.selectPage(R._.accessKeyMap[S]);},Q=function(R,S){};(function(){k.dialog={uiElement:function(R,S,T,U,V,W,X){if(arguments.length<4)return;var Y=(U.call?U(S):U)||'div',Z=['<',Y,' '],aa=(V&&V.call?V(S):V)||{},ab=(W&&W.call?W(S):W)||{},ac=(X&&X.call?X.call(this,R,S):X)||'',ad=this.domId=ab.id||e.getNextId()+'_uiElement',ae=this.id=S.id,af;ab.id=ad;var ag={};if(S.type)ag['cke_dialog_ui_'+S.type]=1;if(S.className)ag[S.className]=1;if(S.disabled)ag.cke_disabled=1;var ah=ab['class']&&ab['class'].split?ab['class'].split(' '):[];for(af=0;af=0;af--){if(aj[af]==='')aj.splice(af,1);}if(aj.length>0)ab.style=(ab.style?ab.style+'; ':'')+aj.join('; ');for(af in ab)Z.push(af+'="'+e.htmlEncode(ab[af])+'" ');Z.push('>',ac,'');T.push(Z.join(''));(this._||(this._={})).dialog=R;if(typeof S.isChanged=='boolean')this.isChanged=function(){return S.isChanged;};if(typeof S.isChanged=='function')this.isChanged=S.isChanged; +if(typeof S.setValue=='function')this.setValue=e.override(this.setValue,function(am){return function(an){am.call(this,S.setValue.call(this,an));};});if(typeof S.getValue=='function')this.getValue=e.override(this.getValue,function(am){return function(){return S.getValue.call(this,am.call(this));};});a.event.implementOn(this);this.registerEvents(S);if(this.accessKeyUp&&this.accessKeyDown&&S.accessKey)N(this,R,'CTRL+'+S.accessKey);var al=this;R.on('load',function(){var am=al.getInputElement();if(am){var an=al.type in {checkbox:1,ratio:1}&&c&&b.version<8?'cke_dialog_ui_focused':'';am.on('focus',function(){R._.tabBarMode=false;R._.hasFocus=true;al.fire('focus');an&&this.addClass(an);});am.on('blur',function(){al.fire('blur');an&&this.removeClass(an);});}});if(this.keyboardFocusable){this.tabIndex=S.tabIndex||0;this.focusIndex=R._.focusList.push(this)-1;this.on('focus',function(){R._.currentFocusIndex=al.focusIndex;});}e.extend(this,S);},hbox:function(R,S,T,U,V){if(arguments.length<4)return;this._||(this._={});var W=this._.children=S,X=V&&V.widths||null,Y=V&&V.height||null,Z={},aa,ab=function(){var ad=[''];for(aa=0;aa0)ad.push('style="'+af.join('; ')+'" ');ad.push('>',T[aa],'');}ad.push('');return ad.join('');},ac={role:'presentation'};V&&V.align&&(ac.align=V.align);k.dialog.uiElement.call(this,R,V||{type:'hbox'},U,'table',Z,ac,ab);},vbox:function(R,S,T,U,V){if(arguments.length<3)return;this._||(this._={});var W=this._.children=S,X=V&&V.width||null,Y=V&&V.heights||null,Z=function(){var aa=['');for(var ab=0;ab');}aa.push('
0)aa.push('style="',ac.join('; '),'" ');aa.push(' class="cke_dialog_ui_vbox_child">',T[ab],'
');return aa.join('');};k.dialog.uiElement.call(this,R,V||{type:'vbox'},U,'div',null,{role:'presentation'},Z);}};})();k.dialog.uiElement.prototype={getElement:function(){return a.document.getById(this.domId);},getInputElement:function(){return this.getElement();},getDialog:function(){return this._.dialog;},setValue:function(R,S){this.getInputElement().setValue(R);!S&&this.fire('change',{value:R});return this;},getValue:function(){return this.getInputElement().getValue();},isChanged:function(){return false;},selectParentTab:function(){var U=this;var R=U.getInputElement(),S=R,T;while((S=S.getParent())&&S.$.className.search('cke_dialog_page_contents')==-1){}if(!S)return U;T=S.getAttribute('name');if(U._.dialog._.currentTabId!=T)U._.dialog.selectPage(T);return U;},focus:function(){this.selectParentTab().getInputElement().focus();return this;},registerEvents:function(R){var S=/^on([A-Z]\w+)/,T,U=function(W,X,Y,Z){X.on('load',function(){W.getInputElement().on(Y,Z,W);});};for(var V in R){if(!(T=V.match(S)))continue;if(this.eventProcessors[V])this.eventProcessors[V].call(this,this._.dialog,R[V]);else U(this,this._.dialog,T[1].toLowerCase(),R[V]);}return this;},eventProcessors:{onLoad:function(R,S){R.on('load',S,this);},onShow:function(R,S){R.on('show',S,this);},onHide:function(R,S){R.on('hide',S,this);}},accessKeyDown:function(R,S){this.focus();},accessKeyUp:function(R,S){},disable:function(){var R=this.getElement(),S=this.getInputElement();S.setAttribute('disabled','true');R.addClass('cke_disabled');},enable:function(){var R=this.getElement(),S=this.getInputElement();S.removeAttribute('disabled');R.removeClass('cke_disabled');},isEnabled:function(){return!this.getElement().hasClass('cke_disabled');},isVisible:function(){return this.getInputElement().isVisible();},isFocusable:function(){if(!this.isEnabled()||!this.isVisible())return false;return true;}};k.dialog.hbox.prototype=e.extend(new k.dialog.uiElement(),{getChild:function(R){var S=this;if(arguments.length<1)return S._.children.concat();if(!R.splice)R=[R];if(R.length<2)return S._.children[R[0]];else return S._.children[R[0]]&&S._.children[R[0]].getChild?S._.children[R[0]].getChild(R.slice(1,R.length)):null;}},true);k.dialog.vbox.prototype=new k.dialog.hbox(); +(function(){var R={build:function(S,T,U){var V=T.children,W,X=[],Y=[];for(var Z=0;Z',T||U.name,'');return V.join('');}};a.style.getStyleText=function(T){var U=T._ST;if(U)return U;U=T.styles;var V=T.attributes&&T.attributes.style||'',W='';if(V.length)V=V.replace(o,';');for(var X in U){var Y=U[X],Z=(X+':'+Y).replace(o,';');if(Y=='inherit')W+=Z;else V+=Z;}if(V.length)V=P(V);V+=W;return T._ST=V;};function s(T){var U,V;while(T=T.getParent()){if(T.getName()=='body')break;if(T.getAttribute('data-nostyle'))U=T;else if(!V){var W=T.getAttribute('contentEditable');if(W=='false')U=T;else if(W=='true')V=1;}}return U;};function t(T){var ay=this;var U=T.document;if(T.collapsed){var V=J(ay,U);T.insertNode(V);T.moveToPosition(V,2);return;}var W=ay.element,X=ay._.definition,Y,Z=X.ignoreReadonly,aa=Z||X.includeReadonly;if(aa==undefined)aa=U.getCustomData('cke_includeReadonly');var ab=f[W]||(Y=true,f.span);T.enlarge(1,1);T.trim();var ac=T.createBookmark(),ad=ac.startNode,ae=ac.endNode,af=ad,ag;if(!Z){var ah=s(ad),ai=s(ae);if(ah)af=ah.getNextSourceNode(true);if(ai)ae=ai;}if(af.getPosition(ae)==2)af=0;while(af){var aj=false;if(af.equals(ae)){af=null;aj=true;}else{var ak=af.type,al=ak==1?af.getName():null,am=al&&af.getAttribute('contentEditable')=='false',an=al&&af.getAttribute('data-nostyle');if(al&&af.data('cke-bookmark')){af=af.getNextSourceNode(true);continue;}if(!al||ab[al]&&!an&&(!am||aa)&&(af.getPosition(ae)|4|0|8)==4+0+8&&(!X.childRule||X.childRule(af))){var ao=af.getParent(); +if(ao&&((ao.getDtd()||f.span)[W]||Y)&&(!X.parentRule||X.parentRule(ao))){if(!ag&&(!al||!f.$removeEmpty[al]||(af.getPosition(ae)|4|0|8)==4+0+8)){ag=new d.range(U);ag.setStartBefore(af);}if(ak==3||am||ak==1&&!af.getChildCount()){var ap=af,aq;while((aj=!ap.getNext(q))&&(aq=ap.getParent(),ab[aq.getName()])&&(aq.getPosition(ad)|2|0|8)==2+0+8&&(!X.childRule||X.childRule(aq)))ap=aq;ag.setEndAfter(ap);}}else aj=true;}else aj=true;af=af.getNextSourceNode(an||am);}if(aj&&ag&&!ag.collapsed){var ar=J(ay,U),as=ar.hasAttributes(),at=ag.getCommonAncestor(),au={styles:{},attrs:{},blockedStyles:{},blockedAttrs:{}},av,aw,ax;while(ar&&at){if(at.getName()==W){for(av in X.attributes){if(au.blockedAttrs[av]||!(ax=at.getAttribute(aw)))continue;if(ar.getAttribute(av)==ax)au.attrs[av]=1;else au.blockedAttrs[av]=1;}for(aw in X.styles){if(au.blockedStyles[aw]||!(ax=at.getStyle(aw)))continue;if(ar.getStyle(aw)==ax)au.styles[aw]=1;else au.blockedStyles[aw]=1;}}at=at.getParent();}for(av in au.attrs)ar.removeAttribute(av);for(aw in au.styles)ar.removeStyle(aw);if(as&&!ar.hasAttributes())ar=null;if(ar){ag.extractContents().appendTo(ar);G(ay,ar);ag.insertNode(ar);ar.mergeSiblings();if(!c)ar.$.normalize();}else{ar=new h('span');ag.extractContents().appendTo(ar);ag.insertNode(ar);G(ay,ar);ar.remove(true);}ag=null;}}T.moveToBookmark(ac);T.shrink(2);};function u(T){T.enlarge(1,1);var U=T.createBookmark(),V=U.startNode;if(T.collapsed){var W=new d.elementPath(V.getParent()),X;for(var Y=0,Z;Y'+V+'';else T.setHtml(V);U.remove();};function B(T){var U=/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,V=T.getName(),W=C(T.getOuterHtml(),U,function(Y,Z,aa){return Z+''+aa+'
';}),X=[];W.replace(/([\s\S]*?)<\/pre>/gi,function(Y,Z){X.push(Z);});return X;};function C(T,U,V){var W='',X='';T=T.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(Y,Z,aa){Z&&(W=Z);aa&&(X=aa);return '';});return W+T.replace(U,V)+X;};function D(T,U){var V;if(T.length>1)V=new d.documentFragment(U.getDocument());for(var W=0;W');X=X.replace(/[ \t]{2,}/g,function(Z){return e.repeat(' ',Z.length-1)+' ';});if(V){var Y=U.clone();Y.setHtml(X);V.append(Y);}else U.setHtml(X);}return V||U;};function E(T,U){var V=T.getBogus();V&&V.remove();var W=T.getHtml();W=C(W,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');W=W.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');W=W.replace(/([ \t\n\r]+| )/g,' ');W=W.replace(/]*>/gi,'\n');if(c){var X=T.getDocument().createElement('div');X.append(U);U.$.outerHTML='
'+W+'
';U.copyAttributes(X.getFirst());U=X.getFirst().remove();}else U.setHtml(W);return U;};function F(T,U){var V=T._.definition,W=V.attributes,X=V.styles,Y=N(T)[U.getName()],Z=e.isEmpty(W)&&e.isEmpty(X);for(var aa in W){if((aa=='class'||T._.definition.fullMatch)&&U.getAttribute(aa)!=O(aa,W[aa]))continue;Z=U.hasAttribute(aa);U.removeAttribute(aa);}for(var ab in X){if(T._.definition.fullMatch&&U.getStyle(ab)!=O(ab,X[ab],true))continue;Z=Z||!!U.getStyle(ab);U.removeStyle(ab);}H(U,Y,m[U.getName()]);if(Z)!f.$block[U.getName()]||T._.enterMode==2&&!U.hasAttributes()?I(U):U.renameNode(T._.enterMode==1?'p':'div');};function G(T,U){var V=T._.definition,W=V.attributes,X=V.styles,Y=N(T),Z=U.getElementsByTag(T.element);for(var aa=Z.count();--aa>=0;)F(T,Z.getItem(aa));for(var ab in Y){if(ab!=T.element){Z=U.getElementsByTag(ab);for(aa=Z.count()-1;aa>=0;aa--){var ac=Z.getItem(aa);H(ac,Y[ab]);}}}};function H(T,U,V){var W=U&&U.attributes;if(W)for(var X=0;X0)H+=(F.$.offsetWidth||0)-(F.$.clientWidth||0)+3;H+=4;F.setStyle('width',H+'px');v.element.addClass('cke_frameLoaded');var I=v.element.$.scrollHeight;if(c&&b.quirks&&I>0)I+=(F.$.offsetHeight||0)-(F.$.clientHeight||0)+3;F.setStyle('height',I+'px');u._.currentBlock.element.setStyle('display','none').removeStyle('display');}else F.removeStyle('height');if(A)B-=w.$.offsetWidth;w.setStyle('left',B+'px');var J=u.element,K=J.getWindow(),L=w.$.getBoundingClientRect(),M=K.getViewPaneSize(),N=L.width||L.right-L.left,O=L.height||L.bottom-L.top,P=A?L.right:M.width-L.left,Q=A?M.width-L.right:L.left;if(A){if(PN)B+=N;else if(M.width>N)B-=L.left;else B=B-L.right+M.width;}else if(PN)B-=N;else if(M.width>N)B=B-L.right+M.width;else B-=L.left;var R=M.height-L.top,S=L.top; +if(RO)C-=O;else if(M.height>O)C=C-L.bottom+M.height;else C-=L.top;if(c){var T=new h(w.$.offsetParent),U=T;if(U.getName()=='html')U=U.getDocument().getBody();if(U.getComputedStyle('direction')=='rtl')if(b.ie8Compat)B-=w.getDocument().getDocumentElement().$.scrollLeft*2;else B-=T.$.scrollWidth-T.$.clientWidth;}var V=w.getFirst(),W;if(W=V.getCustomData('activePanel'))W.onHide&&W.onHide.call(this,1);V.setCustomData('activePanel',this);w.setStyles({top:C+'px',left:B+'px'});w.setOpacity(1);},this);u.isLoaded?E():u.onLoad=E;e.setTimeout(function(){x.$.contentWindow.focus();this.allowBlur(true);},0,this);},b.air?200:0,this);this.visible=1;if(this.onShow)this.onShow.call(this);n=0;},hide:function(p){var r=this;if(r.visible&&(!r.onHide||r.onHide.call(r)!==true)){r.hideChild();b.gecko&&r._.iframe.getFrameDocument().$.activeElement.blur();r.element.setStyle('display','none');r.visible=0;r.element.getFirst().removeCustomData('activePanel');var q=p!==false&&r._.returnFocus;if(q){if(b.webkit&&q.type)q.getWindow().$.focus();q.focus();}}},allowBlur:function(p){var q=this._.panel;if(p!=undefined)q.allowBlur=p;return q.allowBlur;},showAsChild:function(p,q,r,s,t,u){if(this._.activeChild==p&&p._.panel._.offsetParentId==r.getId())return;this.hideChild();p.onHide=e.bind(function(){e.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=p;this._.focused=false;p.showBlock(q,r,s,t,u);if(b.ie7Compat||b.ie8&&b.ie6Compat)setTimeout(function(){p.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var p=this._.activeChild;if(p){delete p.onHide;delete p._.returnFocus;delete this._.activeChild;p.hide();}}}});a.on('instanceDestroyed',function(){var p=e.isEmpty(a.instances);for(var q in m){var r=m[q];if(p)r.destroy();else r.element.hide();}p&&(m={});});})();j.add('menu',{beforeInit:function(m){var n=m.config.menu_groups.split(','),o=m._.menuGroups={},p=m._.menuItems={};for(var q=0;q'],B=r.length,C=B&&r[0].group;for(var D=0;D');C=E.group;}E.render(this,D,A);}A.push('');u.setHtml(A.join(''));k.fire('ready',this);if(this.parent)this.parent._.panel.showAsChild(t,this.id,n,o,p,q);else t.showBlock(this.id,n,o,p,q);s.fire('menuShow',[t]);},addListener:function(n){this._.listeners.push(n);},hide:function(n){var o=this;o._.onHide&&o._.onHide();o._.panel&&o._.panel.hide(n);}}});function m(n){n.sort(function(o,p){if(o.groupp.group)return 1;return o.orderp.order?1:0;});};a.menuItem=e.createClass({$:function(n,o,p){var q=this;e.extend(q,p,{order:0,className:'cke_button_'+o});q.group=n._.menuGroups[q.group];q.editor=n;q.name=o;},proto:{render:function(n,o,p){var w=this;var q=n.id+String(o),r=typeof w.state=='undefined'?2:w.state,s=' cke_'+(r==1?'on':r==0?'disabled':'off'),t=w.label;if(w.className)s+=' '+w.className;var u=w.getItems;p.push(''+''+'');if(u)p.push('','&#',w.editor.lang.dir=='rtl'?'9668':'9658',';',''); +p.push(t,'');}}});})();i.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';(function(){var m;j.add('editingblock',{init:function(n){if(!n.config.editingBlock)return;n.on('themeSpace',function(o){if(o.data.space=='contents')o.data.html+='
';});n.on('themeLoaded',function(){n.fireOnce('editingBlockReady');});n.on('uiReady',function(){n.setMode(n.config.startupMode);});n.on('afterSetData',function(){if(!m){function o(){m=true;n.getMode().loadData(n.getData());m=false;};if(n.mode)o();else n.on('mode',function(){if(n.mode){o();n.removeListener('mode',arguments.callee);}});}});n.on('beforeGetData',function(){if(!m&&n.mode){m=true;n.setData(n.getMode().getData(),null,1);m=false;}});n.on('getSnapshot',function(o){if(n.mode)o.data=n.getMode().getSnapshotData();});n.on('loadSnapshot',function(o){if(n.mode)n.getMode().loadSnapshotData(o.data);});n.on('mode',function(o){o.removeListener();b.webkit&&n.container.on('focus',function(){n.focus();});if(n.config.startupFocus)n.focus();setTimeout(function(){n.fireOnce('instanceReady');a.fire('instanceReady',null,n);},0);});n.on('destroy',function(){var o=this;if(o.mode)o._.modes[o.mode].unload(o.getThemeSpace('contents'));});}});a.editor.prototype.mode='';a.editor.prototype.addMode=function(n,o){o.name=n;(this._.modes||(this._.modes={}))[n]=o;};a.editor.prototype.setMode=function(n){this.fire('beforeSetMode',{newMode:n});var o,p=this.getThemeSpace('contents'),q=this.checkDirty();if(this.mode){if(n==this.mode)return;this._.previousMode=this.mode;this.fire('beforeModeUnload');var r=this.getMode();o=r.getData();r.unload(p);this.mode='';}p.setHtml('');var s=this.getMode(n);if(!s)throw '[CKEDITOR.editor.setMode] Unknown mode "'+n+'".';if(!q)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});s.load(p,typeof o!='string'?this.getData():o);};a.editor.prototype.getMode=function(n){return this._.modes&&this._.modes[n||this.mode];};a.editor.prototype.focus=function(){this.forceNextSelectionCheck();var n=this.getMode();if(n)n.focus();};})();i.startupMode='wysiwyg';i.editingBlock=true;(function(){function m(){var G=this;try{var D=G.getSelection();if(!D||!D.document.getWindow().$)return;var E=D.getStartElement(),F=new d.elementPath(E);if(!F.compare(G._.selectionPreviousPath)){G._.selectionPreviousPath=F;G.fire('selectionChange',{selection:D,path:F,element:E}); +}}catch(H){}};var n,o;function p(){o=true;if(n)return;q.call(this);n=e.setTimeout(q,200,this);};function q(){n=null;if(o){e.setTimeout(m,0,this);o=false;}};function r(D){function E(I,J){if(!I||I.type==3)return false;var K=D.clone();return K['moveToElementEdit'+(J?'End':'Start')](I);};var F=D.startContainer,G=D.getPreviousNode(A,null,F),H=D.getNextNode(A,null,F);if(E(G)||E(H,1))return true;if(!(G||H)&&!(F.type==1&&F.isBlockBoundary()&&F.getBogus()))return true;return false;};var s={modes:{wysiwyg:1,source:1},readOnly:c||b.webkit,exec:function(D){switch(D.mode){case 'wysiwyg':D.document.$.execCommand('SelectAll',false,null);D.forceNextSelectionCheck();D.selectionChange();break;case 'source':var E=D.textarea.$;if(c)E.createTextRange().execCommand('SelectAll');else{E.selectionStart=0;E.selectionEnd=E.value.length;}E.focus();}},canUndo:false};function t(D){w(D);var E=D.createText('​');D.setCustomData('cke-fillingChar',E);return E;};function u(D){return D&&D.getCustomData('cke-fillingChar');};function v(D){var E=D&&u(D);if(E)if(E.getCustomData('ready'))w(D);else E.setCustomData('ready',1);};function w(D){var E=D&&D.removeCustomData('cke-fillingChar');if(E){var F,G=D.getSelection().getNative(),H=G&&G.type!='None'&&G.getRangeAt(0);if(E.getLength()>1&&H&&H.intersectsNode(E.$)){F=[G.anchorOffset,G.focusOffset];var I=G.anchorNode==E.$&&G.anchorOffset>0,J=G.focusNode==E.$&&G.focusOffset>0;I&&F[0]--;J&&F[1]--;x(G)&&F.unshift(F.pop());}E.setText(E.getText().replace(/\u200B/g,''));if(F){var K=G.getRangeAt(0);K.setStart(K.startContainer,F[0]);K.setEnd(K.startContainer,F[1]);G.removeAllRanges();G.addRange(K);}}};function x(D){if(!D.isCollapsed){var E=D.getRangeAt(0);E.setStart(D.anchorNode,D.anchorOffset);E.setEnd(D.focusNode,D.focusOffset);return E.collapsed;}};j.add('selection',{init:function(D){if(b.webkit){D.on('selectionChange',function(){v(D.document);});D.on('beforeSetMode',function(){w(D.document);});var E,F;function G(){var I=D.document,J=u(I);if(J){var K=I.$.defaultView.getSelection();if(K.type=='Caret'&&K.anchorNode==J.$)F=1;E=J.getText();J.setText(E.replace(/\u200B/g,''));}};function H(){var I=D.document,J=u(I);if(J){J.setText(E);if(F){I.$.defaultView.getSelection().setPosition(J.$,J.getLength());F=0;}}};D.on('beforeUndoImage',G);D.on('afterUndoImage',H);D.on('beforeGetData',G,null,null,0);D.on('getData',H);}D.on('contentDom',function(){var I=D.document,J=a.document,K=I.getBody(),L=I.getDocumentElement();if(c){var M,N,O=1;K.on('focusin',function(V){if(V.data.$.srcElement.nodeName!='BODY')return; +var W=I.getCustomData('cke_locked_selection');if(W){W.unlock(1);W.lock();}else if(M&&O){try{M.select();}catch(X){}M=null;}});K.on('focus',function(){N=1;U();});K.on('beforedeactivate',function(V){if(V.data.$.toElement)return;N=0;O=1;});c&&D.on('blur',function(){try{I.$.selection.empty();}catch(V){}});L.on('mousedown',function(){O=0;});L.on('mouseup',function(){O=1;});var P;K.on('mousedown',function(V){if(V.data.$.button==2){var W=D.document.$.selection;if(W.type=='None')P=D.window.getScrollPosition();}T();});K.on('mouseup',function(V){if(V.data.$.button==2&&P){D.document.$.documentElement.scrollLeft=P.x;D.document.$.documentElement.scrollTop=P.y;}P=null;N=1;setTimeout(function(){U(true);},0);});K.on('keydown',T);K.on('keyup',function(){N=1;U();});if(I.$.compatMode!='BackCompat'){if(b.ie7Compat||b.ie6Compat){function Q(V,W,X){try{V.moveToPoint(W,X);}catch(Y){}};L.on('mousedown',function(V){function W(ab){ab=ab.data.$;if(Z){var ac=K.$.createTextRange();Q(ac,ab.x,ab.y);Z.setEndPoint(aa.compareEndPoints('StartToStart',ac)<0?'EndToEnd':'StartToStart',ac);Z.select();}};function X(){J.removeListener('mouseup',Y);L.removeListener('mouseup',Y);};function Y(){L.removeListener('mousemove',W);X();Z.select();};V=V.data;if(V.getTarget().is('html')&&V.$.x0)P=Q-1;else if(R<0)O=Q+1;else if(b.ie9Compat&&L.tagName=='BR'){var U=J.defaultView.getSelection();return{container:U[H?'anchorNode':'focusNode'],offset:U[H?'anchorOffset':'focusOffset']};}else return{container:I,offset:E(L)};}if(Q==-1||Q==K.length-1&&R<0){N.moveToElementText(I); +N.setEndPoint('StartToStart',G);S=N.text.replace(/(\r\n|\r)/g,'\n').length;K=I.childNodes;if(!S){L=K[K.length-1];if(L.nodeType!=3)return{container:I,offset:K.length};else return{container:L,offset:L.nodeValue.length};}var V=K.length;while(S>0&&V>0){M=K[--V];if(M.nodeType==3){T=M;S-=M.nodeValue.length;}}return{container:T,offset:-S};}else{N.collapse(R>0?true:false);N.setEndPoint(R>0?'StartToStart':'EndToStart',G);S=N.text.replace(/(\r\n|\r)/g,'\n').length;if(!S)return{container:I,offset:E(L)+(R>0?0:1)};while(S>0)try{M=L[R>0?'previousSibling':'nextSibling'];if(M.nodeType==3){S-=M.nodeValue.length;T=M;}L=M;}catch(W){return{container:I,offset:E(L)};}return{container:T,offset:R>0?-S:T.nodeValue.length+S};}};return function(){var Q=this;var G=Q.getNative(),H=G&&G.createRange(),I=Q.getType(),J;if(!G)return[];if(I==2){J=new d.range(Q.document);var K=F(H,true);J.setStart(new d.node(K.container),K.offset);K=F(H);J.setEnd(new d.node(K.container),K.offset);if(J.endContainer.getPosition(J.startContainer)&4&&J.endOffset<=J.startContainer.getIndex())J.collapse();return[J];}else if(I==3){var L=[];for(var M=0;M=L.getLength())P.setStartAfter(L);else P.setStartBefore(L);if(M&&M.type==3)if(!O)P.setEndBefore(M);else P.setEndAfter(M);var Q=new d.walker(P);Q.evaluator=function(R){if(R.type==1&&R.isReadOnly()){var S=I.clone();I.setEndBefore(R);if(I.collapsed)G.splice(H--,1); +if(!(R.getPosition(P.endContainer)&16)){S.setStartAfter(R);if(!S.collapsed)G.splice(H+1,0,S);}return true;}return false;};Q.next();}}return F.ranges;};})(),getStartElement:function(){var K=this;var D=K._.cache;if(D.startElement!==undefined)return D.startElement;var E,F=K.getNative();switch(K.getType()){case 3:return K.getSelectedElement();case 2:var G=K.getRanges()[0];if(G){if(!G.collapsed){G.optimize();while(1){var H=G.startContainer,I=G.startOffset;if(I==(H.getChildCount?H.getChildCount():H.getLength())&&!H.isBlockBoundary())G.setStartAfter(H);else break;}E=G.startContainer;if(E.type!=1)return E.getParent();E=E.getChild(G.startOffset);if(!E||E.type!=1)E=G.startContainer;else{var J=E.getFirst();while(J&&J.type==1){E=J;J=J.getFirst();}}}else{E=G.startContainer;if(E.type!=1)E=E.getParent();}E=E.$;}}return D.startElement=E?new h(E):null;},getSelectedElement:function(){var D=this._.cache;if(D.selectedElement!==undefined)return D.selectedElement;var E=this,F=e.tryThese(function(){return E.getNative().createRange().item(0);},function(){var G,H,I=E.getRanges()[0],J=I.getCommonAncestor(1,1),K={table:1,ul:1,ol:1,dl:1};for(var L in K){if(G=J.getAscendant(L,1))break;}if(G){var M=new d.range(this.document);M.setStartAt(G,1);M.setEnd(I.startContainer,I.startOffset);var N=e.extend(K,f.$listItem,f.$tableContent),O=new d.walker(M),P=function(Q,R){return function(S,T){if(S.type==3&&(!e.trim(S.getText())||S.getParent().data('cke-bookmark')))return true;var U;if(S.type==1){U=S.getName();if(U=='br'&&R&&S.equals(S.getParent().getBogus()))return true;if(T&&U in N||U in f.$removeEmpty)return true;}Q.halted=1;return false;};};O.guard=P(O);if(O.checkBackward()&&!O.halted){O=new d.walker(M);M.setStart(I.endContainer,I.endOffset);M.setEndAt(G,2);O.guard=P(O,1);if(O.checkForward()&&!O.halted)H=G.$;}}if(!H)throw 0;return H;},function(){var G=E.getRanges()[0],H,I;for(var J=2;J&&!((H=G.getEnclosedNode())&&H.type==1&&y[H.getName()]&&(I=H));J--)G.shrink(1);return I.$;});return D.selectedElement=F?new h(F):null;},getSelectedText:function(){var D=this._.cache;if(D.selectedText!==undefined)return D.selectedText;var E='',F=this.getNative();if(this.getType()==2)E=c?F.createRange().text:F.toString();return D.selectedText=E;},lock:function(){var D=this;D.getRanges();D.getStartElement();D.getSelectedElement();D.getSelectedText();D._.cache.nativeSel={};D.isLocked=1;D.document.setCustomData('cke_locked_selection',D);},unlock:function(D){var I=this;var E=I.document,F=E.getCustomData('cke_locked_selection'); +if(F){E.setCustomData('cke_locked_selection',null);if(D){var G=F.getSelectedElement(),H=!G&&F.getRanges();I.isLocked=0;I.reset();if(G)I.selectElement(G);else I.selectRanges(H);}}if(!F||!D){I.isLocked=0;I.reset();}},reset:function(){this._.cache={};},selectElement:function(D){var F=this;if(F.isLocked){var E=new d.range(F.document);E.setStartBefore(D);E.setEndAfter(D);F._.cache.selectedElement=D;F._.cache.startElement=D;F._.cache.ranges=new d.rangeList(E);F._.cache.type=3;return;}E=new d.range(D.getDocument());E.setStartBefore(D);E.setEndAfter(D);E.select();F.document.fire('selectionchange');F.reset();},selectRanges:function(D){var R=this;if(R.isLocked){R._.cache.selectedElement=null;R._.cache.startElement=D[0]&&D[0].getTouchedStartNode();R._.cache.ranges=new d.rangeList(D);R._.cache.type=2;return;}if(c){if(D.length>1){var E=D[D.length-1];D[0].setEnd(E.endContainer,E.endOffset);D.length=1;}if(D[0])D[0].select();R.reset();}else{var F=R.getNative();if(!F)return;if(D.length){F.removeAllRanges();b.webkit&&w(R.document);}for(var G=0;G=0){M.collapse(1);N.setEnd(M.endContainer.$,M.endOffset);}else throw S;}F.addRange(N);}R.document.fire('selectionchange');R.reset();}},createBookmarks:function(D){return this.getRanges().createBookmarks(D);},createBookmarks2:function(D){return this.getRanges().createBookmarks2(D);},selectBookmarks:function(D){var E=[];for(var F=0;F','','',this.label,'','=10900&&!o.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',p,'_label" aria-describedby="',p,'_text" aria-haspopup="true"');if(b.opera||b.gecko&&b.mac)n.push(' onkeypress="return false;"');if(b.gecko)n.push(' onblur="this.style.cssText = this.style.cssText;"');n.push(' onkeydown="CKEDITOR.tools.callFunction( ',t,', event, this );" onfocus="return CKEDITOR.tools.callFunction(',u,', event);" '+(c?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',q,', this); return false;">'+this.label+''+''+''+(b.hc?'▼':b.air?' ':'')+''+''+''+'');if(this.onRender)this.onRender();return r;},createPanel:function(m){if(this._.panel)return;var n=this._.panelDefinition,o=this._.panelDefinition.block,p=n.parent||a.document.getBody(),q=new k.floatPanel(m,p,n),r=q.addListBlock(this.id,o),s=this;q.onShow=function(){if(s.className)this.element.getFirst().addClass(s.className+'_panel');s.setState(1);r.focus(!s.multiSelect&&s.getValue());s._.on=1;if(s.onOpen)s.onOpen();};q.onHide=function(t){if(s.className)this.element.getFirst().removeClass(s.className+'_panel');s.setState(s.modes&&s.modes[m.mode]?2:0);s._.on=0;if(!t&&s.onClose)s.onClose();};q.onEscape=function(){q.hide();};r.onClick=function(t,u){s.document.getWindow().focus();if(s.onClick)s.onClick.call(s,t,u);if(u)s.setValue(t,s._.items[t]);else s.setValue('');q.hide(false);};this._.panel=q;this._.list=r;q.getBlock(this.id).onHide=function(){s._.on=0;s.setState(2);};if(this.init)this.init();},setValue:function(m,n){var p=this;p._.value=m;var o=p.document.getById('cke_'+p.id+'_text');if(o){if(!(m||n)){n=p.label;o.addClass('cke_inline_label');}else o.removeClass('cke_inline_label');o.setHtml(typeof n!='undefined'?n:m);}},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(m){this._.list.mark(m);},hideItem:function(m){this._.list.hideItem(m);},hideGroup:function(m){this._.list.hideGroup(m);},showAll:function(){this._.list.showAll();},add:function(m,n,o){this._.items[m]=o||m;this._.list.add(m,n,o);},startGroup:function(m){this._.list.startGroup(m); +},commit:function(){var m=this;if(!m._.committed){m._.list.commit();m._.committed=1;k.fire('ready',m);}m._.committed=1;},setState:function(m){var n=this;if(n._.state==m)return;n.document.getById('cke_'+n.id).setState(m);n._.state=m;}}});k.prototype.addRichCombo=function(m,n){this.add(m,'richcombo',n);};j.add('htmlwriter');a.htmlWriter=e.createClass({base:a.htmlParser.basicWriter,$:function(){var o=this;o.base();o.indentationChars='\t';o.selfClosingEnd=' />';o.lineBreakChars='\n';o.forceSimpleAmpersand=0;o.sortAttributes=1;o._.indent=0;o._.indentation='';o._.inPre=0;o._.rules={};var m=f;for(var n in e.extend({},m.$nonBodyContent,m.$block,m.$listItem,m.$tableContent))o.setRules(n,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!m[n]['#'],breakAfterClose:1});o.setRules('br',{breakAfterOpen:1});o.setRules('title',{indent:0,breakAfterOpen:0});o.setRules('style',{indent:0,breakBeforeClose:1});o.setRules('pre',{indent:0});},proto:{openTag:function(m,n){var p=this;var o=p._.rules[m];if(p._.indent)p.indentation();else if(o&&o.breakBeforeOpen){p.lineBreak();p.indentation();}p._.output.push('<',m);},openTagClose:function(m,n){var p=this;var o=p._.rules[m];if(n)p._.output.push(p.selfClosingEnd);else{p._.output.push('>');if(o&&o.indent)p._.indentation+=p.indentationChars;}if(o&&o.breakAfterOpen)p.lineBreak();m=='pre'&&(p._.inPre=1);},attribute:function(m,n){if(typeof n=='string'){this.forceSimpleAmpersand&&(n=n.replace(/&/g,'&'));n=e.htmlEncodeAttr(n);}this._.output.push(' ',m,'="',n,'"');},closeTag:function(m){var o=this;var n=o._.rules[m];if(n&&n.indent)o._.indentation=o._.indentation.substr(o.indentationChars.length);if(o._.indent)o.indentation();else if(n&&n.breakBeforeClose){o.lineBreak();o.indentation();}o._.output.push('');m=='pre'&&(o._.inPre=0);if(n&&n.breakAfterClose)o.lineBreak();},text:function(m){var n=this;if(n._.indent){n.indentation();!n._.inPre&&(m=e.ltrim(m));}n._.output.push(m);},comment:function(m){if(this._.indent)this.indentation();this._.output.push('');},lineBreak:function(){var m=this;if(!m._.inPre&&m._.output.length>0)m._.output.push(m.lineBreakChars);m._.indent=1;},indentation:function(){var m=this;if(!m._.inPre)m._.output.push(m._.indentation);m._.indent=0;},setRules:function(m,n){var o=this._.rules[m];if(o)e.extend(o,n,true);else this._.rules[m]=n;}}});j.add('menubutton',{requires:['button','menu'],beforeInit:function(m){m.ui.addHandler('menubutton',k.menuButton.handler);}});a.UI_MENUBUTTON='menubutton'; +(function(){var m=function(n){var o=this._;if(o.state===0)return;o.previousState=o.state;var p=o.menu;if(!p){p=o.menu=new a.menu(n,{panel:{className:n.skinClass+' cke_contextmenu',attributes:{'aria-label':n.lang.common.options}}});p.onHide=e.bind(function(){this.setState(this.modes&&this.modes[n.mode]?o.previousState:0);},this);if(this.onMenu)p.addListener(this.onMenu);}if(o.on){p.hide();return;}this.setState(1);p.show(a.document.getById(this._.id),4);};k.menuButton=e.createClass({base:k.button,$:function(n){var o=n.panel;delete n.panel;this.base(n);this.hasArrow=true;this.click=m;},statics:{handler:{create:function(n){return new k.menuButton(n);}}}});})();j.add('dialogui');(function(){var m=function(u){var x=this;x._||(x._={});x._['default']=x._.initValue=u['default']||'';x._.required=u.required||false;var v=[x._];for(var w=1;w',v.label,'',''); +else{var D={type:'hbox',widths:v.widths,padding:0,children:[{type:'html',html:'