diff --git a/LEGAL.txt b/LEGAL.txt deleted file mode 100644 index 5bca3519..00000000 --- a/LEGAL.txt +++ /dev/null @@ -1,1416 +0,0 @@ -=================================================================================== ->>>>>>>>>>>>>>>>>>>>>>>> dynamsoft-barcode-reader-bundle <<<<<<<<<<<<<<<<<<<<<<<<<< -=================================================================================== - -Legal Notices: - -This SDK contains parts of following softwares which are used under license. - -=================================================================================== -Zlib. - - (C) 1995-2022 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu -=================================================================================== - - - -=================================================================================== -Google's open-source ZXing ("Zebra Crossing") - -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. -=================================================================================== - - - -=================================================================================== -OpenCV 4.5.2 - - -Copyright 2022, OpenCV Foundation - - - -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. -=================================================================================== - - - -=================================================================================== -JsonCpp library - -The JsonCpp library's source code, including accompanying documentation, -tests and demonstration applications, are licensed under the following -conditions... - -The author (Baptiste Lepilleur) explicitly disclaims copyright in all -jurisdictions which recognize such a disclaimer. In such jurisdictions, -this software is released into the Public Domain. - -In jurisdictions which do not recognize Public Domain property (e.g. Germany as of -2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is -released under the terms of the MIT License (see below). - -In jurisdictions which recognize Public Domain property, the user of this -software may choose to accept it either as 1) Public Domain, 2) under the -conditions of the MIT License (see below), or 3) under the terms of dual -Public Domain/MIT License conditions described here, as they choose. - -The MIT License is about as close to Public Domain as a license can get, and is -described in clear, concise terms at: - - http://en.wikipedia.org/wiki/MIT_License - -The full text of the MIT License follows: - -======================================================================== -Copyright (c) 2007-2010 Baptiste Lepilleur - -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. -======================================================================== -(END LICENSE TEXT) - -The MIT license is compatible with both the GPL and commercial -software, affording one all of the rights of Public Domain with the -minor nuisance of being required to keep the above copyright notice -and license text in the source code. Note also that by accepting the -Public Domain "license" you can re-license your copy using whatever -license you like. -=================================================================================== - - - -=================================================================================== -OpenSSL - - The OpenSSL toolkit stays under a double license, i.e. both the conditions of - the OpenSSL License and the original SSLeay license apply to the toolkit. - See below for the actual license texts. - - OpenSSL License - --------------- - -/* ==================================================================== - * Copyright (c) 1998-2019 The OpenSSL Project. 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. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED 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 OpenSSL PROJECT OR - * ITS 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. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - - Original SSLeay License - ----------------------- - -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * 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 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -=================================================================================== - - - -=================================================================================== -localForage - --- Offline Storage, Improved -Version 1.7.3 -https://localforage.github.io/localForage -(c) 2013-2017 Mozilla, Apache License 2.0 -=================================================================================== - - - -=================================================================================== -fabric.js - -Copyright (c) 2008-2015 Printio (Juriy Zaytsev, Maxim Chernyak) - -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 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 NON INFRINGEMENT. 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. -=================================================================================== - - - -=================================================================================== -Protocol Buffers - -This license applies to all parts of Protocol Buffers except the following: - - - Atomicops support for generic gcc, located in - src/google/protobuf/stubs/atomicops_internals_generic_gcc.h. - This file is copyrighted by Red Hat Inc. - - - Atomicops support for AIX/POWER, located in - src/google/protobuf/stubs/atomicops_internals_power.h. - This file is copyrighted by Bloomberg Finance LP. - -Copyright 2014, Google Inc. 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 Google 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. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. -=================================================================================== - -onnxruntime - -Copyright (c) Microsoft Corporation - -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. - -=================================================================================== - -pytorch_cpuinfo - -Copyright (c) 2019 Google LLC -Copyright (c) 2017-2018 Facebook Inc. -Copyright (C) 2012-2017 Georgia Institute of Technology -Copyright (C) 2010-2012 Marat Dukhan - -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. - -=================================================================================== - -flatbuffers - - 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. - -=================================================================================== - -abseil_cpp - -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. - -=================================================================================== - -onnx - -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. - -=================================================================================== - -google_nsync - -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. - -==================================================================================== - -libzueci - -A simple, standalone, BSD-3-Clause C library for converting UTF-8 to/from Extended Channel Interpretations, as defined by AIM ITS/04-023 International Technical Standard - Extended Channel Interpretations Part 3: Register (Version 2, February 2022). - \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 41df5664..00000000 --- a/LICENSE +++ /dev/null @@ -1,4 +0,0 @@ -Copyright Ā© 2003–2026 Dynamsoft. All Rights Reserved. - -The use of this software is governed by the Dynamsoft Terms and Conditions. -URL=https://www.dynamsoft.com/barcode-reader/license-agreement/#javascript \ No newline at end of file diff --git a/README.html b/README.html deleted file mode 100644 index 418ac4fc..00000000 --- a/README.html +++ /dev/null @@ -1,826 +0,0 @@ - - - Dynamsoft Barcode Reader for Your Website - User Guide - - - - - - -
-

Barcode Reader for Your Website - Foundational API Guide

-

Dynamsoft Barcode Reader JavaScript Edition (DBR-JS) is equipped with industry-leading algorithms for exceptional speed, accuracy and read rates in barcode reading. Using its well-designed API, you can turn your web page into a barcode scanner with just a few lines of code. Once the DBR-JS SDK gets integrated into your web page, your users can access a camera via the browser and read barcodes directly from its video input.

- -

In this guide, you will learn step by step on how to integrate the DBR-JS SDK into your website.

-

Table of Contents

- -

Hello World - Simplest Implementation

-

Let's start with the "Hello World" example of the DBR-JS SDK which demonstrates how to use the minimum code to enable a web page to read barcodes from a live video stream.

-

Basic Requirements

- -
-

Please refer to system requirements for more details.

-
-

Understand the code

-

The complete code of the "Hello World" example is shown below

-
<!DOCTYPE html>
-<html>
-<body>
-<div id="camera-view-container" style="width: 100%; height: 60vh"></div>
-<textarea id="results" style="width: 100%; min-height: 10vh; font-size: 3vmin; overflow: auto" disabled></textarea>
-<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.2000/dist/dbr.bundle.js"></script>
-<script>
-  Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
-  Dynamsoft.Core.CoreModule.loadWasm();
-  (async () => {
-    let cvRouter = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
-
-    let cameraView = await Dynamsoft.DCE.CameraView.createInstance();
-    let cameraEnhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance(cameraView);
-    document.querySelector("#camera-view-container").append(cameraView.getUIElement());
-    cvRouter.setInput(cameraEnhancer);
-
-    const resultsContainer = document.querySelector("#results");
-    await cvRouter.addResultReceiver({ onDecodedBarcodesReceived: (result) => {
-      if (result.barcodeResultItems?.length) {
-        resultsContainer.textContent = '';
-        for (let item of result.barcodeResultItems) {
-          resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
-        }
-      }
-    }});
-
-    let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter();
-    filter.enableResultCrossVerification("barcode", true);
-    filter.enableResultDeduplication("barcode", true);
-    await cvRouter.addResultFilter(filter);
-
-    await cameraEnhancer.open();
-    await cvRouter.startCapturing("ReadSingleBarcode");
-  })();
-</script>
-</body>
-</html>
-
-

- - Code in Github - -   - - Run via JSFiddle - -   - - Run in Dynamsoft - -

- -
-

About the code

- -
-

Read more on Capture Vision Router.

-
-

Run the example

-

You can run the example deployed to the Dynamsoft Demo Server or test it with JSFiddle code editor.

-

You will be asked to allow access to your camera, after which the video will be displayed on the page. After that, you can point the camera at a barcode to read it.

-

When a barcode is decoded, you will see the result text show up under the video and the barcode location will be highlighted in the video feed.

-

Alternatively, you can test locally by copying and pasting the code shown above into a local file (e.g. "hello-world.html") and opening it in your browser.

-
-

Secure Contexts:

-

If you open the web page as http:// , our SDK may not work correctly because the MediaDevices: getUserMedia() and other methods only work in secure contexts (HTTPS, localhost, 127.0.0.1, file://), in some or all supporting browsers.

-

Regarding configuring https on your server, these guides for nginx / IIS / tomcat / nodejs might help.

-

If the test doesn't go as expected, you can contact us.

-
-

Preparing the SDK

-

Step 1: Include the SDK

-
- -
-
Use a public CDN
-

The simplest way to include the SDK is to use either the jsDelivr or UNPKG CDN. The "hello world" example above uses jsDelivr.

- -
  <script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.2000/dist/dbr.bundle.js"></script>
-
- -
  <script src="https://unpkg.com/dynamsoft-barcode-reader-bundle@11.4.2000/dist/dbr.bundle.js"></script>
-
- - -
  npm i dynamsoft-barcode-reader-bundle@11.4.2000 -E
-  # or
-  yarn add dynamsoft-barcode-reader-bundle@11.4.2000 -E
-
-

NOTE that in frameworks, you need to specify the location of the engine files.

-
-
-
Host the SDK yourself
-

Besides using the public CDN, you can also download the SDK and host its files on your own server or a commercial CDN before including it in your application.

- -
  npm i dynamsoft-barcode-reader-bundle@11.4.2000 -E
-
-

The resources are located at the path node_modules/<pkg>, without @<version>. You must copy "dynamsoft-xxx" packages elsewhere and add @<version>. The <version> can be obtained from package.json of each package. Another thing to do is to specify the engineResourcePaths so that the SDK can correctly locate the resources.

-
-

Since "nodemodules" is reserved for Node.js dependencies, and in our case the package is used only as static resources, we recommend either renaming the "nodemodules" folder or moving the "dynamsoft-" packages to a dedicated folder for static resources in your project to facilitate self-hosting.

-
-

You can typically include SDK like this:

-
<script src="path/to/dynamsoft-barcode-reader-bundle@11.4.2000/dist/dbr.bundle.js"></script>
-
-
-
-

Note:

- -
    -
  1. Upgrade your web application server to one that supports the application/wasm mimetype.
  2. -
  3. Manually define the mimetype on your server. You can refer to the guides for apache / IIS / nginx.
  4. -
- -
hljs   Cache-Control: max-age=31536000
-
-

Reference: Cache-Control.

-

Step 2: Prepare the SDK

-

Before using the SDK, you need to configure a few things.

-

1. Specify the license

-

To enable the SDK's functionality, you must provide a valid license. Utilize the API function initLicense to set your license key.

-
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
-
-

As previously stated, the key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" serves as a test license valid for 24 hours, applicable to any newly authorized browser. To test the SDK further, you can request a 30-day free trial license via the Request a Trial License link.

-
-

Upon registering a Dynamsoft account and obtaining the SDK package from the official website, Dynamsoft will automatically create a 30-day free trial license and embed the corresponding license key into all the provided SDK samples.

-
-

2. [Optional] Specify the location of the "engine" files

-

This step is generally necessary when utilizing frameworks such as Angular, React, Vue, or when managing the hosting of resource files yourself.

-

The purpose is to tell the SDK where to find the engine files (*.worker.js, *.wasm.js and *.wasm, etc.).

-
// in framework
-import { CoreModule } from "dynamsoft-barcode-reader-bundle";
-CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/";
-
-
// in pure js
-Dynamsoft.Core.CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/";
-
-

These code uses the jsDelivr CDN as an example, feel free to change it to your own location.

-

Using the SDK

-

Step 1: Preload the module

-

The image processing logic is encapsulated within .wasm library files, and these files may require some time for downloading. To enhance the speed, we advise utilizing the following method to preload the libraries.

-
// Preload the .wasm files
-Dynamsoft.Core.CoreModule.loadWasm();
-
-

Step 2: Create a CaptureVisionRouter object

-

To use the SDK, we first create a CaptureVisionRouter object.

-
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
-
-let cvRouter = null;
-try {
-    cvRouter = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
-} catch (ex) {
-    console.error(ex);
-}
-
-

Tip:

-

When creating a CaptureVisionRouter object within a function which may be called more than once, it's best to use a "helper" variable to avoid double creation such as pCvRouter in the following code:

-
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
-
-let pCvRouter = null; // The helper variable which is a promise of cvRouter
-let cvRouter = null;
-
-document.getElementById('btn-scan').addEventListener('click', async () => {
-    try {
-        cvRouter = await (pCvRouter = pCvRouter || Dynamsoft.CVR.CaptureVisionRouter.createInstance());
-    } catch (ex) {
-        console.error(ex);
-    }
-});
-
-

Step 3: Connect an image source

-

The CaptureVisionRouter object, denoted as cvRouter, is responsible for handling images provided by an image source. In our scenario, we aim to detect barcodes directly from a live video stream. To facilitate this, we initialize a CameraEnhancer object, identified as cameraEnhancer, which is specifically designed to capture image frames from the video feed and subsequently forward them to cvRouter.

-

To enable video streaming on the webpage, we create a CameraView object referred to as cameraView, which is then passed to cameraEnhancer, and its content is displayed on the webpage.

-
<div id="camera-view-container" style="width: 100%; height: 100vh"></div>
-
-
let cameraView = await Dynamsoft.DCE.CameraView.createInstance();
-let cameraEnhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance(cameraView);
-document.querySelector("#camera-view-container").append(cameraView.getUIElement());
-cvRouter.setInput(cameraEnhancer);
-
-

Step 4: Register a result receiver

-

Once the image processing is complete, the results are sent to all the registered CapturedResultReceiver objects. Each CapturedResultReceiver object may encompass one or multiple callback functions associated with various result types. This time we use onDecodedBarcodesReceived:

- -
const resultsContainer = document.querySelector("#results");
-const resultReceiver = new Dynamsoft.CVR.CapturedResultReceiver();
-resultReceiver.onDecodedBarcodesReceived  = (result) => {
-  if (result.barcodeResultItems?.length) {
-    resultsContainer.textContent = '';
-    for (let item of result.barcodeResultItems) {
-      // In this example, the barcode results are displayed on the page below the video.
-      resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
-    }
-  }
-};
-await cvRouter.addResultReceiver(resultReceiver);
-
-

You can also write code like this. It is the same.

-
const resultsContainer = document.querySelector("#results");
-await cvRouter.addResultReceiver({ onDecodedBarcodesReceived: (result) => {
-  if (result.barcodeResultItems?.length) {
-    resultsContainer.textContent = '';
-    for (let item of result.barcodeResultItems) {
-      // In this example, the barcode results are displayed on the page below the video.
-      resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
-    }
-  }
-}});
-
-

Check out CapturedResultReceiver for more information.

-

Step 5: Start process video frames

-

With the setup now complete, we can proceed to process the images in two straightforward steps:

-
    -
  1. Initiate the image source to commence image acquisition. In our scenario, we invoke the open() method on cameraEnhancer to initiate video streaming and simultaneously initiate the collection of images. These collected images will be dispatched to cvRouter as per its request.
  2. -
  3. Define a preset template to commence image processing. In our case, we utilize the "ReadSingleBarcode" template, specifically tailored for processing images containing a single barcode.
  4. -
-
await cameraEnhancer.open();
-await cvRouter.startCapturing("ReadSingleBarcode");
-
-

Note:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Template NameFunction Description
ReadBarcodes_DefaultScans multiple barcodes by default setting.
ReadSingleBarcodeQuickly scans a single barcode.
ReadBarcodes_SpeedFirstPrioritizes speed in scanning multiple barcodes.
ReadBarcodes_ReadRateFirstMaximizes the number of barcodes read.
ReadBarcodes_BalanceBalances speed and quantity in reading multiple barcodes.
ReadDenseBarcodesSpecialized in reading barcodes with high information density.
ReadDistantBarcodesCapable of reading barcodes from extended distances.
-

Read more on the preset CaptureVisionTemplates.

-

Customizing the process

-

1. Adjust the preset template settings

-

When making adjustments to some basic tasks, we often only need to modify SimplifiedCaptureVisionSettings.

-

1.1. Change barcode settings

-

The preset templates can be updated to meet different requirements. For example, the following code limits the barcode format to QR code.

-
let settings = await cvRouter.getSimplifiedSettings("ReadSingleBarcode");
-settings.barcodeSettings.barcodeFormatIds = Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE;
-await cvRouter.updateSettings("ReadSingleBarcode", settings);
-await cvRouter.startCapturing("ReadSingleBarcode");
-
-

For a list of adjustable barcode settings, check out SimplifiedBarcodeReaderSettings and EnumBarcodeFormat.

-

1.2. Retrieve the original image

-

Additionally, we have the option to modify the template to retrieve the original image containing the barcode.

-
let settings = await cvRouter.getSimplifiedSettings("ReadSingleBarcode");
-settings.outputOriginalImage = true;
-await cvRouter.updateSettings("ReadSingleBarcode", settings);
-await cvRouter.startCapturing("ReadSingleBarcode");
-
-

Limit the barcode format to QR code, and retrieve the original image containing the barcode, at the same time.

-
let settings = await cvRouter.getSimplifiedSettings("ReadSingleBarcode");
-settings.outputOriginalImage = true;
-settings.barcodeSettings.barcodeFormatIds = Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE;
-await cvRouter.updateSettings("ReadSingleBarcode", settings);
-await cvRouter.startCapturing("ReadSingleBarcode");
-
-

Please be aware that it is necessary to update the CapturedResultReceiver object to obtain the original image. For instance:

-
const EnumCRIT = Dynamsoft.Core.EnumCapturedResultItemType; // Enum for captured result item types.
-// Create a result receiver to handle the results.
-await cvRouter.addResultReceiver({
-  // This function is called when any capture result is received.
-  onCapturedResultReceived: (result) => {
-    //Check for barcode results
-    let barcodeResultItems = result.items.filter((item) => item.type === EnumCRIT.CRIT_BARCODE);
-    if (barcodeResultItems.length > 0) {
-      let image = result.items.filter((item) => item.type === EnumCRIT.CRIT_ORIGINAL_IMAGE)[0]?.imageData; // Retrieve the original image.
-      if (image) document.body.appendChild(image.toCanvas()); // Append the image to DOM.
-      for (let item of barcodeResultItems) {
-        // Print each barcode result to the console.
-        console.log(`Barcode: ${item.text}, Format: ${item.formatString}`);
-      }
-    }
-  },
-});
-
-

1.3. Change reading frequency to save power

-

The SDK is initially configured to process images sequentially without any breaks. Although this setup maximizes performance, it can lead to elevated power consumption, potentially causing the device to overheat. In many cases, it's possible to reduce the reading speed while still satisfying business requirements. The following code snippet illustrates how to adjust the SDK to process an image every 500 milliseconds:

-
-

Please bear in mind that in the following code, if an image's processing time is shorter than 500 milliseconds, the SDK will wait for the full 500 milliseconds before proceeding to process the next image. Conversely, if an image's processing time exceeds 500 milliseconds, the subsequent image will be processed immediately upon completion.

-
-
let settings = await cvRouter.getSimplifiedSettings("ReadSingleBarcode");
-settings.minImageCaptureInterval = 500;
-await cvRouter.updateSettings("ReadSingleBarcode", settings);
-await cvRouter.startCapturing("ReadSingleBarcode");
-
-

1.4. Specify a scan region

-

We can specify a scan region to allow the SDK to process only part of the image, improving processing speed. The code snippet below demonstrates how to do this using the cameraEnhancer image source.

-
cameraEnhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance(cameraView);
-// In this example, we set the scan region to cover the central 25% of the image.
-cameraEnhancer.setScanRegion({
-  x: 25,
-  y: 25,
-  width: 50,
-  height: 50,
-  isMeasuredInPercentage: true,
-});
-
-

Note:

-
    -
  1. By configuring the region at the image source, images are cropped before processing, removing the need to adjust any further processing settings.
  2. -
  3. cameraEnhancer enhances interactivity by overlaying a mask on the video, clearly marking the scanning region.
  4. -
-

See Also:

-

CameraEnhancer::setScanRegion

- - -

2. Edit the preset templates directly

-

The preset templates have many more settings that can be customized to suit your use case best. If you download the SDK from Dynamsoft website, you can find the templates under

- -

Upon completing the template editing, you can invoke the initSettings method and provide it with the template path as an argument.

-
await cvRouter.initSettings("PATH-TO-THE-FILE"); // E.g. "https://your-website/ReadSingleBarcode.json")
-await cvRouter.startCapturing("ReadSingleBarcode"); // Make sure the name matches one of the CaptureVisionTemplates in the template JSON file.
-
-

3. [Important] Filter the results

-

When processing video frames, the same barcode is often detected multiple times. To improve the user experience, we can use the MultiFrameResultCrossFilter object. This object provides two methods for handling duplicate detections, which can be used independently or together, depending on what best suits your application needs:

-

Method 1: Verify results across multiple frames

-
let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter();
-filter.enableResultCrossVerification("barcode", true);
-await cvRouter.addResultFilter(filter);
-
-

Note:

- -

Method 2: Eliminate redundant results detected within a short time frame

-
let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter();
-filter.enableResultDeduplication("barcode", true);
-await cvRouter.addResultFilter(filter);
-
-

Note:

- -

Initially, the filter is set to forget a result 3 seconds after it is first received. During this time frame, if an identical result appears, it is ignored.

-
-

It's important to know that in version 9.x or earlier, the occurrence of an identical result would reset the timer, thus reinitiating the 3-second count at that point. However, in version 10.2.10 and later, an identical result no longer resets the timer but is instead disregarded, and the duration count continues uninterrupted.

-
-

Under certain circumstances, this duration can be extended with the method setDuplicateForgetTime().

-
let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter();
-filter.setDuplicateForgetTime("barcode", 5000); // Extend the duration to 5 seconds.
-await cvRouter.addResultFilter(filter);
-
-

You can also enable both options at the same time:

-
let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter();
-filter.enableResultCrossVerification("barcode", true);
-filter.enableResultDeduplication("barcode", true);
-filter.setDuplicateForgetTime("barcode", 5000);
-await cvRouter.addResultFilter(filter);
-
-

4. Add feedback

-

When a barcode is detected within the video stream, its position is immediately displayed within the video. Furthermore, utilizing the "Dynamsoft Camera Enhancer" SDK, we can introduce feedback mechanisms, such as emitting a "beep" sound or triggering a "vibration".

-

The following code snippet adds a "beep" sound for when a barcode is found:

-
const resultReceiver = new Dynamsoft.CVR.CapturedResultReceiver();
-resultReceiver.onDecodedBarcodesReceived = (result) => {
-  if (result.barcodeResultItems.length > 0) {
-    Dynamsoft.DCE.Feedback.beep();
-  }
-};
-await cvRouter.addResultReceiver(resultReceiver);
-
-

Customizing the UI

-
// Create a CameraView instance with default settings
-let cameraView = await Dynamsoft.DCE.CameraView.createInstance();
-// Create a CameraView instance with a specified XML file path, typically a local or remote URL
-let cameraView1 = await Dynamsoft.DCE.CameraView.createInstance('@engineResourcePath/dce.ui.v5.xml');
-// Create a CameraView instance within a specified DOM element
-let cameraView2 = await Dynamsoft.DCE.CameraView.createInstance(document.getElementById('my-ui'));
-// Create a CameraView instance using a custom UI file path
-let cameraView3 = await Dynamsoft.DCE.CameraView.createInstance('url/to/my/ui.xml');
-
-// Get the UI element associated with the cameraView instance
-let uiElement = cameraView.getUIElement();
-// Remove the camera selection dropdown from the CameraView's UI element
-uiElement.querySelector('.dce-sel-camera').remove();
-// Remove the resolution selection dropdown from the CameraView's UI element
-uiElement.querySelector('.dce-sel-resolution').remove();
-
-

The UI is part of the auxiliary SDK "Dynamsoft Camera Enhancer", read more on how to customize the UI.

-

Documentation

-

API Reference

-

You can check out the detailed documentation about the APIs of the SDK at
-https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.4.2000.

- -

How to Upgrade

-

If you want to upgrade the SDK from an old version to a newer one, please see how to upgrade.

-

Release Notes

-

Learn about what are included in each release at https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/release-notes/index.html.

-

Next Steps

-

Now that you have got the SDK integrated, you can choose to move forward in the following directions

-
    -
  1. Learn how to Use in Framework
  2. -
  3. Check out the Official Samples and Demo
  4. -
  5. Learn about the APIs of the SDK
  6. -
-
- - \ No newline at end of file diff --git a/README.md b/README.md index 34de0fef..9408ca3a 100644 --- a/README.md +++ b/README.md @@ -1,725 +1,540 @@ -# Barcode Reader for Your Website - Foundational API Guide - -[Dynamsoft Barcode Reader JavaScript Edition](https://www.dynamsoft.com/barcode-reader/sdk-javascript/) (DBR-JS) is equipped with industry-leading algorithms for exceptional speed, accuracy and read rates in barcode reading. Using its well-designed API, you can turn your web page into a barcode scanner with just a few lines of code. Once the DBR-JS SDK gets integrated into your web page, your users can access a camera via the browser and read barcodes directly from its video input. - - - -In this guide, you will learn step by step on how to integrate the DBR-JS SDK into your website. - -Table of Contents - -- [Barcode Reader for Your Website - Foundational API Guide](#barcode-reader-for-your-website---foundational-api-guide) - - [Hello World - Simplest Implementation](#hello-world---simplest-implementation) - - [Understand the code](#understand-the-code) - - [About the code](#about-the-code) - - [Run the example](#run-the-example) - - [Preparing the SDK](#preparing-the-sdk) - - [Step 1: Include the SDK](#step-1-include-the-sdk) - - [Step 2: Prepare the SDK](#step-2-prepare-the-sdk) - - [1. Specify the license](#1-specify-the-license) - - [2. \[Optional\] Specify the location of the "engine" files](#2-optional-specify-the-location-of-the-engine-files) - - [Using the SDK](#using-the-sdk) - - [Step 1: Preload the module](#step-1-preload-the-module) - - [Step 2: Create a CaptureVisionRouter object](#step-2-create-a-capturevisionrouter-object) - - [Step 3: Connect an image source](#step-3-connect-an-image-source) - - [Step 4: Register a result receiver](#step-4-register-a-result-receiver) - - [Step 5: Start process video frames](#step-5-start-process-video-frames) - - [Customizing the process](#customizing-the-process) - - [1. Adjust the preset template settings](#1-adjust-the-preset-template-settings) - - [1.1. Change barcode settings](#11-change-barcode-settings) - - [1.2. Retrieve the original image](#12-retrieve-the-original-image) - - [1.3. Change reading frequency to save power](#13-change-reading-frequency-to-save-power) - - [1.4. Specify a scan region](#14-specify-a-scan-region) - - [2. Edit the preset templates directly](#2-edit-the-preset-templates-directly) - - [3. \[Important\] Filter the results](#3-important-filter-the-results) - - [Method 1: Verify results across multiple frames](#method-1-verify-results-across-multiple-frames) - - [Method 2: Eliminate redundant results detected within a short time frame](#method-2-eliminate-redundant-results-detected-within-a-short-time-frame) - - [4. Add feedback](#4-add-feedback) - - [Customizing the UI](#customizing-the-ui) - - [Documentation](#documentation) - - [API Reference](#api-reference) - - [How to Upgrade](#how-to-upgrade) - - [Release Notes](#release-notes) - - [Next Steps](#next-steps) - -## Hello World - Simplest Implementation - -Let's start with the "Hello World" example of the DBR-JS SDK which demonstrates how to use the minimum code to enable a web page to read barcodes from a live video stream. - -**Basic Requirements** - - - Internet connection - - A supported browser - - Camera access - -> Please refer to [system requirements](https://www.dynamsoft.com/faq/barcode-reader/web/capabilities/system-requirement.html) for more details. - -### Understand the code - -The complete code of the "Hello World" example is shown below + -```html - - - -
- - - - - -``` +# Dynamsoft JavaScript Barcode SDK -

- - Code in Github - -   - - Run via JSFiddle - -   - - Run in Dynamsoft - -

- - - ------ - -#### About the code - -- `Dynamsoft.License.LicenseManager.initLicense()`: This method initializes the license for using the SDK in the application. Note that the string "**DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9**" used in this example points to an online license that requires a network connection to work. Read more on [Specify the license](#1-specify-the-license). - -- `Dynamsoft.Core.CoreModule.loadWasm()`: This is an optional code. Used to load wasm resources in advance, reducing latency between video playing and barcode decoding. - -- `Dynamsoft.CVR.CaptureVisionRouter.createInstance()`: This method creates a `CaptureVisionRouter` object `cvRouter` which controls the entire process in three steps: - - **Retrieve Images from the Image Source** - - `cvRouter` connects to the image source through the [ImageSourceAdapter](https://www.dynamsoft.com/capture-vision/docs/core/architecture/input.html#image-source-adapter?lang=js) interface with the method `setInput()`. - ```js - cvRouter.setInput(cameraEnhancer); - ``` - > The image source in our case is a [CameraEnhancer](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/user-guide/index.html) object created with `Dynamsoft.DCE.CameraEnhancer.createInstance(cameraView)` - - **Coordinate Image-Processing Tasks** - - The coordination happens behind the scenes. `cvRouter` starts the process by specifying a preset template "ReadSingleBarcode" in the method `startCapturing()`. - ```js - cvRouter.startCapturing("ReadSingleBarcode"); - ``` - - **Dispatch Results to Listening Objects** - - The processing results are returned through the [CapturedResultReceiver](https://www.dynamsoft.com/capture-vision/docs/core/architecture/output.html#captured-result-receiver?lang=js) interface. The `CapturedResultReceiver` object is registered to `cvRouter` via the method `addResultReceiver()`. For more information, please check out [Register a result receiver](#step-4-register-a-result-receiver). - ```js - cvRouter.addResultReceiver({/*The-CapturedResultReceiver-Object"*/}); - ``` - - Also note that reading from video is extremely fast and there could be many duplicate results. We can use a [filter](#3-important-filter-the-results) with result deduplication enabled to filter out the duplicate results. The object is registered to `cvRouter` via the method `addResultFilter()`. - ```js - cvRouter.addResultFilter(filter); - ``` - -> Read more on [Capture Vision Router](https://www.dynamsoft.com/capture-vision/docs/core/architecture/#capture-vision-router). - -### Run the example - -You can run the example deployed to [the Dynamsoft Demo Server](https://demo.dynamsoft.com/Samples/DBR/JS/hello-world.html?ver=11.4.20&utm_source=github) or test it with [JSFiddle code editor](https://jsfiddle.net/DynamsoftTeam/csm2f9wb/). - -You will be asked to allow access to your camera, after which the video will be displayed on the page. After that, you can point the camera at a barcode to read it. - -When a barcode is decoded, you will see the result text show up under the video and the barcode location will be highlighted in the video feed. - -Alternatively, you can test locally by copying and pasting the code shown above into a local file (e.g. "hello-world.html") and opening it in your browser. - -> *Secure Contexts*: -> -> If you open the web page as `http://` , our SDK may not work correctly because the [MediaDevices: getUserMedia()](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) and other methods only work in [secure contexts](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) (HTTPS, `localhost`, `127.0.0.1`, `file://`), in some or all supporting browsers. -> -> Regarding configuring https on your server, these guides for [nginx](https://nginx.org/en/docs/http/configuring_https_servers.html) / [IIS](https://aboutssl.org/how-to-create-a-self-signed-certificate-in-iis/) / [tomcat](https://dzone.com/articles/setting-ssl-tomcat-5-minutes) / [nodejs](https://nodejs.org/docs/v0.4.1/api/tls.html) might help. -> -> If the test doesn't go as expected, you can [contact us](https://www.dynamsoft.com/company/contact/?ver=11.4.20&utm_source=github&product=dbr&package=js). +Version 6.5.2 -## Preparing the SDK +The repository aims to help developers get familiar with [Dynamsoft JavaScript Barcode SDK](https://www.dynamsoft.com/Products/barcode-recognition-javascript.aspx). -### Step 1: Include the SDK +This SDK supports decoding **1D**, **PDF417**, **QR**, **DataMatrix**, and **Aztec** barcodes. -
- +The supported data sources include `Blob`, `HTMLImageElement`, `HTMLVideoElement`, URL and more. -
-
Use a public CDN
+You can create a web application or a Node.js application to decode the static images and the video stream within 3 minutes. -The simplest way to include the SDK is to use either the [jsDelivr](https://jsdelivr.com/) or [UNPKG](https://unpkg.com/) CDN. The "hello world" example above uses **jsDelivr**. +
-- jsDelivr + - ```html - - ``` + - - However, please **DO NOT** use `download2.dynamsoft.com` resources in a production application as they are for temporary testing purposes only. Instead, you can try hosting the SDK yourself. --> +## Online Demo -- In frameworks like React, Vue and Angular, you may want to add the package as a dependency. + - ```sh - npm i dynamsoft-barcode-reader-bundle@11.4.2000 -E - # or - yarn add dynamsoft-barcode-reader-bundle@11.4.2000 -E - ``` +[Online Demo in Dynamsoft](https://demo.dynamsoft.com/dbr_wasm/barcode_reader_javascript.html) - NOTE that in frameworks, you need to [specify the location of the engine files](#2-optional-specify-the-location-of-the-engine-files). -
+
-
-
Host the SDK yourself
+## Browser Compatibility -Besides using the public CDN, you can also download the SDK and host its files on your own server or a commercial CDN before including it in your application. +| Browser | Version | +|:-:|:-:| +| Chrome | v57+ | +| Firefox | v52+ | +| Edge | v16+ | +| Safari* | v11+ | +| Internet Explorer | not supported | -- From the website +> Safari 11.2.2 ~ 11.2.6 are not supported. - [Download Dynamsoft Barcode Reader JavaScript Package](https://www.dynamsoft.com/barcode-reader/downloads/?ver=11.4.20&utm_source=github&product=dbr&package=js) +
- The resources are located at path `dynamsoft/distributables/@`. +## API Documentation -- From npm +[class BarcodeReader](https://www.dynamsoft.com/help/Barcode-Reader-wasm/classes/_dbr_wasm_d_.dynamsoft.barcodereader.html) - ```sh - npm i dynamsoft-barcode-reader-bundle@11.4.2000 -E - ``` +[class Scanner](https://www.dynamsoft.com/help/Barcode-Reader-wasm/classes/_dbr_wasm_d_.dynamsoft.barcodereader.scanner.html) - The resources are located at the path `node_modules/`, without `@`. You must copy "dynamsoft-xxx" packages elsewhere and add `@`. The `` can be obtained from `package.json` of each package. Another thing to do is to [specify the engineResourcePaths](#2-optional-specify-the-location-of-the-engine-files) so that the SDK can correctly locate the resources. - > Since "node_modules" is reserved for Node.js dependencies, and in our case the package is used only as static resources, we recommend either renaming the "node_modules" folder or moving the "dynamsoft-" packages to a dedicated folder for static resources in your project to facilitate self-hosting. +
-You can typically include SDK like this: +## Preface -```html - -``` -
+In the followng section, we will introduce the basic functions of the SDK and how you can use it in a web application to decode barcodes off a video stream. -
+For those who are interested in creating a nodejs app, or decoding static images, please refer to the samples and api documents. This guide tackles decoding from a video, and we will make up for other usages soon. -*Note*: +
-* Certain legacy web application servers may lack support for the `application/wasm` mimetype for .wasm files. To address this, you have two options: - 1. Upgrade your web application server to one that supports the `application/wasm` mimetype. - 2. Manually define the mimetype on your server. You can refer to the guides for [apache](https://developer.mozilla.org/en-US/docs/Learn/Server-side/Apache_Configuration_htaccess#media_types_and_character_encodings) / [IIS](https://docs.microsoft.com/en-us/iis/configuration/system.webserver/staticcontent/mimemap) / [nginx](https://www.nginx.com/resources/wiki/start/topics/examples/full/#mime-types). +## HelloWorld -* To work properly, the SDK requires a few engine files, which are relatively large and may take quite a few seconds to download. We recommend that you set a longer cache time for these engine files, to maximize the performance of your web application. +Before testing the HelloWorld sample, please note that you will require a connected camera that is not occupied by another application, as well as an internet connection. - ``` - Cache-Control: max-age=31536000 - ``` +Now just copy the following code into an html file and run it directly from the browser: - Reference: [Cache-Control](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control). +```html + + + + + + + +``` +[Try in JSFiddle](https://jsfiddle.net/Keillion/16gqLoe3/) -### Step 2: Prepare the SDK +
-Before using the SDK, you need to configure a few things. +If you open the html as `file:///` or `http://` You might see the following error after opening the browser console: -#### 1. Specify the license +> [Deprecation] getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details. -To enable the SDK's functionality, you must provide a valid license. Utilize the API function initLicense to set your license key. +In Safari 12 the same error is displayed as such: -```javascript -Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"); -``` +> Trying to call getUserMedia from an insecure document. -As previously stated, the key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" serves as a test license valid for 24 hours, applicable to any newly authorized browser. To test the SDK further, you can request a 30-day free trial license via the Request a Trial License link. +That is because most browsers today need to be deployed on https to use [getUserMedia](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia). -> Upon registering a Dynamsoft account and obtaining the SDK package from the official website, Dynamsoft will automatically create a 30-day free trial license and embed the corresponding license key into all the provided SDK samples. +*(The latest chrome or Firefox allows getUserMedia when using `file:///` or `http://localhost`. )* -#### 2. [Optional] Specify the location of the "engine" files +Below are some samples for configuring an HTTPS server. -This step is generally necessary when utilizing frameworks such as Angular, React, Vue, or when managing the hosting of resource files yourself. +* NGINX: [Configuring HTTPS servers](https://nginx.org/en/docs/http/configuring_https_servers.html) -The purpose is to tell the SDK where to find the engine files (\*.worker.js, \*.wasm.js and \*.wasm, etc.). +* IIS: [Create a Self Signed Certificate in IIS](https://aboutssl.org/how-to-create-a-self-signed-certificate-in-iis/) -```ts -// in framework -import { CoreModule } from "dynamsoft-barcode-reader-bundle"; -CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/"; -``` -```js -// in pure js -Dynamsoft.Core.CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/"; -``` -These code uses the jsDelivr CDN as an example, feel free to change it to your own location. +* Tomcat: [Setting Up SSL on Tomcat in 5 minutes](https://dzone.com/articles/setting-ssl-tomcat-5-minutes) -## Using the SDK +* Node.js: [npm tls](https://nodejs.org/docs/v0.4.1/api/tls.html) -### Step 1: Preload the module +After deploying the site to an https server, the browser might say "the site is not secure". That is because we use self-signed certification. Please go to the certificate settings and allow this certificate. You may change the certification to a formal one in production. -The image processing logic is encapsulated within .wasm library files, and these files may require some time for downloading. To enhance the speed, we advise utilizing the following method to preload the libraries. +
-```js -// Preload the .wasm files -Dynamsoft.Core.CoreModule.loadWasm(); -``` +If everything goes normally, there will be a pop-up from the browser asking for permission of the camera. After allowing access, you will see the video stream in the default UI of our scanner. The drop-down lists on the top left corner can be used for changing the video source and resolution. The button on the top right is for closing the scanner. After all the resources are loaded, you will see some arrays in the browser console. This array is the barcode results array that is being printed in the console once a new frame is read. Now to properly introduce the two main events used by the scanner: -### Step 2: Create a CaptureVisionRouter object +* onFrameRead: -To use the SDK, we first create a `CaptureVisionRouter` object. + The event that is triggered once a single frame has been scanned. The results object contains all the barcode results that the reader was able to decode. -```javascript -Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"); +* onNewCodeRead: -let cvRouter = null; -try { - cvRouter = await Dynamsoft.CVR.CaptureVisionRouter.createInstance(); -} catch (ex) { - console.error(ex); -} -``` + This event is triggered when a new barcode (not a duplicate) is found. `txt` holds the barcode text result. `result` contains the actual barcode result, including the text result. Any new barcodes that were found (or any old barcodes that were found) are going to be stored for the duration of `duplicateForgetTime`. -*Tip*: +
-When creating a `CaptureVisionRouter` object within a function which may be called more than once, it's best to use a "helper" variable to avoid double creation such as `pCvRouter` in the following code: +## Initialization -```javascript -Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"); +Our library needs some time for initialization, including downloading the resources and compiling them, so you might notice that the decoding process doesn't start immediately. If the HelloWorld sample is deployed, the program will cache the wasm file in the indexedDB to speed the download up. -let pCvRouter = null; // The helper variable which is a promise of cvRouter -let cvRouter = null; +You can check the download status of the WebAssembly component with the `_onWasmDownloaded` callback. Please note this function is only triggered during the first visit because that's the only time the wasm files are downloaded. -document.getElementById('btn-scan').addEventListener('click', async () => { - try { - cvRouter = await (pCvRouter = pCvRouter || Dynamsoft.CVR.CaptureVisionRouter.createInstance()); - } catch (ex) { - console.error(ex); - } -}); -``` +Every time you open the page, initialization will take place only once. You can use the `isLoaded` function to see if the initialization was successful. -### Step 3: Connect an image source +`loadWasm` is the basic function for initialization. You can call it over and over again, or add it in the page initialization to speed up the whole process. The returned promise will be resolved once the initialization is done. -The `CaptureVisionRouter` object, denoted as `cvRouter`, is responsible for handling images provided by an image source. In our scenario, we aim to detect barcodes directly from a live video stream. To facilitate this, we initialize a `CameraEnhancer` object, identified as `cameraEnhancer`, which is specifically designed to capture image frames from the video feed and subsequently forward them to `cvRouter`. +`createInstance` (or using the `Scanner` constructor) and `scanner.open` will call `loadWasm` on the backend so no initialization is required for those functions. Therefore, it is not necessary to explicitly call `loadWasm` to initialize the library if you are directly using the constructor. -To enable video streaming on the webpage, we create a `CameraView` object referred to as `cameraView`, which is then passed to `cameraEnhancer`, and its content is displayed on the webpage. +
-```html -
-``` +### Debug Info + +In case you need to debug your sample application, use the callback `_onLog`. -```javascript -let cameraView = await Dynamsoft.DCE.CameraView.createInstance(); -let cameraEnhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance(cameraView); -document.querySelector("#camera-view-container").append(cameraView.getUIElement()); -cvRouter.setInput(cameraEnhancer); +```js +dbr._onLog = console.log; ``` +[Try in JSFiddle](https://jsfiddle.net/Keillion/6czmrq5d/) -### Step 4: Register a result receiver +The log can then be seen in the browser console. -Once the image processing is complete, the results are sent to all the registered `CapturedResultReceiver` objects. Each `CapturedResultReceiver` object may encompass one or multiple callback functions associated with various result types. This time we use `onDecodedBarcodesReceived`: - +
-```javascript -const resultsContainer = document.querySelector("#results"); -const resultReceiver = new Dynamsoft.CVR.CapturedResultReceiver(); -resultReceiver.onDecodedBarcodesReceived = (result) => { - if (result.barcodeResultItems?.length) { - resultsContainer.textContent = ''; - for (let item of result.barcodeResultItems) { - // In this example, the barcode results are displayed on the page below the video. - resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`; - } - } -}; -await cvRouter.addResultReceiver(resultReceiver); -``` +## Configuring Scanner Settings -You can also write code like this. It is the same. +The scanner interface comes with a number of properties, some of the most useful being shown here: -```javascript -const resultsContainer = document.querySelector("#results"); -await cvRouter.addResultReceiver({ onDecodedBarcodesReceived: (result) => { - if (result.barcodeResultItems?.length) { - resultsContainer.textContent = ''; - for (let item of result.barcodeResultItems) { - // In this example, the barcode results are displayed on the page below the video. - resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`; - } - } -}}); +```js +// Use config when new the object +let scanner = new BarcodeReader.Scanner({ + // Use back camera in mobile. Set width and height. + // Refer [MediaStreamConstraints](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Syntax). + videoSettings: { video: { width: 1280, height: 720, facingMode: "environment" } }, + //The default setting is for an environment with accurate focus and good lighting. The settings below are for more complex environments. + runtimeSettings: { mAntiDamageLevel: 9, mDeblurLevel: 9 }, + // The same code awlways alert? Set duplicateForgetTime longer. + duplicateForgetTime: 10000, + onFrameRead: results => {console.log(results);}, + onNewCodeRead: (txt, result) => {alert(txt);} +}); +// change initial configuration settings +scanner.duplicateForgetTime = 20000; +scanner.onFrameRead = undefined; +scanner.runtimeSettings.mBarcodeFormatIds = BarcodeReader.EnumBarcodeFormat.All; ``` -Check out [CapturedResultReceiver](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/captured-result-receiver.html) for more information. +Now that you have seen how to set and change these properties, here is a full list of the properties: +* `htmlElement`: The HTML element that will contain the video reader object should you choose to customize the UI. We will dig a little deeper into this in the next section. +* `videoSettings`: Defines the different settings of the video stream. These settings include the resolution and facing mode. Please visit this [link](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Syntax) for more information on these video settings. +* `confidence`: This property is mainly related to 1D barcodes. If the confidence of a 1D barcode result is greater than 30, that is a reliable result which you can move forward with. Otherwise, it is recommended that the scan process is restarted so that a more confident result is produced. +* `intervalTime`: The time interval between finding a result and starting a new scan. +* `runtimeSettings`: Defines the different settings of the barcode reader itself. Find a full list of these settings and their corresponding descriptions [here](https://www.dynamsoft.com/help/Barcode-Reader/devguide/Template/TemplateSettingsList.html). +* `duplicateForgetTime`: The amount of time the reader "remembers" a barcode result once a single frame is read. Once the barcode result is obtained, the reader will not attempt to read the specific barcode again until duplicateForgetTime is up. -### Step 5: Start process video frames +[Try in JSFiddle](https://jsfiddle.net/Keillion/gbwahsyp/) -With the setup now complete, we can proceed to process the images in two straightforward steps: +
-1. Initiate the image source to commence image acquisition. In our scenario, we invoke the `open()` method on `cameraEnhancer` to initiate video streaming and simultaneously initiate the collection of images. These collected images will be dispatched to `cvRouter` as per its request. -2. Define a preset template to commence image processing. In our case, we utilize the "ReadSingleBarcode" template, specifically tailored for processing images containing a single barcode. +## Configuring RuntimeSettings -```javascript -await cameraEnhancer.open(); -await cvRouter.startCapturing("ReadSingleBarcode"); +fast +```js +scanner.runtimeSettings.mAntiDamageLevel = 3; +scanner.runtimeSettings.mDeblurLevel = 0; ``` -*Note*: +1D +```js +scanner.runtimeSettings.mAntiDamageLevel = 9; +scanner.runtimeSettings.mDeblurLevel = 0; +``` -* `cvRouter` is engineered to consistently request images from the image source. -* Various preset templates are at your disposal for barcode reading: +2D +```js +scanner.runtimeSettings.mAntiDamageLevel = 9; +scanner.runtimeSettings.mDeblurLevel = 2; +``` -| Template Name | Function Description | -| ------------------------------ | -------------------------------------------------------------- | -| **ReadBarcodes_Default** | Scans multiple barcodes by default setting. | -| **ReadSingleBarcode** | Quickly scans a single barcode. | -| **ReadBarcodes_SpeedFirst** | Prioritizes speed in scanning multiple barcodes. | -| **ReadBarcodes_ReadRateFirst** | Maximizes the number of barcodes read. | -| **ReadBarcodes_Balance** | Balances speed and quantity in reading multiple barcodes. | -| **ReadDenseBarcodes** | Specialized in reading barcodes with high information density. | -| **ReadDistantBarcodes** | Capable of reading barcodes from extended distances. | +[Try in JSFiddle](https://jsfiddle.net/Keillion/cz0udevm/) -Read more on the [preset CaptureVisionTemplates](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/preset-templates.html). +## Customize the UI -## Customizing the process +The Barcode Reader gives you the freedom to use your own UI for the video scanner, and in the next section, we will explore how to configure the reader to allow for custom UI. -### 1. Adjust the preset template settings +Try running the code below. +```html + + + +
+ +
+ + + + +``` +[Try in JSFiddle](https://jsfiddle.net/Keillion/0zo9ju72/) -When making adjustments to some basic tasks, we often only need to modify [SimplifiedCaptureVisionSettings](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/interfaces/simplified-capture-vision-settings.html). +Now that we have defined the htmlElement to be the custom div element, you need to add the video source and resolution dropdown boxes. Here is the HTML element to add a custom video source select dropdown: +```html + +``` +[Try in JSFiddle](https://jsfiddle.net/Keillion/csadqny1/) -#### 1.1. Change barcode settings +As for adding a resolution select dropdown menu: +```html + +``` -The preset templates can be updated to meet different requirements. For example, the following code limits the barcode format to QR code. +The dropdown will still show the same 8 options for the resolution if you do not manually define the resolution options. -```javascript -let settings = await cvRouter.getSimplifiedSettings("ReadSingleBarcode"); -settings.barcodeSettings.barcodeFormatIds = Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE; -await cvRouter.updateSettings("ReadSingleBarcode", settings); -await cvRouter.startCapturing("ReadSingleBarcode"); +[Try in JSFiddle](https://jsfiddle.net/Keillion/oyxugLcf/) + +You can provide limited resolution options to avoid overwhelming the user. Here is the HTML code for how to do that: +```html + ``` -For a list of adjustable barcode settings, check out [SimplifiedBarcodeReaderSettings](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/interfaces/simplified-barcode-reader-settings.html) and [EnumBarcodeFormat](https://www.dynamsoft.com/capture-vision/docs/core/enums/barcode-reader/barcode-format.html?lang=js&product=dbr). +Please note that in this case, you will need to manually dictate the resolution options. If the camera does not support the selected resolution, it will find the closest supported resolution. The "dbrScanner-opt-gotResolution" class option of the dropdown menu (shown above) indicates which resolution is currently being used. -#### 1.2. Retrieve the original image +[Try in JSFiddle](https://jsfiddle.net/Keillion/odf4eLvm/) -Additionally, we have the option to modify the template to retrieve the original image containing the barcode. +To play the video at the selected resolution: -```javascript -let settings = await cvRouter.getSimplifiedSettings("ReadSingleBarcode"); -settings.outputOriginalImage = true; -await cvRouter.updateSettings("ReadSingleBarcode", settings); -await cvRouter.startCapturing("ReadSingleBarcode"); +```js +scanner.play(null, 1920, 1080).then(r=>{ + alert(r.width+'x'+r.height); +}); ``` +[Try in JSFiddle](https://jsfiddle.net/Keillion/14ngeh5c/) -Limit the barcode format to QR code, and retrieve the original image containing the barcode, at the same time. +Now suppose you do not want to use either of the select classes listed above for the video source and resolution dropdown boxes. You can use the API methods to populate any HTML element you want to use. -```javascript -let settings = await cvRouter.getSimplifiedSettings("ReadSingleBarcode"); -settings.outputOriginalImage = true; -settings.barcodeSettings.barcodeFormatIds = Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE; -await cvRouter.updateSettings("ReadSingleBarcode", settings); -await cvRouter.startCapturing("ReadSingleBarcode"); +For creating the resolution list, the UI element will need to be manually populated as shown a couple of code snippets ago. Here it is again for reference: +```html + ``` -Please be aware that it is necessary to update the `CapturedResultReceiver` object to obtain the original image. For instance: - -```javascript -const EnumCRIT = Dynamsoft.Core.EnumCapturedResultItemType; // Enum for captured result item types. -// Create a result receiver to handle the results. -await cvRouter.addResultReceiver({ - // This function is called when any capture result is received. - onCapturedResultReceived: (result) => { - //Check for barcode results - let barcodeResultItems = result.items.filter((item) => item.type === EnumCRIT.CRIT_BARCODE); - if (barcodeResultItems.length > 0) { - let image = result.items.filter((item) => item.type === EnumCRIT.CRIT_ORIGINAL_IMAGE)[0]?.imageData; // Retrieve the original image. - if (image) document.body.appendChild(image.toCanvas()); // Append the image to DOM. - for (let item of barcodeResultItems) { - // Print each barcode result to the console. - console.log(`Barcode: ${item.text}, Format: ${item.formatString}`); - } - } - }, +You can get the device list via the API like this: +```js +scanner.updateDevice().then(infos=>{ + // The camera currently in use + alert(JSON.stringify(infos.current, null, 2)); + // An array of all cameras + alert(JSON.stringify(infos.all, null, 2)); }); ``` +[Try in JSFiddle](https://jsfiddle.net/Keillion/j7p5c6fb/) -#### 1.3. Change reading frequency to save power - -The SDK is initially configured to process images sequentially without any breaks. Although this setup maximizes performance, it can lead to elevated power consumption, potentially causing the device to overheat. In many cases, it's possible to reduce the reading speed while still satisfying business requirements. The following code snippet illustrates how to adjust the SDK to process an image every 500 milliseconds: +You can also get the device list when opening the scanner: +```js +scanner.open().then(infos=>{ + // The resolution of the video currently playing + alert(JSON.stringify(infos.width+'x'+infos.height, null, 2)); + // The camera currently in use + alert(JSON.stringify(infos.current, null, 2)); + // An array of all cameras + alert(JSON.stringify(infos.all, null, 2)); +}); +``` +[Try in JSFiddle](https://jsfiddle.net/Keillion/qpa5eyd9/) -> Please bear in mind that in the following code, if an image's processing time is shorter than 500 milliseconds, the SDK will wait for the full 500 milliseconds before proceeding to process the next image. Conversely, if an image's processing time exceeds 500 milliseconds, the subsequent image will be processed immediately upon completion. +You can play any video source using the `deviceId` property: -```javascript -let settings = await cvRouter.getSimplifiedSettings("ReadSingleBarcode"); -settings.minImageCaptureInterval = 500; -await cvRouter.updateSettings("ReadSingleBarcode", settings); -await cvRouter.startCapturing("ReadSingleBarcode"); +```js +// Play the first camera. +scanner.play(infos.all[0].deviceId); ``` +[Try in JSFiddle](https://jsfiddle.net/Keillion/qwsbzygp/) -#### 1.4. Specify a scan region +The video source name that shows up in the dropdown list is taken from the `label` property rather than the `deviceId`. You should almost always never use the `deviceId` for the name as it is a long string of randomized characters. +Please note that the camera may display different names in different environments or timings. -We can specify a scan region to allow the SDK to process only part of the image, improving processing speed. The code snippet below demonstrates how to do this using the `cameraEnhancer` image source. +If you have more than one connected camera, and would like your application to play a certain one of them on startup, here is how: -```javascript -cameraEnhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance(cameraView); -// In this example, we set the scan region to cover the central 25% of the image. -cameraEnhancer.setScanRegion({ - x: 25, - y: 25, - width: 50, - height: 50, - isMeasuredInPercentage: true, +```js +scanner.open().then(infos=>{ + for(let info of infos.all){ + if(info.label == 'Your camera name'){ + scanner.play(info.deviceId); + break; + } + } }); ``` +[Try in JSFiddle](https://jsfiddle.net/Keillion/a9mhu2sv/) -*Note*: - -1. By configuring the region at the image source, images are cropped before processing, removing the need to adjust any further processing settings. -2. `cameraEnhancer` enhances interactivity by overlaying a mask on the video, clearly marking the scanning region. - -*See Also*: - -[CameraEnhancer::setScanRegion](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/api-reference/acquisition.html#setscanregion) - - - - - - -### 2. Edit the preset templates directly - -The preset templates have many more settings that can be customized to suit your use case best. If you [download the SDK from Dynamsoft website](https://www.dynamsoft.com/barcode-reader/downloads/1000003-confirmation/), you can find the templates under -* "/dynamsoft-barcode-reader-js-11.4.2000/dist/templates/" - -Upon completing the template editing, you can invoke the `initSettings` method and provide it with the template path as an argument. - -```javascript -await cvRouter.initSettings("PATH-TO-THE-FILE"); // E.g. "https://your-website/ReadSingleBarcode.json") -await cvRouter.startCapturing("ReadSingleBarcode"); // Make sure the name matches one of the CaptureVisionTemplates in the template JSON file. +Modify the configuration settings of the video reader to complete the form with the results of three barcodes once they are found: +```js +let iptIndex = 0; +let scanner = new BarcodeReader.Scanner({ + onNewCodeRead:(txt)=>{ + document.getElementById('ipt-' + iptIndex).value = txt; + if(3 == ++iptIndex){ + scanner.onNewCodeRead = undefined; + scanner.close(); + } + } +}); ``` +[Try in JSFiddle](https://jsfiddle.net/Keillion/cgLo5dsb/) -### 3. [Important] Filter the results +
-When processing video frames, the same barcode is often detected multiple times. To improve the user experience, we can use the [MultiFrameResultCrossFilter](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/utility/multi-frame-result-cross-filter.html) object. This object provides two methods for handling duplicate detections, which can be used independently or together, depending on what best suits your application needs: +## Decode Part of Video -#### Method 1: Verify results across multiple frames +If you are not interested in exhausting resources to read the entire area of the video stream, you can choose to decode a specific region of the stream. Here is how: ```js -let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter(); -filter.enableResultCrossVerification("barcode", true); -await cvRouter.addResultFilter(filter); +// take a center 50% * 50% part of the video and resize the part to 1280 * 720 before decode +scanner.searchRegion = {sx: 0.25, sy: 0.25, sWidth: 0.5, sHeight: 0.5, dWidth: 1280, dHeight: 720}; ``` +[Try in JSFiddle](https://jsfiddle.net/Keillion/z42orbkj/) -*Note*: +
-* `enableResultCrossVerification` was designed to cross-validate the outcomes across various frames in a video streaming scenario, enhancing the reliability of the final results. This validation is particularly crucial for barcodes with limited error correction capabilities, such as 1D codes. +## Self Deployment -#### Method 2: Eliminate redundant results detected within a short time frame - -```js -let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter(); -filter.enableResultDeduplication("barcode", true); -await cvRouter.addResultFilter(filter); -``` +In the HelloWorld sample, you used the min.js hosted on CDN, which can load the other required js and wasm files. -*Note*: +Most of the time you use this cdn is enough, it is fast and stable. -* `enableResultDeduplication` was designed to prevent high usage in video streaming scenarios, addressing the repetitive processing of the same code within a short period of time. +But sometimes you will want to deploy it yourself, for example, in an environment without Internet, for example, you can provide a faster and more stable CDN. -Initially, the filter is set to forget a result 3 seconds after it is first received. During this time frame, if an identical result appears, it is ignored. +
-> It's important to know that in version 9.x or earlier, the occurrence of an identical result would reset the timer, thus reinitiating the 3-second count at that point. However, in version 10.2.10 and later, an identical result no longer resets the timer but is instead disregarded, and the duration count continues uninterrupted. +To deploy resources yourself, you will need a web server and deploy the resources under a folder named `dist` to your server. -Under certain circumstances, this duration can be extended with the method `setDuplicateForgetTime()`. +Required files in `dist`: -```js -let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter(); -filter.setDuplicateForgetTime("barcode", 5000); // Extend the duration to 5 seconds. -await cvRouter.addResultFilter(filter); +``` +dbr-.min.js +dbr-.wasm.min.js +dbr-.wasm +dbr-.wasm.withio.min.js +dbr-.withio.wasm +dbr-.esm.min.js ``` -You can also enable both options at the same time: +
-```js -let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter(); -filter.enableResultCrossVerification("barcode", true); -filter.enableResultDeduplication("barcode", true); -filter.setDuplicateForgetTime("barcode", 5000); -await cvRouter.addResultFilter(filter); -``` +> It is recommended that you bring all these files with you when you use them. But if you want to reduce the files you need to deploy, here is a rough list of the necessary files: +> +> * web + document + UMD: +> ``` +> dbr-.min.js +> dbr-.wasm.min.js +> dbr-.wasm +> ``` +> +> * web + worker + UMD: +> ``` +> dbr-.min.js +> dbr-.wasm.withio.min.js +> dbr-.withio.wasm +> ``` +> +> * web + document + es6 module: +> ``` +> dbr-.min.esm.js +> dbr-.wasm.min.js +> dbr-.wasm +> ``` +> +> * web + worker + es6 module: +> ``` +> dbr-.min.esm.js +> dbr-.wasm.withio.min.js +> dbr-.withio.wasm +> ``` +> +> * nodejs + UMD: +> ``` +> dbr-.min.js +> dbr-.wasm.withio.min.js +> dbr-.withio.wasm +> ``` -### 4. Add feedback +
-When a barcode is detected within the video stream, its position is immediately displayed within the video. Furthermore, utilizing the "Dynamsoft Camera Enhancer" SDK, we can introduce feedback mechanisms, such as emitting a "beep" sound or triggering a "vibration". +You need to set `.wasm` mimetype to `application/wasm` in the server config. -The following code snippet adds a "beep" sound for when a barcode is found: +Please check the settings below for different environments. -```js -const resultReceiver = new Dynamsoft.CVR.CapturedResultReceiver(); -resultReceiver.onDecodedBarcodesReceived = (result) => { - if (result.barcodeResultItems.length > 0) { - Dynamsoft.DCE.Feedback.beep(); - } -}; -await cvRouter.addResultReceiver(resultReceiver); -``` +* set mimetype in NGINX: [mime.types](https://www.nginx.com/resources/wiki/start/topics/examples/full/#mime-types) -## Customizing the UI - -```javascript -// Create a CameraView instance with default settings -let cameraView = await Dynamsoft.DCE.CameraView.createInstance(); -// Create a CameraView instance with a specified XML file path, typically a local or remote URL -let cameraView1 = await Dynamsoft.DCE.CameraView.createInstance('@engineResourcePath/dce.ui.v5.xml'); -// Create a CameraView instance within a specified DOM element -let cameraView2 = await Dynamsoft.DCE.CameraView.createInstance(document.getElementById('my-ui')); -// Create a CameraView instance using a custom UI file path -let cameraView3 = await Dynamsoft.DCE.CameraView.createInstance('url/to/my/ui.xml'); - -// Get the UI element associated with the cameraView instance -let uiElement = cameraView.getUIElement(); -// Remove the camera selection dropdown from the CameraView's UI element -uiElement.querySelector('.dce-sel-camera').remove(); -// Remove the resolution selection dropdown from the CameraView's UI element -uiElement.querySelector('.dce-sel-resolution').remove(); -``` +* set mimetype in ASP.NET: [Web.config](https://github.com/dynamsoft-dbr/javascript-barcode/blob/master/documents/conf/Web.config) + +* set mimetype in Java™ EE web app: [web.xml](https://github.com/dynamsoft-dbr/javascript-barcode/blob/master/documents/conf/web.xml) + +* set mimetype in Node.js: [npm mime](https://github.com/broofa/node-mime) -The UI is part of the auxiliary SDK "Dynamsoft Camera Enhancer", read more on how to [customize the UI](https://www.dynamsoft.com/barcode-reader/docs/core/programming/features/ui-customization-js.html?lang=js). +
-## Documentation +## Changelog -### API Reference +### 6.5.2.1 -You can check out the detailed documentation about the APIs of the SDK at -[https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.4.2000](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.4.2000). +Improve video decoding capabilities. - +Set `dbr-.js`(stable) as the main branch. -### How to Upgrade +Added `dbr-.mobile.js`(smaller, compiles quicker, requires less memory, but not as stable) for mobile Safari. -If you want to upgrade the SDK from an old version to a newer one, please see [how to upgrade](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/migrate-from-v10/index.html). +### 6.3.0 -### Release Notes +Built Dynamsoft Barcode Reader 6.3.0 to JS(WebAssembly) version. -Learn about what are included in each release at [https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/release-notes/index.html](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/release-notes/index.html). +
-## Next Steps +## Contact Us +If there are any questions, please feel free to contact . -Now that you have got the SDK integrated, you can choose to move forward in the following directions +## License Agreement +https://www.dynamsoft.com/Products/barcode-reader-license-agreement.aspx -1. Learn how to [Use in Framework](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/use-in-framework.html) -2. Check out the [Official Samples and Demo](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/index.html) -3. Learn about the [APIs of the SDK](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/index.html) diff --git a/_config.yml b/_config.yml new file mode 100644 index 00000000..c4192631 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/dist/README.md b/dist/README.md new file mode 100644 index 00000000..1e9e6dfa --- /dev/null +++ b/dist/README.md @@ -0,0 +1 @@ +https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx?edition=js \ No newline at end of file diff --git a/dist/dbr.bundle.d.ts b/dist/dbr.bundle.d.ts deleted file mode 100644 index b558cf97..00000000 --- a/dist/dbr.bundle.d.ts +++ /dev/null @@ -1,4515 +0,0 @@ -declare enum EnumBufferOverflowProtectionMode { - /** New images are blocked when the buffer is full.*/ - BOPM_BLOCK = 0, - /** New images are appended at the end, and oldest images are pushed out from the beginning if the buffer is full.*/ - BOPM_UPDATE = 1 -} - -declare enum EnumCapturedResultItemType { - CRIT_ORIGINAL_IMAGE = 1, - CRIT_BARCODE = 2, - CRIT_TEXT_LINE = 4, - CRIT_DETECTED_QUAD = 8, - CRIT_DESKEWED_IMAGE = 16, - CRIT_PARSED_RESULT = 32, - CRIT_ENHANCED_IMAGE = 64 -} - -declare enum EnumCornerType { - CT_NORMAL_INTERSECTED = 0, - CT_T_INTERSECTED = 1, - CT_CROSS_INTERSECTED = 2, - CT_NOT_INTERSECTED = 3 -} - -/** - * `ErrorCode` enumerates the specific error codes that the SDK may return, providing a systematic way to identify and handle errors encountered during its operation. - */ -declare enum EnumErrorCode { - /** Operation completed successfully. */ - EC_OK = 0, - /** An unspecified error occurred. */ - EC_UNKNOWN = -10000, - /** The system does not have enough memory to perform the requested operation. */ - EC_NO_MEMORY = -10001, - /** A null pointer was encountered where a valid pointer was required. */ - EC_NULL_POINTER = -10002, - /** The provided license is not valid. */ - EC_LICENSE_INVALID = -10003, - /** The provided license has expired. */ - EC_LICENSE_EXPIRED = -10004, - /** The specified file could not be found. */ - EC_FILE_NOT_FOUND = -10005, - /** The file type is not supported for processing. */ - EC_FILE_TYPE_NOT_SUPPORTED = -10006, - /** The image's bits per pixel (BPP) is not supported. */ - EC_BPP_NOT_SUPPORTED = -10007, - /** The specified index is out of the valid range. */ - EC_INDEX_INVALID = -10008, - /** The specified custom region value is invalid or out of range. */ - EC_CUSTOM_REGION_INVALID = -10010, - /** Failed to read the image due to an error in accessing or interpreting the image data. */ - EC_IMAGE_READ_FAILED = -10012, - /** Failed to read a TIFF image, possibly due to corruption or unsupported format. */ - EC_TIFF_READ_FAILED = -10013, - /** The provided DIB (Device-Independent Bitmaps) buffer is invalid or corrupted. */ - EC_DIB_BUFFER_INVALID = -10018, - /** Failed to read a PDF image, possibly due to corruption or unsupported format. */ - EC_PDF_READ_FAILED = -10021, - /** Required PDF processing DLL is missing. */ - EC_PDF_DLL_MISSING = -10022, - /** The specified page number is invalid or out of bounds for the document. */ - EC_PAGE_NUMBER_INVALID = -10023, - /** The specified custom size is invalid or not supported. */ - EC_CUSTOM_SIZE_INVALID = -10024, - /** The operation timed out. */ - EC_TIMEOUT = -10026, - /** Failed to parse JSON input. */ - EC_JSON_PARSE_FAILED = -10030, - /** The JSON type is invalid for the expected context. */ - EC_JSON_TYPE_INVALID = -10031, - /** The JSON key is invalid or unrecognized in the current context. */ - EC_JSON_KEY_INVALID = -10032, - /** The JSON value is invalid for the specified key. */ - EC_JSON_VALUE_INVALID = -10033, - /** The required "Name" key is missing in the JSON data. */ - EC_JSON_NAME_KEY_MISSING = -10034, - /** The value of the "Name" key is duplicated and conflicts with existing data. */ - EC_JSON_NAME_VALUE_DUPLICATED = -10035, - /** The template name is invalid or does not match any known template. */ - EC_TEMPLATE_NAME_INVALID = -10036, - /** The reference made by the "Name" key is invalid or points to nonexistent data. */ - EC_JSON_NAME_REFERENCE_INVALID = -10037, - /** The parameter value provided is invalid or out of the expected range. */ - EC_PARAMETER_VALUE_INVALID = -10038, - /** The domain of the current site does not match the domain bound to the current product key. */ - EC_DOMAIN_NOT_MATCH = -10039, - /** The license key does not match the license content. */ - EC_LICENSE_KEY_NOT_MATCH = -10043, - /** Error setting the mode's argument, indicating invalid or incompatible arguments. */ - EC_SET_MODE_ARGUMENT_ERROR = -10051, - /** Failed to retrieve the mode's argument, possibly due to invalid state or configuration. */ - EC_GET_MODE_ARGUMENT_ERROR = -10055, - /** The Intermediate Result Types (IRT) license is invalid or not present. */ - EC_IRT_LICENSE_INVALID = -10056, - /** Failed to save the file, possibly due to permissions, space, or an invalid path. */ - EC_FILE_SAVE_FAILED = -10058, - /** The specified stage type is invalid or not supported in the current context. */ - EC_STAGE_TYPE_INVALID = -10059, - /** The specified image orientation is invalid or not supported. */ - EC_IMAGE_ORIENTATION_INVALID = -10060, - /** Failed to convert complex template to simplified settings, indicating a configuration or compatibility issue. */ - EC_CONVERT_COMPLEX_TEMPLATE_ERROR = -10061, - /** Rejecting function call while capturing is in progress, to prevent conflicts or data corruption. */ - EC_CALL_REJECTED_WHEN_CAPTURING = -10062, - /** The specified image source was not found, indicating a missing or inaccessible input source. */ - EC_NO_IMAGE_SOURCE = -10063, - /** Failed to read the directory, possibly due to permissions, non-existence, or other access issues. */ - EC_READ_DIRECTORY_FAILED = -10064, - /** A required module (e.g., DynamsoftBarcodeReader, DynamsoftLabelRecognizer) was not found. */ - EC_MODULE_NOT_FOUND = -10065, - EC_MULTI_PAGES_NOT_SUPPORTED = -10066, - /** Indicates an attempt to write to a file that already exists, with overwriting explicitly disabled. This error suggests the need for either enabling overwriting or ensuring unique file names to avoid conflicts. */ - EC_FILE_ALREADY_EXISTS = -10067, - /** The specified file path does not exist and could not be created. This error could be due to insufficient permissions, a read-only filesystem, or other environmental constraints preventing file creation. */ - EC_CREATE_FILE_FAILED = -10068, - /** The input ImageData object contains invalid parameters. This could be due to incorrect data types, out-of-range values, or improperly formatted data being passed to a function expecting ImageData. */ - EC_IMAGE_DATA_INVALID = -10069, - /** The size of the input image does not meet the requirements. */ - EC_IMAGE_SIZE_NOT_MATCH = -10070, - /** The pixel format of the input image does not meet the requirements. */ - EC_IMAGE_PIXEL_FORMAT_NOT_MATCH = -10071, - /** The section level result is irreplaceable. */ - EC_SECTION_LEVEL_RESULT_IRREPLACEABLE = -10072, - /** Incorrect axis definition. */ - EC_AXIS_DEFINITION_INCORRECT = -10073, - /**The result is not replaceable due to type mismatch*/ - EC_RESULT_TYPE_MISMATCH_IRREPLACEABLE = -10074, - /**Failed to load the PDF library.*/ - EC_PDF_LIBRARY_LOAD_FAILED = -10075, - EC_UNSUPPORTED_JSON_KEY_WARNING = -10077, - /**Model file is not found*/ - EC_MODEL_FILE_NOT_FOUND = -10078, - /**[PDF] No license found.*/ - EC_PDF_LICENSE_NOT_FOUND = -10079, - /**The rectangle is invalid.*/ - EC_RECT_INVALID = -10080, - EC_TEMPLATE_VERSION_INCOMPATIBLE = -10081, - /** The portrait zone could not be located on the identity document.*/ - EC_PORTRAIT_ZONE_NOT_FOUND = -10082, - /** Indicates no license is available or the license is not set. */ - EC_NO_LICENSE = -20000, - /** Encountered failures while attempting to read or write to the license buffer. */ - EC_LICENSE_BUFFER_FAILED = -20002, - /** Synchronization with the license server failed, possibly due to network issues or server unavailability. */ - EC_LICENSE_SYNC_FAILED = -20003, - /** The device attempting to use the license does not match the device specified in the license buffer. */ - EC_DEVICE_NOT_MATCH = -20004, - /** Binding the device to the license failed, indicating possible issues with the license or device identifier. */ - EC_BIND_DEVICE_FAILED = -20005, - /** The number of instances using the license exceeds the limit allowed by the license terms. */ - EC_INSTANCE_COUNT_OVER_LIMIT = -20008, - /** Indicates the license in use is a trial version with limited functionality or usage time. */ - EC_TRIAL_LICENSE = -20010, - /**The license is not valid for current version*/ - EC_LICENSE_VERSION_NOT_MATCH = -20011, - /**Online license validation failed due to network issues.Using cached license information for validation.*/ - EC_LICENSE_CACHE_USED = -20012, - EC_LICENSE_AUTH_QUOTA_EXCEEDED = -20013, - /**License restriction: the number of results has exceeded the allowed limit.*/ - EC_LICENSE_RESULTS_LIMIT_EXCEEDED = -20014, - /** The specified barcode format is invalid or unsupported. */ - EC_BARCODE_FORMAT_INVALID = -30009, - /** The specified custom module size for barcode generation is invalid or outside acceptable limits. */ - EC_CUSTOM_MODULESIZE_INVALID = -30025, - /**There is a conflict in the layout of TextLineGroup. */ - EC_TEXT_LINE_GROUP_LAYOUT_CONFLICT = -40101, - /**There is a conflict in the regex of TextLineGroup. */ - EC_TEXT_LINE_GROUP_REGEX_CONFLICT = -40102, - /** The specified quadrilateral is invalid, potentially due to incorrect points or an unprocessable shape. */ - EC_QUADRILATERAL_INVALID = -50057, - /** The license for generating or processing panoramas is invalid or missing. */ - EC_PANORAMA_LICENSE_INVALID = -70060, - /** The specified resource path does not exist, indicating a missing directory or incorrect path specification. */ - EC_RESOURCE_PATH_NOT_EXIST = -90001, - /** Failed to load the specified resource, which might be due to missing files, access rights, or other issues preventing loading. */ - EC_RESOURCE_LOAD_FAILED = -90002, - /** The code specification required for processing was not found, indicating a missing or incorrect specification. */ - EC_CODE_SPECIFICATION_NOT_FOUND = -90003, - /** The full code string provided is empty, indicating no data was provided for processing. */ - EC_FULL_CODE_EMPTY = -90004, - /** Preprocessing the full code string failed, possibly due to invalid format, corruption, or unsupported features. */ - EC_FULL_CODE_PREPROCESS_FAILED = -90005, - /**The license is initialized successfully but detected invalid content in your key.*/ - EC_LICENSE_WARNING = -10076, - /** [Barcode Reader] No license found.*/ - EC_BARCODE_READER_LICENSE_NOT_FOUND = -30063, - /**[Label Recognizer] No license found.*/ - EC_LABEL_RECOGNIZER_LICENSE_NOT_FOUND = -40103, - /**[Document Normalizer] No license found.*/ - EC_DOCUMENT_NORMALIZER_LICENSE_NOT_FOUND = -50058, - /**[Code Parser] No license found.*/ - EC_CODE_PARSER_LICENSE_NOT_FOUND = -90012 -} - -declare enum EnumGrayscaleEnhancementMode { - /** - * Disables any grayscale image preprocessing. Selecting this mode skips the preprocessing step, passing the image through to subsequent operations without modification. - */ - GEM_SKIP = 0, - /** - * Automatic selection of grayscale enhancement mode. Currently, not supported. Future implementations may automatically choose the most suitable enhancement based on image analysis. - */ - GEM_AUTO = 1, - /** - * Uses the original, unprocessed image for subsequent operations. This mode is selected when no specific grayscale enhancement is required, maintaining the image in its natural state. - */ - GEM_GENERAL = 2, - /** - * Applies a grayscale equalization algorithm to the image, enhancing contrast and detail in gray level. - * Suitable for images with poor contrast. Refer to Image Processing Mode (IPM) documentation for argument settings. - */ - GEM_GRAY_EQUALIZE = 4, - /** - * Implements a grayscale smoothing algorithm to reduce noise and smooth the image. - * This can be beneficial for images with high levels of grain or noise. Check IPM documentation for configuration options. - */ - GEM_GRAY_SMOOTH = 8, - /** - * Enhances the image by applying both sharpening and smoothing algorithms. This mode aims to increase clarity and detail while reducing noise, offering a balanced approach to image preprocessing. - * Refer to the IPM section for available argument settings. - */ - GEM_SHARPEN_SMOOTH = 16, - /** - * Reserved for future use. This setting is part of the grayscale enhancement mode but is currently not defined for public use. It's reserved for internal development or future enhancements. - */ - GEM_REV = -2147483648, - /** - * Placeholder value with no functional meaning. - */ - GEM_END = -1 -} - -declare enum EnumGrayscaleTransformationMode { - /** - * Bypasses grayscale transformation, leaving the image in its current state without any modification to its grayscale values. - * This mode is selected when no alteration of the grayscale data is desired, passing the image through to subsequent operations without modification. - */ - GTM_SKIP = 0, - /** - * Applies an inversion to the grayscale values of the image, effectively transforming light elements to dark and vice versa. - * This mode is particularly useful for images with light text on dark backgrounds, enhancing visibility for further processing. - */ - GTM_INVERTED = 1, - /** - * Maintains the original grayscale values of the image without any transformation. This mode is suited for images with dark elements on light backgrounds, ensuring the natural contrast and detail are preserved for subsequent analysis. - */ - GTM_ORIGINAL = 2, - /** - * Delegates the choice of grayscale transformation to the library's algorithm, which automatically determines the most suitable transformation based on the image's characteristics. This mode is beneficial when the optimal transformation is not known in advance or varies across different images. - */ - GTM_AUTO = 4, - /** - * Reserved for future expansion or internal use. This placeholder indicates a grayscale transformation mode that is not currently defined for public use but may be utilized for upcoming features or reserved for specific, undocumented adjustments. - */ - GTM_REV = -2147483648, - /** - * Placeholder value with no functional meaning. - */ - GTM_END = -1 -} - -declare enum EnumImagePixelFormat { - /** Binary format representing images with two colors: 0 for black and 1 for white. */ - IPF_BINARY = 0, - /** Inverted binary format with 0 for white and 1 for black. */ - IPF_BINARYINVERTED = 1, - /** Grayscale format with 8 bits per pixel, allowing for 256 shades of gray. */ - IPF_GRAYSCALED = 2, - /** NV21 format, a YUV planar format used commonly in camera preview and video encoding, with 8-bit Y followed by interleaved V/U values. */ - IPF_NV21 = 3, - /** RGB format with 5 bits for red and blue, and 6 bits for green, stored in a 16-bit structure. */ - IPF_RGB_565 = 4, - /** Similar to RGB_565 but with 5 bits for each color channel, providing uniform color depth across channels in a 16-bit structure. */ - IPF_RGB_555 = 5, - /** Standard 24-bit RGB format with 8 bits per channel. */ - IPF_RGB_888 = 6, - /** 32-bit ARGB format with 8 bits per channel, including an alpha channel for transparency. */ - IPF_ARGB_8888 = 7, - /** High-depth 48-bit RGB format with 16 bits per channel. */ - IPF_RGB_161616 = 8, - /** 64-bit ARGB format with 16 bits per channel, including an alpha channel. */ - IPF_ARGB_16161616 = 9, - /** 32-bit ABGR format with 8 bits per channel, storing color information in reverse order of ARGB_8888. */ - IPF_ABGR_8888 = 10, - /** 64-bit ABGR format with 16 bits per channel, providing high color depth and transparency in the reverse order of ARGB_16161616. */ - IPF_ABGR_16161616 = 11, - /** 24-bit BGR format with 8 bits per channel, where the blue channel is stored first. */ - IPF_BGR_888 = 12, - /** Binary format with 8 bits per pixel, enabling more detailed binary images by allowing for antialiasing or other binary representations. */ - IPF_BINARY_8 = 13, - /** NV12 format, similar to NV21 but with the U and V color components swapped. */ - IPF_NV12 = 14, - /** Inverted binary format with 8 bits per pixel. */ - IPF_BINARY_8_INVERTED = 15 -} - -declare enum EnumImageTagType { - /** Represents an image that has been sourced from a static file. */ - ITT_FILE_IMAGE = 0, - /** Indicates that the image is a frame extracted from a video stream. */ - ITT_VIDEO_FRAME = 1 -} - -declare enum EnumPDFReadingMode { - /** Outputs vector data found in the PDFs.*/ - PDFRM_VECTOR = 1, - /** The default value. - * Outputs raster data found in the PDFs. - * Depending on the argument Resolution, - * the SDK may rasterize the PDF pages. - * Check the template for available argument settings.*/ - PDFRM_RASTER = 2, - PDFRM_REV = -2147483648 -} - -declare enum EnumRasterDataSource { - /** Specifies the target type for reading a PDF, where the SDK rasterizes the pages of the PDF into images. */ - RDS_RASTERIZED_PAGES = 0, - /** Specifies the target type for reading a PDF, where the SDK extracts images from the PDF pages. */ - RDS_EXTRACTED_IMAGES = 1 -} - -declare enum EnumColourChannelUsageType { - /** - * Automatically determines how color channels are used. - * This option allows the SDK to choose the most appropriate channel usage mode dynamically. - */ - CCUT_AUTO = 0, - /** - * Utilizes all available color channels in the image for processing. - * This mode is ideal for scenarios where full color information is necessary for accurate analysis or processing. - */ - CCUT_FULL_CHANNEL = 1, - /** - * Processes images using only the Y (luminance) channel, specifically in NV21 format images. - * This mode is useful for operations that require analyzing the brightness or intensity of the image while ignoring color information. - */ - CCUT_Y_CHANNEL_ONLY = 2, - /** - * Uses only the red color channel for processing in RGB images. - * This mode is useful for tasks that require analysis or manipulation based on the red component of the image. - */ - CCUT_RGB_R_CHANNEL_ONLY = 3, - /** - * Uses only the green color channel for processing in RGB images. - * This mode is useful for tasks where the green component is most relevant. - */ - CCUT_RGB_G_CHANNEL_ONLY = 4, - /** - * Uses only the blue color channel for processing in RGB images. - * This mode is useful for tasks where the blue component is of particular interest. - */ - CCUT_RGB_B_CHANNEL_ONLY = 5 -} - -declare enum EnumCrossVerificationStatus { - /** The cross verification has not been performed yet. */ - CVS_NOT_VERIFIED = 0, - /** The cross verification has been passed successfully. */ - CVS_PASSED = 1, - /** The cross verification has failed. */ - CVS_FAILED = 2 -} - -declare const EnumIntermediateResultUnitType: { - /** No intermediate result. */ - IRUT_NULL: bigint; - /** A full-color image. */ - IRUT_COLOUR_IMAGE: bigint; - /** A color image that has been scaled down for efficiency. */ - IRUT_SCALED_COLOUR_IMAGE: bigint; - /** A grayscale image derived from the original input. */ - IRUT_GRAYSCALE_IMAGE: bigint; - /** A grayscale image that has undergone transformation. */ - IRUT_TRANSOFORMED_GRAYSCALE_IMAGE: bigint; - /** A grayscale image enhanced for further processing. */ - IRUT_ENHANCED_GRAYSCALE_IMAGE: bigint; - /** Regions pre-detected as potentially relevant for further analysis. */ - IRUT_PREDETECTED_REGIONS: bigint; - /** A binary (black and white) image. */ - IRUT_BINARY_IMAGE: bigint; - /** Results from detecting textures within the image. */ - IRUT_TEXTURE_DETECTION_RESULT: bigint; - /** A grayscale image with textures removed to enhance subject details like text or barcodes. */ - IRUT_TEXTURE_REMOVED_GRAYSCALE_IMAGE: bigint; - /** A binary image with textures removed), useful for clear detection of subjects without background noise. */ - IRUT_TEXTURE_REMOVED_BINARY_IMAGE: bigint; - /** Detected contours within the image), which can help in identifying shapes and objects. */ - IRUT_CONTOURS: bigint; - /** Detected line segments), useful in structural analysis of the image content. */ - IRUT_LINE_SEGMENTS: bigint; - /** Identified text zones), indicating areas with potential textual content. */ - IRUT_TEXT_ZONES: bigint; - /** A binary image with text regions removed. */ - IRUT_TEXT_REMOVED_BINARY_IMAGE: bigint; - /** Zones identified as potential barcode areas), aiding in focused barcode detection. */ - IRUT_CANDIDATE_BARCODE_ZONES: bigint; - /** Barcodes that have been localized but not yet decoded. */ - IRUT_LOCALIZED_BARCODES: bigint; - /** Barcode images scaled up for improved readability or decoding accuracy. */ - IRUT_SCALED_BARCODE_IMAGE: bigint; - /** Images of barcodes processed to resist deformation and improve decoding success. */ - IRUT_DEFORMATION_RESISTED_BARCODE_IMAGE: bigint; - /** Barcode images that have been complemented. */ - IRUT_COMPLEMENTED_BARCODE_IMAGE: bigint; - /** Successfully decoded barcodes. */ - IRUT_DECODED_BARCODES: bigint; - /** Detected long lines. */ - IRUT_LONG_LINES: bigint; - /** Detected corners within the image. */ - IRUT_CORNERS: bigint; - /** Candidate edges identified as potential components of quadrilaterals. */ - IRUT_CANDIDATE_QUAD_EDGES: bigint; - /** Successfully detected quadrilaterals. */ - IRUT_DETECTED_QUADS: bigint; - /** Text lines that have been localized in preparation for recognition. */ - IRUT_LOCALIZED_TEXT_LINES: bigint; - /** Successfully recognized text lines. */ - IRUT_RECOGNIZED_TEXT_LINES: bigint; - /** Successfully normalized images. */ - IRUT_DESKEWED_IMAGE: bigint; - /** Successfully detected short lines. */ - IRUT_SHORT_LINES: bigint; - IRUT_RAW_TEXT_LINES: bigint; - /** Detected logic lines. */ - IRUT_LOGIC_LINES: bigint; - IRUT_ENHANCED_IMAGE: bigint; - /** A mask to select all types of intermediate results. */ - IRUT_ALL: bigint; -}; -type EnumIntermediateResultUnitType = bigint; - -declare enum EnumRegionObjectElementType { - /** Corresponds to the `PredetectedRegionElement` subclass, representing areas within the image identified as potentially significant for further analysis before detailed processing. */ - ROET_PREDETECTED_REGION = 0, - /** Corresponds to the `LocalizedBarcodeElement` subclass, indicating areas where barcodes have been localized within the image.*/ - ROET_LOCALIZED_BARCODE = 1, - /** Corresponds to the `DecodedBarcodeElement` subclass, signifying barcodes that have not only been localized but also successfully decoded. */ - ROET_DECODED_BARCODE = 2, - /** Corresponds to the `LocalizedTextLineElement` subclass, indicating lines of text that have been localized within the image. */ - ROET_LOCALIZED_TEXT_LINE = 3, - /** Corresponds to the `RecognizedTextLineElement` subclass, referring to text lines that have been recognized. */ - ROET_RECOGNIZED_TEXT_LINE = 4, - /** Corresponds to the `DetectedQuadElement` subclass, representing quadrilateral shapes detected within the image. */ - ROET_DETECTED_QUAD = 5, - /** Corresponds to the `DeskewedImageElement` subclass, referring to images that have been deskewed. */ - ROET_DESKEWED_IMAGE = 6, - /** Corresponds to the `SourceImageElement` subclass. */ - ROET_SOURCE_IMAGE = 7, - /** Corresponds to the `TargetROIElement` subclass. */ - ROET_TARGET_ROI = 8, - /** Corresponds to the `EnhancedImageElement` subclass, indicating images that have undergone enhancement for better clarity or detail, specifically in the context of enhanced image processing. */ - ROET_ENHANCED_IMAGE = 9, - /** Corresponds to the `AuxiliaryRegionElement` subclass, representing auxiliary regions detected within the image. */ - ROET_AUXILIARY_REGION = 10 -} - -declare enum EnumSectionType { - /** Indicates that no specific section type has been specified. */ - ST_NULL = 0, - /** Corresponds to results generated in the "region prediction" section. */ - ST_REGION_PREDETECTION = 1, - /** Corresponds to results generated in the "barcode localization" section. */ - ST_BARCODE_LOCALIZATION = 2, - /** Corresponds to results generated in the "barcode decoding" section. */ - ST_BARCODE_DECODING = 3, - /** Corresponds to results generated in the "text line localization" section. */ - ST_TEXT_LINE_LOCALIZATION = 4, - /** Corresponds to results generated in the "text line recognition" section. */ - ST_TEXT_LINE_RECOGNITION = 5, - /** Corresponds to results generated in the "document detection" section. */ - ST_DOCUMENT_DETECTION = 6, - /** Corresponds to results generated in the "document deskewing" section. */ - ST_DOCUMENT_DESKEWING = 7, - /** Corresponds to results generated in the "document enhancement" section. */ - ST_IMAGE_ENHANCEMENT = 8 -} - -declare enum EnumImageFileFormat { - /** JPEG image format. */ - IFF_JPEG = 0, - /** PNG image format. */ - IFF_PNG = 1, - /** BMP (Bitmap) image format. */ - IFF_BMP = 2, - /** PDF (Portable Document Format) format. */ - IFF_PDF = 3 -} - -declare enum EnumImageCaptureDistanceMode { - ICDM_NEAR = 0, - ICDM_FAR = 1 -} - -declare enum EnumModuleName { - MN_DYNAMSOFT_CAPTURE_VISION_ROUTER = "cvr", - MN_DYNAMSOFT_CORE = "core", - MN_DYNAMSOFT_LICENSE = "license", - MN_DYNAMSOFT_IMAGE_PROCESSING = "dip", - MN_DYNAMSOFT_UTILITY = "utility", - MN_DYNAMSOFT_BARCODE_READER = "dbr", - MN_DYNAMSOFT_DOCUMENT_NORMALIZER = "ddn", - MN_DYNAMSOFT_LABEL_RECOGNIZER = "dlr", - MN_DYNAMSOFT_CAPTURE_VISION_DATA = "dcvData", - MN_DYNAMSOFT_NEURAL_NETWORK = "dnn", - MN_DYNAMSOFT_CODE_PARSER = "dcp", - MN_DYNAMSOFT_CAMERA_ENHANCER = "dce", - MN_DYNAMSOFT_CAPTURE_VISION_STD = "std" -} - -type WorkerAutoResources = { - [key in EnumModuleName]?: { - js?: boolean; - wasm?: boolean; - deps?: EnumModuleName[]; - }; -}; -interface PostMessageBody { - needLoadCore?: boolean; - bLog?: boolean; - bd?: boolean; - dm?: string; - value?: boolean; - count?: number; - engineResourcePaths?: EngineResourcePaths; - autoResources?: WorkerAutoResources; - names?: string[]; - wasmLoadOptions: WasmLoadOptions; - _bundleEnv?: "DCV" | "DBR"; -} -type PathInfo = { - version: string; - path: string; - isInternal?: boolean; -}; -type DwtInfo = { - resourcesPath?: string; - serviceInstallerLocation?: string; -}; -interface EngineResourcePaths { - "rootDirectory"?: string; - "std"?: string | PathInfo; - "dip"?: string | PathInfo; - "dnn"?: string | PathInfo; - "core"?: string | PathInfo; - "license"?: string | PathInfo; - "cvr"?: string | PathInfo; - "utility"?: string | PathInfo; - "dbr"?: string | PathInfo; - "dlr"?: string | PathInfo; - "ddn"?: string | PathInfo; - "dcp"?: string | PathInfo; - "dce"?: string | PathInfo; - "dcvData"?: string | PathInfo; - "identityutility"?: string | PathInfo; - "ddv"?: string | PathInfo; - "dwt"?: string | DwtInfo; - "dbrBundle"?: string | PathInfo; - "dcvBundle"?: string | PathInfo; -} -interface InnerVersions { - [key: string]: { - worker?: string; - wasm?: string; - }; -} -interface WasmVersions { - "DIP"?: string; - "DNN"?: string; - "CORE"?: string; - "LICENSE"?: string; - "CVR"?: string; - "UTILITY"?: string; - "DBR"?: string; - "DLR"?: string; - "DDN"?: string; - "DCP"?: string; -} -interface MapController { - [key: string]: ((body: any, taskID: number, instanceID?: number) => void); -} -type WasmType = "baseline" | "ml" | "ml-simd" | "ml-simd-pthread" | "auto"; -interface WasmLoadOptions { - wasmType?: WasmType; - pthreadPoolSize?: number; -} -type MimeType = "image/png" | "image/jpeg" | "image/bmp"; - -interface CapturedResultItem { - /** The type of the captured result item, indicating what kind of data it represents. */ - readonly type: EnumCapturedResultItemType; - /** A property of type `CapturedResultItem` that represents a reference to another captured result item. */ - readonly referenceItem: CapturedResultItem | null; - /** The name of the target ROI definition which includes a task that generated the result. */ - readonly targetROIDefName: string; - /** The name of the task that generated the result. */ - readonly taskName: string; -} - -interface ImageTag { - /** The unique identifier of the image. */ - imageId: number; - /** The type of the image. */ - type: EnumImageTagType; -} - -interface DSImageData { - /** The raw bytes of the image as a Uint8Array. */ - bytes: Uint8Array; - /** The width of the image in pixels. */ - width: number; - /** The height of the image in pixels. */ - height: number; - /** The stride (or row width) of the image in bytes. */ - stride: number; - /** The pixel format of the image. */ - format: EnumImagePixelFormat; - /** An optional tag associated with the image data. */ - imageTag?: ImageTag; -} - -interface OriginalImageResultItem extends CapturedResultItem { - /** The image data associated with this result item. */ - imageData: DSImageData; - /** Converts the image data into an HTMLCanvasElement for display or further manipulation in web applications. */ - toCanvas: () => HTMLCanvasElement; - /** Converts the image data into an HTMLImageElement of a specified MIME type ('image/png' or 'image/jpeg'). */ - toImage: (MIMEType: "image/png" | "image/jpeg") => HTMLImageElement; - /** Converts the image data into a Blob object of a specified MIME type ('image/png' or 'image/jpeg'). */ - toBlob: (MIMEType: "image/png" | "image/jpeg") => Promise; -} - -interface Point { - /** The x-coordinate of the point. */ - x: number; - /** The y-coordinate of the point. */ - y: number; -} - -interface Contour { - /** An array of `Point` objects defining the vertices of the contour. */ - points: Array; -} - -interface LineSegment { - /** The starting point of the line segment. */ - startPoint: Point; - /** The ending point of the line segment. */ - endPoint: Point; -} - -interface Corner { - /** The type of the corner, represented by the enumeration EnumCornerType. */ - type: EnumCornerType; - /** The point of intersection of the two lines forming the corner. */ - intersection: Point; - /** The first line segment forming the corner. */ - line1: LineSegment; - /** The second line segment forming the corner. */ - line2: LineSegment; -} - -interface Rect { - /** The x-coordinate of the rectangle's top-left corner. */ - x: number; - /** The y-coordinate of the rectangle's top-left corner. */ - y: number; - /** The width of the rectangle. */ - width: number; - /** The height of the rectangle. */ - height: number; - /** [Optional] Indicates if the rectangle's measurements are in percentages. */ - isMeasuredInPercentage?: boolean; -} - -interface Arc { - /** The x-coordinate of the arc's center. */ - x: number; - /** The y-coordinate of the arc's center. */ - y: number; - /** The radius of the arc. */ - radius: number; - /** The starting angle of the arc, in radians. */ - startAngle: number; - /** The ending angle of the arc, in radians. */ - endAngle: number; -} - -interface Polygon { - /** An array of `Point` objects defining the vertices of the polygon. */ - points: Array; -} - -interface DSRect { - /** The left coordinate of the rectangle. */ - left: number; - /** The right coordinate of the rectangle. */ - right: number; - /** The top coordinate of the rectangle. */ - top: number; - /** The bottom coordinate of the rectangle. */ - bottom: number; - /** Indicates if the rectangle's measurements are in percentages. */ - isMeasuredInPercentage?: boolean; -} - -interface Edge { - /** The starting corner of the edge. */ - startCorner: Corner; - /** The ending corner of the edge. */ - endCorner: Corner; -} - -interface FileImageTag extends ImageTag { - filePath: string; - pageNumber: number; - totalPages: number; -} - -interface ImageSourceErrorListener { - /** - * Called when an error is received from the image source. - * - * @param errorCode An enumeration value of type "EnumErrorCode" indicating the type of error. - * @param errorMessage A C-style string containing the error message providing - * additional information about the error. - */ - onErrorReceived: (errorCode: EnumErrorCode, errorMessage: string) => void; -} - -interface PDFReadingParameter { - mode: EnumPDFReadingMode; - dpi: number; - rasterDataSource: EnumRasterDataSource; -} - -interface Quadrilateral { - /** An array of four `Point` objects defining the vertices of the quadrilateral. */ - points: [Point, Point, Point, Point]; - /** The bounding rectangle of the quadrilateral, represented by a `DSRect` object. */ - boundingRect?: DSRect; - /** The area of the quadrilateral. */ - area?: number; -} - -interface DSFile extends File { - /** Downloads the file in memory to the local drive via the browser. */ - download: () => void; -} - -interface Warning { - /** A unique identifier for the warning message. */ - id: number; - /** The textual description of the warning. */ - message: string; -} - -interface IntermediateResultUnit { - /** A unique identifier for the intermediate result unit. */ - hashId: string; - /** The hash ID of the original image associated with this unit. */ - originalImageHashId: string; - /** The tag associated with the original image. */ - originalImageTag: ImageTag; - /** The type of the intermediate result unit, defined by the enumeration `EnumIntermediateResultUnitType`. */ - unitType: EnumIntermediateResultUnitType; -} - -interface BinaryImageUnit extends IntermediateResultUnit { - /** The image data for the binary image. */ - imageData: DSImageData; -} - -interface ColourImageUnit extends IntermediateResultUnit { - /** The image data for the colour image. */ - imageData: DSImageData; -} - -interface ContoursUnit extends IntermediateResultUnit { - /** An array of `Contour` objects, each representing a series of points that outline a shape within the image. */ - contours: Array; -} - -interface EnhancedGrayscaleImageUnit extends IntermediateResultUnit { - /** The image data for the enhanced grayscale image. */ - imageData: DSImageData; -} - -interface GrayscaleImageUnit extends IntermediateResultUnit { - /** The image data for the grayscale image. */ - imageData: DSImageData; -} - -interface IntermediateResult { - /** An array of `IntermediateResultUnit` objects, each representing a different type of intermediate result. */ - intermediateResultUnits: Array; -} - -interface IntermediateResultExtraInfo { - /** The property indicates the name of the `TargetROIDef` object that generates the intermediate result. */ - targetROIDefName: string; - /** The name of the processing task to which this result belongs. */ - taskName: string; - /** Indicates whether the result is at the section level. */ - isSectionLevelResult: boolean; - /** The type of section, if applicable, as defined by the enumeration `EnumSectionType`. */ - sectionType: EnumSectionType; -} - -interface LineSegmentsUnit extends IntermediateResultUnit { - /** An array of `LineSegment` objects, each representing a segment of a line detected within the image. */ - lineSegments: Array; -} - -interface RegionObjectElement { - /** The location of the region object, represented as a quadrilateral. */ - location: Quadrilateral; - /** A reference to another `RegionObjectElement`. */ - referencedElement: RegionObjectElement; - /** The type of the region object element, defined by the enumeration EnumRegionObjectElementType. */ - elementType: EnumRegionObjectElementType; -} - -interface PredetectedRegionElement extends RegionObjectElement { - /** The name of the detection mode used to detect this region element. */ - modeName: string; - /** The ID of the label associated with this region element. */ - labelID: number; - /** The name of the label associated with this region element. */ - labelName: string; -} - -interface PredetectedRegionsUnit extends IntermediateResultUnit { - /** An array of `PredetectedRegionElement` objects, each representing a pre-detected region detected within the image. */ - predetectedRegions: Array; -} - -interface ScaledColourImageUnit extends IntermediateResultUnit { - /** The image data for the scaled colour image. */ - imageData: DSImageData; -} - -interface ShortLinesUnit extends IntermediateResultUnit { - /** An array of `LineSegment` objects, each representing a short line detected within the image. */ - shortLines: Array; -} - -interface TextRemovedBinaryImageUnit extends IntermediateResultUnit { - /** The image data for the text-removed binary image. */ - imageData: DSImageData; -} - -interface TextureDetectionResultUnit extends IntermediateResultUnit { - /** This value represents the detected horizontal distance in pixels between consecutive texture patterns, providing an indication of the texture's density and orientation within the image. */ - xSpacing: number; - /** - * The spacing between texture stripes in the y-direction. Similar to `xSpacing`, this value measures the vertical distance between texture patterns. - * It offers insights into the vertical density and alignment of the texture within the image, contributing to the understanding of the texture's characteristics and spatial distribution. - */ - ySpacing: number; -} - -interface TextureRemovedBinaryImageUnit extends IntermediateResultUnit { - /** The image data for the texture-removed binary image. */ - imageData: DSImageData; -} - -interface TextureRemovedGrayscaleImageUnit extends IntermediateResultUnit { - /** The image data for the texture-removed grayscale image. */ - imageData: DSImageData; -} - -interface TextZone { - /** The location of the text zone. */ - location: Quadrilateral; - /** The indices of the character contours. */ - charContoursIndices: Array; -} - -interface TextZonesUnit extends IntermediateResultUnit { - /** An array of `TextZone` objects, each representing the geometric boundaries of a detected text zone within the image. */ - textZones: Array; -} - -interface TransformedGrayscaleImageUnit extends IntermediateResultUnit { - /** The image data for the transformed grayscale image. */ - imageData: DSImageData; -} - -/** - * The `ObservationParameters` interface represents an object used to configure intermediate result observation. - */ -interface ObservationParameters { - /** - * Sets the types of intermediate result units that are observed. - * @param types The types of intermediate result units to observe. - * @returns A promise that resolves when the types have been successfully set. It does not provide any value upon resolution. - */ - setObservedResultUnitTypes: (types: bigint) => void; - /** - * Retrieves the types of intermediate result units that are observed. - * @returns A promise that resolves with a number that represents the types that are observed. - */ - getObservedResultUnitTypes: () => bigint; - /** - * Determines whether the specified result unit type is observed. - * @param type The result unit type to check. - * @returns Boolean indicating whether the result unit type is observed. - */ - isResultUnitTypeObserved: (type: EnumIntermediateResultUnitType) => boolean; - /** - * Adds an observed task by its name. - * @param taskName The name of the task. - */ - addObservedTask: (taskName: string) => void; - /** - * Removes an observed task by its name. - * @param taskName The name of the task. - */ - removeObservedTask: (taskName: string) => void; - /** - * Determines whether the specified task is observed. - * @param taskName The name of the task. - * @returns Boolean indicating whether the task is observed. - */ - isTaskObserved: (taskName: string) => boolean; -} - -interface CapturedResultBase { - /** Error code associated with the capture result. */ - readonly errorCode: number; - /** Error string providing details about the error. */ - readonly errorString: string; - /** The hash ID of the original image. */ - readonly originalImageHashId: string; - /** The tag associated with the original image. */ - readonly originalImageTag: ImageTag; -} - -interface ErrorInfo { - errorCode: EnumErrorCode; - errorString: string; -} - -interface AuxiliaryRegionElement extends RegionObjectElement { - /** The name of this auxiliary region(e.g., "PortraitZone", "SignatureArea"). */ - name: string; - /** The confidence level of this auxiliary region detection, typically in the range [0, 100] */ - confidence: number; -} - -declare const mapAsyncDependency: { - [key: string]: any; -}; -declare const waitAsyncDependency: (depName: string | string[]) => Promise; -declare const doOrWaitAsyncDependency: (depName: string | string[], asyncFunc: () => Promise) => Promise; -declare const imagePtrToUint8Array: (data: { - ptr: number; - length: number; -}) => Promise; -declare const resolveDsImageData: (point: number) => Promise; -declare let worker: Worker; -declare const getNextTaskID: () => number; -declare const mapTaskCallBack: { - [key: string]: (body: any) => void; -}; -declare let onLog: (message: string) => void | undefined; -declare const setOnLog: (value: typeof onLog) => void; -declare let bDebug: boolean; -declare const setBDebug: (value: boolean) => void; -declare const innerVersions: InnerVersions; -declare const mapPackageRegister: { - [key: string]: any; -}; -declare const workerAutoResources: WorkerAutoResources; -declare class CoreModule { - static get engineResourcePaths(): EngineResourcePaths; - static set engineResourcePaths(value: EngineResourcePaths); - private static _bSupportDce4Module; - static get bSupportDce4Module(): number; - private static _bSupportIRTModule; - static get bSupportIRTModule(): number; - private static _versions; - static get versions(): any; - static get _onLog(): (message: string) => void; - static set _onLog(value: (message: string) => void); - static get _bDebug(): boolean; - static set _bDebug(value: boolean); - static _bundleEnv: "DCV" | "DBR"; - static get _workerName(): string; - private static _wasmLoadOptions; - static get wasmLoadOptions(): WasmLoadOptions; - static set wasmLoadOptions(options: WasmLoadOptions); - static loadedWasmType: Exclude; - /** - * Initiates the loading process for the .wasm file(s) corresponding to the specified module(s). - * If a module relies on other modules, the other modules will be loaded as well. - * - * @returns A promise that resolves when the resources have been successfully released. It does not provide any value upon resolution. - */ - static isModuleLoaded(name?: string): boolean; - static loadWasm(): Promise; - /** - * An event that fires during the loading of a WebAssembly module (.wasm). - * - * @param filePath The path of the wasm file. - * @param tag Indicates the ongoing status of the file download ("starting", "in progress", "completed"). - * @param progress An object indicating the progress of the download, with `loaded` and `total` bytes. - */ - static onWasmLoadProgressChanged: (filePath: string, tag: "starting" | "in progress" | "completed", progress: { - loaded: number; - total: number; - }) => void; - /** - * Detect environment and get a report. - */ - static detectEnvironment(): Promise; - /** - * modify from https://gist.github.com/2107/5529665 - * @ignore - */ - static browserInfo: any; - static getModuleVersion(): Promise; - static getVersion(): string; - static enableLogging(): void; - static disableLogging(): void; - static cfd(count: number): Promise; -} - -declare abstract class ImageSourceAdapter { - #private; - /** - * @ignore - */ - static _onLog: (message: any) => void; - /** - * @ignore - */ - get _isFetchingStarted(): boolean; - constructor(); - abstract hasNextImageToFetch(): boolean; - /** - * @brief Sets the error listener for the image source. - * - * This function allows you to set an error listener object that will receive - * notifications when errors occur during image source operations. - * If an error occurs, the error information will be passed to the listener's - * OnErrorReceived method. - * - * @param listener An instance of ImageSourceErrorListener or its - * derived class, which will handle error notifications. - */ - setErrorListener(listener: ImageSourceErrorListener): void; - /** - * Adds an image to the internal buffer. - * - * @param image An instance of `DSImageData` containing the image to buffer. - */ - addImageToBuffer(image: DSImageData): void; - /** - * Retrieves a buffered image, of type `DSImageData`. - * - * This function retrieves the latest image added to the buffer, and removes it from the buffer in the process. - * - * @returns A `DSImageData` object retrieved from the buffer which contains the image data of the frame and related information. - */ - getImage(): DSImageData; - /** - * Sets the processing priority of a specific image. This can affect the order in which images are returned by getImage. - * - * @param imageId The ID of the image to prioritize. - * @param keepInBuffer [Optional] Boolean indicating whether to keep the image in the buffer after it has been returned. - */ - setNextImageToReturn(imageId: number, keepInBuffer?: boolean): void; - /** - * @ignore - */ - _resetNextReturnedImage(): void; - /** - * Checks if an image with the specified ID is present in the buffer. - * - * @param imageId The ID of the image to check. - * - * @returns Boolean indicating whether the image is present in the buffer. - */ - hasImage(imageId: number): boolean; - /** - * Starts the process of fetching images. - */ - startFetching(): void; - /** - * Stops the process of fetching images. - * to false, indicating that image fetching has been halted. - */ - stopFetching(): void; - /** - * Sets the maximum number of images that can be buffered at any time. Implementing classes should attempt to keep the buffer within this limit. - * - * @param count The maximum number of images the buffer can hold. - */ - setMaxImageCount(count: number): void; - /** - * Retrieves the maximum number of images that can be buffered. - * - * @returns The maximum image count for the buffer. - */ - getMaxImageCount(): number; - /** - * Retrieves the current number of images in the buffer. - * - * @returns The current image count in the buffer. - */ - getImageCount(): number; - /** - * Clears all images from the buffer, resetting the state for new image fetching. - */ - clearBuffer(): void; - /** - * Determines whether the buffer is currently empty. - * - * @returns Boolean indicating whether the buffer is empty. - */ - isBufferEmpty(): boolean; - /** - * Sets the behavior for handling new incoming images when the buffer is full. Implementations should adhere to the specified mode to manage buffer overflow. - * - * @param mode One of the modes defined in EnumBufferOverflowProtectionMode, specifying how to handle buffer overflow. - */ - setBufferOverflowProtectionMode(mode: EnumBufferOverflowProtectionMode): void; - /** - * Retrieves the current mode for handling buffer overflow. - * - * @returns The current buffer overflow protection mode. - */ - getBufferOverflowProtectionMode(): EnumBufferOverflowProtectionMode; - /** - * Sets the usage type for color channels in images. - * - * @param type One of the types defined in EnumColourChannelUsageType, specifying how color channels should be used. - */ - setColourChannelUsageType(type: EnumColourChannelUsageType): void; - /** - * Retrieves the current mode for handling buffer overflow. - * - * @returns The current buffer overflow protection mode. - */ - getColourChannelUsageType(): EnumColourChannelUsageType; -} - -/** - * Judge if the input is an object(exclude array and function). If `null` or `undefined`, return `false`. - * @param value - * @returns - */ -declare const isObject: (value: any) => value is Object; -/** - * Judge is the input is a {@link Arc} object. - * @param value - * @returns - * @ignore - */ -declare const isArc: (value: any) => value is Arc; -/** - * Judge is the input is a {@link Contour} object. - * @param value - * @returns - * @ignore - */ -declare const isContour: (value: any) => value is Contour; -declare const isDsImageKeyValue: (k: any, v: any) => boolean; -declare const isOriginalDsImageData: (value: any) => boolean; -/** - * Judge is the input is a {@link DSImageData} object. - * @param value - * @returns - * @ignore - */ -declare const isDSImageData: (value: any) => value is DSImageData; -/** - * Judge is the input is a {@link DSRect} object. - * @param value - * @returns - * @ignore - */ -declare const isDSRect: (value: any) => value is DSRect; -/** - * Judge is the input is a {@link ImageTag} object. - * @param value - * @returns - * @ignore - */ -declare const isImageTag: (value: any) => value is ImageTag; -/** - * Judge is the input is a {@link LineSegment} object. - * @param value - * @returns - * @ignore - */ -declare const isLineSegment: (value: any) => value is LineSegment; -/** - * Judge is the input is a {@link Point} object. - * @param value - * @returns - * @ignore - */ -declare const isPoint: (value: any) => value is Point; -/** - * Judge is the input is a {@link Polygon} object. - * @param value - * @returns - * @ignore - */ -declare const isPolygon: (value: any) => value is Polygon; -/** - * Judge is the input is a {@link Quadrilateral} object. - * @param value - * @returns - * @ignore - */ -declare const isQuad: (value: any) => value is Quadrilateral; -/** - * Judge is the input is a {@link Rect} object. - * @param value - * @returns - * @ignore - */ -declare const isRect: (value: any) => value is Rect; - -declare const requestResource: (url: string, type: "text" | "blob" | "arraybuffer", callbacks?: { - loadstartCallback?: () => any; - progressCallback?: (pe: any) => any; - loadendCallback?: () => any; -}) => Promise; -declare const checkIsLink: (str: string) => boolean; -declare const compareVersion: (strV1: string, strV2: string) => number; -declare const handleEngineResourcePaths: (engineResourcePaths: EngineResourcePaths) => EngineResourcePaths; -declare const _saveToFile: (imageData: ImageData, name: string, download?: boolean) => Promise; -declare const _toCanvas: (imageData: ImageData | DSImageData) => HTMLCanvasElement; -declare const _toImage: (MIMEType: MimeType, imageData: ImageData | DSImageData) => HTMLImageElement; -declare const _toBlob: (MIMEType: MimeType, imageData: ImageData | DSImageData) => Promise; -declare const encodeBMP: (imageData: ImageData) => ArrayBuffer; -declare const createImageData: (dsImageData: DSImageData) => ImageData; -declare const isSimdSupported: () => boolean; -declare const blobToDsImage: (blob: Blob) => Promise; -declare const e: (d: any, s: any) => Promise; -declare const d: (d: any, s: any) => Promise; -declare const productNameMap: { - readonly std: "dynamsoft-capture-vision-std"; - readonly dip: "dynamsoft-image-processing"; - readonly core: "dynamsoft-core"; - readonly dnn: "dynamsoft-capture-vision-dnn"; - readonly license: "dynamsoft-license"; - readonly utility: "dynamsoft-utility"; - readonly cvr: "dynamsoft-capture-vision-router"; - readonly dbr: "dynamsoft-barcode-reader"; - readonly dlr: "dynamsoft-label-recognizer"; - readonly ddn: "dynamsoft-document-normalizer"; - readonly dcp: "dynamsoft-code-parser"; - readonly dcvData: "dynamsoft-capture-vision-data"; - readonly dce: "dynamsoft-camera-enhancer"; - readonly identityutility: "dynamsoft-identity-utility"; - readonly ddv: "dynamsoft-document-viewer"; - readonly dwt: "dwt"; - readonly dbrBundle: "dynamsoft-barcode-reader-bundle"; - readonly dcvBundle: "dynamsoft-capture-vision-bundle"; -}; - -export { Arc, AuxiliaryRegionElement, BinaryImageUnit, CapturedResultBase, CapturedResultItem, ColourImageUnit, Contour, ContoursUnit, CoreModule, Corner, DSFile, DSImageData, DSRect, DwtInfo, Edge, EngineResourcePaths, EnhancedGrayscaleImageUnit, EnumBufferOverflowProtectionMode, EnumCapturedResultItemType, EnumColourChannelUsageType, EnumCornerType, EnumCrossVerificationStatus, EnumErrorCode, EnumGrayscaleEnhancementMode, EnumGrayscaleTransformationMode, EnumImageCaptureDistanceMode, EnumImageFileFormat, EnumImagePixelFormat, EnumImageTagType, EnumIntermediateResultUnitType, EnumModuleName, EnumPDFReadingMode, EnumRasterDataSource, EnumRegionObjectElementType, EnumSectionType, ErrorInfo, FileImageTag, GrayscaleImageUnit, ImageSourceAdapter, ImageSourceErrorListener, ImageTag, InnerVersions, IntermediateResult, IntermediateResultExtraInfo, IntermediateResultUnit, LineSegment, LineSegmentsUnit, MapController, MimeType, ObservationParameters, OriginalImageResultItem, PDFReadingParameter, PathInfo, Point, Polygon, PostMessageBody, PredetectedRegionElement, PredetectedRegionsUnit, Quadrilateral, Rect, RegionObjectElement, ScaledColourImageUnit, ShortLinesUnit, TextRemovedBinaryImageUnit, TextZone, TextZonesUnit, TextureDetectionResultUnit, TextureRemovedBinaryImageUnit, TextureRemovedGrayscaleImageUnit, TransformedGrayscaleImageUnit, Warning, WasmLoadOptions, WasmType, WasmVersions, WorkerAutoResources, _saveToFile, _toBlob, _toCanvas, _toImage, bDebug, blobToDsImage, checkIsLink, compareVersion, createImageData, d, doOrWaitAsyncDependency, e, encodeBMP, getNextTaskID, handleEngineResourcePaths, imagePtrToUint8Array, innerVersions, isArc, isContour, isDSImageData, isDSRect, isDsImageKeyValue, isImageTag, isLineSegment, isObject, isOriginalDsImageData, isPoint, isPolygon, isQuad, isRect, isSimdSupported, mapAsyncDependency, mapPackageRegister, mapTaskCallBack, onLog, productNameMap, requestResource, resolveDsImageData, setBDebug, setOnLog, waitAsyncDependency, worker, workerAutoResources }; - - - - - - -interface CapturedResult extends CapturedResultBase { - /** An array of `CapturedResultItem` objects representing the captured result items. */ - items: Array; - /** The decoded barcode results within the original image. */ - decodedBarcodesResult?: DecodedBarcodesResult; - /** The recognized textLine results within the original image. */ - recognizedTextLinesResult?: RecognizedTextLinesResult; - /** The processed document results within the original image. */ - processedDocumentResult?: ProcessedDocumentResult; - /** The parsed results within the original image. */ - parsedResult?: ParsedResult; -} - -declare class CapturedResultReceiver { - /** - * Event triggered when a generic captured result is available, occurring each time an image finishes its processing. - * This event can be used for any result that does not fit into the specific categories of the other callback events. - * @param result The captured result, an instance of `CapturedResult`. - */ - onCapturedResultReceived?: (result: CapturedResult) => void; - /** - * Event triggered when the original image result is available. - * This event is used to handle the original image captured by an image source such as Dynamsoft Camera Enhancer. - * @param result The original image result, an instance of `OriginalImageResultItem`. - */ - onOriginalImageResultReceived?: (result: OriginalImageResultItem) => void; - onDecodedBarcodesReceived?: (result: DecodedBarcodesResult) => void; - onRecognizedTextLinesReceived?: (result: RecognizedTextLinesResult) => void; - onProcessedDocumentResultReceived?: (result: ProcessedDocumentResult) => void; - onParsedResultsReceived?: (result: ParsedResult) => void; -} - -declare class BufferedItemsManager { - private _cvr; - constructor(cvr: any); - /** - * Gets the maximum number of buffered items. - * @returns Returns the maximum number of buffered items. - */ - getMaxBufferedItems(): Promise; - /** - * Sets the maximum number of buffered items. - * @param count the maximum number of buffered items - */ - setMaxBufferedItems(count: number): Promise; - /** - * Gets the buffered character items. - * @return the buffered character items - */ - getBufferedCharacterItemSet(): Promise; -} - -declare class IntermediateResultReceiver { - private _observedResultUnitTypes; - private _observedTaskMap; - private _parameters; - /** - * Gets the observed parameters of the intermediate result receiver. Allowing for configuration of intermediate result observation. - * @return The observed parameters, of type ObservationParameters. The default parameters are to observe all intermediate result unit types and all tasks. - */ - getObservationParameters(): ObservationParameters; - onTaskResultsReceived?: (result: IntermediateResult, info: IntermediateResultExtraInfo) => void; - onPredetectedRegionsReceived?: (result: PredetectedRegionsUnit, info: IntermediateResultExtraInfo) => void; - onTargetROIResultsReceived?: (result: IntermediateResultUnit, info: IntermediateResultExtraInfo) => void; - onColourImageUnitReceived?: (result: ColourImageUnit, info: IntermediateResultExtraInfo) => void; - onScaledColourImageUnitReceived?: (result: ScaledColourImageUnit, info: IntermediateResultExtraInfo) => void; - onGrayscaleImageUnitReceived?: (result: GrayscaleImageUnit, info: IntermediateResultExtraInfo) => void; - onTransformedGrayscaleImageUnitReceived?: (result: TransformedGrayscaleImageUnit, info: IntermediateResultExtraInfo) => void; - onEnhancedGrayscaleImageUnitReceived?: (result: EnhancedGrayscaleImageUnit, info: IntermediateResultExtraInfo) => void; - onBinaryImageUnitReceived?: (result: BinaryImageUnit, info: IntermediateResultExtraInfo) => void; - onTextureDetectionResultUnitReceived?: (result: TextureDetectionResultUnit, info: IntermediateResultExtraInfo) => void; - onTextureRemovedGrayscaleImageUnitReceived?: (result: TextureRemovedGrayscaleImageUnit, info: IntermediateResultExtraInfo) => void; - onTextureRemovedBinaryImageUnitReceived?: (result: TextureRemovedBinaryImageUnit, info: IntermediateResultExtraInfo) => void; - onContoursUnitReceived?: (result: ContoursUnit, info: IntermediateResultExtraInfo) => void; - onLineSegmentsUnitReceived?: (result: LineSegmentsUnit, info: IntermediateResultExtraInfo) => void; - onTextZonesUnitReceived?: (result: TextZonesUnit, info: IntermediateResultExtraInfo) => void; - onTextRemovedBinaryImageUnitReceived?: (result: TextRemovedBinaryImageUnit, info: IntermediateResultExtraInfo) => void; - onShortLinesUnitReceived?: (result: ShortLinesUnit, info: IntermediateResultExtraInfo) => void; - onCandidateBarcodeZonesUnitReceived?: (result: CandidateBarcodeZonesUnit, info: IntermediateResultExtraInfo) => void; - onComplementedBarcodeImageUnitReceived?: (result: ComplementedBarcodeImageUnit, info: IntermediateResultExtraInfo) => void; - onDecodedBarcodesReceived?: (result: DecodedBarcodesUnit, info: IntermediateResultExtraInfo) => void; - onDeformationResistedBarcodeImageUnitReceived?: (result: DeformationResistedBarcodeImageUnit, info: IntermediateResultExtraInfo) => void; - onLocalizedBarcodesReceived?: (result: LocalizedBarcodesUnit, info: IntermediateResultExtraInfo) => void; - onScaledBarcodeImageUnitReceived?: (result: ScaledBarcodeImageUnit, info: IntermediateResultExtraInfo) => void; - onLocalizedTextLinesReceived?: (result: LocalizedTextLinesUnit, info: IntermediateResultExtraInfo) => void; - onRawTextLinesUnitReceived?: (result: RawTextLinesUnit, info: IntermediateResultExtraInfo) => void; - onRecognizedTextLinesReceived?: (result: RecognizedTextLinesUnit, info: IntermediateResultExtraInfo) => void; - onCandidateQuadEdgesUnitReceived?: (result: CandidateQuadEdgesUnit, info: IntermediateResultExtraInfo) => void; - onCornersUnitReceived?: (result: CornersUnit, info: IntermediateResultExtraInfo) => void; - onDeskewedImageReceived?: (result: DeskewedImageUnit, info: IntermediateResultExtraInfo) => void; - onDetectedQuadsReceived?: (result: DetectedQuadsUnit, info: IntermediateResultExtraInfo) => void; - onEnhancedImageReceived?: (result: EnhancedImageUnit, info: IntermediateResultExtraInfo) => void; - onLogicLinesUnitReceived?: (result: LogicLinesUnit, info: IntermediateResultExtraInfo) => void; - onLongLinesUnitReceived?: (result: LongLinesUnit, info: IntermediateResultExtraInfo) => void; -} - -declare class IntermediateResultManager { - private _cvr; - private _irrRegistryState; - _intermediateResultReceiverSet: Set; - constructor(cvr: any); - /** - * Adds a `IntermediateResultReceiver` object as the receiver of intermediate results. - * @param receiver The receiver object, of type `IntermediateResultReceiver`. - */ - addResultReceiver(receiver: IntermediateResultReceiver): Promise; - /** - * Removes the specified `IntermediateResultReceiver` object. - * @param receiver The receiver object, of type `IntermediateResultReceiver`. - */ - removeResultReceiver(receiver: IntermediateResultReceiver): Promise; - removeAllResultReceivers(): Promise; - /** - * Retrieves the original image data. - * - * @returns A promise that resolves when the operation has successfully completed. It provides the original image upon resolution. - */ - getOriginalImage(): DSImageData; -} - -declare enum EnumImageSourceState { - /** - * Indicates that the buffer of the image source is currently empty. - */ - ISS_BUFFER_EMPTY = 0, - /** - * Signifies that the source for the image source has been depleted. - */ - ISS_EXHAUSTED = 1 -} - -interface ImageSourceStateListener { - /** - * Event triggered whenever there is a change in the image source's state. - * @param status This parameter indicates the current status of the image source, using the `EnumImageSourceState` type. - * This enumeration defines various possible states of an image source. - */ - onImageSourceStateReceived?: (status: EnumImageSourceState) => void; -} - -interface SimplifiedCaptureVisionSettings { - /** - * Specifies weather to output the original image. - */ - outputOriginalImage: boolean; - /** - * Designates the region of interest (ROI) within an image, limiting the image processing activities exclusively to this specified area. It is of type `Quadrilateral`. - */ - roi: Quadrilateral; - /** - * Determines if the coordinates for the region of interest (ROI) are expressed in percentage terms (true) or as exact pixel measurements (false). - */ - roiMeasuredInPercentage: boolean; - /** - * Specifies the timeout duration for processing an image, in milliseconds. - */ - timeout: number; - /** - * Specifies the shortest time span, in milliseconds, that must elapse between two successive image captures. Opting for a higher interval decreases capture frequency, which can lower the system's processing load and conserve energy. On the other hand, a smaller interval value increases the frequency of image captures, enhancing the system's responsiveness. - * @remarks Handling of Special Values: - * 0 (The default setting): Adopting this value means the image source queues up the next image for immediate availability once processing of the current image is finished, facilitating continuous, uninterrupted image processing. - */ - minImageCaptureInterval: number; - /** - * Specifies the basic settings for the barcode reader module. It is of type `SimplifiedBarcodeReaderSettings`. - */ - barcodeSettings: SimplifiedBarcodeReaderSettings; - /** - * Specifies the basic settings for the document normalizer module. It is of type `SimplifiedDocumentNormalizerSettings`. - */ - documentSettings: SimplifiedDocumentNormalizerSettings; - /** - * Specifies the basic settings for the label recognizer module. It is of type `SimplifiedLabelRecognizerSettings`. - */ - labelSettings: SimplifiedLabelRecognizerSettings; -} - -interface CapturedResultFilter { - onOriginalImageResultReceived?: (result: OriginalImageResultItem) => void; - onDecodedBarcodesReceived?: (result: DecodedBarcodesResult) => void; - onRecognizedTextLinesReceived?: (result: RecognizedTextLinesResult) => void; - onProcessedDocumentResultReceived?: (result: ProcessedDocumentResult) => void; - onParsedResultsReceived?: (result: ParsedResult) => void; - getFilteredResultItemTypes(): number; -} - -declare class CaptureVisionRouter { - #private; - static _onLog: (message: string) => void; - static _defaultTemplate: string; - private static _isNoOnnx; - /** - * The maximum length of the longer side of the image to be processed. The default value is 2048 pixels in mobile devices and 4096 pixels in desktop browser. - */ - maxImageSideLength: number; - /** - * An event that fires during the loading of a recognition data file (.data). - * @param filePath The path of the recognition data file. - * @param tag Indicates the ongoing status of the file download ("starting", "in progress", "completed"). - * @param progress An object indicating the progress of the download, with `loaded` and `total` bytes. - */ - static onDataLoadProgressChanged: (filePath: string, tag: "starting" | "in progress" | "completed", progress: { - loaded: number; - total: number; - }) => void; - /** - * An event that fires when an error occurs from the start of capturing process. - * @param error The error object that contains the error code and error string. - */ - onCaptureError: (error: Error) => void; - provideDsImage: DSImageData; - _instanceID: number; - private _loopReadVideoTimeoutId; - private _isOutputOriginalImage; - private _isOpenDetectVerify; - private _isOpenNormalizeVerify; - private _isOpenBarcodeVerify; - private _isOpenLabelVerify; - private _minImageCaptureInterval; - private _averageProcessintTimeArray; - private _averageFetchImageTimeArray; - private _currentSettings; - private _averageTime; - private _dynamsoft; - private _enhancedFeaturesIrr; - private _templateName; - private _isCapturing; - private _s; - /** - * Returns whether the `CaptureVisionRouter` instance has been disposed of. - * - * @returns Boolean indicating whether the `CaptureVisionRouter` instance has been disposed of. - */ - get disposed(): boolean; - get isCapturing(): boolean; - /** - * Initializes a new instance of the `CaptureVisionRouter` class. - * - * @returns A promise that resolves with the initialized `CaptureVisionRouter` instance. - */ - static createInstance(loadPresetTemplates?: boolean): Promise; - /** - * Appends a deep learning model to the memory buffer. - * @param dataName Specifies the name of the model. - * @param dataPath [Optional] Specifies the path to find the model file. If not specified, the default path points to the package "dynamsoft-capture-vision-data". - * - * @returns A promise that resolves once the model file is successfully loaded. It does not provide any value upon resolution. - */ - static appendDLModelBuffer(modelName: string | Array, dataPath?: string): Promise; - /** - * Clears all deep learning models from buffer to free up memory - */ - static clearDLModelBuffers(): Promise; - private _singleFrameModeCallback; - private _singleFrameModeCallbackBind; - /** - * Sets up an image source to provide images for continuous processing. - * @param imageSource The image source which is compliant with the `ImageSourceAdapter` interface. - */ - setInput(imageSource: ImageSourceAdapter | any): void; - /** - * Returns the image source object. - */ - getInput(): ImageSourceAdapter; - /** - * Adds listeners for image source state change. - */ - addImageSourceStateListener(listener: ImageSourceStateListener): void; - /** - * Removes listeners for image source state change. - */ - removeImageSourceStateListener(listener: ImageSourceStateListener): boolean; - /** - * Adds a `CapturedResultReceiver` object as the receiver of captured results. - * @param receiver The receiver object, of type `CapturedResultReceiver`. - */ - addResultReceiver(receiver: CapturedResultReceiver): Promise; - /** - * Removes the specified `CapturedResultReceiver` object. - * @param receiver The receiver object, of type `CapturedResultReceiver`. - */ - removeResultReceiver(receiver: CapturedResultReceiver): Promise; - removeAllResultReceivers(): Promise; - private _setCrrRegistry; - /** - * Adds a `MultiFrameResultCrossFilter` object to filter non-essential results. - * @param filter The filter object, of type `MultiFrameResultCrossFilter`. - * - * @returns A promise that resolves when the operation has successfully completed. It does not provide any value upon resolution. - */ - addResultFilter(filter: CapturedResultFilter): Promise; - /** - * Removes the specified `MultiFrameResultCrossFilter` object. - * @param filter The filter object, of type `MultiFrameResultCrossFilter`. - * - * @returns A promise that resolves when the operation has successfully completed. It does not provide any value upon resolution. - */ - removeResultFilter(filter: CapturedResultFilter): Promise; - removeAllResultFilters(): Promise; - private _handleFilterUpdate; - /** - * Initiates a capturing process based on a specified template. This process is repeated for each image fetched from the source. - * @param templateName [Optional] Specifies a "CaptureVisionTemplate" to use. - * - * @returns A promise that resolves when the capturing process has successfully started. It does not provide any value upon resolution. - */ - startCapturing(templateName: string): Promise; - /** - * Stops the capturing process. - */ - stopCapturing(): void; - containsTask(templateName: string): Promise; - /** - * Switches the currently active capturing template during the image processing workflow. This allows dynamic reconfiguration of the capture process without restarting or reinitializing the system, enabling different settings or rules to be applied on the fly. - * - * @param templateName The name of the new capturing template to apply. - * - * @return A promise with an ErrorInfo object that resolves when the operation has completed, containing the result of the operation. - * - */ - switchCapturingTemplate(templateName: string): Promise; - /** - * Video stream capture, recursive call, loop frame capture - */ - private barcodeScanLoop; - private continueLoop; - getClarity(dsimage: DSImageData, bitcount: number, wr: number, hr: number, grayThreshold: number): Promise; - /** - * Processes a single image or a file containing a single image to derive important information. - * @param imageOrFile Specifies the image or file to be processed. The following data types are accepted: `Blob`, `HTMLImageElement`, `HTMLCanvasElement`, `HTMLVideoElement`, `DSImageData`, `string`. - * @param templateName [Optional] Specifies a "CaptureVisionTemplate" to use. - * - * @returns A promise that resolves with a `CapturedResult` object which contains the derived information from the image processed. - */ - capture(imageOrFile: Blob | string | DSImageData | HTMLImageElement | HTMLVideoElement | HTMLCanvasElement, templateName?: string): Promise; - private _captureDsimage; - private _captureUrl; - private _captureBase64; - private _captureBlob; - private _captureImage; - private _captureCanvas; - private _captureVideo; - private _captureInWorker; - /** - * Configures runtime settings using a provided JSON string, an object, or a URL pointing to an object, which contains settings for one or more `CaptureVisionTemplates`. - * @param settings A JSON string, an object, or a URL pointing to an object that contains settings for one or more `CaptureVisionTemplates`. - * - * @returns A promise that resolves when the operation has completed. It provides an object that describes the result. - */ - initSettings(settings: string | object): Promise; - /** - * Returns an object that contains settings for the specified `CaptureVisionTemplate`. - * @param templateName Specifies a `CaptureVisionTemplate` by its name. If passed "*", the returned object will contain all templates. - * - * @returns A promise that resolves with the object that contains settings for the specified template or all templates. - */ - outputSettings(templateName: string, includeDefaultValues?: boolean): Promise; - /** - * Generates a Blob object or initiates a JSON file download containing the settings for the specified `CaptureVisionTemplate`. - * @param templateName Specifies a `CaptureVisionTemplate` by its name. If passed "*", the returned object will contain all templates. - * @param fileName Specifies the name of the file. - * @param download Boolean that specifies whether to initiates a file download. - * - * @returns A promise that resolves with the Blob object that contains settings for the specified template or all templates. - */ - outputSettingsToFile(templateName: string, fileName: string, download?: boolean, includeDefaultValues?: boolean): Promise; - /** Get all parameter template names. - * - * @returns A promise that resolves with an array of template names. - */ - getTemplateNames(): Promise>; - /** - * Retrieves a JSON object that contains simplified settings for the specified `CaptureVisionTemplate`. - * @param templateName Specifies a `CaptureVisionTemplate` by its name. - * - * @returns A promise that resolves with a JSON object, of type `SimplifiedCaptureVisionSettings`, which represents the simplified settings for the specified template. - * @remarks If the settings of the specified template are too complex, we cannot create a SimplifiedCaptureVisionSettings, and as a result, it will return an error. - */ - getSimplifiedSettings(templateName: string): Promise; - /** - * Updates the specified `CaptureVisionTemplate` with an updated `SimplifiedCaptureVisionSettings` object. - * @param templateName Specifies a `CaptureVisionTemplate` by its name. - * @param settings The `SimplifiedCaptureVisionSettings` object that contains updated settings. - * - * @returns A promise that resolves when the operation has completed. It provides an object that describes the result. - */ - updateSettings(templateName: string, settings: SimplifiedCaptureVisionSettings): Promise; - /** - * Restores all runtime settings to their original default values. - * - * @returns A promise that resolves when the operation has completed. It provides an object that describes the result. - */ - resetSettings(): Promise; - /** - * Returns an object, of type `BufferedItemsManager`, that manages buffered items. - * @returns The `BufferedItemsManager` object. - */ - getBufferedItemsManager(): BufferedItemsManager; - /** - * Returns an object, of type `IntermediateResultManager`, that manages intermediate results. - * - * @returns The `IntermediateResultManager` object. - */ - getIntermediateResultManager(): IntermediateResultManager; - /** - * Sets the global number of threads used internally for model execution. - * @param intraOpNumThreads Number of threads used internally for model execution. - */ - static setGlobalIntraOpNumThreads(intraOpNumThreads?: number): Promise; - checkTemplateNameValidity(templateName: string): Promise; - parseRequiredResources(templateName: string): Promise<{ - models: string[]; - specss: string[]; - }>; - /** - * Releases all resources used by the `CaptureVisionRouter` instance. - * - * @returns A promise that resolves when the resources have been successfully released. It does not provide any value upon resolution. - */ - dispose(): void; - /** - * For Debug - */ - private _getInternalData; - private _getWasmFilterState; -} - -declare class CaptureVisionRouterModule { - private static _version; - /** - * Returns the version of the CaptureVisionRouter module. - */ - static getVersion(): string; -} - -interface RawImageResultItem extends CapturedResultItem { - imageData: DSImageData; -} - -declare enum EnumPresetTemplate { - /** - * @brief Versatile function for barcode reading, document detection, or text recognition. - */ - PT_DEFAULT = "Default", - /** - * @brief Scans a single barcode. - */ - PT_READ_BARCODES = "ReadBarcodes_Default", - /** - * @brief Identifies and reads any text present. - */ - PT_RECOGNIZE_TEXT_LINES = "RecognizeTextLines_Default", - /** - * @brief Identifies the edges of a document. - */ - PT_DETECT_DOCUMENT_BOUNDARIES = "DetectDocumentBoundaries_Default", - /** - * @brief Detects document edges and standardizes its format. - */ - PT_DETECT_AND_NORMALIZE_DOCUMENT = "DetectAndNormalizeDocument_Default", - /** - * @brief Adjusts a document to a standard format using detected borders. - */ - PT_NORMALIZE_DOCUMENT = "NormalizeDocument_Default", - /** - * @brief Represents a barcode reading mode where speed is prioritized. - * - * In this mode, the barcode reader will optimize for faster barcode detection - * and decoding, sacrificing some level of accuracy and read rate. It is suitable - * for situations where a quick response time is more important than perfect - * barcode recognition. - */ - PT_READ_BARCODES_SPEED_FIRST = "ReadBarcodes_SpeedFirst", - /** - * @brief Represents a barcode reading mode where barcode read rate is prioritized. - * - * In this mode, the barcode reader will optimize for higher barcode read rates, - * even if it may sometimes result in reduced accuracy and speed. It is suitable for - * scenarios where maximizing the number of successfully read barcodes is critical. - */ - PT_READ_BARCODES_READ_RATE_FIRST = "ReadBarcodes_ReadRateFirst", - /** - * @brief Represents a balanced barcode reading mode. - * - * This mode aims for a reasonable balance between speed and read rate in barcode - * recognition. It is suitable for most common use cases where a compromise between - * speed and read rate is acceptable. - */ - PT_READ_BARCODES_BALANCE = "ReadBarcodes_Balance", - /** - * @brief Represents a barcode reading mode for single barcode code detection. - * - * In this mode, the barcode reader will focus on detecting and decoding a single - * barcode code, ignoring any additional codes in the same image. It is efficient - * when the target image has only one barcode. - */ - PT_READ_SINGLE_BARCODE = "ReadSingleBarcode", - /** - * @brief Represents a barcode reading mode optimized for dense barcode codes. - * - * This mode is designed to handle dense or closely packed barcode codes where - * accuracy is paramount. It may operate slower than other modes but is suitable - * for challenging scenarios where code density is high. - */ - PT_READ_DENSE_BARCODES = "ReadDenseBarcodes", - /** - * @brief Represents a barcode reading mode optimized for distant barcode codes. - * - * This mode is designed to scanning a barcode that is placed far from the device. - */ - PT_READ_DISTANT_BARCODES = "ReadDistantBarcodes", - /** - * @brief Represents a text recognition mode focused on recognizing numbers. - */ - PT_RECOGNIZE_NUMBERS = "RecognizeNumbers", - /** - * @brief Represents a text recognition mode focused on recognizing alphabetic characters (letters). - * - */ - PT_RECOGNIZE_LETTERS = "RecognizeLetters", - /** - * @brief Represents a text recognition mode that combines numbers and alphabetic characters (letters) recognition. - */ - PT_RECOGNIZE_NUMBERS_AND_LETTERS = "RecognizeNumbersAndLetters", - /** - * @brief Represents a text recognition mode that combines numbers and uppercase letters recognition. - */ - PT_RECOGNIZE_NUMBERS_AND_UPPERCASE_LETTERS = "RecognizeNumbersAndUppercaseLetters", - /** - * @brief Represents a text recognition mode focused on recognizing uppercase letters. - */ - PT_RECOGNIZE_UPPERCASE_LETTERS = "RecognizeUppercaseLetters" -} - -export { CaptureVisionRouter, CaptureVisionRouterModule, CapturedResult, CapturedResultFilter, CapturedResultReceiver, EnumImageSourceState, EnumPresetTemplate, ImageSourceStateListener, IntermediateResultReceiver, RawImageResultItem, SimplifiedCaptureVisionSettings }; - - -declare class BarcodeReaderModule { - /** - * Returns the version of the BarcodeReader module. - */ - static getVersion(): string; -} - -declare const EnumBarcodeFormat: { - /**No barcode format in BarcodeFormat*/ - BF_NULL: bigint; - /**All supported formats in BarcodeFormat*/ - BF_ALL: bigint; - /**Use the default barcode format settings*/ - BF_DEFAULT: bigint; - /**Combined value of BF_CODABAR, BF_CODE_128, BF_CODE_39, BF_CODE_39_Extended, BF_CODE_93, BF_EAN_13, BF_EAN_8, INDUSTRIAL_25, BF_ITF, BF_UPC_A, BF_UPC_E, BF_MSI_CODE; */ - BF_ONED: bigint; - /**Combined value of BF_GS1_DATABAR_OMNIDIRECTIONAL, BF_GS1_DATABAR_TRUNCATED, BF_GS1_DATABAR_STACKED, BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL, BF_GS1_DATABAR_EXPANDED, BF_GS1_DATABAR_EXPANDED_STACKED, BF_GS1_DATABAR_LIMITED*/ - BF_GS1_DATABAR: bigint; - /**Code 39 */ - BF_CODE_39: bigint; - /**Code 128 */ - BF_CODE_128: bigint; - /**Code 93 */ - BF_CODE_93: bigint; - /**Codabar */ - BF_CODABAR: bigint; - /**Interleaved 2 of 5 */ - BF_ITF: bigint; - /**EAN-13 */ - BF_EAN_13: bigint; - /**EAN-8 */ - BF_EAN_8: bigint; - /**UPC-A */ - BF_UPC_A: bigint; - /**UPC-E */ - BF_UPC_E: bigint; - /**Industrial 2 of 5 */ - BF_INDUSTRIAL_25: bigint; - /**CODE39 Extended */ - BF_CODE_39_EXTENDED: bigint; - /**GS1 Databar Omnidirectional*/ - BF_GS1_DATABAR_OMNIDIRECTIONAL: bigint; - /**GS1 Databar Truncated*/ - BF_GS1_DATABAR_TRUNCATED: bigint; - /**GS1 Databar Stacked*/ - BF_GS1_DATABAR_STACKED: bigint; - /**GS1 Databar Stacked Omnidirectional*/ - BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL: bigint; - /**GS1 Databar Expanded*/ - BF_GS1_DATABAR_EXPANDED: bigint; - /**GS1 Databar Expaned Stacked*/ - BF_GS1_DATABAR_EXPANDED_STACKED: bigint; - /**GS1 Databar Limited*/ - BF_GS1_DATABAR_LIMITED: bigint; - /**Patch code. */ - BF_PATCHCODE: bigint; - /**Code 32 */ - BF_CODE_32: bigint; - /**PDF417 */ - BF_PDF417: bigint; - /**QRCode */ - BF_QR_CODE: bigint; - /**DataMatrix */ - BF_DATAMATRIX: bigint; - /**AZTEC */ - BF_AZTEC: bigint; - /**MAXICODE */ - BF_MAXICODE: bigint; - /**Micro QR Code*/ - BF_MICRO_QR: bigint; - /**Micro PDF417*/ - BF_MICRO_PDF417: bigint; - /**GS1 Composite Code*/ - BF_GS1_COMPOSITE: bigint; - /**MSI Code*/ - BF_MSI_CODE: bigint; - BF_CODE_11: bigint; - BF_TWO_DIGIT_ADD_ON: bigint; - BF_FIVE_DIGIT_ADD_ON: bigint; - BF_MATRIX_25: bigint; - /**Combined value of BF2_USPSINTELLIGENTMAIL, BF2_POSTNET, BF2_PLANET, BF2_AUSTRALIANPOST, BF2_RM4SCC.*/ - BF_POSTALCODE: bigint; - /**Nonstandard barcode */ - BF_NONSTANDARD_BARCODE: bigint; - /**USPS Intelligent Mail.*/ - BF_USPSINTELLIGENTMAIL: bigint; - /**Postnet.*/ - BF_POSTNET: bigint; - /**Planet.*/ - BF_PLANET: bigint; - /**Australian Post.*/ - BF_AUSTRALIANPOST: bigint; - /**Royal Mail 4-State Customer Barcode.*/ - BF_RM4SCC: bigint; - /**KIX.*/ - BF_KIX: bigint; - /**DotCode.*/ - BF_DOTCODE: bigint; - /**_PHARMACODE_ONE_TRACK.*/ - BF_PHARMACODE_ONE_TRACK: bigint; - /**PHARMACODE_TWO_TRACK.*/ - BF_PHARMACODE_TWO_TRACK: bigint; - /**PHARMACODE.*/ - BF_PHARMACODE: bigint; - /**Telepen*/ - BF_TELEPEN: bigint; - /**Telepen Numeric. A variation of the Telepen format optimized for encoding numeric data only.*/ - BF_TELEPEN_NUMERIC: bigint; -}; -type EnumBarcodeFormat = bigint; - -declare enum EnumExtendedBarcodeResultType { - /**Specifies the standard text. This means the barcode value. */ - EBRT_STANDARD_RESULT = 0, - /**Specifies all the candidate text. This means all the standard text results decoded from the barcode. */ - EBRT_CANDIDATE_RESULT = 1, - /**Specifies the partial text. This means part of the text result decoded from the barcode. */ - EBRT_PARTIAL_RESULT = 2 -} - -declare enum EnumQRCodeErrorCorrectionLevel { - /** High error correction level, allowing for up to 30% data recovery. Suitable for environments where QR codes might be subject to significant damage. */ - QRECL_ERROR_CORRECTION_H = 0, - /** Low error correction level, allowing for up to 7% data recovery. Optimal for scenarios where QR code integrity is less likely to be compromised. */ - QRECL_ERROR_CORRECTION_L = 1, - /** Medium-low error correction level, allowing for up to 15% data recovery. Balances the need for data integrity with the desire to maximize data capacity. */ - QRECL_ERROR_CORRECTION_M = 2, - /** Medium-high error correction level, allowing for up to 25% data recovery. Designed for situations where some QR code damage might be expected. */ - QRECL_ERROR_CORRECTION_Q = 3 -} - -declare enum EnumLocalizationMode { - /** Automatic localization mode selection; not yet implemented. */ - LM_AUTO = 1, - /** Identifies barcodes by finding connected blocks, offering optimal results, especially recommended for highest priority in most scenarios. */ - LM_CONNECTED_BLOCKS = 2, - /** Detects barcodes through analysis of patterns of contiguous black and white regions, tailored for QR Codes and DataMatrix codes. */ - LM_STATISTICS = 4, - /** Locates barcodes by identifying linear patterns, designed primarily for 1D barcodes and PDF417 codes. */ - LM_LINES = 8, - /** Provides rapid barcode localization, suited for interactive applications where speed is crucial. */ - LM_SCAN_DIRECTLY = 16, - /** Targets barcode localization through detection of specific mark groups, optimized for Direct Part Marking (DPM) codes. */ - LM_STATISTICS_MARKS = 32, - /** Combines methods of locating connected blocks and linear patterns to efficiently localize postal codes. */ - LM_STATISTICS_POSTAL_CODE = 64, - /** Initiates barcode localization from the image center, facilitating faster detection in certain layouts. */ - LM_CENTRE = 128, - /** Specialized for quick localization of 1D barcodes, enhancing performance in fast-scan scenarios. */ - LM_ONED_FAST_SCAN = 256, - /**Localizes barcodes by utilizing a neural network model. */ - LM_NEURAL_NETWORK = 512, - /** Reserved for future use in localization mode settings. */ - LM_REV = -2147483648, - /** Omits the localization process entirely. */ - LM_SKIP = 0, - /** Placeholder value with no functional meaning. */ - LM_END = -1 -} - -declare enum EnumDeblurMode { - /** Applies a direct binarization algorithm for generating the binary image. */ - DM_DIRECT_BINARIZATION = 1, - /** Utilizes a threshold binarization algorithm for generating the binary image, dynamically determining the threshold based on the image content. */ - DM_THRESHOLD_BINARIZATION = 2, - /** Employs a gray equalization algorithm to adjust the contrast and brightness, improving the clarity of the gray-scale image before binarization. */ - DM_GRAY_EQUALIZATION = 4, - /** Implements a smoothing algorithm to reduce noise and artifacts, smoothing out the gray-scale image before binarization. */ - DM_SMOOTHING = 8, - /** Uses a morphing algorithm to enhance the gray-scale image before binarization. */ - DM_MORPHING = 16, - /** Engages in a deep analysis of the grayscale image based on the barcode format to intelligently generate the optimized binary image, tailored to complex or severely blurred images. */ - DM_DEEP_ANALYSIS = 32, - /** Applies a sharpening algorithm to enhance the edges and details of the barcode, making it more distinguishable on the gray-scale image before binarization. */ - DM_SHARPENING = 64, - /** Decodes the barcodes based on the binary image obtained during the localization process. */ - DM_BASED_ON_LOC_BIN = 128, - /** Combines sharpening and smoothing algorithms for a comprehensive deblurring effect, targeting both clarity and smoothness of the gray-scale image before binarization. */ - DM_SHARPENING_SMOOTHING = 256, - /** Performs deblur process by utilizing a neural network model. */ - DM_NEURAL_NETWORK = 512, - /** Reserved for future use. */ - DM_REV = -2147483648, - /** Skips the process, no deblurring is applied. */ - DM_SKIP = 0, - /** Placeholder value with no functional meaning. */ - DM_END = -1 -} - -interface BarcodeDetails { -} - -interface AztecDetails extends BarcodeDetails { - /** Number of rows in the Aztec barcode. */ - rows: number; - /** Number of columns in the Aztec barcode. */ - columns: number; - /** - * Indicates the layer number of the Aztec barcode. Negative values represent compact codes, - * while positive values represent full-range codes. - */ - layerNumber: number; -} - -/** - * Represents the Extended Channel Interpretation (ECI) information within a barcode. - * - * Each ECI segment specifies the character encoding used for a portion of the decoded bytes. - * The charset names follow the IANA character set registry (e.g. "UTF-8", "ISO-8859-1"). - */ -interface ECISegment { - /** The ECI assignment number as defined by ISO/IEC 15424. */ - eciValue: number; - /** The charset encoding name defined by IANA (e.g. "UTF-8", "ISO-8859-1"). */ - charsetEncoding: string; - /** The start index of this ECI segment in the decoded barcode bytes. */ - startIndex: number; - /** The length (in bytes) of this segment within the decoded barcode bytes. */ - length: number; -} - -interface BarcodeResultItem extends CapturedResultItem { - /** The format of the decoded barcode, as defined by `EnumBarcodeFormat`. */ - format: EnumBarcodeFormat; - /** A string representation of the barcode format. */ - formatString: string; - /** The decoded text from the barcode. */ - text: string; - /** The raw byte data of the decoded barcode. */ - bytes: Uint8Array; - /** The location of the barcode in the image, represented as a quadrilateral. */ - location: Quadrilateral; - /** A confidence score for the barcode detection. */ - confidence: number; - /** The rotation angle of the barcode in the image. */ - angle: number; - /** The size of a single module in the barcode. */ - moduleSize: number; - /** Additional details specific to the type of barcode detected. */ - details: BarcodeDetails; - /** Indicates if the barcode is mirrored. */ - isMirrored: boolean; - /** Indicates if the barcode is detected using Direct Part Marking (DPM) method. */ - isDPM: boolean; - /** An array of ECI segments present in the barcode, if any. Each segment is represented by a `ECISegment` object. */ - eciSegments: Array; -} - -interface DataMatrixDetails extends BarcodeDetails { - /** Number of rows in the Data Matrix barcode. */ - rows: number; - /** Number of columns in the Data Matrix barcode. */ - columns: number; - /** Number of rows in the data region of the barcode. Data regions are subdivisions of the barcode where data is stored. */ - dataRegionRows: number; - /** Number of columns in the data region of the barcode. Data regions are subdivisions of the barcode where data is stored. */ - dataRegionColumns: number; - /** Number of data regions in the barcode. */ - dataRegionNumber: number; -} - -interface DecodedBarcodesResult extends CapturedResultBase { - /** - * An array of `BarcodeResultItem` objects, each representing a decoded barcode within the original image. - */ - barcodeResultItems: Array; -} - -interface DecodedBarcodeElement extends RegionObjectElement { - /** The format of the decoded barcode, as defined by `EnumBarcodeFormat`. */ - format: EnumBarcodeFormat; - /** A string representation of the barcode format. */ - formatString: string; - /** The decoded text from the barcode. */ - text: string; - /** The raw byte data of the decoded barcode. */ - bytes: Uint8Array; - /** Additional details specific to the type of barcode detected. */ - details: BarcodeDetails; - /** Indicates if the barcode is detected using Direct Part Marking (DPM) method. */ - isDPM: boolean; - /** Indicates if the barcode is mirrored. */ - isMirrored: boolean; - /** The rotation angle of the barcode in the image. */ - angle: number; - /** The size of a single module in the barcode. */ - moduleSize: number; - /** A confidence score for the barcode detection. */ - confidence: number; - /** Array of extended barcode results if available. */ - extendedBarcodeResults: Array; - /** An array of ECI segments present in the barcode, if any. Each segment is represented by a `ECISegment` object. */ - eciSegments: Array; -} - -interface ExtendedBarcodeResult extends DecodedBarcodeElement { - /** Type of the extended barcode result. */ - extendedBarcodeResultType: EnumExtendedBarcodeResultType; - /** Deformation level of the barcode. */ - deformation: number; - /** Clarity score of the barcode. */ - clarity: number; - /** Image data sampled from the barcode. */ - samplingImage: DSImageData; -} - -interface OneDCodeDetails extends BarcodeDetails { - /** Start characters of the barcode in a byte array, used to identify the beginning of the barcode. */ - startCharsBytes: Array; - /** Stop characters of the barcode in a byte array, used to identify the end of the barcode.*/ - stopCharsBytes: Array; - /** Check digit characters of the barcode in a byte array, used for error detection and correction in some 1D barcodes.*/ - checkDigitBytes: Array; - /** Position range of the start pattern relative to the barcode's location. */ - startPatternRange: number; - /** Position range of the middle pattern relative to the barcode's location. */ - middlePatternRange: number; - /** Position range of the end pattern relative to the barcode's location. */ - endPatternRange: number; -} - -interface PDF417Details extends BarcodeDetails { - /** Number of rows in the PDF417 barcode. */ - rows: number; - /** Number of columns in the PDF417 barcode. */ - columns: number; - /** The error correction level of the PDF417 barcode. */ - errorCorrectionLevel: number; - /** Indicates whether the left row indicator of the PDF417 code exists (1 means yes, 0 means no). The left row indicator is used to denote the start of a new row in the barcode. */ - hasLeftRowIndicator: boolean; - /** Indicates whether the right row indicator of the PDF417 code exists (1 means yes, 0 means no). The right row indicator is used to denote the end of a row in the barcode. */ - hasRightRowIndicator: boolean; - /** The codewords array of the PDF417 Code. */ - codewords: Array; -} - -interface QRCodeDetails extends BarcodeDetails { - /** Number of rows in the QR Code. */ - rows: number; - /** Number of columns in the QR Code. */ - columns: number; - /** The error correction level of the QR Code. */ - errorCorrectionLevel: number; - /** The version of the QR Code. */ - version: number; - /** Number of models of the QR Code. */ - model: number; - /** First data encoding mode used in the QR Code. */ - mode: number; - /** Position of the particular symbol in the Structured Append format of the QR Code. */ - page: number; - /** Total number of symbols to be concatenated in the Structured Append format. */ - totalPage: number; - /** Parity data obtained by XORing byte by byte the ASCII/JIS values of all the original input data before division into symbol blocks. It's used for error checking and correction. */ - parityData: number; - /** The data mask pattern of the QR Code, 0-7 for regular QR; 0-3 for micro-QR. */ - dataMaskPattern: number; - /** The codewords array of the QR Code. */ - codewords: Array; -} - -interface SimplifiedBarcodeReaderSettings { - /** Specifies the barcode formats to be detected. */ - barcodeFormatIds: EnumBarcodeFormat; - /** Expected number of barcodes to detect. */ - expectedBarcodesCount: number; - /** Grayscale transformation modes to apply, enhancing detection capability. */ - grayscaleTransformationModes: Array; - /** Grayscale enhancement modes to apply for improving detection in challenging conditions. */ - grayscaleEnhancementModes: Array; - /** Localization modes to use for detecting barcodes in various orientations or positions. */ - localizationModes: Array; - /** Deblur modes to apply for improving detection of barcodes. */ - deblurModes: Array; - /** Minimum confidence level required for a barcode to be considered successfully detected. */ - minResultConfidence: number; - /** Minimum length of barcode text to be considered valid. */ - minBarcodeTextLength: number; - /** Regular expression pattern that the detected barcode text must match. */ - barcodeTextRegExPattern: string; - /** Threshold for reducing the size of large images to speed up processing. If the size of the image's shorter edge exceeds this threshold, the image may be downscaled to decrease processing time. The standard setting is 2300. */ - scaleDownThreshold: number; -} - -/** - * The `CandidateBarcodeZone` interface represents a candidate barcode zone. - */ -interface CandidateBarcodeZone { - /** Location of the candidate barcode zone within the image. */ - location: Quadrilateral; - /** Possible formats of the localized barcode. */ - possibleFormats: EnumBarcodeFormat; -} - -/** - * The `CandidateBarcodeZonesUnit` interface extends the `IntermediateResultUnit` interface and represents a unit of candidate barcode zones. - */ -interface CandidateBarcodeZonesUnit extends IntermediateResultUnit { - /** Array of candidate barcode zones represented as quadrilaterals. */ - candidateBarcodeZones: Array; -} - -interface ComplementedBarcodeImageUnit extends IntermediateResultUnit { - imageData: DSImageData; - location: Quadrilateral; -} - -interface DecodedBarcodesUnit extends IntermediateResultUnit { - decodedBarcodes: Array; -} - -/** - * The `DeformationResistedBarcode` interface represents a deformation-resisted barcode image. - */ -interface DeformationResistedBarcode { - /** Image data of the deformation-resisted barcode image. */ - imageData: DSImageData; - /** Format of the barcode, as defined by `EnumBarcodeFormat`. */ - format: EnumBarcodeFormat; - /** Location of the deformation-resisted barcode within the image. */ - location: Quadrilateral; -} - -/** - * The `DeformationResistedBarcodeImageUnit` interface extends the `IntermediateResultUnit` interface and represents a unit that holds the deformation-resisted barcode which includes the corresponding image data, its location, and the barcode format. - */ -interface DeformationResistedBarcodeImageUnit extends IntermediateResultUnit { - /** The deformation-resisted barcode. */ - deformationResistedBarcode: DeformationResistedBarcode; -} - -interface LocalizedBarcodeElement extends RegionObjectElement { - /** Possible formats of the localized barcode. */ - possibleFormats: EnumBarcodeFormat; - /** String representation of the possible formats. */ - possibleFormatsString: string; - /** The rotation angle of the localized barcode in the image. */ - angle: number; - /** The size of a single module in the localized barcode. */ - moduleSize: number; - /** A confidence score for the localized barcode detection. */ - confidence: number; -} - -interface LocalizedBarcodesUnit extends IntermediateResultUnit { - /** An array of `LocalizedBarcodeElement` objects, each representing a localized barcode. */ - localizedBarcodes: Array; -} - -interface ScaledBarcodeImageUnit extends IntermediateResultUnit { - /** Image data of the scaled barcode. */ - imageData: DSImageData; -} - -export { BarcodeReaderModule, EnumBarcodeFormat, EnumDeblurMode, EnumExtendedBarcodeResultType, EnumLocalizationMode, EnumQRCodeErrorCorrectionLevel }; -export type { AztecDetails, BarcodeDetails, BarcodeResultItem, CandidateBarcodeZone, CandidateBarcodeZonesUnit, ComplementedBarcodeImageUnit, DataMatrixDetails, DecodedBarcodeElement, DecodedBarcodesResult, DecodedBarcodesUnit, DeformationResistedBarcode, DeformationResistedBarcodeImageUnit, ExtendedBarcodeResult, LocalizedBarcodeElement, LocalizedBarcodesUnit, OneDCodeDetails, PDF417Details, QRCodeDetails, ScaledBarcodeImageUnit, SimplifiedBarcodeReaderSettings }; - - -interface ParsedResultItem extends CapturedResultItem { - /** - * The code type of the parsed result. - */ - codeType: string; - /** - * The parsed result represented as a JSON-formatted string. - */ - jsonString: string; - /** - * Retrieves a list of all field names present in the parsed result. - * @returns An array of strings, where each string is a field name from the parsed result. - * This method allows for dynamic access to the fields in the parsed result, enabling users to iterate through all available fields without needing to know their names in advance. - * [NOTE]: If the field is nested, the name includes all parent fields, separated by a dot (.). The format follows this pattern: [.[....]]. - */ - getAllFieldNames(): Array; - /** - * Retrieves the value of a specified field. - * @param fieldName The name of the field whose value is being requested. - * - * @returns The value of the field. - */ - getFieldValue(fieldName: string): string; - /** - * Retrieves the value of a specified field from the parsed result, without mapping process. - * @param fieldName The name of the field whose raw value is being requested. - * - * @returns The raw value of the field. - */ - getFieldRawValue(fieldName: string): string; - /** - * Retrieves the mapping status for a specified field name. - * @param fieldName The name of the field whose mapping status is being queried. - * - * @returns The mapping status of the specified field as an EnumMappingStatus value. - */ - getFieldMappingStatus: (fieldName: string) => EnumMappingStatus; - /** - * Retrieves the validation status for a specified field name. - * @param fieldName The name of the field whose validation status is being queried. - * - * @returns The validation status of the specified field as an EnumValidationStatus value. - */ - getFieldValidationStatus: (fieldName: string) => EnumValidationStatus; -} - -declare class CodeParser { - private _instanceID; - /** - * Initializes a new instance of the `CodeParser` class. - * - * @returns A promise that resolves with the initialized `CodeParser` instance. - */ - static createInstance(): Promise; - /** - * Releases all resources used by the `CodeParser` instance. - * - * @returns A promise that resolves when the resources have been successfully released. It does not provide any value upon resolution. - */ - dispose(): Promise; - /** - * Returns whether the `CodeParser` instance has been disposed of. - * - * @returns Boolean indicating whether the `CodeParser` instance has been disposed of. - */ - protected bDestroyed: boolean; - get disposed(): boolean; - /** - * Configures runtime settings using a provided JSON string. - * @param settings A JSON string that represents the content of the settings which contain at least one `CodeParserTaskSetting` object. - * - * @returns A promise that resolves when the operation has completed. It does not provide any value upon resolution. - */ - initSettings(settings: string): Promise; - /** - * Restores all runtime settings to their original default values. - * - * @returns A promise that resolves when the operation has completed. It does not provide any value upon resolution. - */ - resetSettings(): Promise; - /** - * Parses a single string or a `Uint8Array` object to be human-readable. - * @param source Specifies the string or the `Uint8Array` object. - * @param taskSettingName [Optional] Specifies a `CodeParserTaskSetting` to use. - * - * @returns A promise that resolves with a `ParsedResultItem` object which contains the parsed result. - */ - parse(source: Uint8Array | string | Array, taskSettingName?: string): Promise; -} - -declare class CodeParserModule { - /** - * Returns the version of the CodeParser module. - */ - static getVersion(): string; - /** - * Loads the specification for a certain type of code strings. - * @param specificationName Specifies the specification by its name. - * @param specificationPath [Optional] Specifies the path to find the specification file. If not specified, the method will try to load the file from the path specified in `Dynamsoft.Core.CoreModule.engineResourcePaths`. For example, if the path for the "dcp" module is "https://cdn.jsdelivr.net/npm/dynamsoft-code-parser@2.0.20/dist/", then calling `Dynamsoft.DCP.CodeParserModule.loadSpec("AADHAAR")` will load the file "AADHAAR.data" from "https://cdn.jsdelivr.net/npm/dynamsoft-code-parser@2.0.20/dist/specification/AADHAAR.data". - * - * @returns A promise that resolves when the specification is loaded. It does not provide any value upon resolution. - */ - static loadSpec(specificationName: string | Array, specificationPath?: string): Promise; - /** - * An event that repeatedly fires during the loading of specification files. - * @param filePath Returns the path of the specification file. - * @param tag Indicates the ongoing status of the file download. Available values are "starting", "in progress", "completed". - * @param progress Shows the numerical progress of the download. - */ - static onSpecLoadProgressChanged: (filePath: string, tag: "starting" | "in progress" | "completed", progress: { - loaded: number; - total: number; - }) => void; -} - -declare enum EnumMappingStatus { - /** - * Indicates that no mapping operation has been initiated. - */ - MS_NONE = 0, - /** - * Indicates that the mapping operation was successfully completed. - */ - MS_SUCCEEDED = 1, - /** - * Indicates that the mapping operation failed to complete. - */ - MS_FAILED = 2 -} - -declare enum EnumValidationStatus { - /** - * Indicates that no validation has been performed. - */ - VS_NONE = 0, - /** - * Indicates that the validation process was completed successfully. - */ - VS_SUCCEEDED = 1, - /** - * Indicates that the validation process failed. - */ - VS_FAILED = 2 -} - -declare enum EnumCodeType { - CT_MRTD_TD1_ID = "MRTD_TD1_ID", - CT_MRTD_TD2_ID = "MRTD_TD2_ID", - CT_MRTD_TD2_VISA = "MRTD_TD2_VISA", - CT_MRTD_TD3_PASSPORT = "MRTD_TD3_PASSPORT", - CT_MRTD_TD3_VISA = "MRTD_TD3_VISA", - CT_MRTD_TD2_FRENCH_ID = "MRTD_TD2_FRENCH_ID", - CT_AAMVA_DL_ID = "AAMVA_DL_ID", - CT_AAMVA_DL_ID_WITH_MAG_STRIPE = "AAMVA_DL_ID_WITH_MAG_STRIPE", - CT_SOUTH_AFRICA_DL = "SOUTH_AFRICA_DL", - CT_AADHAAR = "AADHAAR", - CT_VIN = "VIN", - CT_GS1_AI = "GS1_AI" -} - -interface ParsedResult extends CapturedResultBase { - /** - * An array of `ParsedResultItem` objects. - */ - parsedResultItems: Array; -} - -export { CodeParser, CodeParserModule, EnumCodeType, EnumMappingStatus, EnumValidationStatus, ParsedResult, ParsedResultItem }; - - -declare class DocumentNormalizerModule { - /** - * Returns the version of the DocumentNormalizer module. - */ - static getVersion(): string; -} - -/** - * `EnumImageColourMode` determines the output colour mode of the normalized image. - */ -declare enum EnumImageColourMode { - /** Output image in color mode. */ - ICM_COLOUR = 0, - /** Output image in grayscale mode. */ - ICM_GRAYSCALE = 1, - /** Output image in binary mode. */ - ICM_BINARY = 2 -} - -interface DetectedQuadResultItem extends CapturedResultItem { - /** The location of the detected quadrilateral within the original image, represented as a quadrilateral shape. */ - location: Quadrilateral; - /** A confidence score related to the detected quadrilateral's accuracy as a document boundary. */ - confidenceAsDocumentBoundary: number; - /** Indicates whether the DetectedQuadResultItem has passed cross verification. */ - crossVerificationStatus: EnumCrossVerificationStatus; -} - -interface DeskewedImageResultItem extends CapturedResultItem { - /** The image data for the deskewed image result. */ - imageData: DSImageData; - /** The location where the deskewed image was extracted from within the input image image of the deskew section, represented as a quadrilateral. */ - sourceLocation: Quadrilateral; - /** Indicates whether the DeskewedImageResultItem has passed cross verification. */ - crossVerificationStatus: EnumCrossVerificationStatus; - toCanvas: () => HTMLCanvasElement; - toImage: (MIMEType: "image/png" | "image/jpeg") => HTMLImageElement; - toBlob: (MIMEType: "image/png" | "image/jpeg") => Promise; -} - -interface EnhancedImageElement extends RegionObjectElement { - imageData: DSImageData; -} - -interface EnhancedImageResultItem extends CapturedResultItem { - /** The image data for the enhanced image result. */ - imageData: DSImageData; - /** Converts the enhanced image data into an HTMLCanvasElement for display or further manipulation in web applications. */ - toCanvas: () => HTMLCanvasElement; - /** Converts the enhanced image data into an HTMLImageElement of a specified MIME type ('image/png' or 'image/jpeg'). */ - toImage: (MIMEType: "image/png" | "image/jpeg") => HTMLImageElement; - /** Converts the enhanced image data into a Blob object of a specified MIME type ('image/png' or 'image/jpeg'). */ - toBlob: (MIMEType: "image/png" | "image/jpeg") => Promise; -} - -interface EnhancedImageUnit extends IntermediateResultUnit { - /** An array of `EnhancedImageElement` objects, each representing a piece of the original image after enhancement. */ - enhancedImage: EnhancedImageElement; -} - -interface CandidateQuadEdgesUnit extends IntermediateResultUnit { - /** An array of candidate edges that may form quadrilaterals, identified during image processing. */ - candidateQuadEdges: Array; -} - -interface CornersUnit extends IntermediateResultUnit { - /** An array of detected corners within the image, identified during image processing. */ - corners: Array; -} - -interface DetectedQuadElement extends RegionObjectElement { - /** A confidence score measuring the certainty that the detected quadrilateral represents the boundary of a document. */ - confidenceAsDocumentBoundary: number; -} - -interface DetectedQuadsUnit extends IntermediateResultUnit { - /** An array of `DetectedQuadElement` objects, each representing a potential document or area of interest within the image. */ - detectedQuads: Array; -} - -interface LongLinesUnit extends IntermediateResultUnit { - /** An array of long line segments detected within the image. */ - longLines: Array; -} - -interface LogicLinesUnit extends IntermediateResultUnit { - /** An array of logic line segments detected within the image. */ - logicLines: Array; -} - -interface DeskewedImageElement extends RegionObjectElement { - /** A quadrilateral representing the four corners of the quadrilateral used to deskew the image. */ - sourceLocation: Quadrilateral; - imageData: DSImageData; -} - -interface DeskewedImageUnit extends IntermediateResultUnit { - /** The `DeskewedImageElement` objects representing a piece of the original image after deskewing. */ - deskewedImage: DeskewedImageElement; -} - -interface ProcessedDocumentResult extends CapturedResultBase { - /** An array of `DetectedQuadResultItem` objects, each representing a quadrilateral after document detection. */ - detectedQuadResultItems: Array; - /** An array of `DeskewedImageResultItem` objects, each representing a piece of the original image after deskewing. */ - deskewedImageResultItems: Array; - /** An array of `EnhancedImageResultItem` objects, each representing a piece of the original image after enhancement. */ - enhancedImageResultItems: Array; -} - -/** - * The `SimplifiedDocumentNormalizerSettings` interface defines simplified settings for document detection and normalization. - */ -interface SimplifiedDocumentNormalizerSettings { - /** Grayscale enhancement modes to apply for improving detection in challenging conditions. */ - grayscaleEnhancementModes: Array; - /** Grayscale transformation modes to apply, enhancing detection capability. */ - grayscaleTransformationModes: Array; - /** Color mode of the anticipated normalized page */ - colourMode: EnumImageColourMode; - /** Width and height of the anticipated normalized page. */ - pageSize: [number, number]; - /** Anticipated brightness level of the normalized image. */ - brightness: number; - /** Anticipated contrast level of the normalized image. */ - contrast: number; - /** - * Threshold for reducing the size of large images to speed up processing. - * If the size of the image's shorter edge exceeds this threshold, the image may be downscaled to decrease processing time. The standard setting is 2300. - */ - scaleDownThreshold: number; - /** The minimum ratio between the target document area and the total image area. Only those exceedingthis value will be output (measured in percentages).*/ - minQuadrilateralAreaRatio: number; - /** The number of documents expected to be detected.*/ - expectedDocumentsCount: number; -} - -export { CandidateQuadEdgesUnit, CornersUnit, DeskewedImageElement, DeskewedImageResultItem, DeskewedImageUnit, DetectedQuadElement, DetectedQuadResultItem, DetectedQuadsUnit, DocumentNormalizerModule, EnhancedImageElement, EnhancedImageResultItem, EnhancedImageUnit, EnumImageColourMode, LogicLinesUnit, LongLinesUnit, ProcessedDocumentResult, SimplifiedDocumentNormalizerSettings }; - - -declare class LabelRecognizerModule { - #private; - /** - * An event that repeatedly fires during the loading of a recognition data file (.data). - * @param filePath Returns the path of the recognition data file. - * @param tag Indicates the ongoing status of the file download. Available values are "starting", "in progress", "completed". - * @param progress Shows the numerical progress of the download. - */ - static onDataLoadProgressChanged: (filePath: string, tag: "starting" | "in progress" | "completed", progress: { - loaded: number; - total: number; - }) => void; - /** - * Returns the version of the LabelRecognizer module. - */ - static getVersion(): string; - /** - * Loads a specific data file containing confusable characters information. - * @param dataName The name of the recognition data to load. - * @param dataPath specifies the path to find the data file. If not specified, the default path points to the package ā€œdynamsoft-capture-vision-dataā€. - */ - static loadConfusableCharsData(dataName: string, dataPath?: string): Promise; - /** - * Loads a specific data file containing overlapping characters information. - * @param dataName The name of the recognition data to load. - * @param dataPath specifies the path to find the data file. If not specified, the default path points to the package ā€œdynamsoft-capture-vision-dataā€. - */ - static loadOverlappingCharsData(dataName: string, dataPath?: string): Promise; -} - -interface CharacterResult { - /** The highest confidence character recognized. */ - characterH: string; - /** The medium confidence character recognized. */ - characterM: string; - /** The lowest confidence character recognized. */ - characterL: string; - /** Confidence score for the highest confidence character. */ - characterHConfidence: number; - /** Confidence score for the medium confidence character. */ - characterMConfidence: number; - /** Confidence score for the lowest confidence character. */ - characterLConfidence: number; - /** The location of the recognized character within the image. */ - location: Quadrilateral; -} - -interface TextLineResultItem extends CapturedResultItem { - /** The recognized text of the line. */ - text: string; - /** The location of the text line within the image. */ - location: Quadrilateral; - /** Confidence score for the recognized text line. */ - confidence: number; - /** Results for individual characters within the text line. */ - characterResults: Array; - /** The name of the TextLineSpecification object that generated this TextLineResultItem. */ - specificationName: string; - /** The recognized raw text of the line. */ - rawText: string; -} - -declare function filterVINResult(vinItem: TextLineResultItem): string; -/** - * check if the vin code is valid - * @ignore - */ -declare function checkValidVIN(code: string): boolean; -/** - * check if the second row of passport mrz code is valid. - * check digit only exits in second row in passport mrz. - * @ignore - */ -declare function checkValidMRP(code: string): boolean; -/** - * check if the second row of visa mrz code is valid. - * check digit only exits in second row in visa mrz. - * @ignore - */ -declare function checkValidMRV(code: string): boolean; -/** - * check if the two row or third row of id card mrz code is valid. - * check digit only exits in two row or third row in id card mrz. - * @ignore - */ -declare function checkValidIDCard(code: string, codeUpperLine?: string): boolean; -declare const utilsFuncs: { - filterVINResult: typeof filterVINResult; - checkValidVIN: typeof checkValidVIN; - checkValidMRP: typeof checkValidMRP; - checkValidMRV: typeof checkValidMRV; - checkValidIDCard: typeof checkValidIDCard; -}; - -/** - * Enumerates the status of a raw text line. - */ -declare enum EnumRawTextLineStatus { - /** Localized but recognition not performed. */ - RTLS_LOCALIZED = 0, - /** Recognition failed. */ - RTLS_RECOGNITION_FAILED = 1, - /** Successfully recognized. */ - RTLS_RECOGNITION_SUCCEEDED = 2 -} - -interface LocalizedTextLineElement extends RegionObjectElement { - /** Quadrilaterals for each character in the text line. */ - characterQuads: Array; - /** The row number of the text line, starting from 1. */ - rowNumber: number; -} - -interface LocalizedTextLinesUnit extends IntermediateResultUnit { - /** An array of `LocalizedTextLineElement` objects, each representing a localized text line. */ - localizedTextLines: Array; - /** An array of `AuxiliaryRegionElement` objects, each representing an auxiliary region. */ - auxiliaryRegionElements: Array; -} - -interface RecognizedTextLineElement extends RegionObjectElement { - /** The recognized text of the line. */ - text: string; - /** Confidence score for the recognized text line. */ - confidence: number; - /** Results for individual characters within the text line. */ - characterResults: Array; - /** The row number of the text line, starting from 1. */ - rowNumber: number; - /** The name of the TextLineSpecification object that generated this RecognizedTextLineElement. */ - specificationName: string; - /** The recognized raw text of the line. */ - rawText: string; -} - -interface RecognizedTextLinesResult extends CapturedResultBase { - /** - * An array of `TextLineResultItem` objects, each representing a recognized text line within the original image. - */ - textLineResultItems: Array; -} - -interface SimplifiedLabelRecognizerSettings { - /** Name of the character model used for recognition. */ - characterModelName: string; - /** Regular expression pattern for validating recognized line strings. */ - lineStringRegExPattern: string; - /** Grayscale transformation modes to apply, enhancing detection capability. */ - grayscaleTransformationModes: Array; - /** Grayscale enhancement modes to apply for improving detection in challenging conditions. */ - grayscaleEnhancementModes: Array; - /** - * Threshold for reducing the size of large images to speed up processing. If the size of the image's shorter edge exceeds this threshold, the image may be downscaled to decrease processing time. The standard setting is 2300. */ - scaleDownThreshold: number; -} - -interface BufferedCharacterItem { - /** The buffered character value. */ - character: string; - /** The image data of the buffered character. */ - imageData: DSImageData; - /** An array of features, each feature object contains feature id and value of the buffered character.*/ - features: Map; -} - -interface CharacterCluster { - /** The character value of the cluster. */ - character: string; - /** The mean of the cluster. */ - mean: BufferedCharacterItem; -} - -interface BufferedCharacterItemSet { - /** An array of BufferedCharacterItem. */ - items: Array; - /** An array of CharacterCluster. */ - characterClusters: Array; -} - -/** - * The `RawTextLine` represents a text line in an image. It can be in one of the following states: - * - `TLS_LOCALIZED`: Localized but recognition not performed. - * - `TLS_RECOGNITION_FAILED`: Recognition failed. - * - `TLS_RECOGNIZED_SUCCESSFULLY`: Successfully recognized. - */ -interface RawTextLine { - /** The recognized text of the line. */ - text: string; - /** Confidence score for the recognized text line. */ - confidence: number; - /** Results for individual characters within the text line. */ - characterResults: Array; - /** The row number of the text line, starting from 1. */ - rowNumber: number; - /** The predefined specification name of this text line*/ - specificationName: string; - /** The location of the text line */ - location: Quadrilateral; - /** The status of a raw text line.*/ - status: EnumRawTextLineStatus; -} - -interface RawTextLinesUnit extends IntermediateResultUnit { - /** An array of RawTextLine. */ - rawTextlines: Array; -} - -interface RecognizedTextLinesUnit extends IntermediateResultUnit { - recognizedTextLines: Array; -} - -export { BufferedCharacterItem, BufferedCharacterItemSet, CharacterCluster, CharacterResult, EnumRawTextLineStatus, LabelRecognizerModule, LocalizedTextLineElement, LocalizedTextLinesUnit, RawTextLine, RawTextLinesUnit, RecognizedTextLineElement, RecognizedTextLinesResult, RecognizedTextLinesUnit, SimplifiedLabelRecognizerSettings, TextLineResultItem, utilsFuncs }; - -declare class LicenseModule { - /** - * Returns the version of the License module. - */ - static getVersion(): string; -} - -declare class LicenseManager { - private static setLicenseServer; - static _pLoad: any; - static bPassValidation: boolean; - static bCallInitLicense: boolean; - private static _license; - static get license(): string; - static set license(license: string); - /** - * Specify the license server URL. - */ - private static _licenseServer?; - static get licenseServer(): string[] | string; - static set licenseServer(value: string[] | string); - private static _deviceFriendlyName; - static get deviceFriendlyName(): string; - static set deviceFriendlyName(value: string); - /** - * License the components. - * @param license the license key to be used. - * @remarks - for an online license, LicenseManager asks DLS for the license associated with the 'license' key and gets all usable modules - - for an offline license, LicenseManager parses it to get a list of usable modules - * @returns a promise resolving to true or false to indicate whether the license was initialized successfully. - */ - static initLicense(license: string, options?: { - executeNow: boolean; - } | boolean): void | Promise; - /** - * The following methods should be called before `initLicense`. - */ - static setDeviceFriendlyName(name: string): void; - static getDeviceFriendlyName(): string; - /** - * Returns the unique identifier of the device. - * - * @returns A promise which, upon resolution, yields a string corresponding to the device's UUID. - */ - static getDeviceUUID(): Promise; - static _e: boolean; -} - -interface InitConfig { - pk: string; - dm: string; - bd?: boolean; - trial?: boolean; - msg?: string; - mli?: any; - om?: any; - ic?: any; - mlo?: any; - pv?: any; -} - -export { InitConfig, LicenseManager, LicenseModule }; - - - - -declare class UtilityModule { - /** - * Returns the version of the Utility module. - */ - static getVersion(): string; -} - -type CEdge = [Point, Point]; -type CQuadrilateral = Quadrilateral & { - area: number; -}; -type CBarcodeResultItem = BarcodeResultItem & { - location: CQuadrilateral; -}; -interface CDecodedBarcodeElement extends DecodedBarcodeElement { - location: CQuadrilateral; -} -interface CLocalizedBarcodeElement extends LocalizedBarcodeElement { - location: CQuadrilateral; -} -type resultItemTypeString = "barcode" | "text_line" | "detected_quad" | "deskewed_image"; -type CrossVerificationCriteria = { - frameWindow: number; - minConsistentFrames: number; -}; -type CapturedResultMap = { - [K in EnumCapturedResultItemType]?: T; -}; - -declare class MultiFrameResultCrossFilter implements CapturedResultFilter { - #private; - constructor(); - verificationEnabled: CapturedResultMap; - duplicateFilterEnabled: CapturedResultMap; - duplicateForgetTime: CapturedResultMap; - crossVerificationCriteria: CapturedResultMap; - private _dynamsoft; - /** - * Enables or disables the verification of one or multiple specific result item types. - * @param resultItemType Specifies one or multiple specific result item types, which can be defined using EnumCapturedResultItemType or a string. If using a string, only one type can be specified, and valid values include "barcode", "text_line", "detected_quad", and "deskewed_image". - * @param enabled Boolean to toggle verification on or off. - */ - enableResultCrossVerification(resultItemType: EnumCapturedResultItemType | resultItemTypeString, enabled?: boolean): void; - /** - * Checks if verification is active for a given result item type. - * @param resultItemType Specifies the result item type, either with EnumCapturedResultItemType or a string. When using a string, the valid values include "barcode", "text_line", "detected_quad", and "deskewed_image". - * @returns Boolean indicating the status of verification for the specified type. - */ - isResultCrossVerificationEnabled(resultItemType: EnumCapturedResultItemType | resultItemTypeString): boolean; - /** - * Enables or disables the deduplication process for one or multiple specific result item types. - * @param resultItemType Specifies one or multiple specific result item types, which can be defined using EnumCapturedResultItemType or a string. If using a string, only one type can be specified, and valid values include "barcode", "text_line", "detected_quad", and "deskewed_image". - * @param enabled Boolean to toggle deduplication on or off. - */ - enableResultDeduplication(resultItemType: EnumCapturedResultItemType | resultItemTypeString, enabled?: boolean): void; - /** - * Checks if deduplication is active for a given result item type. - * @param resultItemType Specifies the result item type, either with EnumCapturedResultItemType or a string. When using a string, the valid values include "barcode", "text_line", "detected_quad", and "deskewed_image". - * @returns Boolean indicating the deduplication status for the specified type. - */ - isResultDeduplicationEnabled(resultItemType: EnumCapturedResultItemType | resultItemTypeString): boolean; - /** - * Sets the interval during which duplicates are disregarded for specific result item types. - * @param resultItemType Specifies one or multiple specific result item types, which can be defined using EnumCapturedResultItemType or a string. If using a string, only one type can be specified, and valid values include "barcode", "text_line", "detected_quad", and "deskewed_image". - * @param time Time in milliseconds during which duplicates are disregarded. - */ - setDuplicateForgetTime(resultItemType: EnumCapturedResultItemType | resultItemTypeString, time: number): void; - /** - * Retrieves the interval during which duplicates are disregarded for a given result item type. - * @param resultItemType Specifies the result item type, either with EnumCapturedResultItemType or a string. When using a string, the valid values include "barcode", "text_line", "detected_quad", and "deskewed_image". - * @returns The set interval for the specified item type. - */ - getDuplicateForgetTime(resultItemType: EnumCapturedResultItemType | resultItemTypeString): number; - getFilteredResultItemTypes(): number; - /** - * Sets the cross-verification criteria for one or more result item types. - * This configuration determines how many frames are considered - * and the minimum number of consistent frames required before a result is accepted. - * - * @param resultItemType Specifies one or multiple specific result item types. - * It can be defined using `EnumCapturedResultItemType` or a string. - * When using a string, only one type can be specified, and valid values include: - * `"barcode"`, `"text_line"`, `"detected_quad"`, and `"deskewed_image"`. - * - * @param frameWindow The number of consecutive frames considered for verification. - * @param minConsistentFrames The minimum number of consistent frames required - * for a result to be considered valid. - */ - setResultCrossVerificationCriteria(resultItemType: EnumCapturedResultItemType | resultItemTypeString, frameWindow: number, minConsistentFrames: number): void; - /** - * Retrieves the cross-verification criteria for a specified result item type. - * Returns the configured frame window and consistency requirement. - * - * @param resultItemType Specifies the result item type, - * either with `EnumCapturedResultItemType` or a string. - * When using a string, valid values include: - * `"barcode"`, `"text_line"`, `"detected_quad"`, and `"deskewed_image"`. - * - * @returns An object containing: - * - `frameWindow`: number — the number of consecutive frames considered. - * - `minConsistentFrames`: number — the minimum consistent frames required. - */ - getResultCrossVerificationCriteria(resultItemType: EnumCapturedResultItemType | resultItemTypeString): CrossVerificationCriteria; - private overlapSet; - private stabilityCount; - private crossVerificationFrames; - private latestOverlappingEnabled; - private maxOverlappingFrames; - /** - * Enables or disables the deduplication process for one or multiple specific result item types. - * @param resultItemType Specifies one or multiple specific result item types, which can be defined using EnumCapturedResultItemType or a string. If using a string, only one type can be specified, and valid values include "barcode", "text_line", "detected_quad", and "deskewed_image". - * @param enabled Boolean to toggle deduplication on or off. - */ - enableLatestOverlapping(resultItemType: EnumCapturedResultItemType | resultItemTypeString, enabled?: boolean): void; - /** - * Checks if deduplication is active for a given result item type. - * @param resultItemType Specifies the result item type, either with EnumCapturedResultItemType or a string. When using a string, the valid values include "barcode", "text_line", "detected_quad", and "deskewed_image". - * - * @returns Boolean indicating the deduplication status for the specified type. - */ - isLatestOverlappingEnabled(resultItemType: EnumCapturedResultItemType | resultItemTypeString): boolean; - /** - * Set the max referencing frames count for the to-the-latest overlapping feature. - * - * @param resultItemType Specifies the result item type, either with EnumCapturedResultItemType or a string. When using a string, the valid values include "barcode", "text_line", "detected_quad", and "deskewed_image". - * @param maxOverlappingFrames The max referencing frames count for the to-the-latest overlapping feature. - */ - setMaxOverlappingFrames(resultItemType: EnumCapturedResultItemType | resultItemTypeString, maxOverlappingFrames: number): void; - /** - * Get the max referencing frames count for the to-the-latest overlapping feature. - * @param resultItemType Specifies the result item type, either with EnumCapturedResultItemType or a string. When using a string, the valid values include "barcode", "text_line", "detected_quad", and "deskewed_image". - * @return Returns the max referencing frames count for the to-the-latest overlapping feature. - */ - getMaxOverlappingFrames(resultItemType: EnumCapturedResultItemType): number; - latestOverlappingFilter(result: any): void; -} - -declare class ImageIO { - #private; - /** - * This method reads an image from a file. The file format is automatically detected based on the file extensioor content. - * - * @param file The file to read, as a Blob object. - * - * @returns A promise that resolves with the loaded image of type `DSImageData`. - */ - static readFromFile(file: Blob | string): Promise; - /** - * This method saves an image in either PNG or JPG format. The desired file format is inferred from the filextension provided in the 'name' parameter. Should the specified file format be omitted or unsupported, thdata will default to being exported in PNG format. - * - * @param image The image to be saved, of type `DSImageData`. - * @param name The name of the file, as a string, under which the image will be saved. - * @param download An optional boolean flag that, when set to true, triggers the download of the file. - * - * @returns A promise that resolves with the saved File object. - */ - static saveToFile(image: DSImageData, name: string, download?: boolean): Promise; - /** - * Reads image data from memory using the specified ID. - * - * @param id - The memory ID referencing a previously stored image. - * - * @returns A Promise that resolves to the `DSImageData` object. - */ - static readFromMemory(id: number): Promise; - /** - * This method saves an image to memory. The desired file format is inferred from the 'format' parameter. Should the specified file format be omitted or unsupported, the data will default to being exported in PNG format. - * - * @param image The image to be saved, of type `DSImageData`. - * @param format The desired image format. - * - * @returns A promise that resolves with an object containing the image data as a Uint8Array and the file format. - */ - static saveToMemory(image: Blob, fileFormat: string): Promise; - /** - * This method reads an image from a Base64-encoded string. The image format is automatically detected based on the content of the string. - * - * @param base64String The Base64-encoded string representing the image. - * - * @returns A promise that resolves with the loaded image of type `DSImageData`. - */ - static readFromBase64String(base64String: string): Promise; - /** - * This method saves an image to a Base64-encoded string. The desired file format is inferred from the 'format' parameter. Should the specified file format be omitted or unsupported, the data will default to being exported in PNG format. - * - * @param image The image to be saved, of type `Blob`. - * @param format The desired image format. - * - * @returns A promise that resolves with a Base64-encoded string representing the image. - */ - static saveToBase64String(image: Blob | DSImageData, fileFormat: string): Promise; -} - -declare class ImageDrawer { - /** - * This method draws various shapes on an image, and save it in PNG format. - * - * @param image The image to be saved. - * @param drawingItem An array of different shapes to draw on the image. - * @param type The type of drawing shapes. - * @param color The color to use for drawing. Defaults to 0xFFFF0000 (red). - * @param thickness The thickness of the lines to draw. Defaults to 1. - * @param download An optional boolean flag that, when set to true, triggers the download of the file. - * - * @returns A promise that resolves with the saved File object. - */ - static drawOnImage(image: Blob | string | DSImageData, drawingItem: Array | Quadrilateral | Array | LineSegment | Array | Contour | Array | Corner | Array | Edge, type: "quads" | "lines" | "contours" | "corners" | "edges", color?: number, thickness?: number, name?: string, download?: boolean): Promise; -} - -declare enum EnumFilterType { - /**High-pass filter: Enhances edges and fine details by attenuating low-frequency components.*/ - FT_HIGH_PASS = 0, - /**Sharpen filter: Increases contrast along edges to make the image appear more defined.*/ - FT_SHARPEN = 1, - /**Smooth (blur) filter: Reduces noise and detail by averaging pixel values, creating a softening effect.*/ - FT_SMOOTH = 2 -} - -declare class ImageProcessor { - /** - * Crops an image using a rectangle or quadrilateral. - * @param image The image data to be cropped. - * @param roi The rectangle or quadrilateral to be cropped. - * - * @returns A promise that resolves with the cropped image data. - */ - static cropImage(image: Blob | DSImageData, roi: DSRect): Promise; - /** - * Adjusts the brightness of the image. - * @param image The image data to be adjusted. - * @param brightness Brightness adjustment value (range: [-100, 100]). - * - * @returns A promise that resolves with the adjusted image data. - */ - static adjustBrightness(image: Blob | DSImageData, brightness: number): Promise; - /** - * Adjusts the contrast of the image. - * @param image The image data to be adjusted. - * @param contrast Contrast adjustment value (range: [-100, 100]). - * - * @returns A promise that resolves with the adjusted image data. - */ - static adjustContrast(image: Blob | DSImageData, contrast: number): Promise; - /** - * Applies a specified image filter to an input image. - * @param image The image data to be filtered. - * @param filterType The type of filter to apply. - * @returns A promise that resolves with the filtered image data. - */ - static filterImage(image: Blob | DSImageData, filterType: EnumFilterType): Promise; - /** - * Converts a colour image to grayscale. - * @param image The image data to be converted. - * @param R [R=0.3] - Weight for the red channel. - * @param G [G=0.59] - Weight for the green channel. - * @param B [B=0.11] - Weight for the blue channel. - * @returns A promise that resolves with the grayscale image data. - */ - static convertToGray(image: Blob | DSImageData, R?: number, G?: number, B?: number): Promise; - /** - * Converts an image to a binary image using a global threshold. - * @param image The image data (grayscale, color, or binary). - * @param threshold [threshold=-1] Global threshold for binarization (-1 for automatic calculation). - * @param invert [invert=false] Whether to invert the binary image. - * @returns A promise that resolves with the binary image data. - */ - static convertToBinaryGlobal(image: Blob | DSImageData, threshold?: number, invert?: boolean): Promise; - /** - * Converts a grayscale image to a binary image using local (adaptive) binarization. - * @param image The grayscale image data. - * @param blockSize [blockSize=0] Size of the block for local binarization. - * @param compensation [compensation=10] Adjustment value to modify the threshold. - * @param invert [invert=false] Whether to invert the binary image. - * @returns A promise that resolves with the binary image data. - */ - static convertToBinaryLocal(image: Blob | DSImageData, blockSize?: number, compensation?: number, invert?: boolean): Promise; - /** - * Crops and deskews an image using a quadrilateral. - * @param image The image data to be cropped and deskewed. - * @param roi The quadrilateral defining the region of interest to be cropped and deskewed. - * - * @returns A promise that resolves with the cropped and deskewed image data. - */ - static cropAndDeskewImage(image: Blob | DSImageData, roi: Quadrilateral, dstWidth?: number, dstHeight?: number, padding?: number): Promise; -} - -export { CBarcodeResultItem, CDecodedBarcodeElement, CEdge, CLocalizedBarcodeElement, CQuadrilateral, CapturedResultMap, CrossVerificationCriteria, EnumFilterType, ImageDrawer, ImageIO, ImageProcessor, MultiFrameResultCrossFilter, UtilityModule, resultItemTypeString }; - - - - - - - - - - - - - - - - - - - -declare enum EnumScanMode { - SM_SINGLE = 0, - SM_MULTI_UNIQUE = 1 -} -declare enum EnumResultStatus { - RS_SUCCESS = 0, - RS_CANCELLED = 1, - RS_FAILED = 2 -} - -type CacheKeys = "dceUI" | "dbsUI" | "presetTemplates" | "templateFile"; -type CameraSwitchControlMode = "hidden" | "listAll" | "toggleFrontBack"; -type PathConfig = { - path: string; - reloadResource?: boolean; -}; -declare function isPathConfig(obj: any): obj is PathConfig; -interface ScannerViewConfig { - container?: HTMLElement | string; - showCloseButton?: boolean; - mirrorFrontCamera?: boolean; - cameraSwitchControl?: CameraSwitchControlMode; - showFlashButton?: boolean; - customHighlightForBarcode?: (result: BarcodeResultItem) => QuadDrawingItem; -} -interface BarcodeResultViewToolbarButtonsConfig { - clear?: ToolbarButtonConfig; - done?: ToolbarButtonConfig; -} -interface ResultViewConfig { - container?: HTMLElement | string; - toolbarButtonsConfig?: BarcodeResultViewToolbarButtonsConfig; -} -interface BarcodeScannerConfig { - license?: string; - scanMode?: EnumScanMode; - templateFilePath?: string | PathConfig; - utilizedTemplateNames?: UtilizedTemplateNames; - engineResourcePaths?: EngineResourcePaths; - barcodeFormats?: Array | EnumBarcodeFormat; - duplicateForgetTime?: number; - container?: HTMLElement | string; - showResultView?: boolean; - showUploadImageButton?: boolean; - showPoweredByDynamsoft?: boolean; - autoStartCapturing?: boolean; - scannerViewConfig?: ScannerViewConfig; - resultViewConfig?: ResultViewConfig; - uiPath?: string | PathConfig; - onUniqueBarcodeScanned?: (result: BarcodeResultItem) => void | Promise; - onInitPrepare?: () => void; - onInitReady?: (components: { - cameraView: CameraView; - cameraEnhancer: CameraEnhancer; - cvRouter: CaptureVisionRouter; - }) => void; - onCameraOpen?: (components: { - cameraView: CameraView; - cameraEnhancer: CameraEnhancer; - cvRouter: CaptureVisionRouter; - }) => void; - onCaptureStart?: (components: { - cameraView: CameraView; - cameraEnhancer: CameraEnhancer; - cvRouter: CaptureVisionRouter; - }) => void; - onCameraOpenFailed?: (ex: Error) => void; -} - -type ResultStatus = { - code: EnumResultStatus; - message: string; -}; -interface ToolbarButtonConfig { - label?: string; - className?: string; - isHidden?: boolean; -} -interface BarcodeScanResult { - status: ResultStatus; - barcodeResults: Array; - originalImageResult?: DSImageData; - barcodeImage?: DSImageData; -} -interface UtilizedTemplateNames { - single?: string; - multi_unique?: string; - image?: string; -} - -declare class BarcodeScanner { - #private; - private _cameraEnhancer; - private _cameraView; - private _cvRouter; - config: BarcodeScannerConfig; - constructor(config?: BarcodeScannerConfig); - get disposed(): boolean; - launch(): Promise; - decode(imageOrFile: Blob | string | DSImageData | HTMLImageElement | HTMLVideoElement | HTMLCanvasElement, templateName?: string): Promise; - dispose(): void; -} - -export { BarcodeScanner, EnumResultStatus, EnumScanMode, isPathConfig }; -export type { BarcodeScanResult, BarcodeScannerConfig, CacheKeys, ResultStatus, ToolbarButtonConfig, UtilizedTemplateNames }; -interface CameraInfo extends InputDeviceInfo { - trackLabel: string; - capabilities: DMMoreMediaTrackCapabilities; - isFront: boolean; -} -interface DMMoreMediaTrackCapabilities extends MediaTrackCapabilities { - focusMode?: ('continuous' | 'single-shot' | 'manual')[]; - focusDistance?: { - max?: number; - min: number; - }; - zoom?: { - max: number; - min: number; - }; - torch?: true; -} -type CameraZsFunc = (this: Camera, ...argArray: any[]) => void | any; -interface Camera { - /** - * The `opened` event is triggered when the camera `open()` from the `paused`/`closed` - * or when call `requestResolution()` and camera is `opened`. - */ - addEventListener(type: 'opened', listener: (this: Camera) => void | any): void; - removeEventListener(type: 'opened', listener: (this: Camera) => void | any): void; - /** The `closed` event is triggered when camera is `closed`. */ - addEventListener(type: 'closed', listener: (this: Camera) => void | any): void; - removeEventListener(type: 'closed', listener: (this: Camera) => void | any): void; -} -declare class Camera { - static _cameraNameMatcher: string[][]; - static _mapDeviceInfo: { - [deviceId: string]: CameraInfo; - }; - _coreShell: HTMLElement; - _video: HTMLVideoElement; - _coreInnerLayer: HTMLElement; - _coreOuterLayer: HTMLElement; - _regionBoxWrapper: HTMLElement; - _regionBoxMask: HTMLElement; - _regionBoxBorder: HTMLElement; - _objectFit: 'contain' | 'cover' | 'fill'; - _uiInlineScript2Blob: boolean; - _uiInternalCss2Blob: boolean; - _uiInternalCss2ExistedSheet: boolean; - _ui?: HTMLElement; - _pOpen: Promise & { - isPending: boolean; - resolve: () => void; - reject: () => void; - }; - _getUserMediaTimeout: number; - _paused: boolean; - _shouldClose: boolean; - _cameraChangedWhenPaused: boolean; - _requestedCamera: CameraPreset | MediaTrackConstraints; - _requestedResolution: MediaTrackConstraints; - _regionBox: { - width?: number; - height?: number; - unit: 'view-size' | 'view-min'; - center: { - x: number; - y: number; - }; - maskStyle?: Partial; - borderStyle?: Partial; - innerUi?: Node | NodeList; - }; - _eventListeners: { - [key: string]: Set; - }; - static _delayBeforeEnumerateDevices: number; - static _delayBeforeGetUserMedia: number; - static _delayBeforeApplyConstraints: number; - static _countEnsureResolution: number; - static _videoPlayTimeout: number; - static _bReopenWhenChangeResolution: boolean; - static _arrConstructors: CameraZsFunc[]; - static _arrOnOpen: CameraZsFunc[]; - static _arrBeforeClose: CameraZsFunc[]; - static _arrOnClose: CameraZsFunc[]; - constructor(); - _taskIdIOSResizeProblem: any; - _updateObjectFit(): void; - get video(): HTMLVideoElement; - get track(): MediaStreamTrack; - get objectFit(): "contain" | "cover" | "fill"; - set objectFit(value: "contain" | "cover" | "fill"); - /** - * While `ui` can accept various types during assignment, its value will always be an `HTMLElement` upon retrieval. - */ - get ui(): HTMLElement; - /** - * Generally, the `value` can be an `HTMLElement`, `DocumentFragment` or a string of serialized html. - * This `ui` or one of its descendants, must have class `dm-camera-core-container`. - * If the `value` already contains the `coreShell`, `coreShell` does not move. - * Otherwise the `coreShell` of `DMCamera` is appended to the first element that has the class `dm-camera-core-container`. - * - * If `value` is a falsy value, `coreShell` is used as `ui`. - **/ - set ui(value: HTMLElement | DocumentFragment | string | undefined); - get status(): CameraStatus; - get requestedCamera(): "back" | "front" | "macro-back" | "quick-back" | "customized-video" | MediaTrackConstraints; - get requestedResolution(): { - width: number; - height: number; - }; - get currentCamera(): CameraInfo; - get currentResolution(): { - width: number; - height: number; - }; - /** width 0 ~ 1, height 0 ~ 1, center.x -0.5 ~ 0.5, center.y -0.5 ~ 0.5 */ - get regionBox(): { - width?: number; - height?: number; - unit: "view-size" | "view-min"; - center: { - x: number; - y: number; - }; - maskStyle?: Partial; - borderStyle?: Partial; - innerUi?: Node | NodeList; - }; - onOpened: (camera: Camera) => void | any; - static hasCamera(): Promise; - static hasMacroCamera(): Promise; - static hasFrontCamera(): Promise; - /** - * tips: - * Call getDeviceInfos() will ask for camera permission, then open camera and close internally. - * 2nd time open camera will be a lot faster. - **/ - static getDeviceInfos(): Promise[]>; - static _setCapabilities(deviceInfos: CameraInfo[]): Promise; - /** `pause()` is an idempotent operation, you can call it repeatedly without error. */ - pause(): Promise; - /** `close()` is an idempotent operation, you can call it repeatedly without error. */ - close(): Promise; - /** If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally. */ - requestCamera(cameraPreset: CameraPreset): Promise; - /** If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally. */ - requestCamera(deviceId: string): Promise; - /** If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally. */ - requestCamera(deviceInfo: CameraInfo): Promise; - /** If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally. */ - requestCamera(constraints: MediaTrackConstraints): Promise; - /** - * If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally. - * @param notRequired Let browser choose use what camera. - * */ - requestCamera(notRequired: null): Promise; - /** - * If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally. - * @param resetToDefault Use SDK's dafault logic. - * */ - requestCamera(resetToDefault: undefined): Promise; - /** If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally. */ - requestCamera(camera: string | CameraInfo | MediaTrackConstraints): Promise; - requestResolution(width: number, height?: number): Promise; - requestResolution(widthHeightPair: [number, number] | number[]): Promise; - requestResolution(constraints: { - width?: ConstrainULong; - height?: ConstrainULong; - aspectRatio?: ConstrainDouble; - }): Promise; - requestResolution(notRequired: null): Promise; - requestResolution(resetToDefault: undefined): Promise; - /** - * Similar to `camera.track.applyConstraints`, - * but auto add constraints of original camera and original resolution. - * Primarily used for advanced camera settings like focusDistance, zoom, colorTemperature. - * Don't directly change camera or resolution by this API, - * use `requestCamera` and `requestResolution` instead. - * Set camera or resolution using `applyConstraints` will result in undefined behavior. - */ - applyConstraints(constraints?: MediaTrackConstraints): Promise; - /** - * @param config - * `x`/`y`/`width`/`height` is normally `0 ~ video.videoWidth` or `0 ~ video.videoHeight`, - * same as [drawImage](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage). - * If values contain decimals, it will be rounded. - * Note that the round method takes the effect of `x` into account when rounding `width` to minimize the cumulative error. - * The same logic applies to `height`. - */ - getFrame(config?: { - x?: number; - y?: number; - width?: number; - height?: number; - reusedContext?: CanvasRenderingContext2D; - }): HTMLCanvasElement; - /** - * @param regionBox width 0 ~ 1, height 0 ~ 1, center.x -0.5 ~ 0.5, center.y -0.5 ~ 0.5 - * TODO: support unit pixel - */ - setRegionBox(regionBox: { - width?: number; - height?: number; - unit?: 'view-size' | 'view-min'; - center?: { - x: number; - y: number; - }; - maskStyle?: Partial; - borderStyle?: Partial; - innerUi?: Node | NodeList | DocumentFragment | Node[] | string; - }): void; - /** - * Add a canvas dynamically keep with the same size of the video resolution, as a overlay. - * You can remove it by `camera.video.parentElement.removeChild(thatCanvas)` or `thatCanvas.remove()`. - * When you add multiple canvases, you can also use `camera.video.parentElement` to control stack order. - */ - addCanvas(): HTMLCanvasElement; - _updateCanvasSize(): void; - _callOpenedListeners(): void; - /** - * Convert video x/y to absolute left/top in `document.body`. - * So you can easily add a overlay with absolute position. - * Processing multiple points at once has higher performance than calling multiple times. - */ - videoXY2AbsoluteLT(points: { - x: number; - y: number; - }[]): { - left: number; - top: number; - }[]; - /** - * Convert video x/y to fixed left/top in `document.body`. - * So you can easily add a overlay with fixed position. - * Processing multiple points at once has higher performance than calling multiple times. - */ - videoXY2FixedLT(points: { - x: number; - y: number; - }[]): { - left: number; - top: number; - }[]; - /** - * @param isConsiderRegionBox Default is `false`. Only consider the visible area in the region box. - * @param rounded Default is `false`. Controls whether the result should be rounded. - * Note that the round method takes the effect of `x` into account when rounding `width` to minimize the cumulative error. - * The same logic applies to `height`. - * @returns - * `x`/`width` is `0 ~ video.videoWidth`, `y`/`height` is `0 ~ video.videoHeight`. - */ - getVisibleAreaInVideoXY(config?: { - isConsiderRegionBox?: boolean; - rounded?: boolean; - }): { - x: number; - y: number; - width: number; - height: number; - }; -} -type CameraStatus = 'closed' | 'opening' | 'opened' | 'paused' | 'closing'; -declare const ArrCameraPreset: readonly ["back", "front", "macro-back", "quick-back", "customized-video"]; -type CameraPreset = typeof ArrCameraPreset[number]; - - - interface Camera { - correctAdvancedConstraint(constraints?: MediaTrackConstraints): MediaTrackConstraints; - } - - - interface Camera { - _softZoom: { - zoom: number; - center: { - x: number; - y: number; - }; - }; - get softZoom(): { - zoom: number; - center: { - x: number; - y: number; - }; - }; - _isMirrored: boolean; - get isMirrored(): boolean; - set isMirrored(value: boolean); - maxZoom4GestureWheel: number; - _lastZoomTime: number; - _mapZoomTouchs: Map; - _gestureZoomListener: EventListener; - get enableGestureZoom(): boolean; - set enableGestureZoom(value: boolean); - _wheelZoomListener: EventListener; - get enableWheelZoom(): boolean; - set enableWheelZoom(value: boolean); - getZoomRange(): { - min: number; - max: number; - } | undefined; - setZoom(zoom: number): Promise; - /** - * Js software-level zoom. - * It does not rely on camera device and camera driver support for zoom. - * @param center - * zoomed camera center in orignal frame. - * `x`: -0.5 ~ 0.5, `y`: -0.5 ~ 0.5. - * @param limit - * limit `zoom` >= 1. - * limit the center point position according to `zoom`, - * so zoomed frame is inside video boundary; - */ - setSoftZoom(zoom: number, config?: { - center?: { - x: number; - y: number; - }; - limit?: boolean; - }): void; - _changeZoomByWheel(ev: WheelEvent): void; - _changeZoomByTouch(ev: TouchEvent): void; - /** The `zoom` event is triggered when zoom updated via a touch gesture or mouse wheel. */ - addEventListener(type: 'zoom', listener: (this: Camera, softZoom?: { - zoom: number; - center: { - x: number; - y: number; - }; - }) => void | any): void; - removeEventListener(type: 'zoom', listener: (this: Camera, softZoom?: { - zoom: number; - center: { - x: number; - y: number; - }; - }) => void | any): void; - } - -interface AdvancedFocusParameters { - minFocusDistanceLimit?: number; - maxFocusDistanceLimit?: number; - firstStepWaitDuration?: number; - coarseStepWaitDuration?: number; - switchStepWaitDuration?: number; - fineStepWaitDuration?: number; - maxStepCount?: number; - /** value < 0 means no never */ - backToContinousDuration?: number; - /** The focus width and height, 0 ~ 1, represents the ratio of the length to the `Math.min(video.videoWidth, video.videoHeight)` */ - focusWH?: number; - /** From far to near, 0 ~ 1. The closer to 1, the more sensitive but more slow. */ - coarseTuneRate?: number; - /** - * 0 ~ 1. - * When the correct focus is closer, the far focus contrast data is unreliable - * and requires a certain degree of error tolerance. - * When closer to 1, it will be more sensitive to contrast changes and may also cause the focus to be too far. - * When closer to 0, there will be more error tolerance, - * and it may also cause the focus to be too close and the process to be too slow. - **/ - coarseTuneTolerance?: number; - /** From near to far, 1 ~ 1.xx. The closer to 1, the more sensitive but more slow. */ - fineTuneRate?: number; -} -declare namespace Camera { - function _getImageContrast(data: Uint8Array | Uint8ClampedArray, width: number, height: number): number; - } - interface Camera { - _enableTapToFocus: false | 'simple' | 'experimental-advanced'; - _isFocusing: boolean; - _tapToFocusListner: EventListener; - _simpleFocus(): Promise; - _advancedFocusParameters: AdvancedFocusParameters; - _advancedFocusTaskId: number; - _advancedFocus(center?: { - x: number; - y: number; - }, width?: number, height?: number): Promise; - get enableTapToFocus(): false | "simple" | "experimental-advanced"; - set enableTapToFocus(value: false | 'simple' | 'experimental-advanced'); - } - -interface AutoTorchParameters { - shortDelay: number; - longDelay: number; - shortLongDelaySwitchCount: number; - /** 0 ~ 255 */ - grayThreshold: number; - maxDarkCount: number; -} - - interface Camera { - get isSupportTorch(): boolean; - _isTorchOn: boolean | undefined; - /** `undefined` means in auto torch mode */ - get isTorchOn(): boolean | undefined; - turnOnTorch(): Promise; - turnOffTorch(): Promise; - _autoTorchParameters: AutoTorchParameters; - /** - * Detect how dark the picture and turn on torch automatically. - * After camera open, it may take a few seconds for picture to be ready. - * So it's suggested not to `turnAutoTorch()` immediately. - * Waiting for 3 seconds may bring a better user experience. - **/ - turnAutoTorch(): void; - /** The auto torch logic detected that the image was too dark and turn on the torch. */ - addEventListener(type: 'torchAutoOn', listener: (this: Camera) => void | any): void; - removeEventListener(type: 'torchAutoOn', listener: (this: Camera) => void | any): void; - } - - - interface Camera { - _shouldCloseWhenHide: boolean; - _isDuringCloseWhenHide: boolean; - _isOpenBeforeHide: boolean; - _maxReopenTry4CloseWhenHide: number; - get shouldCloseWhenHide(): boolean; - set shouldCloseWhenHide(value: boolean); - _closeWhenHide(): Promise; - _closeWhenHideListener: EventListener; - } -declare namespace Camera { - function showFilePicker(inputOptions?: { - accept?: string; - multiple: boolean; - capture?: 'user' | 'environment' | ''; - onchange?: (this: HTMLInputElement, ev: Event) => any; - }): Promise; - function showFilePicker(inputOptions?: any): Promise; - } - -/** - * Return `Element` if possible, otherwise return `DocumentFragment`. - */ -declare const stringToHtml: (str: string, config?: { - inlineScript2Blob?: boolean; - internalCss2Blob: boolean; - insertInternalCss2ExistedSheet?: boolean; -}) => Node; - -declare class FramePipeline { - camera: Camera; - _ctx: CanvasRenderingContext2D; - _data: Uint8Array; - _dataTime: number; - _x: number; - _y: number; - _w: number; - _h: number; - _type: string; - maxTimeout: number; - _pipeTaskId: any; - isSaveOriginalRgba: boolean; - /** - * The `originalRgba` share `ArrayBuffer` with the `data` returned by `getData(..., type: 'rgba')`. - * So you should be careful when transferring `data` to other thread. - */ - originalRgba: Uint8ClampedArray; - constructor(camera?: Camera); - _getData(): Uint8Array; - /** - * @param config - * Each parameter should be kept as stable as possible. - * If you need to switch between multiple parameters frequently, please create multiple `FramePipeline` instances. - * - * `x`, `y`, `width`, `height` will be rounded. - * Note that the round method takes the effect of `x` into account when rounding `width` to minimize the cumulative error. - * The same logic applies to `height`. - */ - getData(config?: { - x?: number; - y?: number; - width?: number; - height?: number; - type?: 'rgba' | 'gray'; - }): Uint8Array; -} - -declare class Beep { - _stAudioFree: Set; - _stAudioPlaying: Set; - _timeLastPlay: number; - _bWarnedMaxTrack: boolean; - maxPlayingBeep: number; - beepSoundSource: string; - beep(): void; -} -/** - * The function will play the default beep sound. - * To play different beep sound, you need create another `Beep` instance. - **/ -declare const beep: () => void; -declare const vibrate: (duration?: number) => void; - -declare const CameraEnhancerModule: { - getVersion(): string; -}; -declare const CameraEnhancer: typeof Camera; -type CameraEnhancer = Camera; -declare const CameraView: typeof Camera; -type CameraView = Camera; -declare namespace Camera { - function createInstance(_?: any): Promise; - function testCameraAccess(): Promise<{ - ok: boolean; - message?: string; - }>; - let defaultUIElementURL: string; - let onWarning: any; - } - interface Camera { - isCameraEnhancer: true; - disposed: boolean; - dispose(): void; - _cameraEnhancer: CameraEnhancer; - _cameraView: CameraView; - _dceLastDeviceId: any; - _dceLastResolution: any; - cameraOpenTimeout: any; - _bTryAnotherCameraWhenFailToOpen: boolean; - _bAutoSingleFrameModeWhenIosPwaFail: boolean; - _oriOpen(): Promise; - open(): Promise; - _oriUpdateCanvasSize(): void; - _oriAddCanvas(): HTMLCanvasElement; - getAllCameras(): Promise<{ - deviceId: string; - label: string; - }[]>; - getAvailableResolutions(): Promise<{ - width: number; - height: number; - }[]>; - getCameraState(): 'opening' | 'open' | 'closed'; - getResolution(): { - width: number; - height: number; - }; - getSelectedCamera(): { - deviceId: string; - label: string; - }; - getVideoSettings(): MediaStreamConstraints; - _ifSaveLastUsedCamera: boolean; - get ifSaveLastUsedCamera(): boolean; - set ifSaveLastUsedCamera(value: boolean); - get ifSkipCameraInspection(): boolean; - set ifSkipCameraInspection(value: boolean); - isOpen(): boolean; - isPaused(): boolean; - resume(): Promise; - selectCamera(device: string | { - deviceId: string; - label: string; - }): Promise<{ - deviceId: string; - width: number; - height: number; - }>; - setResolution(resolution: { - width: number; - height: number; - }): Promise<{ - deviceId: string; - width: number; - height: number; - }>; - updateVideoSettings(constraints: MediaStreamConstraints): Promise; - _dceVideoSrc: string; - get videoSrc(): string; - set videoSrc(value: string | null); - _dceEnhancedFeatures: any; - _dceAutoZoomRange: { - min: number; - max: number; - }; - disableEnhancedFeatures(feature: any): void; - enableEnhancedFeatures(feature: any): void; - getCameraSettings(): MediaTrackSettings; - getCapabilities(): MediaTrackCapabilities; - getColorTemperature(): number; - getExposureCompensation(): number; - getFrameRate(): number; - setColorTemperature(value: number): Promise; - setExposureCompensation(value: number): Promise; - setFrameRate(value: number): Promise; - getZoomSettings(): { - factor: number; - }; - _oriSetZoom(zoom: number): Promise; - _dceZoom: number; - setZoom(settings: { - factor: number; - }): Promise; - resetZoom(): void; - _dceFocusSettings: any; - getFocusSettings(): { - mode: string; - } | { - mode: 'manual'; - distance: number; - } | { - mode: 'manual'; - area: { - centerPoint: { - x: string; - y: string; - }; - width?: string; - height?: string; - }; - }; - setFocus(settings: { - mode: string; - } | { - mode: 'manual'; - distance: number; - } | { - mode: 'manual'; - area: { - centerPoint: { - x: string; - y: string; - }; - width?: string; - height?: string; - }; - }): Promise; - setAutoZoomRange(value: { - min: number; - max: number; - }): void; - getAutoZoomRange(): { - min: number; - max: number; - }; - toggleMirroring(enable: boolean): void; - _framePipeline: FramePipeline; - fetchImage(): { - bytes: Uint8Array; - width: number; - height: number; - stride: number; - format: any; - toCanvas(): HTMLCanvasElement; - }; - getImage(): { - bytes: Uint8Array; - width: number; - height: number; - stride: number; - format: any; - toCanvas(): HTMLCanvasElement; - }; - _dceScanRegion: { - x: number; - y: number; - width: number; - height: number; - isMeasuredInPercentage?: boolean; - } | { - left: number; - top: number; - right: number; - bottom: number; - isMeasuredInPercentage?: boolean; - }; - getScanRegion(): { - x: number; - y: number; - width: number; - height: number; - isMeasuredInPercentage?: boolean; - } | { - left: number; - top: number; - right: number; - bottom: number; - isMeasuredInPercentage?: boolean; - }; - hasNextImageToFetch(): boolean; - isBufferEmpty(): boolean; - startFetching(): void; - _pixelFormat: number; - getPixelFormat(): number; - setPixelFormat(format: number): void; - _colourChannelUsageType: number; - setColourChannelUsageType(format: number): void; - getColourChannelUsageType(): number; - setScanRegion(region?: { - x: number; - y: number; - width: number; - height: number; - isMeasuredInPercentage?: boolean; - } | { - left: number; - top: number; - right: number; - bottom: number; - isMeasuredInPercentage?: boolean; - }): void; - stopFetching(): void; - takePhoto(listener: (dceFrame: { - bytes: Uint8Array; - width: number; - height: number; - stride: number; - format: any; - toCanvas(): HTMLCanvasElement; - }) => void): Promise<{ - bytes: Uint8Array; - width: number; - height: number; - stride: number; - format: any; - toCanvas(): HTMLCanvasElement; - }>; - addImageToBuffer: any; - clearBuffer: any; - getBufferOverflowProtectionMode: any; - getImageCount: any; - getImageFetchInterval: any; - getMaxImageCount: any; - hasImage: any; - setBufferOverflowProtectionMode: any; - setErrorListener: any; - setImageFetchInterval: any; - setMaxImageCount: any; - setNextImageToReturn: any; - _dceSettingsBeforeSingleFrameMode: any; - _singleFrameMode: "disabled" | "camera" | "image"; - _singleFrameModeClickCallback: any; - _singleFrameModeResultForDcv: DCEFrame; - _singleFrameModeCvs: HTMLCanvasElement; - get singleFrameMode(): "disabled" | "camera" | "image"; - set singleFrameMode(value: "disabled" | "camera" | "image"); - setCameraView(view: CameraView): void; - getCameraView(): CameraView; - getVideoEl(): HTMLVideoElement; - convertToPageCoordinates(point: { - x: number; - y: number; - }): { - x: number; - y: number; - }; - convertToClientCoordinates(point: { - x: number; - y: number; - }): { - x: number; - y: number; - }; - convertToScanRegionCoordinates(point: { - x: number; - y: number; - }): { - x: number; - y: number; - }; - convertToContainCoordinates(point: { - x: number; - y: number; - }): { - x: number; - y: number; - }; - _dceEventListeners: { - [key: string]: Set; - }; - on(eventName: string, listener: Function): void; - off(eventName: string, listener: Function): void; - _dceMNIsBeepBarcode: boolean; - _dceMNIsVibrateBarcode: boolean; - getUIElement(): HTMLElement; - setUIElement(ui: HTMLDivElement | string): Promise; - getVideoElement(): HTMLVideoElement; - setVideoFit(fit: 'contain' | 'cover' | 'fill'): void; - getVideoFit(): 'contain' | 'cover' | 'fill'; - getVisibleRegionOfVideo(options?: { - inPixels?: boolean; - }): { - x: number; - y: number; - width: number; - height: number; - isMeasuredInPercentage?: boolean; - }; - _dceRegionMaskStyle: { - lineWidth: number; - strokeStyle: string; - fillStyle: string; - }; - setScanRegionMaskStyle(style: { - lineWidth: number; - strokeStyle: string; - fillStyle: string; - }): void; - getScanRegionMaskStyle(): { - lineWidth: number; - strokeStyle: string; - fillStyle: string; - }; - _dceRegionMaskVisible: boolean; - setScanRegionMaskVisible(visible: boolean): void; - isScanRegionMaskVisible(): boolean; - setScanLaserVisible(visible: boolean): void; - isScanLaserVisible(): boolean; - setPowerByMessageVisible(visible: boolean): void; - isPowerByMessageVisible(): boolean; - _dceTipDuration: number; - _dceTipMessage: string; - getTipConfig(): TipConfig; - setTipConfig(tipConfig: TipConfig): void; - setTipVisible(visible: boolean): void; - isTipVisible(): boolean; - updateTipMessage(message: string): void; - _drawingLayers: DrawingLayer[]; - createDrawingLayer(): DrawingLayer; - getDrawingLayer(id: number): DrawingLayer; - getAllDrawingLayers(): DrawingLayer[]; - clearUserDefinedDrawingLayers(): void; - deleteUserDefinedDrawingLayer(id: number): void; - clearAllInnerDrawingItems(_?: boolean): void; - _capturedResultReceiver: any; - } -declare function _bufferToCanvas(uint8Array: Uint8Array, width: number, height: number, format: number): HTMLCanvasElement; -declare class Feedback { - static _beepInstance: Beep; - static beep(): void; - static get beepSoundSource(): string; - static set beepSoundSource(value: string); - static vibrate(): void; - static vibrateDuration: number; -} -declare const DrawingStyleManager: { - STYLE_BLUE_STROKE: any; - STYLE_GREEN_STROKE: any; - STYLE_ORANGE_STROKE: any; - STYLE_YELLOW_STROKE: any; - STYLE_BLUE_STROKE_FILL: any; - STYLE_GREEN_STROKE_FILL: any; - STYLE_ORANGE_STROKE_FILL: any; - STYLE_YELLOW_STROKE_FILL: any; - STYLE_BLUE_STROKE_TRANSPARENT: any; - STYLE_GREEN_STROKE_TRANSPARENT: any; - STYLE_ORANGE_STROKE_TRANSPARENT: any; - STYLE_YELLOW_STROKE_TRANSPARENT: any; - createDrawingStyle(style: any): any; - getDrawingStyle(id: any): any; - getAllDrawingStyles(): any[]; - updateDrawingStyle(id: any, style: any): void; -}; -declare class DrawingLayer { - _visible: boolean; - _dce: CameraView; - _ctx: CanvasRenderingContext2D; - _defaultStyle: any; - _drawingItems: DrawingItem[]; - _mode: 'editor' | 'viewer'; - _editorView: any; - _renderTask: any; - _newSelectedDrawingItems: DrawingItem[]; - _newDeselectedDrawingItems: DrawingItem[]; - _selectionChangedTask: any; - _onSelectionChanged: (newSelectedDrawingItems: DrawingItem[], newDeselectedDrawingItems: DrawingItem[]) => void; - getId(): this; - isVisible(): boolean; - setVisible(value: boolean): void; - setDefaultStyle(drawingStyleId: any, _1?: any, _2?: any): void; - addDrawingItems(drawingItems: DrawingItem[]): void; - removeDrawingItems(drawingItems: DrawingItem[]): void; - setDrawingItems(drawingItems: DrawingItem[]): void; - getDrawingItems(filter?: (drawingItem: DrawingItem) => boolean): DrawingItem[]; - hasDrawingItem(drawingItem: DrawingItem): boolean; - getSelectedDrawingItems(): any; - clearDrawingItems(): void; - _delayRenderAll(): void; - renderAll(): void; - getMode(): "editor" | "viewer"; - setMode(mode: 'editor' | 'viewer'): Promise; - _delaySelectionChanged(): void; - get onSelectionChanged(): (newSelectedDrawingItems: DrawingItem[], newDeselectedDrawingItems: DrawingItem[]) => void; - set onSelectionChanged(value: (newSelectedDrawingItems: DrawingItem[], newDeselectedDrawingItems: DrawingItem[]) => void); -} -/** - * Determines if a point is inside a quadrilateral. - * @param {number[]} point - [x, y] coordinates of the point. - * @param {number[][]} polygon - Array of points [[x0, y0], [x1, y1], [x2, y2], [x3, y3]]. - * @returns {boolean} - True if the point is inside. - */ -declare function _isPointInPolygon(point: number[], polygon: number[][]): boolean; -/** - * Calculates the shortest distance from a point to a line segment. - * @param {number[]} p - The point [x, y] - * @param {number[][]} segment - The segment [[x1, y1], [x2, y2]] - * @returns {number} The shortest distance - */ -declare function _distToSegment(p: number[], segment: number[][]): number; -declare class DrawingItem { - coordinateBase: string; - drawingLayerId: any; - drawingStyleId: any; - mediaType: EnumDrawingItemMediaType; - _notes: Note[]; - _bSelected: boolean; - _dceEventListeners: { - [key: string]: Set; - }; - get _ps(): { - x: number; - y: number; - }[]; - getState(): EnumDrawingItemState; - addNote(note: Note, replace?: boolean): void; - getNote(name: string): Note; - getNotes(): Note[]; - hasNote(name: string): boolean; - updateNote(name: string, content: any, isMergeContent?: boolean): void; - deleteNote(name: string): void; - clearNotes(): void; - _delayRenderAll(): void; - _setSelected(value: boolean): void; - on(type: string, listener: Function): void; - off(type: string, listener: Function): void; -} -declare class LineDrawingItem extends DrawingItem { - line: { - startPoint: { - x: number; - y: number; - }; - endPoint: { - x: number; - y: number; - }; - }; - get _ps(): { - x: number; - y: number; - }[]; - constructor(line: { - startPoint: { - x: number; - y: number; - }; - endPoint: { - x: number; - y: number; - }; - }, drawingStyleId?: any); - getLine(): { - startPoint: { - x: number; - y: number; - }; - endPoint: { - x: number; - y: number; - }; - }; - setLine(value: { - startPoint: { - x: number; - y: number; - }; - endPoint: { - x: number; - y: number; - }; - }): void; -} -declare class QuadDrawingItem extends DrawingItem { - quad: { - points: { - x: number; - y: number; - }[]; - }; - get _ps(): { - x: number; - y: number; - }[]; - constructor(quad: { - points: { - x: number; - y: number; - }[]; - }, drawingStyleId?: any); - getQuad(): { - points: { - x: number; - y: number; - }[]; - }; - setQuad(value: { - points: { - x: number; - y: number; - }[]; - }): void; -} -declare class RectDrawingItem extends DrawingItem { - rect: { - x: number; - y: number; - width: number; - height: number; - }; - get _ps(): { - x: number; - y: number; - }[]; - constructor(rect: { - x: number; - y: number; - width: number; - height: number; - }, drawingStyleId?: any); - getRect(): { - x: number; - y: number; - width: number; - height: number; - }; - setRect(value: { - x: number; - y: number; - width: number; - height: number; - }): void; -} -declare class TextDrawingItem extends DrawingItem { - text: string; - rect: { - x: number; - y: number; - width: number; - height: number; - }; - get _ps(): { - x: number; - y: number; - }[]; - constructor(text: string, rect: { - x: number; - y: number; - width: number; - height: number; - }, drawingStyleId?: any); - getText(): string; - setText(value: string): void; - getTextRect(): { - x: number; - y: number; - width: number; - height: number; - }; - setTextRect(value: { - x: number; - y: number; - width: number; - height: number; - }): void; -} -declare class ImageDrawingItem extends DrawingItem { - image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement; - rect: { - x: number; - y: number; - width: number; - height: number; - }; - maintainAspectRatio: boolean; - get _ps(): { - x: number; - y: number; - }[]; - constructor(image: { - bytes: Uint8Array; - width: number; - height: number; - stride: number; - format: any; - } | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, rect: { - x: number; - y: number; - width: number; - height: number; - }, maintainAspectRatio: boolean, drawingStyleId?: any); - getImage(): HTMLVideoElement | HTMLCanvasElement | HTMLImageElement; - setImage(image: { - bytes: Uint8Array; - width: number; - height: number; - stride: number; - format: any; - } | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): void; - getImageRect(): { - x: number; - y: number; - width: number; - height: number; - }; - setImageRect(value: { - x: number; - y: number; - width: number; - height: number; - }): void; -} - -declare enum EnumDrawingItemMediaType { - /** - * Represents a rectangle, a basic geometric shape with four sides where opposite sides are equal in length and it has four right angles. - */ - DIMT_RECTANGLE = 1, - /** - * Represents any four-sided figure. This includes squares, rectangles, rhombuses, and more general forms that do not necessarily have right angles or equal sides. - */ - DIMT_QUADRILATERAL = 2, - /** - * Represents a text element. This allows for the inclusion of textual content as a distinct drawing item within the graphic representation. - */ - DIMT_TEXT = 4, - /** - * Represents an image. This enables embedding bitmap images within the drawing context. - */ - DIMT_IMAGE = 16, - /** - * Represents a line segment. This is the simplest form of a drawing item, defined by two endpoints and the straight path connecting them. - */ - DIMT_LINE = 64 -} -declare enum EnumDrawingItemState { - /** - * DIS_DEFAULT: The default state of a drawing item. This state indicates that the drawing item is in its normal, unselected state. - */ - DIS_DEFAULT = 1, - /** - * DIS_SELECTED: Indicates that the drawing item is currently selected. This state can trigger different behaviors or visual styles, such as highlighting the item to show it is active or the focus of user interaction. - */ - DIS_SELECTED = 2 -} -declare enum EnumEnhancedFeatures { - /** - * Enables auto-focus on areas likely to contain barcodes, assisting in their identification and interpretation. - */ - EF_ENHANCED_FOCUS = 4, - /** - * Facilitates automatic zooming in on areas likely to contain barcodes, aiding in their detection and decoding. - */ - EF_AUTO_ZOOM = 16, - /** - * Allows users to tap on a specific item or area in the video feed to focus on, simplifying the interaction for selecting or highlighting important elements. - */ - EF_TAP_TO_FOCUS = 64 -} -declare enum EnumPixelFormat { - GREY = "grey", - GREY32 = "grey32", - RGBA = "rgba", - RBGA = "rbga", - GRBA = "grba", - GBRA = "gbra", - BRGA = "brga", - BGRA = "bgra" -} -interface Resolution { - width: number; - height: number; -} -interface DCEFrame { - bytes: Uint8Array; - width: number; - height: number; - stride: number; - format: any; - toCanvas(): HTMLCanvasElement; -} -interface DrawingStyle { - fillStyle?: string; - lineWidth?: number; - paintMode?: string; - strokeStyle?: string; -} -interface PlayCallbackInfo { - deviceId: string; - width: number; - height: number; -} -interface VideoDeviceInfo { - deviceId: string; - label: string; -} -interface VideoFrameTag { - /** The unique identifier of the image. */ - imageId: number; - /** The type of the image. */ - type: any; - /** Indicates whether the video frame is cropped. */ - isCropped: boolean; - /** The region based on which the original frame was cropped. If `isCropped` is false, the region covers the entire original image. */ - cropRegion: any; - /** The original width of the video frame before any cropping. */ - originalWidth: number; - /** The original height of the video frame before any cropping. */ - originalHeight: number; - /** The current width of the video frame after cropping. */ - currentWidth: number; - /** The current height of the video frame after cropping. */ - currentHeight: number; - /** The time spent acquiring the frame, in milliseconds. */ - timeSpent: number; - /** The timestamp marking the completion of the frame acquisition. */ - timeStamp: number; -} -interface TipConfig { - /** The top left point of the tip message box. */ - topLeftPoint?: any; - /** The width of the tip message box. */ - width?: number; - /** The display duration of the tip in milliseconds. */ - duration: number; - /** The base coordinate system used (e.g., "view" or "image"). */ - coordinateBase?: "view" | "image"; -} -interface Note { - /** The name of the note. */ - name: string; - /** The content of the note, can be of any type. */ - content: any; -} - -export { Beep, Camera, CameraEnhancer, CameraEnhancerModule, CameraInfo, CameraPreset, CameraStatus, CameraView, CameraZsFunc, DCEFrame, DMMoreMediaTrackCapabilities, DrawingItem, DrawingLayer, DrawingStyle, DrawingStyleManager, EnumDrawingItemMediaType, EnumDrawingItemState, EnumEnhancedFeatures, EnumPixelFormat, Feedback, FramePipeline, ImageDrawingItem, LineDrawingItem, Note, PlayCallbackInfo, QuadDrawingItem, RectDrawingItem, Resolution, TextDrawingItem, TipConfig, VideoDeviceInfo, VideoFrameTag, _bufferToCanvas, _distToSegment, _isPointInPolygon, beep, stringToHtml, vibrate }; - diff --git a/dist/dbr.bundle.esm.js b/dist/dbr.bundle.esm.js deleted file mode 100644 index 1d2c7701..00000000 --- a/dist/dbr.bundle.esm.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! -* Dynamsoft JavaScript Library -* @product Dynamsoft Barcode Reader JS Edition Bundle -* @website http://www.dynamsoft.com -* @copyright Copyright 2026, Dynamsoft Corporation -* @author Dynamsoft -* @version 11.4.2000 -* @fileoverview Dynamsoft JavaScript Library for Barcode Reader -* More info on dbr JS: https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/ -*/ -function e(e,t,i,s){return new(i||(i=Promise))(function(n,o){function r(e){try{c(s.next(e))}catch(e){o(e)}}function a(e){try{c(s.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(r,a)}c((s=s.apply(e,t||[])).next())})}function t(e,t,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(e):s?s.value:t.get(e)}function i(e,t,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,i):n?n.value=i:t.set(e,i),i}var s,n;"function"==typeof SuppressedError&&SuppressedError,function(e){e[e.SM_SINGLE=0]="SM_SINGLE",e[e.SM_MULTI_UNIQUE=1]="SM_MULTI_UNIQUE"}(s||(s={})),function(e){e[e.RS_SUCCESS=0]="RS_SUCCESS",e[e.RS_CANCELLED=1]="RS_CANCELLED",e[e.RS_FAILED=2]="RS_FAILED"}(n||(n={}));const o=e=>e&&"object"==typeof e&&"function"==typeof e.then,r=(async()=>{})().constructor;let a=class extends r{get status(){return this._s}get isPending(){return"pending"===this._s}get isFulfilled(){return"fulfilled"===this._s}get isRejected(){return"rejected"===this._s}get task(){return this._task}set task(e){var t=this;let i;this._task=e,o(e)?i=e:"function"==typeof e&&(i=new r(e)),i&&async function(){try{const s=await i;e===t._task&&t.resolve(s)}catch(i){e===t._task&&t.reject(i)}}()}get isEmpty(){return null==this._task}constructor(e){let t,i;super((e,s)=>{t=e,i=s}),this._s="pending",this.resolve=e=>{this.isPending&&(o(e)?this.task=e:(this._s="fulfilled",t(e)))},this.reject=e=>{this.isPending&&(this._s="rejected",i(e))},this.task=e}};function c(e,t,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(e):s?s.value:t.get(e)}function l(e,t,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,i):n?n.value=i:t.set(e,i),i}var d,u,h;"function"==typeof SuppressedError&&SuppressedError,function(e){e[e.BOPM_BLOCK=0]="BOPM_BLOCK",e[e.BOPM_UPDATE=1]="BOPM_UPDATE"}(d||(d={})),function(e){e[e.CCUT_AUTO=0]="CCUT_AUTO",e[e.CCUT_FULL_CHANNEL=1]="CCUT_FULL_CHANNEL",e[e.CCUT_Y_CHANNEL_ONLY=2]="CCUT_Y_CHANNEL_ONLY",e[e.CCUT_RGB_R_CHANNEL_ONLY=3]="CCUT_RGB_R_CHANNEL_ONLY",e[e.CCUT_RGB_G_CHANNEL_ONLY=4]="CCUT_RGB_G_CHANNEL_ONLY",e[e.CCUT_RGB_B_CHANNEL_ONLY=5]="CCUT_RGB_B_CHANNEL_ONLY"}(u||(u={})),function(e){e[e.IPF_BINARY=0]="IPF_BINARY",e[e.IPF_BINARYINVERTED=1]="IPF_BINARYINVERTED",e[e.IPF_GRAYSCALED=2]="IPF_GRAYSCALED",e[e.IPF_NV21=3]="IPF_NV21",e[e.IPF_RGB_565=4]="IPF_RGB_565",e[e.IPF_RGB_555=5]="IPF_RGB_555",e[e.IPF_RGB_888=6]="IPF_RGB_888",e[e.IPF_ARGB_8888=7]="IPF_ARGB_8888",e[e.IPF_RGB_161616=8]="IPF_RGB_161616",e[e.IPF_ARGB_16161616=9]="IPF_ARGB_16161616",e[e.IPF_ABGR_8888=10]="IPF_ABGR_8888",e[e.IPF_ABGR_16161616=11]="IPF_ABGR_16161616",e[e.IPF_BGR_888=12]="IPF_BGR_888",e[e.IPF_BINARY_8=13]="IPF_BINARY_8",e[e.IPF_NV12=14]="IPF_NV12",e[e.IPF_BINARY_8_INVERTED=15]="IPF_BINARY_8_INVERTED"}(h||(h={}));const _="undefined"==typeof self,m="function"==typeof importScripts,g=(()=>{if(!m){if(!_&&document.currentScript){let e=document.currentScript.src,t=e.indexOf("?");if(-1!=t)e=e.substring(0,t);else{let t=e.indexOf("#");-1!=t&&(e=e.substring(0,t))}return e.substring(0,e.lastIndexOf("/")+1)}return"./"}})(),f=e=>{if(null==e&&(e="./"),_||m);else{let t=document.createElement("a");t.href=e,e=t.href}return e.endsWith("/")||(e+="/"),e},p=e=>Object.prototype.toString.call(e),E=e=>Array.isArray?Array.isArray(e):"[object Array]"===p(e),y=e=>"number"==typeof e&&!Number.isNaN(e),I=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),v=e=>!(!I(e)||!y(e.x)||!y(e.y)||!y(e.radius)||e.radius<0||!y(e.startAngle)||!y(e.endAngle)),R=e=>!!I(e)&&!!E(e.points)&&0!=e.points.length&&!e.points.some(e=>!O(e)),C=e=>!(!I(e)||!y(e.width)||e.width<=0||!y(e.height)||e.height<=0||!y(e.stride)||e.stride<=0||!("format"in e)||"tag"in e&&!D(e.tag)),T=(e,t)=>"bytes"===e&&"object"==typeof t&&"number"==typeof t.ptr&&"number"==typeof t.length,w=e=>!(!C(e)||!y(e.bytes.length)&&!y(e.bytes.ptr)),S=e=>!!C(e)&&e.bytes instanceof Uint8Array,A=e=>!(!I(e)||!y(e.left)||e.left<0||!y(e.top)||e.top<0||!y(e.right)||e.right<0||!y(e.bottom)||e.bottom<0||e.left>=e.right||e.top>=e.bottom),D=e=>null===e||!!I(e)&&!!y(e.imageId)&&"type"in e,b=e=>!(!I(e)||!O(e.startPoint)||!O(e.endPoint)||e.startPoint.x==e.endPoint.x&&e.startPoint.y==e.endPoint.y),O=e=>!!I(e)&&!!y(e.x)&&!!y(e.y),L=e=>!!I(e)&&!!E(e.points)&&0!=e.points.length&&!e.points.some(e=>!O(e)),N=e=>!!I(e)&&!!E(e.points)&&0!=e.points.length&&4==e.points.length&&!e.points.some(e=>!O(e)),M=e=>!(!I(e)||!y(e.x)||!y(e.y)||!y(e.width)||e.width<0||!y(e.height)||e.height<0),B=async(e,t,i)=>await new Promise((s,n)=>{let o=new XMLHttpRequest;o.responseType=t,o.onloadstart=()=>{i&&i.loadstartCallback&&i.loadstartCallback()},o.onloadend=async e=>{i&&i.loadendCallback&&i.loadendCallback(),o.status<200||o.status>=300?n(o.status):s(o.response)},o.onprogress=e=>{i&&i.progressCallback&&i.progressCallback(e)},o.onerror=e=>{n(e)},o.open("GET",e,!0),o.send()}),F=e=>/^(https:\/\/www\.|http:\/\/www\.|https:\/\/|http:\/\/)|^[a-zA-Z0-9]{2,}(\.[a-zA-Z0-9]{2,})(\.[a-zA-Z0-9]{2,})?/.test(e),x=(e,t)=>{let i=e.split("."),s=t.split(".");for(let e=0;e{const t={};for(let i in e){if("rootDirectory"===i)continue;let s=i,n=e[s],o=n&&"object"==typeof n&&n.path?n.path:n,r=e.rootDirectory;if(r&&!r.endsWith("/")&&(r+="/"),"object"==typeof n&&n.isInternal)r&&(o=e[s].version?`${r}${$[s]}@${e[s].version}/${"dcvData"===s?"":"dist/"}${"ddv"===s?"engine":""}`:`${r}${$[s]}/${"dcvData"===s?"":"dist/"}${"ddv"===s?"engine":""}`);else{const i=/^@engineRootDirectory(\/?)/;if("string"==typeof o&&(o=o.replace(i,r||"")),"object"==typeof o&&"dwt"===s){const n=e[s].resourcesPath,o=e[s].serviceInstallerLocation;t[s]={resourcesPath:n.replace(i,r||""),serviceInstallerLocation:o.replace(i,r||"")};continue}}t[s]=f(o)}return t},k=async(e,t,i)=>await new Promise(async(s,n)=>{try{const n=t.split(".");let o=n[n.length-1];const r=await G(`image/${o}`,e);n.length<=1&&(o="png");const a=new File([r],t,{type:`image/${o}`});if(i){const e=URL.createObjectURL(a),i=document.createElement("a");i.href=e,i.download=t,i.click()}s(a)}catch(e){n()}}),U=e=>{S(e)&&(e=j(e));const t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d",{willReadFrequently:!0}).putImageData(e,0,0),t},V=(e,t)=>{S(t)&&(t=j(t));const i=U(t);let s=new Image,n=i.toDataURL(e);return s.src=n,s},G=async(e,t)=>{S(t)&&(t=j(t));const i=U(t);if("image/bmp"===e){const e=i.getContext("2d"),t=W(e.getImageData(0,0,i.width,i.height));return new Blob([t],{type:"image/bmp"})}return new Promise((t,s)=>{i.toBlob(e=>t(e),e)})},W=e=>{const t=e.width,i=e.height,s=e.data,n=4*Math.floor((24*t+31)/32),o=n*i,r=54+o,a=new ArrayBuffer(r),c=new DataView(a);c.setUint16(0,19778,!0),c.setUint32(2,r,!0),c.setUint16(6,0,!0),c.setUint16(8,0,!0),c.setUint32(10,54,!0),c.setUint32(14,40,!0),c.setInt32(18,t,!0),c.setInt32(22,-i,!0),c.setUint16(26,1,!0),c.setUint16(28,24,!0),c.setUint32(30,0,!0),c.setUint32(34,o,!0),c.setInt32(38,2835,!0),c.setInt32(42,2835,!0),c.setUint32(46,0,!0),c.setUint32(50,0,!0);let l=54;const d=n-3*t;for(let e=0;e{let t,i=e.bytes;if(!(i&&i instanceof Uint8Array))throw Error("Parameter type error");if(Number(e.format)===h.IPF_BGR_888){const e=i.length/3;t=new Uint8ClampedArray(4*e);for(let s=0;s=n)break;t[r]=t[r+1]=t[r+2]=(128&s)/128*255,t[r+3]=255,s<<=1}}}else if(Number(e.format)===h.IPF_ABGR_8888){const e=i.length/4;t=new Uint8ClampedArray(i.length);for(let s=0;sWebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),H=async e=>{let t=URL.createObjectURL(e);try{const e=await new Promise((e,i)=>{const s=new Image;s.onload=()=>e(s),s.onerror=i,s.src=t}),i=document.createElement("canvas"),s=i.getContext("2d");i.width=e.width,i.height=e.height,s.drawImage(e,0,0);return{bytes:Uint8Array.from(s.getImageData(0,0,i.width,i.height).data),width:i.width,height:i.height,stride:4*i.width,format:h.IPF_ABGR_8888}}finally{URL.revokeObjectURL(t)}},q=async(e,t)=>{const i=new TextEncoder,s=await crypto.subtle.importKey("raw",i.encode(t),"PBKDF2",!1,["deriveKey"]),n=await crypto.subtle.deriveKey({name:"PBKDF2",salt:i.encode("salt-for-key-derivation"),iterations:1e5,hash:"SHA-256"},s,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"]),o=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.encrypt({name:"AES-GCM",iv:o,tagLength:128},n,i.encode(e)),a=new Uint8Array(o.length+r.byteLength);return a.set(o),a.set(new Uint8Array(r),o.length),btoa(String.fromCharCode.apply(null,a))},Y=async(e,t)=>{const i=atob(e),s=new Uint8Array(i.length);for(let e=0;e=c(this,X,"f"))switch(c(this,Q,"f")){case d.BOPM_BLOCK:break;case d.BOPM_UPDATE:if(c(this,K,"f").push(e),I(c(this,ee,"f"))&&y(c(this,ee,"f").imageId)&&1==c(this,ee,"f").keepInBuffer)for(;c(this,K,"f").length>c(this,X,"f");){const e=c(this,K,"f").findIndex(e=>{var t;return(null===(t=e.imageTag)||void 0===t?void 0:t.imageId)!==c(this,ee,"f").imageId});c(this,K,"f").splice(e,1)}else c(this,K,"f").splice(0,c(this,K,"f").length-c(this,X,"f"))}else c(this,K,"f").push(e)}getImage(){if(0===c(this,K,"f").length)return null;let t;if(c(this,ee,"f")&&y(c(this,ee,"f").imageId)){const e=c(this,z,"m",ie).call(this,c(this,ee,"f").imageId);if(e<0)throw new Error(`Image with id ${c(this,ee,"f").imageId} doesn't exist.`);t=c(this,K,"f").slice(e,e+1)[0]}else t=c(this,K,"f").pop();if([h.IPF_RGB_565,h.IPF_RGB_555,h.IPF_RGB_888,h.IPF_ARGB_8888,h.IPF_RGB_161616,h.IPF_ARGB_16161616,h.IPF_ABGR_8888,h.IPF_ABGR_16161616,h.IPF_BGR_888].includes(t.format)){if(c(this,te,"f")===u.CCUT_RGB_R_CHANNEL_ONLY){e._onLog&&e._onLog("only get R channel data.");const i=new Uint8Array(t.width*t.height);for(let e=0;e0!==e.length&&e.every(e=>y(e)))(e))throw new TypeError("Invalid 'imageId'.");if(void 0!==t&&"[object Boolean]"!==p(t))throw new TypeError("Invalid 'keepInBuffer'.");l(this,ee,{imageId:e,keepInBuffer:t},"f")}_resetNextReturnedImage(){l(this,ee,null,"f")}hasImage(e){return c(this,z,"m",ie).call(this,e)>=0}startFetching(){l(this,J,!0,"f")}stopFetching(){l(this,J,!1,"f")}setMaxImageCount(e){if("number"!=typeof e)throw new TypeError("Invalid 'count'.");if(e<1||Math.round(e)!==e)throw new Error("Invalid 'count'.");for(l(this,X,e,"f");c(this,K,"f")&&c(this,K,"f").length>e;)c(this,K,"f").shift()}getMaxImageCount(){return c(this,X,"f")}getImageCount(){return c(this,K,"f").length}clearBuffer(){c(this,K,"f").length=0}isBufferEmpty(){return 0===c(this,K,"f").length}setBufferOverflowProtectionMode(e){l(this,Q,e,"f")}getBufferOverflowProtectionMode(){return c(this,Q,"f")}setColourChannelUsageType(e){l(this,te,e,"f")}getColourChannelUsageType(){return c(this,te,"f")}};K=new WeakMap,X=new WeakMap,Q=new WeakMap,J=new WeakMap,ee=new WeakMap,te=new WeakMap,z=new WeakSet,ie=function(e){if("number"!=typeof e)throw new TypeError("Invalid 'imageId'.");return c(this,K,"f").findIndex(t=>{var i;return(null===(i=t.imageTag)||void 0===i?void 0:i.imageId)===e})},"undefined"!=typeof navigator&&(se=navigator,ne=se.userAgent,oe=se.platform,re=se.mediaDevices),function(){if(!_){const e={Edge:{search:"Edg",verSearch:"Edg"},OPR:null,Chrome:null,Safari:{str:se.vendor,search:"Apple",verSearch:["Version","iPhone OS","CPU OS"]},Firefox:null,Explorer:{search:"MSIE",verSearch:"MSIE"}},t={HarmonyOS:null,Android:null,iPhone:null,iPad:null,Windows:{str:oe,search:"Win"},Mac:{str:oe},Linux:{str:oe}};let i="unknownBrowser",s=0,n="unknownOS";for(let t in e){const n=e[t]||{};let o=n.str||ne,r=n.search||t,a=n.verStr||ne,c=n.verSearch||t;if(c instanceof Array||(c=[c]),-1!=o.indexOf(r)){i=t;for(let e of c){let t=a.indexOf(e);if(-1!=t){s=parseFloat(a.substring(t+e.length+1));break}}break}}for(let e in t){const i=t[e]||{};let s=i.str||ne,o=i.search||e;if(-1!=s.indexOf(o)){n=e;break}}"Linux"==n&&-1!=ne.indexOf("Windows NT")&&(n="HarmonyOS"),ae={browser:i,version:s,OS:n}}_&&(ae={browser:"ssr",version:0,OS:"ssr"})}();const le="undefined"!=typeof WebAssembly&&ne&&!(/Safari/.test(ne)&&!/Chrome/.test(ne)&&/\(.+\s11_2_([2-6]).*\)/.test(ne)),de=!("undefined"==typeof Worker),ue=!(!re||!re.getUserMedia),he=async()=>{let e=!1;if(ue)try{(await re.getUserMedia({video:!0})).getTracks().forEach(e=>{e.stop()}),e=!0}catch(e){}return e};var _e,me,ge,fe,pe,Ee,ye,Ie,ve;"Chrome"===ae.browser&&ae.version>66||"Safari"===ae.browser&&ae.version>13||"OPR"===ae.browser&&ae.version>43||"Edge"===ae.browser&&ae.version,function(e){e[e.CRIT_ORIGINAL_IMAGE=1]="CRIT_ORIGINAL_IMAGE",e[e.CRIT_BARCODE=2]="CRIT_BARCODE",e[e.CRIT_TEXT_LINE=4]="CRIT_TEXT_LINE",e[e.CRIT_DETECTED_QUAD=8]="CRIT_DETECTED_QUAD",e[e.CRIT_DESKEWED_IMAGE=16]="CRIT_DESKEWED_IMAGE",e[e.CRIT_PARSED_RESULT=32]="CRIT_PARSED_RESULT",e[e.CRIT_ENHANCED_IMAGE=64]="CRIT_ENHANCED_IMAGE"}(_e||(_e={})),function(e){e[e.CT_NORMAL_INTERSECTED=0]="CT_NORMAL_INTERSECTED",e[e.CT_T_INTERSECTED=1]="CT_T_INTERSECTED",e[e.CT_CROSS_INTERSECTED=2]="CT_CROSS_INTERSECTED",e[e.CT_NOT_INTERSECTED=3]="CT_NOT_INTERSECTED"}(me||(me={})),function(e){e[e.EC_OK=0]="EC_OK",e[e.EC_UNKNOWN=-1e4]="EC_UNKNOWN",e[e.EC_NO_MEMORY=-10001]="EC_NO_MEMORY",e[e.EC_NULL_POINTER=-10002]="EC_NULL_POINTER",e[e.EC_LICENSE_INVALID=-10003]="EC_LICENSE_INVALID",e[e.EC_LICENSE_EXPIRED=-10004]="EC_LICENSE_EXPIRED",e[e.EC_FILE_NOT_FOUND=-10005]="EC_FILE_NOT_FOUND",e[e.EC_FILE_TYPE_NOT_SUPPORTED=-10006]="EC_FILE_TYPE_NOT_SUPPORTED",e[e.EC_BPP_NOT_SUPPORTED=-10007]="EC_BPP_NOT_SUPPORTED",e[e.EC_INDEX_INVALID=-10008]="EC_INDEX_INVALID",e[e.EC_CUSTOM_REGION_INVALID=-10010]="EC_CUSTOM_REGION_INVALID",e[e.EC_IMAGE_READ_FAILED=-10012]="EC_IMAGE_READ_FAILED",e[e.EC_TIFF_READ_FAILED=-10013]="EC_TIFF_READ_FAILED",e[e.EC_DIB_BUFFER_INVALID=-10018]="EC_DIB_BUFFER_INVALID",e[e.EC_PDF_READ_FAILED=-10021]="EC_PDF_READ_FAILED",e[e.EC_PDF_DLL_MISSING=-10022]="EC_PDF_DLL_MISSING",e[e.EC_PAGE_NUMBER_INVALID=-10023]="EC_PAGE_NUMBER_INVALID",e[e.EC_CUSTOM_SIZE_INVALID=-10024]="EC_CUSTOM_SIZE_INVALID",e[e.EC_TIMEOUT=-10026]="EC_TIMEOUT",e[e.EC_JSON_PARSE_FAILED=-10030]="EC_JSON_PARSE_FAILED",e[e.EC_JSON_TYPE_INVALID=-10031]="EC_JSON_TYPE_INVALID",e[e.EC_JSON_KEY_INVALID=-10032]="EC_JSON_KEY_INVALID",e[e.EC_JSON_VALUE_INVALID=-10033]="EC_JSON_VALUE_INVALID",e[e.EC_JSON_NAME_KEY_MISSING=-10034]="EC_JSON_NAME_KEY_MISSING",e[e.EC_JSON_NAME_VALUE_DUPLICATED=-10035]="EC_JSON_NAME_VALUE_DUPLICATED",e[e.EC_TEMPLATE_NAME_INVALID=-10036]="EC_TEMPLATE_NAME_INVALID",e[e.EC_JSON_NAME_REFERENCE_INVALID=-10037]="EC_JSON_NAME_REFERENCE_INVALID",e[e.EC_PARAMETER_VALUE_INVALID=-10038]="EC_PARAMETER_VALUE_INVALID",e[e.EC_DOMAIN_NOT_MATCH=-10039]="EC_DOMAIN_NOT_MATCH",e[e.EC_LICENSE_KEY_NOT_MATCH=-10043]="EC_LICENSE_KEY_NOT_MATCH",e[e.EC_SET_MODE_ARGUMENT_ERROR=-10051]="EC_SET_MODE_ARGUMENT_ERROR",e[e.EC_GET_MODE_ARGUMENT_ERROR=-10055]="EC_GET_MODE_ARGUMENT_ERROR",e[e.EC_IRT_LICENSE_INVALID=-10056]="EC_IRT_LICENSE_INVALID",e[e.EC_FILE_SAVE_FAILED=-10058]="EC_FILE_SAVE_FAILED",e[e.EC_STAGE_TYPE_INVALID=-10059]="EC_STAGE_TYPE_INVALID",e[e.EC_IMAGE_ORIENTATION_INVALID=-10060]="EC_IMAGE_ORIENTATION_INVALID",e[e.EC_CONVERT_COMPLEX_TEMPLATE_ERROR=-10061]="EC_CONVERT_COMPLEX_TEMPLATE_ERROR",e[e.EC_CALL_REJECTED_WHEN_CAPTURING=-10062]="EC_CALL_REJECTED_WHEN_CAPTURING",e[e.EC_NO_IMAGE_SOURCE=-10063]="EC_NO_IMAGE_SOURCE",e[e.EC_READ_DIRECTORY_FAILED=-10064]="EC_READ_DIRECTORY_FAILED",e[e.EC_MODULE_NOT_FOUND=-10065]="EC_MODULE_NOT_FOUND",e[e.EC_MULTI_PAGES_NOT_SUPPORTED=-10066]="EC_MULTI_PAGES_NOT_SUPPORTED",e[e.EC_FILE_ALREADY_EXISTS=-10067]="EC_FILE_ALREADY_EXISTS",e[e.EC_CREATE_FILE_FAILED=-10068]="EC_CREATE_FILE_FAILED",e[e.EC_IMAGE_DATA_INVALID=-10069]="EC_IMAGE_DATA_INVALID",e[e.EC_IMAGE_SIZE_NOT_MATCH=-10070]="EC_IMAGE_SIZE_NOT_MATCH",e[e.EC_IMAGE_PIXEL_FORMAT_NOT_MATCH=-10071]="EC_IMAGE_PIXEL_FORMAT_NOT_MATCH",e[e.EC_SECTION_LEVEL_RESULT_IRREPLACEABLE=-10072]="EC_SECTION_LEVEL_RESULT_IRREPLACEABLE",e[e.EC_AXIS_DEFINITION_INCORRECT=-10073]="EC_AXIS_DEFINITION_INCORRECT",e[e.EC_RESULT_TYPE_MISMATCH_IRREPLACEABLE=-10074]="EC_RESULT_TYPE_MISMATCH_IRREPLACEABLE",e[e.EC_PDF_LIBRARY_LOAD_FAILED=-10075]="EC_PDF_LIBRARY_LOAD_FAILED",e[e.EC_UNSUPPORTED_JSON_KEY_WARNING=-10077]="EC_UNSUPPORTED_JSON_KEY_WARNING",e[e.EC_MODEL_FILE_NOT_FOUND=-10078]="EC_MODEL_FILE_NOT_FOUND",e[e.EC_PDF_LICENSE_NOT_FOUND=-10079]="EC_PDF_LICENSE_NOT_FOUND",e[e.EC_RECT_INVALID=-10080]="EC_RECT_INVALID",e[e.EC_TEMPLATE_VERSION_INCOMPATIBLE=-10081]="EC_TEMPLATE_VERSION_INCOMPATIBLE",e[e.EC_PORTRAIT_ZONE_NOT_FOUND=-10082]="EC_PORTRAIT_ZONE_NOT_FOUND",e[e.EC_NO_LICENSE=-2e4]="EC_NO_LICENSE",e[e.EC_LICENSE_BUFFER_FAILED=-20002]="EC_LICENSE_BUFFER_FAILED",e[e.EC_LICENSE_SYNC_FAILED=-20003]="EC_LICENSE_SYNC_FAILED",e[e.EC_DEVICE_NOT_MATCH=-20004]="EC_DEVICE_NOT_MATCH",e[e.EC_BIND_DEVICE_FAILED=-20005]="EC_BIND_DEVICE_FAILED",e[e.EC_INSTANCE_COUNT_OVER_LIMIT=-20008]="EC_INSTANCE_COUNT_OVER_LIMIT",e[e.EC_TRIAL_LICENSE=-20010]="EC_TRIAL_LICENSE",e[e.EC_LICENSE_VERSION_NOT_MATCH=-20011]="EC_LICENSE_VERSION_NOT_MATCH",e[e.EC_LICENSE_CACHE_USED=-20012]="EC_LICENSE_CACHE_USED",e[e.EC_LICENSE_AUTH_QUOTA_EXCEEDED=-20013]="EC_LICENSE_AUTH_QUOTA_EXCEEDED",e[e.EC_LICENSE_RESULTS_LIMIT_EXCEEDED=-20014]="EC_LICENSE_RESULTS_LIMIT_EXCEEDED",e[e.EC_BARCODE_FORMAT_INVALID=-30009]="EC_BARCODE_FORMAT_INVALID",e[e.EC_CUSTOM_MODULESIZE_INVALID=-30025]="EC_CUSTOM_MODULESIZE_INVALID",e[e.EC_TEXT_LINE_GROUP_LAYOUT_CONFLICT=-40101]="EC_TEXT_LINE_GROUP_LAYOUT_CONFLICT",e[e.EC_TEXT_LINE_GROUP_REGEX_CONFLICT=-40102]="EC_TEXT_LINE_GROUP_REGEX_CONFLICT",e[e.EC_QUADRILATERAL_INVALID=-50057]="EC_QUADRILATERAL_INVALID",e[e.EC_PANORAMA_LICENSE_INVALID=-70060]="EC_PANORAMA_LICENSE_INVALID",e[e.EC_RESOURCE_PATH_NOT_EXIST=-90001]="EC_RESOURCE_PATH_NOT_EXIST",e[e.EC_RESOURCE_LOAD_FAILED=-90002]="EC_RESOURCE_LOAD_FAILED",e[e.EC_CODE_SPECIFICATION_NOT_FOUND=-90003]="EC_CODE_SPECIFICATION_NOT_FOUND",e[e.EC_FULL_CODE_EMPTY=-90004]="EC_FULL_CODE_EMPTY",e[e.EC_FULL_CODE_PREPROCESS_FAILED=-90005]="EC_FULL_CODE_PREPROCESS_FAILED",e[e.EC_LICENSE_WARNING=-10076]="EC_LICENSE_WARNING",e[e.EC_BARCODE_READER_LICENSE_NOT_FOUND=-30063]="EC_BARCODE_READER_LICENSE_NOT_FOUND",e[e.EC_LABEL_RECOGNIZER_LICENSE_NOT_FOUND=-40103]="EC_LABEL_RECOGNIZER_LICENSE_NOT_FOUND",e[e.EC_DOCUMENT_NORMALIZER_LICENSE_NOT_FOUND=-50058]="EC_DOCUMENT_NORMALIZER_LICENSE_NOT_FOUND",e[e.EC_CODE_PARSER_LICENSE_NOT_FOUND=-90012]="EC_CODE_PARSER_LICENSE_NOT_FOUND"}(ge||(ge={})),function(e){e[e.GEM_SKIP=0]="GEM_SKIP",e[e.GEM_AUTO=1]="GEM_AUTO",e[e.GEM_GENERAL=2]="GEM_GENERAL",e[e.GEM_GRAY_EQUALIZE=4]="GEM_GRAY_EQUALIZE",e[e.GEM_GRAY_SMOOTH=8]="GEM_GRAY_SMOOTH",e[e.GEM_SHARPEN_SMOOTH=16]="GEM_SHARPEN_SMOOTH",e[e.GEM_REV=-2147483648]="GEM_REV",e[e.GEM_END=-1]="GEM_END"}(fe||(fe={})),function(e){e[e.GTM_SKIP=0]="GTM_SKIP",e[e.GTM_INVERTED=1]="GTM_INVERTED",e[e.GTM_ORIGINAL=2]="GTM_ORIGINAL",e[e.GTM_AUTO=4]="GTM_AUTO",e[e.GTM_REV=-2147483648]="GTM_REV",e[e.GTM_END=-1]="GTM_END"}(pe||(pe={})),function(e){e[e.ITT_FILE_IMAGE=0]="ITT_FILE_IMAGE",e[e.ITT_VIDEO_FRAME=1]="ITT_VIDEO_FRAME"}(Ee||(Ee={})),function(e){e[e.PDFRM_VECTOR=1]="PDFRM_VECTOR",e[e.PDFRM_RASTER=2]="PDFRM_RASTER",e[e.PDFRM_REV=-2147483648]="PDFRM_REV"}(ye||(ye={})),function(e){e[e.RDS_RASTERIZED_PAGES=0]="RDS_RASTERIZED_PAGES",e[e.RDS_EXTRACTED_IMAGES=1]="RDS_EXTRACTED_IMAGES"}(Ie||(Ie={})),function(e){e[e.CVS_NOT_VERIFIED=0]="CVS_NOT_VERIFIED",e[e.CVS_PASSED=1]="CVS_PASSED",e[e.CVS_FAILED=2]="CVS_FAILED"}(ve||(ve={}));const Re={IRUT_NULL:BigInt(0),IRUT_COLOUR_IMAGE:BigInt(1),IRUT_SCALED_COLOUR_IMAGE:BigInt(2),IRUT_GRAYSCALE_IMAGE:BigInt(4),IRUT_TRANSOFORMED_GRAYSCALE_IMAGE:BigInt(8),IRUT_ENHANCED_GRAYSCALE_IMAGE:BigInt(16),IRUT_PREDETECTED_REGIONS:BigInt(32),IRUT_BINARY_IMAGE:BigInt(64),IRUT_TEXTURE_DETECTION_RESULT:BigInt(128),IRUT_TEXTURE_REMOVED_GRAYSCALE_IMAGE:BigInt(256),IRUT_TEXTURE_REMOVED_BINARY_IMAGE:BigInt(512),IRUT_CONTOURS:BigInt(1024),IRUT_LINE_SEGMENTS:BigInt(2048),IRUT_TEXT_ZONES:BigInt(4096),IRUT_TEXT_REMOVED_BINARY_IMAGE:BigInt(8192),IRUT_CANDIDATE_BARCODE_ZONES:BigInt(16384),IRUT_LOCALIZED_BARCODES:BigInt(32768),IRUT_SCALED_BARCODE_IMAGE:BigInt(65536),IRUT_DEFORMATION_RESISTED_BARCODE_IMAGE:BigInt(1<<17),IRUT_COMPLEMENTED_BARCODE_IMAGE:BigInt(1<<18),IRUT_DECODED_BARCODES:BigInt(1<<19),IRUT_LONG_LINES:BigInt(1<<20),IRUT_CORNERS:BigInt(1<<21),IRUT_CANDIDATE_QUAD_EDGES:BigInt(1<<22),IRUT_DETECTED_QUADS:BigInt(1<<23),IRUT_LOCALIZED_TEXT_LINES:BigInt(1<<24),IRUT_RECOGNIZED_TEXT_LINES:BigInt(1<<25),IRUT_DESKEWED_IMAGE:BigInt(1<<26),IRUT_SHORT_LINES:BigInt(1<<27),IRUT_RAW_TEXT_LINES:BigInt(1<<28),IRUT_LOGIC_LINES:BigInt(1<<29),IRUT_ENHANCED_IMAGE:BigInt(Math.pow(2,30)),IRUT_ALL:BigInt("0xFFFFFFFFFFFFFFFF")};var Ce,Te,we,Se,Ae;!function(e){e[e.ROET_PREDETECTED_REGION=0]="ROET_PREDETECTED_REGION",e[e.ROET_LOCALIZED_BARCODE=1]="ROET_LOCALIZED_BARCODE",e[e.ROET_DECODED_BARCODE=2]="ROET_DECODED_BARCODE",e[e.ROET_LOCALIZED_TEXT_LINE=3]="ROET_LOCALIZED_TEXT_LINE",e[e.ROET_RECOGNIZED_TEXT_LINE=4]="ROET_RECOGNIZED_TEXT_LINE",e[e.ROET_DETECTED_QUAD=5]="ROET_DETECTED_QUAD",e[e.ROET_DESKEWED_IMAGE=6]="ROET_DESKEWED_IMAGE",e[e.ROET_SOURCE_IMAGE=7]="ROET_SOURCE_IMAGE",e[e.ROET_TARGET_ROI=8]="ROET_TARGET_ROI",e[e.ROET_ENHANCED_IMAGE=9]="ROET_ENHANCED_IMAGE",e[e.ROET_AUXILIARY_REGION=10]="ROET_AUXILIARY_REGION"}(Ce||(Ce={})),function(e){e[e.ST_NULL=0]="ST_NULL",e[e.ST_REGION_PREDETECTION=1]="ST_REGION_PREDETECTION",e[e.ST_BARCODE_LOCALIZATION=2]="ST_BARCODE_LOCALIZATION",e[e.ST_BARCODE_DECODING=3]="ST_BARCODE_DECODING",e[e.ST_TEXT_LINE_LOCALIZATION=4]="ST_TEXT_LINE_LOCALIZATION",e[e.ST_TEXT_LINE_RECOGNITION=5]="ST_TEXT_LINE_RECOGNITION",e[e.ST_DOCUMENT_DETECTION=6]="ST_DOCUMENT_DETECTION",e[e.ST_DOCUMENT_DESKEWING=7]="ST_DOCUMENT_DESKEWING",e[e.ST_IMAGE_ENHANCEMENT=8]="ST_IMAGE_ENHANCEMENT"}(Te||(Te={})),function(e){e[e.IFF_JPEG=0]="IFF_JPEG",e[e.IFF_PNG=1]="IFF_PNG",e[e.IFF_BMP=2]="IFF_BMP",e[e.IFF_PDF=3]="IFF_PDF"}(we||(we={})),function(e){e[e.ICDM_NEAR=0]="ICDM_NEAR",e[e.ICDM_FAR=1]="ICDM_FAR"}(Se||(Se={})),function(e){e.MN_DYNAMSOFT_CAPTURE_VISION_ROUTER="cvr",e.MN_DYNAMSOFT_CORE="core",e.MN_DYNAMSOFT_LICENSE="license",e.MN_DYNAMSOFT_IMAGE_PROCESSING="dip",e.MN_DYNAMSOFT_UTILITY="utility",e.MN_DYNAMSOFT_BARCODE_READER="dbr",e.MN_DYNAMSOFT_DOCUMENT_NORMALIZER="ddn",e.MN_DYNAMSOFT_LABEL_RECOGNIZER="dlr",e.MN_DYNAMSOFT_CAPTURE_VISION_DATA="dcvData",e.MN_DYNAMSOFT_NEURAL_NETWORK="dnn",e.MN_DYNAMSOFT_CODE_PARSER="dcp",e.MN_DYNAMSOFT_CAMERA_ENHANCER="dce",e.MN_DYNAMSOFT_CAPTURE_VISION_STD="std"}(Ae||(Ae={}));const De={},be=async e=>{let t="string"==typeof e?[e]:e,i=[];for(let e of t)i.push(De[e]=De[e]||new a);await Promise.all(i)},Oe=async(e,t)=>{let i,s="string"==typeof e?[e]:e,n=[];for(let e of s){let s;n.push(s=De[e]=De[e]||new a(i=i||t())),s.isEmpty&&(s.task=i=i||t())}await Promise.all(n)},Le=async e=>await new Promise((t,i)=>{let s=Fe();xe[s]=async e=>{if(e.success)return t(e.u8);{const t=Error(e.message);e.stack&&(t.stack=e.stack),i(t)}},Me.postMessage({type:"imagePtrToUint8Array",id:s,body:{data:e}})}),Ne=async e=>await new Promise((t,i)=>{let s=Fe();xe[s]=async e=>{if(e.success)return t(e.result);{const t=Error(e.message);e.stack&&(t.stack=e.stack),i(t)}},Me.postMessage({type:"resolveDsImageData",id:s,body:{point:e}})});let Me,Be=0;const Fe=()=>Be++,xe={};let Pe;const ke=e=>{Pe=e,Me&&Me.postMessage({type:"setBLog",body:{value:!!e}})};let Ue=!1;const Ve=e=>{Ue=e,Me&&Me.postMessage({type:"setBDebug",body:{value:!!e}})},Ge={},We={},je={dip:{wasm:!0}},Ze={std:{version:"2.0.0",path:f(g+"../../dynamsoft-capture-vision-std@2.0.0/dist/"),isInternal:!0},core:{version:"4.4.20-dev-20260415104041",path:g,isInternal:!0}};let He=5;"undefined"!=typeof navigator&&(He=navigator.hardwareConcurrency?navigator.hardwareConcurrency-1:5),xe[-3]=async e=>{qe.onWasmLoadProgressChanged&&qe.onWasmLoadProgressChanged(e.resourcesPath,e.tag,{loaded:e.loaded,total:e.total})};class qe{static get engineResourcePaths(){return Ze}static set engineResourcePaths(e){Object.assign(Ze,e)}static get bSupportDce4Module(){return this._bSupportDce4Module}static get bSupportIRTModule(){return this._bSupportIRTModule}static get versions(){return this._versions}static get _onLog(){return Pe}static set _onLog(e){ke(e)}static get _bDebug(){return Ue}static set _bDebug(e){Ve(e)}static get _workerName(){return`${qe._bundleEnv.toLowerCase()}.bundle.worker.js`}static get wasmLoadOptions(){return qe._wasmLoadOptions}static set wasmLoadOptions(e){Object.assign(qe._wasmLoadOptions,e)}static isModuleLoaded(e){return e=(e=e||"core").toLowerCase(),!!De[e]&&De[e].isFulfilled}static async loadWasm(){return await async function(){let e,t;e instanceof Array||(e=e?[e]:[]);let i=De.core;t=!i||i.isEmpty,t||await be("core");let s=new Map;const n=e=>{if(e=e.toLowerCase(),Ae.MN_DYNAMSOFT_CAPTURE_VISION_STD==e||Ae.MN_DYNAMSOFT_CORE==e)return;let t=je[e].deps;if(null==t?void 0:t.length)for(let e of t)n(e);let i=De[e];s.has(e)||s.set(e,!i||i.isEmpty)};for(let t of e)n(t);let o=[];t&&o.push("core"),o.push(...s.keys());const r=[...s.entries()].filter(e=>!e[1]).map(e=>e[0]);await Oe(o,async function(){const e=[...s.entries()].filter(e=>e[1]).map(e=>e[0]);await be(r);const i=P(Ze),n={};for(let t of e)n[t]=je[t];const o={engineResourcePaths:i,autoResources:n,names:e,_bundleEnv:qe._bundleEnv,wasmLoadOptions:qe.wasmLoadOptions};let c=new a;if(t){o.needLoadCore=!0;let e=i[`${qe._bundleEnv.toLowerCase()}Bundle`]+qe._workerName;e.startsWith(location.origin)||(e=await fetch(e).then(e=>e.blob()).then(e=>URL.createObjectURL(e))),Me=new Worker(e),Me.onerror=e=>{let t=new Error(e.message);c.reject(t)},Me.addEventListener("message",e=>{let t=e.data?e.data:e,i=t.type,s=t.id,n=t.body;switch(i){case"log":Pe&&Pe(t.message);break;case"warning":console.warn(t.message);break;case"task":try{xe[s]&&(xe[s](n),delete xe[s])}catch(e){throw delete xe[s],e}break;case"event":try{xe[s](n)}catch(e){throw e}break;default:console.log(e)}}),o.bLog=!!Pe,o.bd=Ue,o.dm=location.origin.startsWith("http")?location.origin:"https://localhost"}else await be("core");let l=Be++;xe[l]=e=>{if(e.success)Object.assign(Ge,e.versions),"{}"!==JSON.stringify(e.versions)&&(qe._versions=e.versions),qe.loadedWasmType=e.loadedWasmType,c.resolve(void 0);else{const t=Error(e.message);e.stack&&(t.stack=e.stack),c.reject(t)}},Me.postMessage({type:"loadWasm",id:l,body:o}),await c})}()}static async detectEnvironment(){return await async function(){return{wasm:le,worker:de,getUserMedia:ue,camera:await he(),browser:ae.browser,version:ae.version,OS:ae.OS}}()}static async getModuleVersion(){return await new Promise((e,t)=>{let i=Fe();xe[i]=async function(i){if(i.success)return e(i.versions);{let e=new Error(i.message);return e.stack=i.stack+"\n"+e.stack,t(e)}},Me.postMessage({type:"getModuleVersion",id:i})})}static getVersion(){return`4.4.20-dev-20260415104041(Worker: ${Ge.core&&Ge.core.worker||"Not Loaded"}, Wasm: ${Ge.core&&Ge.core.wasm||"Not Loaded"})`}static enableLogging(){ce._onLog=console.log,qe._onLog=console.log}static disableLogging(){ce._onLog=null,qe._onLog=null}static async cfd(e){return await new Promise((t,i)=>{let s=Fe();xe[s]=async function(e){if(e.success)return t();{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,i(t)}},Me.postMessage({type:"cfd",id:s,body:{count:e}})})}}qe._bSupportDce4Module=-1,qe._bSupportIRTModule=-1,qe._versions=null,qe._bundleEnv="DCV",qe._wasmLoadOptions={wasmType:"auto",pthreadPoolSize:He},qe.loadedWasmType="ml-simd-pthread",qe.browserInfo=ae;var Ye={license:"",scanMode:s.SM_SINGLE,templateFilePath:void 0,utilizedTemplateNames:{single:"ReadBarcodes_SpeedFirst",multi_unique:"ReadBarcodes_SpeedFirst",image:"ReadBarcodes_ReadRateFirst"},engineResourcePaths:qe.engineResourcePaths,barcodeFormats:void 0,duplicateForgetTime:3e3,container:void 0,onUniqueBarcodeScanned:void 0,showResultView:void 0,showUploadImageButton:!1,showPoweredByDynamsoft:!0,autoStartCapturing:!0,uiPath:void 0,onInitPrepare:void 0,onInitReady:void 0,onCameraOpen:void 0,onCameraOpenFailed:void 0,onCaptureStart:void 0,scannerViewConfig:{container:void 0,showCloseButton:!0,mirrorFrontCamera:!0,cameraSwitchControl:"hidden",showFlashButton:!1},resultViewConfig:{container:void 0,toolbarButtonsConfig:{clear:{label:"Clear",className:"btn-clear",isHidden:!1},done:{label:"Done",className:"btn-done",isHidden:!1}}}};const $e=e=>e&&"object"==typeof e&&"function"==typeof e.then,ze=(async()=>{})().constructor;class Ke extends ze{get status(){return this._s}get isPending(){return"pending"===this._s}get isFulfilled(){return"fulfilled"===this._s}get isRejected(){return"rejected"===this._s}get task(){return this._task}set task(e){var t=this;let i;this._task=e,$e(e)?i=e:"function"==typeof e&&(i=new ze(e)),i&&async function(){try{const s=await i;e===t._task&&t.resolve(s)}catch(i){e===t._task&&t.reject(i)}}()}get isEmpty(){return null==this._task}constructor(e){let t,i;super((e,s)=>{t=e,i=s}),this._s="pending",this.resolve=e=>{this.isPending&&($e(e)?this.task=e:(this._s="fulfilled",t(e)))},this.reject=e=>{this.isPending&&(this._s="rejected",i(e))},this.task=e}}function Xe(e,t,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(e):s?s.value:t.get(e)}function Qe(e,t,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,i):n?n.value=i:t.set(e,i),i}"function"==typeof SuppressedError&&SuppressedError;const Je=e=>e&&"object"==typeof e&&"function"==typeof e.then,et=(async()=>{})().constructor;let tt=class extends et{get status(){return this._s}get isPending(){return"pending"===this._s}get isFulfilled(){return"fulfilled"===this._s}get isRejected(){return"rejected"===this._s}get task(){return this._task}set task(e){var t=this;let i;this._task=e,Je(e)?i=e:"function"==typeof e&&(i=new et(e)),i&&async function(){try{const s=await i;e===t._task&&t.resolve(s)}catch(i){e===t._task&&t.reject(i)}}()}get isEmpty(){return null==this._task}constructor(e){let t,i;super((e,s)=>{t=e,i=s}),this._s="pending",this.resolve=e=>{this.isPending&&(Je(e)?this.task=e:(this._s="fulfilled",t(e)))},this.reject=e=>{this.isPending&&(this._s="rejected",i(e))},this.task=e}},it=class{constructor(e){this._cvr=e}async getMaxBufferedItems(){return await new Promise((e,t)=>{let i=Fe();xe[i]=async function(i){if(i.success)return e(i.count);{let e=new Error(i.message);return e.stack=i.stack+"\n"+e.stack,t(e)}},Me.postMessage({type:"cvr_getMaxBufferedItems",id:i,instanceID:this._cvr._instanceID})})}async setMaxBufferedItems(e){return await new Promise((t,i)=>{let s=Fe();xe[s]=async function(e){if(e.success)return t();{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,i(t)}},Me.postMessage({type:"cvr_setMaxBufferedItems",id:s,instanceID:this._cvr._instanceID,body:{count:e}})})}async getBufferedCharacterItemSet(){return await new Promise((e,t)=>{let i=Fe();xe[i]=async function(i){if(i.success)return e(i.itemSet);{let e=new Error(i.message);return e.stack=i.stack+"\n"+e.stack,t(e)}},Me.postMessage({type:"cvr_getBufferedCharacterItemSet",id:i,instanceID:this._cvr._instanceID})})}};var st={onTaskResultsReceived:!1,onTargetROIResultsReceived:!1,onTaskResultsReceivedForDce:!1,onPredetectedRegionsReceived:!1,onLocalizedBarcodesReceived:!1,onDecodedBarcodesReceived:!1,onLocalizedTextLinesReceived:!1,onRecognizedTextLinesReceived:!1,onDetectedQuadsReceived:!1,onDeskewedImageReceived:!1,onEnhancedImageReceived:!1,onColourImageUnitReceived:!1,onScaledColourImageUnitReceived:!1,onGrayscaleImageUnitReceived:!1,onTransformedGrayscaleImageUnitReceived:!1,onEnhancedGrayscaleImageUnitReceived:!1,onBinaryImageUnitReceived:!1,onTextureDetectionResultUnitReceived:!1,onTextureRemovedGrayscaleImageUnitReceived:!1,onTextureRemovedBinaryImageUnitReceived:!1,onContoursUnitReceived:!1,onLineSegmentsUnitReceived:!1,onTextZonesUnitReceived:!1,onTextRemovedBinaryImageUnitReceived:!1,onRawTextLinesUnitReceived:!1,onLongLinesUnitReceived:!1,onCornersUnitReceived:!1,onCandidateQuadEdgesUnitReceived:!1,onCandidateBarcodeZonesUnitReceived:!1,onScaledBarcodeImageUnitReceived:!1,onDeformationResistedBarcodeImageUnitReceived:!1,onComplementedBarcodeImageUnitReceived:!1,onShortLinesUnitReceived:!1,onLogicLinesUnitReceived:!1};const nt=e=>{for(let t in e._irrRegistryState)e._irrRegistryState[t]=!1;for(let t of e._intermediateResultReceiverSet)if(t.isDce||t.isFilter)e._irrRegistryState.onTaskResultsReceivedForDce=!0;else for(let i in t)e._irrRegistryState[i]||(e._irrRegistryState[i]=!!t[i])};let ot=class{constructor(e){this._irrRegistryState=st,this._intermediateResultReceiverSet=new Set,this._cvr=e}async addResultReceiver(e){if("object"!=typeof e)throw new Error("Invalid receiver.");this._intermediateResultReceiverSet.add(e),nt(this);let t=-1,i={};if(!e.isDce&&!e.isFilter){if(!e._observedResultUnitTypes||!e._observedTaskMap)throw new Error("Invalid Intermediate Result Receiver.");t=e._observedResultUnitTypes,e._observedTaskMap.forEach((e,t)=>{i[t]=e}),e._observedTaskMap.clear()}return await new Promise((e,s)=>{let n=Fe();xe[n]=async function(t){if(t.success)return e();{let e=new Error(t.message);return e.stack=t.stack+"\n"+e.stack,s(e)}},Me.postMessage({type:"cvr_setIrrRegistry",id:n,instanceID:this._cvr._instanceID,body:{receiverObj:this._irrRegistryState,observedResultUnitTypes:t.toString(),observedTaskMap:i}})})}async removeResultReceiver(e){return this._intermediateResultReceiverSet.delete(e),nt(this),await new Promise((e,t)=>{let i=Fe();xe[i]=async function(i){if(i.success)return e();{let e=new Error(i.message);return e.stack=i.stack+"\n"+e.stack,t(e)}},Me.postMessage({type:"cvr_setIrrRegistry",id:i,instanceID:this._cvr._instanceID,body:{receiverObj:this._irrRegistryState}})})}async removeAllResultReceivers(){for(const e of this._intermediateResultReceiverSet)e.hasOwnProperty("isFilter")||e.hasOwnProperty("isDce")||this._intermediateResultReceiverSet.delete(e);return nt(this),await new Promise((e,t)=>{let i=Fe();xe[i]=async function(i){if(i.success)return e();{let e=new Error(i.message);return e.stack=i.stack+"\n"+e.stack,t(e)}},Me.postMessage({type:"cvr_setIrrRegistry",id:i,instanceID:this._cvr._instanceID,body:{receiverObj:this._irrRegistryState}})})}getOriginalImage(){return this._cvr.provideDsImage}};const rt="undefined"==typeof self,at="function"==typeof importScripts,ct=(()=>{if(!at){if(!rt&&document.currentScript){let e=document.currentScript.src,t=e.indexOf("?");if(-1!=t)e=e.substring(0,t);else{let t=e.indexOf("#");-1!=t&&(e=e.substring(0,t))}return e.substring(0,e.lastIndexOf("/")+1)}return"./"}})(),lt=e=>{if(null==e&&(e="./"),rt||at);else{let t=document.createElement("a");t.href=e,e=t.href}return e.endsWith("/")||(e+="/"),e};var dt;qe.engineResourcePaths.cvr={version:"3.4.20-dev-20260417175911",path:ct,isInternal:!0},je.cvr={js:!0,wasm:!0,deps:[Ae.MN_DYNAMSOFT_LICENSE,Ae.MN_DYNAMSOFT_IMAGE_PROCESSING,Ae.MN_DYNAMSOFT_NEURAL_NETWORK]},je.dnn={wasm:!0,deps:[Ae.MN_DYNAMSOFT_IMAGE_PROCESSING]},We.cvr={};const ut="2.0.0";"string"!=typeof qe.engineResourcePaths.std&&x(qe.engineResourcePaths.std.version,ut)<0&&(qe.engineResourcePaths.std={version:ut,path:lt(ct+`../../dynamsoft-capture-vision-std@${ut}/dist/`),isInternal:!0});const ht="3.0.10";(!qe.engineResourcePaths.dip||"string"!=typeof qe.engineResourcePaths.dip&&x(qe.engineResourcePaths.dip.version,ht)<0)&&(qe.engineResourcePaths.dip={version:ht,path:lt(ct+`../../dynamsoft-image-processing@${ht}/dist/`),isInternal:!0});const _t="2.0.10";(!qe.engineResourcePaths.dnn||"string"!=typeof qe.engineResourcePaths.dnn&&x(qe.engineResourcePaths.dnn.version,_t)<0)&&(qe.engineResourcePaths.dnn={version:_t,path:lt(ct+`../../dynamsoft-capture-vision-dnn@${_t}/dist/`),isInternal:!0});let mt=class{static getVersion(){return this._version}};function gt(e,t){if(e){if(e.sourceLocation){const i=e.sourceLocation.points;for(let e of i)e.x=e.x/t,e.y=e.y/t}if(e.location){const i=e.location.points;for(let e of i)e.x=e.x/t,e.y=e.y/t}gt(e.referencedItem,t)}}function ft(e){if(e.disposed)throw new Error('"CaptureVisionRouter" instance has been disposed')}function pt(e){return{type:_e.CRIT_ORIGINAL_IMAGE,referenceItem:null,targetROIDefName:"",taskName:"",imageData:e,toCanvas:()=>U(e),toImage:t=>V(t,e),toBlob:t=>G(t,e)}}function Et(e){let t=!1;const i=[ge.EC_UNSUPPORTED_JSON_KEY_WARNING,ge.EC_LICENSE_AUTH_QUOTA_EXCEEDED,ge.EC_LICENSE_RESULTS_LIMIT_EXCEEDED];if(e.errorCode&&i.includes(e.errorCode))return void console.warn(e.message);let s=new Error(e.errorCode?`[${e.functionName}] [${e.errorCode}] ${e.message}`:`[${e.functionName}] ${e.message}`);if(s.stack&&(s.stack=e.stack),e.isShouldThrow)throw s;return e.rj&&e.rj(s),t=!0,true}function yt(e,t,i){return(i.x-e.x)*(t.y-e.y)==(t.x-e.x)*(i.y-e.y)&&Math.min(e.x,t.x)<=i.x&&i.x<=Math.max(e.x,t.x)&&Math.min(e.y,t.y)<=i.y&&i.y<=Math.max(e.y,t.y)}function It(e){return Math.abs(e)<1e-6?0:e<0?-1:1}function vt(e,t,i,s){let n=e[0]*(i[1]-t[1])+t[0]*(e[1]-i[1])+i[0]*(t[1]-e[1]),o=e[0]*(s[1]-t[1])+t[0]*(e[1]-s[1])+s[0]*(t[1]-e[1]);return!((n^o)>=0&&0!==n&&0!==o||(n=i[0]*(e[1]-s[1])+s[0]*(i[1]-e[1])+e[0]*(s[1]-i[1]),o=i[0]*(t[1]-s[1])+s[0]*(i[1]-t[1])+t[0]*(s[1]-i[1]),(n^o)>=0&&0!==n&&0!==o))}mt._version=`3.4.20-dev-20260417175911(Worker: ${null===(dt=Ge.cvr)||void 0===dt?void 0:dt.worker}, Wasm: loading...`,BigInt(0),BigInt("0xFFFFFFFEFFFFFFFF"),BigInt(4265345023);const Rt=BigInt(3147775),Ct=(BigInt(260096),BigInt(1),BigInt(2),BigInt(4),BigInt(8),BigInt(16),BigInt(32),BigInt(64),BigInt(128),BigInt(256),BigInt(512),BigInt(1024),BigInt(2048),BigInt(4096),BigInt(8192),BigInt(16384),BigInt(32768),BigInt(65536),BigInt(131072),BigInt(262144),BigInt(16777216),BigInt(33554432),BigInt(67108864)),Tt=BigInt(134217728);BigInt(268435456),BigInt(536870912),BigInt(1073741824),BigInt(524288),BigInt(2147483648),BigInt(1048576),BigInt(2097152),BigInt(4194304),BigInt(8388608),BigInt(68719476736),BigInt(0x3f0000000000000),BigInt(4294967296),BigInt(4503599627370496),BigInt(9007199254740992),BigInt(0x40000000000000),BigInt(0x80000000000000),BigInt(72057594037927940),BigInt(0x200000000000000),BigInt(8589934592),BigInt(17179869184),BigInt(34359738368),BigInt(51539607552),BigInt(137438953472),BigInt(274877906944);let wt=class{constructor(e){var t=this;this._autoZoomParameters={minValue:1,maxValue:999,autoFocusFrameArray:[],autoFocusFrameLimit:[5,3],autoZoomDetectionArea:.5,autoZoomTargetBorder:.9,autoZoomIdealArea:[0,.05],autoZoomInFrameArray:[],autoZoomInFrameLimit:[5,3],autoZoomInMaxTimes:5,autoZoomInMinStep:Math.pow(10,.2),autoZoomInIdealModuleSize:6,autoZoomOutFrameCount:0,autoZoomOutFrameLimit:3,autoZoomOutStepRate:1/3,autoZoomOutStepRate_2:.05,autoZoomOutMinStep:2,frameArrayInIdealZoom:[],frameLimitInIdealZoom:[5,3]},this.isSupportDCEModule=!0,this.onTaskResultsReceived=async function(e){if(!t.isSupportDCEModule)return;let i=t.cameraEnhancer;(4&i._dceEnhancedFeatures||16&i._dceEnhancedFeatures||64&i._dceEnhancedFeatures)&&(0!==qe.bSupportDce4Module?(t.isSupportDCEModule=!1,console.warn("Warning: The license required for Enhanced Features was not found.")):(!t.consumeTime||Date.now()-t.consumeTime>1e4)&&(qe.cfd(1),t.consumeTime=Date.now()));const s=e.intermediateResultUnits;if(!i.isOpen()||i.isPaused())return;const n=i.getVisibleAreaInVideoXY({isConsiderRegionBox:!0});if(isNaN(n.x)||isNaN(n.y)||isNaN(n.width)||isNaN(n.height))return;let o=!1,r=!1;for(let e of s){if(e.unitType===Re.IRUT_DECODED_BARCODES&&e.decodedBarcodes.length){o=!0;break}e.unitType===Re.IRUT_LOCALIZED_BARCODES&&e.localizedBarcodes.length&&(r=!0)}if(16&i._dceEnhancedFeatures||4&i._dceEnhancedFeatures)if(o)t._autoZoomParameters.autoZoomInFrameArray.length=0,t._autoZoomParameters.autoZoomOutFrameCount=0,t._autoZoomParameters.frameArrayInIdealZoom.length=0,t._autoZoomParameters.autoFocusFrameArray.length=0;else{const o=async function(e){await i.setZoom(e)},a=async function(e){await i.setFocus(e)};if(r){n.x,n.y;const r=n.width,c=n.height,l=n.width,d=n.height;let u;{let e,o,r,a,c;{const e=i.video.videoWidth*(1-t._autoZoomParameters.autoZoomDetectionArea)/2,s=i.video.videoWidth*(1+t._autoZoomParameters.autoZoomDetectionArea)/2,n=s,o=e,r=i.video.videoHeight*(1-t._autoZoomParameters.autoZoomDetectionArea)/2,a=r,l=i.video.videoHeight*(1+t._autoZoomParameters.autoZoomDetectionArea)/2;c=[{x:e,y:r},{x:s,y:a},{x:n,y:l},{x:o,y:l}]}const h=[];{const e=(e,t)=>{const i=(e,t)=>{if(!e&&!t)throw new Error("Invalid arguments.");return function(e,t,i){let s=!1;const n=e.length;if(n<=2)return!1;for(let o=0;o0!=It(a.y-i)>0&&It(t-(i-r.y)*(r.x-a.x)/(r.y-a.y)-r.x)<0&&(s=!s)}return s}(t,e.x,e.y)},s=(e,t)=>!!(vt([e[0],e[1]],[e[2],e[3]],[t[0].x,t[0].y],[t[1].x,t[1].y])||vt([e[0],e[1]],[e[2],e[3]],[t[1].x,t[1].y],[t[2].x,t[2].y])||vt([e[0],e[1]],[e[2],e[3]],[t[2].x,t[2].y],[t[3].x,t[3].y])||vt([e[0],e[1]],[e[2],e[3]],[t[3].x,t[3].y],[t[0].x,t[0].y]));return!!(i({x:e[0].x,y:e[0].y},t)||i({x:e[1].x,y:e[1].y},t)||i({x:e[2].x,y:e[2].y},t)||i({x:e[3].x,y:e[3].y},t))||!!(i({x:t[0].x,y:t[0].y},e)||i({x:t[1].x,y:t[1].y},e)||i({x:t[2].x,y:t[2].y},e)||i({x:t[3].x,y:t[3].y},e))||!!(s([t[0].x,t[0].y,t[1].x,t[1].y],e)||s([t[1].x,t[1].y,t[2].x,t[2].y],e)||s([t[2].x,t[2].y,t[3].x,t[3].y],e)||s([t[3].x,t[3].y,t[0].x,t[0].y],e))};for(let t of s)if(t.unitType===Re.IRUT_LOCALIZED_BARCODES)for(let i of t.localizedBarcodes)i&&e(c,i.location.points.map(e=>({x:e.x+n.x,y:e.y+n.y})))&&h.push(i)}if(!h.length)return;let _;if(h.length){let e=h.filter(e=>e.possibleFormats==Ct||e.possibleFormats==Tt);if(e.length||(e=h.filter(e=>e.possibleFormats==Rt),e.length||(e=h)),e.length){const t=e=>{const t=e.location.points,i=(t[0].x+t[1].x+t[2].x+t[3].x)/4,s=(t[0].y+t[1].y+t[2].y+t[3].y)/4;return(i-l/2)*(i-l/2)+(s-d/2)*(s-d/2)};_=e[0];let i=t(_);if(1!=e.length)for(let s=1;s1.1*_.confidence||e[s].confidence>.9*_.confidence&&ns&&d>s&&h>s&&_>s&&u.result.moduleSize{}),t._autoZoomParameters.autoZoomInFrameArray.filter(e=>!0===e).length>=t._autoZoomParameters.autoZoomInFrameLimit[1]){t._autoZoomParameters.autoZoomInFrameArray.length=0;const s=[(.5-n)/(.5-l),(.5-n)/(.5-d),(.5-n)/(.5-h),(.5-n)/(.5-_)].filter(e=>e>0),r=Math.min(...s,t._autoZoomParameters.autoZoomInIdealModuleSize/u.result.moduleSize),a=i.getZoomSettings().factor;let c=Math.max(Math.pow(a*r,1/t._autoZoomParameters.autoZoomInMaxTimes),t._autoZoomParameters.autoZoomInMinStep);c=Math.min(c,r);let m=a*c;m=Math.max(i._dceAutoZoomRange.min,m),m=Math.min(i._dceAutoZoomRange.max,m);try{await o({factor:m})}catch(e){const t=e.message||e;console.warn(t)}i._framePipeline&&(i._framePipeline._data=null)}}else if(t._autoZoomParameters.autoZoomInFrameArray.length=0,t._autoZoomParameters.frameArrayInIdealZoom.push(!0),t._autoZoomParameters.frameArrayInIdealZoom.splice(0,t._autoZoomParameters.frameArrayInIdealZoom.length-t._autoZoomParameters.frameLimitInIdealZoom[0]),t._autoZoomParameters.frameArrayInIdealZoom.filter(e=>!0===e).length>=t._autoZoomParameters.frameLimitInIdealZoom[1]&&(t._autoZoomParameters.frameArrayInIdealZoom.length=0,4&i._dceEnhancedFeatures)){const t=u.points;try{await a({mode:"manual",area:{centerPoint:{x:(t[0].x+t[2].x)/2+"px",y:(t[0].y+t[2].y)/2+"px"},width:t[2].x-t[0].x+"px",height:t[2].y-t[0].y+"px"}})}catch(e){const t=e.message||e;console.warn(t)}i._framePipeline&&(i._framePipeline._data=null)}}if(!(16&i._dceEnhancedFeatures)&&4&i._dceEnhancedFeatures&&(t._autoZoomParameters.autoFocusFrameArray.push(!0),t._autoZoomParameters.autoFocusFrameArray.splice(0,t._autoZoomParameters.autoFocusFrameArray.length-t._autoZoomParameters.autoFocusFrameLimit[0]),t._autoZoomParameters.autoFocusFrameArray.filter(e=>!0===e).length>=t._autoZoomParameters.autoFocusFrameLimit[1])){t._autoZoomParameters.autoFocusFrameArray.length=0;try{const e=u.points;await a({mode:"manual",area:{centerPoint:{x:(e[0].x+e[2].x)/2+"px",y:(e[0].y+e[2].y)/2+"px"},width:e[2].x-e[0].x+"px",height:e[2].y-e[0].y+"px"}})}catch(e){const t=e.message||e;console.warn(t)}i._framePipeline&&(i._framePipeline._data=null)}}else{if(16&i._dceEnhancedFeatures){if(t._autoZoomParameters.autoZoomInFrameArray.push(!1),t._autoZoomParameters.autoZoomInFrameArray.splice(0,t._autoZoomParameters.autoZoomInFrameArray.length-t._autoZoomParameters.autoZoomInFrameLimit[0]),t._autoZoomParameters.autoZoomOutFrameCount++,t._autoZoomParameters.frameArrayInIdealZoom.push(!1),t._autoZoomParameters.frameArrayInIdealZoom.splice(0,t._autoZoomParameters.frameArrayInIdealZoom.length-t._autoZoomParameters.frameLimitInIdealZoom[0]),t._autoZoomParameters.autoZoomOutFrameCount>=t._autoZoomParameters.autoZoomOutFrameLimit){t._autoZoomParameters.autoZoomOutFrameCount=0;const s=i.getZoomSettings().factor;let n=s-Math.max((s-1)*t._autoZoomParameters.autoZoomOutStepRate,t._autoZoomParameters.autoZoomOutMinStep);n=Math.max(i._dceAutoZoomRange.min,n),n=Math.min(i._dceAutoZoomRange.max,n);try{await o({factor:n})}catch(e){const t=e.message||e;console.warn(t)}i._framePipeline&&(i._framePipeline._data=null)}4&i._dceEnhancedFeatures&&a({mode:"continuous"}).catch(()=>{})}!(16&i._dceEnhancedFeatures)&&4&i._dceEnhancedFeatures&&(t._autoZoomParameters.autoFocusFrameArray.length=0,a({mode:"continuous"}).catch(()=>{}))}}},this.isDce=!0,this.cameraEnhancer=e}};var St,At,Dt,bt,Ot,Lt,Nt,Mt,Bt,Ft,xt,Pt,kt,Ut,Vt,Gt,Wt,jt,Zt,Ht,qt,Yt,$t;!function(e){e[e.ISS_BUFFER_EMPTY=0]="ISS_BUFFER_EMPTY",e[e.ISS_EXHAUSTED=1]="ISS_EXHAUSTED"}(St||(St={}));const zt={onTaskResultsReceived:()=>{},isFilter:!0};xe[-2]=async e=>{Kt.onDataLoadProgressChanged&&Kt.onDataLoadProgressChanged(e.resourcesPath,e.tag,{loaded:e.loaded,total:e.total})};class Kt{constructor(){At.add(this),this.maxImageSideLength=["iPhone","Android","HarmonyOS"].includes(qe.browserInfo.OS)?2048:4096,this.onCaptureError=null,this.provideDsImage=null,this._isOutputOriginalImage=!1,this._isOpenDetectVerify=!1,this._isOpenNormalizeVerify=!1,this._isOpenBarcodeVerify=!1,this._isOpenLabelVerify=!1,this._minImageCaptureInterval=0,this._averageProcessintTimeArray=[],this._averageFetchImageTimeArray=[],this._currentSettings=null,this._averageTime=999,this._dynamsoft=!0,this._enhancedFeaturesIrr=null,this._templateName="",this._isCapturing=!1,this._s=!1,Dt.set(this,null),bt.set(this,null),Ot.set(this,null),Lt.set(this,null),Nt.set(this,null),Mt.set(this,new Set),Bt.set(this,new Set),Ft.set(this,new Set),xt.set(this,500),Pt.set(this,0),kt.set(this,0),Ut.set(this,0),Vt.set(this,!1),Gt.set(this,!1),this._singleFrameModeCallbackBind=this._singleFrameModeCallback.bind(this)}get disposed(){return Xe(this,Gt,"f")}get isCapturing(){return this._isCapturing}static async createInstance(e=!0){if(!We.license)throw Error("The `license` module cannot be found.");return await We.license.dynamsoft(),await qe.loadWasm(),await new Promise((t,i)=>{const s=new Kt;let n=Fe();xe[n]=async function(e){e.success?(s._instanceID=e.instanceID,s._currentSettings=JSON.parse(JSON.parse(e.outputSettings).data),Kt._isNoOnnx=e.isNoOnnx,mt._version=`3.4.20-dev-20260417175911(Worker: ${Ge.cvr.worker}, Wasm: ${e.version})`,Qe(s,Vt,!0,"f"),Qe(s,Lt,s.getIntermediateResultManager(),"f"),Qe(s,Vt,!1,"f"),t(s)):Et({message:e.message,rj:i,stack:e.stack,functionName:"createInstance"})},Me.postMessage({type:"cvr_createInstance",id:n,body:{loadPresetTemplates:e}})})}static async appendDLModelBuffer(e,t){return await qe.loadWasm(),Kt._isNoOnnx?Promise.reject("Model not supported in the current environment."):await new Promise((i,s)=>{let n=Fe();const o=P(qe.engineResourcePaths);let r;xe[n]=async function(e){if(e.success){const t=JSON.parse(e.response);if(0!==t.errorCode&&Et({message:t.errorString?t.errorString:"Append Model Buffer Failed.",rj:s,errorCode:t.errorCode,functionName:"appendDLModelBuffer"}))return;return i(t)}Et({message:e.message,rj:s,stack:e.stack,functionName:"appendDLModelBuffer"})},t?r=t.endsWith("/")?t:t+"/":"DCV"===qe._bundleEnv?r=o.dcvData+"models/":"DBR"===qe._bundleEnv&&(r=o.dbrBundle+"models/");let a=Array.isArray(e)?e:[e];a=a.map(e=>e.replace(/\.data$/i,"")),Me.postMessage({type:"cvr_appendDLModelBuffer",id:n,body:{modelNames:a,path:r}})})}static async clearDLModelBuffers(){return await new Promise((e,t)=>{let i=Fe();xe[i]=async function(i){if(i.success)return e();Et({message:i.message,rj:t,stack:i.stack,functionName:"clearDLModelBuffers"})},Me.postMessage({type:"cvr_clearDLModelBuffers",id:i})})}async _singleFrameModeCallback(){const e=Xe(this,Dt,"f")._singleFrameModeResultForDcv;if(!e)return;for(let t of Xe(this,Mt,"f"))this._isOutputOriginalImage&&t.onOriginalImageResultReceived&&t.onOriginalImageResultReceived(pt(e));const t={bytes:new Uint8Array(e.bytes),width:e.width,height:e.height,stride:e.stride,format:e.format,imageTag:e.imageTag},i=await this.capture(t,this._templateName);i.originalImageTag=e.imageTag,Xe(this,Dt,"f")._cameraView._capturedResultReceiver.onCapturedResultReceived(i,{isDetectVerifyOpen:this._isOpenDetectVerify,isNormalizeVerifyOpen:this._isOpenNormalizeVerify,isBarcodeVerifyOpen:this._isOpenBarcodeVerify,isLabelVerifyOpen:this._isOpenLabelVerify}),Xe(this,At,"m",Zt).call(this,i),Xe(this,Dt,"f")._singleFrameModeResultForDcv=null}setInput(e){if(ft(this),!this.isCapturing)if(Qe(this,Dt,e,"f"),null==e?void 0:e.isCameraEnhancer){if(this._enhancedFeaturesIrr)return;this._enhancedFeaturesIrr=new wt(e),Xe(this,Lt,"f").addResultReceiver(this._enhancedFeaturesIrr)}else Xe(this,Lt,"f").removeResultReceiver(this._enhancedFeaturesIrr),this._enhancedFeaturesIrr=null}getInput(){return Xe(this,Dt,"f")}addImageSourceStateListener(e){if(ft(this),"object"!=typeof e)return console.warn("Invalid ISA state listener.");e&&Object.keys(e)&&Xe(this,Bt,"f").add(e)}removeImageSourceStateListener(e){return ft(this),Xe(this,Bt,"f").delete(e)}async addResultReceiver(e){if(ft(this),"object"!=typeof e)throw new Error("Invalid receiver.");e&&Object.keys(e).length&&(Xe(this,Mt,"f").add(e),await this._setCrrRegistry())}async removeResultReceiver(e){ft(this),Xe(this,Mt,"f").delete(e),await this._setCrrRegistry()}async removeAllResultReceivers(){ft(this),Xe(this,Mt,"f").clear(),await this._setCrrRegistry()}async _setCrrRegistry(){const e={onCapturedResultReceived:!1,onDecodedBarcodesReceived:!1,onRecognizedTextLinesReceived:!1,onProcessedDocumentResultReceived:!1,onParsedResultsReceived:!1};for(let t of Xe(this,Mt,"f"))t.isDce||(e.onCapturedResultReceived=!!t.onCapturedResultReceived,e.onDecodedBarcodesReceived=!!t.onDecodedBarcodesReceived,e.onRecognizedTextLinesReceived=!!t.onRecognizedTextLinesReceived,e.onProcessedDocumentResultReceived=!!t.onProcessedDocumentResultReceived,e.onParsedResultsReceived=!!t.onParsedResultsReceived);let t=Fe();return await new Promise((i,s)=>{xe[t]=async function(e){e.success?i():Et({message:e.message,rj:s,stack:e.stack,functionName:"addResultReceiver"})},Me.postMessage({type:"cvr_setCrrRegistry",id:t,instanceID:this._instanceID,body:{receiver:JSON.stringify(e)}})})}async addResultFilter(e){if(ft(this),!e._dynamsoft)throw new Error("User defined CapturedResultFilter is not supported.");if(!e||"object"!=typeof e||!Object.keys(e).length)return console.warn("Invalid filter.");Xe(this,Ft,"f").add(e),e._dynamsoft(),await this._handleFilterUpdate()}async removeResultFilter(e){ft(this),Xe(this,Ft,"f").delete(e),await this._handleFilterUpdate()}async removeAllResultFilters(){ft(this),Xe(this,Ft,"f").clear(),await this._handleFilterUpdate()}async _handleFilterUpdate(){if(Xe(this,Lt,"f").removeResultReceiver(zt),0===Xe(this,Ft,"f").size){this._isOpenBarcodeVerify=!1,this._isOpenLabelVerify=!1,this._isOpenDetectVerify=!1,this._isOpenNormalizeVerify=!1;const e={[_e.CRIT_BARCODE]:!1,[_e.CRIT_TEXT_LINE]:!1,[_e.CRIT_DETECTED_QUAD]:!1,[_e.CRIT_DESKEWED_IMAGE]:!1,[_e.CRIT_ENHANCED_IMAGE]:!1},t={[_e.CRIT_BARCODE]:!1,[_e.CRIT_TEXT_LINE]:!1,[_e.CRIT_DETECTED_QUAD]:!1,[_e.CRIT_DESKEWED_IMAGE]:!1,[_e.CRIT_ENHANCED_IMAGE]:!1};return await Xe(this,At,"m",Ht).call(this,e),void await Xe(this,At,"m",qt).call(this,t)}for(let e of Xe(this,Ft,"f"))this._isOpenBarcodeVerify=e.isResultCrossVerificationEnabled(_e.CRIT_BARCODE),this._isOpenLabelVerify=e.isResultCrossVerificationEnabled(_e.CRIT_TEXT_LINE),this._isOpenDetectVerify=e.isResultCrossVerificationEnabled(_e.CRIT_DETECTED_QUAD),this._isOpenNormalizeVerify=e.isResultCrossVerificationEnabled(_e.CRIT_DESKEWED_IMAGE),e.isLatestOverlappingEnabled(_e.CRIT_BARCODE)&&([...Xe(this,Lt,"f")._intermediateResultReceiverSet.values()].find(e=>e.isFilter)||Xe(this,Lt,"f").addResultReceiver(zt)),await Xe(this,At,"m",Ht).call(this,e.verificationEnabled),await Xe(this,At,"m",qt).call(this,e.duplicateFilterEnabled),await Xe(this,At,"m",Yt).call(this,e.duplicateForgetTime),await Xe(this,At,"m",$t).call(this,e.crossVerificationCriteria)}async startCapturing(e){var t,i=this;if(ft(this),this.isCapturing)return;if(!Xe(this,Dt,"f"))throw new Error("'ImageSourceAdapter' is not set. call 'setInput' before 'startCapturing'");e||(e=Kt._defaultTemplate);for(let e of Xe(this,Ft,"f"))await this.addResultFilter(e);const s=P(qe.engineResourcePaths);if(Xe(this,Ot,"f")&&Xe(this,Ot,"f").isPending)return Xe(this,Ot,"f");const n=Qe(this,Ut,(t=Xe(this,Ut,"f"),++t),"f");return Qe(this,Ot,new tt((t,o)=>{if(this.disposed)return;let r=Fe();xe[r]=async function(s){Xe(i,Ot,"f")&&!Xe(i,Ot,"f").isFulfilled&&n===Xe(i,Ut,"f")&&(s.success?(i._isCapturing=!0,i._templateName=e,void 0!==Xe(i,Dt,"f").singleFrameMode&&"disabled"!==Xe(i,Dt,"f").singleFrameMode?(Xe(i,Dt,"f").on("singleFrameAcquired",i._singleFrameModeCallbackBind),i._singleFrameModeCallback(),t()):(i._isOutputOriginalImage=s.isOutputOriginalImage,i._loopReadVideoTimeoutId&&clearTimeout(i._loopReadVideoTimeoutId),i._loopReadVideoTimeoutId=setTimeout(async function(){if(n===Xe(i,Ut,"f")&&i.isCapturing){-1!==i._minImageCaptureInterval&&Xe(i,Dt,"f").startFetching();for(let e of Xe(i,Bt,"f"))e.onImageSourceStateReceived&&e.onImageSourceStateReceived(St.ISS_BUFFER_EMPTY);i.barcodeScanLoop(e,n),t()}},0))):Et({message:s.message,rj:o,stack:s.stack,functionName:"startCapturing"}))},Me.postMessage({type:"cvr_startCapturing",id:r,instanceID:this._instanceID,body:{templateName:e,engineResourcePaths:s}})}),"f"),await Xe(this,Ot,"f")}stopCapturing(){var e;if(ft(this),!Xe(this,Dt,"f"))return;Qe(this,Ut,(e=Xe(this,Ut,"f"),++e),"f"),this._loopReadVideoTimeoutId&&clearTimeout(this._loopReadVideoTimeoutId),this._loopReadVideoTimeoutId=null,Xe(this,Dt,"f").stopFetching(),this._averageProcessintTimeArray=[],this._isCapturing=!1,this._averageTime=999,Qe(this,Ot,null,"f"),Xe(this,Dt,"f").isCameraEnhancer&&Xe(this,Dt,"f").off("singleFrameAcquired",this._singleFrameModeCallbackBind);const t=Fe();Me.postMessage({type:"cvr_stopCapturing",id:t,instanceID:this._instanceID})}async containsTask(e){return ft(this),await new Promise((t,i)=>{let s=Fe();xe[s]=async function(e){if(e.success)return t(JSON.parse(e.tasks));Et({message:e.message,rj:i,stack:e.stack,functionName:"containsTask"})},Me.postMessage({type:"cvr_containsTask",id:s,instanceID:this._instanceID,body:{templateName:e}})})}async switchCapturingTemplate(e){const t=!this.isCapturing;if(!t){if(this.stopCapturing(),!await this.checkTemplateNameValidity(e))return await this.startCapturing(this._templateName),Promise.reject(new Error("[switchCapturingTemplate] [-10036] The template name is invalid."));if(!t)try{await this.startCapturing(e)}catch(e){return"string"==typeof e.message&&(e.message=e.message.replace("startCapturing","switchCapturingTemplate")),Promise.reject(e)}}}async barcodeScanLoop(e,t=Xe(this,Ut,"f")){var i=this;if(t!==Xe(this,Ut,"f")||!this.isCapturing)return;if(Xe(this,Dt,"f").isBufferEmpty())if(Xe(this,Dt,"f").hasNextImageToFetch())for(let e of Xe(this,Bt,"f"))e.onImageSourceStateReceived&&e.onImageSourceStateReceived(St.ISS_BUFFER_EMPTY);else if(!Xe(this,Dt,"f").hasNextImageToFetch())for(let e of Xe(this,Bt,"f"))e.onImageSourceStateReceived&&e.onImageSourceStateReceived(St.ISS_EXHAUSTED);const s=Xe(this,Dt,"f").getImage();if(!s)return void this.continueLoop(e,t);if(s.imageTag&&Date.now()-s.imageTag.timeStamp>200)return void this.continueLoop(e,t);for(let e of Xe(this,Mt,"f"))this._isOutputOriginalImage&&e.onOriginalImageResultReceived&&e.onOriginalImageResultReceived(pt(s));s._s=!0;const n=Date.now();this._captureInWorker(s,e).then(async function(o){if(t!==Xe(i,Ut,"f")||!i.isCapturing)return;if(Kt._onLog&&Kt._onLog("no js handle time: "+(Date.now()-n)),!i.isCapturing)return void i.continueLoop(e,t);o.originalImageTag=s.imageTag?s.imageTag:null,Xe(i,Dt,"f")._capturedResultReceiver&&Xe(i,Dt,"f")._cameraView._capturedResultReceiver.onCapturedResultReceived(o,{isDetectVerifyOpen:i._isOpenDetectVerify,isNormalizeVerifyOpen:i._isOpenNormalizeVerify,isBarcodeVerifyOpen:i._isOpenBarcodeVerify,isLabelVerifyOpen:i._isOpenLabelVerify});for(let e of Xe(i,Ft,"f")){const t=e;t.onOriginalImageResultReceived(o),t.onDecodedBarcodesReceived(o),t.onRecognizedTextLinesReceived(o),t.onProcessedDocumentResultReceived(o),t.onParsedResultsReceived(o)}Xe(i,At,"m",Zt).call(i,o);const r=Date.now();if(i._minImageCaptureInterval>-1&&(5===i._averageProcessintTimeArray.length&&i._averageProcessintTimeArray.shift(),5===i._averageFetchImageTimeArray.length&&i._averageFetchImageTimeArray.shift(),i._averageProcessintTimeArray.push(Date.now()-n),i._averageFetchImageTimeArray.push(s&&s.imageTag?s.imageTag.timeSpent:0),i._averageTime=Math.min(...i._averageProcessintTimeArray)-Math.max(...i._averageFetchImageTimeArray),i._averageTime=i._averageTime>0?i._averageTime:0,Kt._onLog&&(Kt._onLog(`minImageCaptureInterval: ${i._minImageCaptureInterval}`),Kt._onLog(`averageProcessintTimeArray: ${i._averageProcessintTimeArray}`),Kt._onLog(`averageFetchImageTimeArray: ${i._averageFetchImageTimeArray}`),Kt._onLog(`averageTime: ${i._averageTime}`))),Kt._onLog){const e=Date.now()-r;e>10&&Kt._onLog(`fetch image calculate time: ${e}`)}Kt._onLog&&Kt._onLog(`time finish decode: ${Date.now()}`),Kt._onLog&&Kt._onLog("main time: "+(Date.now()-n)),Kt._onLog&&Kt._onLog("===================================================="),i._loopReadVideoTimeoutId&&clearTimeout(i._loopReadVideoTimeoutId),i._minImageCaptureInterval>0&&i._minImageCaptureInterval>=i._averageTime?i._loopReadVideoTimeoutId=setTimeout(()=>{i.barcodeScanLoop(e,t)},i._minImageCaptureInterval-i._averageTime):i._loopReadVideoTimeoutId=setTimeout(()=>{i.barcodeScanLoop(e,t)},Math.max(i._minImageCaptureInterval,0))}).catch(i=>{t===Xe(this,Ut,"f")&&(Xe(this,Dt,"f").stopFetching(),"platform error"!==i.message&&(i.errorCode&&0===i.errorCode&&(this._loopReadVideoTimeoutId&&clearTimeout(this._loopReadVideoTimeoutId),this._loopReadVideoTimeoutId=setTimeout(()=>{Xe(this,Dt,"f").startFetching(),this.barcodeScanLoop(e,t)},Math.max(this._minImageCaptureInterval,1e3))),setTimeout(()=>{if(t===Xe(this,Ut,"f")){if(!this.onCaptureError)throw i;this.onCaptureError(i)}},0)))})}continueLoop(e,t=Xe(this,Ut,"f")){t===Xe(this,Ut,"f")&&this.isCapturing&&(this._loopReadVideoTimeoutId&&clearTimeout(this._loopReadVideoTimeoutId),this._loopReadVideoTimeoutId=setTimeout(()=>{this.barcodeScanLoop(e,t)},0))}async getClarity(e,t,i,s,n){const{bytes:o,width:r,height:a,stride:c,format:l}=e;let d=Fe();return new Promise((e,u)=>{xe[d]=async function(t){t.success?e(t.clarity):Et({message:t.message,rj:u,stack:t.stack,functionName:"getClarity"})},Me.postMessage({type:"cvr_getClarity",id:d,instanceID:this._instanceID,body:{bytes:o,width:r,height:a,stride:c,format:l,bitcount:t,wr:i,hr:s,grayThreshold:n}},[o.buffer])})}async capture(e,t){let i;if(ft(this),t||(t=Kt._defaultTemplate),S(e))i=await this._captureDsimage(e,t);else if("string"==typeof e)i="data:image/"==e.substring(0,11)?await this._captureBase64(e,t):await this._captureUrl(e,t);else if(e instanceof Blob)i=await this._captureBlob(e,t);else if(e instanceof HTMLImageElement)i=await this._captureImage(e,t);else if(e instanceof HTMLCanvasElement)i=await this._captureCanvas(e,t);else{if(!(e instanceof HTMLVideoElement))throw new TypeError("'capture(imageOrFile, templateName)': Type of 'imageOrFile' should be 'DSImageData', 'Url', 'Base64', 'Blob', 'HTMLImageElement', 'HTMLCanvasElement', 'HTMLVideoElement'.");i=await this._captureVideo(e,t)}return i}async _captureDsimage(e,t){return await this._captureInWorker(e,t)}async _captureUrl(e,t){let i=await B(e,"blob");return await this._captureBlob(i,t)}async _captureBase64(e,t){e=e.substring(e.indexOf(",")+1);let i=atob(e),s=i.length,n=new Uint8Array(s);for(;s--;)n[s]=i.charCodeAt(s);return await this._captureBlob(new Blob([n]),t)}async _captureBlob(e,t){let i=null,s=null;if("undefined"!=typeof createImageBitmap)try{i=await createImageBitmap(e)}catch(e){}i||(s=await async function(t){return await new Promise((i,s)=>{let n=URL.createObjectURL(t),o=new Image;o.src=n,o.onload=()=>{URL.revokeObjectURL(o.dbrObjUrl),i(o)},o.onerror=()=>{let t="Unsupported image format. Please upload files in one of the following formats: .jpg,.jpeg,.ico,.gif,.svg,.webp,.png,.bmp";"image/svg+xml"===e.type&&(t="Invalid SVG file. The file appears to be malformed or contains invalid XML."),s(new Error(t))}})}(e));let n=await this._captureImage(i||s,t);return i&&i.close(),n}async _captureImage(e,t){let i,s,n=e instanceof HTMLImageElement?e.naturalWidth:e.width,o=e instanceof HTMLImageElement?e.naturalHeight:e.height,r=Math.max(n,o);r>this.maxImageSideLength?(Qe(this,kt,this.maxImageSideLength/r,"f"),i=Math.round(n*Xe(this,kt,"f")),s=Math.round(o*Xe(this,kt,"f"))):(i=n,s=o),Xe(this,bt,"f")||Qe(this,bt,document.createElement("canvas"),"f");const a=Xe(this,bt,"f");return a.width===i&&a.height===s||(a.width=i,a.height=s),a.ctx2d||(a.ctx2d=a.getContext("2d",{willReadFrequently:!0})),a.ctx2d.drawImage(e,0,0,n,o,0,0,i,s),e.dbrObjUrl&&URL.revokeObjectURL(e.dbrObjUrl),await this._captureCanvas(a,t)}async _captureCanvas(e,t){if(e.crossOrigin&&"anonymous"!=e.crossOrigin)throw"cors";if([e.width,e.height].includes(0))throw Error("The width or height of the 'canvas' is 0.");const i=e.ctx2d||e.getContext("2d",{willReadFrequently:!0}),s={bytes:Uint8Array.from(i.getImageData(0,0,e.width,e.height).data),width:e.width,height:e.height,stride:4*e.width,format:h.IPF_ABGR_8888};return await this._captureInWorker(s,t)}async _captureVideo(e,t){if(e.crossOrigin&&"anonymous"!=e.crossOrigin)throw"cors";let i,s,n=e.videoWidth,o=e.videoHeight,r=Math.max(n,o);r>this.maxImageSideLength?(Qe(this,kt,this.maxImageSideLength/r,"f"),i=Math.round(n*Xe(this,kt,"f")),s=Math.round(o*Xe(this,kt,"f"))):(i=n,s=o),Xe(this,bt,"f")||Qe(this,bt,document.createElement("canvas"),"f");const a=Xe(this,bt,"f");return a.width===i&&a.height===s||(a.width=i,a.height=s),a.ctx2d||(a.ctx2d=a.getContext("2d",{willReadFrequently:!0})),a.ctx2d.drawImage(e,0,0,n,o,0,0,i,s),await this._captureCanvas(a,t)}async _captureInWorker(e,t){let{bytes:i,width:s,height:n,stride:o,format:r,imageTag:a}=e,c=Fe();return await new Promise((l,d)=>{this.provideDsImage=e,xe[c]=t=>{if(t.success){const i=Date.now();Kt._onLog&&(Kt._onLog(`get result time from worker: ${i}`),Kt._onLog("worker to main time consume: "+(i-t.workerReturnMsgTime)));try{Xe(this,At,"m",Wt).call(this,t.captureResult,e),e.bytes=t.bytes,t.isScanner||Qe(this,kt,0,"f"),Xe(this,At,"m",jt).call(this,t.intermediateResult,a);const i=Date.now();return i-Xe(this,Pt,"f")>Xe(this,xt,"f")&&null!==t.mliRecord&&(null===localStorage||void 0===localStorage||localStorage.setItem("dynamsoft",t.mliRecord),Qe(this,Pt,i,"f")),l(t.captureResult)}catch(e){Et({message:e.message,rj:d,stack:e.stack,functionName:"capture"})}}else Et({message:t.message,rj:d,stack:t.stack,functionName:"capture"})},Kt._onLog&&Kt._onLog(`send buffer to worker: ${Date.now()}`);const u=e.hasOwnProperty("_s")?e._s:this._s;Me.postMessage({type:"cvr_capture",id:c,instanceID:this._instanceID,body:{bytes:i,width:s,height:n,stride:o,format:r,templateName:t||"",dynamsoft:this._dynamsoft,_s:u}},[i.buffer])})}async initSettings(e){var t=this;return ft(this),this.isCapturing?Promise.reject(new Error("initSettings:-10062:Failed to call the function while capturing in progress.")):e&&["string","object"].includes(typeof e)?("string"==typeof e?e.trimStart().startsWith("{")||(e=await B(e,"text")):"object"==typeof e&&(e=JSON.stringify(e)),await new Promise((i,s)=>{let n=Fe();xe[n]=async function(n){if(n.success){const o=JSON.parse(n.response);if(0!==o.errorCode&&Et({message:o.errorString?o.errorString:"Init Settings Failed.",rj:s,errorCode:o.errorCode,functionName:"initSettings"}))return;const r=JSON.parse(e);return t._currentSettings=r,t._isOutputOriginalImage=1===t._currentSettings.CaptureVisionTemplates[0].OutputOriginalImage,Kt._defaultTemplate=t._currentSettings.CaptureVisionTemplates[0].Name,i(o)}Et({message:n.message,rj:s,stack:n.stack,functionName:"initSettings"})},Me.postMessage({type:"cvr_initSettings",id:n,instanceID:this._instanceID,body:{settings:e}})})):void console.error("Invalid template.")}async outputSettings(e,t){return ft(this),await new Promise((i,s)=>{let n=Fe();xe[n]=async function(e){if(e.success){const t=JSON.parse(e.response);if(0!==t.errorCode&&Et({message:t.errorString,rj:s,errorCode:t.errorCode,functionName:"outputSettings"}))return;return i(JSON.parse(t.data))}Et({message:e.message,rj:s,stack:e.stack,functionName:"outputSettings"})},Me.postMessage({type:"cvr_outputSettings",id:n,instanceID:this._instanceID,body:{templateName:e,includeDefaultValues:!!t}})})}async outputSettingsToFile(e,t,i,s){const n=await this.outputSettings(e,s),o=new Blob([JSON.stringify(n,null,2,function(e,t){return t instanceof Array?JSON.stringify(t):t},2)],{type:"application/json"});if(i){const e=document.createElement("a");e.href=URL.createObjectURL(o),t.endsWith(".json")&&(t=t.replace(".json","")),e.download=`${t}.json`,e.onclick=()=>{setTimeout(()=>{URL.revokeObjectURL(e.href)},500)},e.click()}return o}async getTemplateNames(){return ft(this),await new Promise((e,t)=>{let i=Fe();xe[i]=async function(i){if(i.success){const s=JSON.parse(i.response);if(0!==s.errorCode&&Et({message:s.errorString,rj:t,errorCode:s.errorCode,functionName:"getTemplateNames"}))return;return e(JSON.parse(s.data))}Et({message:i.message,rj:t,stack:i.stack,functionName:"getTemplateNames"})},Me.postMessage({type:"cvr_getTemplateNames",id:i,instanceID:this._instanceID})})}async getSimplifiedSettings(e){var t=this;return ft(this),await new Promise((i,s)=>{let n=Fe();xe[n]=async function(e){if(e.success){const n=JSON.parse(e.response);if(0!==n.errorCode&&Et({message:n.errorString,rj:s,errorCode:n.errorCode,functionName:"getSimplifiedSettings"}))return;const o=JSON.parse(n.data,(e,t)=>"barcodeFormatIds"===e?BigInt(t):t);return o.minImageCaptureInterval=t._minImageCaptureInterval,i(o)}Et({message:e.message,rj:s,stack:e.stack,functionName:"getSimplifiedSettings"})},Me.postMessage({type:"cvr_getSimplifiedSettings",id:n,instanceID:this._instanceID,body:{templateName:e}})})}async updateSettings(e,t){var i=this;return ft(this),await new Promise((s,n)=>{let o=Fe();xe[o]=async function(e){if(e.success){const o=JSON.parse(e.response);if(t.minImageCaptureInterval&&t.minImageCaptureInterval>=-1&&(i._minImageCaptureInterval=t.minImageCaptureInterval),i._isOutputOriginalImage=e.isOutputOriginalImage,0!==o.errorCode&&Et({message:o.errorString?o.errorString:"Update Settings Failed.",rj:n,errorCode:o.errorCode,functionName:"updateSettings"}))return;return i._currentSettings=await i.outputSettings("*"),s(o)}Et({message:e.message,rj:n,stack:e.stack,functionName:"updateSettings"})},Me.postMessage({type:"cvr_updateSettings",id:o,instanceID:this._instanceID,body:{settings:t,templateName:e}})})}async resetSettings(){var e=this;return ft(this),this.isCapturing?Promise.reject(new Error("resetSettings:-10062:Failed to call the function while capturing in progress.")):await new Promise((t,i)=>{let s=Fe();xe[s]=async function(s){if(s.success){const n=JSON.parse(s.response);if(0!==n.errorCode&&Et({message:n.errorString?n.errorString:"Reset Settings Failed.",rj:i,errorCode:n.errorCode,functionName:"resetSettings"}))return;return e._currentSettings=await e.outputSettings("*"),t(n)}Et({message:s.message,rj:i,stack:s.stack,functionName:"resetSettings"})},Me.postMessage({type:"cvr_resetSettings",id:s,instanceID:this._instanceID})})}getBufferedItemsManager(){return Xe(this,Nt,"f")||Qe(this,Nt,new it(this),"f"),Xe(this,Nt,"f")}getIntermediateResultManager(){if(ft(this),!Xe(this,Vt,"f")&&0!==qe.bSupportIRTModule)throw new Error("The current license does not support the use of intermediate results.");return Xe(this,Lt,"f")||Qe(this,Lt,new ot(this),"f"),Xe(this,Lt,"f")}static async setGlobalIntraOpNumThreads(e=0){return e>4||e<0?Promise.reject(new RangeError("'intraOpNumThreads' should be between 0 and 4.")):(await qe.loadWasm(),await new Promise((t,i)=>{let s=Fe();xe[s]=async function(e){if(e.success)return t();Et({message:e.message,rj:i,stack:e.stack,functionName:"setGlobalIntraOpNumThreads"})},Me.postMessage({type:"cvr_setGlobalIntraOpNumThreads",id:s,body:{intraOpNumThreads:e}})}))}async checkTemplateNameValidity(e){return ft(this),await new Promise((t,i)=>{let s=Fe();xe[s]=async function(e){return e.success?t(e.isValid):t(!1)},Me.postMessage({type:"cvr_checkTemplateNameValidity",id:s,instanceID:this._instanceID,body:{templateName:e}})})}async parseRequiredResources(e){return ft(this),await new Promise((t,i)=>{let s=Fe();xe[s]=async function(e){if(e.success)return t(JSON.parse(e.resources));Et({message:e.message,rj:i,stack:e.stack,functionName:"parseRequiredResources"})},Me.postMessage({type:"cvr_parseRequiredResources",id:s,instanceID:this._instanceID,body:{templateName:e}})})}dispose(){ft(this),Xe(this,Ot,"f")&&this.stopCapturing(),Qe(this,Dt,null,"f"),Xe(this,Mt,"f").clear(),Xe(this,Bt,"f").clear(),Xe(this,Ft,"f").clear(),Xe(this,Lt,"f")._intermediateResultReceiverSet.clear(),Qe(this,Gt,!0,"f");let e=Fe();xe[e]=e=>{e.success||Et({message:e.message,stack:e.stack,isShouldThrow:!0,functionName:"dispose"})},Me.postMessage({type:"cvr_dispose",id:e,instanceID:this._instanceID})}_getInternalData(){return{isa:Xe(this,Dt,"f"),promiseStartScan:Xe(this,Ot,"f"),intermediateResultManager:Xe(this,Lt,"f"),bufferdItemsManager:Xe(this,Nt,"f"),resultReceiverSet:Xe(this,Mt,"f"),isaStateListenerSet:Xe(this,Bt,"f"),resultFilterSet:Xe(this,Ft,"f"),compressRate:Xe(this,kt,"f"),canvas:Xe(this,bt,"f"),innerUseTag:Xe(this,Vt,"f"),isDestroyed:Xe(this,Gt,"f")}}async _getWasmFilterState(){return await new Promise((e,t)=>{let i=Fe();xe[i]=async function(i){if(i.success){const t=JSON.parse(i.response);return e(t)}Et({message:i.message,rj:t,stack:i.stack,functionName:""})},Me.postMessage({type:"cvr_getWasmFilterState",id:i,instanceID:this._instanceID})})}}Dt=new WeakMap,bt=new WeakMap,Ot=new WeakMap,Lt=new WeakMap,Nt=new WeakMap,Mt=new WeakMap,Bt=new WeakMap,Ft=new WeakMap,xt=new WeakMap,Pt=new WeakMap,kt=new WeakMap,Ut=new WeakMap,Vt=new WeakMap,Gt=new WeakMap,At=new WeakSet,Wt=function(e,t){var i,s,n,o,r,a,c,l,d,u,h,_;for(let m=0;m{let s=Fe();xe[s]=async e=>{if(e.success)return t(e.result);Et({message:e.message,rj:i,stack:e.stack,functionName:"addResultFilter"})},Me.postMessage({type:"cvr_enableResultCrossVerification",id:s,instanceID:this._instanceID,body:{verificationEnabled:e}})})},qt=async function(e){return ft(this),await new Promise((t,i)=>{let s=Fe();xe[s]=async e=>{if(e.success)return t(e.result);Et({message:e.message,rj:i,stack:e.stack,functionName:"addResultFilter"})},Me.postMessage({type:"cvr_enableResultDeduplication",id:s,instanceID:this._instanceID,body:{duplicateFilterEnabled:e}})})},Yt=async function(e){return ft(this),await new Promise((t,i)=>{let s=Fe();xe[s]=async e=>{if(e.success)return t(e.result);Et({message:e.message,rj:i,stack:e.stack,functionName:"addResultFilter"})},Me.postMessage({type:"cvr_setDuplicateForgetTime",id:s,instanceID:this._instanceID,body:{duplicateForgetTime:e}})})},$t=async function(e){return ft(this),await new Promise((t,i)=>{let s=Fe();xe[s]=async e=>{if(e.success)return t();Et({message:e.message,rj:i,stack:e.stack,functionName:"setResultCrossVerificationCriteria"})},Me.postMessage({type:"cvr_setResultCrossVerificationCriteria",id:s,instanceID:this._instanceID,body:{criteria:e}})})},Kt._defaultTemplate="Default",Kt._isNoOnnx=!1;class Xt{constructor(){this.onCapturedResultReceived=null,this.onOriginalImageResultReceived=null}}class Qt{constructor(){this._observedResultUnitTypes=Re.IRUT_ALL,this._observedTaskMap=new Map,this._parameters={setObservedResultUnitTypes:e=>{this._observedResultUnitTypes=e},getObservedResultUnitTypes:()=>this._observedResultUnitTypes,isResultUnitTypeObserved:e=>!!(e&this._observedResultUnitTypes),addObservedTask:e=>{this._observedTaskMap.set(e,!0)},removeObservedTask:e=>{this._observedTaskMap.set(e,!1)},isTaskObserved:e=>0===this._observedTaskMap.size||!!this._observedTaskMap.get(e)},this.onTaskResultsReceived=null,this.onPredetectedRegionsReceived=null,this.onColourImageUnitReceived=null,this.onScaledColourImageUnitReceived=null,this.onGrayscaleImageUnitReceived=null,this.onTransformedGrayscaleImageUnitReceived=null,this.onEnhancedGrayscaleImageUnitReceived=null,this.onBinaryImageUnitReceived=null,this.onTextureDetectionResultUnitReceived=null,this.onTextureRemovedGrayscaleImageUnitReceived=null,this.onTextureRemovedBinaryImageUnitReceived=null,this.onContoursUnitReceived=null,this.onLineSegmentsUnitReceived=null,this.onTextZonesUnitReceived=null,this.onTextRemovedBinaryImageUnitReceived=null,this.onShortLinesUnitReceived=null}getObservationParameters(){return this._parameters}}var Jt,ei,ti,ii;function si(e){return e&&"object"==typeof e&&"string"==typeof e.path}function ni(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function oi(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function ri(e){for(var t=1;t([\s\S]*?)<\/style>/g,ci=/style="([\s\S]*?)"/g,li=(e,t)=>{const{inlineScript2Blob:i,internalCss2Blob:s,insertInternalCss2ExistedSheet:n}=t||{};if(n){let t,i;for(let s=0;s{let r=s.split("}");const a=r.length-1;let c=[],l=null,d=0;for(let e=0;e(o.push(new Blob([t],{type:"text/css"})),"")));const r=[];e=e.replace(ci,(e,t,i,s)=>(r.push(t),"hasstyle"));const a=document.createElement("div");if(a.insertAdjacentHTML("beforeend",e),a.normalize(),s){const e=a.querySelectorAll("HasStyle");for(let t=0;te.trim()).filter(e=>e);if(i.style)for(let e of s){const t=e.split(":");i.style[t[0].trim()]=t[1].trim()}}for(let e of a.querySelectorAll("script")){const t=document.createElement("script");e.textContent&&(i&&!e.src?(t.src=URL.createObjectURL(new Blob([e.textContent],{type:"text/javascript"})),t.addEventListener("load",()=>URL.revokeObjectURL(t.src))):t.textContent=e.textContent);for(let i of e.attributes)t.setAttribute(i.name,i.value);e.replaceWith(t)}let l=new DocumentFragment;return l.append(...a.childNodes),1===l.childNodes.length?l.firstChild:l},di=e=>e&&"object"==typeof e&&"function"==typeof e.then,ui=(async()=>{})().constructor;class hi extends ui{get status(){return this._s}get isPending(){return"pending"===this._s}get isFulfilled(){return"fulfilled"===this._s}get isRejected(){return"rejected"===this._s}get task(){return this._task}set task(e){var t=this;let i;this._task=e,di(e)?i=e:"function"==typeof e&&(i=new ui(e)),i&&async function(){try{const s=await i;e===t._task&&t.resolve(s)}catch(i){e===t._task&&t.reject(i)}}()}get isEmpty(){return null==this._task}constructor(e){let t,i;super((e,s)=>{t=e,i=s}),this._s="pending",this.resolve=e=>{this.isPending&&(di(e)?this.task=e:(this._s="fulfilled",t(e)))},this.reject=e=>{this.isPending&&(this._s="rejected",i(e))},this.task=e}}const _i="undefined"!=typeof navigator&&((e,t)=>{const i=null===(e=navigator)||void 0===e?void 0:e.userAgent,s=null===(t=navigator)||void 0===t?void 0:t.platform,n=i&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(i);return s&&/Win|Mac|Linux/i.test(s)&&!n})(),mi="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!(null!==(ei=window)&&void 0!==ei&&ei.MSStream),gi="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent)&&/Firefox/i.test(navigator.userAgent),fi="undefined"!=typeof navigator&&((e,t)=>{const i=navigator.standalone||(null===(e=(t=window).matchMedia)||void 0===e||null===(e=e.call(t,"(display-mode: standalone)"))||void 0===e?void 0:e.matches);return mi&&i})(),pi=_i?{width:1920,height:1080}:{width:1280,height:720},Ei=function(){const e=this,t=MediaDeviceInfo.prototype.toJSON.apply(e);return t.trackLabel=e.trackLabel,t.capabilities=e.capabilities,t.isFront=e.isFront,t},yi="The camera feature is available only in secure contexts (HTTPS).";let Ii=class e{constructor(){ni(this,"_coreShell",void 0),ni(this,"_video",void 0),ni(this,"_coreInnerLayer",void 0),ni(this,"_coreOuterLayer",void 0),ni(this,"_regionBoxWrapper",void 0),ni(this,"_regionBoxMask",void 0),ni(this,"_regionBoxBorder",void 0),ni(this,"_objectFit","contain"),ni(this,"_uiInlineScript2Blob",!0),ni(this,"_uiInternalCss2Blob",!0),ni(this,"_uiInternalCss2ExistedSheet",!1),ni(this,"_ui",void 0),ni(this,"_pOpen",void 0),ni(this,"_getUserMediaTimeout",1e4),ni(this,"_paused",!1),ni(this,"_shouldClose",!1),ni(this,"_cameraChangedWhenPaused",!1),ni(this,"_requestedCamera","back"),ni(this,"_requestedResolution",pi),ni(this,"_regionBox",{unit:"view-size",center:{x:0,y:0},maskStyle:{background:"rgba(0, 0, 0, 0.5)"},borderStyle:{border:"1px solid #00ff7f"}}),ni(this,"_eventListeners",{}),ni(this,"_taskIdIOSResizeProblem",void 0),ni(this,"onOpened",void 0);const t=this._coreShell=document.createElement("div");Object.assign(t.style,{width:"100%",height:"100%",minWidth:"100px",minHeight:"100px",backgroundColor:"black",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",position:"relative"});const i=this._coreOuterLayer=document.createElement("div");Object.assign(i.style,{width:"auto",height:"100%",minWidth:"100px",minHeight:"100px",aspectRatio:"1",flex:"none",position:"relative",overflow:"hidden"});const s=this._coreInnerLayer=document.createElement("div");Object.assign(s.style,{width:"100%",height:"100%",position:"relative",transformOrigin:"center"});const n=this._video=document.createElement("video");Object.assign(n.style,{width:"100%",height:"100%",position:"absolute",left:"0",top:"0",objectFit:"fill"}),n.muted=!0,n.playsInline=!0,n.addEventListener("resize",()=>{try{this._updateObjectFit()}catch(e){console.error(e)}try{this._updateCanvasSize()}catch(e){console.error(e)}}),s.append(n),i.append(s),t.append(i),"undefined"!=typeof ResizeObserver&&new ResizeObserver(()=>{var e;if(!t.isConnected)return;this._updateObjectFit();const i=null===(e=navigator)||void 0===e?void 0:e.userAgent;if(i&&/iPhone|iPad/i.test(i)){this._taskIdIOSResizeProblem&&clearInterval(this._taskIdIOSResizeProblem);let e=0;this._taskIdIOSResizeProblem=setInterval(()=>{if(++e>10||!t.isConnected)return clearInterval(this._taskIdIOSResizeProblem),void(this._taskIdIOSResizeProblem=null);this._updateObjectFit()},100)}}).observe(t);for(let t of e._arrConstructors)t.call(this)}_updateObjectFit(){var e;const t=this._video;if(!t.isConnected||!t.videoWidth||!t.videoHeight)return;const i=this._coreOuterLayer.style,s=null===(e=this._regionBoxWrapper)||void 0===e?void 0:e.style;if("fill"===this._objectFit||void 0===i.aspectRatio)return"100%"!==i.width&&(i.width="100%"),"100%"!==i.height&&(i.height="100%"),void(s&&("100%"!==s.width&&(s.width="100%"),"100%"!==s.height&&(s.height="100%")));const{width:n,height:o}=this._coreShell.getBoundingClientRect(),r=`${t.videoWidth} / ${t.videoHeight}`;r!=i.aspectRatio&&(i.aspectRatio=r),s&&r!=s.aspectRatio&&(s.aspectRatio=r);const a=n/o-t.videoWidth/t.videoHeight;if(Math.abs(a)<.001)return;let c=!1;a>0&&(c=!c),"cover"===this._objectFit&&(c=!c);const l=s&&"contain"===this._objectFit,d=s&&"cover"===this._objectFit;c?("auto"!=i.width&&(i.width="auto"),"100%"!=i.height&&(i.height="100%"),l&&("auto"!=s.width&&(s.width="auto"),"100%"!=s.height&&(s.height="100%"))):("100%"!=i.width&&(i.width="100%"),"auto"!=i.height&&(i.height="auto"),l&&("100%"!=s.width&&(s.width="100%"),"auto"!=s.height&&(s.height="auto"))),d&&("100%"!==s.width&&(s.width="100%"),"100%"!==s.height&&(s.height="100%"))}get video(){return this._video}get track(){var e;return null===(e=this._video)||void 0===e||null===(e=e.srcObject)||void 0===e?void 0:e.getTracks().filter(e=>"video"===e.kind)[0]}get objectFit(){return this._objectFit}set objectFit(e){this._objectFit=e,this._updateObjectFit()}get ui(){return this._ui||this._coreShell}set ui(e){if(!e)return void(this._ui=void 0);if(e instanceof HTMLElement&&e.contains(this._coreShell))return void(this._ui=e);if("string"==typeof e){if(!e.trim().startsWith("<"))throw Error("Invalid html string.");e=li(e,{inlineScript2Blob:this._uiInlineScript2Blob,internalCss2Blob:this._uiInternalCss2Blob,insertInternalCss2ExistedSheet:this._uiInternalCss2ExistedSheet})}let t;if(e instanceof HTMLElement)t=e;else{if(!(e instanceof DocumentFragment))throw Error("Seems no HTMLElement.");t=document.createElement("div"),Object.assign(t.style,{width:"100%",height:"100%"}),t.append(e)}const i="dm-camera-core-container",s=t.classList.contains(i)?t:t.querySelector(`.${i}`);if(!s)throw Error(`Can't find element with class \`${i}\`.`);this._ui=t;for(let e of t.querySelectorAll("script"))e.currentDMCamera=this;s.append(this._coreShell)}get status(){var e;return this._pOpen?this._pOpen.isPending?this._shouldClose?"closing":"opening":this._paused||this._video.paused||"ended"===(null===(e=this.track)||void 0===e?void 0:e.readyState)?"paused":"opened":"closed"}get requestedCamera(){return JSON.parse(JSON.stringify(this._requestedCamera))}get requestedResolution(){return JSON.parse(JSON.stringify(this._requestedResolution))}get currentCamera(){var t,i;return"opened"!==this.status&&"paused"!==this.status?null:null===(t=e._mapDeviceInfo)||void 0===t?void 0:t[null===(i=this.track)||void 0===i||null===(i=i.getSettings())||void 0===i?void 0:i.deviceId]}get currentResolution(){var e,t;return{width:null===(e=this.video)||void 0===e?void 0:e.videoWidth,height:null===(t=this.video)||void 0===t?void 0:t.videoHeight}}get regionBox(){return this._regionBox}static async hasCamera(){var t;return!(null===(t=navigator)||void 0===t||!t.mediaDevices)&&!!(await e.getDeviceInfos()).length}static async hasMacroCamera(){var t;return!(null===(t=navigator)||void 0===t||!t.mediaDevices)&&!!(await e.getDeviceInfos()).find(e=>{var t;return!e.isFront&&(null===(t=e.capabilities)||void 0===t||null===(t=t.focusDistance)||void 0===t?void 0:t.min)<.061})}static async hasFrontCamera(){var t;return!(null===(t=navigator)||void 0===t||!t.mediaDevices)&&!!(await e.getDeviceInfos()).find(e=>e.isFront)}static async getDeviceInfos(){var t;if(null===(t=navigator)||void 0===t||!t.mediaDevices)throw Error(yi);e._delayBeforeEnumerateDevices&&await new Promise(t=>setTimeout(t,e._delayBeforeEnumerateDevices));let i=(await navigator.mediaDevices.enumerateDevices()).filter(e=>"videoinput"===e.kind);if(!i.length)return[];if(i.some(e=>!e.deviceId)){let t;try{e._delayBeforeGetUserMedia&&await new Promise(t=>setTimeout(t,e._delayBeforeGetUserMedia)),t=await navigator.mediaDevices.getUserMedia({video:!0,audio:!1}),e._delayBeforeEnumerateDevices&&await new Promise(t=>setTimeout(t,e._delayBeforeEnumerateDevices)),i=(await navigator.mediaDevices.enumerateDevices()).filter(e=>"videoinput"===e.kind),i.some(e=>!e.deviceId)&&console.warn("Some camera does not have deviceId.")}catch(i){console.warn("Failed to get device ID by opening camera.",i)}if(t){var s;const e=t.getTracks().filter(e=>"video"===e.kind)[0],n=e.getSettings().deviceId;let o=i.find(e=>e.deviceId===n);o?(o.trackLabel=e.label,o.capabilities=null===(s=e.getCapabilities)||void 0===s?void 0:s.call(e),o.isFront="user"===e.getSettings().facingMode,o.toJSON=Ei):console.warn("Can't find current device by `track.getSettings().deviceId`."),t.getTracks().forEach(e=>e.stop())}}await e._setCapabilities(i);const n=i.reduce((e,t)=>(e[t.deviceId]=t,e),{});return e._mapDeviceInfo=n,[...i]}static async _setCapabilities(t){for(let n of t){var i;if(!n.deviceId)continue;if(Ei===n.toJSON)continue;let o=null===(i=e._mapDeviceInfo)||void 0===i?void 0:i[n.deviceId];if(o)n.trackLabel=o.trackLabel,n.capabilities=o.capabilities,n.isFront=o.isFront;else try{var s;e._delayBeforeGetUserMedia&&await new Promise(t=>setTimeout(t,e._delayBeforeGetUserMedia));const t=await navigator.mediaDevices.getUserMedia({video:{deviceId:{exact:n.deviceId}},audio:!1}),i=t.getTracks().filter(e=>"video"===e.kind)[0];n.trackLabel=i.label,n.capabilities=null===(s=i.getCapabilities)||void 0===s?void 0:s.call(i),n.isFront="user"===i.getSettings().facingMode,t.getTracks().forEach(e=>e.stop())}catch(t){console.warn("Failed to get `trackLabel` and `capabilities`, by opening camera.",t)}n.toJSON=Ei}}async open(){if("opened"!==this.status)if("closed"===this.status||"paused"===this.status)try{if("paused"===this.status&&this._cameraChangedWhenPaused&&await this.close(),"closed"===this.status){if(this._pOpen=new hi,"customized-video"!==this._requestedCamera){var t;let s;if("string"==typeof this._requestedCamera){switch(this._requestedCamera){case"front":s={facingMode:"user"};break;case"quick-back":s={facingMode:"environment"};break;case"back":{const t=await e.getDeviceInfos();if(!t.length)throw Error("No camera found.");for(let n of e._cameraNameMatcher){for(let e of t){var i;const t=null===(i=e.trackLabel||e.label)||void 0===i?void 0:i.toLowerCase();for(let i of n)if(t.includes(i)){s={deviceId:e.deviceId};break}if(s)break}if(s)break}if(s)break;t.reverse();for(let e of t)if(!e.isFront){s={deviceId:e.deviceId};break}if(s)break;s={deviceId:t[0].deviceId};break}case"macro-back":{const t=await e.getDeviceInfos();if(!t.length)throw Error("No camera found.");const i=t.reduce((e,t)=>{var i,s,n;return null!=t&&t.isFront?e:e&&null!=e&&null!==(i=e.capabilities)&&void 0!==i&&null!==(i=i.focusDistance)&&void 0!==i&&i.min?(null==t||null===(s=t.capabilities)||void 0===s||null===(s=s.focusDistance)||void 0===s?void 0:s.min)<(null==e||null===(n=e.capabilities)||void 0===n||null===(n=n.focusDistance)||void 0===n?void 0:n.min)?t:e:t});s={deviceId:(null==i?void 0:i.deviceId)||t[t.length-1].deviceId};break}default:throw Error(`Unknown camera preset: ${this._requestedCamera}`)}this._requestedCamera=s}else s=this._requestedCamera;const n={video:Object.assign({},s,this._requestedResolution),audio:!1};if(null===(t=navigator)||void 0===t||!t.mediaDevices)throw Error(yi);e._delayBeforeGetUserMedia&&await new Promise(t=>setTimeout(t,e._delayBeforeGetUserMedia));const o=navigator.mediaDevices.getUserMedia(n),r=await(this._getUserMediaTimeout?Promise.race([o,new Promise((e,t)=>setTimeout(()=>t(Error("Camera open timeout.")),this._getUserMediaTimeout))]):o);if("closing"===this.status)throw Error("Camera closed.");this._video.srcObject=r}else{await this._video.play();let e=0;for(;++e<100&&!(this.video.readyState>=HTMLMediaElement.HAVE_ENOUGH_DATA);)await new Promise(e=>setTimeout(e,100))}if(fi&&"customized-video"!==this._requestedCamera){this._noUseButWorkaroundIosPwaProblem=this._video.offsetHeight,await new Promise(e=>{let t=!1,i=()=>{this._video.removeEventListener("loadedmetadata",i),t=!0,e()};this._video.addEventListener("loadedmetadata",i),setTimeout(()=>{t||(console.warn("video loadedmetadata timeout"),i())},1e3)});let t=!1;if(await Promise.race([this.video.play().then(()=>{t=!0}),new Promise(i=>setTimeout(()=>{t||i()},e._videoPlayTimeout))]),!t)throw Error("`video.play()` unresponsive in current iOS PWA environment. Please use `singleFrameMode='camera'` instead.")}else{let t=!1;await Promise.race([this.video.play(),async function(){if(await new Promise(t=>setTimeout(t,e._videoPlayTimeout)),!t)throw Error("video play timeout")}()]),t=!0}if("closing"===this.status)throw Error("Camera closed.");if(this.track){const t=this.track.getSettings();let i=0;for(;++isetTimeout(e,100))}if("closing"===this.status)throw Error("Camera closed.");this._pOpen.resolve()}else{if(this._pOpen=new hi,await this._video.play(),"closing"===this.status)throw Error("Camera closed.");this._paused=!1,this._pOpen.resolve()}for(let t of e._arrOnOpen)t.call(this);this._callOpenedListeners()}catch(e){var s,n;let t=null===(s=this._video)||void 0===s||null===(s=s.srcObject)||void 0===s||null===(n=s.getTracks)||void 0===n?void 0:n.call(s);if(t)for(let e of t)null==e||e.stop();this._video.srcObject=null;const i=this._pOpen;this._pOpen=null,this._shouldClose=!1,i.catch(e=>{}),i.reject();const o=Error(`Error opening camera: ${null==e?void 0:e.message}`,{cause:e});throw o.name=e.name,o}else{if("opening"!==this.status&&"closing"!==this.status)throw Error("Never");await this._pOpen}}async pause(){try{await this._pOpen}catch(e){}"opened"===this.status&&(this._video.pause(),this._paused=!0)}async close(){var t,i,s;for(let t of e._arrBeforeClose)t.call(this);if("closed"===this.status)return;if("opening"===this.status&&(this._shouldClose=!0),"closing"===this.status){try{await this._pOpen}catch(n){}return}let n=null===(t=this._video)||void 0===t||null===(t=t.srcObject)||void 0===t||null===(i=t.getTracks)||void 0===i?void 0:i.call(t);if(n)for(let e of n)null==e||e.stop();this._video&&(this._video.srcObject=null),this._pOpen=null,this._paused=!1,this._cameraChangedWhenPaused=!1;for(let t of e._arrOnClose)t.call(this);this._regionBoxWrapper&&(this._regionBoxWrapper.style.visibility="hidden"),null===(s=this._eventListeners.closed)||void 0===s||s.forEach(e=>{try{e.call(this)}catch(e){console.error(e)}})}async requestCamera(e){if("string"==typeof e)vi.includes(e)?this._requestedCamera=e:this._requestedCamera={deviceId:{exact:e}};else if(e)if("videoinput"===e.kind)e.deviceId?this._requestedCamera={deviceId:{exact:e.deviceId}}:this._requestedCamera="back";else{const t=this._requestedCamera=JSON.parse(JSON.stringify(e));if(t.width||t.height||t.aspectRatio){const e=this._requestedResolution={};t.width&&(e.width=t.width,delete t.width),t.height&&(e.height=t.height,delete t.height),t.aspectRatio&&(e.aspectRatio=t.aspectRatio,delete t.aspectRatio)}}else null===e?this._requestedCamera=null:void 0===e&&(this._requestedCamera="back");"opened"===this.status?(await this.close(),await this.open()):"paused"===this.status&&(this._cameraChangedWhenPaused=!0)}async requestResolution(t,i){let s={};if("number"==typeof t?(s.width=t,"number"==typeof i&&(s.height=i)):Array.isArray(t)?(t[0]&&(s.width=t[0]),t[1]&&(s.height=t[1])):t?((t=JSON.parse(JSON.stringify(t))).width&&(s.width=t.width),t.height&&(s.height=t.height),t.aspectRatio&&(s.aspectRatio=t.aspectRatio)):null===t?s=null:void 0===t&&(s=pi),this._requestedResolution=s,"opened"===this.status)if(e._bReopenWhenChangeResolution)await this.close(),await this.open();else{e._delayBeforeApplyConstraints&&await new Promise(t=>setTimeout(t,e._delayBeforeApplyConstraints)),await this.track.applyConstraints(ri(ri({},this._requestedCamera),s));const t=this.track.getSettings();let i=0;for(;++isetTimeout(e,100));this._callOpenedListeners()}else"paused"===this.status&&(e._bReopenWhenChangeResolution?this._cameraChangedWhenPaused=!0:(e._delayBeforeApplyConstraints&&await new Promise(t=>setTimeout(t,e._delayBeforeApplyConstraints)),await this.track.applyConstraints(ri(ri({},this._requestedCamera),s))))}async applyConstraints(e){this.track&&"customized-video"!==this._requestedCamera&&(null!=e||(e={}),await this.track.applyConstraints(ri(ri(ri({},this._requestedCamera),this._requestedResolution),e)))}getFrame(e){if("opened"!==this.status&&"paused"!==this.status)throw Error("Camera not open");let{x:t=0,y:i=0,width:s=this._video.videoWidth,height:n=this._video.videoHeight,reusedContext:o}=e||{};s=Math.round(s+t)-Math.round(t),n=Math.round(n+i)-Math.round(i),t=Math.round(t),i=Math.round(i);const r=(null==o?void 0:o.canvas)||document.createElement("canvas");return r.width!=s&&(r.width=s),r.height!=n&&(r.height=n),(o||r.getContext("2d")).drawImage(this._video,t,i,s,n,0,0,s,n),r}setRegionBox(e){if(!(e=Object.assign(this._regionBox,e)).width||!e.height){var t;if(!e.innerUi)return null!==(t=this._regionBoxWrapper)&&void 0!==t&&t.remove(),this._regionBoxWrapper=null,this._regionBoxMask=null,void(this._regionBoxBorder=null);Object.assign(e,{width:1,height:1,unit:"view-size",center:{x:0,y:0}})}this._regionBoxWrapper||(this._regionBoxWrapper=document.createElement("div"),Object.assign(this._regionBoxWrapper.style,{width:"auto",height:"100%",maxWidth:"100%",maxHeight:"100%",minWidth:"100px",minHeight:"100px",aspectRatio:"1",flex:"none",position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",containerType:"size",visibility:"opened"===this.status?"":"hidden"}),this._regionBoxMask=document.createElement("div"),Object.assign(this._regionBoxMask.style,{width:"100%",height:"100%",flex:"none"}),this._regionBoxWrapper.append(this._regionBoxMask),this._regionBoxBorder=document.createElement("div"),Object.assign(this._regionBoxBorder.style,{flex:"none",boxSizing:"content-box",position:"absolute",transform:"translate(-50%,-50%)"}),this._regionBoxWrapper.append(this._regionBoxBorder),this._coreShell.append(this._regionBoxWrapper)),"string"==typeof e.innerUi&&(e.innerUi=li(e.innerUi)),e.innerUi instanceof DocumentFragment?(this._regionBoxBorder.textContent="",this._regionBoxBorder.append(e.innerUi),e.innerUi=this._regionBoxBorder.childNodes):e.innerUi instanceof Node?1==this._regionBoxBorder.childNodes.length&&this._regionBoxBorder.firstChild==e.innerUi||(this._regionBoxBorder.textContent="",this._regionBoxBorder.append(e.innerUi)):e.innerUi instanceof NodeList?this._regionBoxBorder.childNodes!==e.innerUi&&(this._regionBoxBorder.textContent="",this._regionBoxBorder.append(...e.innerUi),e.innerUi=this._regionBoxBorder.childNodes):e.innerUi instanceof Array?(this._regionBoxBorder.textContent="",this._regionBoxBorder.append(...e.innerUi),e.innerUi=this._regionBoxBorder.childNodes):this._regionBoxBorder.textContent="";let i=100*e.center.y-50*e.height+50+"%",s=100*e.center.x+50*e.width+50+"%",n=100*e.center.y+50*e.height+50+"%",o=100*e.center.x-50*e.width+50+"%";Object.assign(this._regionBoxMask.style,{clipPath:`polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%, ${o} ${i}, ${o} ${n}, ${s} ${n}, ${s} ${i}, ${o} ${i})`}),"view-min"===e.unit&&(i=`calc(${100*e.center.y+50}% + max(-${50*e.height}cqmin, -${50*e.height}cqmax))`,s=`calc(${100*e.center.x+50}% + ${50*e.width}cqmin)`,n=`calc(${100*e.center.y+50}% + ${50*e.height}cqmin)`,o=`calc(${100*e.center.x+50}% + max(-${50*e.width}cqmin, -${50*e.width}cqmax))`,Object.assign(this._regionBoxMask.style,{clipPath:`polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%, ${o} ${i}, ${o} ${n}, ${s} ${n}, ${s} ${i}, ${o} ${i})`})),Object.assign(this._regionBoxMask.style,ri({},e.maskStyle)),Object.assign(this._regionBoxBorder.style,{width:100*e.width+"%",height:100*e.height+"%"}),"view-min"===e.unit&&Object.assign(this._regionBoxBorder.style,{width:100*e.width+"cqmin",height:100*e.height+"cqmin"}),Object.assign(this._regionBoxBorder.style,ri({top:100*e.center.y+50+"%",left:100*e.center.x+50+"%"},e.borderStyle)),"view-size"===e.unit&&1===e.width&&1===e.height&&(this._regionBoxBorder.style.borderWidth="0"),this._updateObjectFit()}addCanvas(){const e=document.createElement("canvas");return Object.assign(e.style,{position:"absolute",left:0,top:0,width:"100%",height:"100%"}),"opened"!==this.status&&"paused"!==this.status||(e.width=this._video.videoWidth,e.height=this._video.videoHeight),this._video.parentElement.append(e),e}_updateCanvasSize(){const e=this._video;e.videoWidth&&e.videoHeight&&this._video.parentElement.querySelectorAll("canvas").forEach(t=>{t.width!==e.videoWidth&&(t.width=e.videoWidth),t.height!==e.videoHeight&&(t.height=e.videoHeight)})}addEventListener(e,t){var i,s;(null!==(s=(i=this._eventListeners)[e])&&void 0!==s?s:i[e]=new Set).add(t)}removeEventListener(e,t){var i;null===(i=this._eventListeners[e])||void 0===i||i.delete(t)}_callOpenedListeners(){var e;try{var t;null===(t=this.onOpened)||void 0===t||t.call(this,this)}catch(e){console.error(e)}this._regionBoxWrapper&&(this._regionBoxWrapper.style.visibility=""),null===(e=this._eventListeners.opened)||void 0===e||e.forEach(e=>{try{e.call(this)}catch(e){console.error(e)}})}videoXY2AbsoluteLT(e){const t=this._video,i=t.getBoundingClientRect(),s=getComputedStyle(document.body);if("static"===s.position){const s=document.documentElement.getBoundingClientRect();return e.map(e=>({left:(this._isMirrored?t.videoWidth-e.x:e.x)/t.videoWidth*i.width+i.x-s.x,top:e.y/t.videoHeight*i.height+i.y-s.y}))}{const n=document.body.getBoundingClientRect(),o=parseFloat(s.borderLeftWidth),r=parseFloat(s.borderTopWidth);return e.map(e=>({left:(this._isMirrored?t.videoWidth-e.x:e.x)/t.videoWidth*i.width+i.x-n.x-o,top:e.y/t.videoHeight*i.height+i.y-n.y-r}))}}videoXY2FixedLT(e){const t=this._video,i=t.getBoundingClientRect();return e.map(e=>({left:(this._isMirrored?t.videoWidth-e.x:e.x)/t.videoWidth*i.width+i.x,top:e.y/t.videoHeight*i.height+i.y}))}getVisibleAreaInVideoXY(e){const{isConsiderRegionBox:t=!1,rounded:i=!1}=e||{};let s;if(t&&this._regionBoxBorder){const e=this._regionBoxBorder.getBoundingClientRect();s={x:e.x,y:e.y,width:e.width,height:e.height};const t=getComputedStyle(this._regionBoxBorder),i=parseFloat(t.borderLeftWidth),n=parseFloat(t.borderTopWidth),o=parseFloat(t.borderRightWidth),r=parseFloat(t.borderBottomWidth);s.x+=i,s.y+=n,s.width-=i+o,s.height-=n+r}else{const e=this._coreShell.getBoundingClientRect();s={x:e.x,y:e.y,width:e.width,height:e.height}}const n=this._video.getBoundingClientRect(),o={x:(s.x-n.x)/n.width,y:(s.y-n.y)/n.height,width:s.width/n.width,height:s.height/n.height};o.x<0&&(o.width+=o.x,o.x=0),o.x>1&&(o.width-=o.x-1,o.x=1),o.y<0&&(o.height+=o.y,o.y=0),o.y>1&&(o.height-=o.y-1,o.y=1),o.x+o.width>1&&(o.width=1-o.x),o.x+o.width<0&&(o.width=-o.x),o.y+o.height>1&&(o.height=1-o.y),o.y+o.height<0&&(o.height=-o.y);const r=this._video.videoWidth,a=this._video.videoHeight;let c=(this._isMirrored?1-o.x-o.width:o.x)*r,l=o.y*a,d=o.width*r,u=o.height*a;return i&&(d=Math.round(d+c)-Math.round(c),u=Math.round(u+l)-Math.round(l),c=Math.round(c),l=Math.round(l)),{x:c,y:l,width:d,height:u}}};ni(Ii,"_cameraNameMatcher",[["ķŠøė¦¬ķ”Œ","äø‰é•œå¤“","äø‰é”é ­","ćƒˆćƒŖćƒ—ćƒ«","สาด","ą¤Ÿą„ą¤°ą¤æą¤Ŗą¤²","Ų«Ł„Ų§Ų«ŁŠŲ©","×ž×©×•×œ×©×Ŗ","ŅÆŃˆŃ‚Ń–Šŗ","Ń‚Ń€Š¾Š¹Š½Š°Ń","тройна","потроєна","τριπλή","üçlü","trójobiektywowy","trostruka","trojný","trojitĆ”","trippelt","trippel","triplă","triple","tripla","tiga","kolmois","ba camera"],["듀얼 ģ™€ģ“ė“œ","雙廣角","åŒå¹æč§’","ćƒ‡ćƒ„ć‚¢ćƒ«åŗƒč§’","ąø„ąø¹ą¹ˆąø”ą¹‰ąø²ąø™ąø«ąø„ąø±ąø‡ąø”ąøøąø”ąøąø§ą¹‰ąø²ąø‡","ą¤”ą„ą¤Æą„ą¤…ą¤² वाइऔ","Ł…Ų²ŲÆŁˆŲ¬Ų© عريضة","כפולה רחבה","қос кең Š±Ņ±Ń€Ń‹ŃˆŃ‚Ń‹","зГвоєна ŃˆŠøŃ€Š¾ŠŗŠ¾ŠŗŃƒŃ‚Š½Š°","Š“Š²Š¾Š¹Š½Š°Ń ŃˆŠøŃ€Š¾ŠŗŠ¾ŃƒŠ³Š¾Š»ŃŒŠ½Š°Ń","Гвойна ŃˆŠøŃ€Š¾ŠŗŠ¾ŃŠŠ³ŃŠŠ»Š½Š°","Γιπλή ευρεία","Ƨift geniş","laajakulmainen kaksois","kĆ©p rį»™ng mįŗ·t sau","kettős, szĆ©les lĆ”tószƶgű","grande angular dupla","ganda","dwuobiektywowy","dwikamera","dvostruka Å”iroka","duĆ”lnĆ­ Å”irokoĆŗhlý","duĆ”lna Å”irokouhlĆ”","dupla grande-angular","dublă","dubbel vidvinkel","dual-weitwinkel","dual wide","dual con gran angular","dual","double","doppia con grandangolo","doble","dobbelt vidvinkelkamera"],["camera2 0,"],["camera 0,"],["후","čƒŒé¢","背置","後面","後置","后面","åŽē½®","านหคัง","หคัง","ą¤¬ą„ˆą¤•","Ų®Ł„ŁŁŠŲ©","אחורית","Š·Š°Š“Š½ŃŃ","Š·Š°Š“Š½Ń","заГней","заГна","Ļ€ĪÆĻƒĻ‰","zadnĆ­","zadnĆ”","tylny","trĆ”s","trasera","traseira","taka","stražnja","spate","sau","rück","rear","posteriore","posterior","hĆ”tsó","darrere","belakang","baksidan","bakre","bak","bagside","back","aртқы","arriĆØre","arka","achterzijde"]]),ni(Ii,"_mapDeviceInfo",void 0),ni(Ii,"_delayBeforeEnumerateDevices",0),ni(Ii,"_delayBeforeGetUserMedia",gi?1e3:0),ni(Ii,"_delayBeforeApplyConstraints",0),ni(Ii,"_countEnsureResolution",gi?20:10),ni(Ii,"_videoPlayTimeout",3e3),ni(Ii,"_bReopenWhenChangeResolution",mi),ni(Ii,"_arrConstructors",[]),ni(Ii,"_arrOnOpen",[]),ni(Ii,"_arrBeforeClose",[]),ni(Ii,"_arrOnClose",[]);const vi=["back","front","macro-back","quick-back","customized-video"];Ii.prototype.correctAdvancedConstraint=function(e){e=JSON.parse(JSON.stringify(e));const{advanced:t}=e||{};if(null==t||!t.length)return e;const i=this;for(const e of t)for(const t in e){let n=e[t];if("number"==typeof n){var s;const o=null===(s=i.currentCamera)||void 0===s||null===(s=s.capabilities)||void 0===s?void 0:s[t],{min:r,step:a,max:c}=o||{};null!=r&&nc&&(n=c),null!=a&&null!=r&&(n=r+Math.round((n-r)/a)*a,c&&n>c&&(n-=a)),e[t]=n}}return e},Ii._arrConstructors.push(function(){const e=this;e._softZoom={zoom:1,center:{x:0,y:0}},e.maxZoom4GestureWheel=20,e._lastZoomTime=-1/0,e._mapZoomTouchs=new Map,e.enableGestureZoom=!0,e.enableWheelZoom=!1}),Object.defineProperty(Ii.prototype,"softZoom",{get(){return this._softZoom}}),Object.defineProperty(Ii.prototype,"isMirrored",{get(){return this._isMirrored},set(e){const t=this;t._isMirrored=e,t.setSoftZoom(t.softZoom.zoom,{center:t.softZoom.center})}}),Object.defineProperty(Ii.prototype,"enableGestureZoom",{get(){return!!this._gestureZoomListener},set(e){const t=this;e?t._gestureZoomListener||(t._gestureZoomListener=e=>{t._changeZoomByTouch(e)},t._coreShell.addEventListener("touchstart",t._gestureZoomListener),t._coreShell.addEventListener("touchmove",t._gestureZoomListener),t._coreShell.addEventListener("touchend",t._gestureZoomListener),t._coreShell.addEventListener("touchcancel",t._gestureZoomListener)):t._gestureZoomListener&&(t._coreShell.removeEventListener("touchstart",t._gestureZoomListener),t._coreShell.removeEventListener("touchmove",t._gestureZoomListener),t._coreShell.removeEventListener("touchend",t._gestureZoomListener),t._coreShell.removeEventListener("touchcancel",t._gestureZoomListener),t._gestureZoomListener=null)}}),Object.defineProperty(Ii.prototype,"enableWheelZoom",{get(){return!!this._wheelZoomListener},set(e){const t=this;e?t._wheelZoomListener||(t._wheelZoomListener=e=>{t._changeZoomByWheel(e)},t._coreShell.addEventListener("wheel",t._wheelZoomListener)):t._wheelZoomListener&&(t._coreShell.removeEventListener("wheel",t._wheelZoomListener),t._wheelZoomListener=null)}}),Ii.prototype.getZoomRange=function(){var e,t;if("opened"!==this.status)throw Error("Camera not open");return null===(e=(t=this.track).getCapabilities)||void 0===e||null===(e=e.call(t))||void 0===e?void 0:e.zoom},Ii.prototype.setZoom=async function(e){const t=this;if("opened"!==t.status)throw Error("Camera not open");Ii._delayBeforeApplyConstraints&&await new Promise(e=>setTimeout(e,Ii._delayBeforeApplyConstraints)),await t.applyConstraints(t.correctAdvancedConstraint(t.correctAdvancedConstraint({advanced:[{zoom:e}]})))},Ii.prototype.setSoftZoom=function(e,t){const i=this;let{center:s,limit:n}=t||{},{x:o=0,y:r=0}=s||{};n&&e<1&&(e=1);let a=i._isMirrored?`scale(${-e},${e})`:`scale(${e})`;if(s){if(n){const t=.5-.5/e;o<-t?o=-t:o>t&&(o=t),r<-t?r=-t:r>t&&(r=t)}a+=` translate(${o*=-100}%, ${r*=-100}%)`}i._softZoom={zoom:e,center:{x:o,y:r}},i._coreInnerLayer.style.transform=a},Ii.prototype._changeZoomByWheel=function(e){var t;const i=this,s=Date.now();let n=i._softZoom.zoom,o=n-e.deltaY/200;o>i.maxZoom4GestureWheel&&(o=i.maxZoom4GestureWheel),o<1&&(o=1),o!==n&&(i.setSoftZoom(o,{center:i._softZoom.center,limit:!0}),i._lastZoomTime=s,e.preventDefault(),null===(t=i._eventListeners.zoom)||void 0===t||t.forEach(e=>{try{e.call(i,JSON.parse(JSON.stringify(i._softZoom)))}catch(e){console.error(e)}}))},Ii.prototype._changeZoomByTouch=function(e){const t=this;for(e.touches.length>=2&&"touchmove"==e.type&&e.preventDefault();e.changedTouches.length>1&&2==e.touches.length;){var i;let s=Date.now();if(s-t._lastZoomTime<100)return;let n=e.touches[0],o=e.touches[1],r=t._mapZoomTouchs.get(n.identifier),a=t._mapZoomTouchs.get(o.identifier);if(!r||!a)break;let c=Math.pow(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2),.5),l=Math.pow(Math.pow(n.clientX-o.clientX,2)+Math.pow(n.clientY-o.clientY,2),.5),d=t._softZoom.zoom;d*=l/c,d>t.maxZoom4GestureWheel&&(d=t.maxZoom4GestureWheel),d<1&&(d=1),t.setSoftZoom(d,{center:t._softZoom.center,limit:!0}),t._lastZoomTime=s,null===(i=t._eventListeners.zoom)||void 0===i||i.forEach(e=>{try{e.call(t,JSON.parse(JSON.stringify(t._softZoom)))}catch(e){console.error(e)}});break}t._mapZoomTouchs.clear();for(let i of e.touches)t._mapZoomTouchs.set(i.identifier,{x:i.clientX,y:i.clientY})},Ii._arrConstructors.push(function(){const e=this;e._isFocusing=!1,e._advancedFocusParameters={minFocusDistanceLimit:.01,maxFocusDistanceLimit:10,firstStepWaitDuration:500,coarseStepWaitDuration:350,switchStepWaitDuration:400,fineStepWaitDuration:350,maxStepCount:30,backToContinousDuration:5e3,focusWH:.2,coarseTuneRate:.5,coarseTuneTolerance:.5,fineTuneRate:1.1},e._advancedFocusTaskId=0,e.enableTapToFocus="simple"}),Ii._getImageContrast=(e,t,i)=>{let s=0;for(let n=0;nsetTimeout(e,Ii._delayBeforeApplyConstraints)),await o.applyConstraints(o.correctAdvancedConstraint({advanced:[{focusMode:"manual",focusDistance:(null==r||null===(u=r.focusDistance)||void 0===u?void 0:u.max)||10}]}))):(Ii._delayBeforeApplyConstraints&&await new Promise(e=>setTimeout(e,Ii._delayBeforeApplyConstraints)),await o.applyConstraints({advanced:[{focusMode:a}]})),await new Promise(e=>setTimeout(e,500))),Ii._delayBeforeApplyConstraints&&await new Promise(e=>setTimeout(e,Ii._delayBeforeApplyConstraints)),await o.applyConstraints({advanced:[{focusMode:c}]}),await new Promise(e=>setTimeout(e,500))}catch(r){"opened"===o.status&&console.warn("Error while do simple focus",r)}o._isFocusing=!1},Ii.prototype._advancedFocus=async function(e,t,i){var s,n,o,r;const a=this;if("opened"!==a.status)throw Error("Camera not open");if(a._isFocusing)return;const c=null===(s=a.currentCamera)||void 0===s?void 0:s.capabilities;if(null==c||null===(n=c.focusMode)||void 0===n||!n.includes("manual"))return void a._simpleFocus();const l=a._advancedFocusParameters,d=a._video.videoWidth,u=a._video.videoHeight;if(d<2||u<2)return;let h,_=0;e?(e.x=Math.round(e.x),e.y=Math.round(e.y),t||(t=Math.min(d,u)*l.focusWH),t<2&&(t=2),t>d&&(t=d),t=2*Math.round(t/2),i||(i=t),i<2&&(i=2),i>u&&(i=u),i=2*Math.round(i/2),e.xd-t/2&&(e.x=d-t/2),e.yu-i/2&&(e.y=u-i/2),_=e.x-t/2,h=e.y-i/2):(t=d,i=u),a._isFocusing=!0;const m=++a._advancedFocusTaskId;let g=null==c||null===(o=c.focusDistance)||void 0===o?void 0:o.min;(!g||gl.maxFocusDistanceLimit)&&(f=l.maxFocusDistanceLimit);let p=-1/0,E=-1/0,y=1/0,I=f,v=!1,R=!0;const C=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});let T=0;try{for(;++TsetTimeout(e,Ii._delayBeforeApplyConstraints)),await a.applyConstraints(a.correctAdvancedConstraint({advanced:[{focusMode:"manual",focusDistance:I}]})),v?R?(R=!1,e=l.switchStepWaitDuration):e=l.fineStepWaitDuration:R?(R=!1,e=l.firstStepWaitDuration):e=l.coarseStepWaitDuration,await new Promise(t=>setTimeout(t,e)),a.getFrame({x:_,y:h,width:t,height:i,reusedContext:C});const s=C.getImageData(0,0,t,i).data,n=Ii._getImageContrast(s,t,i);if(v){if(n<=p){Ii._delayBeforeApplyConstraints&&await new Promise(e=>setTimeout(e,Ii._delayBeforeApplyConstraints)),await a.applyConstraints(a.correctAdvancedConstraint({advanced:[{focusMode:"manual",bestFocusDistance:y}]})),Ii._delayBeforeApplyConstraints&&await new Promise(e=>setTimeout(e,Ii._delayBeforeApplyConstraints)),await a.applyConstraints(a.correctAdvancedConstraint({advanced:[{focusMode:"manual",bestFocusDistance:y}]}));break}if(f===I)break;p=n,n>E&&(E=n,y=I),I*=l.fineTuneRate,I>f&&(I=f)}else(n<=E*l.coarseTuneTolerance||g===I)&&(v=!0),p=n,n>E&&(E=n,y=I),v?(I=Math.sqrt(I*y),R=!0):(I*=l.coarseTuneRate,I0&&setTimeout(async()=>{if(a._advancedFocusTaskId===m){Ii._delayBeforeApplyConstraints&&await new Promise(e=>setTimeout(e,Ii._delayBeforeApplyConstraints));try{await a.applyConstraints({advanced:[{focusMode:"continuous"}]})}catch(e){}}},l.backToContinousDuration)},Object.defineProperty(Ii.prototype,"enableTapToFocus",{get(){return this._enableTapToFocus},set(e){const t=this;t._enableTapToFocus=e,e?t._tapToFocusListner||(t._tapToFocusListner=async e=>{if(!("opened"!==t.status||!t._enableTapToFocus||!e.isPrimary||e.button||e.altKey||e.ctrlKey||e.shiftKey||e.metaKey||"touch"===e.pointerType&&t.enableGestureZoom&&(await new Promise(e=>setTimeout(e,300)),"opened"!==t.status||!t._enableTapToFocus||t._lastZoomTime>Date.now()-1e3||t._mapZoomTouchs.size>1)))if("experimental-advanced"===t._enableTapToFocus){const[{left:i,top:s},{left:n,top:o}]=t.videoXY2FixedLT([{x:0,y:0},{x:t._video.videoWidth,y:t._video.videoHeight}]);t._advancedFocus({x:(e.clientX-i)/(n-i)*t._video.videoWidth,y:(e.clientY-s)/(o-s)*t._video.videoHeight})}else t._simpleFocus()},t._coreShell.addEventListener("pointerdown",t._tapToFocusListner)):t._tapToFocusListner&&(t._coreShell.removeEventListener("pointerdown",t._tapToFocusListner),t._tapToFocusListner=null)}}),Ii._arrConstructors.push(function(){this._isTorchOn=!1,this._autoTorchParameters={shortDelay:250,longDelay:1e3,shortLongDelaySwitchCount:10,grayThreshold:20,maxDarkCount:3}}),Ii._arrOnClose.push(function(){this._isTorchOn=!1}),Object.defineProperty(Ii.prototype,"isSupportTorch",{get(){var e,t;const i=null===(e=navigator)||void 0===e?void 0:e.userAgent;return i&&/iPhone/i.test(i)||!(null===(t=this.currentCamera)||void 0===t||null===(t=t.capabilities)||void 0===t||!t.torch)}}),Object.defineProperty(Ii.prototype,"isTorchOn",{get(){return this._isTorchOn}}),Ii.prototype.turnOnTorch=async function(){const e=this;if("opened"!==e.status)throw Error("Camera not open");Ii._delayBeforeApplyConstraints&&await new Promise(e=>setTimeout(e,Ii._delayBeforeApplyConstraints));try{await e.applyConstraints({advanced:[{torch:!0}]})}catch(t){throw e._isTorchOn=!1,t}e._isTorchOn=!0},Ii.prototype.turnOffTorch=async function(){const e=this;if("opened"!==e.status)throw Error("Camera not open");Ii._delayBeforeApplyConstraints&&await new Promise(e=>setTimeout(e,Ii._delayBeforeApplyConstraints)),await e.applyConstraints({advanced:[{torch:!1}]}),e._isTorchOn=!1},Ii.prototype.turnAutoTorch=function(){const e=this;if("opened"!==e.status)throw Error("Camera not open");if(null==e._isTorchOn)return;e._isTorchOn=void 0;const t=e._autoTorchParameters,i=document.createElement("canvas"),s=i.getContext("2d",{willReadFrequently:!0});let n=0,o=0;(async()=>{for(;null==e._isTorchOn;){try{if("opened"!==e.status){e._isTorchOn=!1;break}e.getFrame({reusedContext:s})}catch(t){e._isTorchOn=!1;break}const a=s.getImageData(0,0,i.width,i.height).data;let c=0;for(let e=0;e=t.maxDarkCount){try{var r;await e.turnOnTorch(),null===(r=e._eventListeners.torchAutoOn)||void 0===r||r.forEach(t=>{try{t.call(e)}catch(e){console.error(e)}})}catch(e){}break}await new Promise(e=>setTimeout(e,o{e._closeWhenHide()},document.addEventListener("visibilitychange",e._closeWhenHideListener),Ti&&window.addEventListener("blur",e._closeWhenHideListener)))}),Ii._arrBeforeClose.push(function(){const e=this;e._closeWhenHideListener&&!e._isDuringCloseWhenHide&&(document.removeEventListener("visibilitychange",e._closeWhenHideListener),Ti&&window.removeEventListener("blur",e._closeWhenHideListener),e._closeWhenHideListener=null,e._isOpenBeforeHide=!1)}),Object.defineProperty(Ii.prototype,"shouldCloseWhenHide",{get(){return this._shouldCloseWhenHide},set(e){const t=this;t._shouldCloseWhenHide=e,("opened"===t.status||"paused"===t.status&&!t._paused)&&(e?t._closeWhenHideListener||(t._closeWhenHideListener=()=>{t._closeWhenHide()},document.addEventListener("visibilitychange",t._closeWhenHideListener),Ti&&window.addEventListener("blur",t._closeWhenHideListener)):t._closeWhenHideListener&&(document.removeEventListener("visibilitychange",t._closeWhenHideListener),Ti&&window.removeEventListener("blur",t._closeWhenHideListener),t._closeWhenHideListener=null,t._isOpenBeforeHide=!1))}}),Ii.prototype._closeWhenHide=async function(){var e;const t=this;if("hidden"===document.visibilityState)("opened"===t.status||"paused"===t.status&&!t._paused&&(Ri&&"live"===(null===(e=t.track)||void 0===e?void 0:e.readyState)||Ci&&"customized-video"!==t.requestedCamera))&&(t._isDuringCloseWhenHide=!0,t._isOpenBeforeHide=!0,await t.close(),t._isDuringCloseWhenHide=!1);else{if(!t._isOpenBeforeHide)return;let e=0;for(;e++setTimeout(e,300));continue}break}}},Ii.showFilePicker=async function(e){var t;null===(t=wi)||void 0===t||t.remove();const i=wi=document.createElement("input");i.type="file",i.accept="image/jpeg, image/png, image/gif, image/bmp, image/webp, image/tiff",i.multiple=!0;let s=new Promise(function(e){i.addEventListener("change",function(){e(Array.from(i.files)),i.remove()})});Object.assign(i,e),Object.assign(i.style,{width:"1px",height:"1px",position:"fixed",left:"0",top:"0",opacity:"0.1",overflow:"hidden",zIndex:"-1"}),document.body.append(i);let n=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});return i.dispatchEvent(n),s};let Ai=class{constructor(e){ni(this,"camera",void 0),ni(this,"_ctx",void 0),ni(this,"_data",void 0),ni(this,"_dataTime",-1/0),ni(this,"_x",void 0),ni(this,"_y",void 0),ni(this,"_w",void 0),ni(this,"_h",void 0),ni(this,"_type",void 0),ni(this,"maxTimeout",500),ni(this,"_pipeTaskId",void 0),ni(this,"isSaveOriginalRgba",!1),ni(this,"originalRgba",void 0),this.camera=e;const t=document.createElement("canvas");this._ctx=t.getContext("2d",{willReadFrequently:!0})}_getData(){if("opened"!==this.camera.status)return null;this.camera.getFrame({x:this._x,y:this._y,width:this._w,height:this._h,reusedContext:this._ctx});const e=this._ctx.getImageData(0,0,this._w,this._h).data;if(this.originalRgba=this.isSaveOriginalRgba?e:null,"rgba"===this._type)return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);const t=new Uint8Array(e.length/4);for(let i=0;iDate.now()&&this._data?(a=this._data,this._data=null):a=this._getData(),this._pipeTaskId||(this._pipeTaskId=setTimeout(()=>{this._pipeTaskId=null,this._data=this._getData(),this._dataTime=Date.now()},0)),a}},Di=class{constructor(){ni(this,"_stAudioFree",new Set),ni(this,"_stAudioPlaying",new Set),ni(this,"_timeLastPlay",0),ni(this,"_bWarnedMaxTrack",!1),ni(this,"maxPlayingBeep",16),ni(this,"beepSoundSource","data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjI5LjEwMAAAAAAAAAAAAAAA/+M4wAAAAAAAAAAAAEluZm8AAAAPAAAABQAAAkAAgICAgICAgICAgICAgICAgICAgKCgoKCgoKCgoKCgoKCgoKCgoKCgwMDAwMDAwMDAwMDAwMDAwMDAwMDg4ODg4ODg4ODg4ODg4ODg4ODg4P//////////////////////////AAAAAExhdmM1OC41NAAAAAAAAAAAAAAAACQEUQAAAAAAAAJAk0uXRQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/+MYxAANQAbGeUEQAAHZYZ3fASqD4P5TKBgocg+Bw/8+CAYBA4XB9/4EBAEP4nB9+UOf/6gfUCAIKyjgQ/Kf//wfswAAAwQA/+MYxAYOqrbdkZGQAMA7DJLCsQxNOij///////////+tv///3RWiZGBEhsf/FO/+LoCSFs1dFVS/g8f/4Mhv0nhqAieHleLy/+MYxAYOOrbMAY2gABf/////////////////usPJ66R0wI4boY9/8jQYg//g2SPx1M0N3Z0kVJLIs///Uw4aMyvHJJYmPBYG/+MYxAgPMALBucAQAoGgaBoFQVBUFQWDv6gZBUFQVBUGgaBr5YSgqCoKhIGg7+IQVBUFQVBoGga//SsFSoKnf/iVTEFNRTMu/+MYxAYAAANIAAAAADEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV")}beep(){if(!this.beepSoundSource)return;let e,t=Date.now();if(!(t-this._timeLastPlay<100)){if(this._timeLastPlay=t,this._stAudioFree.size&&(e=this._stAudioFree.values().next().value,this.beepSoundSource==e.src?(this._stAudioFree.delete(e),e.play()):e=null),!e)if(this._stAudioPlaying.size{e.removeEventListener("loadedmetadata",i),e.play(),t=setTimeout(()=>{this._stAudioPlaying.delete(e)},2e3*e.duration)};e.addEventListener("loadedmetadata",i),e.addEventListener("ended",()=>{null!=t&&(clearTimeout(t),t=null),e.pause(),e.currentTime=0,this._stAudioPlaying.delete(e),this._stAudioFree.add(e)})}else this._bWarnedMaxTrack||(this._bWarnedMaxTrack=!0,console.warn(`The requested audio tracks exceed ${this.maxPlayingBeep} and will not be played.`));e&&this._stAudioPlaying.add(e)}}};const bi=()=>{(null!=Si?Si:Si=new Di).beep()},Oi=(e=300)=>{var t;if(null===(t=navigator)||void 0===t||!t.vibrate)throw new Error("Not supported.");navigator.vibrate(e)},Li={getVersion:()=>"5.0.0-dev-20260417093400"},Ni=Ii,Mi=Ii;if(null!==(ii=document)&&void 0!==ii&&ii.head){const e=new Blob(["@keyframes dce-scanlight{from{top:0;}to{top:97%;}}"],{type:"text/css"}),t=document.createElement("link");t.rel="stylesheet",t.href=URL.createObjectURL(e),document.head.append(t)}const Bi={x:0,y:0,width:100,height:100,isMeasuredInPercentage:!0};Ni.createInstance=async function(e){let t;if(e instanceof Ii?(t=e,e=void 0):t=new Ii,void 0===t.disposed){if(t.isCameraEnhancer=!0,t.disposed=!1,t._cameraEnhancer=t._cameraView=t,t._framePipeline=new Ai(t),t._dceScanRegion=Bi,t._dceEventListeners={},t._bTryAnotherCameraWhenFailToOpen=!0,t._bAutoSingleFrameModeWhenIosPwaFail=!0,t._oriOpen=t.open,t.open=Fi,t._oriUpdateCanvasSize=t._updateCanvasSize,t._updateCanvasSize=Pi,t._oriAddCanvas=t.addCanvas,t.addCanvas=ki,t._dceZoom=1,t._dceEnhancedFeatures=0,t._dceAutoZoomRange={min:1,max:10},t._oriSetZoom=t.setZoom,t.setZoom=Ui,t.singleFrameMode="disabled",t._ifSaveLastUsedCamera=!1,t._pixelFormat=10,t._colourChannelUsageType=0,t.addImageToBuffer=t.clearBuffer=t.startFetching=t.stopFetching=t.setBufferOverflowProtectionMode=t.setErrorListener=t.setImageFetchInterval=t.setMaxImageCount=t.setNextImageToReturn=()=>{},t.getImageCount=t.getMaxImageCount=t.getImageFetchInterval=t.getBufferOverflowProtectionMode=()=>0,t.hasImage=()=>!1,null!=e||(e=Mi.defaultUIElementURL),e&&await t.setUIElement(e),t._dceRegionMaskStyle={lineWidth:2,strokeStyle:"rgb(254,142,20)",fillStyle:"rgba(0,0,0,0.5)"},t._dceRegionMaskVisible=!0,t._dceTipDuration=3e3,t._drawingLayers=[],t._drawingLayers.length=100,t._capturedResultReceiver={onCapturedResultReceived:os.bind(t)},!t.regionBox.innerUi){const e=document.createElement("div");Object.assign(e.style,{position:"absolute",width:"100%",height:"3%",borderRadius:"50%",boxShadow:"0px 0px 2vw 1px #00e5ff",background:"#fff",animation:"3s infinite dce-scanlight",pointerEvents:"none",userSelect:"none",display:"none"}),t.setRegionBox({innerUi:e})}t.addEventListener("opened",function(){var e,i,s,n;null!==(e=this._dceEventListeners.cameraOpen)&&void 0!==e&&e.forEach(e=>{try{e.call(this)}catch(e){console.error(e)}}),null===(i=this._dceEventListeners.played)||void 0===i||i.forEach(e=>{try{e.call(this)}catch(e){console.error(e)}});const o=null===(s=t.currentCamera)||void 0===s?void 0:s.deviceId,r=t._dceLastDeviceId;o!==r&&(t._dceLastDeviceId=o,null===(n=this._dceEventListeners.cameraChange)||void 0===n||n.forEach(e=>{try{e.call(this,o,r)}catch(e){console.error(e)}}))}),t.addEventListener("closed",function(){var e;t.clearAllInnerDrawingItems(!0),t.videoSrc&&(t.video.src=""),null===(e=this._dceEventListeners.cameraClose)||void 0===e||e.forEach(e=>{try{e.call(this)}catch(e){console.error(e)}})}),t.video.addEventListener("resize",()=>{var e;if(!t.video.videoWidth||!t.video.videoHeight)return;const i=t.currentResolution,s=t._dceLastResolution;i.width===(null==s?void 0:s.width)&&i.height===(null==s?void 0:s.height)||(t._dceLastResolution=i,null===(e=t._dceEventListeners.resolutionChange)||void 0===e||e.forEach(e=>{try{e.call(this,i,s)}catch(e){console.error(e)}}))}),["mousedown","mouseup","dblclick"].forEach(e=>{t._coreShell.addEventListener(e,function(e){const i=[e.clientX,e.clientY],s=t._drawingLayers.filter(e=>null==e?void 0:e._visible).map(e=>e._drawingItems).flat(),n=t.videoXY2AbsoluteLT(s.map(e=>{if(e instanceof ts)return e.quad.points;if(e instanceof is||e instanceof ss||e instanceof ns){let{x:t,y:i,width:s,height:n}=e.rect,o=t+s,r=i+n;return[{x:t,y:i},{x:t,y:r},{x:o,y:r},{x:o,y:i}]}return e instanceof es?[e.line.startPoint,e.line.endPoint]:void 0}).flat()).map(e=>[e.left,e.top]);let o=0;s.forEach(t=>{var s;let r=!1;t instanceof ts||t instanceof is||t instanceof ss||t instanceof ns?(r=Xi(i,[n[o],n[o+1],n[o+2],n[o+3]]),o+=4):t instanceof es&&(r=Xi(i,[n[o],n[o+1]]),o+=2),r&&(null===(s=t._dceEventListeners[e.type])||void 0===s||s.forEach(e=>{try{e.call(this)}catch(e){console.error(e)}}))})})})}return t},Ni.defaultUIElementURL="@engineResourcePath/ui/dce.ui.xml",Object.defineProperty(Ni.prototype,"cameraOpenTimeout",{get(){return this._getUserMediaTimeout},set(e){this._getUserMediaTimeout=e}});const Fi=async function(){var e,t,i,s,n;const o=this;if("camera"===o.singleFrameMode||"image"===o.singleFrameMode){var r;const e=await xi("camera"===o.singleFrameMode),t=o.ui.querySelector(".dce-bg-camera");"closed"!==o.status&&await o.close(),t&&(t.style.opacity="0");{o._singleFrameModeCvs&&o._singleFrameModeCvs.remove();const t=o._singleFrameModeCvs=e.toCanvas();Object.assign(t.style,{width:"100%",height:"100%",position:"absolute",left:"0px",top:"0px"}),o._video.parentElement.querySelectorAll("canvas").forEach(e=>{e.width!==t.width&&(e.width=t.width),e.height!==t.height&&(e.height=t.height)});{const e=o._coreOuterLayer.style;if("fill"===this._objectFit||void 0===e.aspectRatio)"100%"!==e.width&&(e.width="100%"),"100%"!==e.height&&(e.height="100%");else{const{width:i,height:s}=o._coreShell.getBoundingClientRect(),n=`${t.width} / ${t.height}`;n!=e.aspectRatio&&(e.aspectRatio=n);const r=i/s-t.width/t.height,a=.001;if(Math.abs(r)>a){let t=!1;r>0&&(t=!t),"cover"===o._objectFit&&(t=!t),t?("auto"!=e.width&&(e.width="auto"),"100%"!=e.height&&(e.height="100%")):("100%"!=e.width&&(e.width="100%"),"auto"!=e.height&&(e.height="auto"))}}}o._video.before(t)}return o._singleFrameModeResultForDcv=e,void(null===(r=o._dceEventListeners.singleFrameAcquired)||void 0===r||r.forEach(t=>{try{t.call(this,e)}catch(t){console.error(t)}}))}o.videoSrc&&(o.video.src=o._dceVideoSrc);const a=o.ui.querySelector(".dce-bg-loading");a&&(a.style.display="");try{await o._oriOpen()}catch(e){if(Ni.onWarning&&Ni.onWarning(null==e?void 0:e.message),!o._bTryAnotherCameraWhenFailToOpen||"customized-video"===o.requestedCamera||!["NotReadableError","AbortError","OverconstrainedError"].includes(null==e?void 0:e.name)){var c,l,d;if(o._bAutoSingleFrameModeWhenIosPwaFail&&null!=e&&null!==(c=e.message)&&void 0!==c&&c.includes("iOS PWA"))return console.warn(e.message),a&&(a.style.display="none"),console.warn("Auto switch to `singleFrameMode = 'camera'`."),o.singleFrameMode="camera",void(null===(l=this.funcShowToast)||void 0===l||l.call(this,"Click to Capture",8e3));throw a&&(a.style.display="none"),null!==(d=this.funcShowToast)&&void 0!==d&&d.call(this,null==e?void 0:e.message,8e3),e}{var u;console.warn(e),await o.requestCamera("quick-back"),await o._oriOpen();const t=o.currentCamera,i=t?t.trackLabel||t.label||t.deviceId:"available camera";null===(u=this.funcShowToast)||void 0===u||u.call(this,`Fallback to ${i}`)}}return o._ifSaveLastUsedCamera&&null!==(e=o.currentCamera)&&void 0!==e&&e.deviceId&&(null!==(t=localStorage)&&void 0!==t&&t.setItem("dce-last-used-camera",null===(i=o.currentCamera)||void 0===i?void 0:i.deviceId),null!==(s=localStorage)&&void 0!==s&&s.setItem("dce-last-used-resolution",JSON.stringify(o.requestedResolution))),a&&(a.style.display="none"),await new Promise(e=>setTimeout(e,0)),ri({deviceId:null===(n=o.currentCamera)||void 0===n?void 0:n.deviceId},o.currentResolution)},xi=async function(e){const t={multiple:!1};e&&(t.capture="environment");const i=(await Ii.showFilePicker(t))[0],s=document.createElement("canvas"),n=s.getContext("2d"),o=URL.createObjectURL(i),r=new Image;r.src=o,await r.decode(),s.width=r.width,s.height=r.height,n.drawImage(r,0,0),URL.revokeObjectURL(o);const a=n.getImageData(0,0,s.width,s.height).data;return{bytes:new Uint8Array(a.buffer,a.byteOffset,a.length),width:s.width,height:s.height,stride:4*s.width,format:10,toCanvas:()=>s,imageTag:{imageId:++Gi,type:0}}},Pi=function(){"disabled"===this.singleFrameMode&&this._oriUpdateCanvasSize()},ki=function(){const e=this,t=e._oriAddCanvas();if("disabled"!==e.singleFrameMode&&e._singleFrameModeCvs){const i=e._singleFrameModeCvs;t.width!==i.width&&(t.width=i.width),t.height!==i.height&&(t.height=i.height)}return t};Ni.prototype.dispose=function(){this.disposed=!0,this.close(),this.setScanLaserVisible(!1)},Ni.prototype.getAllCameras=async function(){return(await Ii.getDeviceInfos()).map(e=>({deviceId:e.deviceId,label:e.label||e.trackLabel}))},Ni.prototype.getAvailableResolutions=async function(){const e=this,t=[],i=e.requestedCamera,s=e.requestedResolution,n="opened"===e.status;n||await e._oriOpen();for(let i of[[160,120],[320,240],[480,360],[640,480],[800,600],[960,720],[1280,720],[1920,1080],[2560,1440],[3840,2160]]){var o,r,a,c;await e.requestResolution(i),((null===(o=e.currentResolution)||void 0===o?void 0:o.width)===i[0]&&(null===(r=e.currentResolution)||void 0===r?void 0:r.height)===i[1]||(null===(a=e.currentResolution)||void 0===a?void 0:a.width)===i[1]&&(null===(c=e.currentResolution)||void 0===c?void 0:c.height)===i[0])&&t.push({width:i[0],height:i[1]})}return n||await e.close(),await e.requestCamera(i),await e.requestResolution(s),t},Ni.prototype.getCameraState=function(){let e=this.status;return"closing"===e||"paused"===e||"closed"===e?"closed":"opened"===e?"open":"opening"===e?"opening":void 0},Ni.prototype.getResolution=function(){return"opened"===this.status?this.currentResolution:this.requestedResolution},Ni.prototype.getSelectedCamera=function(){var e,t;return"opened"===this.status?{deviceId:null===(e=this.currentCamera)||void 0===e?void 0:e.deviceId,label:null===(t=this.currentCamera)||void 0===t?void 0:t.label}:null},Ni.prototype.getVideoSettings=function(){let e={};return"object"==typeof this.requestedCamera&&Object.assign(e,this.requestedCamera),Object.assign(e,this.requestedResolution),{video:e}},Object.defineProperty(Ni.prototype,"ifSaveLastUsedCamera",{get(){return this._ifSaveLastUsedCamera},set(e){const t=this;if(t._ifSaveLastUsedCamera=e,e&&"closed"===t.status){var i,s;const n=null===(i=localStorage)||void 0===i?void 0:i.getItem("dce-last-used-camera");n&&t.requestCamera(n);const o=null===(s=localStorage)||void 0===s?void 0:s.getItem("dce-last-used-resolution");if(o)try{t.requestResolution(JSON.parse(o))}catch(e){}}}}),Object.defineProperty(Ni.prototype,"ifSkipCameraInspection",{get(){return"quick-back"===this.requestedCamera},set(e){e?this.requestCamera("quick-back"):this.requestCamera("back")}}),Ni.prototype.isOpen=function(){return"opened"===this.status},Ni.prototype.isPaused=function(){return"paused"===this.status},Ni.prototype.resume=async function(){await this._oriOpen()},Ni.prototype.selectCamera=async function(e){var t;return await this.requestCamera("string"==typeof e?e:e.deviceId),ri({deviceId:null===(t=this.currentCamera)||void 0===t?void 0:t.deviceId},this.currentResolution)},Ni.prototype.setResolution=async function(e){var t;return await this.requestResolution(e),ri({deviceId:null===(t=this.currentCamera)||void 0===t?void 0:t.deviceId},this.currentResolution)},Ni.testCameraAccess=async function(){let e=!0,t="Successfully accessed the camera.";try{await Ii.getDeviceInfos()}catch(i){e=!1,t=i.message||i}return{ok:e,message:t}},Ni.prototype.updateVideoSettings=async function(e){await this.requestCamera(null==e?void 0:e.video)},Object.defineProperty(Ni.prototype,"videoSrc",{get(){return this._dceVideoSrc},set(e){const t=this;t._dceVideoSrc=e,e?t.requestCamera("customized-video"):(t.video.src="",t.requestCamera(void 0))}}),Ni.prototype.disableEnhancedFeatures=function(e){this._dceEnhancedFeatures=this._dceEnhancedFeatures-(this._dceEnhancedFeatures&e)},Ni.prototype.enableEnhancedFeatures=function(e){this._dceEnhancedFeatures|=e},Ni.prototype.getCameraSettings=function(){var e,t;if(!this.track)throw Error("Camera not open");let i=null===(e=(t=this.track).getSettings)||void 0===e?void 0:e.call(t);if(void 0===i)throw Error("Not supported");return i},Ni.prototype.getCapabilities=function(){var e,t;if(!this.track)throw Error("Camera not open");let i=null===(e=(t=this.track).getCapabilities)||void 0===e?void 0:e.call(t);if(void 0===i)throw Error("Not supported");return i},Ni.prototype.getColorTemperature=function(){var e,t;if(!this.track)throw Error("Camera not open");let i=null===(e=this.track)||void 0===e||null===(t=e.getSettings)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t.colorTemperature;if(void 0===i)throw Error("Not supported");return i},Ni.prototype.getExposureCompensation=function(){var e,t;if(!this.track)throw Error("Camera not open");let i=null===(e=this.track)||void 0===e||null===(t=e.getSettings)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t.exposureCompensation;if(void 0===i)throw Error("Not supported");return i},Ni.prototype.getFrameRate=function(){var e,t;if(!this.track)throw Error("Camera not open");let i=null===(e=this.track)||void 0===e||null===(t=e.getSettings)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t.frameRate;if(void 0===i)throw Error("Not supported");return i},Ni.prototype.setColorTemperature=async function(e){var t;const i=this;i.getColorTemperature(),Ii._delayBeforeApplyConstraints&&await new Promise(e=>setTimeout(e,Ii._delayBeforeApplyConstraints)),await(null===(t=i.applyConstraints)||void 0===t?void 0:t.call(i,i.correctAdvancedConstraint({advanced:[{colorTemperature:e,whiteBalanceMode:"manual"}]})))},Ni.prototype.setExposureCompensation=async function(e){var t;const i=this;i.getExposureCompensation(),Ii._delayBeforeApplyConstraints&&await new Promise(e=>setTimeout(e,Ii._delayBeforeApplyConstraints)),await(null===(t=i.applyConstraints)||void 0===t?void 0:t.call(i,i.correctAdvancedConstraint({advanced:[{exposureCompensation:e}]})))},Ni.prototype.setFrameRate=async function(e){var t;const i=this;i.getFrameRate(),Ii._delayBeforeApplyConstraints&&await new Promise(e=>setTimeout(e,Ii._delayBeforeApplyConstraints)),await(null===(t=i.applyConstraints)||void 0===t?void 0:t.call(i,i.correctAdvancedConstraint({advanced:[{frameRate:e}]})))},Ni.prototype.getZoomSettings=function(){return{factor:this._dceZoom}};const Ui=async function(e){const t=this;if("number"==typeof e)return void await t._oriSetZoom(e);let i,s=e.factor;try{i=t.getZoomRange().max}catch(e){i=null}i?ssetTimeout(e,Ii._delayBeforeApplyConstraints)),await t.applyConstraints({advanced:[{focusMode:e.mode}]});else if(e.distance)Ii._delayBeforeApplyConstraints&&await new Promise(e=>setTimeout(e,Ii._delayBeforeApplyConstraints)),await t.applyConstraints(t.correctAdvancedConstraint({advanced:[{focusMode:"manual",focusDistance:e.distance}]}));else if(e.area){let{x:i,y:s}=e.area.centerPoint,n=e.area.width,o=e.area.height,r=t.currentResolution.width,a=t.currentResolution.height;"string"==typeof i&&(i=i.endsWith("%")?parseFloat(i)*r:parseFloat(i)),"string"==typeof s&&(s=s.endsWith("%")?parseFloat(s)*a:parseFloat(s)),"string"==typeof n&&(n=n.endsWith("%")?parseFloat(n)*r:parseFloat(n)),"string"==typeof o&&(o=o.endsWith("%")?parseFloat(o)*a:parseFloat(o)),await t._advancedFocus({x:i,y:s},n,o)}},Ni.prototype.setAutoZoomRange=function(e){var t;this._dceAutoZoomRange=e;const i=null===(t=this._enhancedFeaturesIrr)||void 0===t?void 0:t._autoZoomParameters;i&&(i.minValue=e.min,i.maxValue=e.max)},Ni.prototype.getAutoZoomRange=function(){var e;const t=null===(e=this._enhancedFeaturesIrr)||void 0===e?void 0:e._autoZoomParameters;return t?{min:t.minValue,max:t.maxValue}:this._dceAutoZoomRange},Ni.prototype.toggleMirroring=function(e){this.isMirrored=e};let Gi=0;Ni.prototype.fetchImage=function(){const e=this.getVisibleAreaInVideoXY({isConsiderRegionBox:!0,rounded:!0});let{width:t,height:i}=e;const s=this.getFrame(e),n=s.getContext("2d").getImageData(0,0,t,i).data;return{bytes:new Uint8Array(n.buffer,n.byteOffset,n.byteLength),width:t,height:i,stride:4*e.width,format:10,toCanvas:()=>s,imageTag:{imageId:++Gi,type:1}}},Ni.prototype.getImage=function(){var e;const t=this,i=t.getVisibleAreaInVideoXY({isConsiderRegionBox:!0,rounded:!0}),s=2!=t._pixelFormat;let n=t._framePipeline.getData(ri(ri({},i),{},{type:s?"rgba":"gray"}));if(!n)return null;let{width:o,height:r}=i,a=s?10:2,c=i.width*(s?4:1);if(s&&[3,4,5].includes(t._colourChannelUsageType)){const e=o*r,i=t._colourChannelUsageType-3,s=new Uint8Array(o*r);for(let t=0;tVi(n,o,r,a),imageTag:{imageId:++Gi,type:1}};return null!==(e=this._dceEventListeners.frameAddedToBuffer)&&void 0!==e&&e.forEach(e=>{try{e.call(this,l)}catch(e){console.error(e)}}),l},Ni.prototype.takePhoto=async function(e){const t=this;let i=!1;"opened"===t.status&&(i=!0,await t.close()),await t.close();const s=await xi(!0);return i&&await t._oriOpen(),null!=e&&e(s),s},Object.defineProperty(Ni.prototype,"singleFrameMode",{get(){return this._singleFrameMode},set(e){var t;const i=this;i._singleFrameMode=e;const s=i.ui.querySelector(".dce-bg-camera");null!==(t=i._singleFrameModeCvs)&&void 0!==t&&t.remove(),i._singleFrameModeCvs=null,i._singleFrameModeResultForDcv=null,"disabled"!==e?(i.close(),i._dceSettingsBeforeSingleFrameMode||(i._dceSettingsBeforeSingleFrameMode={shouldCloseWhenHide:i.shouldCloseWhenHide,regionBox:ri({},i.regionBox),requestedCamera:i.requestedCamera},i.shouldCloseWhenHide=!1,i.setRegionBox({width:1,height:1,unit:"view-size",center:{x:0,y:0},innerUi:null}),i.requestCamera("customized-video")),s&&(i._singleFrameModeClickCallback||(i._singleFrameModeClickCallback=()=>{i.open()},s.addEventListener("click",i._singleFrameModeClickCallback)),s.style.display="",s.style.opacity="")):(i._dceSettingsBeforeSingleFrameMode&&(i.shouldCloseWhenHide=i._dceSettingsBeforeSingleFrameMode.shouldCloseWhenHide,i.setRegionBox(i._dceSettingsBeforeSingleFrameMode.regionBox),i.requestCamera(i._dceSettingsBeforeSingleFrameMode.requestedCamera),i._dceSettingsBeforeSingleFrameMode=null),i._singleFrameModeClickCallback&&(s.removeEventListener("click",i._singleFrameModeClickCallback),i._singleFrameModeClickCallback=null),s&&(s.style.display="none"))}}),Ni.prototype.getScanRegion=function(){return this._dceScanRegion},Ni.prototype.hasNextImageToFetch=function(){return"opened"===this.status},Ni.prototype.isBufferEmpty=function(){return"opened"!==this.status},Ni.prototype.getPixelFormat=function(){return this._pixelFormat},Ni.prototype.setPixelFormat=function(e){this._pixelFormat=e},Ni.prototype.setColourChannelUsageType=function(e){this._colourChannelUsageType=e},Ni.prototype.getColourChannelUsageType=function(){return this._colourChannelUsageType},Ni.prototype.setScanRegion=function(e){this._dceScanRegion=null!=e?e:e=Bi;const t=this._dceRegionMaskVisible,i=this._dceRegionMaskStyle;if(e.isMeasuredInPercentage)if(void 0!==e.x){let s=e;this.setRegionBox({width:s.width/100,height:s.height/100,center:{x:(s.x+s.width/2-50)/100,y:(s.y+s.height/2-50)/100},maskStyle:{background:t?i.fillStyle:""},borderStyle:{border:t?`${i.lineWidth}px solid ${i.strokeStyle}`:""}})}else{let s=e;this.setRegionBox({width:(s.right-s.left)/100,height:(s.bottom-s.top)/100,center:{x:((s.left+s.right)/2-50)/100,y:((s.top+s.bottom)/2-50)/100},maskStyle:{background:t?i.fillStyle:""},borderStyle:{border:t?`${i.lineWidth}px solid ${i.strokeStyle}`:""}})}else{let s=this.video.videoWidth||720,n=this.video.videoHeight||1280;if(void 0!==e.x){let o=e;this.setRegionBox({width:Math.min(o.width/s,1),height:Math.min(o.height/n,1),center:{x:0,y:0},maskStyle:{background:t?i.fillStyle:""},borderStyle:{border:t?`${i.lineWidth}px solid ${i.strokeStyle}`:""}})}else{let o=e;this.setRegionBox({width:Math.min((o.right-o.left)/s,1),height:Math.min((o.bottom-o.top)/n,1),center:{x:0,y:0},maskStyle:{background:t?i.fillStyle:""},borderStyle:{border:t?`${i.lineWidth}px solid ${i.strokeStyle}`:""}})}}},Ni.prototype.setCameraView=function(e){if(e===this)return;const t=e.ui.parentElement;e.ui.parentElement&&(e.ui.remove(),t.append(this.ui));let i=[];for(let t in e)"function"==typeof e[t]&&i.push(t);for(let t of i)e[t]=this[t].bind(this)},Ni.prototype.getCameraView=function(){return this},Ni.prototype.getVideoEl=function(){return this.video},Ni.prototype.convertToPageCoordinates=function(e){let{x:t,y:i}=this.getVisibleAreaInVideoXY({isConsiderRegionBox:!0});return(isNaN(t)||isNaN(i))&&(t=i=0),this.videoXY2AbsoluteLT([{x:e.x+t,y:e.y+i}]).map(e=>({x:e.left,y:e.top}))[0]},Ni.prototype.convertToClientCoordinates=function(e){let{x:t,y:i}=this.getVisibleAreaInVideoXY({isConsiderRegionBox:!0});return(isNaN(t)||isNaN(i))&&(t=i=0),this.videoXY2FixedLT([{x:e.x+t,y:e.y+i}]).map(e=>({x:e.left,y:e.top}))[0]},Ni.prototype.convertToScanRegionCoordinates=function(e){const t=this,i=t.video.videoWidth,s=t.video.videoHeight;let n=t.videoXY2AbsoluteLT([{x:0,y:0},{x:i,y:s}]);return{x:e.x/i*(n[1].left-n[0].left),y:e.y/s*(n[1].top-n[0].top)}},Ni.prototype.convertToContainCoordinates=function(e){const t=this;let i,s,n,o;{let{x:e,y:n}=t.getVisibleAreaInVideoXY();if(isNaN(e)||isNaN(n))return{x:0,y:0};i=e,s=n}{let{x:e,y:i}=t.getVisibleAreaInVideoXY({isConsiderRegionBox:!0});if(isNaN(e)||isNaN(i))return{x:0,y:0};n=e,o=i}const r=t.video.videoWidth,a=t.video.videoHeight;let c=t.videoXY2AbsoluteLT([{x:0,y:0},{x:r,y:a}]);return{x:(e.x+n-i)/r*(c[1].left-c[0].left),y:(e.y+o-s)/a*(c[1].top-c[0].top)}},Ni.prototype.on=function(e,t){var i,s;(null!==(s=(i=this._dceEventListeners)[e])&&void 0!==s?s:i[e]=new Set).add(t)},Ni.prototype.off=function(e,t){var i;null===(i=this._dceEventListeners[e])||void 0===i||i.delete(t)},Mi.prototype.getUIElement=function(){return this.ui},Mi.prototype.setUIElement=async function(e){const t=this;if(!e)return void(t._ui=void 0);if(e instanceof HTMLElement&&e.contains(t._coreShell))return void(t._ui=e);if(e instanceof HTMLElement&&!e.childElementCount)return await t.setUIElement(Mi.defaultUIElementURL),e.append(t.getUIElement()),void(t.ui=e);if("string"==typeof e){let i=e.trim();if(!i.trimStart().startsWith("<")){if(i.includes("@engineResourcePath/")){const e=Ni.handleEngineResourcePaths(Ni.CoreModule.engineResourcePaths);i=i.replace("@engineResourcePath/","DBR"===Ni.CoreModule._bundleEnv?e.dbrBundle:e.dcvData)}i=await fetch(i).then(e=>e.text()),i=i.trim()}if(!i.startsWith("<"))throw Error("Invalid html string.");if(i.startsWith(" \ No newline at end of file diff --git a/dist/ui/dce.rtu.ui.xml b/dist/ui/dce.rtu.ui.xml deleted file mode 100644 index b42d7fc5..00000000 --- a/dist/ui/dce.rtu.ui.xml +++ /dev/null @@ -1,431 +0,0 @@ - -
-
- - -
- 1.0X -
- - - - - - - - - - - - - - - - - - - - - - - -
-
-
example camera
-
-
-
-
480P
-
720P
-
1080P
-
2K
-
4K
-
-
- - -
- - diff --git a/dist/ui/dce.ui.v5.xml b/dist/ui/dce.ui.v5.xml deleted file mode 100644 index 3880ba3b..00000000 --- a/dist/ui/dce.ui.v5.xml +++ /dev/null @@ -1,470 +0,0 @@ - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - diff --git a/dist/ui/dce.ui.xml b/dist/ui/dce.ui.xml deleted file mode 100644 index ddc47387..00000000 --- a/dist/ui/dce.ui.xml +++ /dev/null @@ -1,139 +0,0 @@ - \ No newline at end of file diff --git a/dist/ui/dls.license.dialog.html b/dist/ui/dls.license.dialog.html deleted file mode 100644 index ff0cbb92..00000000 --- a/dist/ui/dls.license.dialog.html +++ /dev/null @@ -1,30 +0,0 @@ - -
-
-
- - - - x -
-
-
-
- \ No newline at end of file diff --git a/documents/6.4.1/ChooseLicense.md b/documents/6.4.1/ChooseLicense.md new file mode 100644 index 00000000..7108435b --- /dev/null +++ b/documents/6.4.1/ChooseLicense.md @@ -0,0 +1,48 @@ +# How to Choose the Proper License + +The licensing depends on what kind of application you are developing (desktop-based, web-based or native app). + +### FOR DESKTOP APPLICATION + +"DESKTOP APPLICATION" means a self-contained application that runs from a local drive and does not require network connectivity to operate. + +You will need to purchase: + +- PER DEVELOPER LICENSE: enables one named user to develop a single application that uses Dynamsoft Barcode Reader SDK. +- RUNTIME License: each distribution of the application using our Barcode Reader SDK requires a runtime license. + +**Note:** + +- It is applicable to Windows Edition, Mac Edition and Linux Edition. +- The PER DEVELOPER LICENSE is perpetual but it is limited to one developer. +- The pricing depends on how many developers will be working on the barcode reading module and how many client machines you have. + +### FOR WEB APPLICATION + +"WEB APPLICATION" means an Application that is deployed to a Server and has multiple users accessing it remotely. + +You will need to purchase: + +- YEARLY SERVER LICENSE: a Deployment License which is required to deploy one Application to each production server, development servers, testing servers, and staging servers. + +**Note:** + +- It is applicable to Windows Edition and Linux Edition. +- The YEARLY SERVER LICENSE is valid for one year. After the first year, you will need to renew your license in order for your application continue working. +- Currently there is no limit as to how many desktop clients can access the software once it's deployed to the production server. +- The pricing depends on how many web servers you would like to host it on. + +### FOR MOBILE APPLICATION + +You will need to purchase: + +- DEVELOPER LICENSE: is on a per-Application per-named programmer basis. +- RUNTIME License: each distribution of the application using our Barcode Reader SDK requires a runtime license. + +**Note:** + +- It is limited to one developed App. +- It covers both Android and iOS Apps. +- The pricing depends on how many developers will work on the barcode reading module and how many client machines you have. + +For more information, please refer to the [License Agreement](LicenseAgreement.md). \ No newline at end of file diff --git a/documents/6.4.1/Enumeration.md b/documents/6.4.1/Enumeration.md new file mode 100644 index 00000000..93b4100b --- /dev/null +++ b/documents/6.4.1/Enumeration.md @@ -0,0 +1,7 @@ +# Enumeration + + * [enum dynamsoft.BarcodeReader.EnumImagePixelFormat](enum-dynamsoftbarcodereaderenumimagepixelformat.md) + * [enum dynamsoft.BarcodeReader.EnumBarcodeFormat](enum-dynamsoftbarcodereaderenumbarcodeformat.md) + * [enum dynamsoft.BarcodeReader.EnumErrorCode](enum-dynamsoftbarcodereaderenumerrorcode.md) + * [enum dynamsoft.BarcodeReader.EnumResultType](enum-dynamsoftbarcodereaderenumresulttype.md) + * [enum dynamsoft.BarcodeReader.EnumTerminateStage](enum-dynamsoftbarcodereaderenumterminatestage.md) \ No newline at end of file diff --git a/documents/6.4.1/Function.md b/documents/6.4.1/Function.md new file mode 100644 index 00000000..e3565156 --- /dev/null +++ b/documents/6.4.1/Function.md @@ -0,0 +1,14 @@ +# Function + + * [function .deleteInstance()](function-deleteinstance.md) + * [function dynamsoft.BarcodeReader.loadWasm()](function-dynamsoftbarcodereaderloadwasm.md) + * [function .decodeVideo()](function-decodevideo.md) + * [function .decodeVideo()](function-decodevideo1.md) + * [function .decodeVideo()](function-decodevideo2.md) + * [function .decodeBuffer()](function-decodebuffer.md) + * [function .decodeBase64String()](function-decodebase64string.md) + * [function .decodeFileInMemory()](function-decodefileinmemory.md) + * [function .getAllLocalizationResults()](function-getalllocalizationresults.md) + * [function .getRuntimeSettings()](functiongetruntimesettings.md) + * [function .resetRuntimeSettings()](functionresetruntimesettings.md) + * [function .updateRuntimeSettings()](functionupdateruntimesettings.md) \ No newline at end of file diff --git a/documents/6.4.1/Introduction.md b/documents/6.4.1/Introduction.md new file mode 100644 index 00000000..9e01e778 --- /dev/null +++ b/documents/6.4.1/Introduction.md @@ -0,0 +1,39 @@ +# Introduction + +`DBR_WASM` uses [Webassembly](https://developer.mozilla.org/en-US/docs/WebAssembly) technology which requires a higher browser version. + +In most browsers, you need to deploy page **to the site** and set `.wasm` `mimetype` to `application/wasm` on the server side to debug and run it. Please check the settings below for different environments. + +* set mimetype in nginx: [mime.types](https://www.nginx.com/resources/wiki/start/topics/examples/full/#mime-types) + +* set mimetype in asp.net: web.config + +* set mimetype in javaee web app: web.xml + +* set mimetype in nodejs: [npm mime](https://github.com/broofa/node-mime) + +On Firefox, you can open the page and debug/run directly from the file browser + +You may encounter this error when you run several other samples with video + +> [Deprecation] getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details. + +That's because most browsers today need to be deployed on https to use [getUserMedia](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia). Below are some samples for configuring an HTTPS server. + +* nginx: [Configuring HTTPS servers](https://nginx.org/en/docs/http/configuring_https_servers.html) + +* iis: [Create a Self Signed Certificate in IIS](https://aboutssl.org/how-to-create-a-self-signed-certificate-in-iis/) + +* tomcat: [Setting Up SSL on Tomcat in 5 minutes](https://dzone.com/articles/setting-ssl-tomcat-5-minutes) + +* nodejs: [npm tls](https://nodejs.org/docs/v0.4.1/api/tls.html) + +If you really need to access video on an http site, you can use our [DCS](https://www.dynamsoft.com/Products/webcam-sdk-features.aspx) product. + +> ### For mobile browser +> +> If you want to use DBR_WASM on your mobile browser (most developers is under this usage scenario), you need to be aware that the mobile devices' memory is very limited. +> +> Before decoding a large image(e.g. in [our demo](https://demo.dynamsoft.com/dbr_wasm/barcode_reader_javascript.html), we have a limit of 480*480), you'd better intercept or compress the image. It will prevent your site from crash though the decode rate will decrease. +> +> We provide a special interface for processing video [decodeVideo](function-decodevideo.md) to capture and decode a small area of the video on the video. \ No newline at end of file diff --git a/documents/6.4.1/LicenseAgreement.md b/documents/6.4.1/LicenseAgreement.md new file mode 100644 index 00000000..f5c8a8b1 --- /dev/null +++ b/documents/6.4.1/LicenseAgreement.md @@ -0,0 +1,110 @@ +# License Agreement + +** Revision date: 07/04/2018 ** + +## IMPORTANT: PLEASE READ CAREFULLY. + +THE USE OF THIS SOFTWARE IS SUBJECT TO THE TERMS OF THE LICENSE AGREEMENT PRINTED BELOW. IF YOU DO NOT AGREE WITH THE TERMS, THEN YOU SHOULD NOT USE THE SOFTWARE OR ANY PART OF THE SOFTWARE IN ANY WAY. BY USING THIS PRODUCT, YOU AGREE TO BE BOUND BY ALL THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. + +## THE AGREEMENT + +This document is a legal agreement between Dynamsoft Corporation, Canada, hereafter referred to as "Dynamsoft", and the user of the software, hereafter referred to as "You". + +## DEFINITIONS + +**"SOFTWARE"**: The "Dynamsoft Barcode Reader" software and all accompanying components, parts and documentation that have been developed by Dynamsoft. + +**"Licensee"** means the person or entity entering into this Agreement with Dynamsoft. Any person who is entering into this Agreement on behalf of an organizational entity represents that he or she has the authority to bind such entity. + +**"Application"** means an end user program which Licensee develops using the SOFTWARE and into which the Redistributables are incorporated, and which contains significant additional functionality over and above the functionality contained in the SOFTWARE. + +**"Redistributables"** are those runtime libraries and files intended for duplication and distribution with the Application. + +**"Deployment License"** allows Licensee to copy, deploy and redistribute the Redistributables to end users as part of the Application. + +**"Server"** is defined as a computer configured with the intention of multiple users accessing it as a service, or as a background service running as an automated process. The computer has SOFTWARE loaded into its RAM. + +**"DESKTOP APPLICATION"** means a self-contained Application that runs from a local drive and does not require network connectivity to operate. + +**"WEB APPLICATION"** means an Application that is deployed to a Server and has multiple users accessing it remotely. + +## EVALUATION LICENSE + +Dynamsoft grants Licensee a limited, non-exclusive, non-transferable license to use the SOFTWARE for evaluation purposes for 30 days. An Evaluation License does NOT grant you the right to distribute the SOFTWARE. + +## GRANT OF LICENSE FOR DESKTOP APPLICATION + +The SOFTWARE is licensed on a per developer plus per runtime basis. + +### DEVELOPER LICENSE + +Dynamsoft grants you a limited, non-exclusive, non-transferable (with an exception; see below) license to use the SOFTWARE and the accompanying materials for the purpose of development by a single named developer. + +With Per-Developer License, only one named developer can use the SOFTWARE for development purpose. Licenses are non-transferable (with an exception; see below) between developers. Therefore, if a company has "x" developers who will use the SOFTWARE, the company requires "x" Per-Developer licenses purchased. The same provision applies if, for example, the developers will not be working with the SOFTWARE at the same time. + +**Non-transferable**: a PER-Developer license can be transferred to another developer of the same organization, only if the licensee is no longer working for the organization. + +### RUNTIME LICENSE + +For each Runtime License of the SOFTWARE purchased by Licensee, Dynamsoft grants Licensee a non-exclusive, non-transferable, perpetual, worldwide license for one (1) named end user to install Application on one personal computer or workstation. + +If such named end user installs the Application on an additional computer or workstation, one extra Runtime License is required. + +## GRANT OF LICENSE FOR WEB APPLICATIONS + +### Development +For the purpose of development on a personal computer, You can use the Evaluation License key. + +### Deployment +Server License is a Deployment License which is required to deploy one Application to each production server, development servers, testing servers, and staging servers. + +The Server License is on a per-server per year basis. + +**Renewal**: The Yearly Server License will be valid for one year following the license order date. Thereafter, You can extend the validity of the Yearly Server License additional one year periods (each a "Renewal Term"). + +**Effect of Termination**: Upon the expiration of Yearly Server License, all rights of You granted under this Agreement (including but not limited to, the rights to use, resell, distribute, sublicense and/or provide access to the Software) shall terminate, and, You shall immediately: (a) cease incorporating the Software into the Application; (b) cease use of the Software (in any form, including partial copies in its possession or under its control), and (c) destroy all copies of the Software. + +More flexible licensing options can be discussed with sales@dynamsoft.com. + +## GRANT OF LICENSE FOR MOBILE APP + +The license of Mobile Edition + +- Includes one developer license +- Is Limited to one developed App +- Covers both Android and iOS Apps +- Allows for distribution of a single application on unlimited devices through Android's Google play store and Apple's iTunes store + +### RUNTIME LICENSE FOR DEPLOYMENT + +Runtime License allows for distribution of a single application on limited devices through Android's Google play store and Apple's iTunes store. + +## RESTRICTIONS + +Your product is targeted to end users. The end user application you develop using the SOFTWARE must not be another development tool and/or SDK. + +Users of end user applications you develop using the SOFTWARE may not further use the SOFTWARE, in whole or in part, for software development, copying or distribution. You must enforce this restriction in a separate agreement between You and the end user of your applications. + +Evaluation License holders are granted the use of only one copy of the SOFTWARE per Evaluation License. The SOFTWARE is "in-use" on a computer when it is loaded into temporary memory (i.e. RAM) or installed into the storage device of that computer. + +You may make a single copy of the SOFTWARE for backup purposes only. + +You are not permitted to directly or indirectly expose the properties and methods of the SOFTWARE. + +All rights reserved. You may not use, copy, modify, reverse engineer, decompile, disassemble, sell, transfer, hire, lend or otherwise distribute the SOFTWARE or any accompanying materials in whole or in part, except as expressly provided for in this agreement. + +## OWNERSHIP + +Dynamsoft shall remain the owner of the SOFTWARE. + +This license does not confer any ownership rights to the licensee. + +## WARRANTIES AND DISCLAIMERS + +THIS SOFTWARE AND THE ACCOMPANYING FILES ARE SOLD "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. ANY USE BY YOU OF THE SOFTWARE IS AT YOUR OWN RISK. + +NO LIABILITY FOR CONSEQUENTIAL DAMAGES. UNDER NO CIRCUMSTANCE SHALL DYNAMSOFT BE LIABLE FOR ANY DAMAGES WHATSOEVER ARISING FROM THE USING OR INABILITY TO USE DYNAMSOFT PRODUCTS. + +## APPLICABLE LAWS + +This agreement shall be governed by the laws of Canada. \ No newline at end of file diff --git a/documents/6.4.1/ObjectConstructor.md b/documents/6.4.1/ObjectConstructor.md new file mode 100644 index 00000000..8164350a --- /dev/null +++ b/documents/6.4.1/ObjectConstructor.md @@ -0,0 +1,31 @@ +# Object Constructor + +* [object dynamsoft.dbrEnv](object-dynamsoftdbrenv.md) + * [object dynamsoft.BarcodeReader()](constructor-dynamsoftbarcodereader.md) + * [object LocalizationResult](objectLocalizationResult.md) + * [object PublicRuntimeSettings](PublicRuntimeSettings.md) + * [mTimeout](mTimeout.md) + * [mPDFRasterDPI](mPDFRasterDPI.md) + * [enumTextFilterMode](enumTextFilterMode.md) + * [mTextFilterMode](mTextFilterMode.md) + * [enumRegionPredetectionMode](enumRegionPredetectionMode.md) + * [mRegionPredetectionMode](eNumRegionPredetectionMode.md) + * [mLocalizationAlgorithmPriority](mLocalizationAlgorithmPriority.md) + * [mBarcodeFormatIds](mBarcodeFormatIds.md) + * [mMaxAlgorithmThreadCount](mMaxAlgorithmThreadCount.md) + * [mTextureDetectionSensitivity](mTextureDetectionSensitivity.md) + * [mDeblurLevel](mDeblurLevel.md) + * [mAntiDamageLevel](mAntiDamageLevel.md) + * [mMaxImageDimensionToLocalizeBarcodesOnFullImage](mMaxImageDimensionToLocalizeBarcodesOnFullImage.md) + * [mMaxBarcodesCount](mMaxBarcodesCount.md) + * [enumBarcodeInvertMode](enumBarcodeInvertMode.md) + * [mBarcodeInvertMode](mBarcodeInvertMode.md) + * [mScaleDownThreshold](mScaleDownThreshold.md) + * [mGrayEqualizationSensitivity](mGrayEqualizationSensitivity.md) + * [mEnableFillBinaryVacancy](mEnableFillBinaryVacancy.md) + * [mReserved](mReserved.md) + * [enumColourImageConvertMode](enumColourImageConvertMode.md) + * [mColourImageConvertMode](mColourImageConvertMode.md) + * [mExpectedBarcodesCount](mExpectedBarcodesCount.md) + * [mBinarizationBlockSize](mBinarizationBlockSize.md) + * [object TextResult](objectTextResult.md) \ No newline at end of file diff --git a/documents/6.4.1/PublicRuntimeSettings.md b/documents/6.4.1/PublicRuntimeSettings.md new file mode 100644 index 00000000..56393fd4 --- /dev/null +++ b/documents/6.4.1/PublicRuntimeSettings.md @@ -0,0 +1,54 @@ +#object PublicRuntimeSettings + +###Syntax + +```js +typedef struct PublicRuntimeSettings +{ + number mTimeout; + number mPDFRasterDPI; //readonly + [TextFilterMode](enumTextFilterMode.md) mTextFilterMode; + [RegionPredetectionMode](enumRegionPredetectionMode.md) mRegionPredetectionMode; + char mLocalizationAlgorithmPriority[64]; + number mBarcodeFormatIds; + number mMaxAlgorithmThreadCount; + number mTextureDetectionSensitivity; + number mDeblurLevel; + number mAntiDamageLevel; + number mMaxImageDimensionToLocalizeBarcodesOnFullImage; + number mMaxBarcodesCount; + [BarcodeInvertMode](enumBarcodeInvertMode.md) mBarcodeInvertMode; + number mScaleDownThreshold; + number mGrayEqualizationSensitivity; + number mEnableFillBinaryVacancy; + string mReserved[256]; + [ColourImageConvertMode](enumColourImageConvertMode.md) mColourImageConvertMode; + number mExpectedBarcodesCount; + number mBinarizationBlockSize; +}; +``` + +### Example + +```js +mAntiDamageLevel: 9 +​mBarcodeFormatIds: 503317503 +​mBarcodeInvertMode: 0 +​mBinarizationBlockSize: 0 +​mColourImageConvertMode: 0 +​mDeblurLevel: 9 +​mEnableFillBinaryVacancy: 1 +​mExpectedBarcodesCount: 0 +​mGrayEqualizationSensitivity: 0 +​mLocalizationAlgorithmPriority: "" +​mMaxAlgorithmThreadCount: 4 +​mMaxBarcodesCount: 2147483647 +​mMaxImageDimensionToLocalizeBarcodesOnFullImage: 262144 +​mPDFRasterDPI: 300 +​mRegionPredetectionMode: 1 +​mReserved: "" +​mScaleDownThreshold: 2300 +​mTextFilterMode: 2 +​mTextureDetectionSensitivity: 5 +​mTimeout: 10000 +``` \ No newline at end of file diff --git a/documents/6.4.1/README.md b/documents/6.4.1/README.md new file mode 100644 index 00000000..37637af7 --- /dev/null +++ b/documents/6.4.1/README.md @@ -0,0 +1,61 @@ +# Summary + +## Overview +* [Introduction](Introduction.md) +* [Guide](guide.md) +* [License Agreement](LicenseAgreement.md) +* [How to choose the proper license](ChooseLicense.md) + +## API List - Web Assembly Edition +* [Object Constructor](ObjectConstructor.md) + * [object dynamsoft.dbrEnv](object-dynamsoftdbrenv.md) + * [object dynamsoft.BarcodeReader()](constructor-dynamsoftbarcodereader.md) + * [object LocalizationResult](objectLocalizationResult.md) + * [PSExtendedResult](structSExtendedResult.md) + * [object PublicRuntimeSettings](PublicRuntimeSettings.md) + * [mTimeout](mTimeout.md) + * [mPDFRasterDPI](mPDFRasterDPI.md) + * [enumTextFilterMode](enumTextFilterMode.md) + * [mTextFilterMode](mTextFilterMode.md) + * [enumRegionPredetectionMode](enumRegionPredetectionMode.md) + * [mRegionPredetectionMode](mRegionPredetectionMode.md) + * [mLocalizationAlgorithmPriority](mLocalizationAlgorithmPriority.md) + * [mBarcodeFormatIds](mBarcodeFormatIds.md) + * [mMaxAlgorithmThreadCount](mMaxAlgorithmThreadCount.md) + * [mTextureDetectionSensitivity](mTextureDetectionSensitivity.md) + * [mDeblurLevel](mDeblurLevel.md) + * [mAntiDamageLevel](mAntiDamageLevel.md) + * [mMaxImageDimensionToLocalizeBarcodesOnFullImage](mMaxImageDimensionToLocalizeBarcodesOnFullImage.md) + * [mMaxBarcodesCount](mMaxBarcodesCount.md) + * [enumBarcodeInvertMode](enumBarcodeInvertMode.md) + * [mBarcodeInvertMode](mBarcodeInvertMode.md) + * [mScaleDownThreshold](mScaleDownThreshold.md) + * [mGrayEqualizationSensitivity](mGrayEqualizationSensitivity.md) + * [mEnableFillBinaryVacancy](mEnableFillBinaryVacancy.md) + * [mReserved](mReserved.md) + * [enumColourImageConvertMode](enumColourImageConvertMode.md) + * [mColourImageConvertMode](mColourImageConvertMode.md) + * [mExpectedBarcodesCount](mExpectedBarcodesCount.md) + * [mBinarizationBlockSize](mBinarizationBlockSize.md) + * [object TextResult](objectTextResult.md) +* [Error dynamsoft.BarcodeReader.BarcodeReaderException](error-dynamsoftbarcodereaderbarcodereaderexception.md) +* [Function](Function.md) + * [function .deleteInstance()](function-deleteinstance.md) + * [function dynamsoft.BarcodeReader.loadWasm()](function-dynamsoftbarcodereaderloadwasm.md) + * [function .decodeBase64String()](function-decodebase64string.md) + * [function .decodeFileInMemory()](function-decodefileinmemory.md) + * [function .decodeVideo()](function-decodevideo.md) + * [function .decodeVideo()](function-decodevideo1.md) + * [function .decodeVideo()](function-decodevideo2.md) + * [function .decodeBuffer()](function-decodebuffer.md) + * [function .getAllLocalizationResults()](function-getalllocalizationresults.md) + * [function .getRuntimeSettings()](functiongetruntimesettings.md) + * [function .resetRuntimeSettings()](functionresetruntimesettings.md) + * [function .updateRuntimeSettings()](functionupdateruntimesettings.md) +* [Enumeration](Enumeration.md) + * [enum dynamsoft.BarcodeReader.EnumImagePixelFormat](enum-dynamsoftbarcodereaderenumimagepixelformat.md) + * [enum dynamsoft.BarcodeReader.EnumBarcodeFormat](enum-dynamsoftbarcodereaderenumbarcodeformat.md) + * [enum dynamsoft.BarcodeReader.EnumErrorCode](enum-dynamsoftbarcodereaderenumerrorcode.md) + * [enum dynamsoft.BarcodeReader.EnumResultType](enum-dynamsoftbarcodereaderenumresulttype.md) + * [enum dynamsoft.BarcodeReader.EnumTerminateStage](enum-dynamsoftbarcodereaderenumterminatestage.md) + diff --git a/documents/6.4.1/api-original.md b/documents/6.4.1/api-original.md new file mode 100644 index 00000000..b58dad92 --- /dev/null +++ b/documents/6.4.1/api-original.md @@ -0,0 +1,484 @@ +# API + +- [Guide](guide-original.md) + + +- [API](#api) + - [`object` dynamsoft.dbrEnv](#object-dynamsoftdbrenv) + - [`function` dynamsoft.BarcodeReader.loadWasm()](#function-dynamsoftbarcodereaderloadwasm) + - [`constructor` dynamsoft.BarcodeReader()](#constructor-dynamsoftbarcodereader) + - [`function` .deleteInstance()](#function-deleteinstance) + - [`function` .decodeFileInMemory()](#function-decodefileinmemory) + - [`function` .decodeVideo()](#function-decodevideo) + - [`function` .decodeBase64String()](#function-decodebase64string) + - [`function` .decodeBuffer()](#function-decodebuffer) + - [`function` .getRuntimeSettings()](#function-getruntimesettings) + - [`function` .updateRuntimeSettings()](#function-updateruntimesettings) + - [`function` .resetRuntimeSettings()](#function-resetruntimesettings) + - [`function` .getAllLocalizationResults()](#function-getalllocalizationresults) + - [`Error` dynamsoft.BarcodeReader.BarcodeReaderException](#error-dynamsoftbarcodereaderbarcodereaderexception) + - [`enum` dynamsoft.BarcodeReader.EnumImagePixelFormat](#enum-dynamsoftbarcodereaderenumimagepixelformat) + - [`enum` dynamsoft.BarcodeReader.EnumBarcodeFormat](#enum-dynamsoftbarcodereaderenumbarcodeformat) + - [`enum` dynamsoft.BarcodeReader.EnumErrorCode](#enum-dynamsoftbarcodereaderenumerrorcode) + - [`enum` dynamsoft.BarcodeReader.EnumResultType](#enum-dynamsoftbarcodereaderenumresulttype) + - [`enum` dynamsoft.BarcodeReader.EnumTerminateStage](#enum-dynamsoftbarcodereaderenumterminatestage) + + + +

+ +--- +## `object` dynamsoft.dbrEnv + +*example:* +```js +// All the settings are optional, even dynamsoft and dynamsoft.dbrEnv. +dynamsoft = self.dynamsoft || {}; +dynamsoft.dbrEnv = dynamsoft.dbrEnv || {}; +// https://www.dynamsoft.com/CustomerPortal/Portal/TrialLicense.aspx +dynamsoft.dbrEnv.licenseKey = "", +// The default value is true. It will load the wasm files automatically. +// If you want to load the file manually, please set it to false +// and call dynamsoft.BarcodeReader.loadWasm when needed. +dynamsoft.dbrEnv.bAutoLoadWasm = true; +// The default value is false. Set it true to decode in another thread. By this way, UI would not stuck. +dynamsoft.dbrEnv.bUseWorker = false; +// By default, js will load `dbr-.min.js` & `dbr-.wasm` in the same folder as the context. +// `dbr-.min.js` & `dbr-.wasm` should always put in same folder. +// Modify this setting when you put `dbr-.min.js` & `dbr-.wasm` somewhere else. +// e.g. Set this as 'js' when you place `dbr-.min.js` & `dbr-.wasm`` at 'js/'. +dynamsoft.dbrEnv.resourcesPath = 'js'; +dynamsoft.dbrEnv.onAutoLoadWasmSuccess = function(){ + console.log("success"); +}; +dynamsoft.dbrEnv.onAutoLoadWasmError = function(status){ + console.log("error"); +}; +``` + +

+ +--- +## `function` dynamsoft.BarcodeReader.loadWasm() + +*Syntax:* `dynamsoft.BarcodeReader.loadWasm()` + +Only need to call this manually when you set `dynamsoft.dbrEnv.bAutoLoadWasm` as `false`. + +You can use `decodeXXX`(no worker) in main thread after `loadWasm` success. + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `Promise(resolve(), reject(ex))` | + +

+ +--- +## `constructor` dynamsoft.BarcodeReader() + +*Syntax:* `new dynamsoft.BarcodeReader( [licenceKeys] )` + +New an instance of BarcodeReader. +Don't forget to delete the instance using `deleteInstance()` when it will not be used again. + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `dynamsoft.BarcodeReader` | +| licenceKeys *(optional)* | `String` | If not set, the default value is `dynamsoft.dbrEnv.licenseKey`. | + +*example:* +```js +var reader = new dynamsoft.BarcodeReader(); +``` + +

+ +--- +## `function` .deleteInstance() + +`BarcodeReader` needs to be released when it will not be used again. + +*example:* +```js +reader.deleteInstance(); +``` + +

+ +--- +## `function` .decodeFileInMemory() + +*Syntax:* `.decodeFileInMemory(source)` + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `Promise(resolve(array), reject(ex))` | The array element is like [C# TextResult](https://www.dynamsoft.com/help/Barcode-Reader/api%20reference%20document/class_dynamsoft_1_1_barcode_1_1_text_result.html). | +| source | `Blob` `ArrayBuffer` `Uint8Array` `Uint8ClampedArray` `HTMLImageElement` `HTMLCanvasElement` `HTMLVideoElement` `String`*(base64 with mime)* `String`*(url)* | Support formats that can be rendered in `HTMLImageElement` of browser. | + +*example:* +```js +reader.decodeFileInMemory('./imgs/example.png').then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + // If Confidence >= 30, the barcode results are reliable + console.log(results[i].LocalizationResult.ExtendedResultArray[0].Confidence); + } +}) +``` + +

+ +--- +## `function` .decodeVideo() + +A useful function when you want to decode video. It uses built in [drawImage](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage) before decoding. + +*Syntax:* `.decodeVideo(video)` + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `Promise(resolve(array), reject(ex))` | The array element is like [C# TextResult](https://www.dynamsoft.com/help/Barcode-Reader/api%20reference%20document/class_dynamsoft_1_1_barcode_1_1_text_result.html). | +| video | `HTMLVideoElement` | | + +*example:* +```js +reader.decodeVideo(video).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + // If Confidence >= 30, the barcode results are reliable + console.log(results[i].LocalizationResult.ExtendedResultArray[0].Confidence); + } +}) +``` + +
+ +*Syntax:* `.decodeVideo(video, dWidth, dHeight)` + +*(`dWidth`, `dHeight` also see: [drawImage](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage))* + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `Promise(resolve(array), reject(ex))` | The array element is like [C# TextResult](https://www.dynamsoft.com/help/Barcode-Reader/api%20reference%20document/class_dynamsoft_1_1_barcode_1_1_text_result.html). | +| video | `HTMLVideoElement` | | +| dWidth | `number` | | +| dHeight | `number` | | + +*example:* +```js +// resize the video if the size is bigger than 512x512 to speed up decoding +// the success rate may decrease because of the smaller size +reader.decodeVideo(video, Math.min(video.videoWidth, 512), Math.min(video.videoHeight, 512)).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + // If Confidence >= 30, the barcode results are reliable + console.log(results[i].LocalizationResult.ExtendedResultArray[0].Confidence); + } +}) +``` + +
+ +*Syntax:* `.decodeVideo(video, sx, sy, sWidth, sHeight, dWidth, dHeight)` + +*(`sx`, `sy`, `sWidth`, `sHeight`, `dWidth`, `dHeight` also see: [drawImage](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage))* + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `Promise(resolve(array), reject(ex))` | The array element is like [C# TextResult](https://www.dynamsoft.com/help/Barcode-Reader/api%20reference%20document/class_dynamsoft_1_1_barcode_1_1_text_result.html). | +| video | `HTMLVideoElement` | | +| sx | `number` | | +| sy | `number` | | +| sWidth | `number` | | +| sHeight | `number` | | +| dWidth | `number` | | +| dHeight | `number` | | + +*example:* +```js +// decode a region in video to speed up decoding +var vw = video.videoWidth; +var vh = video.videoHeight; +var vw_2 = Math.round(vw * 0.2); +var vh_2 = Math.round(vh * 0.2); +var vw_6 = Math.round(vw * 0.6); +var vh_6 = Math.round(vh * 0.6); +reader.decodeVideo(video, vw_2, vh_2, vw_6, vh_6, vw_6, vh_6).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + } +}) +``` + +

+ +--- +## `function` .decodeBase64String() + +*Syntax:* `.decodeBase64String(base64Str)` + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `Promise(resolve(array), reject(ex))` | The array element is like [C# TextResult](https://www.dynamsoft.com/help/Barcode-Reader/api%20reference%20document/class_dynamsoft_1_1_barcode_1_1_text_result.html). | +| base64Str | `String`*(base64 with or without mime)* | | + +*example:* +```js +var base64str = 'data:image/png;base64,xxxxxxx'; +//with mime +reader.decodeBase64String(base64str).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + } +}); +//without mime +reader.decodeBase64String(base64str.substring(base64str.indexOf(',') + 1)).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + } +}); +``` + +

+ +--- +## `function` .decodeBuffer() + +*Syntax:* `.decodeBuffer(source, width, height, stride, enumImagePixelFormat)` + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `Promise(resolve(array), reject(ex))` | The array element is like [C# TextResult](https://www.dynamsoft.com/help/Barcode-Reader/api%20reference%20document/class_dynamsoft_1_1_barcode_1_1_text_result.html). | +| source | `Blob` `ArrayBuffer` `Uint8Array` `Uint8ClampedArray` | The image raw buffer. | +| width | `number` | The width of the image buffer. | +| height | `number` | The height of the image buffer. | +| stride | `number` | The stride width (also called scan width) of the image buffer. | +| enumImagePixelFormat | `number`*([dynamsoft.BarcodeReader.EnumImagePixelFormat](#enum-dynamsoftbarcodereaderenumimagepixelformat))* | The pixel format of the image buffer. | + +*example:* +```js +var rawImgData = new Blob(['xxxxxxx']); +var width = 100; +var height = 200; +reader.decodeBuffer(rawImgData, width, height, width * 4, dynamsoft.BarcodeReader.EnumImagePixelFormat.IPF_ARGB_8888).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + } +}) +``` + +

+ +--- +## `function` .getRuntimeSettings() + +*Syntax:* `(BarcodeReader).getRuntimeSettings()` + +*reference:* +* [`function` .updateRuntimeSettings()](#function-updateruntimesettings) +* [`function` .resetRuntimeSettings()](#function-resetruntimesettings) + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `PlainObject` | *reference: [PublicRuntimeSettings](https://www.dynamsoft.com/help/Barcode-Reader/api%20reference%20document/struct_dynamsoft_1_1_barcode_1_1_public_runtime_settings.html)* | + +

+ +--- +## `function` .updateRuntimeSettings() + +*Syntax:* `(ThreadBarcodeReader).updateRuntimeSettings(settings)` + +*reference:* +* [`function` .getRuntimeSettings()](#function-getruntimesettings) +* [`function` .resetRuntimeSettings()](#function-resetruntimesettings) + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `Promise(resolve(), reject(ex))` | | +| settings | `String`*(json)* `PlainObject` | | + +*example:* +```js +//get the settings +var settings = reader.getRuntimeSettings(); +//modify it +settings.mExpectedBarcodesCount = 3; +//update the settings +reader.updateRuntimeSettings(settings).then(()=>{ + return reader.decodeFileInMemory('./imgs/example.png'); +}).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + // If Confidence >= 30, the barcode results are reliable + console.log(results[i].LocalizationResult.ExtendedResultArray[0].Confidence); + } + reader.resetRuntimeSettings(); +}); +``` + +

+ +--- +## `function` .resetRuntimeSettings() + +*Syntax:* `(BarcodeReader).resetRuntimeSettings()` + +*reference:* +* [`function` .getRuntimeSettings()](#function-getruntimesettings) +* [`function` .updateRuntimeSettings()](#function-updateruntimesettings) + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `undefined` | | + +

+ +--- +## `function` .getAllLocalizationResults() + +*Syntax:* `.getAllLocalizationResults()` + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `array` | The array element is like [C# LocalizationResult](https://www.dynamsoft.com/help/Barcode-Reader/API/DotNet/classLocalizationResult.html). | + +*example:* +```js +reader.decodeFileInMemory('./imgs/example.png').then(results=>{ + console.log(reader.getAllLocalizationResults()); +}) +``` + +

+ +--- +## `Error` dynamsoft.BarcodeReader.BarcodeReaderException + +| feild | type | Description | +| --- | --- | --- | +| code | `number`*([dynamsoft.BarcodeReader.EnumErrorCode](#enum-dynamsoftbarcodereaderenumerrorcode))* | | +| message | `String` | | + +

+ +--- +## `enum` dynamsoft.BarcodeReader.EnumImagePixelFormat + +*source code:* +```js +f.IPF_Binary = 0; +f.IPF_BinaryInverted = 1; +f.IPF_GrayScaled = 2; +f.IPF_NV21 = 3; +f.IPF_RGB_565 = 4; +f.IPF_RGB_555 = 5; +f.IPF_RGB_888 = 6; +f.IPF_ARGB_8888 = 7; +``` + +

+ +--- +## `enum` dynamsoft.BarcodeReader.EnumBarcodeFormat + +*source code:* +```js +f.All = 0x1e0003ff; +f.OneD = 0x3FF; +f.CODE_39 = 0x1; +f.CODE_128 = 0x2; +f.CODE_93 = 0x4; +f.CODABAR = 0x8; +f.ITF = 0x10; +f.EAN_13 = 0x20; +f.EAN_8 = 0x40; +f.UPC_A = 0x80; +f.UPC_E = 0x100; +f.INDUSTRIAL_25 = 0x200; +f.PDF417 = 0x2000000; +f.QR_CODE = 0x4000000; +f.DATAMATRIX = 0x8000000; +f.AZTEC = 0x10000000; +``` + +*example:* +```js +var settings = reader.getRuntimeSettings(); +var EnumBarcodeFormat = dynamsoft.BarcodeReader.EnumBarcodeFormat; +settings.mBarcodeFormatIds = EnumBarcodeFormat.OneD | EnumBarcodeFormat.QR_CODE; +reader.updateRuntimeSettings(settings); +``` + +

+ +--- +## `enum` dynamsoft.BarcodeReader.EnumErrorCode + +*source code:* +```js +e.DBR_SYSTEM_EXCEPTION = 1; +e.DBR_SUCCESS = 0; +e.DBR_UNKNOWN = -10000; +e.DBR_NO_MEMORY = -10001; +e.DBR_NULL_REFERENCE = -10002; +e.DBR_LICENSE_INVALID = -10003; +e.DBR_LICENSE_EXPIRED = -10004; +e.DBR_FILE_NOT_FOUND = -10005; +e.DBR_FILETYPE_NOT_SUPPORTED = -10006; +e.DBR_BPP_NOT_SUPPORTED = -10007; +e.DBR_INDEX_INVALID = -10008; +e.DBR_BARCODE_FORMAT_INVALID = -10009; +e.DBR_CUSTOM_REGION_INVALID = -10010; +e.DBR_MAX_BARCODE_NUMBER_INVALID = -10011; +e.DBR_IMAGE_READ_FAILED = -10012; +e.DBR_TIFF_READ_FAILED = -10013; +e.DBR_QR_LICENSE_INVALID = -10016; +e.DBR_1D_LICENSE_INVALID = -10017; +e.DBR_DIB_BUFFER_INVALID = -10018; +e.DBR_PDF417_LICENSE_INVALID = 10019; +e.DBR_DATAMATRIX_LICENSE_INVALID = -10020; +e.DBR_PDF_READ_FAILED = -10021; +e.DBR_PDF_DLL_MISSING = -10022; +e.DBR_PAGE_NUMBER_INVALID = -10023; +e.DBR_CUSTOM_SIZE_INVALID = -10024; +e.DBR_CUSTOM_MODULESIZE_INVALID = -10025; +e.DBR_RECOGNITION_TIMEOUT = -10026; +e.DBR_JSON_PARSE_FAILED = -10030; +e.DBR_JSON_TYPE_INVALID = -10031; +e.DBR_JSON_KEY_INVALID = -10032; +e.DBR_JSON_VALUE_INVALID = -10033; +e.DBR_JSON_NAME_KEY_MISSING = -10034; +e.DBR_JSON_NAME_VALUE_DUPLICATED = -10035; +e.DBR_TEMPLATE_NAME_INVALID = -10036; +e.DBR_JSON_NAME_REFERENCE_INVALID = -10037; +e.DBR_PARAMETER_VALUE_INVALID = 10038; +e.DBR_DOMAIN_NOT_MATCHED = -10039; +e.DBR_RESERVEDINFO_NOT_MATCHED = -10040; +e.DBR_DBRERR_AZTEC_LICENSE_INVALID = -10041; +``` + +

+ +--- +## `enum` dynamsoft.BarcodeReader.EnumResultType + +*source code:* +```js +t.EDT_StandardText = 0; +t.EDT_RawText = 1; +t.EDT_CandidateText = 2; +t.EDT_PartialText = 3; +``` + +

+ +--- +## `enum` dynamsoft.BarcodeReader.EnumTerminateStage + +*source code:* +```js +t.ETS_Prelocalized = 0; +t.ETS_Localized = 1; +t.ETS_Recognized = 2; +``` diff --git a/documents/6.4.1/book.json b/documents/6.4.1/book.json new file mode 100644 index 00000000..1c527654 --- /dev/null +++ b/documents/6.4.1/book.json @@ -0,0 +1,35 @@ +{ + "plugins": ["theme-api","splitter","toggle-chapters"], + "pluginsConfig": { + "theme-api": { + "split": false, + "languages": [ + { + "lang": "CSharp", + "name": "C#", + "default": true + }, + { + "lang": "VB", + "name": "VB.NET" + } + ] + } + }, + "pdf": { + "pageNumbers": false, + "fontFamily": "Arial", + "fontSize": 12, + "paperSize": "a4", + "margin": { + "right": 62, + "left": 62, + "top": 56, + "bottom": 56 + } + }, + "styles": { + "website": "website.css" + }, + "title": "Dynamsoft Barcode Reader Javascript Edition - Documentation" +} \ No newline at end of file diff --git a/documents/6.4.1/constructor-dynamsoftbarcodereader.md b/documents/6.4.1/constructor-dynamsoftbarcodereader.md new file mode 100644 index 00000000..47d515f5 --- /dev/null +++ b/documents/6.4.1/constructor-dynamsoftbarcodereader.md @@ -0,0 +1,30 @@ +# constructor dynamsoft.BarcodeReader() + +### Description + +Defines a class that provides functions for working with extracting barcode data. + +### Syntax + +```js +new dynamsoft.BarcodeReader( [licenceKeys] ) +``` + +### Parameter + +| parameter | type | Description | +| --- | --- | --- | +| licenceKeys *(optional)* | `String` | If not set, the default value is `dynamsoft.dbrEnv.licenseKey`. | + +### Returned Value +`dynamsoft.BarcodeReader` + +### Example +```js +var reader = new dynamsoft.BarcodeReader(); +``` + +### Remarks + +New an instance of BarcodeReader. +Don't forget to delete the instance using `DeleteInstance()` when you will not use the reader again. \ No newline at end of file diff --git a/documents/6.4.1/enum-dynamsoftbarcodereaderenumbarcodeformat.md b/documents/6.4.1/enum-dynamsoftbarcodereaderenumbarcodeformat.md new file mode 100644 index 00000000..bae30208 --- /dev/null +++ b/documents/6.4.1/enum-dynamsoftbarcodereaderenumbarcodeformat.md @@ -0,0 +1,34 @@ +# enum dynamsoft.BarcodeReader.EnumBarcodeFormat + +### Description + +Describes the type of the barcode. + +### Allowed Values + +| Allowed Values | Hex Value | Barcode Type | +| ------------- | ------------- | ------------- | +| BF_All | 0x1E0003FF | All following barcodes types | +| BF_OneD | 0x3FF | One-D barcode | +| BF_CODE_39 | 0x1 | Code 39 | +| BF_CODE_128 | 0x2 | Code 128 | +| BF_CODE_93 | 0x4 | Code 93 | +| BF_CODABAR | 0x8 | Codabar | +| BF_ITF | 0x10 | Interleaved 2 of 5 | +| BF_EAN_13 | 0x20 | EAN-13 | +| BF_EAN_8 | 0x40 | EAN-8 | +| BF_UPC_A | 0x80 | UPC-A | +| BF_UPC_E | 0x100 | UPC-E | +| BF_INDUSTRIAL_25 | 0x200 | Industrial 2 of 5 | +| BF_PDF417 | 0x2000000 | PDF417 | +| BF_QR_CODE | 0x4000000 | QR Code | +| BF_DATAMATRIX | 0x8000000 | DATAMATRIX | +| BF_AZTEC | 0x10000000 | AZTEC | + +### Example + +```js +if(results[0].BarcodeFormat == dynamsoft.BarcodeReader.EnumBarcodeFormat.QR_CODE){ + // The format is QR code. +} +``` \ No newline at end of file diff --git a/documents/6.4.1/enum-dynamsoftbarcodereaderenumerrorcode.md b/documents/6.4.1/enum-dynamsoftbarcodereaderenumerrorcode.md new file mode 100644 index 00000000..d8e31144 --- /dev/null +++ b/documents/6.4.1/enum-dynamsoftbarcodereaderenumerrorcode.md @@ -0,0 +1,72 @@ +# enum dynamsoft.BarcodeReader.EnumErrorCode + +### Description + +Defines the error code of dynamsoft.BarcodeReader. + +### Allowed Values + +| Error Code | Constant | Error Message | +| ------------- | ------------- | ------------- | +| 0 | DBR_SUCCESS | Successful. | +| 1 | DBR_SYSTEM_EXCEPTION | System exception is thrown. | +| -10000 | DBRERR_UNKNOWN | Unknown error. | +| -10001 | DBRERR_NO_MEMORY | Not enough memory to perform the operation. | +| -10002 | DBR_NULL_REFERENCE | Null reference. | +| -10003 | DBRERR_LICENSE_INVALID | The license is invalid. | +| -10004 | DBRERR_LICENSE_EXPIRED | The license has expired. | +| -10005 | DBRERR_FILE_NOT_FOUND | The file to decode is not found. | +| -10006 | DBRERR_FILETYPE_NOT_SUPPORTED | The file type is not supported. | +| -10007 | DBRERR_BPP_NOT_SUPPORTED | The BPP(Bits per pixel) is not supported. | +| -10008 | DBRERR_INDEX_INVALID | The index is invalid. | +| -10009 | DBRERR_BARCODE_FORMAT_INVALID | The barcode format is invalid. | +| -10010 | DBRERR_CUSTOM_REGION_INVALID | The input region value parameter is invalid. | +| -10011 | DBRERR_MAX_BARCODE_NUMBER_INVALID | The maximum barcode number is invalid. | +| -10012 | DBRERR_IMAGE_READ_FAILED | Failed to read the image. | +| -10013 | DBRERR_TIFF_READ_FAILED | Failed to read the TIFF image. | +| -10016 | DBRERR_QR_LICENSE_INVALID | The QR Code license is invalid. | +| -10017 | DBRERR_1D_LICENSE_INVALID | The 1D Barcode license is invalid. | +| -10018 | DBRERR_DIB_BUFFER_INVALID | The DIB(device-independent bitmaps) buffer is invalid. | +| -10019 | DBRERR_PDF417_LICENSE_INVALID | The PDF417 barcode license is invalid. | +| -10020 | DBRERR_DATAMATRIX_LICENSE_INVALID | The DATAMATRIX barcode license is invalid. | +| -10021 | DBRERR_PDF_READ_FAILED | Failed to read the PDF file. | +| -10022 | DBRERR_PDF_DLL_MISSING | The PDF DLL is missing. | +| -10023 | DBRERR_PAGE_NUMBER_INVALID | The page number is invalid. | +| -10024 | DBRERR_CUSTOM_SIZE_INVALID | The custom size is invalid. | +| -10025 | DBRERR_CUSTOM_MODULESIZE_INVALID | The custom module size is invalid. | +| -10026 | DBRERR_RECOGNITION_TIMEOUT | Recognition timeout. | +| -10030 | DBRERR_JSON_PARSE_FAILED | Failed to parse the JSON string. | +| -10031 | DBRERR_JSON_TYPE_INVALID | The value type is invalid. | +| -10032 | DBRERR_JSON_KEY_INVALID | The key is invalid. | +| -10033 | DBRERR_JSON_VALUE_INVALID | The value is invalid or out of range. | +| -10034 | DBRERR_JSON_NAME_KEY_MISSING | The mandatory key "Name" is missing. | +| -10035 | DBRERR_JSON_NAME_VALUE_DUPLICATED | The value of the key "Name" is duplicated. | +| -10036 | DBRERR_TEMPLATE_NAME_INVALID | The template name is invalid. | +| -10037 | DBRERR_JSON_NAME_REFRENCE_INVALID | The name reference is invalid. | +| -10038 | DBR_PARAMETER_VALUE_INVALID | The parameter value is invalid. | +| -10039 | DBRERR_DOMAIN_NOT_MATCHED | The domain of your current site does not match the domain bound in the current product key. | +| -10040 | DBRERR_RESERVEDINFO_NOT_MATCHED | The reserved info does not match the reserved info bound in the current product key. | +| -10041 | DBRERR_AZTEC_LICENSE_INVALID | The AZTEC license is invalid. | + +### Example + +```js +try{ + reader.appendParameterTemplate({ + "ImageParameters": { + "Name": "not exist", + "BarcodeFormatIds": ["not exist"] + } + }); +}catch(ex){ + if(ex instanceof dynamsoft.BarcodeReader.BarcodeReaderException){ + if(ex.code == dynamsoft.BarcodeReader.EnumErrorCode.DBR_JSON_VALUE_INVALID)){ + console.log("DBR_JSON_VALUE_INVALID: " + ex.message); + }else{ + throw ex; + } + }else{ + throw ex; + } +} +``` \ No newline at end of file diff --git a/documents/6.4.1/enum-dynamsoftbarcodereaderenumimagepixelformat.md b/documents/6.4.1/enum-dynamsoftbarcodereaderenumimagepixelformat.md new file mode 100644 index 00000000..2bb101d9 --- /dev/null +++ b/documents/6.4.1/enum-dynamsoftbarcodereaderenumimagepixelformat.md @@ -0,0 +1,18 @@ +# enum dynamsoft.BarcodeReader.EnumImagePixelFormat + +### Description + +Describes the image pixel format. + +### Allowed Values + +| Member | Description | Number | +| ------------- | ------------- | ------------- | +| IPF_Binary | 0:Black, 1:White | 0 | +| IPF_BinaryInverted | 1:Black, 0:White | 1 | +| IPF_GrayScaled | 8-bit Gray | 2 | +| IPF_NV21 | NV21 | 3 | +| IPF_RGB_565 | 16-bit | 4 | +| IPF_RGB_555 | 16-bit | 5 | +| IPF_RGB_888 | 24-bit | 6 | +| IPF_ARGB_8888 | 32-bit | 7 | \ No newline at end of file diff --git a/documents/6.4.1/enum-dynamsoftbarcodereaderenumresulttype.md b/documents/6.4.1/enum-dynamsoftbarcodereaderenumresulttype.md new file mode 100644 index 00000000..05fa3708 --- /dev/null +++ b/documents/6.4.1/enum-dynamsoftbarcodereaderenumresulttype.md @@ -0,0 +1,13 @@ +# enum dynamsoft.BarcodeReader.EnumResultType + +### Description +Describes the extended result type. + +### Allowed Values + +| Member | Description | Number | +| ------------- | ------------- | ------------- | +| EDT_StandardText | Specifies the standard text. This means the barcode value. | 0 | +| EDT_RawText | Specifies the raw text. This means the text that includes start/stop characters, check digits, etc. | 1 | +| EDT_CandidateText | Specifies all the candidate text. This means all the standard text results decoded from the barcode. | 2 | +| EDT_PartialText (Not yet supported in version 6.0) | Specifies the partial Text. This means part of the text result decoded from the barcode. | 3 | \ No newline at end of file diff --git a/documents/6.4.1/enum-dynamsoftbarcodereaderenumterminatestage.md b/documents/6.4.1/enum-dynamsoftbarcodereaderenumterminatestage.md new file mode 100644 index 00000000..cf2e19f1 --- /dev/null +++ b/documents/6.4.1/enum-dynamsoftbarcodereaderenumterminatestage.md @@ -0,0 +1,13 @@ +# enum dynamsoft.BarcodeReader.EnumTerminateStage + +### Description + +Describes the stage when the results are returned. + +### Allowed Values + +| Member | Description | Number | +| ------------- | ------------- | ------------- | +| ETS_Prelocalized | Pre-localized | 0 | +| ETS_Localized | Localized | 1 | +| ETS_Recognized | Recognized | 2 | \ No newline at end of file diff --git a/documents/6.4.1/enumBarcodeInvertMode.md b/documents/6.4.1/enumBarcodeInvertMode.md new file mode 100644 index 00000000..cf4bf028 --- /dev/null +++ b/documents/6.4.1/enumBarcodeInvertMode.md @@ -0,0 +1,12 @@ +# enumBarcodeInvertMode + +### Description + +Values that represent barcode invert modes. + +### Allowed Values + +| Allowed Values | Description | +| ------------- | ------------- | +| BIM_DarkOnLight | Dark barcode region on light background. | +| BIM_LightOnDark | Light barcode region on dark background. | diff --git a/documents/6.4.1/enumColourImageConvertMode.md b/documents/6.4.1/enumColourImageConvertMode.md new file mode 100644 index 00000000..351f09ba --- /dev/null +++ b/documents/6.4.1/enumColourImageConvertMode.md @@ -0,0 +1,12 @@ +# enumColourImageConvertMode + +### Description + +Values that represent colour image convert modes + +### Allowed Values + +| Allowed Values | Description | +| ------------- | ------------- | +| CICM_Auto | Process input image as its original colour space. | +| CICM_Grayscale | Process input image with gray scale. | diff --git a/documents/6.4.1/enumRegionPredetectionMode.md b/documents/6.4.1/enumRegionPredetectionMode.md new file mode 100644 index 00000000..b2017bd6 --- /dev/null +++ b/documents/6.4.1/enumRegionPredetectionMode.md @@ -0,0 +1,12 @@ +# enumRegionPredetectionMode + +### Description + +Values that represent region predetection modes + +### Allowed Values + +| Allowed Values | Description | +| ------------- | ------------- | +| RPM_Disable | Disable region pre-detection | +| RPM_Enable | Enable region pre-detection | \ No newline at end of file diff --git a/documents/6.4.1/enumTextFilterMode.md b/documents/6.4.1/enumTextFilterMode.md new file mode 100644 index 00000000..992fdec5 --- /dev/null +++ b/documents/6.4.1/enumTextFilterMode.md @@ -0,0 +1,12 @@ +# enumTextFilterMode + +### Description + +Values that represent text filter modes + +### Allowed Values + +| Allowed Values | Description | +| ------------- | ------------- | +| TFM_Disable | Disable text filter | +| TFM_Enable | Enable text filter | \ No newline at end of file diff --git a/documents/6.4.1/error-dynamsoftbarcodereaderbarcodereaderexception.md b/documents/6.4.1/error-dynamsoftbarcodereaderbarcodereaderexception.md new file mode 100644 index 00000000..29d65970 --- /dev/null +++ b/documents/6.4.1/error-dynamsoftbarcodereaderbarcodereaderexception.md @@ -0,0 +1,6 @@ +# Error dynamsoft.BarcodeReader.BarcodeReaderException + +| feild | type | Description | +| --- | --- | --- | +| code | `number`*([dynamsoft.BarcodeReader.EnumErrorCode](enum-dynamsoftbarcodereaderenumerrorcode.md))* | The error code | +| message | `String` | The error string | \ No newline at end of file diff --git a/documents/6.4.1/function-decodebase64string.md b/documents/6.4.1/function-decodebase64string.md new file mode 100644 index 00000000..05b697af --- /dev/null +++ b/documents/6.4.1/function-decodebase64string.md @@ -0,0 +1,41 @@ +# function .decodeBase64String() + +### Description + +Decodes barcode from an image file encoded as a base64 string. + +### Syntax + +```js +.decodeBase64String(base64Str) +``` + +### Parameter + +| Parameter | Type | Description | +| --- | --- | --- | +| base64Str | `String`*(base64 with or without mime)* | | + +### Returned Value + +| Parameter | Type | Description | +| --- | --- | --- | +| *(Return value)* | `Promise(resolve(array), reject(ex))` | The array element is [TextResult](objectTextResult.md). | + +### Example + +```js +var base64str = 'data:image/png;base64,xxxxxxx'; +//with mime +reader.decodeBase64String(base64str).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + } +}); +//without mime +reader.decodeBase64String(base64str.substring(base64str.indexOf(',') + 1)).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + } +}); +``` \ No newline at end of file diff --git a/documents/6.4.1/function-decodebuffer.md b/documents/6.4.1/function-decodebuffer.md new file mode 100644 index 00000000..9df750ae --- /dev/null +++ b/documents/6.4.1/function-decodebuffer.md @@ -0,0 +1,40 @@ +# function .decodeBuffer() + +### Description + +Decodes barcodes from the memory buffer containing image pixels in defined format. + +### Syntax + +```js +.decodeBuffer(source, width, height, stride, enumImagePixelFormat) +``` + +### Parameter + +| Parameter | Type | Description | +| --- | --- | --- | +| source | `Blob` `ArrayBuffer` `Uint8Array` | The image raw buffer. | +| width | `number` | The width of the image buffer. | +| height | `number` | The height of the image buffer. | +| stride | `number` | The stride width (also called scan width) of the image buffer. | +| enumImagePixelFormat | `number`*([dynamsoft.BarcodeReader.EnumImagePixelFormat](enum-dynamsoftbarcodereaderenumimagepixelformat.md))* | The pixel format of the image buffer. | + +### Returned Value + +| Type | Description | +| --- | --- | +| `Promise(resolve(array), reject(ex))` | The array element is [TextResult](objectTextResult.md). | + +### Example + +```js +var rawImgData = new Blob(['xxxxxxx']); +var width = 100; +var height = 200; +reader.decodeBuffer(rawImgData, width, height, width * 4, dynamsoft.BarcodeReader.EnumImagePixelFormat.IPF_ARGB_8888).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + } +}) +``` diff --git a/documents/6.4.1/function-decodefileinmemory.md b/documents/6.4.1/function-decodefileinmemory.md new file mode 100644 index 00000000..d4d01d2d --- /dev/null +++ b/documents/6.4.1/function-decodefileinmemory.md @@ -0,0 +1,34 @@ +# function .decodeFileInMemory() + +### Description + +Decodes barcodes from an image file in memory. + +### Syntax + +```js +.decodeFileInMemory(source) +``` + +### Parameter + +| parameter | type | Description | +| --- | --- | --- | +| source | `Blob` `ArrayBuffer` `Uint8Array` `HTMLImageElement` `HTMLCanvasElement` `HTMLVideoElement` `String`*(base64 with mime)* `String`*(url)* | The image to be decode, supporting png, jpeg, bmp and gif. | + +### Returned Value + +| Parameter | Type | Description | +| *(Return value)* | `Promise(resolve(array), reject(ex))` | The array element is like [TextResult](objectTextResult.md). | + +### Example + +```js +reader.decodeFileInMemory('./imgs/example.png').then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + // Confidence >= 30 is reliable + console.log(results[i].LocalizationResult.ExtendedResultArray[0].Confidence); + } +}) +``` \ No newline at end of file diff --git a/documents/6.4.1/function-decodevideo.md b/documents/6.4.1/function-decodevideo.md new file mode 100644 index 00000000..d01e817f --- /dev/null +++ b/documents/6.4.1/function-decodevideo.md @@ -0,0 +1,35 @@ +# function .decodeVideo() + +### Description + +A useful function when you want to decode video. It uses built-in [drawImage](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage) before decoding. + +### Syntax + +```js +.decodeVideo(video) +``` + +### Parameter + +| Parameter | Type | Description | +| --- | --- | --- | +| video | `HTMLVideoElement` | | + +### Returned Value + +| Type | Description | +| --- | --- | +| `Promise(resolve(array), reject(ex))` | The array element is [TextResult](objectTextResult.md). | + +### Example + +```js +reader.decodeVideo(video).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + // If Confidence >= 30, the result is reliable. + console.log(results[i].LocalizationResult.ExtendedResultArray[0].Confidence); + } +}) +``` \ No newline at end of file diff --git a/documents/6.4.1/function-decodevideo1.md b/documents/6.4.1/function-decodevideo1.md new file mode 100644 index 00000000..2e735437 --- /dev/null +++ b/documents/6.4.1/function-decodevideo1.md @@ -0,0 +1,50 @@ +# function .decodeVideo() + +### Description + +A useful function when you want to decode video. It uses built-in [drawImage](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage) before decoding. + +### Syntax + +```js +.decodeVideo(video, sx, sy, sWidth, sHeight, dWidth, dHeight) +``` + +### Parameter + +| parameter | type | Description | +| --- | --- | --- | +| video | `HTMLVideoElement` | | +| sx | `number` | | +| sy | `number` | | +| sWidth | `number` | | +| sHeight | `number` | | +| dWidth | `number` | | +| dHeight | `number` | | + +### Returned Value + +| Type | Description | +| --- | --- | +| `Promise(resolve(array), reject(ex))` | The array element is [TextResult](objectTextResult.md). | + +### Example + +```js +// decode a region in video to speed up decoding +var vw = video.videoWidth; +var vh = video.videoHeight; +var vw_2 = Math.round(vw * 0.2); +var vh_2 = Math.round(vh * 0.2); +var vw_6 = Math.round(vw * 0.6); +var vh_6 = Math.round(vh * 0.6); +reader.decodeVideo(video, vw_2, vh_2, vw_6, vh_6, vw_6, vh_6).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + } +}) +``` + +### See Also + +[drawImage](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage))* \ No newline at end of file diff --git a/documents/6.4.1/function-decodevideo2.md b/documents/6.4.1/function-decodevideo2.md new file mode 100644 index 00000000..8c5cf3fe --- /dev/null +++ b/documents/6.4.1/function-decodevideo2.md @@ -0,0 +1,46 @@ +# function .decodeVideo() + +### Description + +A useful function when you want to decode video. It uses built-in [drawImage](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage) before decoding. + +### Syntax + +```js +.decodeVideo(video, dWidth, dHeight) +``` + +### Parameter + +| parameter | type | Description | +| --- | --- | --- | +| video | `HTMLVideoElement` | | +| dWidth | `number` | | +| dHeight | `number` | | + +### Returned Value + +| Type | Description | +| --- | --- | +| `Promise(resolve(array), reject(ex))` | The array element is [TextResult](objectTextResult.md). | + +### Example + +```js +// decode a region in video to speed up decoding +var vw = video.videoWidth; +var vh = video.videoHeight; +var vw_2 = Math.round(vw * 0.2); +var vh_2 = Math.round(vh * 0.2); +var vw_6 = Math.round(vw * 0.6); +var vh_6 = Math.round(vh * 0.6); +reader.decodeVideo(video, vw_2, vh_2, vw_6, vh_6, vw_6, vh_6).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + } +}) +``` + +### See Also + +[drawImage](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage))* \ No newline at end of file diff --git a/documents/6.4.1/function-deleteinstance.md b/documents/6.4.1/function-deleteinstance.md new file mode 100644 index 00000000..602c5075 --- /dev/null +++ b/documents/6.4.1/function-deleteinstance.md @@ -0,0 +1,17 @@ +# function .deleteInstance() + +### Description + +Release `BarcodeReader` when it will not be used again. + +### Syntax + +```js +.deleteInstance() +``` + +### Example + +```js +reader.deleteInstance(); +``` \ No newline at end of file diff --git a/documents/6.4.1/function-dynamsoftbarcodereaderloadwasm.md b/documents/6.4.1/function-dynamsoftbarcodereaderloadwasm.md new file mode 100644 index 00000000..59dfa612 --- /dev/null +++ b/documents/6.4.1/function-dynamsoftbarcodereaderloadwasm.md @@ -0,0 +1,21 @@ +# function dynamsoft.BarcodeReader.loadWasm() + +### Description + +Load the DBR-WASM manually. + +### Syntax + +```js +dynamsoft.BarcodeReader.loadWasm() +``` + +### Returned Value + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `Promise(resolve(null), reject(ex))` | + +### Remarks + +Only need to call manually when you set `dynamsoft.dbrEnv.bAutoLoadWasm` as `false`. \ No newline at end of file diff --git a/documents/6.4.1/function-getalllocalizationresults.md b/documents/6.4.1/function-getalllocalizationresults.md new file mode 100644 index 00000000..b7945978 --- /dev/null +++ b/documents/6.4.1/function-getalllocalizationresults.md @@ -0,0 +1,18 @@ +# function .getAllLocalizationResults() + +### Description + +Gets all localization barcode results. It contains all recognized barcodes and unrecognized barcodes. + +### Syntax + +```js +.getAllLocalizationResults() +``` + +### Returned Value + +| parameter | type | Description | +| --- | --- | --- | +| *(Return value)* | `array` | The array element is like [LocalizationResult](objectLocalizationResult.html). | + diff --git a/documents/6.4.1/functiongetruntimesettings.md b/documents/6.4.1/functiongetruntimesettings.md new file mode 100644 index 00000000..4931d7ed --- /dev/null +++ b/documents/6.4.1/functiongetruntimesettings.md @@ -0,0 +1,41 @@ +#function .getRuntimeSettings() + +### Description + +Gets current settings and saves it into a struct. + +### Syntax + +```js +.getRuntimeSettings()` +``` + +### Returned value + +| parameter | type | Description | +| --- | --- | --- | +|Returned value| `PlainObject` | an object of [PublicRuntimeSettings](PublicRuntimeSettings.md)* | + +### Example + +```js +//get the settings +var settings = reader.getRuntimeSettings(); +//modify it +settings.mExpectedBarcodesCount = 3; +//update the settings +reader.updateRuntimeSettings(settings); +//read using the new settings +reader.decodeFileInMemory('img/example.png').then(result=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + } + //reset settings + reader.resetRuntimeSettings(); +}); +``` + +### See Also + +* [function .updateRuntimeSettings()](functionupdateruntimesettings.md) +* [function .resetRuntimeSettings()](function-resetruntimesettings.md) diff --git a/documents/6.4.1/functionresetruntimesettings.md b/documents/6.4.1/functionresetruntimesettings.md new file mode 100644 index 00000000..2ca26af5 --- /dev/null +++ b/documents/6.4.1/functionresetruntimesettings.md @@ -0,0 +1,22 @@ +#function .resetRuntimeSettings() + +### Description + +Resets all parameters to default values. + +### Syntax + +```js +.resetRuntimeSettings() +``` + +### Returned Value + +```js +undefined +``` + +### See Also + +* [function .getRuntimeSettings()](functiongetruntimesettings.md) +* [function .updateRuntimeSettings()](functionupdateruntimesettings.md) \ No newline at end of file diff --git a/documents/6.4.1/functionupdateruntimesettings.md b/documents/6.4.1/functionupdateruntimesettings.md new file mode 100644 index 00000000..c28fad69 --- /dev/null +++ b/documents/6.4.1/functionupdateruntimesettings.md @@ -0,0 +1,49 @@ +#function .updateRuntimeSettings() + +### Description + +Updates runtime settings with a given struct. + + +### Syntax + +```js +.updateRuntimeSettings(settings) +``` + +### Parameter + +| parameter | type | Description | +| --- | --- | --- | +| settings | a `String`*(json)*, a `PlainObject` | The struct of template settings. | + +### Returned value + +```js +Promise(resolve(), reject(ex)) +``` + +### Example + +```js +//get the settings +var settings = reader.getRuntimeSettings(); +//modify it +settings.mExpectedBarcodesCount = 3; +//update the settings +reader.updateRuntimeSettings(settings).then(()=>{ + return reader.decodeFileInMemory('./imgs/example.png'); +}).then(results=>{ + for(var i = 0; i < results.length; ++i){ + console.log(results[i].BarcodeText); + // If Confidence >= 30, the barcode results are reliable + console.log(results[i].LocalizationResult.ExtendedResultArray[0].Confidence); + } + reader.resetRuntimeSettings(); +}); +``` + +### See Also + +* [function .getRuntimeSettings()](functiongetruntimesettings.md) +* [function .resetRuntimeSettings()](functionresetruntimesettings.md) diff --git a/documents/6.4.1/guide-original.md b/documents/6.4.1/guide-original.md new file mode 100644 index 00000000..a6b4ceb6 --- /dev/null +++ b/documents/6.4.1/guide-original.md @@ -0,0 +1,234 @@ +# guide + +- [Guide](guide-original.md) +- [API](api-original.md) + +
+ +## Helloworld + +Just copy into a html file and run it from file browser. + +```html + + + +
loading...
+ + + + + +``` + +
+ +## Introduction + +`DBR_WASM` uses [Webassembly](https://developer.mozilla.org/en-US/docs/WebAssembly) technology which requires a higher browser version. + +> ### Browser compatibility +> +> Firefox performs best on both desktop and mobile. +> +> | browser | min version | +> |-|-| +> | Chrome | 57 | +> | Firefox | 52 | +> | Edge | 16 | +> | Safari* | 11 | +> | Internet Explorer | not supported | +> +> The Webassembly compiles really slow in Safari for IOS according to our tests. + +In most browsers, you need to deploy page **to the site** and set `.wasm` mimetype to `application/wasm` on the server side to debug and run it. + +> Since 6.3.0.1, we include `dbr-.min.js` and `dbr-.wasm` in samples by linking the resources to [online demo](https://demo.dynamsoft.com/dbr_wasm/barcode_reader_javascript.html). +> +> Thus you could open most samples directly from the file browser now. +> +> The cdn is for evaluation purposes and it is not recommended for use in production environments. +> +> You can get the resources in [Dist](https://github.com/dynamsoft-dbr/javascript-barcode/tree/master/dist) folder. + +Please check the settings below for different environments. + +* set mimetype in nginx: [mime.types](https://www.nginx.com/resources/wiki/start/topics/examples/full/#mime-types) + +* set mimetype in asp.net: [Web.config](https://github.com/dynamsoft-dbr/javascript-barcode/blob/master/documents/conf/Web.config) + +* set mimetype in javaee web app: [web.xml](https://github.com/dynamsoft-dbr/javascript-barcode/blob/master/documents/conf/web.xml) + +* set mimetype in nodejs: [npm mime](https://github.com/broofa/node-mime) + +On Firefox, you can open [decodeFileInMemory.html](../Samples/decodeFileInMemory/decodeFileInMemory.html) and debug/run directly from the file browser. + +You may encounter this error when you run several other samples with video: + +> [Deprecation] getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details. + +That's because most browsers today need to be deployed on https to use [getUserMedia](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia). Below are some samples for configuring an HTTPS server. + +* nginx: [Configuring HTTPS servers](https://nginx.org/en/docs/http/configuring_https_servers.html) + +* iis: [Create a Self Signed Certificate in IIS](https://aboutssl.org/how-to-create-a-self-signed-certificate-in-iis/) + +* tomcat: [Setting Up SSL on Tomcat in 5 minutes](https://dzone.com/articles/setting-ssl-tomcat-5-minutes) + +* nodejs: [npm tls](https://nodejs.org/docs/v0.4.1/api/tls.html) + +If you really need to access video on an http site, you can use our [DCS](https://www.dynamsoft.com/Products/webcam-sdk-features.aspx) product. + +> ### For mobile browser +> +> If you want to use DBR_WASM on your mobile browser (most developers is under this usage scenario), you need to be aware that the mobile devices' memory is very limited. +> +> Before decoding a large image, you'd better intercept or compress the image. It will prevent your site from crash though the decode rate will decrease. +> +> We provide a special interface for processing video [decodeVideo](api-original.md?#function-decodevideo) to capture and decode a small area of the video on the video. +> +> e.g. In [our demo](https://github.com/dynamsoft-dbr/javascript-barcode/tree/master/examples/decodeVideoWithSettings), we crop a region of the video in mobile browser by default. + +
+ +## Load + +Put `dbr-.min.js` and `dbr-.wasm` in the same directory as your html page. Then, add the following code to the page. + +```html + +``` + +Now, you can load `DBR_WASM` to your application. + +Note: +Since the initialization is asynchronous, in order to get the information of the initiating completed accurately, it's better to add the following code: + +```html +
loading...
+ +``` + +You can now open the page and run it. It will take a long time to load the page for the first time. Because `dbr-.min.js` will execute to download the whole `dbr-.wasm` file and compile it. Please wait patiently for the loading to finish. + +After loading successfully, if the browser supports [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API), we will try to store the compiled result of `dbr-.wasm` or the file itself in the browser cache locally. The workflow is as below. + +First we will try to store the compiled result of the `WebAssembly.Module` type (currently only supported in FireFox and Edge, and other browsers will probably also add this feature in the future). The next time the page is loaded, it can be completed within seconds. + +If the browsers don't support it, we will save the `dbr-.wasm` file itself. It will take some time to compile when initializing next time. At least there is no need to download it again. + +### Debug Tool + +We insert a debug tool in our samples, you could click the button `console` in top right of the screen. + +You could find dbr wasm version, initialization process and other useful info. + +
+ +## Process the uploaded images + +Please add an `input` lable to listen to `change` event so you can decode the uploaded images like the following. + +```html + + +``` + +You will also need to set `licenseKey` in the below line. Click [the link](https://www.dynamsoft.com/CustomerPortal/Portal/TrialLicense.aspx) to get a try one. + +```js +dynamsoft.dbrEnv.licenseKey = "
" +``` + +
+ +## Try and do it + +Try to write your own page or visit [helloworld.html](https://github.com/dynamsoft-dbr/javascript-barcode/tree/master/examples/decodeFileInMemory) directly. + +If there is any questions, please feel free to contact
support@dynamsoft.com. + +
+ +## [Deprecated] dbr-6.3.0.1 comparison between two builds + +In version 6.3.0.1, our team compiled the C++ module of Dynamsoft Barcode Reader to WebAssembly, so that users can scan barcode with JavaScript at client-side. The new JavaScript edition is not matured, in that we are still juggling between speed and stability. Currently we are releasing it as a preview, with two builds. + +Here is a comparison chart between the two: + +| |dbr-6.3.0.1 |dbr-6.3.0.1.mobile | +|- |- |- | +|arguments for compiling to .wasm |allowed C++ try-catch |disable C++ try-catch | +|size of .wasm |5.47M |4.02M | +|download at initial visit1 |depends on network |depends on network | +|browser compile speed2 |slow |quick | +|memory needed during compiling |large |medium | +|exceptions during reading |really few |medium | +|memory leak3 |almost no memory leak |possible | +|decode success rate |high |medium | +|decode upload image |suitable |not suitable | +|one-off decoding in a video stream |suitable |suitable | +|continuous scan in a video stream |suitable |not suitable | + +Note: + +1. Users only need to download the `.wasm` files at their first visit. +2. With Firefox and Edge, the browser supports caching compiled WebAssembly modules to `IndexedDB`, which allows users to store structured data on the client-side. So, from the second visit forward, the browser can finish page loading in a split second by retrieving the module file.
+ Chrome and Safari do not support the aforementioned caching mechanism. We can store the `.wasm` file to `IndexedDB`, but not the compiled module file. So compilation is required at every visit. +3. The mobile version skipped compilation of `try...catch` in C++ code, so some exceptions failed to be caught, resulting in possible memory leaks. When the memory leaks to a certain extent, the barcode scanning module will stop working due to insufficient memory. The leaked memory can be released when leaving or refreshing the web page. Therefore, the mobile version is not suitable for continuous decoding, but it can be used for one-off decoding. + +In the next step, we will reduce the dependency on try...catch in C++ so as to combine the two versions into one, and work out a version that is fast to load and has a stable decoding capability. + +### Update 2018-11-29 + +Since version 6.4.1.0, we have combined the two build. diff --git a/documents/6.4.1/guide.md b/documents/6.4.1/guide.md new file mode 100644 index 00000000..d2a2a5c2 --- /dev/null +++ b/documents/6.4.1/guide.md @@ -0,0 +1,100 @@ +# guide + +### Init DBR_WASM + +Add the related files to your application + +First, put `dbr-.min.js` and `dbr-.wasm` in the same directory as your html page. Then, add the following code to the page. + +```html + +``` + +Now, you can load `DBR_WASM` to your application. + +Note: +Since the initialization is asynchronous, in order to get the information of the initiating completed accurately, it's better to add the following code + +```html +
loading...
+ +``` + +You can now open the page and run it. It will take a long time to load the page for the first time. Because `dynamsoft.barcodereader.min.js` will execute to download the whole `dynamsoft.barcodereader.wasm` file and compile it. Please wait patiently for the loading to finish. + +After loading successfully, if the browser supports [indexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API), we will try to store the compiled result of `dynamsoft.barcodereader.wasm` or the file itself in the browser cache locally. The workflow is as below. + +First we will try to store the compiled result of the `WebAssembly.Module` type (currently only supported in FireFox and Edge, and other browsers will probably also add this feature in the future). The next time the page is loaded, it can be completed within seconds. + +If the browsers don't support it, we will save the `dynamsoft.barcodereader.wasm` file itself. It will take some time to compile when initializing next time. At least there is no need to download it again. + +### Process the uploaded images + +Please add an `input` lable to listen to `change` event so you can decode the uploaded images like the following. + +```html + + +``` + +You will also need to set `licenseKey` in the below line. Click [the link](https://www.dynamsoft.com/CustomerPortal/Portal/TrialLicense.aspx) to get a try one. + +```js +dynamsoft.dbrEnv.licenseKey = "" +``` + +## Try and do it + +Try to write your own page. If there are any questions, please feel free to contact support@dynamsoft.com. diff --git a/documents/6.4.1/mAntiDamageLevel.md b/documents/6.4.1/mAntiDamageLevel.md new file mode 100644 index 00000000..f861a62e --- /dev/null +++ b/documents/6.4.1/mAntiDamageLevel.md @@ -0,0 +1,27 @@ +# mAntiDamageLevel + +The degree of anti-damage of the barcode. This value decides how many localization algorithms will be used. To ensure the best results, the value of AntiDamageLevel is suggested to be set to 9 if the ExpectedBarcodesCount is set to 0 or 1; otherwise, the value of AntiDamageLevel is suggested to be set to 7. + +### Presence + +Optional + +### Type + +number + +### Values + +[0,9] + +### Default Value + +9 + +### Example + +```JSON +{ + "AntiDamageLevel": 9 +} +``` diff --git a/documents/6.4.1/mBarcodeFormatIds.md b/documents/6.4.1/mBarcodeFormatIds.md new file mode 100644 index 00000000..a4eca44c --- /dev/null +++ b/documents/6.4.1/mBarcodeFormatIds.md @@ -0,0 +1,66 @@ +# mBarcodeFormatIds + +Sets which types of barcode to be read. Barcode types can be combined as an array. For example, if you want to choose Code_39 and Code_93, you can set it to ["CODE_39", "CODE_93"]. + +### Presence + +Optional + +### Type + +Array + +### Values + +```Csharp +enum BarcodeFormat +{ + All = 503317503, + OneD = 1023, + CODE_39 = 1, + CODE_128 = 2, + CODE_93 = 4, + CODABAR = 8, + ITF = 16, + EAN_13 = 32, + EAN_8 = 64, + UPC_A = 128, + UPC_E = 256, + INDUSTRIAL_25 = 512, + PDF417 = 33554432, + QR_CODE = 67108864, + DATAMATRIX = 134217728, + AZTEC = 268435456 +} +``` + +```JSON +"All", +"AZTEC", +"CODABAR", +"CODE_128", +"CODE_39", +"CODE_93", +"DATAMATRIX", +"EAN_13", +"EAN_8", +"INDUSTRIAL_25", +"ITF", +"OneD", +"PDF417", +"QR_CODE", +"UPC_A", +"UPC_E" +``` + +### Default Value + +"All" + +### Example + +```JSON +{ + "BarcodeFormatIds": ["OneD", "DATAMATRIX"], +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mBarcodeInvertMode.md b/documents/6.4.1/mBarcodeInvertMode.md new file mode 100644 index 00000000..3fe07ce8 --- /dev/null +++ b/documents/6.4.1/mBarcodeInvertMode.md @@ -0,0 +1,38 @@ +# mBarcodeInvertMode + +The ink colour for barcodes search. + +### Presence + +Optional + +### Type + +number, string + +### Values + +```CSharp +enum BarcodeInvertMode +{ + BIM_DarkOnLight, + BIM_LightOnDark +} +``` + +```JSON +"DarkOnLight" +"LightOnDark" +``` + +### Default Value + +"DarkOnLight" + +### Example + +```JSON +{ + "BarcodeInvertMode": "DarkOnLight" +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mBinarizationBlockSize.md b/documents/6.4.1/mBinarizationBlockSize.md new file mode 100644 index 00000000..53b97ef3 --- /dev/null +++ b/documents/6.4.1/mBinarizationBlockSize.md @@ -0,0 +1,27 @@ +# mBinarizationBlockSize + +Sets the block size for the process of binarization. Block size means the size of a pixel neighbourhood that is used to calculate a threshold value for the pixel. + +### Presence + +Optional + +### Type + +number + +### Values + +[0,1000] + +### Default Value + +0 + +### Example + +```JSON +{ + "BinarizationBlockSize": 60 +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mColourImageConvertMode.md b/documents/6.4.1/mColourImageConvertMode.md new file mode 100644 index 00000000..aa09d2c2 --- /dev/null +++ b/documents/6.4.1/mColourImageConvertMode.md @@ -0,0 +1,38 @@ +# mColourImageConvertMode + +Sets whether to convert colour images. Recommend setting it to "Auto" if you want to pre-detect the barcode regions. + +### Presence + +Optional + +### Type + +string, number + +### Values + +```CSharp +enum ColourImageConvertMode +{ + CICM_Auto = 0, + CICM_Grayscale = 1 +} +``` + +```JSON +"Auto", +"Grayscale" +``` + +### Default Value + +"Auto" + +### Example + +```JSON +{ + "ColourImageConvertMode": "Auto" +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mDeblurLevel.md b/documents/6.4.1/mDeblurLevel.md new file mode 100644 index 00000000..47d37355 --- /dev/null +++ b/documents/6.4.1/mDeblurLevel.md @@ -0,0 +1,27 @@ +# mDeblurLevel + +The degree of blurriness of the barcode. The higher value you set, the much more effort the library will take to decode images, but it may also slow down the recognition process. + +### Presence + +Optional + +### Type + +number + +### Values + +[0,9] + +### Default Value + +9 + +### Example + +```JSON +{ + "DeblurLevel": 5 +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mEnableFillBinaryVacancy.md b/documents/6.4.1/mEnableFillBinaryVacancy.md new file mode 100644 index 00000000..7d1fc888 --- /dev/null +++ b/documents/6.4.1/mEnableFillBinaryVacancy.md @@ -0,0 +1,27 @@ +# mEnableFillBinaryVacancy + +For barcodes with a large module size there might be a vacant area in the position detection pattern after binarization which may result in a decoding failure. Setting this to true will fill in the vacant area with black and may help to decode it successfully. + +### Presence + +Optional + +### Type + +bool, number (0,1) + +### Values + +1 for true, 0 for false. + +### Default Value + +true + +### Example + +```JSON +{ + "EnableFillBinaryVacancy": true +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mExpectedBarcodesCount.md b/documents/6.4.1/mExpectedBarcodesCount.md new file mode 100644 index 00000000..065fd394 --- /dev/null +++ b/documents/6.4.1/mExpectedBarcodesCount.md @@ -0,0 +1,33 @@ +# mExpectedBarcodesCount + +The expected number of barcodes to read for each image (or each region of the image if you specified barcode regions). + +### Presence + +Optional + +### Type + +number + +### Values + +[0,0x7fffffff] + +### Default Value + +0 + +### Remarks + +0: means Unknown and it will find at least one barcode. +1: try to find one barcode. If one barcode is found, the library will stop localization process and perform barcode decoding. +n: try to find n barcodes. If the library only finds m (m < n) barcode, it will try different algorithms till n barcodes are found or all algorithms are used. + +### Example + +```JSON +{ + "ExpectedBarcodesCount": 5 +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mGrayEqualizationSensitivity.md b/documents/6.4.1/mGrayEqualizationSensitivity.md new file mode 100644 index 00000000..ea3fb686 --- /dev/null +++ b/documents/6.4.1/mGrayEqualizationSensitivity.md @@ -0,0 +1,27 @@ +# mGrayEqualizationSensitivity + +Sets the sensitivity used for gray equalization. The higher the value, the more likely gray equalization will be activated. Effective for images with low comparison between black and white colour. May cause adverse effect on images with high level of black and white colour comparison. + +### Presence + +Optional + +### Type + +number + +### Values + +[0,9] + +### Default Value + +0 + +### Example + +```JSON +{ + "GrayEqualizationSensitivity": 0 +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mLocalizationAlgorithmPriority.md b/documents/6.4.1/mLocalizationAlgorithmPriority.md new file mode 100644 index 00000000..e09bd589 --- /dev/null +++ b/documents/6.4.1/mLocalizationAlgorithmPriority.md @@ -0,0 +1,57 @@ +# mLocalizationAlgorithmPriority + +Sets the priority of localization algorithms. + +### Presence + +Optional + +### Type + +Array + +### Values + +```CSharp +enum EnumLocalizationAlgorithmPriority +{ + ELAP_ConnectedBlock =1, + ELAP_Statistics=2, + ELAP_Lines= 3, + ELAP_FullImageAsBarcodeZone=4, +} +``` + +```JSON +"ConnectedBlock", +"Statistics", +"Lines", +"FullImageAsBarcodeZone" +``` + +### Default Value + +"" + +### Remarks + +**Default value** "": The library will automatically select optimized localization algorithm for your barcode image. The order for each image might be different. + +**ConnectedBlock**: Localizes barcodes by searching connected blocks. This algorithm usually gives best result and it is recommended to set ConnectedBlock to the highest priority. + +**Lines**: Localizes barcodes by searching for groups of lines. This is optimized for 1D and PDF417 barcodes. + +**Statistics**: Localizes barcodes by groups of contiguous black-white regions. This is optimized for QRCode and DataMatrix. + +**FullImageAsBarcodeZone**: Disables localization. In this mode, it will directly localize barcodes on the full image without localization. If there is nothing other than the barcode in the image, it is recommended to use this mode. If there are regions defined or detected, those regions will be used to decode directly rather than the whole image. + +- If [TextFilterMode](TextFilterMode.md) is set to disable, localization by Lines must be set after localization by Connected Block to ensure some corresponding functions working correctly. +- If only Lines is chosen to be used for localization, [TextFilterMode](TextFilterMode.md) must be activated (i.e. be set to enable). + +### Example + +```JSON +{ + "LocalizationAlgorithmPriority": ["ConnectedBlock", "Lines", "Statistics", "FullImageAsBarcodeZone"], +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mMaxAlgorithmThreadCount.md b/documents/6.4.1/mMaxAlgorithmThreadCount.md new file mode 100644 index 00000000..c47060e8 --- /dev/null +++ b/documents/6.4.1/mMaxAlgorithmThreadCount.md @@ -0,0 +1,31 @@ +# mMaxAlgorithmThreadCount + +Sets how many image processing algorithm threads will be used to decode barcodes. + +### Presence + +Optional + +### Type + +number + +### Values + +[1,4] + +### Default Value + +4 + +### Remarks + +By default, our library concurrently runs four different threads for decoding barcodes in order to keep a balance between speed and quality. For some devices (e.g. Raspberry Pi) that is only using one core, you can set it to 1 for best speed. + +### Example + +```JSON +{ + "MaxAlgorithmThreadCount": 4, +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mMaxBarcodesCount.md b/documents/6.4.1/mMaxBarcodesCount.md new file mode 100644 index 00000000..5d574cc9 --- /dev/null +++ b/documents/6.4.1/mMaxBarcodesCount.md @@ -0,0 +1,27 @@ +# mMaxBarcodesCount + +Sets the maximum number of barcodes to read. + +### Presence + +Optional + +### Type + +number + +### Values + +[1,0x7fffffff] + +### Default Value + +0x7fffffff + +### Example + +```JSON +{ + "MaxBarcodesCount": 10, +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mMaxImageDimensionToLocalizeBarcodesOnFullImage.md b/documents/6.4.1/mMaxImageDimensionToLocalizeBarcodesOnFullImage.md new file mode 100644 index 00000000..e732f48e --- /dev/null +++ b/documents/6.4.1/mMaxImageDimensionToLocalizeBarcodesOnFullImage.md @@ -0,0 +1,29 @@ +# mMaxImageDimensionToLocalizeBarcodesOnFullImage + +The maximum dimension of full image as barcode zone. + +Sets the maximum image dimension (in pixels) to localize barcode on the full image. If the image dimension is smaller than the given value, the library will localize barcode on the full image. Otherwise, "FullImageAsBarcodeZone" mode will not be enabled. + +### Presence + +Optional + +### Type + +number + +### Values + +[261244,0x7fffffff] + +### Default Value + +261244 + +### Example + +```JSON +{ + "MaxImageDimensionToLocalizeBarcodesOnFullImage": 261244 +} +``` diff --git a/documents/6.4.1/mPDFRasterDPI.md b/documents/6.4.1/mPDFRasterDPI.md new file mode 100644 index 00000000..31dba47d --- /dev/null +++ b/documents/6.4.1/mPDFRasterDPI.md @@ -0,0 +1,27 @@ +# mPDFRasterDPI + +Sets the output image resolution. When you are trying to decode a PDF file using DecodeFile method, the library will convert the pdf file to image(s) first, then perform barcode recognition. + +### Presence + +Optional + +### Type + +number + +### Values + +[100-600] + +### Default Value + +300 + +### Example + +```JSON +{ + "PDFRasterDPI": 300 +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mRegionPredetectionMode.md b/documents/6.4.1/mRegionPredetectionMode.md new file mode 100644 index 00000000..7bbb4622 --- /dev/null +++ b/documents/6.4.1/mRegionPredetectionMode.md @@ -0,0 +1,42 @@ +# mRegionPredetectionMode + +Sets the region pre-detection mode for barcodes search. If you want to pre-detect barcode regions, it is better to set the [ColourImageConvertMode](ColourImageConvertMode.md) to "Auto". + +### Presence + +Optional + +### Type + +number, String + +### Values + +```CSharp +enum RegionPredetectionMode +{ + RPM_Disable = 1, + RPM_Enable = 2 +} +``` + +```JSON +"Disable", +"Enable" +``` + +### Default Value + +"Disable" + +### Remarks + +**RPM_Disable**: Disable the feature of pre-detecting barcode regions. +**RPM_Enable**: Detects barcode region based on statistical properties of pixel colours, which is used to speed up barcode localization. + +### Example +```JSON +{ + "RegionPredetectionMode": "Enable", +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mReserved.md b/documents/6.4.1/mReserved.md new file mode 100644 index 00000000..087aaa70 --- /dev/null +++ b/documents/6.4.1/mReserved.md @@ -0,0 +1,5 @@ +# mReserved + +Reserved memory for struct. + +The length of this array indicates the size of the memory reserved for this struct. diff --git a/documents/6.4.1/mScaleDownThreshold.md b/documents/6.4.1/mScaleDownThreshold.md new file mode 100644 index 00000000..0be18c8e --- /dev/null +++ b/documents/6.4.1/mScaleDownThreshold.md @@ -0,0 +1,27 @@ +# mScaleDownThreshold + +Sets the threshold value of the image shrinking. If the shorter edge size is larger than the given value, the library will calculate the required height and width of the barcode image and shrink the image to that size before localization. Otherwise, it will perform barcode localization on the original image. + +### Presence + +Optional + +### Type + +number + +### Values + +[512, 0x7fffffff] + +### Default Value + +2300 + +### Example + +```JSON +{ + "ScaleDownThreshold": 3400, +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mTextFilterMode.md b/documents/6.4.1/mTextFilterMode.md new file mode 100644 index 00000000..25330a00 --- /dev/null +++ b/documents/6.4.1/mTextFilterMode.md @@ -0,0 +1,42 @@ +# mTextFilterMode + +Sets the text filter mode for barcodes search. + +### Presence + +Optional + +### Type + +number, String + +### Values + +```CSharp +enum TextFilterMode +{ + TFM_Disable = 1, + TFM_Enable = 2 +} +``` + +```JSON +"Disable", +"Enable", +``` + +### Default Value + +"Enable" + +### Remarks + +If the barcode image contains lots of texts, filtering texts can speed up the recognition process. + +### Example + +```JSON +{ + "TextFilterMode": "Enable", +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mTextureDetectionSensitivity.md b/documents/6.4.1/mTextureDetectionSensitivity.md new file mode 100644 index 00000000..95fdc53d --- /dev/null +++ b/documents/6.4.1/mTextureDetectionSensitivity.md @@ -0,0 +1,27 @@ +# mTextureDetectionSensitivity + +Sets the sensitivity for texture detection. The higher value you set, the more efforts it will take to detect texture. + +### Presence + +Optional + +### Type + +number + +### Values + +[0,9] + +### Default Value + +5 + +### Example + +```JSON +{ + "TextureDetectionSensitivity": 5, +} +``` \ No newline at end of file diff --git a/documents/6.4.1/mTimeout.md b/documents/6.4.1/mTimeout.md new file mode 100644 index 00000000..49d6d192 --- /dev/null +++ b/documents/6.4.1/mTimeout.md @@ -0,0 +1,27 @@ +# mTimeout + +Sets the maximum amount of time (in milliseconds) it should spend searching for a barcode per page. It does not include the time taken to load/decode an image (Tiff, PNG, etc) from disk into memory. + +### Presence + +Optional + +### Type + +number + +### Values + +[0,7fffffff] + +### Default Value + +10000 + +### Example + +```JSON +{ + "Timeout": 10000, +} +``` \ No newline at end of file diff --git a/documents/6.4.1/object-dynamsoftdbrenv.md b/documents/6.4.1/object-dynamsoftdbrenv.md new file mode 100644 index 00000000..0e1836e1 --- /dev/null +++ b/documents/6.4.1/object-dynamsoftdbrenv.md @@ -0,0 +1,25 @@ +# object dynamsoft.dbrEnv + +*example:* +```js +// All the settings are optional, even dynamsoft and dynamsoft.dbrEnv. +dynamsoft = self.dynamsoft || {}; +dynamsoft.dbrEnv = dynamsoft.dbrEnv || {}; +dynamsoft.dbrEnv.licenseKey = "", +// The default value is true. It wll load the wasm files automatically. +// If you want to load the file manually, please set it to false before loading "dbr-.min.js" +// and call dynamsoft.BarcodeReader.loadWasm when needed. +dynamsoft.dbrEnv.bAutoLoadWasm = true; +// The default value is false. You can set it to true to decode in another thread so the UI won't stuck. +dynamsoft.dbrEnv.bUseWorker = false; +// By default, js will load `dbr-.wasm` in the same folder as the context. +// Modify this setting when you put `dbr-.wasm` somewhere else. +// e.g. Set this as 'js' when you place `dbr-.wasm` at 'js/'. +dynamsoft.dbrEnv.resourcesPath = 'js'; +dynamsoft.dbrEnv.onAutoLoadWasmSuccess: function(){ + console.log("success"); +}; +dynamsoft.dbrEnv.onAutoLoadWasmError: function(status){ + console.log("error"); +}; +``` \ No newline at end of file diff --git a/documents/6.4.1/objectLocalizationResult.md b/documents/6.4.1/objectLocalizationResult.md new file mode 100644 index 00000000..2c88d86c --- /dev/null +++ b/documents/6.4.1/objectLocalizationResult.md @@ -0,0 +1,71 @@ +# LocalizationResult + +Stores the localization result including the boundary, the angle, the page number, the region name, etc. + +### Syntax + +```C +typedef struct tagSLocalizationResult +{ + TerminateStage emTerminateStage; + + BarcodeFormat emBarcodeFormat; + + const char* pszBarcodeFormatString; + + int iX1; + + int iY1; + + int iX2; + + int iY2; + + int iX3; + + int iY3; + + int iX4; + + int iY4; + + int iAngle; + + int iModuleSize; + + int iPageNumber; + + const char* pszRegionName; + + const char* pszDocumentName; + + int nResultsCount; + + PSExtendedResult* ppResults; +}SLocalizationResult, *PSLocalizationResult; + + +``` + +### Members + +| Members | Description | +| ------------- | ------------- | +| [ResultType](enum-dynamsoftbarcodereaderenumresulttype.md) emResultType| The barcode format. | +| [BarcodeFormat](enum-dynamsoftbarcodereaderenumbarcodeformat.md) emBarcodeFormat| Barcode format. | +| pszBarcodeFormatString | Barcode type in string. | +| iX1 | The X coordinate of the left-most point. ![BarcodeCoordinates](/img/DWT_BarcodeSample.png) | +| iY1 | The Y coordinate of the left-most point. | +| iX2 | The X coordinate of the second point in a clockwise direction. | +| iY2 | The Y coordinate of the second point in a clockwise direction. | +| iX3 | The X coordinate of the third point in a clockwise direction. | +| iY3 | The Y coordinate of the third point in a clockwise direction. | +| iX4 | The X coordinate of the fourth point in a clockwise direction. | +| iY4 | The Y coordinate of the fourth point in a clockwise direction. | +| iAngle | The angle of a barcode. Values range from 0 to 360. | +| iModuleSize | The barcode module size (the minimum bar width in pixel). | +| iPageNumber | The page number the barcode located in. The index is 0-based. | +| pszRegionName | The region name the barcode located in. | +| pszDocumentName | The document name the barcode located in. | +| nResultsCount | Total extended result count. | +| [PSExtendedResult](structSExtendedResult.md)* ppResults | The extended result array . | \ No newline at end of file diff --git a/documents/6.4.1/objectTextResult.md b/documents/6.4.1/objectTextResult.md new file mode 100644 index 00000000..df071610 --- /dev/null +++ b/documents/6.4.1/objectTextResult.md @@ -0,0 +1,34 @@ +# TextResult + +Stores the text result including the format, the text, the bytes, the localization result etc. + +### Syntax + +```C +typedef struct tagSTextResult +{ + BarcodeFormat emBarcodeFormat; + + const char* pszBarcodeFormatString; + + const char* pszBarcodeText; + + unsigned char* pBarcodeBytes; + + int nBarcodeBytesLength; + + SLocalizationResult* pLocalizationResult; +} STextResult, *PSTextResult; + +``` + +### Members + +| Members | Description | +| ------------- | ------------- | +| [ResultType](enum-dynamsoftbarcodereaderenumresulttype.md) emResultType| The barcode format. | +| pszBarcodeFormatString | Barcode type in string. | +| pszBarcodeText | The barcode text, ends by '\0'. | +| pBarcodeBytes | The barcode content in a byte array. | +| nBarcodeBytesLength | The length of the byte array. | +| [SLocalizationResult](objectLocalizationResult.md) pLocalizationResult| The corresponding localization result. | \ No newline at end of file diff --git a/documents/6.4.1/package-lock.json b/documents/6.4.1/package-lock.json new file mode 100644 index 00000000..87ffd35f --- /dev/null +++ b/documents/6.4.1/package-lock.json @@ -0,0 +1,728 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "abab": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", + "integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4=" + }, + "acorn": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", + "integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=" + }, + "acorn-globals": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", + "integrity": "sha1-VbtemGkVB7dFedBRNBMhfDgMVM8=", + "requires": { + "acorn": "2.7.0" + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "requires": { + "tweetnacl": "0.14.5" + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "requires": { + "hoek": "4.2.0" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "cheerio": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.20.0.tgz", + "integrity": "sha1-XHEPK6uVZTJyhCugHG6mGzVF7DU=", + "requires": { + "css-select": "1.2.0", + "dom-serializer": "0.1.0", + "entities": "1.1.1", + "htmlparser2": "3.8.3", + "jsdom": "7.2.2", + "lodash": "4.12.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "requires": { + "delayed-stream": "1.0.0" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "requires": { + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha1-XdnabuOl8wIHdDYpDLcX0/SlTgI=", + "requires": { + "hoek": "4.2.0" + } + } + } + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "requires": { + "boolbase": "1.0.0", + "css-what": "2.1.0", + "domutils": "1.5.1", + "nth-check": "1.0.1" + } + }, + "css-what": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=" + }, + "cssom": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", + "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=" + }, + "cssstyle": { + "version": "0.2.37", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz", + "integrity": "sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ=", + "requires": { + "cssom": "0.3.2" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "1.0.0" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "requires": { + "domelementtype": "1.1.3", + "entities": "1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" + } + } + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" + }, + "domhandler": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", + "requires": { + "domelementtype": "1.3.0" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "requires": { + "jsbn": "0.1.1" + } + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" + }, + "escodegen": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.0.tgz", + "integrity": "sha1-mBGi8mXcHNOJRCDuNxcGS2MriFI=", + "requires": { + "esprima": "3.1.3", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.5.7" + } + }, + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "1.0.0" + } + }, + "gitbook-plugin-search": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/gitbook-plugin-search/-/gitbook-plugin-search-2.2.1.tgz", + "integrity": "sha1-bSW1p3aZD6mP39+jfeMx944PaxM=" + }, + "gitbook-plugin-splitter": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/gitbook-plugin-splitter/-/gitbook-plugin-splitter-0.0.8.tgz", + "integrity": "sha1-8rBRMGD8kma0awQYLk7KHUtx+vw=" + }, + "gitbook-plugin-theme-api": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/gitbook-plugin-theme-api/-/gitbook-plugin-theme-api-1.1.2.tgz", + "integrity": "sha1-jBRaS61JoSE8AlApC5vZtyrqiPw=", + "requires": { + "cheerio": "0.20.0", + "gitbook-plugin-search": "2.2.1", + "lodash": "4.12.0", + "q": "1.4.1", + "q-plus": "0.0.8" + } + }, + "gitbook-plugin-toggle-chapters": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/gitbook-plugin-toggle-chapters/-/gitbook-plugin-toggle-chapters-0.0.3.tgz", + "integrity": "sha1-bl9aphubLiIcOAzfbpKDIAFez7k=" + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "requires": { + "ajv": "5.5.2", + "har-schema": "2.0.0" + } + }, + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha1-r02RTrBl+bXOTZ0RwcshJu7MMDg=", + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.0", + "sntp": "2.1.0" + } + }, + "hoek": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha1-ctnQdU9/4lyi0BrY+PmpRJqJUm0=" + }, + "htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "requires": { + "domelementtype": "1.3.0", + "domhandler": "2.3.0", + "domutils": "1.5.1", + "entities": "1.0.0", + "readable-stream": "1.1.14" + }, + "dependencies": { + "entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=" + } + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "jsdom": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz", + "integrity": "sha1-QLQCdwwr2iNGkJa+6Rq2deOx/G4=", + "requires": { + "abab": "1.0.4", + "acorn": "2.7.0", + "acorn-globals": "1.0.9", + "cssom": "0.3.2", + "cssstyle": "0.2.37", + "escodegen": "1.9.0", + "nwmatcher": "1.4.3", + "parse5": "1.5.1", + "request": "2.83.0", + "sax": "1.2.4", + "symbol-tree": "3.2.2", + "tough-cookie": "2.3.3", + "webidl-conversions": "2.0.1", + "whatwg-url-compat": "0.6.5", + "xml-name-validator": "2.0.1" + } + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "lodash": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.12.0.tgz", + "integrity": "sha1-K9bcRqBA9Z5obJcu0h2T3FkFMlg=" + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "requires": { + "mime-db": "1.30.0" + } + }, + "nth-check": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "requires": { + "boolbase": "1.0.0" + } + }, + "nwmatcher": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.3.tgz", + "integrity": "sha1-ZDSOOz2A8DW0CsEVY9J4+LctuJw=" + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" + } + }, + "parse5": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz", + "integrity": "sha1-m387DeMr543CQBsXVzzK8Pb1nZQ=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "q": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", + "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=" + }, + "q-plus": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/q-plus/-/q-plus-0.0.8.tgz", + "integrity": "sha1-TMZssZvRRbQ+nhtUAjYUI3e2Hqs=", + "requires": { + "q": "1.4.1" + } + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha1-NJzfbu+J7EXBLX1es/wMhwNDptg=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "request": { + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha1-ygtl2gLtYpNYh4COb1EDgQNOM1Y=", + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.1", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=" + }, + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha1-LGzsFP7cIiJznK+bXD2F0cxaLMg=", + "requires": { + "hoek": "4.2.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "symbol-tree": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", + "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=" + }, + "tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "requires": { + "punycode": "1.4.1" + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "requires": { + "prelude-ls": "1.1.2" + } + }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha1-EsUou51Y0LkmXZovbw/ovhf/HxQ=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + } + }, + "webidl-conversions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-2.0.1.tgz", + "integrity": "sha1-O/glj30xjHRDw28uFpQCoaZwNQY=" + }, + "whatwg-url-compat": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/whatwg-url-compat/-/whatwg-url-compat-0.6.5.tgz", + "integrity": "sha1-AImBEa9om7CXVBzVpFymyHmERb8=", + "requires": { + "tr46": "0.0.3" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + }, + "xml-name-validator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-2.0.1.tgz", + "integrity": "sha1-TYuPHszTQZqjYgYb7O9RXh5VljU=" + } + } +} diff --git a/documents/6.4.1/structSExtendedResult.md b/documents/6.4.1/structSExtendedResult.md new file mode 100644 index 00000000..811bc487 --- /dev/null +++ b/documents/6.4.1/structSExtendedResult.md @@ -0,0 +1,35 @@ +# PSExtendedResult + +Stores the extended result including the format, the bytes, etc. + +### Syntax + +```C +typedef struct tagSExtendedResult +{ + ResultType emResultType; + + BarcodeFormat emBarcodeFormat; + + const char* pszBarcodeFormatString; + + int iConfidence; + + unsigned char* pBytes; + + int nBytesLength; +}SExtendedResult, *PSExtendedResult; + +``` + +### Members + +| Members | Description | +| ------------- | ------------- | +| [ResultType](enumResultType.md) emResultType| Extended result type. | +| [BarcodeFormat](enumBarcodeFormat.md) emBarcodeFormat| Barcode format. | +| pszBarcodeFormatString | Barcode type in string. | +| iConfidence | The confidence of the result. | +| pBytes | The content as in byte array. | +| nBytesLength | The length of the byte array. | + diff --git a/documents/6.5.1/Dynamsoft Barcode Reader JavaScript Edition LA.pdf b/documents/6.5.1/Dynamsoft Barcode Reader JavaScript Edition LA.pdf new file mode 100644 index 00000000..128b8775 Binary files /dev/null and b/documents/6.5.1/Dynamsoft Barcode Reader JavaScript Edition LA.pdf differ diff --git a/documents/6.5.1/api reference/assets/css/main.css b/documents/6.5.1/api reference/assets/css/main.css new file mode 100644 index 00000000..48b3645c --- /dev/null +++ b/documents/6.5.1/api reference/assets/css/main.css @@ -0,0 +1,865 @@ +/*! normalize.css v1.1.3 | MIT License | git.io/normalize */ +/* ========================================================================== HTML5 display definitions ========================================================================== */ +/** Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. */ +article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } + +/** Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. */ +audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } + +/** Prevent modern browsers from displaying `audio` without controls. Remove excess height in iOS 5 devices. */ +audio:not([controls]) { display: none; height: 0; } + +/** Address styling not present in IE 7/8/9, Firefox 3, and Safari 4. Known issue: no IE 6 support. */ +[hidden] { display: none; } + +/* ========================================================================== Base ========================================================================== */ +/** 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using `em` units. 2. Prevent iOS text size adjust after orientation change, without disabling user zoom. */ +html { font-size: 100%; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ font-family: sans-serif; } + +/** Address `font-family` inconsistency between `textarea` and other form elements. */ +button, input, select, textarea { font-family: sans-serif; } + +/** Address margins handled incorrectly in IE 6/7. */ +body { margin: 0; } + +/* ========================================================================== Links ========================================================================== */ +/** Address `outline` inconsistency between Chrome and other browsers. */ +a:focus { outline: thin dotted; } +a:active, a:hover { outline: 0; } + +/** Improve readability when focused and also mouse hovered in all browsers. */ +/* ========================================================================== Typography ========================================================================== */ +/** Address font sizes and margins set differently in IE 6/7. Address font sizes within `section` and `article` in Firefox 4+, Safari 5, and Chrome. */ +h1 { font-size: 2em; margin: 0.67em 0; } + +h2 { font-size: 1.5em; margin: 0.83em 0; } + +h3 { font-size: 1.17em; margin: 1em 0; } + +h4, .tsd-index-panel h3 { font-size: 1em; margin: 1.33em 0; } + +h5 { font-size: 0.83em; margin: 1.67em 0; } + +h6 { font-size: 0.67em; margin: 2.33em 0; } + +/** Address styling not present in IE 7/8/9, Safari 5, and Chrome. */ +abbr[title] { border-bottom: 1px dotted; } + +/** Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. */ +b, strong { font-weight: bold; } + +blockquote { margin: 1em 40px; } + +/** Address styling not present in Safari 5 and Chrome. */ +dfn { font-style: italic; } + +/** Address differences between Firefox and other browsers. Known issue: no IE 6/7 normalization. */ +hr { box-sizing: content-box; height: 0; } + +/** Address styling not present in IE 6/7/8/9. */ +mark { background: #ff0; color: #000; } + +/** Address margins set differently in IE 6/7. */ +p, pre { margin: 1em 0; } + +/** Correct font family set oddly in IE 6, Safari 4/5, and Chrome. */ +code, kbd, pre, samp { font-family: monospace, serif; _font-family: "courier new", monospace; font-size: 1em; } + +/** Improve readability of pre-formatted text in all browsers. */ +pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; } + +/** Address CSS quotes not supported in IE 6/7. */ +q { quotes: none; } +q:before, q:after { content: ""; content: none; } + +/** Address `quotes` property not supported in Safari 4. */ +/** Address inconsistent and variable font size in all browsers. */ +small { font-size: 80%; } + +/** Prevent `sub` and `sup` affecting `line-height` in all browsers. */ +sub { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } + +sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; top: -0.5em; } + +sub { bottom: -0.25em; } + +/* ========================================================================== Lists ========================================================================== */ +/** Address margins set differently in IE 6/7. */ +dl, menu, ol, ul { margin: 1em 0; } + +dd { margin: 0 0 0 40px; } + +/** Address paddings set differently in IE 6/7. */ +menu, ol, ul { padding: 0 0 0 40px; } + +/** Correct list images handled incorrectly in IE 7. */ +nav ul, nav ol { list-style: none; list-style-image: none; } + +/* ========================================================================== Embedded content ========================================================================== */ +/** 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3. 2. Improve image quality when scaled in IE 7. */ +img { border: 0; /* 1 */ -ms-interpolation-mode: bicubic; } + +/* 2 */ +/** Correct overflow displayed oddly in IE 9. */ +svg:not(:root) { overflow: hidden; } + +/* ========================================================================== Figures ========================================================================== */ +/** Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. */ +figure, form { margin: 0; } + +/* ========================================================================== Forms ========================================================================== */ +/** Correct margin displayed oddly in IE 6/7. */ +/** Define consistent border, margin, and padding. */ +fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } + +/** 1. Correct color not being inherited in IE 6/7/8/9. 2. Correct text not wrapping in Firefox 3. 3. Correct alignment displayed oddly in IE 6/7. */ +legend { border: 0; /* 1 */ padding: 0; white-space: normal; /* 2 */ *margin-left: -7px; } + +/* 3 */ +/** 1. Correct font size not being inherited in all browsers. 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5, and Chrome. 3. Improve appearance and consistency in all browsers. */ +button, input, select, textarea { font-size: 100%; /* 1 */ margin: 0; /* 2 */ vertical-align: baseline; /* 3 */ *vertical-align: middle; } + +/* 3 */ +/** Address Firefox 3+ setting `line-height` on `input` using `!important` in the UA stylesheet. */ +button, input { line-height: normal; } + +/** Address inconsistent `text-transform` inheritance for `button` and `select`. All other form control elements do not inherit `text-transform` values. Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. Correct `select` style inheritance in Firefox 4+ and Opera. */ +button, select { text-transform: none; } + +/** 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls. 2. Correct inability to style clickable `input` types in iOS. 3. Improve usability and consistency of cursor style between image-type `input` and others. 4. Remove inner spacing in IE 7 without affecting normal text inputs. Known issue: inner spacing remains in IE 6. */ +button, html input[type="button"] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ *overflow: visible; } + +/* 4 */ +input[type="reset"], input[type="submit"] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ *overflow: visible; } + +/* 4 */ +/** Re-set default cursor for disabled elements. */ +button[disabled], html input[disabled] { cursor: default; } + +/** 1. Address box sizing set to content-box in IE 8/9. 2. Remove excess padding in IE 8/9. 3. Remove excess padding in IE 7. Known issue: excess padding remains in IE 6. */ +input { /* 3 */ } +input[type="checkbox"], input[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ *height: 13px; /* 3 */ *width: 13px; } +input[type="search"] { -webkit-appearance: textfield; /* 1 */ /* 2 */ box-sizing: content-box; } +input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } + +/** 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome (include `-moz` to future-proof). */ +/** Remove inner padding and search cancel button in Safari 5 and Chrome on OS X. */ +/** Remove inner padding and border in Firefox 3+. */ +button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } + +/** 1. Remove default vertical scrollbar in IE 6/7/8/9. 2. Improve readability and alignment in all browsers. */ +textarea { overflow: auto; /* 1 */ vertical-align: top; } + +/* 2 */ +/* ========================================================================== Tables ========================================================================== */ +/** Remove most spacing between table cells. */ +table { border-collapse: collapse; border-spacing: 0; } + +/* Visual Studio-like style based on original C# coloring by Jason Diamond */ +.hljs { display: inline-block; padding: 0.5em; background: white; color: black; } + +.hljs-comment, .hljs-annotation, .hljs-template_comment, .diff .hljs-header, .hljs-chunk, .apache .hljs-cbracket { color: #008000; } + +.hljs-keyword, .hljs-id, .hljs-built_in, .css .smalltalk .hljs-class, .hljs-winutils, .bash .hljs-variable, .tex .hljs-command, .hljs-request, .hljs-status, .nginx .hljs-title { color: #00f; } + +.xml .hljs-tag { color: #00f; } +.xml .hljs-tag .hljs-value { color: #00f; } + +.hljs-string, .hljs-title, .hljs-parent, .hljs-tag .hljs-value, .hljs-rules .hljs-value { color: #a31515; } + +.ruby .hljs-symbol { color: #a31515; } +.ruby .hljs-symbol .hljs-string { color: #a31515; } + +.hljs-template_tag, .django .hljs-variable, .hljs-addition, .hljs-flow, .hljs-stream, .apache .hljs-tag, .hljs-date, .tex .hljs-formula, .coffeescript .hljs-attribute { color: #a31515; } + +.ruby .hljs-string, .hljs-decorator, .hljs-filter .hljs-argument, .hljs-localvars, .hljs-array, .hljs-attr_selector, .hljs-pseudo, .hljs-pi, .hljs-doctype, .hljs-deletion, .hljs-envvar, .hljs-shebang, .hljs-preprocessor, .hljs-pragma, .userType, .apache .hljs-sqbracket, .nginx .hljs-built_in, .tex .hljs-special, .hljs-prompt { color: #2b91af; } + +.hljs-phpdoc, .hljs-javadoc, .hljs-xmlDocTag { color: #808080; } + +.vhdl .hljs-typename { font-weight: bold; } +.vhdl .hljs-string { color: #666666; } +.vhdl .hljs-literal { color: #a31515; } +.vhdl .hljs-attribute { color: #00b0e8; } + +.xml .hljs-attribute { color: #f00; } + +.col > :first-child, .col-1 > :first-child, .col-2 > :first-child, .col-3 > :first-child, .col-4 > :first-child, .col-5 > :first-child, .col-6 > :first-child, .col-7 > :first-child, .col-8 > :first-child, .col-9 > :first-child, .col-10 > :first-child, .col-11 > :first-child, .tsd-panel > :first-child, ul.tsd-descriptions > li > :first-child, .col > :first-child > :first-child, .col-1 > :first-child > :first-child, .col-2 > :first-child > :first-child, .col-3 > :first-child > :first-child, .col-4 > :first-child > :first-child, .col-5 > :first-child > :first-child, .col-6 > :first-child > :first-child, .col-7 > :first-child > :first-child, .col-8 > :first-child > :first-child, .col-9 > :first-child > :first-child, .col-10 > :first-child > :first-child, .col-11 > :first-child > :first-child, .tsd-panel > :first-child > :first-child, ul.tsd-descriptions > li > :first-child > :first-child, .col > :first-child > :first-child > :first-child, .col-1 > :first-child > :first-child > :first-child, .col-2 > :first-child > :first-child > :first-child, .col-3 > :first-child > :first-child > :first-child, .col-4 > :first-child > :first-child > :first-child, .col-5 > :first-child > :first-child > :first-child, .col-6 > :first-child > :first-child > :first-child, .col-7 > :first-child > :first-child > :first-child, .col-8 > :first-child > :first-child > :first-child, .col-9 > :first-child > :first-child > :first-child, .col-10 > :first-child > :first-child > :first-child, .col-11 > :first-child > :first-child > :first-child, .tsd-panel > :first-child > :first-child > :first-child, ul.tsd-descriptions > li > :first-child > :first-child > :first-child { margin-top: 0; } +.col > :last-child, .col-1 > :last-child, .col-2 > :last-child, .col-3 > :last-child, .col-4 > :last-child, .col-5 > :last-child, .col-6 > :last-child, .col-7 > :last-child, .col-8 > :last-child, .col-9 > :last-child, .col-10 > :last-child, .col-11 > :last-child, .tsd-panel > :last-child, ul.tsd-descriptions > li > :last-child, .col > :last-child > :last-child, .col-1 > :last-child > :last-child, .col-2 > :last-child > :last-child, .col-3 > :last-child > :last-child, .col-4 > :last-child > :last-child, .col-5 > :last-child > :last-child, .col-6 > :last-child > :last-child, .col-7 > :last-child > :last-child, .col-8 > :last-child > :last-child, .col-9 > :last-child > :last-child, .col-10 > :last-child > :last-child, .col-11 > :last-child > :last-child, .tsd-panel > :last-child > :last-child, ul.tsd-descriptions > li > :last-child > :last-child, .col > :last-child > :last-child > :last-child, .col-1 > :last-child > :last-child > :last-child, .col-2 > :last-child > :last-child > :last-child, .col-3 > :last-child > :last-child > :last-child, .col-4 > :last-child > :last-child > :last-child, .col-5 > :last-child > :last-child > :last-child, .col-6 > :last-child > :last-child > :last-child, .col-7 > :last-child > :last-child > :last-child, .col-8 > :last-child > :last-child > :last-child, .col-9 > :last-child > :last-child > :last-child, .col-10 > :last-child > :last-child > :last-child, .col-11 > :last-child > :last-child > :last-child, .tsd-panel > :last-child > :last-child > :last-child, ul.tsd-descriptions > li > :last-child > :last-child > :last-child { margin-bottom: 0; } + +.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; } +@media (max-width: 640px) { .container { padding: 0 20px; } } + +.container-main { padding-bottom: 200px; } + +.row { position: relative; margin: 0 -10px; } +.row:after { visibility: hidden; display: block; content: ""; clear: both; height: 0; } + +.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11 { box-sizing: border-box; float: left; padding: 0 10px; } + +.col-1 { width: 8.33333%; } + +.offset-1 { margin-left: 8.33333%; } + +.col-2 { width: 16.66667%; } + +.offset-2 { margin-left: 16.66667%; } + +.col-3 { width: 25%; } + +.offset-3 { margin-left: 25%; } + +.col-4 { width: 33.33333%; } + +.offset-4 { margin-left: 33.33333%; } + +.col-5 { width: 41.66667%; } + +.offset-5 { margin-left: 41.66667%; } + +.col-6 { width: 50%; } + +.offset-6 { margin-left: 50%; } + +.col-7 { width: 58.33333%; } + +.offset-7 { margin-left: 58.33333%; } + +.col-8 { width: 66.66667%; } + +.offset-8 { margin-left: 66.66667%; } + +.col-9 { width: 75%; } + +.offset-9 { margin-left: 75%; } + +.col-10 { width: 83.33333%; } + +.offset-10 { margin-left: 83.33333%; } + +.col-11 { width: 91.66667%; } + +.offset-11 { margin-left: 91.66667%; } + +.tsd-kind-icon { display: block; position: relative; padding-left: 20px; text-indent: -20px; } +.tsd-kind-icon:before { content: ''; display: inline-block; vertical-align: middle; width: 17px; height: 17px; margin: 0 3px 2px 0; background-image: url(../images/icons.png); } +@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { .tsd-kind-icon:before { background-image: url(../images/icons@2x.png); background-size: 238px 204px; } } + +.tsd-signature.tsd-kind-icon:before { background-position: 0 -153px; } + +.tsd-kind-object-literal > .tsd-kind-icon:before { background-position: 0px -17px; } +.tsd-kind-object-literal.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -17px; } +.tsd-kind-object-literal.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -17px; } + +.tsd-kind-class > .tsd-kind-icon:before { background-position: 0px -34px; } +.tsd-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -34px; } +.tsd-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -34px; } + +.tsd-kind-class.tsd-has-type-parameter > .tsd-kind-icon:before { background-position: 0px -51px; } +.tsd-kind-class.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -51px; } +.tsd-kind-class.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -51px; } + +.tsd-kind-interface > .tsd-kind-icon:before { background-position: 0px -68px; } +.tsd-kind-interface.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -68px; } +.tsd-kind-interface.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -68px; } + +.tsd-kind-interface.tsd-has-type-parameter > .tsd-kind-icon:before { background-position: 0px -85px; } +.tsd-kind-interface.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -85px; } +.tsd-kind-interface.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -85px; } + +.tsd-kind-module > .tsd-kind-icon:before { background-position: 0px -102px; } +.tsd-kind-module.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -102px; } +.tsd-kind-module.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -102px; } + +.tsd-kind-external-module > .tsd-kind-icon:before { background-position: 0px -102px; } +.tsd-kind-external-module.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -102px; } +.tsd-kind-external-module.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -102px; } + +.tsd-kind-enum > .tsd-kind-icon:before { background-position: 0px -119px; } +.tsd-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -119px; } +.tsd-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -119px; } + +.tsd-kind-enum-member > .tsd-kind-icon:before { background-position: 0px -136px; } +.tsd-kind-enum-member.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -136px; } +.tsd-kind-enum-member.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -136px; } + +.tsd-kind-signature > .tsd-kind-icon:before { background-position: 0px -153px; } +.tsd-kind-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -153px; } +.tsd-kind-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -153px; } + +.tsd-kind-type-alias > .tsd-kind-icon:before { background-position: 0px -170px; } +.tsd-kind-type-alias.tsd-is-protected > .tsd-kind-icon:before { background-position: -17px -170px; } +.tsd-kind-type-alias.tsd-is-private > .tsd-kind-icon:before { background-position: -34px -170px; } + +.tsd-kind-variable > .tsd-kind-icon:before { background-position: -136px -0px; } +.tsd-kind-variable.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -0px; } +.tsd-kind-variable.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -0px; } +.tsd-kind-variable.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -0px; } +.tsd-kind-variable.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -0px; } +.tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -0px; } +.tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -0px; } +.tsd-kind-variable.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -0px; } +.tsd-kind-variable.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -0px; } +.tsd-kind-variable.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -0px; } +.tsd-kind-variable.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -0px; } +.tsd-kind-variable.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -0px; } +.tsd-kind-variable.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -0px; } + +.tsd-kind-property > .tsd-kind-icon:before { background-position: -136px -0px; } +.tsd-kind-property.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -0px; } +.tsd-kind-property.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -0px; } +.tsd-kind-property.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -0px; } +.tsd-kind-property.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -0px; } +.tsd-kind-property.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -0px; } +.tsd-kind-property.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -0px; } +.tsd-kind-property.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -0px; } +.tsd-kind-property.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -0px; } +.tsd-kind-property.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -0px; } +.tsd-kind-property.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -0px; } +.tsd-kind-property.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -0px; } +.tsd-kind-property.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -0px; } + +.tsd-kind-get-signature > .tsd-kind-icon:before { background-position: -136px -17px; } +.tsd-kind-get-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -17px; } +.tsd-kind-get-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -17px; } +.tsd-kind-get-signature.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -17px; } +.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -17px; } +.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -17px; } +.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -17px; } +.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -17px; } +.tsd-kind-get-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -17px; } +.tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -17px; } +.tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -17px; } +.tsd-kind-get-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -17px; } +.tsd-kind-get-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -17px; } + +.tsd-kind-set-signature > .tsd-kind-icon:before { background-position: -136px -34px; } +.tsd-kind-set-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -34px; } +.tsd-kind-set-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -34px; } +.tsd-kind-set-signature.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -34px; } +.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -34px; } +.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -34px; } +.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -34px; } +.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -34px; } +.tsd-kind-set-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -34px; } +.tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -34px; } +.tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -34px; } +.tsd-kind-set-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -34px; } +.tsd-kind-set-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -34px; } + +.tsd-kind-accessor > .tsd-kind-icon:before { background-position: -136px -51px; } +.tsd-kind-accessor.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -51px; } +.tsd-kind-accessor.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -51px; } +.tsd-kind-accessor.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -51px; } +.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -51px; } +.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -51px; } +.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -51px; } +.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -51px; } +.tsd-kind-accessor.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -51px; } +.tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -51px; } +.tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -51px; } +.tsd-kind-accessor.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -51px; } +.tsd-kind-accessor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -51px; } + +.tsd-kind-function > .tsd-kind-icon:before { background-position: -136px -68px; } +.tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -68px; } +.tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } +.tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -68px; } +.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -68px; } +.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -68px; } +.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -68px; } +.tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } +.tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -68px; } +.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -68px; } +.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } +.tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -68px; } +.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -68px; } + +.tsd-kind-method > .tsd-kind-icon:before { background-position: -136px -68px; } +.tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -68px; } +.tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } +.tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -68px; } +.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -68px; } +.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -68px; } +.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -68px; } +.tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } +.tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -68px; } +.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -68px; } +.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } +.tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -68px; } +.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -68px; } + +.tsd-kind-call-signature > .tsd-kind-icon:before { background-position: -136px -68px; } +.tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -68px; } +.tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } +.tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -68px; } +.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -68px; } +.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -68px; } +.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -68px; } +.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } +.tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -68px; } +.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -68px; } +.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -68px; } +.tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -68px; } +.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -68px; } + +.tsd-kind-function.tsd-has-type-parameter > .tsd-kind-icon:before { background-position: -136px -85px; } +.tsd-kind-function.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -85px; } +.tsd-kind-function.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -85px; } +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -85px; } +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -85px; } +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -85px; } +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -85px; } +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -85px; } +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -85px; } +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -85px; } +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -85px; } +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -85px; } +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -85px; } + +.tsd-kind-method.tsd-has-type-parameter > .tsd-kind-icon:before { background-position: -136px -85px; } +.tsd-kind-method.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -85px; } +.tsd-kind-method.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -85px; } +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -85px; } +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -85px; } +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -85px; } +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -85px; } +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -85px; } +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -85px; } +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -85px; } +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -85px; } +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -85px; } +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -85px; } + +.tsd-kind-constructor > .tsd-kind-icon:before { background-position: -136px -102px; } +.tsd-kind-constructor.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -102px; } +.tsd-kind-constructor.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -102px; } +.tsd-kind-constructor.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -102px; } +.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -102px; } +.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -102px; } +.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -102px; } +.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -102px; } +.tsd-kind-constructor.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -102px; } +.tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -102px; } +.tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -102px; } +.tsd-kind-constructor.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -102px; } +.tsd-kind-constructor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -102px; } + +.tsd-kind-constructor-signature > .tsd-kind-icon:before { background-position: -136px -102px; } +.tsd-kind-constructor-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -102px; } +.tsd-kind-constructor-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -102px; } +.tsd-kind-constructor-signature.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -102px; } +.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -102px; } +.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -102px; } +.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -102px; } +.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -102px; } +.tsd-kind-constructor-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -102px; } +.tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -102px; } +.tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -102px; } +.tsd-kind-constructor-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -102px; } +.tsd-kind-constructor-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -102px; } + +.tsd-kind-index-signature > .tsd-kind-icon:before { background-position: -136px -119px; } +.tsd-kind-index-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -119px; } +.tsd-kind-index-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -119px; } +.tsd-kind-index-signature.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -119px; } +.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -119px; } +.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -119px; } +.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -119px; } +.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -119px; } +.tsd-kind-index-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -119px; } +.tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -119px; } +.tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -119px; } +.tsd-kind-index-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -119px; } +.tsd-kind-index-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -119px; } + +.tsd-kind-event > .tsd-kind-icon:before { background-position: -136px -136px; } +.tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -136px; } +.tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -136px; } +.tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -136px; } +.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -136px; } +.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -136px; } +.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -136px; } +.tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -136px; } +.tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -136px; } +.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -136px; } +.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -136px; } +.tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -136px; } +.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -136px; } + +.tsd-is-static > .tsd-kind-icon:before { background-position: -136px -153px; } +.tsd-is-static.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -153px; } +.tsd-is-static.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -153px; } +.tsd-is-static.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -153px; } +.tsd-is-static.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -153px; } +.tsd-is-static.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -153px; } +.tsd-is-static.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -153px; } +.tsd-is-static.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -153px; } +.tsd-is-static.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -153px; } +.tsd-is-static.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -153px; } +.tsd-is-static.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -153px; } +.tsd-is-static.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -153px; } +.tsd-is-static.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -153px; } + +.tsd-is-static.tsd-kind-function > .tsd-kind-icon:before { background-position: -136px -170px; } +.tsd-is-static.tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -170px; } +.tsd-is-static.tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -170px; } +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -170px; } +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -170px; } +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -170px; } +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } +.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -170px; } +.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -170px; } +.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } +.tsd-is-static.tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -170px; } +.tsd-is-static.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -170px; } + +.tsd-is-static.tsd-kind-method > .tsd-kind-icon:before { background-position: -136px -170px; } +.tsd-is-static.tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -170px; } +.tsd-is-static.tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -170px; } +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -170px; } +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -170px; } +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -170px; } +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } +.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -170px; } +.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -170px; } +.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } +.tsd-is-static.tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -170px; } +.tsd-is-static.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -170px; } + +.tsd-is-static.tsd-kind-call-signature > .tsd-kind-icon:before { background-position: -136px -170px; } +.tsd-is-static.tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -170px; } +.tsd-is-static.tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -170px; } +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -170px; } +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -170px; } +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -170px; } +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -170px; } +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -170px; } +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -170px; } +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -170px; } +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -170px; } + +.tsd-is-static.tsd-kind-event > .tsd-kind-icon:before { background-position: -136px -187px; } +.tsd-is-static.tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { background-position: -153px -187px; } +.tsd-is-static.tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -187px; } +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { background-position: -51px -187px; } +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { background-position: -68px -187px; } +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { background-position: -85px -187px; } +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { background-position: -102px -187px; } +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -187px; } +.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { background-position: -170px -187px; } +.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { background-position: -187px -187px; } +.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { background-position: -119px -187px; } +.tsd-is-static.tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before { background-position: -204px -187px; } +.tsd-is-static.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { background-position: -221px -187px; } + +.no-transition { transition: none !important; } + +@-webkit-keyframes fade-in { from { opacity: 0; } + to { opacity: 1; } } + +@keyframes fade-in { from { opacity: 0; } + to { opacity: 1; } } +@-webkit-keyframes fade-out { from { opacity: 1; visibility: visible; } + to { opacity: 0; } } +@keyframes fade-out { from { opacity: 1; visibility: visible; } + to { opacity: 0; } } +@-webkit-keyframes fade-in-delayed { 0% { opacity: 0; } + 33% { opacity: 0; } + 100% { opacity: 1; } } +@keyframes fade-in-delayed { 0% { opacity: 0; } + 33% { opacity: 0; } + 100% { opacity: 1; } } +@-webkit-keyframes fade-out-delayed { 0% { opacity: 1; visibility: visible; } + 66% { opacity: 0; } + 100% { opacity: 0; } } +@keyframes fade-out-delayed { 0% { opacity: 1; visibility: visible; } + 66% { opacity: 0; } + 100% { opacity: 0; } } +@-webkit-keyframes shift-to-left { from { -webkit-transform: translate(0, 0); transform: translate(0, 0); } + to { -webkit-transform: translate(-25%, 0); transform: translate(-25%, 0); } } +@keyframes shift-to-left { from { -webkit-transform: translate(0, 0); transform: translate(0, 0); } + to { -webkit-transform: translate(-25%, 0); transform: translate(-25%, 0); } } +@-webkit-keyframes unshift-to-left { from { -webkit-transform: translate(-25%, 0); transform: translate(-25%, 0); } + to { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } +@keyframes unshift-to-left { from { -webkit-transform: translate(-25%, 0); transform: translate(-25%, 0); } + to { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } +@-webkit-keyframes pop-in-from-right { from { -webkit-transform: translate(100%, 0); transform: translate(100%, 0); } + to { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } +@keyframes pop-in-from-right { from { -webkit-transform: translate(100%, 0); transform: translate(100%, 0); } + to { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } +@-webkit-keyframes pop-out-to-right { from { -webkit-transform: translate(0, 0); transform: translate(0, 0); visibility: visible; } + to { -webkit-transform: translate(100%, 0); transform: translate(100%, 0); } } +@keyframes pop-out-to-right { from { -webkit-transform: translate(0, 0); transform: translate(0, 0); visibility: visible; } + to { -webkit-transform: translate(100%, 0); transform: translate(100%, 0); } } +body { background: #fdfdfd; font-family: "Segoe UI", sans-serif; font-size: 16px; color: #222; } + +a { color: #4da6ff; text-decoration: none; } +a:hover { text-decoration: underline; } + +code, pre { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; padding: 0.2em; margin: 0; font-size: 14px; background-color: rgba(0, 0, 0, 0.04); } + +pre { padding: 10px; } +pre code { padding: 0; font-size: 100%; background-color: transparent; } + +.tsd-typography { line-height: 1.333em; } +.tsd-typography ul { list-style: square; padding: 0 0 0 20px; margin: 0; } +.tsd-typography h4, .tsd-typography .tsd-index-panel h3, .tsd-index-panel .tsd-typography h3, .tsd-typography h5, .tsd-typography h6 { font-size: 1em; margin: 0; } +.tsd-typography h5, .tsd-typography h6 { font-weight: normal; } +.tsd-typography p, .tsd-typography ul, .tsd-typography ol { margin: 1em 0; } + +@media (min-width: 901px) and (max-width: 1024px) { html.default .col-content { width: 72%; } + html.default .col-menu { width: 28%; } + html.default .tsd-navigation { padding-left: 10px; } } +@media (max-width: 900px) { html.default .col-content { float: none; width: 100%; } + html.default .col-menu { position: fixed !important; overflow: auto; -webkit-overflow-scrolling: touch; overflow-scrolling: touch; z-index: 1024; top: 0 !important; bottom: 0 !important; left: auto !important; right: 0 !important; width: 100%; padding: 20px 20px 0 0; max-width: 450px; visibility: hidden; background-color: #fff; -webkit-transform: translate(100%, 0); transform: translate(100%, 0); } + html.default .col-menu > *:last-child { padding-bottom: 20px; } + html.default .overlay { content: ""; display: block; position: fixed; z-index: 1023; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.75); visibility: hidden; } + html.default.to-has-menu .overlay { -webkit-animation: fade-in 0.4s; animation: fade-in 0.4s; } + html.default.to-has-menu header, html.default.to-has-menu footer, html.default.to-has-menu .col-content { -webkit-animation: shift-to-left 0.4s; animation: shift-to-left 0.4s; } + html.default.to-has-menu .col-menu { -webkit-animation: pop-in-from-right 0.4s; animation: pop-in-from-right 0.4s; } + html.default.from-has-menu .overlay { -webkit-animation: fade-out 0.4s; animation: fade-out 0.4s; } + html.default.from-has-menu header, html.default.from-has-menu footer, html.default.from-has-menu .col-content { -webkit-animation: unshift-to-left 0.4s; animation: unshift-to-left 0.4s; } + html.default.from-has-menu .col-menu { -webkit-animation: pop-out-to-right 0.4s; animation: pop-out-to-right 0.4s; } + html.default.has-menu body { overflow: hidden; } + html.default.has-menu .overlay { visibility: visible; } + html.default.has-menu header, html.default.has-menu footer, html.default.has-menu .col-content { -webkit-transform: translate(-25%, 0); transform: translate(-25%, 0); } + html.default.has-menu .col-menu { visibility: visible; -webkit-transform: translate(0, 0); transform: translate(0, 0); } } + +.tsd-page-title { padding: 70px 0 20px 0; margin: 0 0 40px 0; background: #fff; box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); } +.tsd-page-title h1 { margin: 0; } + +.tsd-breadcrumb { margin: 0; padding: 0; color: #808080; } +.tsd-breadcrumb a { color: #808080; text-decoration: none; } +.tsd-breadcrumb a:hover { text-decoration: underline; } +.tsd-breadcrumb li { display: inline; } +.tsd-breadcrumb li:after { content: " / "; } + +html.minimal .container { margin: 0; } +html.minimal .container-main { padding-top: 50px; padding-bottom: 0; } +html.minimal .content-wrap { padding-left: 300px; } +html.minimal .tsd-navigation { position: fixed !important; overflow: auto; -webkit-overflow-scrolling: touch; overflow-scrolling: touch; box-sizing: border-box; z-index: 1; left: 0; top: 40px; bottom: 0; width: 300px; padding: 20px; margin: 0; } +html.minimal .tsd-member .tsd-member { margin-left: 0; } +html.minimal .tsd-page-toolbar { position: fixed; z-index: 2; } +html.minimal #tsd-filter .tsd-filter-group { right: 0; -webkit-transform: none; transform: none; } +html.minimal footer { background-color: transparent; } +html.minimal footer .container { padding: 0; } +html.minimal .tsd-generator { padding: 0; } +@media (max-width: 900px) { html.minimal .tsd-navigation { display: none; } + html.minimal .content-wrap { padding-left: 0; } } + +dl.tsd-comment-tags { overflow: hidden; } +dl.tsd-comment-tags dt { clear: both; float: left; padding: 1px 5px; margin: 0 10px 0 0; border-radius: 4px; border: 1px solid #808080; color: #808080; font-size: 0.8em; font-weight: normal; } +dl.tsd-comment-tags dd { margin: 0 0 10px 0; } +dl.tsd-comment-tags p { margin: 0; } + +.tsd-panel.tsd-comment .lead { font-size: 1.1em; line-height: 1.333em; margin-bottom: 2em; } +.tsd-panel.tsd-comment .lead:last-child { margin-bottom: 0; } + +.toggle-protected .tsd-is-private { display: none; } + +.toggle-public .tsd-is-private, .toggle-public .tsd-is-protected, .toggle-public .tsd-is-private-protected { display: none; } + +.toggle-inherited .tsd-is-inherited { display: none; } + +.toggle-only-exported .tsd-is-not-exported { display: none; } + +.toggle-externals .tsd-is-external { display: none; } + +#tsd-filter { position: relative; display: inline-block; height: 40px; vertical-align: bottom; } +.no-filter #tsd-filter { display: none; } +#tsd-filter .tsd-filter-group { display: inline-block; height: 40px; vertical-align: bottom; white-space: nowrap; } +#tsd-filter input { display: none; } +@media (max-width: 900px) { #tsd-filter .tsd-filter-group { display: block; position: absolute; top: 40px; right: 20px; height: auto; background-color: #fff; visibility: hidden; -webkit-transform: translate(50%, 0); transform: translate(50%, 0); box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); } + .has-options #tsd-filter .tsd-filter-group { visibility: visible; } + .to-has-options #tsd-filter .tsd-filter-group { -webkit-animation: fade-in 0.2s; animation: fade-in 0.2s; } + .from-has-options #tsd-filter .tsd-filter-group { -webkit-animation: fade-out 0.2s; animation: fade-out 0.2s; } + #tsd-filter label, #tsd-filter .tsd-select { display: block; padding-right: 20px; } } + +footer { border-top: 1px solid #eee; background-color: #fff; } +footer.with-border-bottom { border-bottom: 1px solid #eee; } +footer .tsd-legend-group { font-size: 0; } +footer .tsd-legend { display: inline-block; width: 25%; padding: 0; font-size: 16px; list-style: none; line-height: 1.333em; vertical-align: top; } +@media (max-width: 900px) { footer .tsd-legend { width: 50%; } } + +.tsd-hierarchy { list-style: square; padding: 0 0 0 20px; margin: 0; } +.tsd-hierarchy .target { font-weight: bold; } + +.tsd-index-panel .tsd-index-content { margin-bottom: -30px !important; } +.tsd-index-panel .tsd-index-section { margin-bottom: 30px !important; } +.tsd-index-panel h3 { margin: 0 -20px 10px -20px; padding: 0 20px 10px 20px; border-bottom: 1px solid #eee; } +.tsd-index-panel ul.tsd-index-list { -webkit-column-count: 3; -moz-column-count: 3; -ms-column-count: 3; -o-column-count: 3; column-count: 3; -webkit-column-gap: 20px; -moz-column-gap: 20px; -ms-column-gap: 20px; -o-column-gap: 20px; column-gap: 20px; padding: 0; list-style: none; line-height: 1.333em; } +@media (max-width: 900px) { .tsd-index-panel ul.tsd-index-list { -webkit-column-count: 1; -moz-column-count: 1; -ms-column-count: 1; -o-column-count: 1; column-count: 1; } } +@media (min-width: 901px) and (max-width: 1024px) { .tsd-index-panel ul.tsd-index-list { -webkit-column-count: 2; -moz-column-count: 2; -ms-column-count: 2; -o-column-count: 2; column-count: 2; } } +.tsd-index-panel ul.tsd-index-list li { -webkit-column-break-inside: avoid; -moz-column-break-inside: avoid; -ms-column-break-inside: avoid; -o-column-break-inside: avoid; column-break-inside: avoid; -webkit-page-break-inside: avoid; -moz-page-break-inside: avoid; -ms-page-break-inside: avoid; -o-page-break-inside: avoid; page-break-inside: avoid; } +.tsd-index-panel a, .tsd-index-panel .tsd-parent-kind-module a { color: #9600ff; } +.tsd-index-panel .tsd-parent-kind-interface a { color: #7da01f; } +.tsd-index-panel .tsd-parent-kind-enum a { color: #cc9900; } +.tsd-index-panel .tsd-parent-kind-class a { color: #4da6ff; } +.tsd-index-panel .tsd-kind-module a { color: #9600ff; } +.tsd-index-panel .tsd-kind-interface a { color: #7da01f; } +.tsd-index-panel .tsd-kind-enum a { color: #cc9900; } +.tsd-index-panel .tsd-kind-class a { color: #4da6ff; } +.tsd-index-panel .tsd-is-private a { color: #808080; } + +.tsd-flag { display: inline-block; padding: 1px 5px; border-radius: 4px; color: #fff; background-color: #808080; text-indent: 0; font-size: 14px; font-weight: normal; } + +.tsd-anchor { position: absolute; top: -100px; } + +.tsd-member { position: relative; } +.tsd-member .tsd-anchor + h3 { margin-top: 0; margin-bottom: 0; border-bottom: none; } + +.tsd-navigation { padding: 0 0 0 40px; } +.tsd-navigation a { display: block; padding-top: 2px; padding-bottom: 2px; border-left: 2px solid transparent; color: #222; text-decoration: none; transition: border-left-color 0.1s; } +.tsd-navigation a:hover { text-decoration: underline; } +.tsd-navigation ul { margin: 0; padding: 0; list-style: none; } +.tsd-navigation li { padding: 0; } + +.tsd-navigation.primary { padding-bottom: 40px; } +.tsd-navigation.primary a { display: block; padding-top: 6px; padding-bottom: 6px; } +.tsd-navigation.primary ul li a { padding-left: 5px; } +.tsd-navigation.primary ul li li a { padding-left: 25px; } +.tsd-navigation.primary ul li li li a { padding-left: 45px; } +.tsd-navigation.primary ul li li li li a { padding-left: 65px; } +.tsd-navigation.primary ul li li li li li a { padding-left: 85px; } +.tsd-navigation.primary ul li li li li li li a { padding-left: 105px; } +.tsd-navigation.primary > ul { border-bottom: 1px solid #eee; } +.tsd-navigation.primary li { border-top: 1px solid #eee; } +.tsd-navigation.primary li.current > a { font-weight: bold; } +.tsd-navigation.primary li.label span { display: block; padding: 20px 0 6px 5px; color: #808080; } +.tsd-navigation.primary li.globals + li > span, .tsd-navigation.primary li.globals + li > a { padding-top: 20px; } + +.tsd-navigation.secondary ul { transition: opacity 0.2s; } +.tsd-navigation.secondary ul li a { padding-left: 25px; } +.tsd-navigation.secondary ul li li a { padding-left: 45px; } +.tsd-navigation.secondary ul li li li a { padding-left: 65px; } +.tsd-navigation.secondary ul li li li li a { padding-left: 85px; } +.tsd-navigation.secondary ul li li li li li a { padding-left: 105px; } +.tsd-navigation.secondary ul li li li li li li a { padding-left: 125px; } +.tsd-navigation.secondary ul.current a { border-left-color: #eee; } +.tsd-navigation.secondary li.focus > a, .tsd-navigation.secondary ul.current li.focus > a { border-left-color: #000; } +.tsd-navigation.secondary li.current { margin-top: 20px; margin-bottom: 20px; border-left-color: #eee; } +.tsd-navigation.secondary li.current > a { font-weight: bold; } + +@media (min-width: 901px) { .menu-sticky-wrap { position: static; } + .no-csspositionsticky .menu-sticky-wrap.sticky { position: fixed; } + .no-csspositionsticky .menu-sticky-wrap.sticky-current { position: fixed; } + .no-csspositionsticky .menu-sticky-wrap.sticky-current ul.before-current, .no-csspositionsticky .menu-sticky-wrap.sticky-current ul.after-current { opacity: 0; } + .no-csspositionsticky .menu-sticky-wrap.sticky-bottom { position: absolute; top: auto !important; left: auto !important; bottom: 0; right: 0; } + .csspositionsticky .menu-sticky-wrap.sticky { position: -webkit-sticky; position: sticky; } + .csspositionsticky .menu-sticky-wrap.sticky-current { position: -webkit-sticky; position: sticky; } } + +.tsd-panel { margin: 20px 0; padding: 20px; background-color: #fff; box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); } +.tsd-panel:empty { display: none; } +.tsd-panel > h1, .tsd-panel > h2, .tsd-panel > h3 { margin: 1.5em -20px 10px -20px; padding: 0 20px 10px 20px; border-bottom: 1px solid #eee; } +.tsd-panel > h1.tsd-before-signature, .tsd-panel > h2.tsd-before-signature, .tsd-panel > h3.tsd-before-signature { margin-bottom: 0; border-bottom: 0; } +.tsd-panel table { display: block; width: 100%; overflow: auto; margin-top: 10px; word-break: normal; word-break: keep-all; } +.tsd-panel table th { font-weight: bold; } +.tsd-panel table th, .tsd-panel table td { padding: 6px 13px; border: 1px solid #ddd; } +.tsd-panel table tr { background-color: #fff; border-top: 1px solid #ccc; } +.tsd-panel table tr:nth-child(2n) { background-color: #f8f8f8; } + +.tsd-panel-group { margin: 60px 0; } +.tsd-panel-group > h1, .tsd-panel-group > h2, .tsd-panel-group > h3 { padding-left: 20px; padding-right: 20px; } + +#tsd-search { transition: background-color 0.2s; } +#tsd-search .title { position: relative; z-index: 2; } +#tsd-search .field { position: absolute; left: 0; top: 0; right: 40px; height: 40px; } +#tsd-search .field input { box-sizing: border-box; position: relative; top: -50px; z-index: 1; width: 100%; padding: 0 10px; opacity: 0; outline: 0; border: 0; background: transparent; color: #222; } +#tsd-search .field label { position: absolute; overflow: hidden; right: -40px; } +#tsd-search .field input, #tsd-search .title { transition: opacity 0.2s; } +#tsd-search .results { position: absolute; visibility: hidden; top: 40px; width: 100%; margin: 0; padding: 0; list-style: none; box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); } +#tsd-search .results li { padding: 0 10px; background-color: #fdfdfd; } +#tsd-search .results li:nth-child(even) { background-color: #fff; } +#tsd-search .results li.state { display: none; } +#tsd-search .results li.current, #tsd-search .results li:hover { background-color: #eee; } +#tsd-search .results a { display: block; } +#tsd-search .results a:before { top: 10px; } +#tsd-search .results span.parent { color: #808080; font-weight: normal; } +#tsd-search.has-focus { background-color: #eee; } +#tsd-search.has-focus .field input { top: 0; opacity: 1; } +#tsd-search.has-focus .title { z-index: 0; opacity: 0; } +#tsd-search.has-focus .results { visibility: visible; } +#tsd-search.loading .results li.state.loading { display: block; } +#tsd-search.failure .results li.state.failure { display: block; } + +.tsd-signature { margin: 0 0 1em 0; padding: 10px; border: 1px solid #eee; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px; } +.tsd-signature.tsd-kind-icon { padding-left: 30px; } +.tsd-signature.tsd-kind-icon:before { top: 10px; left: 10px; } +.tsd-panel > .tsd-signature { margin-left: -20px; margin-right: -20px; border-width: 1px 0; } +.tsd-panel > .tsd-signature.tsd-kind-icon { padding-left: 40px; } +.tsd-panel > .tsd-signature.tsd-kind-icon:before { left: 20px; } + +.tsd-signature-symbol { color: #808080; font-weight: normal; } + +.tsd-signature-type { font-style: italic; font-weight: normal; } + +.tsd-signatures { padding: 0; margin: 0 0 1em 0; border: 1px solid #eee; } +.tsd-signatures .tsd-signature { margin: 0; border-width: 1px 0 0 0; transition: background-color 0.1s; } +.tsd-signatures .tsd-signature:first-child { border-top-width: 0; } +.tsd-signatures .tsd-signature.current { background-color: #eee; } +.tsd-signatures.active > .tsd-signature { cursor: pointer; } +.tsd-panel > .tsd-signatures { margin-left: -20px; margin-right: -20px; border-width: 1px 0; } +.tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon { padding-left: 40px; } +.tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon:before { left: 20px; } +.tsd-panel > a.anchor + .tsd-signatures { border-top-width: 0; margin-top: -20px; } + +ul.tsd-descriptions { position: relative; overflow: hidden; transition: height 0.3s; padding: 0; list-style: none; } +ul.tsd-descriptions.active > .tsd-description { display: none; } +ul.tsd-descriptions.active > .tsd-description.current { display: block; } +ul.tsd-descriptions.active > .tsd-description.fade-in { -webkit-animation: fade-in-delayed 0.3s; animation: fade-in-delayed 0.3s; } +ul.tsd-descriptions.active > .tsd-description.fade-out { -webkit-animation: fade-out-delayed 0.3s; animation: fade-out-delayed 0.3s; position: absolute; display: block; top: 0; left: 0; right: 0; opacity: 0; visibility: hidden; } +ul.tsd-descriptions h4, ul.tsd-descriptions .tsd-index-panel h3, .tsd-index-panel ul.tsd-descriptions h3 { font-size: 16px; margin: 1em 0 0.5em 0; } + +ul.tsd-parameters, ul.tsd-type-parameters { list-style: square; margin: 0; padding-left: 20px; } +ul.tsd-parameters > li.tsd-parameter-siganture, ul.tsd-type-parameters > li.tsd-parameter-siganture { list-style: none; margin-left: -20px; } +ul.tsd-parameters h5, ul.tsd-type-parameters h5 { font-size: 16px; margin: 1em 0 0.5em 0; } +ul.tsd-parameters .tsd-comment, ul.tsd-type-parameters .tsd-comment { margin-top: -0.5em; } + +.tsd-sources { font-size: 14px; color: #808080; margin: 0 0 1em 0; } +.tsd-sources a { color: #808080; text-decoration: underline; } +.tsd-sources ul, .tsd-sources p { margin: 0 !important; } +.tsd-sources ul { list-style: none; padding: 0; } + +.tsd-page-toolbar { position: absolute; z-index: 1; top: 0; left: 0; width: 100%; height: 40px; color: #333; background: #fff; border-bottom: 1px solid #eee; } +.tsd-page-toolbar a { color: #333; text-decoration: none; } +.tsd-page-toolbar a.title { font-weight: bold; } +.tsd-page-toolbar a.title:hover { text-decoration: underline; } +.tsd-page-toolbar .table-wrap { display: table; width: 100%; height: 40px; } +.tsd-page-toolbar .table-cell { display: table-cell; position: relative; white-space: nowrap; line-height: 40px; } +.tsd-page-toolbar .table-cell:first-child { width: 100%; } + +.tsd-widget:before, .tsd-select .tsd-select-label:before, .tsd-select .tsd-select-list li:before { content: ""; display: inline-block; width: 40px; height: 40px; margin: 0 -8px 0 0; background-image: url(../images/widgets.png); background-repeat: no-repeat; text-indent: -1024px; vertical-align: bottom; } +@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { .tsd-widget:before, .tsd-select .tsd-select-label:before, .tsd-select .tsd-select-list li:before { background-image: url(../images/widgets@2x.png); background-size: 320px 40px; } } + +.tsd-widget { display: inline-block; overflow: hidden; opacity: 0.6; height: 40px; transition: opacity 0.1s, background-color 0.2s; vertical-align: bottom; cursor: pointer; } +.tsd-widget:hover { opacity: 0.8; } +.tsd-widget.active { opacity: 1; background-color: #eee; } +.tsd-widget.no-caption { width: 40px; } +.tsd-widget.no-caption:before { margin: 0; } +.tsd-widget.search:before { background-position: 0 0; } +.tsd-widget.menu:before { background-position: -40px 0; } +.tsd-widget.options:before { background-position: -80px 0; } +.tsd-widget.options, .tsd-widget.menu { display: none; } +@media (max-width: 900px) { .tsd-widget.options, .tsd-widget.menu { display: inline-block; } } +input[type=checkbox] + .tsd-widget:before { background-position: -120px 0; } +input[type=checkbox]:checked + .tsd-widget:before { background-position: -160px 0; } + +.tsd-select { position: relative; display: inline-block; height: 40px; transition: opacity 0.1s, background-color 0.2s; vertical-align: bottom; cursor: pointer; } +.tsd-select .tsd-select-label { opacity: 0.6; transition: opacity 0.2s; } +.tsd-select .tsd-select-label:before { background-position: -240px 0; } +.tsd-select.active .tsd-select-label { opacity: 0.8; } +.tsd-select.active .tsd-select-list { visibility: visible; opacity: 1; transition-delay: 0s; } +.tsd-select .tsd-select-list { position: absolute; visibility: hidden; top: 40px; left: 0; margin: 0; padding: 0; opacity: 0; list-style: none; box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); transition: visibility 0s 0.2s, opacity 0.2s; } +.tsd-select .tsd-select-list li { padding: 0 20px 0 0; background-color: #fdfdfd; } +.tsd-select .tsd-select-list li:before { background-position: 40px 0; } +.tsd-select .tsd-select-list li:nth-child(even) { background-color: #fff; } +.tsd-select .tsd-select-list li:hover { background-color: #eee; } +.tsd-select .tsd-select-list li.selected:before { background-position: -200px 0; } +@media (max-width: 900px) { .tsd-select .tsd-select-list { top: 0; left: auto; right: 100%; margin-right: -5px; } + .tsd-select .tsd-select-label:before { background-position: -280px 0; } } + +img { max-width: 100%; } diff --git a/documents/6.5.1/api reference/assets/css/main.css.map b/documents/6.5.1/api reference/assets/css/main.css.map new file mode 100644 index 00000000..bc17fe48 --- /dev/null +++ b/documents/6.5.1/api reference/assets/css/main.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "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", +"sources": ["../../../../src/default/assets/css/vendors/_normalize.sass","../../../../src/default/assets/css/vendors/_highlight.js.sass","../../../../src/default/assets/css/setup/_mixins.sass","../../../../src/default/assets/css/setup/_grid.sass","../../../../src/default/assets/css/setup/_icons.scss","../../../../src/default/assets/css/setup/_animations.sass","../../../../src/default/assets/css/setup/_typography.sass","../../../../src/default/assets/css/_constants.sass","../../../../src/default/assets/css/layouts/_default.sass","../../../../src/default/assets/css/layouts/_minimal.sass","../../../../src/default/assets/css/elements/_comment.sass","../../../../src/default/assets/css/elements/_filter.sass","../../../../src/default/assets/css/elements/_footer.sass","../../../../src/default/assets/css/elements/_hierarchy.sass","../../../../src/default/assets/css/elements/_index.sass","../../../../src/default/assets/css/elements/_member.sass","../../../../src/default/assets/css/elements/_navigation.sass","../../../../src/default/assets/css/elements/_panel.sass","../../../../src/default/assets/css/elements/_search.sass","../../../../src/default/assets/css/elements/_signatures.sass","../../../../src/default/assets/css/elements/_sources.sass","../../../../src/default/assets/css/elements/_toolbar.sass","../../../../src/default/assets/css/elements/_images.sass"], +"names": [], +"file": "main.css" +} diff --git a/documents/6.5.1/api reference/assets/images/icons.png b/documents/6.5.1/api reference/assets/images/icons.png new file mode 100644 index 00000000..cb2d1157 Binary files /dev/null and b/documents/6.5.1/api reference/assets/images/icons.png differ diff --git a/documents/6.5.1/api reference/assets/images/icons@2x.png b/documents/6.5.1/api reference/assets/images/icons@2x.png new file mode 100644 index 00000000..8932ba20 Binary files /dev/null and b/documents/6.5.1/api reference/assets/images/icons@2x.png differ diff --git a/documents/6.5.1/api reference/assets/images/widgets.png b/documents/6.5.1/api reference/assets/images/widgets.png new file mode 100644 index 00000000..c7380532 Binary files /dev/null and b/documents/6.5.1/api reference/assets/images/widgets.png differ diff --git a/documents/6.5.1/api reference/assets/images/widgets@2x.png b/documents/6.5.1/api reference/assets/images/widgets@2x.png new file mode 100644 index 00000000..4bbbd572 Binary files /dev/null and b/documents/6.5.1/api reference/assets/images/widgets@2x.png differ diff --git a/documents/6.5.1/api reference/assets/js/main.js b/documents/6.5.1/api reference/assets/js/main.js new file mode 100644 index 00000000..528a3b02 --- /dev/null +++ b/documents/6.5.1/api reference/assets/js/main.js @@ -0,0 +1,5 @@ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function s(a){var b=a.length,c=n.type(a);return"function"!==c&&!n.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a))}function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}function D(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),"string"==typeof(c=a.getAttribute(d))){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c)}catch(e){}M.set(a,b,c)}else c=void 0;return c}function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("