diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..90b92e88
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,67 @@
+.DS_Store
+node_modules
+dist
+build
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
+
+__pycache__
+~~*
+--*
+==*
+package-lock.json
+yarn.lock
+.git
+/*.zip
+/*.py
+/*.exe
+/*.jar
+/*.md
+/*.json
+/*.js
+/*.txt
+/.gitattributes
+/.*ignore
+/DBR-*
+/src
+/Web.config
+
+!/dist
+/dist/*
+#!/dist/class
+#!/dist/enum
+#!/dist/interface
+!/dist/dbr.js
+!/dist/dbr.mjs
+!/dist/dbr.browser.mjs
+!/dist/dbr-*.worker.js
+!/dist/dbr-*.wasm.js
+!/dist/dbr-*.wasm
+!/dist/dbr.d.ts
+!/dist/dbr.reference.d.ts
+!/dist/dbr.scanner.html
+!/dist/README.md
+
+!/README.md
+!/package.json
+!/LICENSE
+
+!bower.json
+!composer.json
+!package.js
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
index 41df5664..446faf86 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,5 @@
-Copyright © 2003–2026 Dynamsoft. All Rights Reserved.
+For web:
+https://www.dynamsoft.com/Products/barcode-reader-license-agreement.aspx#javascript
-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
+For node:
+https://www.dynamsoft.com/Products/barcode-reader-license-agreement.aspx
\ 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
-
-Internet connection
-A supported browser
-Camera access
-
-
- 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 >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
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 .
-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 interface with the method setInput().
-js
-cvRouter.setInput(cameraEnhancer);
-
-> The image source in our case is a CameraEnhancer 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 interface. The CapturedResultReceiver object is registered to cvRouter via the method addResultReceiver(). For more information, please check out 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 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 .
-
-
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 >
-
-
-
-In frameworks like React, Vue and Angular, you may want to add the package as a dependency.
-
-
npm i dynamsoft-barcode-reader-bundle@11.4.2000 -E
-
- 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 "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:
-
<script src ="path/to/dynamsoft-barcode-reader-bundle@11.4.2000/dist/dbr.bundle.js" > </script >
-
-
-
-
Note :
-
-Certain legacy web application servers may lack support for the application/wasm mimetype for .wasm files. To address this, you have two options:
-
-
-Upgrade your web application server to one that supports the application/wasm mimetype.
-Manually define the mimetype on your server. You can refer to the guides for apache / IIS / nginx .
-
-
-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.
-
-
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.).
-
-import { CoreModule } from "dynamsoft-barcode-reader-bundle" ;
-CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/" ;
-
-
-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.
-
-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 ;
-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) {
-
- 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) {
-
- 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:
-
-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.
-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.
-
-
await cameraEnhancer.open();
-await cvRouter.startCapturing("ReadSingleBarcode" );
-
-
Note :
-
-cvRouter is engineered to consistently request images from the image source.
-Various preset templates are at your disposal for barcode reading:
-
-
-
-
-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.
-
-
-
-
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;
-
-await cvRouter.addResultReceiver({
-
- onCapturedResultReceived : (result ) => {
-
- 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;
- if (image) document .body.appendChild(image.toCanvas());
- for (let item of barcodeResultItems) {
-
- 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);
-
-cameraEnhancer.setScanRegion({
- x : 25 ,
- y : 25 ,
- width : 50 ,
- height : 50 ,
- isMeasuredInPercentage : true ,
-});
-
-
Note :
-
-By configuring the region at the image source, images are cropped before processing, removing the need to adjust any further processing settings.
-cameraEnhancer enhances interactivity by overlaying a mask on the video, clearly marking the scanning region.
-
-
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
-
-"/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.
-
await cvRouter.initSettings("PATH-TO-THE-FILE" );
-await cvRouter.startCapturing("ReadSingleBarcode" );
-
-
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 :
-
-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.
-
-
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 :
-
-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.
-
-
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 );
-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
-
-let cameraView = await Dynamsoft.DCE.CameraView.createInstance();
-
-let cameraView1 = await Dynamsoft.DCE.CameraView.createInstance('@engineResourcePath/dce.ui.v5.xml' );
-
-let cameraView2 = await Dynamsoft.DCE.CameraView.createInstance(document .getElementById('my-ui' ));
-
-let cameraView3 = await Dynamsoft.DCE.CameraView.createInstance('url/to/my/ui.xml' );
-
-
-let uiElement = cameraView.getUIElement();
-
-uiElement.querySelector('.dce-sel-camera' ).remove();
-
-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
-
-Learn how to Use in Framework
-Check out the Official Samples and Demo
-Learn about the APIs of the SDK
-
-
-
-
\ No newline at end of file
diff --git a/README.md b/README.md
index 34de0fef..603b838f 100644
--- a/README.md
+++ b/README.md
@@ -1,725 +1,731 @@
-# Barcode Reader for Your Website - Foundational API Guide
+# Dynamsoft JavaScript Barcode SDK for Web
-[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)
+[Dynamsoft BarcodeReader SDK for Web](https://www.dynamsoft.com/Products/barcode-recognition-javascript.aspx) is a JavaScript library for barcode scanning based on the **WebAssembly** technology. It supports real-time localization and decoding of various barcode types. The library is capable of scanning barcodes from static images as well as directly from live video streams. It also supports reading multiple barcodes at once.
-## Hello World - Simplest Implementation
+> Also see [Dynamsoft JavaScript Barcode SDK for Node](https://github.com/dynamsoft-dbr/node-javascript-barcode).
-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.
+## Install
-**Basic Requirements**
+yarn
+```
+$ yarn add dynamsoft-javascript-barcode
+```
- - Internet connection
- - A supported browser
- - Camera access
+npm
+```
+$ npm install dynamsoft-javascript-barcode --save
+```
-> Please refer to [system requirements](https://www.dynamsoft.com/faq/barcode-reader/web/capabilities/system-requirement.html) for more details.
+cdn
+```html
+
+
+
+```
-### Understand the code
+[Download zip](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx?edition=js)
-The complete code of the "Hello World" example is shown below
+## Quick Usage
```html
-
-
-
-
+
+
```
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
------
-
-#### 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).
+[Vue example](https://github.com/dynamsoft-dbr/javascript-barcode/tree/master/example/web/vue)
-## Preparing the SDK
+[React example](https://github.com/dynamsoft-dbr/javascript-barcode/tree/master/example/web/react)
-### Step 1: Include the SDK
+[Angular example](https://github.com/dynamsoft-dbr/javascript-barcode/tree/master/example/web/angular)
-
-
+
-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**.
+## Table of Contents
+- [Install](#install)
+- [Quick Usage](#quick-usage)
+- [Features](#features)
+- [Live Demo](#live-demo)
+- [Getting Started: HelloWorld](#getting-started-helloworld)
+- [Taking a closer look](#taking-a-closer-look)
+ - [Initializing](#initializing)
+ - [Configuring Scanner Settings](#configuring-scanner-settings)
+ - [Customizing the UI](#customizing-the-ui)
+- [Advanced Usage](#advanced-usage)
+ - [Print out log for better debugging](#print-out-log-for-better-debugging)
+ - [Show found barcodes](#show-found-barcodes)
+ - [Read a specific area/region](#read-a-specific-arearegion)
+- [Self-hosted | Offline | Intranet Deployment](#self-hosted--offline--intranet-deployment)
+- [Known Issues](#known-issues)
+- [Changelog](#changelog)
+- [How to Upgrade](#how-to-upgrade)
+- [API Documentation](#api-documentation)
+- [License Activation](#license-activation)
+- [License Agreement](#license-agreement)
+- [Contact Us](#contact-us)
-- jsDelivr
+## Features
- ```html
-
- ```
+#### Supported Symbologies:
-- UNPKG
+ 1D barcode: **`Code 39`**, **`Code 128`**, **`Code 93`**, **`Codabar`**, **`Interleaved 2 of 5 (ITF)`**, **`EAN-13`**, **`EAN-8`**, **`UPC-A`**, **`UPC-E`**, **`Industrial 2 of 5`** (Code 2 of 5 Industry, Standard 2 of 5, Code 2 of 5), **`Code 39 Extended`**.
- ```html
-
- ```
+ 2D barcode: **`PDF417`**, **`QR`**, **`DataMatrix`**, **`Aztec`**, **`MaxiCode`**, **`Dot Code`**.
-
+ Patch Code
-- In frameworks like React, Vue and Angular, you may want to add the package as a dependency.
+ GS1 Composite Code
- ```sh
- npm i dynamsoft-barcode-reader-bundle@11.4.2000 -E
- # or
- yarn add dynamsoft-barcode-reader-bundle@11.4.2000 -E
- ```
+ Postal Code: **`USPS Intelligent Mail`**, **`PostNet`**, **`Planet`**, **`Australian Post`**, **`UK Royal Mail (RM4SCC)`**.
- NOTE that in frameworks, you need to [specify the location of the engine files](#2-optional-specify-the-location-of-the-engine-files).
-
+* Supported Data Sources: **`Blob`**, **`HTMLImageElement`**, **`HTMLVideoElement`**, and **`URL`**, etc.
-
-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.
+ * Unlike typical server-based applications, this library requires some advanced features which fortunately are supported by all mainstream modern browsers. These advanced features are listed below:
+ * [MediaDevices/getUserMedia](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia)
+ * Required only for in-browser video streaming. If a browser doesn't have this API the [Single Frame Mode](https://www.dynamsoft.com/help/Barcode-Reader-wasm/classes/barcodescanner.html#singleframemode) is used automatically. If the API exists but doesn't work correctly, [Single Frame Mode](https://www.dynamsoft.com/help/Barcode-Reader-wasm/classes/barcodescanner.html#singleframemode) can be used as an alternative.
+ * [WebAssembly](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/WebAssembly), [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob), [URL/createObjectURL](https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL), [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API)
+ * These four features are required for the library to work.
+
+ * Combining the requirements above results in the following table of supported browsers.
-- From the website
+ > **NOTE**: Apart from the browsers, the operating systems running on the target devices may also impose some limitations of their own that could restrict the use of the library. Therefore, the following table serves as a rough estimation instead of an accurate guideline. Browser compatibility ultimately depends on whether the browser on that particular operating system supports the features listed above.
- [Download Dynamsoft Barcode Reader JavaScript Package](https://www.dynamsoft.com/barcode-reader/downloads/?ver=11.4.20&utm_source=github&product=dbr&package=js)
+ | Browser Name | Version |
+ |:-:|:-:|
+ | Chrome | v57+ (v59+ on Android/iOS1 ) |
+ | Firefox | v52+ (v55+ on Android/iOS1 ) |
+ | Edge2 | v16+ |
+ | Safari3 | v11+ |
- The resources are located at path `dynamsoft/distributables/@`.
+ 1 Video streaming is not supported in Chrome/Firefox on iOS.
-- From npm
+ 2 On Edge, due to strict Same-origin policy, you must host the library in the same domain as your web page.
- ```sh
- npm i dynamsoft-barcode-reader-bundle@11.4.2000 -E
- ```
+ 3 Safari 11.2.2 ~ 11.2.6 are not supported.
- 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:
+#### Compact and Full Editions
-```html
-
-```
-
+ As more features are being added to the library, the supporting `wasm` file is getting larger. For flexibility, we provide two editions. The compact edition has fewer features but downloads and compiles faster; on the other hand, the full edition has all features built-in.
-
+ | Features | Compact edition | Full edition |
+ |:-:|:-:|:-:|
+ | `wasm` size1 \(gzip\) | 810KB | 1.1 MB |
+ | 1D | ✓ | ✓ |
+ | QR | ✓ | ✓ |
+ | Mirco QR | - | ✓ |
+ | PDF417 | ✓ | ✓ |
+ | Mirco PDF417 | - | ✓ |
+ | DataMatrix | ✓ | ✓ |
+ | Aztec | - | ✓ |
+ | MaxiCode | - | ✓ |
+ | Patch Code | - | ✓ |
+ | GS1 Composite Code | - | ✓ |
+ | GS1 DataBar | - | ✓ |
+ | Dot Code | - | ✓ |
+ | Postal Code | - | ✓ |
+ | DPM | - | ✓ |
+ | getRuntimeSettings | ✓ | ✓ |
+ | updateRuntimeSettings | ✓ | ✓ |
+ | getIntermediateResults | - | ✓ |
+ | initRuntimeSettingsWithString | - | ✓ |
+ | outputSettingsToString | - | ✓ |
+ | **recommended scenario2 ** | Customer Facing Application | Enterprise Solution |
-*Note*:
+ 1 The `wasm` file size is based on version 7.2.2. In later versions, the size may differ.
-* 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).
+ 2 The compact edition downloads and compiles faster, which makes it more suitable for the scenario where a customer only needs to scan a barcode once. In comparison, scenarios where an employee needs to scan lots of barcodes continuously or where uncommon barcodes or advanced features are required, use the full edition by simply setting the following before you call `loadWasm` or `CreateInstance`.
-* 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.
+ `Dynamsoft.BarcodeReader._bUseFullFeature = true;`
- ```
- Cache-Control: max-age=31536000
- ```
+## Live Demo
- Reference: [Cache-Control](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control).
+The following is a screenshot of the live demo. Try it [here](https://demo.dynamsoft.com/dbr_wasm/barcode_reader_javascript.html).
-### 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.
+## Getting Started: HelloWorld
-```javascript
-Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
-```
+This section will help you use the library to build a simple web application to decode barcodes from a video stream.
-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.
+**Basic Requirements**
-> 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.
+* Internet connection
+* Supported Browser
+* Camera access
-#### 2. [Optional] Specify the location of the "engine" files
+### Step One: Write code in one minute!
-This step is generally necessary when utilizing frameworks such as Angular, React, Vue, or when managing the hosting of resource files yourself.
+Create an HTML file with the following content. Deploy this to your web server and run the application over **HTTPS**.
-The purpose is to tell the SDK where to find the engine files (\*.worker.js, \*.wasm.js and \*.wasm, etc.).
+* You will need to replace PRODUCT-KEYS with a trial key for the sample code to work correctly. You can acquire a trial key [here](https://www.dynamsoft.com/CustomerPortal/Portal/TrialLicense.aspx).
+* If you don't have a ready-to-use web server and you happen to have a package manager like `npm` or `yarn`, you can set up a simple http server in minutes. Check out http-server on [npm](https://www.npmjs.com/package/http-server) or [yarn](https://yarnpkg.com/en/package/http-server).
-```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/";
+```html
+
+
+
+
+
+
+
+
```
-These code uses the jsDelivr CDN as an example, feel free to change it to your own location.
+[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/pL4e7yrd/)
-## Using the SDK
+### Step Two: Tackle a few issues.
-### Step 1: Preload the module
+Open the file in your browser and there will be a pop-up asking for permission to access the camera. Once the access is granted, you will see the video stream in the default UI of the **BarcodeScanner**.
-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.
+> **Note**: If you don't see the pop-up, wait a few seconds for the initialization to finish.
-```js
-// Preload the .wasm files
-Dynamsoft.Core.CoreModule.loadWasm();
-```
+##### **Possible Scenario 1**
-### Step 2: Create a CaptureVisionRouter object
+If you open the HTML file as `file:///` or `http://`, the following error may appear in the browser console:
-To use the SDK, we first create a `CaptureVisionRouter` object.
+> [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.
-```javascript
-Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
+In Safari 12 the error is
-let cvRouter = null;
-try {
- cvRouter = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
-} catch (ex) {
- console.error(ex);
-}
-```
+> Trying to call getUserMedia from an insecure document.
-*Tip*:
+As the error states, to access the camera with the API [getUserMedia](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia), a secure channel (`https://`) is required.
-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:
+> **Note**: If you use Chrome or Firefox, you might not get the error because these two browsers allow camera access via `file:///` and `http://localhost`.
-```javascript
-Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
+To make sure your web application can access the camera, try to configure your web server to support HTTPS. The following links may help.
-let pCvRouter = null; // The helper variable which is a promise of cvRouter
-let cvRouter = null;
+- 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)
+- Node.js: [npm tls](https://nodejs.org/docs/v0.4.1/api/tls.html)
-document.getElementById('btn-scan').addEventListener('click', async () => {
- try {
- cvRouter = await (pCvRouter = pCvRouter || Dynamsoft.CVR.CaptureVisionRouter.createInstance());
- } catch (ex) {
- console.error(ex);
- }
-});
-```
+##### **Possible Scenario 2**
-### Step 3: Connect an image source
+For testing purposes, a self-signed certificate can be used when configuring HTTPS. When accessing the site, the browser might say "`the site is not secure`". In this case, go to the certificate settings and trust this certificate.
-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`.
+> In a production environment, you will need a valid HTTPS certificate that does not have this issue. If you don't have one yet, you can get a free one from [Let’s Encrypt](https://letsencrypt.org/). We recommend obtaining a paid certificate from companies such as Verisign, GeoTrust, etc.
-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.
+### Step Three: Time to scan!
-```html
-
-```
+Put something with a barcode in front of the camera and you'll see it located and decoded right in the UI.
-```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);
-```
+### Step Four: Dive into the code
+
+Now, take a look at the sample code. You can find that there is nothing but two scripts inside the ``
-### Step 4: Register a result receiver
+* The following script includes the core library in the application via a [jsDelivr](https://www.jsdelivr.com/) CDN
+
+ ```javascript
+
+ ```
+
+ The same can be done with other CDNs like `unpkg`
+
+ ```javascript
+
+ ```
-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`:
-
+ > **NOTE**: : Since we do change the library a bit in each release, to make sure your application doesn't get interrupted by automatic updates, use a specific version in your production environment, as shown above. Using a general major version like `@7` is not recommended.
-```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);
-```
+* The following script initializes and uses the library
+
+ ```javascript
+
+ ```
+ For now, pay attention to the following two events.
-You can also write code like this. It is the same.
+ * `onFrameRead`
+ This event is triggered after each single frame is scanned. The `results` object contains all the barcode results that the library found on this frame.
+ * `onUnduplicatedRead`
+ This event is triggered when a new barcode (not a duplicate) is found. `txt` holds the barcode text value while `result` is an object that holds details of the found barcode.
-```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`;
- }
- }
-}});
-```
+In the following sections, you'll find more detailed information on how the library works and how you can customize it to your needs.
-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.
+## Taking a closer look
-### Step 5: Start process video frames
+### Initializing
-With the setup now complete, we can proceed to process the images in two straightforward steps:
+The library is based on the `WebAssembly` standard; therefore, **on first use**, it needs some time to download and compile the `wasm` files. After the first use, the browser may cache the file so that the next time no 'downloading' is required.
-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.
+`Dynamsoft.BarcodeReader.loadWasm` is the API to start the initialization.
-```javascript
-await cameraEnhancer.open();
-await cvRouter.startCapturing("ReadSingleBarcode");
+```js
+try{
+ await Dynamsoft.BarcodeReader.loadWasm();
+}catch(ex){
+ console.error(ex);
+}
```
-*Note*:
+That said, as shown in the sample above, you don't necessarily need to call the above API because other APIs like `Dynamsoft.BarcodeReader.createInstance` and `Dynamsoft.BarcodeScanner.createInstance` will call `loadWasm` themselves.
-* `cvRouter` is engineered to consistently request images from the image source.
-* Various preset templates are at your disposal for barcode reading:
+```js
+let reader = null;
+let scanner = null;
+try{
+ reader = await Dynamsoft.BarcodeReader.createInstance();
+ scanner = await Dynamsoft.BarcodeScanner.createInstance();
+}catch(ex){
+ console.error(ex);
+}
+```
-| 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. |
+> **NOTE**: Including the library with a script tag doesn't automatically initialize the library. For better performance, you may want to call `loadWasm` to download and compile the `wasm` file in advance and create a reader or scanner instance later.
-Read more on the [preset CaptureVisionTemplates](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/preset-templates.html).
+The detailed initialization includes the following steps:
-## Customizing the process
+#### 1. Download
-### 1. Adjust the preset template settings
+Download the necessary resources. Usually, we deploy the resources on CDN and set a long cache duration. If your web server is faster, you should put the resources on your own server instead of the CDN.
-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).
+#### 2. Compile
-#### 1.1. Change barcode settings
+The `wasm` files are automatically compiled once downloaded. The compilation time varies among different devices & browsers. While it takes less than a second on latest phones or PCs, it may take seconds or longer on some older devices.
-The preset templates can be updated to meet different requirements. For example, the following code limits the barcode format to QR code.
+#### 3. Initialize
-```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");
-```
+The library needs to initialize every time the page loads. The initialization means creating an `BarcodeReader`or `BarcodeScanner` instance with specified settings.
-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).
-#### 1.2. Retrieve the original image
+### Configuring Scanner Settings
-Additionally, we have the option to modify the template to retrieve the original image containing the barcode.
+When creating an instance of the `BarcodeScanner` object, there are several configuration options. The following code shows some of the most useful ones:
-```javascript
-let settings = await cvRouter.getSimplifiedSettings("ReadSingleBarcode");
-settings.outputOriginalImage = true;
-await cvRouter.updateSettings("ReadSingleBarcode", settings);
-await cvRouter.startCapturing("ReadSingleBarcode");
+```js
+// set which camera and what resolution to use
+await scanner.updateVideoSettings({ video: { width: 1280, height: 720, facingMode: "environment" } });
+
+// use one of three built-in RuntimeSetting templates, 'speed' is recommended for decoding from a video stream
+await scanner.updateRuntimeSettings("speed");
+
+// make changes to the template. The code snippet below demonstrates how to specify which symbologies are enabled
+let runtimeSettings = await scanner.getRuntimeSettings();
+runtimeSettings.barcodeFormatIds = Dynamsoft.EnumBarcodeFormat.BF_ONED | Dynamsoft.EnumBarcodeFormat.BF_QR_CODE;
+await scanner.updateRuntimeSettings(runtimeSettings);
+
+// set up the scanner behavior
+let scanSettings = await scanner.getScanSettings();
+ // disregard duplicated results found in a specified time period
+scanSettings.duplicateForgetTime = 20000;
+ // set a scan interval so the library may release the CPU from time to time
+scanSettings.intervalTime = 300;
+await scanner.updateScanSettings(scanSettings);
```
-Limit the barcode format to QR code, and retrieve the original image containing the barcode, at the same time.
+[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/yfkcajxz/)
-```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");
-```
+As you can see in the code, there are three categories of configurations.
-Please be aware that it is necessary to update the `CapturedResultReceiver` object to obtain the original image. For instance:
+* `get/updateVideoSettings`: Configures the data source, i.e., the video stream. These settings include which camera to use, the resolution, etc.. Learn more [here](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Syntax).
+* `get/updateRuntimeSettings`: Configures the decode engine. Find a full list of these settings and their corresponding descriptions [here](https://www.dynamsoft.com/help/Barcode-Reader/struct_dynamsoft_1_1_barcode_1_1_public_runtime_settings.html).
+[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/f24h8c1m/)
+
+ e.g.
+ ```js
+ await barcodeScanner.updateRuntimeSettings("speed");
+ ```
+ ```js
+ await barcodeScanner.updateRuntimeSettings("balance");
+ ```
+ ```js
+ await barcodeScanner.updateRuntimeSettings("coverage");
+ ```
+ ```js
+ let settings = await barcodeScanner.getRuntimeSettings();
+ settings.localizationModes = [
+ Dynamsoft.EnumLocalizationMode.LM_CONNECTED_BLOCKS,
+ Dynamsoft.EnumLocalizationMode.LM_SCAN_DIRECTLY,
+ Dynamsoft.EnumLocalizationMode.LM_LINES, 0, 0, 0, 0, 0];
+ settings.deblurLevel = 2;
+ await barcodeScanner.updateRuntimeSettings(settings);
+ ```
+* `get/updateScanSettings`: Configures the behavior of the scanner which includes `duplicateForgetTime`, `intervalTime` and `filter`, etc.
-```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}`);
- }
- }
- },
-});
-```
+### Customizing the UI
-#### 1.3. Change reading frequency to save power
+While the library provides a built-in `BarcodeScanner` which has its own UI, feel free to customize it.
-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:
+The default scanner UI is defined in the file `dist/dbr.scanner.html`. There are 3 ways to customize it:
-> 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.
+1. Modify the file `dist/dbr.scanner.html` directly (only possible when you deploy these files yourself instead of using the CDN).
+2. Copy the file `dist/dbr.scanner.html`, modify it and specify the new file as the default UI by its URL `Dynamsoft.BarcodeScanner.defaultUIElementURL = url`. Note that you must set `defaultUIElementURL` before you call `createInstance`.
+3. Build the UI into your own web page and call `scanner.setUIElement(HTMLElement)` to specify that element.
-```javascript
-let settings = await cvRouter.getSimplifiedSettings("ReadSingleBarcode");
-settings.minImageCaptureInterval = 500;
-await cvRouter.updateSettings("ReadSingleBarcode", settings);
-await cvRouter.startCapturing("ReadSingleBarcode");
+The following introduces the 3rd way. Check out the following code on how it's done.
+
+```html
+
+
+
+
+
+
+
+
+
+
+
```
+[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/2jzeq1r6/)
-#### 1.4. Specify a scan region
+The code has set the element `div-video-container` as the UI and inside it there is a video element for showing the video stream.
-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.
+> **NOTE**: The class name of the video element must be set to `dbrScanner-video`.
+>
+> ```html
+>
+> ```
-```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,
-});
-```
+Next, you can add the camera list and resolution list.
-*Note*:
+> If the class names match the default ones which are `dbrScanner-sel-camera` and `dbrScanner-sel-resolution`, the library will automatically populate the lists and handle the camera/resolution switching automatically.
-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.
+```html
+
+```
+[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/nbj75vxu/)
-*See Also*:
+```html
+
+```
-[CameraEnhancer::setScanRegion](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/api-reference/acquisition.html#setscanregion)
+> 8 default resolutions will automatically show up.
-
+> **Possible Issue**: : Generally you need to provide a resolution that the camera supports. However, in case a camera does not support a specified resolution, it usually will just use the nearest supported resolution. As a result, the selected resolution may not be the actual resolution.
+>
+> **Solution**: To take care of this issue, you can add an option with the class name `dbrScanner-opt-gotResolution` (as shown above) which the library will then use to show the actual resolution being used.
+[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/tnfjks4q/)
-### 2. Edit the preset templates directly
+Switch to the selected camera.
-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
+```js
+cameraList.onchange = async() => {
+ await scanner.setCurrentCamera(cameraList.options[cameraList.selectedIndex].value);
+};
+```
-* "/dynamsoft-barcode-reader-js-11.4.2000/dist/templates/"
+[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/2L9ta7mj/)
-Upon completing the template editing, you can invoke the `initSettings` method and provide it with the template path as an argument.
+If you have more than one camera and would like to use a certain one of them. Try out the code below.
-```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.
+```js
+await barcodeScanner.show();
+let allCameras = await barcodeScanner.getAllCameras();
+for (let camera of allCameras) {
+ if (camera.label == 'Your-Camera-Name') {
+ await barcodeScanner.setCurrentCamera(camera.deviceId);
+ break;
+ }
+}
```
-### 3. [Important] Filter the results
+[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/kLvgt3w2/)
-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:
+For resolution list, you can show your preferred resolutions and use the API `setResolution` to set the selected option.
-#### Method 1: Verify results across multiple frames
+```html
+
+ 1920 x 1080
+ 1280 x 720
+ 640 x 480
+
+```
-```js
-let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter();
-filter.enableResultCrossVerification("barcode", true);
-await cvRouter.addResultFilter(filter);
+```javascript
+let resolutionList = document.getElementById("custom-camera-resolution");
+resolutionList.onchange = async() => {
+ await barcodeScanner.setResolution(
+ resolutionList.options[resolutionList.selectedIndex].getAttribute("data-width"),
+ resolutionList.options[resolutionList.selectedIndex].getAttribute("data-height")
+ );
+};
```
-*Note*:
+[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/djhvno5b/)
+-->
-* `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.
+## Advanced Usage
-#### Method 2: Eliminate redundant results detected within a short time frame
+### **Print out log for better debugging**
+Include the following in your code to print internal logs in the console.
-```js
-let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter();
-filter.enableResultDeduplication("barcode", true);
-await cvRouter.addResultFilter(filter);
+```javascript
+Dynamsoft.BarcodeReader._onLog = console.log;
```
-*Note*:
+### Show found barcodes
-* `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.
+Try the following code to show found barcodes in `input` elements on the page
+```html
+
+
+
+```
-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.
+```js
+let iptIndex = 0;
+let scanner = null;
+(async()=>{
+ scanner = await Dynamsoft.BarcodeScanner.createInstance();
+ await scanner.setUIElement(document.getElementById('div-video-container'));
+ scanner.onFrameRead = results => {console.log(results);};
+ scanner.onUnduplicatedRead = (txt)=>{
+ document.getElementById('ipt-' + iptIndex).value = txt;
+ if(3 == ++iptIndex){
+ scanner.onUnduplicatedRead = undefined;
+ // Hide the scanner if you only need to read these three barcodes
+ scanner.hide();
+ }
+ };
+ await scanner.show();
+})();
+```
+[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/tz9ngm2a/)
-> 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.
+### Read a specific area/region
-Under certain circumstances, this duration can be extended with the method `setDuplicateForgetTime()`.
+To speed up the scanning process, you can choose to scan only a specific area/region.
-```js
-let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter();
-filter.setDuplicateForgetTime("barcode", 5000); // Extend the duration to 5 seconds.
-await cvRouter.addResultFilter(filter);
+```javascript
+let settings = await scanner.getRuntimeSettings();
+/*
+ * 1 means true
+ * Using a percentage is easier
+ * The following code shrinks the decoding region by 25% on all sides
+ */
+settings.region.regionMeasuredByPercentage = 1;
+settings.region.regionLeft = 25;
+settings.region.regionTop = 25;
+settings.region.regionRight = 75;
+settings.region.regionBottom = 75;
+await scanner.updateRuntimeSettings(settings);
```
+[Try in JSFiddle](https://jsfiddle.net/DynamsoftTeam/taykq592/)
-You can also enable both options at the same time:
+## Self-hosted | Offline | Intranet Deployment
-```js
-let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter();
-filter.enableResultCrossVerification("barcode", true);
-filter.enableResultDeduplication("barcode", true);
-filter.setDuplicateForgetTime("barcode", 5000);
-await cvRouter.addResultFilter(filter);
-```
+For commercial usage, we highly recommend self-hosted deployment. The following steps guide you through how to deploy the library on your own server.
-### 4. Add feedback
+* **Step one**: Place the files
+
+
+Locate the following files and place them in the same directory on your server. You can get them in `dist/`.
+
+ ```
+ dbr.js // For
```
-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).
+* If you have deployed the library files on your own server, you'll need to replace the old files with the new version. Download the latest version [here](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx).
-## Documentation
+#### From versions prior to`7.2.2-v2` to `7.3.0-v0`
-### API Reference
+Dynamsoft made several changes in the version `7.2.2-v2`; therefore it may take a bit more effort to upgrade the library from an older version to the version `7.2.2-v2` or a later version including the latest `7.3.0-v0` (as of January 2020). Apart from changing the code to include the correct version of the library, you'll also need to make changes to your code related to the APIs of the library. Check out [this post](https://blog.dynamsoft.com/insights/dynamsoft-barcode-reader-sdk-for-javascript-upgrade-from-v7-1-3-to-v7-2-2/) for more information. If you need further assistance with the upgrade, please feel free to contact [Dynamsoft Support](#contact-us).
-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).
-
-- Secure context (HTTPS deployment)
+[Online Document](https://www.dynamsoft.com/help/Barcode-Reader-wasm/)
- When deploying your application / website for production, make sure to serve it via a secure HTTPS connection. This is required for two reasons
-
- - Access to the camera video stream is only granted in a security context. Most browsers impose this restriction.
- > Some browsers like Chrome may grant the access for `http://127.0.0.1` and `http://localhost` or even for pages opened directly from the local disk (`file:///...`). This can be helpful for temporary development and test.
-
- - Dynamsoft License requires a secure context to work.
+
- The above four features are required for the SDK to work.
+## License Activation
-- `MediaDevices`/`getUserMedia`
+It takes several steps to activate a purchased license, the following steps assume you have already acquired a commercial license from Dynamsoft. If you haven't done so yet, you can purchase a license [here](https://www.dynamsoft.com/Secure/Barcode-Reader-BuyIt.aspx).
- This API is required for in-browser video streaming.
+* **Step One** : Create a Dynamsoft account
-- `getSettings`
+ If you don't have an Dynamsoft account, sign up [here](https://www.dynamsoft.com/CustomerPortal/Account/Registration.aspx). Be sure to use the same email that was registered for the purchase.
- This API inspects the video input which is a `MediaStreamTrack` object about its constrainable properties.
+* **Step Two** : Log into Dynamsoft Customer Portal
-The following table is a list of supported browsers based on the above requirements:
+ Once logged in, click **Barcode Reader SDK** on the menu bar on the left under **License Center** and you should be able to see your purchased key on the right pane.
- | Browser Name | Version |
- | :----------: | :--------------: |
- | Chrome | v88+1 |
- | Firefox | v68+1 |
- | Edge | v79+ |
- | Safari | v14+ |
+* **Step Three** : Activate the License
- 1 devices running iOS needs to be on iOS 14.3+ for camera video streaming to work in Chrome, Firefox or other Apps using webviews.
+ Under **Status**, click the link **Activate Now** to specify a domain which your license key will be bound to. The domain binding is a security feature to protect your license, although it's optional, it's highly recommended.
-Apart from the browsers, the operating systems may impose some limitations of their own that could restrict the use of the SDK. Browser compatibility ultimately depends on whether the browser on that particular operating system supports the features listed above.
+ > A few examples of the domain
+ >
+ > www.dynamsoft.com
+ >
+ > demo.dynamsoft.com
+ >
+ > \*.dynamsoft.com
+ >
+ > \*.dynamsoft.com;\*.yoursite.com
--->
+* **Step Four** : Use the License
-### How to Upgrade
+ You may have noticed that in all the samples above, we have the following line of code
-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).
+ ```html
+
+
+ ```
-### Release Notes
+ To use your activated key, you simply need to replace `PRODUCT-KEYS` with it.
-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).
+## License Agreement
-## Next Steps
+https://www.dynamsoft.com/Products/barcode-reader-license-agreement.aspx#javascript
-Now that you have got the SDK integrated, you can choose to move forward in the following directions
+## Contact Us
+If there are any questions, please feel free to contact .
-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/bower.json b/bower.json
new file mode 100644
index 00000000..67ee3c0f
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,58 @@
+{
+ "name": "dynamsoft-javascript-barcode",
+ "description": "Dynamsoft Barcode Reader JS is a recognition SDK which enables you to embed barcode reading functionality in your web, desktop, and mobile applications. With a few lines of JavaScript code, you can develop a robust application to scan a linear barcode, QR Code, DaraMatrix, PDF417, and Aztec Code.",
+ "files": [
+ "/dist/dbr.js",
+ "/dist/dbr.mjs",
+ "/dist/dbr.browser.mjs",
+ "/dist/dbr-*.worker.js",
+ "/dist/dbr-*.wasm.js",
+ "/dist/dbr-*.wasm",
+ "/dist/dbr.d.ts",
+ "/dist/dbr.reference.d.ts",
+ "/dist/dbr.scanner.html"
+ ],
+ "ignore": [
+ "/doc",
+ "/example",
+ "/.gitignore",
+ "/composer.json",
+ "/package.js"
+ ],
+ "homepage": "https://www.dynamsoft.com/Products/barcode-recognition-javascript.aspx",
+ "main": "dist/dbr.js",
+ "module": "dist/dbr.mjs",
+ "browser": "dist/dbr.browser.mjs",
+ "types": "dist/dbr.d.ts",
+ "authors": [{
+ "name": "Dynamsoft",
+ "homepage": "https://www.dynamsoft.com"
+ }],
+ "license": [
+ "For web: https://www.dynamsoft.com/Products/barcode-reader-license-agreement.aspx#javascript",
+ "For node: https://www.dynamsoft.com/Products/barcode-reader-license-agreement.aspx"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dynamsoft/javascript-barcode.git"
+ },
+ "maintainers": [
+ {
+ "name": "Dynamsoft",
+ "email": "support@dynamsoft.com"
+ }
+ ],
+ "keywords": [
+ "HTML5 barcode",
+ "JavaScript barcode",
+ "Web barcode",
+ "barcode",
+ "PDF417",
+ "QRCode",
+ "Aztec Code",
+ "WebAssembly",
+ "SDK",
+ "Linear barcode",
+ "1D barcode"
+ ]
+}
diff --git a/composer.json b/composer.json
new file mode 100644
index 00000000..4d27c288
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,32 @@
+{
+ "name": "dynamsoft/javascript-barcode",
+ "description": "Dynamsoft Barcode Reader JS is a recognition SDK which enables you to embed barcode reading functionality in your web, desktop, and mobile applications. With a few lines of JavaScript code, you can develop a robust application to scan a linear barcode, QR Code, DaraMatrix, PDF417, and Aztec Code.",
+ "archive": {
+ "exclude": [
+ "/doc",
+ "/example",
+ "/.gitignore",
+ "/bower.json",
+ "/package.js"
+ ]
+ },
+ "keywords": [
+ "HTML5 barcode",
+ "JavaScript barcode",
+ "Web barcode",
+ "barcode",
+ "PDF417",
+ "QRCode",
+ "Aztec Code",
+ "WebAssembly",
+ "SDK",
+ "Linear barcode",
+ "1D barcode"
+ ],
+ "homepage": "https://www.dynamsoft.com/Products/barcode-recognition-javascript.aspx",
+ "license": "proprietary",
+ "authors": [ { "name": "Dynamsoft", "homepage": "https://www.dynamsoft.com/" } ],
+ "support": {
+ "issues": "https://www.dynamsoft.com/Company/Contact.aspx"
+ }
+}
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-7.5.0.1.full.wasm b/dist/dbr-7.5.0.1.full.wasm
new file mode 100644
index 00000000..715a86ad
Binary files /dev/null and b/dist/dbr-7.5.0.1.full.wasm differ
diff --git a/dist/dbr-7.5.0.1.full.wasm.js b/dist/dbr-7.5.0.1.full.wasm.js
new file mode 100644
index 00000000..311e1008
--- /dev/null
+++ b/dist/dbr-7.5.0.1.full.wasm.js
@@ -0,0 +1,4487 @@
+var e;
+e || (e = typeof Module !== 'undefined' ? Module : {});
+var aa = {}, ba;
+for (ba in e) {
+ e.hasOwnProperty(ba) && (aa[ba] = e[ba]);
+}
+var ca = "./this.program", da = !1, ea = !1, fa = !1, ha = !1, ja = !1;
+da = "object" === typeof window;
+ea = "function" === typeof importScripts;
+fa = (ha = "object" === typeof process && "object" === typeof process.versions && "string" === typeof process.versions.node) && !da && !ea;
+ja = !da && !fa && !ea;
+if (e.ENVIRONMENT) {
+ throw Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");
+}
+var l = "", ka, la;
+if (fa) {
+ l = __dirname + "/";
+ var ma, na;
+ ka = function(a, b) {
+ ma || (ma = require("fs"));
+ na || (na = require("path"));
+ a = na.normalize(a);
+ a = ma.readFileSync(a);
+ return b ? a : a.toString();
+ };
+ la = function(a) {
+ a = ka(a, !0);
+ a.buffer || (a = new Uint8Array(a));
+ assert(a.buffer);
+ return a;
+ };
+ 1 < process.argv.length && (ca = process.argv[1].replace(/\\/g, "/"));
+ process.argv.slice(2);
+ "undefined" !== typeof module && (module.exports = e);
+ process.on("uncaughtException", function(a) {
+ throw a;
+ });
+ process.on("unhandledRejection", m);
+ e.inspect = function() {
+ return "[Emscripten Module object]";
+ };
+} else {
+ if (ja) {
+ "undefined" != typeof read && (ka = function(a) {
+ return read(a);
+ }), la = function(a) {
+ if ("function" === typeof readbuffer) {
+ return new Uint8Array(readbuffer(a));
+ }
+ a = read(a, "binary");
+ assert("object" === typeof a);
+ return a;
+ }, "undefined" !== typeof print && ("undefined" === typeof console && (console = {}), console.log = print, console.warn = console.error = "undefined" !== typeof printErr ? printErr : print);
+ } else {
+ if (da || ea) {
+ ea ? l = self.location.href : document.currentScript && (l = document.currentScript.src), l = 0 !== l.indexOf("blob:") ? l.substr(0, l.lastIndexOf("/") + 1) : "", ka = function(a) {
+ var b = new XMLHttpRequest;
+ b.open("GET", a, !1);
+ b.send(null);
+ return b.responseText;
+ }, ea && (la = function(a) {
+ var b = new XMLHttpRequest;
+ b.open("GET", a, !1);
+ b.responseType = "arraybuffer";
+ b.send(null);
+ return new Uint8Array(b.response);
+ });
+ } else {
+ throw Error("environment detection error");
+ }
+ }
+}
+var oa = e.print || console.log.bind(console), n = e.printErr || console.warn.bind(console);
+for (ba in aa) {
+ aa.hasOwnProperty(ba) && (e[ba] = aa[ba]);
+}
+aa = null;
+Object.getOwnPropertyDescriptor(e, "arguments") || Object.defineProperty(e, "arguments", {get:function() {
+ m("Module.arguments has been replaced with plain arguments_");
+}});
+e.thisProgram && (ca = e.thisProgram);
+Object.getOwnPropertyDescriptor(e, "thisProgram") || Object.defineProperty(e, "thisProgram", {get:function() {
+ m("Module.thisProgram has been replaced with plain thisProgram");
+}});
+Object.getOwnPropertyDescriptor(e, "quit") || Object.defineProperty(e, "quit", {get:function() {
+ m("Module.quit has been replaced with plain quit_");
+}});
+assert("undefined" === typeof e.memoryInitializerPrefixURL, "Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead");
+assert("undefined" === typeof e.pthreadMainPrefixURL, "Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead");
+assert("undefined" === typeof e.cdInitializerPrefixURL, "Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead");
+assert("undefined" === typeof e.filePackagePrefixURL, "Module.filePackagePrefixURL option was removed, use Module.locateFile instead");
+assert("undefined" === typeof e.read, "Module.read option was removed (modify read_ in JS)");
+assert("undefined" === typeof e.readAsync, "Module.readAsync option was removed (modify readAsync in JS)");
+assert("undefined" === typeof e.readBinary, "Module.readBinary option was removed (modify readBinary in JS)");
+assert("undefined" === typeof e.setWindowTitle, "Module.setWindowTitle option was removed (modify setWindowTitle in JS)");
+Object.getOwnPropertyDescriptor(e, "read") || Object.defineProperty(e, "read", {get:function() {
+ m("Module.read has been replaced with plain read_");
+}});
+Object.getOwnPropertyDescriptor(e, "readAsync") || Object.defineProperty(e, "readAsync", {get:function() {
+ m("Module.readAsync has been replaced with plain readAsync");
+}});
+Object.getOwnPropertyDescriptor(e, "readBinary") || Object.defineProperty(e, "readBinary", {get:function() {
+ m("Module.readBinary has been replaced with plain readBinary");
+}});
+function pa(a) {
+ assert(qa);
+ var b = p[qa >> 2];
+ a = b + a + 15 & -16;
+ a > ra() && m("failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly");
+ p[qa >> 2] = a;
+ return b;
+}
+function sa(a) {
+ ta || (ta = {});
+ ta[a] || (ta[a] = 1, n(a));
+}
+var ta;
+function ua(a, b, c) {
+ return c ? +(a >>> 0) + 4294967296.0 * +(b >>> 0) : +(a >>> 0) + 4294967296.0 * +(b | 0);
+}
+var va;
+e.wasmBinary && (va = e.wasmBinary);
+Object.getOwnPropertyDescriptor(e, "wasmBinary") || Object.defineProperty(e, "wasmBinary", {get:function() {
+ m("Module.wasmBinary has been replaced with plain wasmBinary");
+}});
+"object" !== typeof WebAssembly && m("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");
+var wa, xa = !1;
+function assert(a, b) {
+ a || m("Assertion failed: " + b);
+}
+function ya(a) {
+ if ("number" === typeof a) {
+ var b = !0;
+ var c = a;
+ } else {
+ b = !1, c = a.length;
+ }
+ var d = za(Math.max(c, 1));
+ if (b) {
+ a = d;
+ assert(0 == (d & 3));
+ for (b = d + (c & -4); a < b; a += 4) {
+ p[a >> 2] = 0;
+ }
+ for (b = d + c; a < b;) {
+ q[a++ >> 0] = 0;
+ }
+ return d;
+ }
+ a.subarray || a.slice ? w.set(a, d) : w.set(new Uint8Array(a), d);
+ return d;
+}
+var Aa = "undefined" !== typeof TextDecoder ? new TextDecoder("utf8") : void 0;
+function Ba(a, b, c) {
+ var d = b + c;
+ for (c = b; a[c] && !(c >= d);) {
+ ++c;
+ }
+ if (16 < c - b && a.subarray && Aa) {
+ return Aa.decode(a.subarray(b, c));
+ }
+ for (d = ""; b < c;) {
+ var f = a[b++];
+ if (f & 128) {
+ var g = a[b++] & 63;
+ if (192 == (f & 224)) {
+ d += String.fromCharCode((f & 31) << 6 | g);
+ } else {
+ var h = a[b++] & 63;
+ 224 == (f & 240) ? f = (f & 15) << 12 | g << 6 | h : (240 != (f & 248) && sa("Invalid UTF-8 leading byte 0x" + f.toString(16) + " encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"), f = (f & 7) << 18 | g << 12 | h << 6 | a[b++] & 63);
+ 65536 > f ? d += String.fromCharCode(f) : (f -= 65536, d += String.fromCharCode(55296 | f >> 10, 56320 | f & 1023));
+ }
+ } else {
+ d += String.fromCharCode(f);
+ }
+ }
+ return d;
+}
+function x(a) {
+ return a ? Ba(w, a, void 0) : "";
+}
+function Ca(a, b, c, d) {
+ if (!(0 < d)) {
+ return 0;
+ }
+ var f = c;
+ d = c + d - 1;
+ for (var g = 0; g < a.length; ++g) {
+ var h = a.charCodeAt(g);
+ if (55296 <= h && 57343 >= h) {
+ var k = a.charCodeAt(++g);
+ h = 65536 + ((h & 1023) << 10) | k & 1023;
+ }
+ if (127 >= h) {
+ if (c >= d) {
+ break;
+ }
+ b[c++] = h;
+ } else {
+ if (2047 >= h) {
+ if (c + 1 >= d) {
+ break;
+ }
+ b[c++] = 192 | h >> 6;
+ } else {
+ if (65535 >= h) {
+ if (c + 2 >= d) {
+ break;
+ }
+ b[c++] = 224 | h >> 12;
+ } else {
+ if (c + 3 >= d) {
+ break;
+ }
+ 2097152 <= h && sa("Invalid Unicode code point 0x" + h.toString(16) + " encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF).");
+ b[c++] = 240 | h >> 18;
+ b[c++] = 128 | h >> 12 & 63;
+ }
+ b[c++] = 128 | h >> 6 & 63;
+ }
+ b[c++] = 128 | h & 63;
+ }
+ }
+ b[c] = 0;
+ return c - f;
+}
+function Da(a, b, c) {
+ assert("number" == typeof c, "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");
+ Ca(a, w, b, c);
+}
+function Ea(a) {
+ for (var b = 0, c = 0; c < a.length; ++c) {
+ var d = a.charCodeAt(c);
+ 55296 <= d && 57343 >= d && (d = 65536 + ((d & 1023) << 10) | a.charCodeAt(++c) & 1023);
+ 127 >= d ? ++b : b = 2047 >= d ? b + 2 : 65535 >= d ? b + 3 : b + 4;
+ }
+ return b;
+}
+"undefined" !== typeof TextDecoder && new TextDecoder("utf-16le");
+function Fa(a, b) {
+ assert(0 <= a.length, "writeArrayToMemory array must have a length (should be an array or typed array)");
+ q.set(a, b);
+}
+function Ga(a) {
+ 0 < a % 65536 && (a += 65536 - a % 65536);
+ return a;
+}
+var buffer, q, w, Ha, Ia, p, y, Ja, Ka;
+function La() {
+ e.HEAP8 = q = new Int8Array(buffer);
+ e.HEAP16 = Ha = new Int16Array(buffer);
+ e.HEAP32 = p = new Int32Array(buffer);
+ e.HEAPU8 = w = new Uint8Array(buffer);
+ e.HEAPU16 = Ia = new Uint16Array(buffer);
+ e.HEAPU32 = y = new Uint32Array(buffer);
+ e.HEAPF32 = Ja = new Float32Array(buffer);
+ e.HEAPF64 = Ka = new Float64Array(buffer);
+}
+var qa = 1862080;
+assert(!0, "stack must start aligned");
+assert(!0, "heap must start aligned");
+e.TOTAL_STACK && assert(5242880 === e.TOTAL_STACK, "the stack size can no longer be determined at runtime");
+var Ma = e.TOTAL_MEMORY || 16777216;
+Object.getOwnPropertyDescriptor(e, "TOTAL_MEMORY") || Object.defineProperty(e, "TOTAL_MEMORY", {get:function() {
+ m("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY");
+}});
+assert(5242880 <= Ma, "TOTAL_MEMORY should be larger than TOTAL_STACK, was " + Ma + "! (TOTAL_STACK=5242880)");
+assert("undefined" !== typeof Int32Array && "undefined" !== typeof Float64Array && void 0 !== Int32Array.prototype.subarray && void 0 !== Int32Array.prototype.set, "JS engine does not provide full typed array support");
+e.wasmMemory ? wa = e.wasmMemory : wa = new WebAssembly.Memory({initial:Ma / 65536});
+wa && (buffer = wa.buffer);
+Ma = buffer.byteLength;
+assert(0 === Ma % 65536);
+La();
+p[qa >> 2] = 7104976;
+function Na() {
+ var a = y[465525], b = y[465526];
+ 34821223 == a && 2310721022 == b || m("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x" + b.toString(16) + " " + a.toString(16));
+ 1668509029 !== p[0] && m("Runtime error: The application has corrupted its heap memory area (address zero)!");
+}
+p[0] = 1668509029;
+Ha[1] = 25459;
+if (115 !== w[2] || 99 !== w[3]) {
+ throw "Runtime error: expected the system to be little-endian!";
+}
+function Oa(a) {
+ for (; 0 < a.length;) {
+ var b = a.shift();
+ if ("function" == typeof b) {
+ b();
+ } else {
+ var c = b.ya;
+ "number" === typeof c ? void 0 === b.aa ? e.dynCall_v(c) : e.dynCall_vi(c, b.aa) : c(void 0 === b.aa ? null : b.aa);
+ }
+ }
+}
+var Pa = [], Qa = [], Ra = [], Sa = [], Ta = [], E = !1;
+function Ua() {
+ var a = e.preRun.shift();
+ Pa.unshift(a);
+}
+function Va(a, b) {
+ return 0 <= a ? a : 32 >= b ? 2 * Math.abs(1 << b - 1) + a : Math.pow(2, b) + a;
+}
+function Wa(a, b) {
+ if (0 >= a) {
+ return a;
+ }
+ var c = 32 >= b ? Math.abs(1 << b - 1) : Math.pow(2, b - 1);
+ a >= c && (32 >= b || a > c) && (a = -2 * c + a);
+ return a;
+}
+assert(Math.imul, "This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
+assert(Math.fround, "This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
+assert(Math.clz32, "This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
+assert(Math.trunc, "This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
+var Xa = Math.abs, Ya = Math.sqrt, Za = Math.ceil, $a = Math.floor, ab = Math.min, bb = 0, cb = null, db = null, eb = {};
+function fb() {
+ bb++;
+ e.monitorRunDependencies && e.monitorRunDependencies(bb);
+ assert(!eb["wasm-instantiate"]);
+ eb["wasm-instantiate"] = 1;
+ null === cb && "undefined" !== typeof setInterval && (cb = setInterval(function() {
+ if (xa) {
+ clearInterval(cb), cb = null;
+ } else {
+ var a = !1, b;
+ for (b in eb) {
+ a || (a = !0, n("still waiting on run dependencies:")), n("dependency: " + b);
+ }
+ a && n("(end of list)");
+ }
+ }, 10000));
+}
+e.preloadedImages = {};
+e.preloadedAudios = {};
+function gb() {
+ var a = hb;
+ return String.prototype.startsWith ? a.startsWith("data:application/octet-stream;base64,") : 0 === a.indexOf("data:application/octet-stream;base64,");
+}
+var hb = "libDynamsoftBarcodeReader.wasm";
+if (!gb()) {
+ var ib = hb;
+ hb = e.locateFile ? e.locateFile(ib, l) : l + ib;
+}
+function jb() {
+ try {
+ if (va) {
+ return new Uint8Array(va);
+ }
+ if (la) {
+ return la(hb);
+ }
+ throw "both async and sync fetching of the wasm failed";
+ } catch (a) {
+ m(a);
+ }
+}
+function kb() {
+ return va || !da && !ea || "function" !== typeof fetch ? new Promise(function(a) {
+ a(jb());
+ }) : fetch(hb, {credentials:"same-origin"}).then(function(a) {
+ if (!a.ok) {
+ throw "failed to load wasm binary file at '" + hb + "'";
+ }
+ return a.arrayBuffer();
+ }).catch(function() {
+ return jb();
+ });
+}
+function lb(a) {
+ function b(a) {
+ e.asm = a.exports;
+ bb--;
+ e.monitorRunDependencies && e.monitorRunDependencies(bb);
+ assert(eb["wasm-instantiate"]);
+ delete eb["wasm-instantiate"];
+ 0 == bb && (null !== cb && (clearInterval(cb), cb = null), db && (a = db, db = null, a()));
+ }
+ function c(a) {
+ assert(e === g, "the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");
+ g = null;
+ b(a.instance);
+ }
+ function d(a) {
+ return kb().then(function(a) {
+ return WebAssembly.instantiate(a, f);
+ }).then(a, function(a) {
+ n("failed to asynchronously prepare wasm: " + a);
+ m(a);
+ });
+ }
+ var f = {env:a};
+ fb();
+ var g = e;
+ if (e.instantiateWasm) {
+ try {
+ return e.instantiateWasm(f, b);
+ } catch (h) {
+ return n("Module.instantiateWasm callback failed with error: " + h), !1;
+ }
+ }
+ (function() {
+ if (va || "function" !== typeof WebAssembly.instantiateStreaming || gb() || "function" !== typeof fetch) {
+ return d(c);
+ }
+ fetch(hb, {credentials:"same-origin"}).then(function(a) {
+ return WebAssembly.instantiateStreaming(a, f).then(c, function(a) {
+ n("wasm streaming compile failed: " + a);
+ n("falling back to ArrayBuffer instantiation");
+ d(c);
+ });
+ });
+ })();
+ return {};
+}
+e.asm = function(a, b) {
+ b.memory = wa;
+ b.table = new WebAssembly.Table({initial:8394, maximum:8394, element:"anyfunc"});
+ a = lb(b);
+ assert(a, "binaryen setup failed (no wasm support?)");
+ return a;
+};
+var F, mb;
+Qa.push({ya:function() {
+ nb();
+}});
+function ob(a) {
+ sa("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");
+ return a;
+}
+function pb(a) {
+ return a.replace(/_Z[\w\d_]+/g, function(a) {
+ var b = ob(a);
+ return a === b ? a : b + " [" + a + "]";
+ });
+}
+function qb() {
+ var a = Error();
+ if (!a.stack) {
+ try {
+ throw Error(0);
+ } catch (b) {
+ a = b;
+ }
+ if (!a.stack) {
+ return "(no stack trace available)";
+ }
+ }
+ return a.stack.toString();
+}
+function rb() {
+ var a = qb();
+ e.extraStackTrace && (a += "\n" + e.extraStackTrace());
+ return pb(a);
+}
+var G = {};
+function sb(a) {
+ if (sb.s) {
+ var b = p[a >> 2];
+ var c = p[b >> 2];
+ } else {
+ sb.s = !0, G.USER = G.LOGNAME = "web_user", G.PATH = "/", G.PWD = "/", G.HOME = "/home/web_user", G.LANG = "C.UTF-8", G.LANG = ("object" === typeof navigator && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", G._ = ca, c = E ? za(1024) : pa(1024), b = E ? za(256) : pa(256), p[b >> 2] = c, p[a >> 2] = b;
+ }
+ a = [];
+ var d = 0, f;
+ for (f in G) {
+ if ("string" === typeof G[f]) {
+ var g = f + "=" + G[f];
+ a.push(g);
+ d += g.length;
+ }
+ }
+ if (1024 < d) {
+ throw Error("Environment size exceeded TOTAL_ENV_SIZE!");
+ }
+ for (f = 0; f < a.length; f++) {
+ d = g = a[f];
+ for (var h = c, k = 0; k < d.length; ++k) {
+ assert(d.charCodeAt(k) === d.charCodeAt(k) & 255), q[h++ >> 0] = d.charCodeAt(k);
+ }
+ q[h >> 0] = 0;
+ p[b + 4 * f >> 2] = c;
+ c += g.length + 1;
+ }
+ p[b + 4 * a.length >> 2] = 0;
+}
+function tb(a, b) {
+ sa("atexit() called, but EXIT_RUNTIME is not set, so atexits() will not be called. set EXIT_RUNTIME to 1 (see the FAQ)");
+ Sa.unshift({ya:a, aa:b});
+}
+function ub() {
+ return 0 < ub.s;
+}
+function vb(a) {
+ e.___errno_location ? p[e.___errno_location() >> 2] = a : n("failed to set errno from JS");
+ return a;
+}
+function wb(a, b) {
+ for (var c = 0, d = a.length - 1; 0 <= d; d--) {
+ var f = a[d];
+ "." === f ? a.splice(d, 1) : ".." === f ? (a.splice(d, 1), c++) : c && (a.splice(d, 1), c--);
+ }
+ if (b) {
+ for (; c; c--) {
+ a.unshift("..");
+ }
+ }
+ return a;
+}
+function xb(a) {
+ var b = "/" === a.charAt(0), c = "/" === a.substr(-1);
+ (a = wb(a.split("/").filter(function(a) {
+ return !!a;
+ }), !b).join("/")) || b || (a = ".");
+ a && c && (a += "/");
+ return (b ? "/" : "") + a;
+}
+function yb(a) {
+ var b = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);
+ a = b[0];
+ b = b[1];
+ if (!a && !b) {
+ return ".";
+ }
+ b && (b = b.substr(0, b.length - 1));
+ return a + b;
+}
+function zb(a) {
+ if ("/" === a) {
+ return "/";
+ }
+ var b = a.lastIndexOf("/");
+ return -1 === b ? a : a.substr(b + 1);
+}
+function Ab() {
+ var a = Array.prototype.slice.call(arguments, 0);
+ return xb(a.join("/"));
+}
+function Bb(a, b) {
+ return xb(a + "/" + b);
+}
+function Cb() {
+ for (var a = "", b = !1, c = arguments.length - 1; -1 <= c && !b; c--) {
+ b = 0 <= c ? arguments[c] : "/";
+ if ("string" !== typeof b) {
+ throw new TypeError("Arguments to path.resolve must be strings");
+ }
+ if (!b) {
+ return "";
+ }
+ a = b + "/" + a;
+ b = "/" === b.charAt(0);
+ }
+ a = wb(a.split("/").filter(function(a) {
+ return !!a;
+ }), !b).join("/");
+ return (b ? "/" : "") + a || ".";
+}
+var Db = [];
+function Eb(a, b) {
+ Db[a] = {input:[], output:[], U:b};
+ Fb(a, Gb);
+}
+var Gb = {open:function(a) {
+ var b = Db[a.node.rdev];
+ if (!b) {
+ throw new H(19);
+ }
+ a.tty = b;
+ a.seekable = !1;
+}, close:function(a) {
+ a.tty.U.flush(a.tty);
+}, flush:function(a) {
+ a.tty.U.flush(a.tty);
+}, read:function(a, b, c, d) {
+ if (!a.tty || !a.tty.U.Aa) {
+ throw new H(6);
+ }
+ for (var f = 0, g = 0; g < d; g++) {
+ try {
+ var h = a.tty.U.Aa(a.tty);
+ } catch (k) {
+ throw new H(5);
+ }
+ if (void 0 === h && 0 === f) {
+ throw new H(11);
+ }
+ if (null === h || void 0 === h) {
+ break;
+ }
+ f++;
+ b[c + g] = h;
+ }
+ f && (a.node.timestamp = Date.now());
+ return f;
+}, write:function(a, b, c, d) {
+ if (!a.tty || !a.tty.U.na) {
+ throw new H(6);
+ }
+ try {
+ for (var f = 0; f < d; f++) {
+ a.tty.U.na(a.tty, b[c + f]);
+ }
+ } catch (g) {
+ throw new H(5);
+ }
+ d && (a.node.timestamp = Date.now());
+ return f;
+}}, Ib = {Aa:function(a) {
+ if (!a.input.length) {
+ var b = null;
+ if (fa) {
+ var c = Buffer.s ? Buffer.s(256) : new Buffer(256), d = 0, f = process.stdin.fd;
+ if ("win32" != process.platform) {
+ var g = !1;
+ try {
+ f = fs.openSync("/dev/stdin", "r"), g = !0;
+ } catch (h) {
+ }
+ }
+ try {
+ d = fs.readSync(f, c, 0, 256, null);
+ } catch (h) {
+ if (-1 != h.toString().indexOf("EOF")) {
+ d = 0;
+ } else {
+ throw h;
+ }
+ }
+ g && fs.closeSync(f);
+ 0 < d ? b = c.slice(0, d).toString("utf-8") : b = null;
+ } else {
+ "undefined" != typeof window && "function" == typeof window.prompt ? (b = window.prompt("Input: "), null !== b && (b += "\n")) : "function" == typeof readline && (b = readline(), null !== b && (b += "\n"));
+ }
+ if (!b) {
+ return null;
+ }
+ a.input = Hb(b, !0);
+ }
+ return a.input.shift();
+}, na:function(a, b) {
+ null === b || 10 === b ? (oa(Ba(a.output, 0)), a.output = []) : 0 != b && a.output.push(b);
+}, flush:function(a) {
+ a.output && 0 < a.output.length && (oa(Ba(a.output, 0)), a.output = []);
+}}, Jb = {na:function(a, b) {
+ null === b || 10 === b ? (n(Ba(a.output, 0)), a.output = []) : 0 != b && a.output.push(b);
+}, flush:function(a) {
+ a.output && 0 < a.output.length && (n(Ba(a.output, 0)), a.output = []);
+}}, I = {G:null, v:function() {
+ return I.createNode(null, "/", 16895, 0);
+}, createNode:function(a, b, c, d) {
+ if (24576 === (c & 61440) || 4096 === (c & 61440)) {
+ throw new H(1);
+ }
+ I.G || (I.G = {dir:{node:{I:I.f.I, C:I.f.C, lookup:I.f.lookup, W:I.f.W, rename:I.f.rename, unlink:I.f.unlink, rmdir:I.f.rmdir, readdir:I.f.readdir, symlink:I.f.symlink}, stream:{K:I.g.K}}, file:{node:{I:I.f.I, C:I.f.C}, stream:{K:I.g.K, read:I.g.read, write:I.g.write, qa:I.g.qa, Ba:I.g.Ba, fa:I.g.fa}}, link:{node:{I:I.f.I, C:I.f.C, readlink:I.f.readlink}, stream:{}}, sa:{node:{I:I.f.I, C:I.f.C}, stream:Kb}});
+ c = Lb(a, b, c, d);
+ J(c.mode) ? (c.f = I.G.dir.node, c.g = I.G.dir.stream, c.c = {}) : 32768 === (c.mode & 61440) ? (c.f = I.G.file.node, c.g = I.G.file.stream, c.l = 0, c.c = null) : 40960 === (c.mode & 61440) ? (c.f = I.G.link.node, c.g = I.G.link.stream) : 8192 === (c.mode & 61440) && (c.f = I.G.sa.node, c.g = I.G.sa.stream);
+ c.timestamp = Date.now();
+ a && (a.c[b] = c);
+ return c;
+}, td:function(a) {
+ if (a.c && a.c.subarray) {
+ for (var b = [], c = 0; c < a.l; ++c) {
+ b.push(a.c[c]);
+ }
+ return b;
+ }
+ return a.c;
+}, ud:function(a) {
+ return a.c ? a.c.subarray ? a.c.subarray(0, a.l) : new Uint8Array(a.c) : new Uint8Array;
+}, ua:function(a, b) {
+ var c = a.c ? a.c.length : 0;
+ c >= b || (b = Math.max(b, c * (1048576 > c ? 2.0 : 1.125) | 0), 0 != c && (b = Math.max(b, 256)), c = a.c, a.c = new Uint8Array(b), 0 < a.l && a.c.set(c.subarray(0, a.l), 0));
+}, Sa:function(a, b) {
+ if (a.l != b) {
+ if (0 == b) {
+ a.c = null, a.l = 0;
+ } else {
+ if (!a.c || a.c.subarray) {
+ var c = a.c;
+ a.c = new Uint8Array(new ArrayBuffer(b));
+ c && a.c.set(c.subarray(0, Math.min(b, a.l)));
+ } else {
+ if (a.c || (a.c = []), a.c.length > b) {
+ a.c.length = b;
+ } else {
+ for (; a.c.length < b;) {
+ a.c.push(0);
+ }
+ }
+ }
+ a.l = b;
+ }
+ }
+}, f:{I:function(a) {
+ var b = {};
+ b.dev = 8192 === (a.mode & 61440) ? a.id : 1;
+ b.ino = a.id;
+ b.mode = a.mode;
+ b.nlink = 1;
+ b.uid = 0;
+ b.gid = 0;
+ b.rdev = a.rdev;
+ J(a.mode) ? b.size = 4096 : 32768 === (a.mode & 61440) ? b.size = a.l : 40960 === (a.mode & 61440) ? b.size = a.link.length : b.size = 0;
+ b.atime = new Date(a.timestamp);
+ b.mtime = new Date(a.timestamp);
+ b.ctime = new Date(a.timestamp);
+ b.L = 4096;
+ b.blocks = Math.ceil(b.size / b.L);
+ return b;
+}, C:function(a, b) {
+ void 0 !== b.mode && (a.mode = b.mode);
+ void 0 !== b.timestamp && (a.timestamp = b.timestamp);
+ void 0 !== b.size && I.Sa(a, b.size);
+}, lookup:function() {
+ throw Mb[2];
+}, W:function(a, b, c, d) {
+ return I.createNode(a, b, c, d);
+}, rename:function(a, b, c) {
+ if (J(a.mode)) {
+ try {
+ var d = Nb(b, c);
+ } catch (g) {
+ }
+ if (d) {
+ for (var f in d.c) {
+ throw new H(39);
+ }
+ }
+ }
+ delete a.parent.c[a.name];
+ a.name = c;
+ b.c[c] = a;
+ a.parent = b;
+}, unlink:function(a, b) {
+ delete a.c[b];
+}, rmdir:function(a, b) {
+ var c = Nb(a, b), d;
+ for (d in c.c) {
+ throw new H(39);
+ }
+ delete a.c[b];
+}, readdir:function(a) {
+ var b = [".", ".."], c;
+ for (c in a.c) {
+ a.c.hasOwnProperty(c) && b.push(c);
+ }
+ return b;
+}, symlink:function(a, b, c) {
+ a = I.createNode(a, b, 41471, 0);
+ a.link = c;
+ return a;
+}, readlink:function(a) {
+ if (40960 !== (a.mode & 61440)) {
+ throw new H(22);
+ }
+ return a.link;
+}}, g:{read:function(a, b, c, d, f) {
+ var g = a.node.c;
+ if (f >= a.node.l) {
+ return 0;
+ }
+ a = Math.min(a.node.l - f, d);
+ assert(0 <= a);
+ if (8 < a && g.subarray) {
+ b.set(g.subarray(f, f + a), c);
+ } else {
+ for (d = 0; d < a; d++) {
+ b[c + d] = g[f + d];
+ }
+ }
+ return a;
+}, write:function(a, b, c, d, f, g) {
+ g && sa("file packager has copied file data into memory, but in memory growth we are forced to copy it again (see --no-heap-copy)");
+ g = !1;
+ if (!d) {
+ return 0;
+ }
+ a = a.node;
+ a.timestamp = Date.now();
+ if (b.subarray && (!a.c || a.c.subarray)) {
+ if (g) {
+ return assert(0 === f, "canOwn must imply no weird position inside the file"), a.c = b.subarray(c, c + d), a.l = d;
+ }
+ if (0 === a.l && 0 === f) {
+ return a.c = new Uint8Array(b.subarray(c, c + d)), a.l = d;
+ }
+ if (f + d <= a.l) {
+ return a.c.set(b.subarray(c, c + d), f), d;
+ }
+ }
+ I.ua(a, f + d);
+ if (a.c.subarray && b.subarray) {
+ a.c.set(b.subarray(c, c + d), f);
+ } else {
+ for (g = 0; g < d; g++) {
+ a.c[f + g] = b[c + g];
+ }
+ }
+ a.l = Math.max(a.l, f + d);
+ return d;
+}, K:function(a, b, c) {
+ 1 === c ? b += a.position : 2 === c && 32768 === (a.node.mode & 61440) && (b += a.node.l);
+ if (0 > b) {
+ throw new H(22);
+ }
+ return b;
+}, qa:function(a, b, c) {
+ I.ua(a.node, b + c);
+ a.node.l = Math.max(a.node.l, b + c);
+}, Ba:function(a, b, c, d, f, g, h) {
+ if (32768 !== (a.node.mode & 61440)) {
+ throw new H(19);
+ }
+ c = a.node.c;
+ if (h & 2 || c.buffer !== b && c.buffer !== b.buffer) {
+ if (0 < f || f + d < a.node.l) {
+ c.subarray ? c = c.subarray(f, f + d) : c = Array.prototype.slice.call(c, f, f + d);
+ }
+ a = !0;
+ f = b.buffer == q.buffer;
+ d = za(d);
+ if (!d) {
+ throw new H(12);
+ }
+ (f ? q : b).set(c, d);
+ } else {
+ a = !1, d = c.byteOffset;
+ }
+ return {j:d, Ea:a};
+}, fa:function(a, b, c, d, f) {
+ if (32768 !== (a.node.mode & 61440)) {
+ throw new H(19);
+ }
+ if (f & 2) {
+ return 0;
+ }
+ I.g.write(a, b, 0, d, c, !1);
+ return 0;
+}}}, K = {ea:!1, Va:function() {
+ K.ea = !!process.platform.match(/^win/);
+ var a = process.binding("constants");
+ a.fs && (a = a.fs);
+ K.va = {1024:a.O_APPEND, 64:a.O_CREAT, 128:a.O_EXCL, 0:a.O_RDONLY, 2:a.O_RDWR, 4096:a.O_SYNC, 512:a.O_TRUNC, 1:a.O_WRONLY};
+}, ra:function(a) {
+ return Buffer.s ? Buffer.from(a) : new Buffer(a);
+}, v:function(a) {
+ assert(ha);
+ return K.createNode(null, "/", K.za(a.ma.root), 0);
+}, createNode:function(a, b, c) {
+ if (!J(c) && 32768 !== (c & 61440) && 40960 !== (c & 61440)) {
+ throw new H(22);
+ }
+ a = Lb(a, b, c);
+ a.f = K.f;
+ a.g = K.g;
+ return a;
+}, za:function(a) {
+ try {
+ var b = fs.lstatSync(a);
+ K.ea && (b.mode = b.mode | (b.mode & 292) >> 2);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new H(-c.i);
+ }
+ return b.mode;
+}, A:function(a) {
+ for (var b = []; a.parent !== a;) {
+ b.push(a.name), a = a.parent;
+ }
+ b.push(a.v.ma.root);
+ b.reverse();
+ return Ab.apply(null, b);
+}, Ia:function(a) {
+ a &= -2656257;
+ var b = 0, c;
+ for (c in K.va) {
+ a & c && (b |= K.va[c], a ^= c);
+ }
+ if (a) {
+ throw new H(22);
+ }
+ return b;
+}, f:{I:function(a) {
+ a = K.A(a);
+ try {
+ var b = fs.lstatSync(a);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new H(-c.i);
+ }
+ K.ea && !b.L && (b.L = 4096);
+ K.ea && !b.blocks && (b.blocks = (b.size + b.L - 1) / b.L | 0);
+ return {dev:b.dev, ino:b.ino, mode:b.mode, nlink:b.nlink, uid:b.uid, gid:b.gid, rdev:b.rdev, size:b.size, atime:b.atime, mtime:b.mtime, ctime:b.ctime, L:b.L, blocks:b.blocks};
+}, C:function(a, b) {
+ var c = K.A(a);
+ try {
+ void 0 !== b.mode && (fs.chmodSync(c, b.mode), a.mode = b.mode), void 0 !== b.size && fs.truncateSync(c, b.size);
+ } catch (d) {
+ if (!d.code) {
+ throw d;
+ }
+ throw new H(-d.i);
+ }
+}, lookup:function(a, b) {
+ var c = Bb(K.A(a), b);
+ c = K.za(c);
+ return K.createNode(a, b, c);
+}, W:function(a, b, c, d) {
+ a = K.createNode(a, b, c, d);
+ b = K.A(a);
+ try {
+ J(a.mode) ? fs.mkdirSync(b, a.mode) : fs.writeFileSync(b, "", {mode:a.mode});
+ } catch (f) {
+ if (!f.code) {
+ throw f;
+ }
+ throw new H(-f.i);
+ }
+ return a;
+}, rename:function(a, b, c) {
+ a = K.A(a);
+ b = Bb(K.A(b), c);
+ try {
+ fs.renameSync(a, b);
+ } catch (d) {
+ if (!d.code) {
+ throw d;
+ }
+ throw new H(-d.i);
+ }
+}, unlink:function(a, b) {
+ a = Bb(K.A(a), b);
+ try {
+ fs.unlinkSync(a);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new H(-c.i);
+ }
+}, rmdir:function(a, b) {
+ a = Bb(K.A(a), b);
+ try {
+ fs.rmdirSync(a);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new H(-c.i);
+ }
+}, readdir:function(a) {
+ a = K.A(a);
+ try {
+ return fs.readdirSync(a);
+ } catch (b) {
+ if (!b.code) {
+ throw b;
+ }
+ throw new H(-b.i);
+ }
+}, symlink:function(a, b, c) {
+ a = Bb(K.A(a), b);
+ try {
+ fs.symlinkSync(c, a);
+ } catch (d) {
+ if (!d.code) {
+ throw d;
+ }
+ throw new H(-d.i);
+ }
+}, readlink:function(a) {
+ var b = K.A(a);
+ try {
+ return b = fs.readlinkSync(b), b = Ob.relative(Ob.resolve(a.v.ma.root), b);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new H(-c.i);
+ }
+}}, g:{open:function(a) {
+ var b = K.A(a.node);
+ try {
+ 32768 === (a.node.mode & 61440) && (a.X = fs.openSync(b, K.Ia(a.flags)));
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new H(-c.i);
+ }
+}, close:function(a) {
+ try {
+ 32768 === (a.node.mode & 61440) && a.X && fs.closeSync(a.X);
+ } catch (b) {
+ if (!b.code) {
+ throw b;
+ }
+ throw new H(-b.i);
+ }
+}, read:function(a, b, c, d, f) {
+ if (0 === d) {
+ return 0;
+ }
+ try {
+ return fs.readSync(a.X, K.ra(b.buffer), c, d, f);
+ } catch (g) {
+ throw new H(-g.i);
+ }
+}, write:function(a, b, c, d, f) {
+ try {
+ return fs.writeSync(a.X, K.ra(b.buffer), c, d, f);
+ } catch (g) {
+ throw new H(-g.i);
+ }
+}, K:function(a, b, c) {
+ if (1 === c) {
+ b += a.position;
+ } else {
+ if (2 === c && 32768 === (a.node.mode & 61440)) {
+ try {
+ b += fs.fstatSync(a.X).size;
+ } catch (d) {
+ throw new H(-d.i);
+ }
+ }
+ }
+ if (0 > b) {
+ throw new H(22);
+ }
+ return b;
+}}}, Pb = {0:"Success", 1:"Not super-user", 2:"No such file or directory", 3:"No such process", 4:"Interrupted system call", 5:"I/O error", 6:"No such device or address", 7:"Arg list too long", 8:"Exec format error", 9:"Bad file number", 10:"No children", 11:"No more processes", 12:"Not enough core", 13:"Permission denied", 14:"Bad address", 15:"Block device required", 16:"Mount device busy", 17:"File exists", 18:"Cross-device link", 19:"No such device", 20:"Not a directory", 21:"Is a directory",
+22:"Invalid argument", 23:"Too many open files in system", 24:"Too many open files", 25:"Not a typewriter", 26:"Text file busy", 27:"File too large", 28:"No space left on device", 29:"Illegal seek", 30:"Read only file system", 31:"Too many links", 32:"Broken pipe", 33:"Math arg out of domain of func", 34:"Math result not representable", 35:"File locking deadlock error", 36:"File or path name too long", 37:"No record locks available", 38:"Function not implemented", 39:"Directory not empty", 40:"Too many symbolic links",
+42:"No message of desired type", 43:"Identifier removed", 44:"Channel number out of range", 45:"Level 2 not synchronized", 46:"Level 3 halted", 47:"Level 3 reset", 48:"Link number out of range", 49:"Protocol driver not attached", 50:"No CSI structure available", 51:"Level 2 halted", 52:"Invalid exchange", 53:"Invalid request descriptor", 54:"Exchange full", 55:"No anode", 56:"Invalid request code", 57:"Invalid slot", 59:"Bad font file fmt", 60:"Device not a stream", 61:"No data (for no delay io)",
+62:"Timer expired", 63:"Out of streams resources", 64:"Machine is not on the network", 65:"Package not installed", 66:"The object is remote", 67:"The link has been severed", 68:"Advertise error", 69:"Srmount error", 70:"Communication error on send", 71:"Protocol error", 72:"Multihop attempted", 73:"Cross mount point (not really error)", 74:"Trying to read unreadable message", 75:"Value too large for defined data type", 76:"Given log. name not unique", 77:"f.d. invalid for this operation", 78:"Remote address changed",
+79:"Can access a needed shared lib", 80:"Accessing a corrupted shared lib", 81:".lib section in a.out corrupted", 82:"Attempting to link in too many libs", 83:"Attempting to exec a shared library", 84:"Illegal byte sequence", 86:"Streams pipe error", 87:"Too many users", 88:"Socket operation on non-socket", 89:"Destination address required", 90:"Message too long", 91:"Protocol wrong type for socket", 92:"Protocol not available", 93:"Unknown protocol", 94:"Socket type not supported", 95:"Not supported",
+96:"Protocol family not supported", 97:"Address family not supported by protocol family", 98:"Address already in use", 99:"Address not available", 100:"Network interface is not configured", 101:"Network is unreachable", 102:"Connection reset by network", 103:"Connection aborted", 104:"Connection reset by peer", 105:"No buffer space available", 106:"Socket is already connected", 107:"Socket is not connected", 108:"Can't send after socket shutdown", 109:"Too many references", 110:"Connection timed out",
+111:"Connection refused", 112:"Host is down", 113:"Host is unreachable", 114:"Socket already connected", 115:"Connection already in progress", 116:"Stale file handle", 122:"Quota exceeded", 123:"No medium (in tape drive)", 125:"Operation canceled", 130:"Previous owner died", 131:"State not recoverable"}, Qb = {Sc:1, rc:2, ed:3, Nb:4, Pb:5, Oc:6, ab:7, sc:8, kb:9, tb:10, hb:11, qd:11, wc:12, bb:13, Gb:14, Fc:15, rb:16, Fb:17, rd:18, qc:19, Hc:20, Rb:21, Ob:22, lc:23, cc:24, Mc:25, nd:26, Hb:27, Bc:28,
+dd:29, ad:30, dc:31, Uc:32, Cb:33, Yc:34, xc:42, Kb:43, ub:44, Tb:45, Ub:46, Vb:47, ac:48, od:49, oc:50, Sb:51, zb:35, tc:37, jb:52, nb:53, sd:54, mc:55, ob:56, pb:57, Ab:35, qb:59, Dc:60, pc:61, kd:62, Cc:63, yc:64, zc:65, $c:66, uc:67, fb:68, gd:69, vb:70, Vc:71, fc:72, Db:73, mb:74, Nc:76, lb:77, Zc:78, Wb:79, Xb:80, $b:81, Zb:82, Yb:83, Ec:38, Ic:39, hc:36, bc:40, Pc:95, Tc:96, yb:104, nc:105, gb:97, Xc:91, Kc:88, Ac:92, bd:108, xb:111, cb:98, wb:103, kc:101, ic:100, ld:110, Ib:112, Jb:113, Mb:115,
+ib:114, Bb:89, ec:90, Wc:93, cd:94, eb:99, jc:102, Qb:106, Gc:107, md:109, pd:87, Eb:122, hd:116, Lc:95, vc:123, Lb:84, Qc:75, sb:125, Jc:131, Rc:130, jd:86}, Rb = null, Sb = {}, Tb = [], Ub = 1, Vb = null, Wb = !0, L = {}, H = null, Mb = {};
+function M(a, b) {
+ a = Cb("/", a);
+ b = b || {};
+ if (!a) {
+ return {path:"", node:null};
+ }
+ var c = {wa:!0, oa:0}, d;
+ for (d in c) {
+ void 0 === b[d] && (b[d] = c[d]);
+ }
+ if (8 < b.oa) {
+ throw new H(40);
+ }
+ a = wb(a.split("/").filter(function(a) {
+ return !!a;
+ }), !1);
+ var f = Rb;
+ c = "/";
+ for (d = 0; d < a.length; d++) {
+ var g = d === a.length - 1;
+ if (g && b.parent) {
+ break;
+ }
+ f = Nb(f, a[d]);
+ c = Bb(c, a[d]);
+ f.S && (!g || g && b.wa) && (f = f.S.root);
+ if (!g || b.ka) {
+ for (g = 0; 40960 === (f.mode & 61440);) {
+ if (f = Xb(c), c = Cb(yb(c), f), f = M(c, {oa:b.oa}).node, 40 < g++) {
+ throw new H(40);
+ }
+ }
+ }
+ }
+ return {path:c, node:f};
+}
+function Yb(a) {
+ for (var b;;) {
+ if (a === a.parent) {
+ return a = a.v.Ca, b ? "/" !== a[a.length - 1] ? a + "/" + b : a + b : a;
+ }
+ b = b ? a.name + "/" + b : a.name;
+ a = a.parent;
+ }
+}
+function Zb(a, b) {
+ for (var c = 0, d = 0; d < b.length; d++) {
+ c = (c << 5) - c + b.charCodeAt(d) | 0;
+ }
+ return (a + c >>> 0) % Vb.length;
+}
+function $b(a) {
+ var b = Zb(a.parent.id, a.name);
+ a.T = Vb[b];
+ Vb[b] = a;
+}
+function ac(a) {
+ var b = Zb(a.parent.id, a.name);
+ if (Vb[b] === a) {
+ Vb[b] = a.T;
+ } else {
+ for (b = Vb[b]; b;) {
+ if (b.T === a) {
+ b.T = a.T;
+ break;
+ }
+ b = b.T;
+ }
+ }
+}
+function Nb(a, b) {
+ var c;
+ if (c = (c = bc(a, "x")) ? c : a.f.lookup ? 0 : 13) {
+ throw new H(c, a);
+ }
+ for (c = Vb[Zb(a.id, b)]; c; c = c.T) {
+ var d = c.name;
+ if (c.parent.id === a.id && d === b) {
+ return c;
+ }
+ }
+ return a.f.lookup(a, b);
+}
+function Lb(a, b, c, d) {
+ cc || (cc = function(a, b, c, d) {
+ a || (a = this);
+ this.parent = a;
+ this.v = a.v;
+ this.S = null;
+ this.id = Ub++;
+ this.name = b;
+ this.mode = c;
+ this.f = {};
+ this.g = {};
+ this.rdev = d;
+ }, cc.prototype = {}, Object.defineProperties(cc.prototype, {read:{get:function() {
+ return 365 === (this.mode & 365);
+ }, set:function(a) {
+ a ? this.mode |= 365 : this.mode &= -366;
+ }}, write:{get:function() {
+ return 146 === (this.mode & 146);
+ }, set:function(a) {
+ a ? this.mode |= 146 : this.mode &= -147;
+ }}}));
+ a = new cc(a, b, c, d);
+ $b(a);
+ return a;
+}
+function J(a) {
+ return 16384 === (a & 61440);
+}
+var dc = {r:0, rs:1052672, "r+":2, w:577, wx:705, xw:705, "w+":578, "wx+":706, "xw+":706, a:1089, ax:1217, xa:1217, "a+":1090, "ax+":1218, "xa+":1218};
+function ec(a) {
+ var b = ["r", "w", "rw"][a & 3];
+ a & 512 && (b += "w");
+ return b;
+}
+function bc(a, b) {
+ if (Wb) {
+ return 0;
+ }
+ if (-1 === b.indexOf("r") || a.mode & 292) {
+ if (-1 !== b.indexOf("w") && !(a.mode & 146) || -1 !== b.indexOf("x") && !(a.mode & 73)) {
+ return 13;
+ }
+ } else {
+ return 13;
+ }
+ return 0;
+}
+function fc(a, b) {
+ try {
+ return Nb(a, b), 17;
+ } catch (c) {
+ }
+ return bc(a, "wx");
+}
+function hc(a, b, c) {
+ try {
+ var d = Nb(a, b);
+ } catch (f) {
+ return f.i;
+ }
+ if (a = bc(a, "wx")) {
+ return a;
+ }
+ if (c) {
+ if (!J(d.mode)) {
+ return 20;
+ }
+ if (d === d.parent || "/" === Yb(d)) {
+ return 16;
+ }
+ } else {
+ if (J(d.mode)) {
+ return 21;
+ }
+ }
+ return 0;
+}
+function ic(a) {
+ var b = 4096;
+ for (a = a || 0; a <= b; a++) {
+ if (!Tb[a]) {
+ return a;
+ }
+ }
+ throw new H(24);
+}
+function jc(a, b) {
+ kc || (kc = function() {
+ }, kc.prototype = {}, Object.defineProperties(kc.prototype, {object:{get:function() {
+ return this.node;
+ }, set:function(a) {
+ this.node = a;
+ }}}));
+ var c = new kc, d;
+ for (d in a) {
+ c[d] = a[d];
+ }
+ a = c;
+ b = ic(b);
+ a.fd = b;
+ return Tb[b] = a;
+}
+var Kb = {open:function(a) {
+ a.g = Sb[a.node.rdev].g;
+ a.g.open && a.g.open(a);
+}, K:function() {
+ throw new H(29);
+}};
+function Fb(a, b) {
+ Sb[a] = {g:b};
+}
+function lc(a, b) {
+ var c = "/" === b, d = !b;
+ if (c && Rb) {
+ throw new H(16);
+ }
+ if (!c && !d) {
+ var f = M(b, {wa:!1});
+ b = f.path;
+ f = f.node;
+ if (f.S) {
+ throw new H(16);
+ }
+ if (!J(f.mode)) {
+ throw new H(20);
+ }
+ }
+ b = {type:a, ma:{}, Ca:b, Na:[]};
+ a = a.v(b);
+ a.v = b;
+ b.root = a;
+ c ? Rb = a : f && (f.S = b, f.v && f.v.Na.push(b));
+}
+function mc(a, b, c) {
+ var d = M(a, {parent:!0}).node;
+ a = zb(a);
+ if (!a || "." === a || ".." === a) {
+ throw new H(22);
+ }
+ var f = fc(d, a);
+ if (f) {
+ throw new H(f);
+ }
+ if (!d.f.W) {
+ throw new H(1);
+ }
+ return d.f.W(d, a, b, c);
+}
+function nc(a) {
+ mc(a, 16895, 0);
+}
+function oc(a, b, c) {
+ "undefined" === typeof c && (c = b, b = 438);
+ mc(a, b | 8192, c);
+}
+function pc(a, b) {
+ if (!Cb(a)) {
+ throw new H(2);
+ }
+ var c = M(b, {parent:!0}).node;
+ if (!c) {
+ throw new H(2);
+ }
+ b = zb(b);
+ var d = fc(c, b);
+ if (d) {
+ throw new H(d);
+ }
+ if (!c.f.symlink) {
+ throw new H(1);
+ }
+ c.f.symlink(c, b, a);
+}
+function Xb(a) {
+ a = M(a).node;
+ if (!a) {
+ throw new H(2);
+ }
+ if (!a.f.readlink) {
+ throw new H(22);
+ }
+ return Cb(Yb(a.parent), a.f.readlink(a));
+}
+function qc(a, b, c, d) {
+ if ("" === a) {
+ throw new H(2);
+ }
+ if ("string" === typeof b) {
+ var f = dc[b];
+ if ("undefined" === typeof f) {
+ throw Error("Unknown file open mode: " + b);
+ }
+ b = f;
+ }
+ c = b & 64 ? ("undefined" === typeof c ? 438 : c) & 4095 | 32768 : 0;
+ if ("object" === typeof a) {
+ var g = a;
+ } else {
+ a = xb(a);
+ try {
+ g = M(a, {ka:!(b & 131072)}).node;
+ } catch (k) {
+ }
+ }
+ f = !1;
+ if (b & 64) {
+ if (g) {
+ if (b & 128) {
+ throw new H(17);
+ }
+ } else {
+ g = mc(a, c, 0), f = !0;
+ }
+ }
+ if (!g) {
+ throw new H(2);
+ }
+ 8192 === (g.mode & 61440) && (b &= -513);
+ if (b & 65536 && !J(g.mode)) {
+ throw new H(20);
+ }
+ if (!f && (c = g ? 40960 === (g.mode & 61440) ? 40 : J(g.mode) && ("r" !== ec(b) || b & 512) ? 21 : bc(g, ec(b)) : 2)) {
+ throw new H(c);
+ }
+ if (b & 512) {
+ c = g;
+ var h;
+ "string" === typeof c ? h = M(c, {ka:!0}).node : h = c;
+ if (!h.f.C) {
+ throw new H(1);
+ }
+ if (J(h.mode)) {
+ throw new H(21);
+ }
+ if (32768 !== (h.mode & 61440)) {
+ throw new H(22);
+ }
+ if (c = bc(h, "w")) {
+ throw new H(c);
+ }
+ h.f.C(h, {size:0, timestamp:Date.now()});
+ }
+ b &= -641;
+ d = jc({node:g, path:Yb(g), flags:b, seekable:!0, position:0, g:g.g, $a:[], error:!1}, d);
+ d.g.open && d.g.open(d);
+ !e.logReadFiles || b & 1 || (rc || (rc = {}), a in rc || (rc[a] = 1, console.log("FS.trackingDelegate error on read file: " + a)));
+ try {
+ L.onOpenFile && (g = 0, 1 !== (b & 2097155) && (g |= 1), 0 !== (b & 2097155) && (g |= 2), L.onOpenFile(a, g));
+ } catch (k) {
+ console.log("FS.trackingDelegate['onOpenFile']('" + a + "', flags) threw an exception: " + k.message);
+ }
+ return d;
+}
+function sc(a, b, c) {
+ if (null === a.fd) {
+ throw new H(9);
+ }
+ if (!a.seekable || !a.g.K) {
+ throw new H(29);
+ }
+ if (0 != c && 1 != c && 2 != c) {
+ throw new H(22);
+ }
+ a.position = a.g.K(a, b, c);
+ a.$a = [];
+ return a.position;
+}
+function tc() {
+ H || (H = function(a, b) {
+ this.node = b;
+ this.Ta = function(a) {
+ this.i = a;
+ for (var b in Qb) {
+ if (Qb[b] === a) {
+ this.code = b;
+ break;
+ }
+ }
+ };
+ this.Ta(a);
+ this.message = Pb[a];
+ this.stack && Object.defineProperty(this, "stack", {value:Error().stack, writable:!0});
+ this.stack && (this.stack = pb(this.stack));
+ }, H.prototype = Error(), H.prototype.constructor = H, [2].forEach(function(a) {
+ Mb[a] = new H(a);
+ Mb[a].stack = "";
+ }));
+}
+var uc;
+function vc(a, b) {
+ var c = 0;
+ a && (c |= 365);
+ b && (c |= 146);
+ return c;
+}
+function wc(a, b, c) {
+ a = Bb("/dev", a);
+ var d = vc(!!b, !!c);
+ xc || (xc = 64);
+ var f = xc++ << 8 | 0;
+ Fb(f, {open:function(a) {
+ a.seekable = !1;
+ }, close:function() {
+ c && c.buffer && c.buffer.length && c(10);
+ }, read:function(a, c, d, f) {
+ for (var g = 0, h = 0; h < f; h++) {
+ try {
+ var k = b();
+ } catch (B) {
+ throw new H(5);
+ }
+ if (void 0 === k && 0 === g) {
+ throw new H(11);
+ }
+ if (null === k || void 0 === k) {
+ break;
+ }
+ g++;
+ c[d + h] = k;
+ }
+ g && (a.node.timestamp = Date.now());
+ return g;
+ }, write:function(a, b, d, f) {
+ for (var g = 0; g < f; g++) {
+ try {
+ c(b[d + g]);
+ } catch (u) {
+ throw new H(5);
+ }
+ }
+ f && (a.node.timestamp = Date.now());
+ return g;
+ }});
+ oc(a, d, f);
+}
+var xc, N = {}, cc, kc, rc, yc = {}, O = 0;
+function P() {
+ O += 4;
+ return p[O - 4 >> 2];
+}
+function zc() {
+ var a = Tb[P()];
+ if (!a) {
+ throw new H(9);
+ }
+ return a;
+}
+function Ac(a, b) {
+ if (-1 === a || 0 === b) {
+ return -22;
+ }
+ var c = yc[a];
+ if (!c) {
+ return 0;
+ }
+ if (b === c.wd) {
+ var d = Tb[c.fd], f = c.flags, g = new Uint8Array(w.subarray(a, a + b));
+ d && d.g.fa && d.g.fa(d, g, 0, b, f);
+ yc[a] = null;
+ c.Ea && Q(c.xd);
+ }
+ return 0;
+}
+function Bc(a) {
+ switch(a) {
+ case 1:
+ return 0;
+ case 2:
+ return 1;
+ case 4:
+ return 2;
+ case 8:
+ return 3;
+ default:
+ throw new TypeError("Unknown type size: " + a);
+ }
+}
+function Cc() {
+ for (var a = Array(256), b = 0; 256 > b; ++b) {
+ a[b] = String.fromCharCode(b);
+ }
+ Dc = a;
+}
+var Dc = void 0;
+function R(a) {
+ for (var b = ""; w[a];) {
+ b += Dc[w[a++]];
+ }
+ return b;
+}
+var Ec = {}, Fc = {}, Gc = {};
+function Hc(a) {
+ if (void 0 === a) {
+ return "_unknown";
+ }
+ a = a.replace(/[^a-zA-Z0-9_]/g, "$");
+ var b = a.charCodeAt(0);
+ return 48 <= b && 57 >= b ? "_" + a : a;
+}
+function Ic(a, b) {
+ a = Hc(a);
+ return (new Function("body", "return function " + a + '() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b);
+}
+function Jc(a, b) {
+ var c = Ic(b, function(a) {
+ this.name = b;
+ this.message = a;
+ a = Error(a).stack;
+ void 0 !== a && (this.stack = this.toString() + "\n" + a.replace(/^Error(:[^\n]*)?\n/, ""));
+ });
+ c.prototype = Object.create(a.prototype);
+ c.prototype.constructor = c;
+ c.prototype.toString = function() {
+ return void 0 === this.message ? this.name : this.name + ": " + this.message;
+ };
+ return c;
+}
+var Kc = void 0;
+function S(a) {
+ throw new Kc(a);
+}
+var Lc = void 0;
+function Mc(a) {
+ throw new Lc(a);
+}
+function T(a, b, c) {
+ function d(b) {
+ b = c(b);
+ b.length !== a.length && Mc("Mismatched type converter count");
+ for (var d = 0; d < a.length; ++d) {
+ U(a[d], b[d]);
+ }
+ }
+ a.forEach(function(a) {
+ Gc[a] = b;
+ });
+ var f = Array(b.length), g = [], h = 0;
+ b.forEach(function(a, b) {
+ Fc.hasOwnProperty(a) ? f[b] = Fc[a] : (g.push(a), Ec.hasOwnProperty(a) || (Ec[a] = []), Ec[a].push(function() {
+ f[b] = Fc[a];
+ ++h;
+ h === g.length && d(f);
+ }));
+ });
+ 0 === g.length && d(f);
+}
+function U(a, b, c) {
+ c = c || {};
+ if (!("argPackAdvance" in b)) {
+ throw new TypeError("registerType registeredInstance requires argPackAdvance");
+ }
+ var d = b.name;
+ a || S('type "' + d + '" must have a positive integer typeid pointer');
+ if (Fc.hasOwnProperty(a)) {
+ if (c.La) {
+ return;
+ }
+ S("Cannot register type '" + d + "' twice");
+ }
+ Fc[a] = b;
+ delete Gc[a];
+ Ec.hasOwnProperty(a) && (b = Ec[a], delete Ec[a], b.forEach(function(a) {
+ a();
+ }));
+}
+function Nc(a) {
+ if (!(this instanceof Oc && a instanceof Oc)) {
+ return !1;
+ }
+ var b = this.b.m.h, c = this.b.j, d = a.b.m.h;
+ for (a = a.b.j; b.F;) {
+ c = b.$(c), b = b.F;
+ }
+ for (; d.F;) {
+ a = d.$(a), d = d.F;
+ }
+ return b === d && c === a;
+}
+function Pc(a) {
+ return {count:a.count, R:a.R, Y:a.Y, j:a.j, m:a.m, B:a.B, D:a.D};
+}
+function Qc(a) {
+ S(a.b.m.h.name + " instance already deleted");
+}
+var Rc = !1;
+function Sc() {
+}
+function Tc(a) {
+ a.B ? a.D.O(a.B) : a.m.h.O(a.j);
+}
+function Uc(a) {
+ --a.count.value;
+ 0 === a.count.value && Tc(a);
+}
+function Vc(a) {
+ if ("undefined" === typeof FinalizationGroup) {
+ return Vc = function(a) {
+ return a;
+ }, a;
+ }
+ Rc = new FinalizationGroup(function(a) {
+ for (var b = a.next(); !b.done; b = a.next()) {
+ b = b.value, b.j ? Uc(b) : console.warn("object already deleted: " + b.j);
+ }
+ });
+ Vc = function(a) {
+ Rc.register(a, a.b, a.b);
+ return a;
+ };
+ Sc = function(a) {
+ Rc.unregister(a.b);
+ };
+ return Vc(a);
+}
+function Wc() {
+ this.b.j || Qc(this);
+ if (this.b.Y) {
+ return this.b.count.value += 1, this;
+ }
+ var a = Vc(Object.create(Object.getPrototypeOf(this), {b:{value:Pc(this.b)}}));
+ a.b.count.value += 1;
+ a.b.R = !1;
+ return a;
+}
+function Xc() {
+ this.b.j || Qc(this);
+ this.b.R && !this.b.Y && S("Object already scheduled for deletion");
+ Sc(this);
+ Uc(this.b);
+ this.b.Y || (this.b.B = void 0, this.b.j = void 0);
+}
+function Yc() {
+ return !this.b.j;
+}
+var Zc = void 0, $c = [];
+function ad() {
+ for (; $c.length;) {
+ var a = $c.pop();
+ a.b.R = !1;
+ a["delete"]();
+ }
+}
+function bd() {
+ this.b.j || Qc(this);
+ this.b.R && !this.b.Y && S("Object already scheduled for deletion");
+ $c.push(this);
+ 1 === $c.length && Zc && Zc(ad);
+ this.b.R = !0;
+ return this;
+}
+function cd() {
+ Oc.prototype.isAliasOf = Nc;
+ Oc.prototype.clone = Wc;
+ Oc.prototype["delete"] = Xc;
+ Oc.prototype.isDeleted = Yc;
+ Oc.prototype.deleteLater = bd;
+}
+function Oc() {
+}
+var dd = {};
+function ed(a, b, c) {
+ if (void 0 === a[b].o) {
+ var d = a[b];
+ a[b] = function() {
+ a[b].o.hasOwnProperty(arguments.length) || S("Function '" + c + "' called with an invalid number of arguments (" + arguments.length + ") - expects one of (" + a[b].o + ")!");
+ return a[b].o[arguments.length].apply(this, arguments);
+ };
+ a[b].o = [];
+ a[b].o[d.P] = d;
+ }
+}
+function fd(a, b, c) {
+ e.hasOwnProperty(a) ? ((void 0 === c || void 0 !== e[a].o && void 0 !== e[a].o[c]) && S("Cannot register public name '" + a + "' twice"), ed(e, a, a), e.hasOwnProperty(c) && S("Cannot register multiple overloads of a function with the same number of arguments (" + c + ")!"), e[a].o[c] = b) : (e[a] = b, void 0 !== c && (e[a].yd = c));
+}
+function gd(a, b, c, d, f, g, h, k) {
+ this.name = a;
+ this.constructor = b;
+ this.J = c;
+ this.O = d;
+ this.F = f;
+ this.Ja = g;
+ this.$ = h;
+ this.Ha = k;
+ this.Pa = [];
+}
+function hd(a, b, c) {
+ for (; b !== c;) {
+ b.$ || S("Expected null or instance of " + c.name + ", got an instance of " + b.name), a = b.$(a), b = b.F;
+ }
+ return a;
+}
+function id(a, b) {
+ if (null === b) {
+ return this.la && S("null is not a valid " + this.name), 0;
+ }
+ b.b || S('Cannot pass "' + jd(b) + '" as a ' + this.name);
+ b.b.j || S("Cannot pass deleted object as a pointer of type " + this.name);
+ return hd(b.b.j, b.b.m.h, this.h);
+}
+function kd(a, b) {
+ if (null === b) {
+ this.la && S("null is not a valid " + this.name);
+ if (this.da) {
+ var c = this.Qa();
+ null !== a && a.push(this.O, c);
+ return c;
+ }
+ return 0;
+ }
+ b.b || S('Cannot pass "' + jd(b) + '" as a ' + this.name);
+ b.b.j || S("Cannot pass deleted object as a pointer of type " + this.name);
+ !this.ba && b.b.m.ba && S("Cannot convert argument of type " + (b.b.D ? b.b.D.name : b.b.m.name) + " to parameter type " + this.name);
+ c = hd(b.b.j, b.b.m.h, this.h);
+ if (this.da) {
+ switch(void 0 === b.b.B && S("Passing raw pointer to smart pointer is illegal"), this.Ua) {
+ case 0:
+ b.b.D === this ? c = b.b.B : S("Cannot convert argument of type " + (b.b.D ? b.b.D.name : b.b.m.name) + " to parameter type " + this.name);
+ break;
+ case 1:
+ c = b.b.B;
+ break;
+ case 2:
+ if (b.b.D === this) {
+ c = b.b.B;
+ } else {
+ var d = b.clone();
+ c = this.Ra(c, ld(function() {
+ d["delete"]();
+ }));
+ null !== a && a.push(this.O, c);
+ }
+ break;
+ default:
+ S("Unsupporting sharing policy");
+ }
+ }
+ return c;
+}
+function md(a, b) {
+ if (null === b) {
+ return this.la && S("null is not a valid " + this.name), 0;
+ }
+ b.b || S('Cannot pass "' + jd(b) + '" as a ' + this.name);
+ b.b.j || S("Cannot pass deleted object as a pointer of type " + this.name);
+ b.b.m.ba && S("Cannot convert argument of type " + b.b.m.name + " to parameter type " + this.name);
+ return hd(b.b.j, b.b.m.h, this.h);
+}
+function nd(a) {
+ return this.fromWireType(y[a >> 2]);
+}
+function od(a) {
+ this.Da && (a = this.Da(a));
+ return a;
+}
+function pd(a) {
+ this.O && this.O(a);
+}
+function qd(a) {
+ if (null !== a) {
+ a["delete"]();
+ }
+}
+function rd(a, b, c) {
+ if (b === c) {
+ return a;
+ }
+ if (void 0 === c.F) {
+ return null;
+ }
+ a = rd(a, b, c.F);
+ return null === a ? null : c.Ha(a);
+}
+function sd() {
+ return Object.keys(td).length;
+}
+function ud() {
+ var a = [], b;
+ for (b in td) {
+ td.hasOwnProperty(b) && a.push(td[b]);
+ }
+ return a;
+}
+function vd(a) {
+ Zc = a;
+ $c.length && Zc && Zc(ad);
+}
+function wd() {
+ e.getInheritedInstanceCount = sd;
+ e.getLiveInheritedInstances = ud;
+ e.flushPendingDeletes = ad;
+ e.setDelayFunction = vd;
+}
+var td = {};
+function xd(a, b) {
+ for (void 0 === b && S("ptr should not be undefined"); a.F;) {
+ b = a.$(b), a = a.F;
+ }
+ return b;
+}
+function yd(a, b) {
+ b = xd(a, b);
+ return td[b];
+}
+function zd(a, b) {
+ b.m && b.j || Mc("makeClassHandle requires ptr and ptrType");
+ !!b.D !== !!b.B && Mc("Both smartPtrType and smartPtr must be specified");
+ b.count = {value:1};
+ return Vc(Object.create(a, {b:{value:b}}));
+}
+function Ad(a) {
+ function b() {
+ return this.da ? zd(this.h.J, {m:this.Oa, j:c, D:this, B:a}) : zd(this.h.J, {m:this, j:a});
+ }
+ var c = this.Ka(a);
+ if (!c) {
+ return this.ta(a), null;
+ }
+ var d = yd(this.h, c);
+ if (void 0 !== d) {
+ if (0 === d.b.count.value) {
+ return d.b.j = c, d.b.B = a, d.clone();
+ }
+ d = d.clone();
+ this.ta(a);
+ return d;
+ }
+ d = this.h.Ja(c);
+ d = dd[d];
+ if (!d) {
+ return b.call(this);
+ }
+ d = this.ba ? d.Ga : d.pointerType;
+ var f = rd(c, this.h, d.h);
+ return null === f ? b.call(this) : this.da ? zd(d.h.J, {m:d, j:f, D:this, B:a}) : zd(d.h.J, {m:d, j:f});
+}
+function Bd() {
+ V.prototype.Ka = od;
+ V.prototype.ta = pd;
+ V.prototype.argPackAdvance = 8;
+ V.prototype.readValueFromPointer = nd;
+ V.prototype.deleteObject = qd;
+ V.prototype.fromWireType = Ad;
+}
+function V(a, b, c, d, f, g, h, k, t, r, u) {
+ this.name = a;
+ this.h = b;
+ this.la = c;
+ this.ba = d;
+ this.da = f;
+ this.Oa = g;
+ this.Ua = h;
+ this.Da = k;
+ this.Qa = t;
+ this.Ra = r;
+ this.O = u;
+ f || void 0 !== b.F ? this.toWireType = kd : (this.toWireType = d ? id : md, this.H = null);
+}
+function Cd(a, b, c) {
+ e.hasOwnProperty(a) || Mc("Replacing nonexistant public symbol");
+ void 0 !== e[a].o && void 0 !== c ? e[a].o[c] = b : (e[a] = b, e[a].P = c);
+}
+function W(a, b) {
+ a = R(a);
+ if (void 0 !== e["FUNCTION_TABLE_" + a]) {
+ var c = e["FUNCTION_TABLE_" + a][b];
+ } else {
+ if ("undefined" !== typeof FUNCTION_TABLE) {
+ c = FUNCTION_TABLE[b];
+ } else {
+ c = e["dynCall_" + a];
+ void 0 === c && (c = e["dynCall_" + a.replace(/f/g, "d")], void 0 === c && S("No dynCall invoker for signature: " + a));
+ for (var d = [], f = 1; f < a.length; ++f) {
+ d.push("a" + f);
+ }
+ f = "return function " + ("dynCall_" + a + "_" + b) + "(" + d.join(", ") + ") {\n";
+ f += " return dynCall(rawFunction" + (d.length ? ", " : "") + d.join(", ") + ");\n";
+ c = (new Function("dynCall", "rawFunction", f + "};\n"))(c, b);
+ }
+ }
+ "function" !== typeof c && S("unknown function pointer with signature " + a + ": " + b);
+ return c;
+}
+var Dd = void 0;
+function Ed(a) {
+ a = Fd(a);
+ var b = R(a);
+ Q(a);
+ return b;
+}
+function Gd(a, b) {
+ function c(a) {
+ f[a] || Fc[a] || (Gc[a] ? Gc[a].forEach(c) : (d.push(a), f[a] = !0));
+ }
+ var d = [], f = {};
+ b.forEach(c);
+ throw new Dd(a + ": " + d.map(Ed).join([", "]));
+}
+function Hd(a, b) {
+ if (!(a instanceof Function)) {
+ throw new TypeError("new_ called with constructor type " + typeof a + " which is not a function");
+ }
+ var c = Ic(a.name || "unknownFunctionName", function() {
+ });
+ c.prototype = a.prototype;
+ c = new c;
+ a = a.apply(c, b);
+ return a instanceof Object ? a : c;
+}
+function Id(a) {
+ for (; a.length;) {
+ var b = a.pop();
+ a.pop()(b);
+ }
+}
+function Jd(a, b, c, d, f) {
+ var g = b.length;
+ 2 > g && S("argTypes array size mismatch! Must at least get return value and 'this' types!");
+ var h = null !== b[1] && null !== c, k = !1;
+ for (c = 1; c < b.length; ++c) {
+ if (null !== b[c] && void 0 === b[c].H) {
+ k = !0;
+ break;
+ }
+ }
+ var t = "void" !== b[0].name, r = "", u = "";
+ for (c = 0; c < g - 2; ++c) {
+ r += (0 !== c ? ", " : "") + "arg" + c, u += (0 !== c ? ", " : "") + "arg" + c + "Wired";
+ }
+ a = "return function " + Hc(a) + "(" + r + ") {\nif (arguments.length !== " + (g - 2) + ") {\nthrowBindingError('function " + a + " called with ' + arguments.length + ' arguments, expected " + (g - 2) + " args!');\n}\n";
+ k && (a += "var destructors = [];\n");
+ var z = k ? "destructors" : "null";
+ r = "throwBindingError invoker fn runDestructors retType classParam".split(" ");
+ d = [S, d, f, Id, b[0], b[1]];
+ h && (a += "var thisWired = classParam.toWireType(" + z + ", this);\n");
+ for (c = 0; c < g - 2; ++c) {
+ a += "var arg" + c + "Wired = argType" + c + ".toWireType(" + z + ", arg" + c + "); // " + b[c + 2].name + "\n", r.push("argType" + c), d.push(b[c + 2]);
+ }
+ h && (u = "thisWired" + (0 < u.length ? ", " : "") + u);
+ a += (t ? "var rv = " : "") + "invoker(fn" + (0 < u.length ? ", " : "") + u + ");\n";
+ if (k) {
+ a += "runDestructors(destructors);\n";
+ } else {
+ for (c = h ? 1 : 2; c < b.length; ++c) {
+ g = 1 === c ? "thisWired" : "arg" + (c - 2) + "Wired", null !== b[c].H && (a += g + "_dtor(" + g + "); // " + b[c].name + "\n", r.push(g + "_dtor"), d.push(b[c].H));
+ }
+ }
+ t && (a += "var ret = retType.fromWireType(rv);\nreturn ret;\n");
+ r.push(a + "}\n");
+ return Hd(Function, r).apply(null, d);
+}
+function Kd(a, b) {
+ for (var c = [], d = 0; d < a; d++) {
+ c.push(p[(b >> 2) + d]);
+ }
+ return c;
+}
+function Ld(a, b, c) {
+ a instanceof Object || S(c + ' with invalid "this": ' + a);
+ a instanceof b.h.constructor || S(c + ' incompatible with "this" of type ' + a.constructor.name);
+ a.b.j || S("cannot call emscripten binding method " + c + " on deleted object");
+ return hd(a.b.j, a.b.m.h, b.h);
+}
+var Md = [], X = [{}, {value:void 0}, {value:null}, {value:!0}, {value:!1}];
+function Nd(a) {
+ 4 < a && 0 === --X[a].pa && (X[a] = void 0, Md.push(a));
+}
+function Od() {
+ for (var a = 0, b = 5; b < X.length; ++b) {
+ void 0 !== X[b] && ++a;
+ }
+ return a;
+}
+function Pd() {
+ for (var a = 5; a < X.length; ++a) {
+ if (void 0 !== X[a]) {
+ return X[a];
+ }
+ }
+ return null;
+}
+function Qd() {
+ e.count_emval_handles = Od;
+ e.get_first_emval = Pd;
+}
+function ld(a) {
+ switch(a) {
+ case void 0:
+ return 1;
+ case null:
+ return 2;
+ case !0:
+ return 3;
+ case !1:
+ return 4;
+ default:
+ var b = Md.length ? Md.pop() : X.length;
+ X[b] = {pa:1, value:a};
+ return b;
+ }
+}
+function jd(a) {
+ if (null === a) {
+ return "null";
+ }
+ var b = typeof a;
+ return "object" === b || "array" === b || "function" === b ? a.toString() : "" + a;
+}
+function Rd(a, b) {
+ switch(b) {
+ case 2:
+ return function(a) {
+ return this.fromWireType(Ja[a >> 2]);
+ };
+ case 3:
+ return function(a) {
+ return this.fromWireType(Ka[a >> 3]);
+ };
+ default:
+ throw new TypeError("Unknown float type: " + a);
+ }
+}
+function Sd(a, b, c) {
+ switch(b) {
+ case 0:
+ return c ? function(a) {
+ return q[a];
+ } : function(a) {
+ return w[a];
+ };
+ case 1:
+ return c ? function(a) {
+ return Ha[a >> 1];
+ } : function(a) {
+ return Ia[a >> 1];
+ };
+ case 2:
+ return c ? function(a) {
+ return p[a >> 2];
+ } : function(a) {
+ return y[a >> 2];
+ };
+ default:
+ throw new TypeError("Unknown integer type: " + a);
+ }
+}
+function Td(a, b) {
+ var c = Fc[a];
+ void 0 === c && S(b + " has unknown type " + Ed(a));
+ return c;
+}
+function Ud() {
+ void 0 === Ud.start && (Ud.start = Date.now());
+ return 1E3 * (Date.now() - Ud.start) | 0;
+}
+function ra() {
+ return q.length;
+}
+function Vd(a) {
+ return 0 > a || 0 === a && -Infinity === 1 / a;
+}
+function Wd(a, b) {
+ function c(a) {
+ var b = d;
+ "double" === a || "i64" === a ? b & 7 && (assert(4 === (b & 7)), b += 4) : assert(0 === (b & 3));
+ d = b;
+ "double" === a ? (a = Ka[d >> 3], d += 8) : "i64" == a ? (a = [p[d >> 2], p[d + 4 >> 2]], d += 8) : (assert(0 === (d & 3)), a = p[d >> 2], d += 4);
+ return a;
+ }
+ assert(0 === (b & 3));
+ for (var d = b, f = [], g, h;;) {
+ var k = a;
+ g = q[a >> 0];
+ if (0 === g) {
+ break;
+ }
+ h = q[a + 1 >> 0];
+ if (37 == g) {
+ var t = !1, r = b = !1, u = !1, z = !1;
+ a: for (;;) {
+ switch(h) {
+ case 43:
+ t = !0;
+ break;
+ case 45:
+ b = !0;
+ break;
+ case 35:
+ r = !0;
+ break;
+ case 48:
+ if (u) {
+ break a;
+ } else {
+ u = !0;
+ break;
+ }
+ case 32:
+ z = !0;
+ break;
+ default:
+ break a;
+ }
+ a++;
+ h = q[a + 1 >> 0];
+ }
+ var B = 0;
+ if (42 == h) {
+ B = c("i32"), a++, h = q[a + 1 >> 0];
+ } else {
+ for (; 48 <= h && 57 >= h;) {
+ B = 10 * B + (h - 48), a++, h = q[a + 1 >> 0];
+ }
+ }
+ var C = !1, A = -1;
+ if (46 == h) {
+ A = 0;
+ C = !0;
+ a++;
+ h = q[a + 1 >> 0];
+ if (42 == h) {
+ A = c("i32"), a++;
+ } else {
+ for (;;) {
+ h = q[a + 1 >> 0];
+ if (48 > h || 57 < h) {
+ break;
+ }
+ A = 10 * A + (h - 48);
+ a++;
+ }
+ }
+ h = q[a + 1 >> 0];
+ }
+ 0 > A && (A = 6, C = !1);
+ switch(String.fromCharCode(h)) {
+ case "h":
+ h = q[a + 2 >> 0];
+ if (104 == h) {
+ a++;
+ var D = 1;
+ } else {
+ D = 2;
+ }
+ break;
+ case "l":
+ h = q[a + 2 >> 0];
+ 108 == h ? (a++, D = 8) : D = 4;
+ break;
+ case "L":
+ case "q":
+ case "j":
+ D = 8;
+ break;
+ case "z":
+ case "t":
+ case "I":
+ D = 4;
+ break;
+ default:
+ D = null;
+ }
+ D && a++;
+ h = q[a + 1 >> 0];
+ switch(String.fromCharCode(h)) {
+ case "d":
+ case "i":
+ case "u":
+ case "o":
+ case "x":
+ case "X":
+ case "p":
+ k = 100 == h || 105 == h;
+ D = D || 4;
+ g = c("i" + 8 * D);
+ 8 == D && (g = ua(g[0], g[1], 117 == h));
+ 4 >= D && (g = (k ? Wa : Va)(g & Math.pow(256, D) - 1, 8 * D));
+ var ia = Math.abs(g);
+ k = "";
+ if (100 == h || 105 == h) {
+ var v = Wa(g, 8 * D, 1).toString(10);
+ } else {
+ if (117 == h) {
+ v = Va(g, 8 * D, 1).toString(10), g = Math.abs(g);
+ } else {
+ if (111 == h) {
+ v = (r ? "0" : "") + ia.toString(8);
+ } else {
+ if (120 == h || 88 == h) {
+ k = r && 0 != g ? "0x" : "";
+ if (0 > g) {
+ g = -g;
+ v = (ia - 1).toString(16);
+ ia = [];
+ for (r = 0; r < v.length; r++) {
+ ia.push((15 - parseInt(v[r], 16)).toString(16));
+ }
+ for (v = ia.join(""); v.length < 2 * D;) {
+ v = "f" + v;
+ }
+ } else {
+ v = ia.toString(16);
+ }
+ 88 == h && (k = k.toUpperCase(), v = v.toUpperCase());
+ } else {
+ 112 == h && (0 === ia ? v = "(nil)" : (k = "0x", v = ia.toString(16)));
+ }
+ }
+ }
+ }
+ if (C) {
+ for (; v.length < A;) {
+ v = "0" + v;
+ }
+ }
+ 0 <= g && (t ? k = "+" + k : z && (k = " " + k));
+ "-" == v.charAt(0) && (k = "-" + k, v = v.substr(1));
+ for (; k.length + v.length < B;) {
+ b ? v += " " : u ? v = "0" + v : k = " " + k;
+ }
+ v = k + v;
+ v.split("").forEach(function(a) {
+ f.push(a.charCodeAt(0));
+ });
+ break;
+ case "f":
+ case "F":
+ case "e":
+ case "E":
+ case "g":
+ case "G":
+ g = c("double");
+ if (isNaN(g)) {
+ v = "nan", u = !1;
+ } else {
+ if (isFinite(g)) {
+ C = !1;
+ D = Math.min(A, 20);
+ if (103 == h || 71 == h) {
+ C = !0, A = A || 1, D = parseInt(g.toExponential(D).split("e")[1], 10), A > D && -4 <= D ? (h = (103 == h ? "f" : "F").charCodeAt(0), A -= D + 1) : (h = (103 == h ? "e" : "E").charCodeAt(0), A--), D = Math.min(A, 20);
+ }
+ if (101 == h || 69 == h) {
+ v = g.toExponential(D), /[eE][-+]\d$/.test(v) && (v = v.slice(0, -1) + "0" + v.slice(-1));
+ } else {
+ if (102 == h || 70 == h) {
+ v = g.toFixed(D), 0 === g && Vd(g) && (v = "-" + v);
+ }
+ }
+ k = v.split("e");
+ if (C && !r) {
+ for (; 1 < k[0].length && -1 != k[0].indexOf(".") && ("0" == k[0].slice(-1) || "." == k[0].slice(-1));) {
+ k[0] = k[0].slice(0, -1);
+ }
+ } else {
+ for (r && -1 == v.indexOf(".") && (k[0] += "."); A > D++;) {
+ k[0] += "0";
+ }
+ }
+ v = k[0] + (1 < k.length ? "e" + k[1] : "");
+ 69 == h && (v = v.toUpperCase());
+ 0 <= g && (t ? v = "+" + v : z && (v = " " + v));
+ } else {
+ v = (0 > g ? "-" : "") + "inf", u = !1;
+ }
+ }
+ for (; v.length < B;) {
+ b ? v += " " : !u || "-" != v[0] && "+" != v[0] ? v = (u ? "0" : " ") + v : v = v[0] + "0" + v.slice(1);
+ }
+ 97 > h && (v = v.toUpperCase());
+ v.split("").forEach(function(a) {
+ f.push(a.charCodeAt(0));
+ });
+ break;
+ case "s":
+ u = (t = c("i8*")) ? Xd(t) : 6;
+ C && (u = Math.min(u, A));
+ if (!b) {
+ for (; u < B--;) {
+ f.push(32);
+ }
+ }
+ if (t) {
+ for (r = 0; r < u; r++) {
+ f.push(w[t++ >> 0]);
+ }
+ } else {
+ f = f.concat(Hb("(null)".substr(0, u), !0));
+ }
+ if (b) {
+ for (; u < B--;) {
+ f.push(32);
+ }
+ }
+ break;
+ case "c":
+ for (b && f.push(c("i8")); 0 < --B;) {
+ f.push(32);
+ }
+ b || f.push(c("i8"));
+ break;
+ case "n":
+ b = c("i32*");
+ p[b >> 2] = f.length;
+ break;
+ case "%":
+ f.push(g);
+ break;
+ default:
+ for (r = k; r < a + 2; r++) {
+ f.push(q[r >> 0]);
+ }
+ }
+ a += 2;
+ } else {
+ f.push(g), a += 1;
+ }
+ }
+ return f;
+}
+function Yd(a) {
+ if (!a || !a.callee || !a.callee.name) {
+ return [null, "", ""];
+ }
+ var b = a.callee.name, c = "(", d = !0, f;
+ for (f in a) {
+ var g = a[f];
+ d || (c += ", ");
+ d = !1;
+ c = "number" === typeof g || "string" === typeof g ? c + g : c + ("(" + typeof g + ")");
+ }
+ c += ")";
+ a = (a = a.callee.caller) ? a.arguments : [];
+ d && (c = "");
+ return [a, b, c];
+}
+function Zd(a) {
+ var b = qb();
+ b = b.slice(b.indexOf("\n", Math.max(b.lastIndexOf("_emscripten_log"), b.lastIndexOf("_emscripten_get_callstack"))) + 1);
+ a & 8 && (sa('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'), a = a ^ 8 | 16);
+ var c = null;
+ if (a & 128) {
+ for (c = Yd(arguments); 0 <= c[1].indexOf("_emscripten_");) {
+ c = Yd(c[0]);
+ }
+ }
+ var d = b.split("\n");
+ b = "";
+ var f = /\s*(.*?)@(.*?):([0-9]+):([0-9]+)/, g = /\s*(.*?)@(.*):(.*)(:(.*))?/, h = /\s*at (.*?) \((.*):(.*):(.*)\)/, k;
+ for (k in d) {
+ var t = d[k], r;
+ if ((r = h.exec(t)) && 5 == r.length) {
+ t = r[1];
+ var u = r[2];
+ var z = r[3];
+ r = r[4];
+ } else {
+ if ((r = f.exec(t)) || (r = g.exec(t)), r && 4 <= r.length) {
+ t = r[1], u = r[2], z = r[3], r = r[4] | 0;
+ } else {
+ b += t + "\n";
+ continue;
+ }
+ }
+ var B = a & 32 ? ob(t) : t;
+ B || (B = t);
+ var C = !1;
+ if (a & 8) {
+ var A = (void 0).zd({line:z, Fa:r});
+ if (C = A && A.source) {
+ a & 64 && (A.source = A.source.substring(A.source.replace(/\\/g, "/").lastIndexOf("/") + 1)), b += " at " + B + " (" + A.source + ":" + A.line + ":" + A.Fa + ")\n";
+ }
+ }
+ if (a & 16 || !C) {
+ a & 64 && (u = u.substring(u.replace(/\\/g, "/").lastIndexOf("/") + 1)), b += (C ? " = " + t : " at " + B) + " (" + u + ":" + z + ":" + r + ")\n";
+ }
+ a & 128 && c[0] && (c[1] == t && 0 < c[2].length && (b = b.replace(/\s+$/, ""), b += " with values: " + c[1] + c[2] + "\n"), c = Yd(c[0]));
+ }
+ return b = b.replace(/\s+$/, "");
+}
+function $d(a, b) {
+ a & 24 && (b = b.replace(/\s+$/, ""), b += (0 < b.length ? "\n" : "") + Zd(a));
+ a & 1 ? a & 4 ? console.error(b) : a & 2 ? console.warn(b) : console.log(b) : a & 6 ? n(b) : oa(b);
+}
+function ae(a, b, c) {
+ w.set(w.subarray(b, b + c), a);
+}
+function Y(a) {
+ a = eval(x(a));
+ if (null == a) {
+ return 0;
+ }
+ var b = Ea(a);
+ if (!Y.s || Y.s < b + 1) {
+ Y.s && Q(Y.buffer), Y.s = b + 1, Y.buffer = za(Y.s);
+ }
+ Da(a, Y.buffer, Y.s);
+ return Y.buffer;
+}
+function be(a) {
+ if (0 === a) {
+ return 0;
+ }
+ a = x(a);
+ if (!G.hasOwnProperty(a)) {
+ return 0;
+ }
+ be.ja && Q(be.ja);
+ a = G[a];
+ var b = Ea(a) + 1, c = za(b);
+ c && Ca(a, q, c, b);
+ be.ja = c;
+ return be.ja;
+}
+Da("GMT", 1861984, 4);
+function ce() {
+ function a(a) {
+ return (a = a.toTimeString().match(/\(([A-Za-z ]+)\)$/)) ? a[1] : "GMT";
+ }
+ if (!ce.s) {
+ ce.s = !0;
+ p[de() >> 2] = 60 * (new Date).getTimezoneOffset();
+ var b = new Date(2000, 0, 1), c = new Date(2000, 6, 1);
+ p[ee() >> 2] = Number(b.getTimezoneOffset() != c.getTimezoneOffset());
+ var d = a(b), f = a(c);
+ d = ya(Hb(d));
+ f = ya(Hb(f));
+ c.getTimezoneOffset() < b.getTimezoneOffset() ? (p[fe() >> 2] = d, p[fe() + 4 >> 2] = f) : (p[fe() >> 2] = f, p[fe() + 4 >> 2] = d);
+ }
+}
+function ge(a, b) {
+ ce();
+ a = new Date(1000 * p[a >> 2]);
+ p[b >> 2] = a.getSeconds();
+ p[b + 4 >> 2] = a.getMinutes();
+ p[b + 8 >> 2] = a.getHours();
+ p[b + 12 >> 2] = a.getDate();
+ p[b + 16 >> 2] = a.getMonth();
+ p[b + 20 >> 2] = a.getFullYear() - 1900;
+ p[b + 24 >> 2] = a.getDay();
+ var c = new Date(a.getFullYear(), 0, 1);
+ p[b + 28 >> 2] = (a.getTime() - c.getTime()) / 864E5 | 0;
+ p[b + 36 >> 2] = -(60 * a.getTimezoneOffset());
+ var d = (new Date(2000, 6, 1)).getTimezoneOffset();
+ c = c.getTimezoneOffset();
+ a = (d != c && a.getTimezoneOffset() == Math.min(c, d)) | 0;
+ p[b + 32 >> 2] = a;
+ a = p[fe() + (a ? 4 : 0) >> 2];
+ p[b + 40 >> 2] = a;
+ return b;
+}
+function he(a) {
+ a = Ga(a);
+ var b = buffer.byteLength;
+ try {
+ return -1 !== wa.grow((a - b) / 65536) ? (buffer = wa.buffer, !0) : !1;
+ } catch (c) {
+ return console.error("emscripten_realloc_buffer: Attempted to grow from " + b + " bytes to " + a + " bytes, but got error: " + c), !1;
+ }
+}
+function ie(a) {
+ var b = ra();
+ assert(a > b);
+ if (2147418112 < a) {
+ return n("Cannot enlarge memory, asked to go up to " + a + " bytes, but the limit is 2147418112 bytes!"), !1;
+ }
+ for (var c = Math.max(b, 16777216); c < a;) {
+ 536870912 >= c ? c = Ga(2 * c) : c = Math.min(Ga((3 * c + 2147483648) / 4), 2147418112), c === b && sa("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only " + q.length);
+ }
+ if (!he(c)) {
+ return n("Failed to grow the heap from " + b + " bytes to " + c + " bytes, not enough memory!"), !1;
+ }
+ La();
+ return !0;
+}
+function je(a) {
+ return 0 === a % 4 && (0 !== a % 100 || 0 === a % 400);
+}
+function ke(a, b) {
+ for (var c = 0, d = 0; d <= b; c += a[d++]) {
+ }
+ return c;
+}
+var le = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], me = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
+function ne(a, b) {
+ for (a = new Date(a.getTime()); 0 < b;) {
+ var c = a.getMonth(), d = (je(a.getFullYear()) ? le : me)[c];
+ if (b > d - a.getDate()) {
+ b -= d - a.getDate() + 1, a.setDate(1), 11 > c ? a.setMonth(c + 1) : (a.setMonth(0), a.setFullYear(a.getFullYear() + 1));
+ } else {
+ a.setDate(a.getDate() + b);
+ break;
+ }
+ }
+ return a;
+}
+function oe(a, b, c, d) {
+ function f(a, b, c) {
+ for (a = "number" === typeof a ? a.toString() : a || ""; a.length < b;) {
+ a = c[0] + a;
+ }
+ return a;
+ }
+ function g(a, b) {
+ return f(a, b, "0");
+ }
+ function h(a, b) {
+ function c(a) {
+ return 0 > a ? -1 : 0 < a ? 1 : 0;
+ }
+ var d;
+ 0 === (d = c(a.getFullYear() - b.getFullYear())) && 0 === (d = c(a.getMonth() - b.getMonth())) && (d = c(a.getDate() - b.getDate()));
+ return d;
+ }
+ function k(a) {
+ switch(a.getDay()) {
+ case 0:
+ return new Date(a.getFullYear() - 1, 11, 29);
+ case 1:
+ return a;
+ case 2:
+ return new Date(a.getFullYear(), 0, 3);
+ case 3:
+ return new Date(a.getFullYear(), 0, 2);
+ case 4:
+ return new Date(a.getFullYear(), 0, 1);
+ case 5:
+ return new Date(a.getFullYear() - 1, 11, 31);
+ case 6:
+ return new Date(a.getFullYear() - 1, 11, 30);
+ }
+ }
+ function t(a) {
+ a = ne(new Date(a.u + 1900, 0, 1), a.ia);
+ var b = k(new Date(a.getFullYear() + 1, 0, 4));
+ return 0 >= h(k(new Date(a.getFullYear(), 0, 4)), a) ? 0 >= h(b, a) ? a.getFullYear() + 1 : a.getFullYear() : a.getFullYear() - 1;
+ }
+ var r = p[d + 40 >> 2];
+ d = {Ya:p[d >> 2], Xa:p[d + 4 >> 2], ga:p[d + 8 >> 2], Z:p[d + 12 >> 2], V:p[d + 16 >> 2], u:p[d + 20 >> 2], ha:p[d + 24 >> 2], ia:p[d + 28 >> 2], Ad:p[d + 32 >> 2], Wa:p[d + 36 >> 2], Za:r ? x(r) : ""};
+ c = x(c);
+ r = {"%c":"%a %b %d %H:%M:%S %Y", "%D":"%m/%d/%y", "%F":"%Y-%m-%d", "%h":"%b", "%r":"%I:%M:%S %p", "%R":"%H:%M", "%T":"%H:%M:%S", "%x":"%m/%d/%y", "%X":"%H:%M:%S", "%Ec":"%c", "%EC":"%C", "%Ex":"%m/%d/%y", "%EX":"%H:%M:%S", "%Ey":"%y", "%EY":"%Y", "%Od":"%d", "%Oe":"%e", "%OH":"%H", "%OI":"%I", "%Om":"%m", "%OM":"%M", "%OS":"%S", "%Ou":"%u", "%OU":"%U", "%OV":"%V", "%Ow":"%w", "%OW":"%W", "%Oy":"%y"};
+ for (var u in r) {
+ c = c.replace(new RegExp(u, "g"), r[u]);
+ }
+ var z = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), B = "January February March April May June July August September October November December".split(" ");
+ r = {"%a":function(a) {
+ return z[a.ha].substring(0, 3);
+ }, "%A":function(a) {
+ return z[a.ha];
+ }, "%b":function(a) {
+ return B[a.V].substring(0, 3);
+ }, "%B":function(a) {
+ return B[a.V];
+ }, "%C":function(a) {
+ return g((a.u + 1900) / 100 | 0, 2);
+ }, "%d":function(a) {
+ return g(a.Z, 2);
+ }, "%e":function(a) {
+ return f(a.Z, 2, " ");
+ }, "%g":function(a) {
+ return t(a).toString().substring(2);
+ }, "%G":function(a) {
+ return t(a);
+ }, "%H":function(a) {
+ return g(a.ga, 2);
+ }, "%I":function(a) {
+ a = a.ga;
+ 0 == a ? a = 12 : 12 < a && (a -= 12);
+ return g(a, 2);
+ }, "%j":function(a) {
+ return g(a.Z + ke(je(a.u + 1900) ? le : me, a.V - 1), 3);
+ }, "%m":function(a) {
+ return g(a.V + 1, 2);
+ }, "%M":function(a) {
+ return g(a.Xa, 2);
+ }, "%n":function() {
+ return "\n";
+ }, "%p":function(a) {
+ return 0 <= a.ga && 12 > a.ga ? "AM" : "PM";
+ }, "%S":function(a) {
+ return g(a.Ya, 2);
+ }, "%t":function() {
+ return "\t";
+ }, "%u":function(a) {
+ return a.ha || 7;
+ }, "%U":function(a) {
+ var b = new Date(a.u + 1900, 0, 1), c = 0 === b.getDay() ? b : ne(b, 7 - b.getDay());
+ a = new Date(a.u + 1900, a.V, a.Z);
+ return 0 > h(c, a) ? g(Math.ceil((31 - c.getDate() + (ke(je(a.getFullYear()) ? le : me, a.getMonth() - 1) - 31) + a.getDate()) / 7), 2) : 0 === h(c, b) ? "01" : "00";
+ }, "%V":function(a) {
+ var b = k(new Date(a.u + 1900, 0, 4)), c = k(new Date(a.u + 1901, 0, 4)), d = ne(new Date(a.u + 1900, 0, 1), a.ia);
+ return 0 > h(d, b) ? "53" : 0 >= h(c, d) ? "01" : g(Math.ceil((b.getFullYear() < a.u + 1900 ? a.ia + 32 - b.getDate() : a.ia + 1 - b.getDate()) / 7), 2);
+ }, "%w":function(a) {
+ return a.ha;
+ }, "%W":function(a) {
+ var b = new Date(a.u, 0, 1), c = 1 === b.getDay() ? b : ne(b, 0 === b.getDay() ? 1 : 7 - b.getDay() + 1);
+ a = new Date(a.u + 1900, a.V, a.Z);
+ return 0 > h(c, a) ? g(Math.ceil((31 - c.getDate() + (ke(je(a.getFullYear()) ? le : me, a.getMonth() - 1) - 31) + a.getDate()) / 7), 2) : 0 === h(c, b) ? "01" : "00";
+ }, "%y":function(a) {
+ return (a.u + 1900).toString().substring(2);
+ }, "%Y":function(a) {
+ return a.u + 1900;
+ }, "%z":function(a) {
+ a = a.Wa;
+ var b = 0 <= a;
+ a = Math.abs(a) / 60;
+ return (b ? "+" : "-") + String("0000" + (a / 60 * 100 + a % 60)).slice(-4);
+ }, "%Z":function(a) {
+ return a.Za;
+ }, "%%":function() {
+ return "%";
+ }};
+ for (u in r) {
+ 0 <= c.indexOf(u) && (c = c.replace(new RegExp(u, "g"), r[u](d)));
+ }
+ u = Hb(c, !1);
+ if (u.length > b) {
+ return 0;
+ }
+ Fa(u, a);
+ return u.length - 1;
+}
+tc();
+Vb = Array(4096);
+lc(I, "/");
+nc("/tmp");
+nc("/home");
+nc("/home/web_user");
+(function() {
+ nc("/dev");
+ Fb(259, {read:function() {
+ return 0;
+ }, write:function(a, b, c, h) {
+ return h;
+ }});
+ oc("/dev/null", 259);
+ Eb(1280, Ib);
+ Eb(1536, Jb);
+ oc("/dev/tty", 1280);
+ oc("/dev/tty1", 1536);
+ if ("object" === typeof crypto && "function" === typeof crypto.getRandomValues) {
+ var a = new Uint8Array(1);
+ var b = function() {
+ crypto.getRandomValues(a);
+ return a[0];
+ };
+ } else {
+ if (fa) {
+ try {
+ var c = require("crypto");
+ b = function() {
+ return c.randomBytes(1)[0];
+ };
+ } catch (d) {
+ }
+ }
+ }
+ b || (b = function() {
+ m("no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };");
+ });
+ wc("random", b);
+ wc("urandom", b);
+ nc("/dev/shm");
+ nc("/dev/shm/tmp");
+})();
+nc("/proc");
+nc("/proc/self");
+nc("/proc/self/fd");
+lc({v:function() {
+ var a = Lb("/proc/self", "fd", 16895, 73);
+ a.f = {lookup:function(a, c) {
+ var b = Tb[+c];
+ if (!b) {
+ throw new H(9);
+ }
+ a = {parent:null, v:{Ca:"fake"}, f:{readlink:function() {
+ return b.path;
+ }}};
+ return a.parent = a;
+ }};
+ return a;
+}}, "/proc/self/fd");
+if (ha) {
+ var fs = require("fs"), Ob = require("path");
+ K.Va();
+}
+Cc();
+Kc = e.BindingError = Jc(Error, "BindingError");
+Lc = e.InternalError = Jc(Error, "InternalError");
+cd();
+Bd();
+wd();
+Dd = e.UnboundTypeError = Jc(Error, "UnboundTypeError");
+Qd();
+function Hb(a, b) {
+ var c = Array(Ea(a) + 1);
+ a = Ca(a, c, 0, c.length);
+ b && (c.length = a);
+ return c;
+}
+var Z = e.asm({}, {ClassHandle:Oc, ClassHandle_clone:Wc, ClassHandle_delete:Xc, ClassHandle_deleteLater:bd, ClassHandle_isAliasOf:Nc, ClassHandle_isDeleted:Yc, DYNAMICTOP_PTR:qa, RegisteredClass:gd, RegisteredPointer:V, RegisteredPointer_deleteObject:qd, RegisteredPointer_destructor:pd, RegisteredPointer_fromWireType:Ad, RegisteredPointer_getPointee:od, _ZSt18uncaught_exceptionv:ub, __assert_fail:function(a, b, c, d) {
+ m("Assertion failed: " + x(a) + ", at: " + [b ? x(b) : "unknown filename", c, d ? x(d) : "unknown function"]);
+}, __buildEnvironment:sb, __cxa_atexit:function() {
+ return tb.apply(null, arguments);
+}, __cxa_pure_virtual:function() {
+ xa = !0;
+ throw "Pure virtual function called!";
+}, __cxa_uncaught_exceptions:function() {
+ return ub.s;
+}, __lock:function() {
+}, __map_file:function() {
+ vb(1);
+ return -1;
+}, __setErrNo:vb, __syscall10:function(a, b) {
+ O = b;
+ try {
+ var c = x(P()), d = M(c, {parent:!0}).node, f = zb(c), g = Nb(d, f), h = hc(d, f, !1);
+ if (h) {
+ throw new H(h);
+ }
+ if (!d.f.unlink) {
+ throw new H(1);
+ }
+ if (g.S) {
+ throw new H(16);
+ }
+ try {
+ L.willDeletePath && L.willDeletePath(c);
+ } catch (k) {
+ console.log("FS.trackingDelegate['willDeletePath']('" + c + "') threw an exception: " + k.message);
+ }
+ d.f.unlink(d, f);
+ ac(g);
+ try {
+ if (L.onDeletePath) {
+ L.onDeletePath(c);
+ }
+ } catch (k) {
+ console.log("FS.trackingDelegate['onDeletePath']('" + c + "') threw an exception: " + k.message);
+ }
+ return 0;
+ } catch (k) {
+ return "undefined" !== typeof N && k instanceof H || m(k), -k.i;
+ }
+}, __syscall140:function(a, b) {
+ O = b;
+ try {
+ var c = zc(), d = P(), f = P(), g = P(), h = P();
+ a = 4294967296 * d + (f >>> 0);
+ if (-9007199254740992 >= a || 9007199254740992 <= a) {
+ return -75;
+ }
+ sc(c, a, h);
+ mb = [c.position >>> 0, (F = c.position, 1.0 <= +Xa(F) ? 0.0 < F ? (ab(+$a(F / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+Za((F - +(~~F >>> 0)) / 4294967296.0) >>> 0 : 0)];
+ p[g >> 2] = mb[0];
+ p[g + 4 >> 2] = mb[1];
+ c.N && 0 === a && 0 === h && (c.N = null);
+ return 0;
+ } catch (k) {
+ return "undefined" !== typeof N && k instanceof H || m(k), -k.i;
+ }
+}, __syscall145:function(a, b) {
+ O = b;
+ try {
+ var c = zc(), d = P();
+ a: {
+ var f = P();
+ for (b = a = 0; b < f; b++) {
+ var g = p[d + (8 * b + 4) >> 2], h = c, k = p[d + 8 * b >> 2], t = g, r = void 0, u = q;
+ if (0 > t || 0 > r) {
+ throw new H(22);
+ }
+ if (null === h.fd) {
+ throw new H(9);
+ }
+ if (1 === (h.flags & 2097155)) {
+ throw new H(9);
+ }
+ if (J(h.node.mode)) {
+ throw new H(21);
+ }
+ if (!h.g.read) {
+ throw new H(22);
+ }
+ var z = "undefined" !== typeof r;
+ if (!z) {
+ r = h.position;
+ } else {
+ if (!h.seekable) {
+ throw new H(29);
+ }
+ }
+ var B = h.g.read(h, u, k, t, r);
+ z || (h.position += B);
+ var C = B;
+ if (0 > C) {
+ var A = -1;
+ break a;
+ }
+ a += C;
+ if (C < g) {
+ break;
+ }
+ }
+ A = a;
+ }
+ return A;
+ } catch (D) {
+ return "undefined" !== typeof N && D instanceof H || m(D), -D.i;
+ }
+}, __syscall146:function(a, b) {
+ O = b;
+ try {
+ var c = zc(), d = P();
+ a: {
+ var f = P();
+ for (b = a = 0; b < f; b++) {
+ var g = c, h = p[d + 8 * b >> 2], k = p[d + (8 * b + 4) >> 2], t = void 0, r = q;
+ if (0 > k || 0 > t) {
+ throw new H(22);
+ }
+ if (null === g.fd) {
+ throw new H(9);
+ }
+ if (0 === (g.flags & 2097155)) {
+ throw new H(9);
+ }
+ if (J(g.node.mode)) {
+ throw new H(21);
+ }
+ if (!g.g.write) {
+ throw new H(22);
+ }
+ g.flags & 1024 && sc(g, 0, 2);
+ var u = "undefined" !== typeof t;
+ if (!u) {
+ t = g.position;
+ } else {
+ if (!g.seekable) {
+ throw new H(29);
+ }
+ }
+ var z = g.g.write(g, r, h, k, t, void 0);
+ u || (g.position += z);
+ try {
+ if (g.path && L.onWriteToFile) {
+ L.onWriteToFile(g.path);
+ }
+ } catch (A) {
+ console.log("FS.trackingDelegate['onWriteToFile']('" + g.path + "') threw an exception: " + A.message);
+ }
+ var B = z;
+ if (0 > B) {
+ var C = -1;
+ break a;
+ }
+ a += B;
+ }
+ C = a;
+ }
+ return C;
+ } catch (A) {
+ return "undefined" !== typeof N && A instanceof H || m(A), -A.i;
+ }
+}, __syscall220:function(a, b) {
+ O = b;
+ try {
+ var c = zc(), d = P(), f = P();
+ if (!c.N) {
+ var g = M(c.path, {ka:!0}).node;
+ if (!g.f.readdir) {
+ throw new H(20);
+ }
+ var h = g.f.readdir(g);
+ c.N = h;
+ }
+ a = 0;
+ for (var k = sc(c, 0, 1), t = Math.floor(k / 280); t < c.N.length && a + 280 <= f;) {
+ var r = c.N[t];
+ if ("." === r[0]) {
+ var u = 1;
+ var z = 4;
+ } else {
+ var B = Nb(c.node, r);
+ u = B.id;
+ z = 8192 === (B.mode & 61440) ? 2 : J(B.mode) ? 4 : 40960 === (B.mode & 61440) ? 10 : 8;
+ }
+ mb = [u >>> 0, (F = u, 1.0 <= +Xa(F) ? 0.0 < F ? (ab(+$a(F / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+Za((F - +(~~F >>> 0)) / 4294967296.0) >>> 0 : 0)];
+ p[d + a >> 2] = mb[0];
+ p[d + a + 4 >> 2] = mb[1];
+ mb = [280 * (t + 1) >>> 0, (F = 280 * (t + 1), 1.0 <= +Xa(F) ? 0.0 < F ? (ab(+$a(F / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+Za((F - +(~~F >>> 0)) / 4294967296.0) >>> 0 : 0)];
+ p[d + a + 8 >> 2] = mb[0];
+ p[d + a + 12 >> 2] = mb[1];
+ Ha[d + a + 16 >> 1] = 280;
+ q[d + a + 18 >> 0] = z;
+ Da(r, d + a + 19, 256);
+ a += 280;
+ t += 1;
+ }
+ sc(c, 280 * t, 0);
+ return a;
+ } catch (C) {
+ return "undefined" !== typeof N && C instanceof H || m(C), -C.i;
+ }
+}, __syscall221:function(a, b) {
+ O = b;
+ try {
+ var c = zc();
+ switch(P()) {
+ case 0:
+ var d = P();
+ return 0 > d ? -22 : qc(c.path, c.flags, 0, d).fd;
+ case 1:
+ case 2:
+ return 0;
+ case 3:
+ return c.flags;
+ case 4:
+ return d = P(), c.flags |= d, 0;
+ case 12:
+ return d = P(), Ha[d + 0 >> 1] = 2, 0;
+ case 13:
+ case 14:
+ return 0;
+ case 16:
+ case 8:
+ return -22;
+ case 9:
+ return vb(22), -1;
+ default:
+ return -22;
+ }
+ } catch (f) {
+ return "undefined" !== typeof N && f instanceof H || m(f), -f.i;
+ }
+}, __syscall40:function(a, b) {
+ O = b;
+ try {
+ var c = x(P()), d = M(c, {parent:!0}).node, f = zb(c), g = Nb(d, f), h = hc(d, f, !0);
+ if (h) {
+ throw new H(h);
+ }
+ if (!d.f.rmdir) {
+ throw new H(1);
+ }
+ if (g.S) {
+ throw new H(16);
+ }
+ try {
+ L.willDeletePath && L.willDeletePath(c);
+ } catch (k) {
+ console.log("FS.trackingDelegate['willDeletePath']('" + c + "') threw an exception: " + k.message);
+ }
+ d.f.rmdir(d, f);
+ ac(g);
+ try {
+ if (L.onDeletePath) {
+ L.onDeletePath(c);
+ }
+ } catch (k) {
+ console.log("FS.trackingDelegate['onDeletePath']('" + c + "') threw an exception: " + k.message);
+ }
+ return 0;
+ } catch (k) {
+ return "undefined" !== typeof N && k instanceof H || m(k), -k.i;
+ }
+}, __syscall5:function(a, b) {
+ O = b;
+ try {
+ var c = x(P()), d = P(), f = P();
+ return qc(c, d, f).fd;
+ } catch (g) {
+ return "undefined" !== typeof N && g instanceof H || m(g), -g.i;
+ }
+}, __syscall54:function(a, b) {
+ O = b;
+ try {
+ var c = zc(), d = P();
+ switch(d) {
+ case 21509:
+ case 21505:
+ return c.tty ? 0 : -25;
+ case 21510:
+ case 21511:
+ case 21512:
+ case 21506:
+ case 21507:
+ case 21508:
+ return c.tty ? 0 : -25;
+ case 21519:
+ if (!c.tty) {
+ return -25;
+ }
+ var f = P();
+ return p[f >> 2] = 0;
+ case 21520:
+ return c.tty ? -22 : -25;
+ case 21531:
+ a = f = P();
+ if (!c.g.Ma) {
+ throw new H(25);
+ }
+ return c.g.Ma(c, d, a);
+ case 21523:
+ return c.tty ? 0 : -25;
+ case 21524:
+ return c.tty ? 0 : -25;
+ default:
+ m("bad ioctl syscall " + d);
+ }
+ } catch (g) {
+ return "undefined" !== typeof N && g instanceof H || m(g), -g.i;
+ }
+}, __syscall6:function(a, b) {
+ O = b;
+ try {
+ var c = zc();
+ if (null === c.fd) {
+ throw new H(9);
+ }
+ c.N && (c.N = null);
+ try {
+ c.g.close && c.g.close(c);
+ } catch (d) {
+ throw d;
+ } finally {
+ Tb[c.fd] = null;
+ }
+ c.fd = null;
+ return 0;
+ } catch (d) {
+ return "undefined" !== typeof N && d instanceof H || m(d), -d.i;
+ }
+}, __syscall85:function(a, b) {
+ O = b;
+ try {
+ var c = x(P()), d = P();
+ var f = P();
+ if (0 >= f) {
+ var g = -22;
+ } else {
+ var h = Xb(c), k = Math.min(f, Ea(h)), t = q[d + k];
+ Da(h, d, f + 1);
+ q[d + k] = t;
+ g = k;
+ }
+ return g;
+ } catch (r) {
+ return "undefined" !== typeof N && r instanceof H || m(r), -r.i;
+ }
+}, __syscall91:function(a, b) {
+ O = b;
+ try {
+ var c = P(), d = P();
+ return Ac(c, d);
+ } catch (f) {
+ return "undefined" !== typeof N && f instanceof H || m(f), -f.i;
+ }
+}, __unlock:function() {
+}, _addDays:ne, _arraySum:ke, _embind_register_bool:function(a, b, c, d, f) {
+ var g = Bc(c);
+ b = R(b);
+ U(a, {name:b, fromWireType:function(a) {
+ return !!a;
+ }, toWireType:function(a, b) {
+ return b ? d : f;
+ }, argPackAdvance:8, readValueFromPointer:function(a) {
+ if (1 === c) {
+ var d = q;
+ } else {
+ if (2 === c) {
+ d = Ha;
+ } else {
+ if (4 === c) {
+ d = p;
+ } else {
+ throw new TypeError("Unknown boolean type size: " + b);
+ }
+ }
+ }
+ return this.fromWireType(d[a >> g]);
+ }, H:null});
+}, _embind_register_class:function(a, b, c, d, f, g, h, k, t, r, u, z, B) {
+ u = R(u);
+ g = W(f, g);
+ k && (k = W(h, k));
+ r && (r = W(t, r));
+ B = W(z, B);
+ var C = Hc(u);
+ fd(C, function() {
+ Gd("Cannot construct " + u + " due to unbound types", [d]);
+ });
+ T([a, b, c], d ? [d] : [], function(b) {
+ b = b[0];
+ if (d) {
+ var c = b.h;
+ var f = c.J;
+ } else {
+ f = Oc.prototype;
+ }
+ b = Ic(C, function() {
+ if (Object.getPrototypeOf(this) !== h) {
+ throw new Kc("Use 'new' to construct " + u);
+ }
+ if (void 0 === t.M) {
+ throw new Kc(u + " has no accessible constructor");
+ }
+ var a = t.M[arguments.length];
+ if (void 0 === a) {
+ throw new Kc("Tried to invoke ctor of " + u + " with invalid number of parameters (" + arguments.length + ") - expected (" + Object.keys(t.M).toString() + ") parameters instead!");
+ }
+ return a.apply(this, arguments);
+ });
+ var h = Object.create(f, {constructor:{value:b}});
+ b.prototype = h;
+ var t = new gd(u, b, h, B, c, g, k, r);
+ c = new V(u, t, !0, !1, !1);
+ f = new V(u + "*", t, !1, !1, !1);
+ var z = new V(u + " const*", t, !1, !0, !1);
+ dd[a] = {pointerType:f, Ga:z};
+ Cd(C, b);
+ return [c, f, z];
+ });
+}, _embind_register_class_class_function:function(a, b, c, d, f, g, h) {
+ var k = Kd(c, d);
+ b = R(b);
+ g = W(f, g);
+ T([], [a], function(a) {
+ function d() {
+ Gd("Cannot call " + f + " due to unbound types", k);
+ }
+ a = a[0];
+ var f = a.name + "." + b, t = a.h.constructor;
+ void 0 === t[b] ? (d.P = c - 1, t[b] = d) : (ed(t, b, f), t[b].o[c - 1] = d);
+ T([], k, function(a) {
+ a = [a[0], null].concat(a.slice(1));
+ a = Jd(f, a, null, g, h);
+ void 0 === t[b].o ? (a.P = c - 1, t[b] = a) : t[b].o[c - 1] = a;
+ return [];
+ });
+ return [];
+ });
+}, _embind_register_class_constructor:function(a, b, c, d, f, g) {
+ var h = Kd(b, c);
+ f = W(d, f);
+ T([], [a], function(a) {
+ a = a[0];
+ var c = "constructor " + a.name;
+ void 0 === a.h.M && (a.h.M = []);
+ if (void 0 !== a.h.M[b - 1]) {
+ throw new Kc("Cannot register multiple constructors with identical number of parameters (" + (b - 1) + ") for class '" + a.name + "'! Overload resolution is currently only performed using the parameter count, not actual type info!");
+ }
+ a.h.M[b - 1] = function() {
+ Gd("Cannot construct " + a.name + " due to unbound types", h);
+ };
+ T([], h, function(d) {
+ a.h.M[b - 1] = function() {
+ arguments.length !== b - 1 && S(c + " called with " + arguments.length + " arguments, expected " + (b - 1));
+ var a = [], h = Array(b);
+ h[0] = g;
+ for (var k = 1; k < b; ++k) {
+ h[k] = d[k].toWireType(a, arguments[k - 1]);
+ }
+ h = f.apply(null, h);
+ Id(a);
+ return d[0].fromWireType(h);
+ };
+ return [];
+ });
+ return [];
+ });
+}, _embind_register_class_function:function(a, b, c, d, f, g, h, k) {
+ var t = Kd(c, d);
+ b = R(b);
+ g = W(f, g);
+ T([], [a], function(a) {
+ function d() {
+ Gd("Cannot call " + f + " due to unbound types", t);
+ }
+ a = a[0];
+ var f = a.name + "." + b;
+ k && a.h.Pa.push(b);
+ var r = a.h.J, C = r[b];
+ void 0 === C || void 0 === C.o && C.className !== a.name && C.P === c - 2 ? (d.P = c - 2, d.className = a.name, r[b] = d) : (ed(r, b, f), r[b].o[c - 2] = d);
+ T([], t, function(d) {
+ d = Jd(f, d, a, g, h);
+ void 0 === r[b].o ? (d.P = c - 2, r[b] = d) : r[b].o[c - 2] = d;
+ return [];
+ });
+ return [];
+ });
+}, _embind_register_class_property:function(a, b, c, d, f, g, h, k, t, r) {
+ b = R(b);
+ f = W(d, f);
+ T([], [a], function(a) {
+ a = a[0];
+ var d = a.name + "." + b, u = {get:function() {
+ Gd("Cannot access " + d + " due to unbound types", [c, h]);
+ }, enumerable:!0, configurable:!0};
+ t ? u.set = function() {
+ Gd("Cannot access " + d + " due to unbound types", [c, h]);
+ } : u.set = function() {
+ S(d + " is a read-only property");
+ };
+ Object.defineProperty(a.h.J, b, u);
+ T([], t ? [c, h] : [c], function(c) {
+ var h = c[0], u = {get:function() {
+ var b = Ld(this, a, d + " getter");
+ return h.fromWireType(f(g, b));
+ }, enumerable:!0};
+ if (t) {
+ t = W(k, t);
+ var z = c[1];
+ u.set = function(b) {
+ var c = Ld(this, a, d + " setter"), f = [];
+ t(r, c, z.toWireType(f, b));
+ Id(f);
+ };
+ }
+ Object.defineProperty(a.h.J, b, u);
+ return [];
+ });
+ return [];
+ });
+}, _embind_register_emval:function(a, b) {
+ b = R(b);
+ U(a, {name:b, fromWireType:function(a) {
+ var b = X[a].value;
+ Nd(a);
+ return b;
+ }, toWireType:function(a, b) {
+ return ld(b);
+ }, argPackAdvance:8, readValueFromPointer:nd, H:null});
+}, _embind_register_float:function(a, b, c) {
+ c = Bc(c);
+ b = R(b);
+ U(a, {name:b, fromWireType:function(a) {
+ return a;
+ }, toWireType:function(a, b) {
+ if ("number" !== typeof b && "boolean" !== typeof b) {
+ throw new TypeError('Cannot convert "' + jd(b) + '" to ' + this.name);
+ }
+ return b;
+ }, argPackAdvance:8, readValueFromPointer:Rd(b, c), H:null});
+}, _embind_register_integer:function(a, b, c, d, f) {
+ function g(a) {
+ return a;
+ }
+ b = R(b);
+ -1 === f && (f = 4294967295);
+ var h = Bc(c);
+ if (0 === d) {
+ var k = 32 - 8 * c;
+ g = function(a) {
+ return a << k >>> k;
+ };
+ }
+ var t = -1 != b.indexOf("unsigned");
+ U(a, {name:b, fromWireType:g, toWireType:function(a, c) {
+ if ("number" !== typeof c && "boolean" !== typeof c) {
+ throw new TypeError('Cannot convert "' + jd(c) + '" to ' + this.name);
+ }
+ if (c < d || c > f) {
+ throw new TypeError('Passing a number "' + jd(c) + '" from JS side to C/C++ side to an argument of type "' + b + '", which is outside the valid range [' + d + ", " + f + "]!");
+ }
+ return t ? c >>> 0 : c | 0;
+ }, argPackAdvance:8, readValueFromPointer:Sd(b, h, 0 !== d), H:null});
+}, _embind_register_memory_view:function(a, b, c) {
+ function d(a) {
+ a >>= 2;
+ var b = y;
+ return new f(b.buffer, b[a + 1], b[a]);
+ }
+ var f = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array][b];
+ c = R(c);
+ U(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d}, {La:!0});
+}, _embind_register_std_string:function(a, b) {
+ b = R(b);
+ var c = "std::string" === b;
+ U(a, {name:b, fromWireType:function(a) {
+ var b = y[a >> 2];
+ if (c) {
+ var d = w[a + 4 + b], h = 0;
+ 0 != d && (h = d, w[a + 4 + b] = 0);
+ var k = a + 4;
+ for (d = 0; d <= b; ++d) {
+ var t = a + 4 + d;
+ if (0 == w[t]) {
+ k = x(k);
+ if (void 0 === r) {
+ var r = k;
+ } else {
+ r += String.fromCharCode(0), r += k;
+ }
+ k = t + 1;
+ }
+ }
+ 0 != h && (w[a + 4 + b] = h);
+ } else {
+ r = Array(b);
+ for (d = 0; d < b; ++d) {
+ r[d] = String.fromCharCode(w[a + 4 + d]);
+ }
+ r = r.join("");
+ }
+ Q(a);
+ return r;
+ }, toWireType:function(a, b) {
+ b instanceof ArrayBuffer && (b = new Uint8Array(b));
+ var d = "string" === typeof b;
+ d || b instanceof Uint8Array || b instanceof Uint8ClampedArray || b instanceof Int8Array || S("Cannot pass non-string to std::string");
+ var f = (c && d ? function() {
+ return Ea(b);
+ } : function() {
+ return b.length;
+ })(), k = za(4 + f + 1);
+ y[k >> 2] = f;
+ if (c && d) {
+ Da(b, k + 4, f + 1);
+ } else {
+ if (d) {
+ for (d = 0; d < f; ++d) {
+ var t = b.charCodeAt(d);
+ 255 < t && (Q(k), S("String has UTF-16 code units that do not fit in 8 bits"));
+ w[k + 4 + d] = t;
+ }
+ } else {
+ for (d = 0; d < f; ++d) {
+ w[k + 4 + d] = b[d];
+ }
+ }
+ }
+ null !== a && a.push(Q, k);
+ return k;
+ }, argPackAdvance:8, readValueFromPointer:nd, H:function(a) {
+ Q(a);
+ }});
+}, _embind_register_std_wstring:function(a, b, c) {
+ c = R(c);
+ if (2 === b) {
+ var d = function() {
+ return Ia;
+ };
+ var f = 1;
+ } else {
+ 4 === b && (d = function() {
+ return y;
+ }, f = 2);
+ }
+ U(a, {name:c, fromWireType:function(a) {
+ for (var b = d(), c = y[a >> 2], g = Array(c), r = a + 4 >> f, u = 0; u < c; ++u) {
+ g[u] = String.fromCharCode(b[r + u]);
+ }
+ Q(a);
+ return g.join("");
+ }, toWireType:function(a, c) {
+ var g = d(), h = c.length, r = za(4 + h * b);
+ y[r >> 2] = h;
+ for (var u = r + 4 >> f, z = 0; z < h; ++z) {
+ g[u + z] = c.charCodeAt(z);
+ }
+ null !== a && a.push(Q, r);
+ return r;
+ }, argPackAdvance:8, readValueFromPointer:nd, H:function(a) {
+ Q(a);
+ }});
+}, _embind_register_void:function(a, b) {
+ b = R(b);
+ U(a, {vd:!0, name:b, argPackAdvance:0, fromWireType:function() {
+ }, toWireType:function() {
+ }});
+}, _emscripten_syscall_munmap:Ac, _emscripten_traverse_stack:Yd, _emval_decref:Nd, _emval_incref:function(a) {
+ 4 < a && (X[a].pa += 1);
+}, _emval_register:ld, _emval_take_value:function(a, b) {
+ a = Td(a, "_emval_take_value");
+ a = a.readValueFromPointer(b);
+ return ld(a);
+}, _formatString:Wd, _isLeapYear:je, _reallyNegative:Vd, abort:function() {
+ e.abort();
+}, atexit:tb, attachFinalizer:Vc, clock:Ud, constNoSmartPtrRawPointerToWireType:id, count_emval_handles:Od, craftInvokerFunction:Jd, createNamedFunction:Ic, demangle:ob, demangleAll:pb, detachFinalizer:Sc, downcastPointer:rd, embind__requireFunction:W, embind_init_charCodes:Cc, embind_repr:jd, emscripten_get_callstack_js:Zd, emscripten_get_heap_size:ra, emscripten_log:function(a, b) {
+ var c = p[b >> 2];
+ b += 4;
+ var d = "";
+ if (c) {
+ for (b = Wd(c, b), c = 0; c < b.length; ++c) {
+ d += String.fromCharCode(b[c]);
+ }
+ }
+ $d(a, d);
+}, emscripten_log_js:$d, emscripten_memcpy_big:ae, emscripten_realloc_buffer:he, emscripten_resize_heap:ie, emscripten_run_script:function(a) {
+ eval(x(a));
+}, emscripten_run_script_int:function(a) {
+ return eval(x(a)) | 0;
+}, emscripten_run_script_string:Y, ensureOverloadTable:ed, exposePublicSymbol:fd, extendError:Jc, fabs:Xa, fabsf:Xa, floatReadValueFromPointer:Rd, floor:$a, flushPendingDeletes:ad, genericPointerToWireType:kd, getBasestPointer:xd, getInheritedInstance:yd, getInheritedInstanceCount:sd, getLiveInheritedInstances:ud, getShiftFromSize:Bc, getTypeName:Ed, get_first_emval:Pd, getenv:be, heap32VectorToArray:Kd, init_ClassHandle:cd, init_RegisteredPointer:Bd, init_embind:wd, init_emval:Qd, integerReadValueFromPointer:Sd,
+jsStackTrace:qb, localtime:function(a) {
+ return ge(a, 1861936);
+}, localtime_r:ge, makeClassHandle:zd, makeLegalFunctionName:Hc, memcpy:function(a, b, c) {
+ a |= 0;
+ b |= 0;
+ c |= 0;
+ var d;
+ if (8192 <= (c | 0)) {
+ return ae(a | 0, b | 0, c | 0) | 0, a | 0;
+ }
+ var f = a | 0;
+ var g = a + c | 0;
+ if ((a & 3) == (b & 3)) {
+ for (; a & 3;) {
+ if (0 == (c | 0)) {
+ return f | 0;
+ }
+ q[a >> 0] = q[b >> 0] | 0;
+ a = a + 1 | 0;
+ b = b + 1 | 0;
+ c = c - 1 | 0;
+ }
+ c = g & -4 | 0;
+ for (d = c - 64 | 0; (a | 0) <= (d | 0);) {
+ p[a >> 2] = p[b >> 2] | 0, p[a + 4 >> 2] = p[b + 4 >> 2] | 0, p[a + 8 >> 2] = p[b + 8 >> 2] | 0, p[a + 12 >> 2] = p[b + 12 >> 2] | 0, p[a + 16 >> 2] = p[b + 16 >> 2] | 0, p[a + 20 >> 2] = p[b + 20 >> 2] | 0, p[a + 24 >> 2] = p[b + 24 >> 2] | 0, p[a + 28 >> 2] = p[b + 28 >> 2] | 0, p[a + 32 >> 2] = p[b + 32 >> 2] | 0, p[a + 36 >> 2] = p[b + 36 >> 2] | 0, p[a + 40 >> 2] = p[b + 40 >> 2] | 0, p[a + 44 >> 2] = p[b + 44 >> 2] | 0, p[a + 48 >> 2] = p[b + 48 >> 2] | 0, p[a + 52 >> 2] = p[b + 52 >>
+ 2] | 0, p[a + 56 >> 2] = p[b + 56 >> 2] | 0, p[a + 60 >> 2] = p[b + 60 >> 2] | 0, a = a + 64 | 0, b = b + 64 | 0;
+ }
+ for (; (a | 0) < (c | 0);) {
+ p[a >> 2] = p[b >> 2] | 0, a = a + 4 | 0, b = b + 4 | 0;
+ }
+ } else {
+ for (c = g - 4 | 0; (a | 0) < (c | 0);) {
+ q[a >> 0] = q[b >> 0] | 0, q[a + 1 >> 0] = q[b + 1 >> 0] | 0, q[a + 2 >> 0] = q[b + 2 >> 0] | 0, q[a + 3 >> 0] = q[b + 3 >> 0] | 0, a = a + 4 | 0, b = b + 4 | 0;
+ }
+ }
+ for (; (a | 0) < (g | 0);) {
+ q[a >> 0] = q[b >> 0] | 0, a = a + 1 | 0, b = b + 1 | 0;
+ }
+ return f | 0;
+}, memset:function(a, b, c) {
+ a |= 0;
+ c |= 0;
+ var d;
+ var f = a + c | 0;
+ b = (b | 0) & 255;
+ if (67 <= (c | 0)) {
+ for (; 0 != (a & 3);) {
+ q[a >> 0] = b, a = a + 1 | 0;
+ }
+ var g = f & -4 | 0;
+ var h = b | b << 8 | b << 16 | b << 24;
+ for (d = g - 64 | 0; (a | 0) <= (d | 0);) {
+ p[a >> 2] = h, p[a + 4 >> 2] = h, p[a + 8 >> 2] = h, p[a + 12 >> 2] = h, p[a + 16 >> 2] = h, p[a + 20 >> 2] = h, p[a + 24 >> 2] = h, p[a + 28 >> 2] = h, p[a + 32 >> 2] = h, p[a + 36 >> 2] = h, p[a + 40 >> 2] = h, p[a + 44 >> 2] = h, p[a + 48 >> 2] = h, p[a + 52 >> 2] = h, p[a + 56 >> 2] = h, p[a + 60 >> 2] = h, a = a + 64 | 0;
+ }
+ for (; (a | 0) < (g | 0);) {
+ p[a >> 2] = h, a = a + 4 | 0;
+ }
+ }
+ for (; (a | 0) < (f | 0);) {
+ q[a >> 0] = b, a = a + 1 | 0;
+ }
+ return f - c | 0;
+}, mktime:function(a) {
+ ce();
+ var b = new Date(p[a + 20 >> 2] + 1900, p[a + 16 >> 2], p[a + 12 >> 2], p[a + 8 >> 2], p[a + 4 >> 2], p[a >> 2], 0), c = p[a + 32 >> 2], d = b.getTimezoneOffset(), f = new Date(b.getFullYear(), 0, 1), g = (new Date(2000, 6, 1)).getTimezoneOffset(), h = f.getTimezoneOffset(), k = Math.min(h, g);
+ 0 > c ? p[a + 32 >> 2] = Number(g != h && k == d) : 0 < c != (k == d) && (g = Math.max(h, g), b.setTime(b.getTime() + 60000 * ((0 < c ? k : g) - d)));
+ p[a + 24 >> 2] = b.getDay();
+ p[a + 28 >> 2] = (b.getTime() - f.getTime()) / 864E5 | 0;
+ return b.getTime() / 1000 | 0;
+}, new_:Hd, nonConstNoSmartPtrRawPointerToWireType:md, pthread_cond_broadcast:function() {
+ return 0;
+}, pthread_cond_destroy:function() {
+ return 0;
+}, pthread_cond_signal:function() {
+ return 0;
+}, pthread_cond_wait:function() {
+ return 0;
+}, pthread_create:function() {
+ return 11;
+}, pthread_join:function() {
+}, pthread_mutexattr_destroy:function() {
+}, pthread_mutexattr_init:function() {
+}, pthread_mutexattr_settype:function() {
+}, pthread_spin_destroy:function() {
+ return 0;
+}, pthread_spin_init:function() {
+ return 0;
+}, pthread_spin_lock:function() {
+ return 0;
+}, pthread_spin_unlock:function() {
+ return 0;
+}, readLatin1String:R, registerType:U, releaseClassHandle:Uc, replacePublicSymbol:Cd, requireRegisteredType:Td, runDestructor:Tc, runDestructors:Id, sbrk:function(a) {
+ a |= 0;
+ var b = ra() | 0;
+ var c = p[qa >> 2] | 0;
+ var d = c + a | 0;
+ if (0 < (a | 0) & (d | 0) < (c | 0) | 0 > (d | 0) || (d | 0) > (b | 0) && !(ie(d | 0) | 0)) {
+ return vb(12), -1;
+ }
+ p[qa >> 2] = d | 0;
+ return c | 0;
+}, setDelayFunction:vd, setTempRet0:function() {
+}, shallowCopyInternalPointer:Pc, simpleReadValueFromPointer:nd, sqrt:Ya, stackTrace:rb, strftime:oe, strftime_l:function(a, b, c, d) {
+ return oe(a, b, c, d);
+}, throwBindingError:S, throwInstanceAlreadyDeleted:Qc, throwInternalError:Mc, throwUnboundTypeError:Gd, time:function(a) {
+ var b = Date.now() / 1000 | 0;
+ a && (p[a >> 2] = b);
+ return b;
+}, tzset:ce, upcastPointer:hd, validateThis:Ld, whenDependentTypesAreResolved:T}, buffer), pe = Z.__wasm_call_ctors;
+Z.__wasm_call_ctors = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return pe.apply(null, arguments);
+};
+var qe = Z.strlen;
+Z.strlen = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return qe.apply(null, arguments);
+};
+var re = Z.malloc;
+Z.malloc = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return re.apply(null, arguments);
+};
+var se = Z.free;
+Z.free = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return se.apply(null, arguments);
+};
+var te = Z.__errno_location;
+Z.__errno_location = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return te.apply(null, arguments);
+};
+var ue = Z.fflush;
+Z.fflush = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ue.apply(null, arguments);
+};
+var ve = Z.realloc;
+Z.realloc = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ve.apply(null, arguments);
+};
+var we = Z._get_tzname;
+Z._get_tzname = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return we.apply(null, arguments);
+};
+var xe = Z._get_daylight;
+Z._get_daylight = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return xe.apply(null, arguments);
+};
+var ye = Z._get_timezone;
+Z._get_timezone = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ye.apply(null, arguments);
+};
+var ze = Z._get_environ;
+Z._get_environ = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ze.apply(null, arguments);
+};
+var Ae = Z.__getTypeName;
+Z.__getTypeName = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ae.apply(null, arguments);
+};
+var Be = Z.__embind_register_native_and_builtin_types;
+Z.__embind_register_native_and_builtin_types = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Be.apply(null, arguments);
+};
+var Ce = Z.setThrew;
+Z.setThrew = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ce.apply(null, arguments);
+};
+var De = Z.stackSave;
+Z.stackSave = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return De.apply(null, arguments);
+};
+var Ee = Z.stackAlloc;
+Z.stackAlloc = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ee.apply(null, arguments);
+};
+var Fe = Z.stackRestore;
+Z.stackRestore = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Fe.apply(null, arguments);
+};
+var Ge = Z.__growWasmMemory;
+Z.__growWasmMemory = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ge.apply(null, arguments);
+};
+var He = Z.dynCall_vi;
+Z.dynCall_vi = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return He.apply(null, arguments);
+};
+var Ie = Z.dynCall_ii;
+Z.dynCall_ii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ie.apply(null, arguments);
+};
+var Je = Z.dynCall_vii;
+Z.dynCall_vii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Je.apply(null, arguments);
+};
+var Ke = Z.dynCall_iiii;
+Z.dynCall_iiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ke.apply(null, arguments);
+};
+var Le = Z.dynCall_viii;
+Z.dynCall_viii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Le.apply(null, arguments);
+};
+var Me = Z.dynCall_iii;
+Z.dynCall_iii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Me.apply(null, arguments);
+};
+var Ne = Z.dynCall_viiiiiii;
+Z.dynCall_viiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ne.apply(null, arguments);
+};
+var Oe = Z.dynCall_viiiiii;
+Z.dynCall_viiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Oe.apply(null, arguments);
+};
+var Pe = Z.dynCall_viiiii;
+Z.dynCall_viiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Pe.apply(null, arguments);
+};
+var Qe = Z.dynCall_viiiiiiii;
+Z.dynCall_viiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Qe.apply(null, arguments);
+};
+var Re = Z.dynCall_iiiiiiii;
+Z.dynCall_iiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Re.apply(null, arguments);
+};
+var Se = Z.dynCall_iiiiiii;
+Z.dynCall_iiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Se.apply(null, arguments);
+};
+var Te = Z.dynCall_iiiiii;
+Z.dynCall_iiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Te.apply(null, arguments);
+};
+var Ue = Z.dynCall_iiiiiiiii;
+Z.dynCall_iiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ue.apply(null, arguments);
+};
+var Ve = Z.dynCall_viijii;
+Z.dynCall_viijii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ve.apply(null, arguments);
+};
+var We = Z.dynCall_viiii;
+Z.dynCall_viiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return We.apply(null, arguments);
+};
+var Xe = Z.dynCall_v;
+Z.dynCall_v = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Xe.apply(null, arguments);
+};
+var Ye = Z.dynCall_iiiii;
+Z.dynCall_iiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ye.apply(null, arguments);
+};
+var Ze = Z.dynCall_diiid;
+Z.dynCall_diiid = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ze.apply(null, arguments);
+};
+var $e = Z.dynCall_viiiiiiiii;
+Z.dynCall_viiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return $e.apply(null, arguments);
+};
+var af = Z.dynCall_iiiiiiiiiiiii;
+Z.dynCall_iiiiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return af.apply(null, arguments);
+};
+var bf = Z.dynCall_iiiiiiiiii;
+Z.dynCall_iiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return bf.apply(null, arguments);
+};
+var cf = Z.dynCall_iiiiiiiiiiii;
+Z.dynCall_iiiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return cf.apply(null, arguments);
+};
+var df = Z.dynCall_viiiiiiiiii;
+Z.dynCall_viiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return df.apply(null, arguments);
+};
+var ef = Z.dynCall_viiiiiiji;
+Z.dynCall_viiiiiiji = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ef.apply(null, arguments);
+};
+var ff = Z.dynCall_viiij;
+Z.dynCall_viiij = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ff.apply(null, arguments);
+};
+var gf = Z.dynCall_viiiiiijii;
+Z.dynCall_viiiiiijii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return gf.apply(null, arguments);
+};
+var hf = Z.dynCall_fi;
+Z.dynCall_fi = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return hf.apply(null, arguments);
+};
+var jf = Z.dynCall_vif;
+Z.dynCall_vif = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return jf.apply(null, arguments);
+};
+var kf = Z.dynCall_idd;
+Z.dynCall_idd = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return kf.apply(null, arguments);
+};
+var lf = Z.dynCall_viiiiiiiiiiii;
+Z.dynCall_viiiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return lf.apply(null, arguments);
+};
+var mf = Z.dynCall_viffff;
+Z.dynCall_viffff = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return mf.apply(null, arguments);
+};
+var nf = Z.dynCall_iiiiiiiiiii;
+Z.dynCall_iiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return nf.apply(null, arguments);
+};
+var of = Z.dynCall_viiifiii;
+Z.dynCall_viiifiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return of.apply(null, arguments);
+};
+var pf = Z.dynCall_viiifii;
+Z.dynCall_viiifii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return pf.apply(null, arguments);
+};
+var qf = Z.dynCall_viiifiiii;
+Z.dynCall_viiifiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return qf.apply(null, arguments);
+};
+var rf = Z.dynCall_iidiiii;
+Z.dynCall_iidiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return rf.apply(null, arguments);
+};
+var sf = Z.dynCall_jiji;
+Z.dynCall_jiji = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return sf.apply(null, arguments);
+};
+var tf = Z.dynCall_iiiiij;
+Z.dynCall_iiiiij = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return tf.apply(null, arguments);
+};
+var uf = Z.dynCall_iiiiid;
+Z.dynCall_iiiiid = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return uf.apply(null, arguments);
+};
+var vf = Z.dynCall_iiiiijj;
+Z.dynCall_iiiiijj = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return vf.apply(null, arguments);
+};
+var wf = Z.dynCall_iiiiiijj;
+Z.dynCall_iiiiiijj = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return wf.apply(null, arguments);
+};
+e.asm = Z;
+var nb = e.___wasm_call_ctors = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__wasm_call_ctors.apply(null, arguments);
+}, Xd = e._strlen = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.strlen.apply(null, arguments);
+}, za = e._malloc = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.malloc.apply(null, arguments);
+}, Q = e._free = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.free.apply(null, arguments);
+};
+e.___errno_location = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__errno_location.apply(null, arguments);
+};
+e._fflush = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.fflush.apply(null, arguments);
+};
+e._realloc = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.realloc.apply(null, arguments);
+};
+var fe = e.__get_tzname = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm._get_tzname.apply(null, arguments);
+}, ee = e.__get_daylight = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm._get_daylight.apply(null, arguments);
+}, de = e.__get_timezone = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm._get_timezone.apply(null, arguments);
+};
+e.__get_environ = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm._get_environ.apply(null, arguments);
+};
+var Fd = e.___getTypeName = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__getTypeName.apply(null, arguments);
+};
+e.___embind_register_native_and_builtin_types = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__embind_register_native_and_builtin_types.apply(null, arguments);
+};
+e._setThrew = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.setThrew.apply(null, arguments);
+};
+e.stackSave = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.stackSave.apply(null, arguments);
+};
+e.stackAlloc = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.stackAlloc.apply(null, arguments);
+};
+e.stackRestore = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.stackRestore.apply(null, arguments);
+};
+e.__growWasmMemory = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__growWasmMemory.apply(null, arguments);
+};
+e.dynCall_vi = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_vi.apply(null, arguments);
+};
+e.dynCall_ii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_ii.apply(null, arguments);
+};
+e.dynCall_vii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_vii.apply(null, arguments);
+};
+e.dynCall_iiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiii.apply(null, arguments);
+};
+e.dynCall_viii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viii.apply(null, arguments);
+};
+e.dynCall_iii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iii.apply(null, arguments);
+};
+e.dynCall_viiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiii.apply(null, arguments);
+};
+e.dynCall_viiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiii.apply(null, arguments);
+};
+e.dynCall_viiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiii.apply(null, arguments);
+};
+e.dynCall_viiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiii.apply(null, arguments);
+};
+e.dynCall_viijii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viijii.apply(null, arguments);
+};
+e.dynCall_viiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiii.apply(null, arguments);
+};
+e.dynCall_v = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_v.apply(null, arguments);
+};
+e.dynCall_iiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiii.apply(null, arguments);
+};
+e.dynCall_diiid = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_diiid.apply(null, arguments);
+};
+e.dynCall_viiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_viiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_viiiiiiji = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiji.apply(null, arguments);
+};
+e.dynCall_viiij = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiij.apply(null, arguments);
+};
+e.dynCall_viiiiiijii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiijii.apply(null, arguments);
+};
+e.dynCall_fi = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_fi.apply(null, arguments);
+};
+e.dynCall_vif = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_vif.apply(null, arguments);
+};
+e.dynCall_idd = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_idd.apply(null, arguments);
+};
+e.dynCall_viiiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_viffff = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viffff.apply(null, arguments);
+};
+e.dynCall_iiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_viiifiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiifiii.apply(null, arguments);
+};
+e.dynCall_viiifii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiifii.apply(null, arguments);
+};
+e.dynCall_viiifiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiifiiii.apply(null, arguments);
+};
+e.dynCall_iidiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iidiiii.apply(null, arguments);
+};
+e.dynCall_jiji = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_jiji.apply(null, arguments);
+};
+e.dynCall_iiiiij = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiij.apply(null, arguments);
+};
+e.dynCall_iiiiid = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiid.apply(null, arguments);
+};
+e.dynCall_iiiiijj = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiijj.apply(null, arguments);
+};
+e.dynCall_iiiiiijj = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiijj.apply(null, arguments);
+};
+e.asm = Z;
+Object.getOwnPropertyDescriptor(e, "intArrayFromString") || (e.intArrayFromString = function() {
+ m("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "intArrayToString") || (e.intArrayToString = function() {
+ m("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "ccall") || (e.ccall = function() {
+ m("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "cwrap") || (e.cwrap = function() {
+ m("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "setValue") || (e.setValue = function() {
+ m("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getValue") || (e.getValue = function() {
+ m("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "allocate") || (e.allocate = function() {
+ m("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getMemory") || (e.getMemory = function() {
+ m("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "AsciiToString") || (e.AsciiToString = function() {
+ m("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToAscii") || (e.stringToAscii = function() {
+ m("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "UTF8ArrayToString") || (e.UTF8ArrayToString = function() {
+ m("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "UTF8ToString") || (e.UTF8ToString = function() {
+ m("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToUTF8Array") || (e.stringToUTF8Array = function() {
+ m("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToUTF8") || (e.stringToUTF8 = function() {
+ m("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "lengthBytesUTF8") || (e.lengthBytesUTF8 = function() {
+ m("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "UTF16ToString") || (e.UTF16ToString = function() {
+ m("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToUTF16") || (e.stringToUTF16 = function() {
+ m("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "lengthBytesUTF16") || (e.lengthBytesUTF16 = function() {
+ m("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "UTF32ToString") || (e.UTF32ToString = function() {
+ m("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToUTF32") || (e.stringToUTF32 = function() {
+ m("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "lengthBytesUTF32") || (e.lengthBytesUTF32 = function() {
+ m("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "allocateUTF8") || (e.allocateUTF8 = function() {
+ m("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stackTrace") || (e.stackTrace = function() {
+ m("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnPreRun") || (e.addOnPreRun = function() {
+ m("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnInit") || (e.addOnInit = function() {
+ m("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnPreMain") || (e.addOnPreMain = function() {
+ m("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnExit") || (e.addOnExit = function() {
+ m("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnPostRun") || (e.addOnPostRun = function() {
+ m("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "writeStringToMemory") || (e.writeStringToMemory = function() {
+ m("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "writeArrayToMemory") || (e.writeArrayToMemory = function() {
+ m("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "writeAsciiToMemory") || (e.writeAsciiToMemory = function() {
+ m("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addRunDependency") || (e.addRunDependency = function() {
+ m("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "removeRunDependency") || (e.removeRunDependency = function() {
+ m("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "ENV") || (e.ENV = function() {
+ m("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "FS") || (e.FS = function() {
+ m("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createFolder") || (e.FS_createFolder = function() {
+ m("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createPath") || (e.FS_createPath = function() {
+ m("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createDataFile") || (e.FS_createDataFile = function() {
+ m("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createPreloadedFile") || (e.FS_createPreloadedFile = function() {
+ m("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createLazyFile") || (e.FS_createLazyFile = function() {
+ m("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createLink") || (e.FS_createLink = function() {
+ m("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createDevice") || (e.FS_createDevice = function() {
+ m("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_unlink") || (e.FS_unlink = function() {
+ m("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "GL") || (e.GL = function() {
+ m("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "dynamicAlloc") || (e.dynamicAlloc = function() {
+ m("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "warnOnce") || (e.warnOnce = function() {
+ m("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "loadDynamicLibrary") || (e.loadDynamicLibrary = function() {
+ m("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "loadWebAssemblyModule") || (e.loadWebAssemblyModule = function() {
+ m("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getLEB") || (e.getLEB = function() {
+ m("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getFunctionTables") || (e.getFunctionTables = function() {
+ m("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "alignFunctionTables") || (e.alignFunctionTables = function() {
+ m("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "registerFunctions") || (e.registerFunctions = function() {
+ m("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addFunction") || (e.addFunction = function() {
+ m("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "removeFunction") || (e.removeFunction = function() {
+ m("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getFuncWrapper") || (e.getFuncWrapper = function() {
+ m("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "prettyPrint") || (e.prettyPrint = function() {
+ m("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "makeBigInt") || (e.makeBigInt = function() {
+ m("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "dynCall") || (e.dynCall = function() {
+ m("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getCompilerSetting") || (e.getCompilerSetting = function() {
+ m("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stackSave") || (e.stackSave = function() {
+ m("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stackRestore") || (e.stackRestore = function() {
+ m("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stackAlloc") || (e.stackAlloc = function() {
+ m("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "establishStackSpace") || (e.establishStackSpace = function() {
+ m("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "print") || (e.print = function() {
+ m("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "printErr") || (e.printErr = function() {
+ m("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getTempRet0") || (e.getTempRet0 = function() {
+ m("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "setTempRet0") || (e.setTempRet0 = function() {
+ m("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "callMain") || (e.callMain = function() {
+ m("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "Pointer_stringify") || (e.Pointer_stringify = function() {
+ m("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "ALLOC_NORMAL") || Object.defineProperty(e, "ALLOC_NORMAL", {get:function() {
+ m("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+}});
+Object.getOwnPropertyDescriptor(e, "ALLOC_STACK") || Object.defineProperty(e, "ALLOC_STACK", {get:function() {
+ m("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+}});
+Object.getOwnPropertyDescriptor(e, "ALLOC_DYNAMIC") || Object.defineProperty(e, "ALLOC_DYNAMIC", {get:function() {
+ m("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+}});
+Object.getOwnPropertyDescriptor(e, "ALLOC_NONE") || Object.defineProperty(e, "ALLOC_NONE", {get:function() {
+ m("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+}});
+db = function xf() {
+ e.calledRun || yf();
+ e.calledRun || (db = xf);
+};
+function yf() {
+ function a() {
+ if (!e.calledRun && (e.calledRun = !0, !xa)) {
+ Na();
+ assert(!E);
+ E = !0;
+ if (!e.noFSInit && !uc) {
+ assert(!uc, "FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");
+ uc = !0;
+ tc();
+ e.stdin = e.stdin;
+ e.stdout = e.stdout;
+ e.stderr = e.stderr;
+ e.stdin ? wc("stdin", e.stdin) : pc("/dev/tty", "/dev/stdin");
+ e.stdout ? wc("stdout", null, e.stdout) : pc("/dev/tty", "/dev/stdout");
+ e.stderr ? wc("stderr", null, e.stderr) : pc("/dev/tty1", "/dev/stderr");
+ var a = qc("/dev/stdin", "r"), c = qc("/dev/stdout", "w"), d = qc("/dev/stderr", "w");
+ assert(0 === a.fd, "invalid handle for stdin (" + a.fd + ")");
+ assert(1 === c.fd, "invalid handle for stdout (" + c.fd + ")");
+ assert(2 === d.fd, "invalid handle for stderr (" + d.fd + ")");
+ }
+ Oa(Qa);
+ Na();
+ Wb = !1;
+ Oa(Ra);
+ if (e.onRuntimeInitialized) {
+ e.onRuntimeInitialized();
+ }
+ assert(!e._main, 'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]');
+ Na();
+ if (e.postRun) {
+ for ("function" == typeof e.postRun && (e.postRun = [e.postRun]); e.postRun.length;) {
+ a = e.postRun.shift(), Ta.unshift(a);
+ }
+ }
+ Oa(Ta);
+ }
+ }
+ if (!(0 < bb)) {
+ assert(!0);
+ y[465525] = 34821223;
+ y[465526] = 2310721022;
+ if (e.preRun) {
+ for ("function" == typeof e.preRun && (e.preRun = [e.preRun]); e.preRun.length;) {
+ Ua();
+ }
+ }
+ Oa(Pa);
+ 0 < bb || e.calledRun || (e.setStatus ? (e.setStatus("Running..."), setTimeout(function() {
+ setTimeout(function() {
+ e.setStatus("");
+ }, 1);
+ a();
+ }, 1)) : a(), Na());
+ }
+}
+e.run = yf;
+var zf = [];
+function m(a) {
+ if (e.onAbort) {
+ e.onAbort(a);
+ }
+ oa(a);
+ n(a);
+ xa = !0;
+ var b = "abort(" + a + ") at " + rb();
+ zf && zf.forEach(function(c) {
+ b = c(b, a);
+ });
+ throw b;
+}
+e.abort = m;
+if (e.preInit) {
+ for ("function" == typeof e.preInit && (e.preInit = [e.preInit]); 0 < e.preInit.length;) {
+ e.preInit.pop()();
+ }
+}
+e.noExitRuntime = !0;
+yf();
+
diff --git a/dist/dbr-7.5.0.1.node.wasm b/dist/dbr-7.5.0.1.node.wasm
new file mode 100644
index 00000000..6b68c6f6
Binary files /dev/null and b/dist/dbr-7.5.0.1.node.wasm differ
diff --git a/dist/dbr-7.5.0.1.node.wasm.js b/dist/dbr-7.5.0.1.node.wasm.js
new file mode 100644
index 00000000..09a0304e
--- /dev/null
+++ b/dist/dbr-7.5.0.1.node.wasm.js
@@ -0,0 +1,4774 @@
+var e;
+e || (e = typeof Module !== 'undefined' ? Module : {});
+var aa = {}, ba;
+for (ba in e) {
+ e.hasOwnProperty(ba) && (aa[ba] = e[ba]);
+}
+var ca = "./this.program";
+function da(a, b) {
+ throw b;
+}
+var ea = !1, fa = !1, ha = !1, ia = !1, ja = !1;
+ea = "object" === typeof window;
+fa = "function" === typeof importScripts;
+ha = (ia = "object" === typeof process && "object" === typeof process.versions && "string" === typeof process.versions.node) && !ea && !fa;
+ja = !ea && !ha && !fa;
+if (e.ENVIRONMENT) {
+ throw Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");
+}
+var ka = "", la, ma;
+if (ha) {
+ ka = __dirname + "/";
+ var oa, pa;
+ la = function(a, b) {
+ oa || (oa = require("fs"));
+ pa || (pa = require("path"));
+ a = pa.normalize(a);
+ a = oa.readFileSync(a);
+ return b ? a : a.toString();
+ };
+ ma = function(a) {
+ a = la(a, !0);
+ a.buffer || (a = new Uint8Array(a));
+ assert(a.buffer);
+ return a;
+ };
+ 1 < process.argv.length && (ca = process.argv[1].replace(/\\/g, "/"));
+ process.argv.slice(2);
+ "undefined" !== typeof module && (module.exports = e);
+ process.on("uncaughtException", function(a) {
+ if (!(a instanceof qa)) {
+ throw a;
+ }
+ });
+ process.on("unhandledRejection", l);
+ da = function(a) {
+ process.exit(a);
+ };
+ e.inspect = function() {
+ return "[Emscripten Module object]";
+ };
+} else {
+ if (ja) {
+ "undefined" != typeof read && (la = function(a) {
+ return read(a);
+ }), ma = function(a) {
+ if ("function" === typeof readbuffer) {
+ return new Uint8Array(readbuffer(a));
+ }
+ a = read(a, "binary");
+ assert("object" === typeof a);
+ return a;
+ }, "function" === typeof quit && (da = function(a) {
+ quit(a);
+ }), "undefined" !== typeof print && ("undefined" === typeof console && (console = {}), console.log = print, console.warn = console.error = "undefined" !== typeof printErr ? printErr : print);
+ } else {
+ if (ea || fa) {
+ fa ? ka = self.location.href : document.currentScript && (ka = document.currentScript.src), ka = 0 !== ka.indexOf("blob:") ? ka.substr(0, ka.lastIndexOf("/") + 1) : "", la = function(a) {
+ var b = new XMLHttpRequest;
+ b.open("GET", a, !1);
+ b.send(null);
+ return b.responseText;
+ }, fa && (ma = function(a) {
+ var b = new XMLHttpRequest;
+ b.open("GET", a, !1);
+ b.responseType = "arraybuffer";
+ b.send(null);
+ return new Uint8Array(b.response);
+ });
+ } else {
+ throw Error("environment detection error");
+ }
+ }
+}
+var ra = e.print || console.log.bind(console), m = e.printErr || console.warn.bind(console);
+for (ba in aa) {
+ aa.hasOwnProperty(ba) && (e[ba] = aa[ba]);
+}
+aa = null;
+Object.getOwnPropertyDescriptor(e, "arguments") || Object.defineProperty(e, "arguments", {get:function() {
+ l("Module.arguments has been replaced with plain arguments_");
+}});
+e.thisProgram && (ca = e.thisProgram);
+Object.getOwnPropertyDescriptor(e, "thisProgram") || Object.defineProperty(e, "thisProgram", {get:function() {
+ l("Module.thisProgram has been replaced with plain thisProgram");
+}});
+e.quit && (da = e.quit);
+Object.getOwnPropertyDescriptor(e, "quit") || Object.defineProperty(e, "quit", {get:function() {
+ l("Module.quit has been replaced with plain quit_");
+}});
+assert("undefined" === typeof e.memoryInitializerPrefixURL, "Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead");
+assert("undefined" === typeof e.pthreadMainPrefixURL, "Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead");
+assert("undefined" === typeof e.cdInitializerPrefixURL, "Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead");
+assert("undefined" === typeof e.filePackagePrefixURL, "Module.filePackagePrefixURL option was removed, use Module.locateFile instead");
+assert("undefined" === typeof e.read, "Module.read option was removed (modify read_ in JS)");
+assert("undefined" === typeof e.readAsync, "Module.readAsync option was removed (modify readAsync in JS)");
+assert("undefined" === typeof e.readBinary, "Module.readBinary option was removed (modify readBinary in JS)");
+assert("undefined" === typeof e.setWindowTitle, "Module.setWindowTitle option was removed (modify setWindowTitle in JS)");
+Object.getOwnPropertyDescriptor(e, "read") || Object.defineProperty(e, "read", {get:function() {
+ l("Module.read has been replaced with plain read_");
+}});
+Object.getOwnPropertyDescriptor(e, "readAsync") || Object.defineProperty(e, "readAsync", {get:function() {
+ l("Module.readAsync has been replaced with plain readAsync");
+}});
+Object.getOwnPropertyDescriptor(e, "readBinary") || Object.defineProperty(e, "readBinary", {get:function() {
+ l("Module.readBinary has been replaced with plain readBinary");
+}});
+n = p = function() {
+ l("cannot use the stack before compiled code is ready to run, and has provided stack access");
+};
+function sa(a) {
+ assert(ta);
+ var b = r[ta >> 2];
+ a = b + a + 15 & -16;
+ a > ua() && l("failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly");
+ r[ta >> 2] = a;
+ return b;
+}
+function va(a) {
+ wa || (wa = {});
+ wa[a] || (wa[a] = 1, m(a));
+}
+var wa;
+function xa(a, b, c) {
+ return c ? +(a >>> 0) + 4294967296.0 * +(b >>> 0) : +(a >>> 0) + 4294967296.0 * +(b | 0);
+}
+var ya = 0, za;
+e.wasmBinary && (za = e.wasmBinary);
+Object.getOwnPropertyDescriptor(e, "wasmBinary") || Object.defineProperty(e, "wasmBinary", {get:function() {
+ l("Module.wasmBinary has been replaced with plain wasmBinary");
+}});
+"object" !== typeof WebAssembly && l("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");
+var Aa, Ba = !1;
+function assert(a, b) {
+ a || l("Assertion failed: " + b);
+}
+function Ca(a) {
+ if ("number" === typeof a) {
+ var b = !0;
+ var c = a;
+ } else {
+ b = !1, c = a.length;
+ }
+ var d = Da(Math.max(c, 1));
+ if (b) {
+ a = d;
+ assert(0 == (d & 3));
+ for (b = d + (c & -4); a < b; a += 4) {
+ r[a >> 2] = 0;
+ }
+ for (b = d + c; a < b;) {
+ t[a++ >> 0] = 0;
+ }
+ return d;
+ }
+ a.subarray || a.slice ? y.set(a, d) : y.set(new Uint8Array(a), d);
+ return d;
+}
+var Ea = "undefined" !== typeof TextDecoder ? new TextDecoder("utf8") : void 0;
+function Fa(a, b, c) {
+ var d = b + c;
+ for (c = b; a[c] && !(c >= d);) {
+ ++c;
+ }
+ if (16 < c - b && a.subarray && Ea) {
+ return Ea.decode(a.subarray(b, c));
+ }
+ for (d = ""; b < c;) {
+ var f = a[b++];
+ if (f & 128) {
+ var g = a[b++] & 63;
+ if (192 == (f & 224)) {
+ d += String.fromCharCode((f & 31) << 6 | g);
+ } else {
+ var h = a[b++] & 63;
+ 224 == (f & 240) ? f = (f & 15) << 12 | g << 6 | h : (240 != (f & 248) && va("Invalid UTF-8 leading byte 0x" + f.toString(16) + " encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"), f = (f & 7) << 18 | g << 12 | h << 6 | a[b++] & 63);
+ 65536 > f ? d += String.fromCharCode(f) : (f -= 65536, d += String.fromCharCode(55296 | f >> 10, 56320 | f & 1023));
+ }
+ } else {
+ d += String.fromCharCode(f);
+ }
+ }
+ return d;
+}
+function z(a) {
+ return a ? Fa(y, a, void 0) : "";
+}
+function Ga(a, b, c, d) {
+ if (!(0 < d)) {
+ return 0;
+ }
+ var f = c;
+ d = c + d - 1;
+ for (var g = 0; g < a.length; ++g) {
+ var h = a.charCodeAt(g);
+ if (55296 <= h && 57343 >= h) {
+ var k = a.charCodeAt(++g);
+ h = 65536 + ((h & 1023) << 10) | k & 1023;
+ }
+ if (127 >= h) {
+ if (c >= d) {
+ break;
+ }
+ b[c++] = h;
+ } else {
+ if (2047 >= h) {
+ if (c + 1 >= d) {
+ break;
+ }
+ b[c++] = 192 | h >> 6;
+ } else {
+ if (65535 >= h) {
+ if (c + 2 >= d) {
+ break;
+ }
+ b[c++] = 224 | h >> 12;
+ } else {
+ if (c + 3 >= d) {
+ break;
+ }
+ 2097152 <= h && va("Invalid Unicode code point 0x" + h.toString(16) + " encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF).");
+ b[c++] = 240 | h >> 18;
+ b[c++] = 128 | h >> 12 & 63;
+ }
+ b[c++] = 128 | h >> 6 & 63;
+ }
+ b[c++] = 128 | h & 63;
+ }
+ }
+ b[c] = 0;
+ return c - f;
+}
+function Ha(a, b, c) {
+ assert("number" == typeof c, "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");
+ Ga(a, y, b, c);
+}
+function Ia(a) {
+ for (var b = 0, c = 0; c < a.length; ++c) {
+ var d = a.charCodeAt(c);
+ 55296 <= d && 57343 >= d && (d = 65536 + ((d & 1023) << 10) | a.charCodeAt(++c) & 1023);
+ 127 >= d ? ++b : b = 2047 >= d ? b + 2 : 65535 >= d ? b + 3 : b + 4;
+ }
+ return b;
+}
+"undefined" !== typeof TextDecoder && new TextDecoder("utf-16le");
+function Ja(a, b) {
+ assert(0 <= a.length, "writeArrayToMemory array must have a length (should be an array or typed array)");
+ t.set(a, b);
+}
+function Ka(a) {
+ 0 < a % 65536 && (a += 65536 - a % 65536);
+ return a;
+}
+var buffer, t, y, La, Ma, r, A, Na, Oa;
+function Pa() {
+ e.HEAP8 = t = new Int8Array(buffer);
+ e.HEAP16 = La = new Int16Array(buffer);
+ e.HEAP32 = r = new Int32Array(buffer);
+ e.HEAPU8 = y = new Uint8Array(buffer);
+ e.HEAPU16 = Ma = new Uint16Array(buffer);
+ e.HEAPU32 = A = new Uint32Array(buffer);
+ e.HEAPF32 = Na = new Float32Array(buffer);
+ e.HEAPF64 = Oa = new Float64Array(buffer);
+}
+var ta = 2025184;
+assert(!0, "stack must start aligned");
+assert(!0, "heap must start aligned");
+e.TOTAL_STACK && assert(5242880 === e.TOTAL_STACK, "the stack size can no longer be determined at runtime");
+var Qa = e.TOTAL_MEMORY || 16777216;
+Object.getOwnPropertyDescriptor(e, "TOTAL_MEMORY") || Object.defineProperty(e, "TOTAL_MEMORY", {get:function() {
+ l("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY");
+}});
+assert(5242880 <= Qa, "TOTAL_MEMORY should be larger than TOTAL_STACK, was " + Qa + "! (TOTAL_STACK=5242880)");
+assert("undefined" !== typeof Int32Array && "undefined" !== typeof Float64Array && void 0 !== Int32Array.prototype.subarray && void 0 !== Int32Array.prototype.set, "JS engine does not provide full typed array support");
+e.wasmMemory ? Aa = e.wasmMemory : Aa = new WebAssembly.Memory({initial:Qa / 65536});
+Aa && (buffer = Aa.buffer);
+Qa = buffer.byteLength;
+assert(0 === Qa % 65536);
+Pa();
+r[ta >> 2] = 7268080;
+function Ra() {
+ var a = A[506301], b = A[506302];
+ 34821223 == a && 2310721022 == b || l("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x" + b.toString(16) + " " + a.toString(16));
+ 1668509029 !== r[0] && l("Runtime error: The application has corrupted its heap memory area (address zero)!");
+}
+r[0] = 1668509029;
+La[1] = 25459;
+if (115 !== y[2] || 99 !== y[3]) {
+ throw "Runtime error: expected the system to be little-endian!";
+}
+function Sa(a) {
+ for (; 0 < a.length;) {
+ var b = a.shift();
+ if ("function" == typeof b) {
+ b();
+ } else {
+ var c = b.ya;
+ "number" === typeof c ? void 0 === b.ba ? e.dynCall_v(c) : e.dynCall_vi(c, b.ba) : c(void 0 === b.ba ? null : b.ba);
+ }
+ }
+}
+var Ta = [], Ua = [], Va = [], Wa = [], Xa = [], F = !1, G = !1;
+function Ya() {
+ var a = e.preRun.shift();
+ Ta.unshift(a);
+}
+function Za(a, b) {
+ return 0 <= a ? a : 32 >= b ? 2 * Math.abs(1 << b - 1) + a : Math.pow(2, b) + a;
+}
+function $a(a, b) {
+ if (0 >= a) {
+ return a;
+ }
+ var c = 32 >= b ? Math.abs(1 << b - 1) : Math.pow(2, b - 1);
+ a >= c && (32 >= b || a > c) && (a = -2 * c + a);
+ return a;
+}
+assert(Math.imul, "This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
+assert(Math.fround, "This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
+assert(Math.clz32, "This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
+assert(Math.trunc, "This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
+var ab = Math.abs, bb = Math.sqrt, cb = Math.ceil, db = Math.floor, eb = Math.min, fb = 0, gb = null, hb = null, ib = {};
+function jb() {
+ fb++;
+ e.monitorRunDependencies && e.monitorRunDependencies(fb);
+ assert(!ib["wasm-instantiate"]);
+ ib["wasm-instantiate"] = 1;
+ null === gb && "undefined" !== typeof setInterval && (gb = setInterval(function() {
+ if (Ba) {
+ clearInterval(gb), gb = null;
+ } else {
+ var a = !1, b;
+ for (b in ib) {
+ a || (a = !0, m("still waiting on run dependencies:")), m("dependency: " + b);
+ }
+ a && m("(end of list)");
+ }
+ }, 10000));
+}
+e.preloadedImages = {};
+e.preloadedAudios = {};
+function kb() {
+ var a = lb;
+ return String.prototype.startsWith ? a.startsWith("data:application/octet-stream;base64,") : 0 === a.indexOf("data:application/octet-stream;base64,");
+}
+var lb = "dbr-7.5.0.1.node.wasm";
+if (!kb()) {
+ var mb = lb;
+ lb = e.locateFile ? e.locateFile(mb, ka) : ka + mb;
+}
+function nb() {
+ try {
+ if (za) {
+ return new Uint8Array(za);
+ }
+ if (ma) {
+ return ma(lb);
+ }
+ throw "both async and sync fetching of the wasm failed";
+ } catch (a) {
+ l(a);
+ }
+}
+function ob() {
+ return za || !ea && !fa || "function" !== typeof fetch ? new Promise(function(a) {
+ a(nb());
+ }) : fetch(lb, {credentials:"same-origin"}).then(function(a) {
+ if (!a.ok) {
+ throw "failed to load wasm binary file at '" + lb + "'";
+ }
+ return a.arrayBuffer();
+ }).catch(function() {
+ return nb();
+ });
+}
+function pb(a) {
+ function b(a) {
+ e.asm = a.exports;
+ fb--;
+ e.monitorRunDependencies && e.monitorRunDependencies(fb);
+ assert(ib["wasm-instantiate"]);
+ delete ib["wasm-instantiate"];
+ 0 == fb && (null !== gb && (clearInterval(gb), gb = null), hb && (a = hb, hb = null, a()));
+ }
+ function c(a) {
+ assert(e === g, "the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");
+ g = null;
+ b(a.instance);
+ }
+ function d(a) {
+ return ob().then(function(a) {
+ return WebAssembly.instantiate(a, f);
+ }).then(a, function(a) {
+ m("failed to asynchronously prepare wasm: " + a);
+ l(a);
+ });
+ }
+ var f = {env:a};
+ jb();
+ var g = e;
+ if (e.instantiateWasm) {
+ try {
+ return e.instantiateWasm(f, b);
+ } catch (h) {
+ return m("Module.instantiateWasm callback failed with error: " + h), !1;
+ }
+ }
+ (function() {
+ if (za || "function" !== typeof WebAssembly.instantiateStreaming || kb() || "function" !== typeof fetch) {
+ return d(c);
+ }
+ fetch(lb, {credentials:"same-origin"}).then(function(a) {
+ return WebAssembly.instantiateStreaming(a, f).then(c, function(a) {
+ m("wasm streaming compile failed: " + a);
+ m("falling back to ArrayBuffer instantiation");
+ d(c);
+ });
+ });
+ })();
+ return {};
+}
+e.asm = function(a, b) {
+ b.memory = Aa;
+ b.table = new WebAssembly.Table({initial:9028, maximum:9028, element:"anyfunc"});
+ a = pb(b);
+ assert(a, "binaryen setup failed (no wasm support?)");
+ return a;
+};
+var H, qb;
+Ua.push({ya:function() {
+ rb();
+}});
+function sb(a) {
+ va("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");
+ return a;
+}
+function tb(a) {
+ return a.replace(/_Z[\w\d_]+/g, function(a) {
+ var b = sb(a);
+ return a === b ? a : b + " [" + a + "]";
+ });
+}
+function ub() {
+ var a = Error();
+ if (!a.stack) {
+ try {
+ throw Error(0);
+ } catch (b) {
+ a = b;
+ }
+ if (!a.stack) {
+ return "(no stack trace available)";
+ }
+ }
+ return a.stack.toString();
+}
+function vb() {
+ var a = ub();
+ e.extraStackTrace && (a += "\n" + e.extraStackTrace());
+ return tb(a);
+}
+var I = {};
+function wb(a) {
+ if (wb.s) {
+ var b = r[a >> 2];
+ var c = r[b >> 2];
+ } else {
+ wb.s = !0, I.USER = I.LOGNAME = "web_user", I.PATH = "/", I.PWD = "/", I.HOME = "/home/web_user", I.LANG = "C.UTF-8", I.LANG = ("object" === typeof navigator && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", I._ = ca, c = F ? Da(1024) : sa(1024), b = F ? Da(256) : sa(256), r[b >> 2] = c, r[a >> 2] = b;
+ }
+ a = [];
+ var d = 0, f;
+ for (f in I) {
+ if ("string" === typeof I[f]) {
+ var g = f + "=" + I[f];
+ a.push(g);
+ d += g.length;
+ }
+ }
+ if (1024 < d) {
+ throw Error("Environment size exceeded TOTAL_ENV_SIZE!");
+ }
+ for (f = 0; f < a.length; f++) {
+ d = g = a[f];
+ for (var h = c, k = 0; k < d.length; ++k) {
+ assert(d.charCodeAt(k) === d.charCodeAt(k) & 255), t[h++ >> 0] = d.charCodeAt(k);
+ }
+ t[h >> 0] = 0;
+ r[b + 4 * f >> 2] = c;
+ c += g.length + 1;
+ }
+ r[b + 4 * a.length >> 2] = 0;
+}
+function xb(a, b) {
+ va("atexit() called, but EXIT_RUNTIME is not set, so atexits() will not be called. set EXIT_RUNTIME to 1 (see the FAQ)");
+ Wa.unshift({ya:a, ba:b});
+}
+function yb() {
+ return 0 < yb.s;
+}
+function zb(a) {
+ e.___errno_location ? r[e.___errno_location() >> 2] = a : m("failed to set errno from JS");
+ return a;
+}
+function Ab(a, b) {
+ for (var c = 0, d = a.length - 1; 0 <= d; d--) {
+ var f = a[d];
+ "." === f ? a.splice(d, 1) : ".." === f ? (a.splice(d, 1), c++) : c && (a.splice(d, 1), c--);
+ }
+ if (b) {
+ for (; c; c--) {
+ a.unshift("..");
+ }
+ }
+ return a;
+}
+function Bb(a) {
+ var b = "/" === a.charAt(0), c = "/" === a.substr(-1);
+ (a = Ab(a.split("/").filter(function(a) {
+ return !!a;
+ }), !b).join("/")) || b || (a = ".");
+ a && c && (a += "/");
+ return (b ? "/" : "") + a;
+}
+function Cb(a) {
+ var b = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);
+ a = b[0];
+ b = b[1];
+ if (!a && !b) {
+ return ".";
+ }
+ b && (b = b.substr(0, b.length - 1));
+ return a + b;
+}
+function Db(a) {
+ if ("/" === a) {
+ return "/";
+ }
+ var b = a.lastIndexOf("/");
+ return -1 === b ? a : a.substr(b + 1);
+}
+function Eb() {
+ var a = Array.prototype.slice.call(arguments, 0);
+ return Bb(a.join("/"));
+}
+function Fb(a, b) {
+ return Bb(a + "/" + b);
+}
+function Gb() {
+ for (var a = "", b = !1, c = arguments.length - 1; -1 <= c && !b; c--) {
+ b = 0 <= c ? arguments[c] : "/";
+ if ("string" !== typeof b) {
+ throw new TypeError("Arguments to path.resolve must be strings");
+ }
+ if (!b) {
+ return "";
+ }
+ a = b + "/" + a;
+ b = "/" === b.charAt(0);
+ }
+ a = Ab(a.split("/").filter(function(a) {
+ return !!a;
+ }), !b).join("/");
+ return (b ? "/" : "") + a || ".";
+}
+var Hb = [];
+function Ib(a, b) {
+ Hb[a] = {input:[], output:[], U:b};
+ Jb(a, Kb);
+}
+var Kb = {open:function(a) {
+ var b = Hb[a.node.rdev];
+ if (!b) {
+ throw new J(19);
+ }
+ a.tty = b;
+ a.seekable = !1;
+}, close:function(a) {
+ a.tty.U.flush(a.tty);
+}, flush:function(a) {
+ a.tty.U.flush(a.tty);
+}, read:function(a, b, c, d) {
+ if (!a.tty || !a.tty.U.Aa) {
+ throw new J(6);
+ }
+ for (var f = 0, g = 0; g < d; g++) {
+ try {
+ var h = a.tty.U.Aa(a.tty);
+ } catch (k) {
+ throw new J(5);
+ }
+ if (void 0 === h && 0 === f) {
+ throw new J(11);
+ }
+ if (null === h || void 0 === h) {
+ break;
+ }
+ f++;
+ b[c + g] = h;
+ }
+ f && (a.node.timestamp = Date.now());
+ return f;
+}, write:function(a, b, c, d) {
+ if (!a.tty || !a.tty.U.na) {
+ throw new J(6);
+ }
+ try {
+ for (var f = 0; f < d; f++) {
+ a.tty.U.na(a.tty, b[c + f]);
+ }
+ } catch (g) {
+ throw new J(5);
+ }
+ d && (a.node.timestamp = Date.now());
+ return f;
+}}, Mb = {Aa:function(a) {
+ if (!a.input.length) {
+ var b = null;
+ if (ha) {
+ var c = Buffer.s ? Buffer.s(256) : new Buffer(256), d = 0, f = process.stdin.fd;
+ if ("win32" != process.platform) {
+ var g = !1;
+ try {
+ f = fs.openSync("/dev/stdin", "r"), g = !0;
+ } catch (h) {
+ }
+ }
+ try {
+ d = fs.readSync(f, c, 0, 256, null);
+ } catch (h) {
+ if (-1 != h.toString().indexOf("EOF")) {
+ d = 0;
+ } else {
+ throw h;
+ }
+ }
+ g && fs.closeSync(f);
+ 0 < d ? b = c.slice(0, d).toString("utf-8") : b = null;
+ } else {
+ "undefined" != typeof window && "function" == typeof window.prompt ? (b = window.prompt("Input: "), null !== b && (b += "\n")) : "function" == typeof readline && (b = readline(), null !== b && (b += "\n"));
+ }
+ if (!b) {
+ return null;
+ }
+ a.input = Lb(b, !0);
+ }
+ return a.input.shift();
+}, na:function(a, b) {
+ null === b || 10 === b ? (ra(Fa(a.output, 0)), a.output = []) : 0 != b && a.output.push(b);
+}, flush:function(a) {
+ a.output && 0 < a.output.length && (ra(Fa(a.output, 0)), a.output = []);
+}}, Nb = {na:function(a, b) {
+ null === b || 10 === b ? (m(Fa(a.output, 0)), a.output = []) : 0 != b && a.output.push(b);
+}, flush:function(a) {
+ a.output && 0 < a.output.length && (m(Fa(a.output, 0)), a.output = []);
+}}, K = {G:null, v:function() {
+ return K.createNode(null, "/", 16895, 0);
+}, createNode:function(a, b, c, d) {
+ if (24576 === (c & 61440) || 4096 === (c & 61440)) {
+ throw new J(1);
+ }
+ K.G || (K.G = {dir:{node:{I:K.f.I, C:K.f.C, lookup:K.f.lookup, X:K.f.X, rename:K.f.rename, unlink:K.f.unlink, rmdir:K.f.rmdir, readdir:K.f.readdir, symlink:K.f.symlink}, stream:{K:K.g.K}}, file:{node:{I:K.f.I, C:K.f.C}, stream:{K:K.g.K, read:K.g.read, write:K.g.write, qa:K.g.qa, Ba:K.g.Ba, ga:K.g.ga}}, link:{node:{I:K.f.I, C:K.f.C, readlink:K.f.readlink}, stream:{}}, sa:{node:{I:K.f.I, C:K.f.C}, stream:Ob}});
+ c = Pb(a, b, c, d);
+ L(c.mode) ? (c.f = K.G.dir.node, c.g = K.G.dir.stream, c.c = {}) : 32768 === (c.mode & 61440) ? (c.f = K.G.file.node, c.g = K.G.file.stream, c.l = 0, c.c = null) : 40960 === (c.mode & 61440) ? (c.f = K.G.link.node, c.g = K.G.link.stream) : 8192 === (c.mode & 61440) && (c.f = K.G.sa.node, c.g = K.G.sa.stream);
+ c.timestamp = Date.now();
+ a && (a.c[b] = c);
+ return c;
+}, xd:function(a) {
+ if (a.c && a.c.subarray) {
+ for (var b = [], c = 0; c < a.l; ++c) {
+ b.push(a.c[c]);
+ }
+ return b;
+ }
+ return a.c;
+}, yd:function(a) {
+ return a.c ? a.c.subarray ? a.c.subarray(0, a.l) : new Uint8Array(a.c) : new Uint8Array;
+}, ua:function(a, b) {
+ var c = a.c ? a.c.length : 0;
+ c >= b || (b = Math.max(b, c * (1048576 > c ? 2.0 : 1.125) | 0), 0 != c && (b = Math.max(b, 256)), c = a.c, a.c = new Uint8Array(b), 0 < a.l && a.c.set(c.subarray(0, a.l), 0));
+}, Wa:function(a, b) {
+ if (a.l != b) {
+ if (0 == b) {
+ a.c = null, a.l = 0;
+ } else {
+ if (!a.c || a.c.subarray) {
+ var c = a.c;
+ a.c = new Uint8Array(new ArrayBuffer(b));
+ c && a.c.set(c.subarray(0, Math.min(b, a.l)));
+ } else {
+ if (a.c || (a.c = []), a.c.length > b) {
+ a.c.length = b;
+ } else {
+ for (; a.c.length < b;) {
+ a.c.push(0);
+ }
+ }
+ }
+ a.l = b;
+ }
+ }
+}, f:{I:function(a) {
+ var b = {};
+ b.dev = 8192 === (a.mode & 61440) ? a.id : 1;
+ b.ino = a.id;
+ b.mode = a.mode;
+ b.nlink = 1;
+ b.uid = 0;
+ b.gid = 0;
+ b.rdev = a.rdev;
+ L(a.mode) ? b.size = 4096 : 32768 === (a.mode & 61440) ? b.size = a.l : 40960 === (a.mode & 61440) ? b.size = a.link.length : b.size = 0;
+ b.atime = new Date(a.timestamp);
+ b.mtime = new Date(a.timestamp);
+ b.ctime = new Date(a.timestamp);
+ b.L = 4096;
+ b.blocks = Math.ceil(b.size / b.L);
+ return b;
+}, C:function(a, b) {
+ void 0 !== b.mode && (a.mode = b.mode);
+ void 0 !== b.timestamp && (a.timestamp = b.timestamp);
+ void 0 !== b.size && K.Wa(a, b.size);
+}, lookup:function() {
+ throw Qb[2];
+}, X:function(a, b, c, d) {
+ return K.createNode(a, b, c, d);
+}, rename:function(a, b, c) {
+ if (L(a.mode)) {
+ try {
+ var d = Rb(b, c);
+ } catch (g) {
+ }
+ if (d) {
+ for (var f in d.c) {
+ throw new J(39);
+ }
+ }
+ }
+ delete a.parent.c[a.name];
+ a.name = c;
+ b.c[c] = a;
+ a.parent = b;
+}, unlink:function(a, b) {
+ delete a.c[b];
+}, rmdir:function(a, b) {
+ var c = Rb(a, b), d;
+ for (d in c.c) {
+ throw new J(39);
+ }
+ delete a.c[b];
+}, readdir:function(a) {
+ var b = [".", ".."], c;
+ for (c in a.c) {
+ a.c.hasOwnProperty(c) && b.push(c);
+ }
+ return b;
+}, symlink:function(a, b, c) {
+ a = K.createNode(a, b, 41471, 0);
+ a.link = c;
+ return a;
+}, readlink:function(a) {
+ if (40960 !== (a.mode & 61440)) {
+ throw new J(22);
+ }
+ return a.link;
+}}, g:{read:function(a, b, c, d, f) {
+ var g = a.node.c;
+ if (f >= a.node.l) {
+ return 0;
+ }
+ a = Math.min(a.node.l - f, d);
+ assert(0 <= a);
+ if (8 < a && g.subarray) {
+ b.set(g.subarray(f, f + a), c);
+ } else {
+ for (d = 0; d < a; d++) {
+ b[c + d] = g[f + d];
+ }
+ }
+ return a;
+}, write:function(a, b, c, d, f, g) {
+ g && va("file packager has copied file data into memory, but in memory growth we are forced to copy it again (see --no-heap-copy)");
+ g = !1;
+ if (!d) {
+ return 0;
+ }
+ a = a.node;
+ a.timestamp = Date.now();
+ if (b.subarray && (!a.c || a.c.subarray)) {
+ if (g) {
+ return assert(0 === f, "canOwn must imply no weird position inside the file"), a.c = b.subarray(c, c + d), a.l = d;
+ }
+ if (0 === a.l && 0 === f) {
+ return a.c = new Uint8Array(b.subarray(c, c + d)), a.l = d;
+ }
+ if (f + d <= a.l) {
+ return a.c.set(b.subarray(c, c + d), f), d;
+ }
+ }
+ K.ua(a, f + d);
+ if (a.c.subarray && b.subarray) {
+ a.c.set(b.subarray(c, c + d), f);
+ } else {
+ for (g = 0; g < d; g++) {
+ a.c[f + g] = b[c + g];
+ }
+ }
+ a.l = Math.max(a.l, f + d);
+ return d;
+}, K:function(a, b, c) {
+ 1 === c ? b += a.position : 2 === c && 32768 === (a.node.mode & 61440) && (b += a.node.l);
+ if (0 > b) {
+ throw new J(22);
+ }
+ return b;
+}, qa:function(a, b, c) {
+ K.ua(a.node, b + c);
+ a.node.l = Math.max(a.node.l, b + c);
+}, Ba:function(a, b, c, d, f, g, h) {
+ if (32768 !== (a.node.mode & 61440)) {
+ throw new J(19);
+ }
+ c = a.node.c;
+ if (h & 2 || c.buffer !== b && c.buffer !== b.buffer) {
+ if (0 < f || f + d < a.node.l) {
+ c.subarray ? c = c.subarray(f, f + d) : c = Array.prototype.slice.call(c, f, f + d);
+ }
+ a = !0;
+ f = b.buffer == t.buffer;
+ d = Da(d);
+ if (!d) {
+ throw new J(12);
+ }
+ (f ? t : b).set(c, d);
+ } else {
+ a = !1, d = c.byteOffset;
+ }
+ return {j:d, Ea:a};
+}, ga:function(a, b, c, d, f) {
+ if (32768 !== (a.node.mode & 61440)) {
+ throw new J(19);
+ }
+ if (f & 2) {
+ return 0;
+ }
+ K.g.write(a, b, 0, d, c, !1);
+ return 0;
+}}}, M = {fa:!1, Za:function() {
+ M.fa = !!process.platform.match(/^win/);
+ var a = process.binding("constants");
+ a.fs && (a = a.fs);
+ M.va = {1024:a.O_APPEND, 64:a.O_CREAT, 128:a.O_EXCL, 0:a.O_RDONLY, 2:a.O_RDWR, 4096:a.O_SYNC, 512:a.O_TRUNC, 1:a.O_WRONLY};
+}, ra:function(a) {
+ return Buffer.s ? Buffer.from(a) : new Buffer(a);
+}, v:function(a) {
+ assert(ia);
+ return M.createNode(null, "/", M.za(a.ma.root), 0);
+}, createNode:function(a, b, c) {
+ if (!L(c) && 32768 !== (c & 61440) && 40960 !== (c & 61440)) {
+ throw new J(22);
+ }
+ a = Pb(a, b, c);
+ a.f = M.f;
+ a.g = M.g;
+ return a;
+}, za:function(a) {
+ try {
+ var b = fs.lstatSync(a);
+ M.fa && (b.mode = b.mode | (b.mode & 292) >> 2);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new J(-c.i);
+ }
+ return b.mode;
+}, A:function(a) {
+ for (var b = []; a.parent !== a;) {
+ b.push(a.name), a = a.parent;
+ }
+ b.push(a.v.ma.root);
+ b.reverse();
+ return Eb.apply(null, b);
+}, Ia:function(a) {
+ a &= -2656257;
+ var b = 0, c;
+ for (c in M.va) {
+ a & c && (b |= M.va[c], a ^= c);
+ }
+ if (a) {
+ throw new J(22);
+ }
+ return b;
+}, f:{I:function(a) {
+ a = M.A(a);
+ try {
+ var b = fs.lstatSync(a);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new J(-c.i);
+ }
+ M.fa && !b.L && (b.L = 4096);
+ M.fa && !b.blocks && (b.blocks = (b.size + b.L - 1) / b.L | 0);
+ return {dev:b.dev, ino:b.ino, mode:b.mode, nlink:b.nlink, uid:b.uid, gid:b.gid, rdev:b.rdev, size:b.size, atime:b.atime, mtime:b.mtime, ctime:b.ctime, L:b.L, blocks:b.blocks};
+}, C:function(a, b) {
+ var c = M.A(a);
+ try {
+ void 0 !== b.mode && (fs.chmodSync(c, b.mode), a.mode = b.mode), void 0 !== b.size && fs.truncateSync(c, b.size);
+ } catch (d) {
+ if (!d.code) {
+ throw d;
+ }
+ throw new J(-d.i);
+ }
+}, lookup:function(a, b) {
+ var c = Fb(M.A(a), b);
+ c = M.za(c);
+ return M.createNode(a, b, c);
+}, X:function(a, b, c, d) {
+ a = M.createNode(a, b, c, d);
+ b = M.A(a);
+ try {
+ L(a.mode) ? fs.mkdirSync(b, a.mode) : fs.writeFileSync(b, "", {mode:a.mode});
+ } catch (f) {
+ if (!f.code) {
+ throw f;
+ }
+ throw new J(-f.i);
+ }
+ return a;
+}, rename:function(a, b, c) {
+ a = M.A(a);
+ b = Fb(M.A(b), c);
+ try {
+ fs.renameSync(a, b);
+ } catch (d) {
+ if (!d.code) {
+ throw d;
+ }
+ throw new J(-d.i);
+ }
+}, unlink:function(a, b) {
+ a = Fb(M.A(a), b);
+ try {
+ fs.unlinkSync(a);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new J(-c.i);
+ }
+}, rmdir:function(a, b) {
+ a = Fb(M.A(a), b);
+ try {
+ fs.rmdirSync(a);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new J(-c.i);
+ }
+}, readdir:function(a) {
+ a = M.A(a);
+ try {
+ return fs.readdirSync(a);
+ } catch (b) {
+ if (!b.code) {
+ throw b;
+ }
+ throw new J(-b.i);
+ }
+}, symlink:function(a, b, c) {
+ a = Fb(M.A(a), b);
+ try {
+ fs.symlinkSync(c, a);
+ } catch (d) {
+ if (!d.code) {
+ throw d;
+ }
+ throw new J(-d.i);
+ }
+}, readlink:function(a) {
+ var b = M.A(a);
+ try {
+ return b = fs.readlinkSync(b), b = Sb.relative(Sb.resolve(a.v.ma.root), b);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new J(-c.i);
+ }
+}}, g:{open:function(a) {
+ var b = M.A(a.node);
+ try {
+ 32768 === (a.node.mode & 61440) && (a.Y = fs.openSync(b, M.Ia(a.flags)));
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new J(-c.i);
+ }
+}, close:function(a) {
+ try {
+ 32768 === (a.node.mode & 61440) && a.Y && fs.closeSync(a.Y);
+ } catch (b) {
+ if (!b.code) {
+ throw b;
+ }
+ throw new J(-b.i);
+ }
+}, read:function(a, b, c, d, f) {
+ if (0 === d) {
+ return 0;
+ }
+ try {
+ return fs.readSync(a.Y, M.ra(b.buffer), c, d, f);
+ } catch (g) {
+ throw new J(-g.i);
+ }
+}, write:function(a, b, c, d, f) {
+ try {
+ return fs.writeSync(a.Y, M.ra(b.buffer), c, d, f);
+ } catch (g) {
+ throw new J(-g.i);
+ }
+}, K:function(a, b, c) {
+ if (1 === c) {
+ b += a.position;
+ } else {
+ if (2 === c && 32768 === (a.node.mode & 61440)) {
+ try {
+ b += fs.fstatSync(a.Y).size;
+ } catch (d) {
+ throw new J(-d.i);
+ }
+ }
+ }
+ if (0 > b) {
+ throw new J(22);
+ }
+ return b;
+}}}, Tb = {0:"Success", 1:"Not super-user", 2:"No such file or directory", 3:"No such process", 4:"Interrupted system call", 5:"I/O error", 6:"No such device or address", 7:"Arg list too long", 8:"Exec format error", 9:"Bad file number", 10:"No children", 11:"No more processes", 12:"Not enough core", 13:"Permission denied", 14:"Bad address", 15:"Block device required", 16:"Mount device busy", 17:"File exists", 18:"Cross-device link", 19:"No such device", 20:"Not a directory", 21:"Is a directory",
+22:"Invalid argument", 23:"Too many open files in system", 24:"Too many open files", 25:"Not a typewriter", 26:"Text file busy", 27:"File too large", 28:"No space left on device", 29:"Illegal seek", 30:"Read only file system", 31:"Too many links", 32:"Broken pipe", 33:"Math arg out of domain of func", 34:"Math result not representable", 35:"File locking deadlock error", 36:"File or path name too long", 37:"No record locks available", 38:"Function not implemented", 39:"Directory not empty", 40:"Too many symbolic links",
+42:"No message of desired type", 43:"Identifier removed", 44:"Channel number out of range", 45:"Level 2 not synchronized", 46:"Level 3 halted", 47:"Level 3 reset", 48:"Link number out of range", 49:"Protocol driver not attached", 50:"No CSI structure available", 51:"Level 2 halted", 52:"Invalid exchange", 53:"Invalid request descriptor", 54:"Exchange full", 55:"No anode", 56:"Invalid request code", 57:"Invalid slot", 59:"Bad font file fmt", 60:"Device not a stream", 61:"No data (for no delay io)",
+62:"Timer expired", 63:"Out of streams resources", 64:"Machine is not on the network", 65:"Package not installed", 66:"The object is remote", 67:"The link has been severed", 68:"Advertise error", 69:"Srmount error", 70:"Communication error on send", 71:"Protocol error", 72:"Multihop attempted", 73:"Cross mount point (not really error)", 74:"Trying to read unreadable message", 75:"Value too large for defined data type", 76:"Given log. name not unique", 77:"f.d. invalid for this operation", 78:"Remote address changed",
+79:"Can access a needed shared lib", 80:"Accessing a corrupted shared lib", 81:".lib section in a.out corrupted", 82:"Attempting to link in too many libs", 83:"Attempting to exec a shared library", 84:"Illegal byte sequence", 86:"Streams pipe error", 87:"Too many users", 88:"Socket operation on non-socket", 89:"Destination address required", 90:"Message too long", 91:"Protocol wrong type for socket", 92:"Protocol not available", 93:"Unknown protocol", 94:"Socket type not supported", 95:"Not supported",
+96:"Protocol family not supported", 97:"Address family not supported by protocol family", 98:"Address already in use", 99:"Address not available", 100:"Network interface is not configured", 101:"Network is unreachable", 102:"Connection reset by network", 103:"Connection aborted", 104:"Connection reset by peer", 105:"No buffer space available", 106:"Socket is already connected", 107:"Socket is not connected", 108:"Can't send after socket shutdown", 109:"Too many references", 110:"Connection timed out",
+111:"Connection refused", 112:"Host is down", 113:"Host is unreachable", 114:"Socket already connected", 115:"Connection already in progress", 116:"Stale file handle", 122:"Quota exceeded", 123:"No medium (in tape drive)", 125:"Operation canceled", 130:"Previous owner died", 131:"State not recoverable"}, Ub = {Wc:1, vc:2, kd:3, Rb:4, Tb:5, Sc:6, fb:7, wc:8, ob:9, xb:10, lb:11, ud:11, Ac:12, gb:13, Kb:14, Jc:15, vb:16, Jb:17, vd:18, uc:19, Lc:20, Vb:21, Sb:22, pc:23, hc:24, Qc:25, rd:26, Lb:27, Fc:28,
+jd:29, ed:30, ic:31, Yc:32, Gb:33, bd:34, Bc:42, Ob:43, yb:44, Xb:45, Yb:46, Zb:47, ec:48, sd:49, sc:50, Wb:51, Db:35, xc:37, nb:52, rb:53, wd:54, qc:55, sb:56, tb:57, Eb:35, ub:59, Hc:60, tc:61, od:62, Gc:63, Cc:64, Dc:65, dd:66, yc:67, jb:68, ld:69, zb:70, Zc:71, kc:72, Hb:73, qb:74, Rc:76, pb:77, cd:78, $b:79, ac:80, dc:81, cc:82, bc:83, Ic:38, Mc:39, lc:36, fc:40, Tc:95, Xc:96, Cb:104, rc:105, kb:97, ad:91, Oc:88, Ec:92, gd:108, Bb:111, hb:98, Ab:103, oc:101, mc:100, pd:110, Mb:112, Nb:113, Qb:115,
+mb:114, Fb:89, jc:90, $c:93, hd:94, ib:99, nc:102, Ub:106, Kc:107, qd:109, td:87, Ib:122, md:116, Pc:95, zc:123, Pb:84, Uc:75, wb:125, Nc:131, Vc:130, nd:86}, Vb = null, Wb = {}, Xb = [], Yb = 1, Zb = null, $b = !0, N = {}, J = null, Qb = {};
+function O(a, b) {
+ a = Gb("/", a);
+ b = b || {};
+ if (!a) {
+ return {path:"", node:null};
+ }
+ var c = {wa:!0, oa:0}, d;
+ for (d in c) {
+ void 0 === b[d] && (b[d] = c[d]);
+ }
+ if (8 < b.oa) {
+ throw new J(40);
+ }
+ a = Ab(a.split("/").filter(function(a) {
+ return !!a;
+ }), !1);
+ var f = Vb;
+ c = "/";
+ for (d = 0; d < a.length; d++) {
+ var g = d === a.length - 1;
+ if (g && b.parent) {
+ break;
+ }
+ f = Rb(f, a[d]);
+ c = Fb(c, a[d]);
+ f.S && (!g || g && b.wa) && (f = f.S.root);
+ if (!g || b.W) {
+ for (g = 0; 40960 === (f.mode & 61440);) {
+ if (f = ac(c), c = Gb(Cb(c), f), f = O(c, {oa:b.oa}).node, 40 < g++) {
+ throw new J(40);
+ }
+ }
+ }
+ }
+ return {path:c, node:f};
+}
+function bc(a) {
+ for (var b;;) {
+ if (a === a.parent) {
+ return a = a.v.Ca, b ? "/" !== a[a.length - 1] ? a + "/" + b : a + b : a;
+ }
+ b = b ? a.name + "/" + b : a.name;
+ a = a.parent;
+ }
+}
+function cc(a, b) {
+ for (var c = 0, d = 0; d < b.length; d++) {
+ c = (c << 5) - c + b.charCodeAt(d) | 0;
+ }
+ return (a + c >>> 0) % Zb.length;
+}
+function dc(a) {
+ var b = cc(a.parent.id, a.name);
+ a.T = Zb[b];
+ Zb[b] = a;
+}
+function ec(a) {
+ var b = cc(a.parent.id, a.name);
+ if (Zb[b] === a) {
+ Zb[b] = a.T;
+ } else {
+ for (b = Zb[b]; b;) {
+ if (b.T === a) {
+ b.T = a.T;
+ break;
+ }
+ b = b.T;
+ }
+ }
+}
+function Rb(a, b) {
+ var c;
+ if (c = (c = fc(a, "x")) ? c : a.f.lookup ? 0 : 13) {
+ throw new J(c, a);
+ }
+ for (c = Zb[cc(a.id, b)]; c; c = c.T) {
+ var d = c.name;
+ if (c.parent.id === a.id && d === b) {
+ return c;
+ }
+ }
+ return a.f.lookup(a, b);
+}
+function Pb(a, b, c, d) {
+ hc || (hc = function(a, b, c, d) {
+ a || (a = this);
+ this.parent = a;
+ this.v = a.v;
+ this.S = null;
+ this.id = Yb++;
+ this.name = b;
+ this.mode = c;
+ this.f = {};
+ this.g = {};
+ this.rdev = d;
+ }, hc.prototype = {}, Object.defineProperties(hc.prototype, {read:{get:function() {
+ return 365 === (this.mode & 365);
+ }, set:function(a) {
+ a ? this.mode |= 365 : this.mode &= -366;
+ }}, write:{get:function() {
+ return 146 === (this.mode & 146);
+ }, set:function(a) {
+ a ? this.mode |= 146 : this.mode &= -147;
+ }}}));
+ a = new hc(a, b, c, d);
+ dc(a);
+ return a;
+}
+function L(a) {
+ return 16384 === (a & 61440);
+}
+var ic = {r:0, rs:1052672, "r+":2, w:577, wx:705, xw:705, "w+":578, "wx+":706, "xw+":706, a:1089, ax:1217, xa:1217, "a+":1090, "ax+":1218, "xa+":1218};
+function jc(a) {
+ var b = ["r", "w", "rw"][a & 3];
+ a & 512 && (b += "w");
+ return b;
+}
+function fc(a, b) {
+ if ($b) {
+ return 0;
+ }
+ if (-1 === b.indexOf("r") || a.mode & 292) {
+ if (-1 !== b.indexOf("w") && !(a.mode & 146) || -1 !== b.indexOf("x") && !(a.mode & 73)) {
+ return 13;
+ }
+ } else {
+ return 13;
+ }
+ return 0;
+}
+function kc(a, b) {
+ try {
+ return Rb(a, b), 17;
+ } catch (c) {
+ }
+ return fc(a, "wx");
+}
+function lc(a, b, c) {
+ try {
+ var d = Rb(a, b);
+ } catch (f) {
+ return f.i;
+ }
+ if (a = fc(a, "wx")) {
+ return a;
+ }
+ if (c) {
+ if (!L(d.mode)) {
+ return 20;
+ }
+ if (d === d.parent || "/" === bc(d)) {
+ return 16;
+ }
+ } else {
+ if (L(d.mode)) {
+ return 21;
+ }
+ }
+ return 0;
+}
+function mc(a) {
+ var b = 4096;
+ for (a = a || 0; a <= b; a++) {
+ if (!Xb[a]) {
+ return a;
+ }
+ }
+ throw new J(24);
+}
+function nc(a, b) {
+ oc || (oc = function() {
+ }, oc.prototype = {}, Object.defineProperties(oc.prototype, {object:{get:function() {
+ return this.node;
+ }, set:function(a) {
+ this.node = a;
+ }}}));
+ var c = new oc, d;
+ for (d in a) {
+ c[d] = a[d];
+ }
+ a = c;
+ b = mc(b);
+ a.fd = b;
+ return Xb[b] = a;
+}
+var Ob = {open:function(a) {
+ a.g = Wb[a.node.rdev].g;
+ a.g.open && a.g.open(a);
+}, K:function() {
+ throw new J(29);
+}};
+function Jb(a, b) {
+ Wb[a] = {g:b};
+}
+function pc(a, b) {
+ var c = "/" === b, d = !b;
+ if (c && Vb) {
+ throw new J(16);
+ }
+ if (!c && !d) {
+ var f = O(b, {wa:!1});
+ b = f.path;
+ f = f.node;
+ if (f.S) {
+ throw new J(16);
+ }
+ if (!L(f.mode)) {
+ throw new J(20);
+ }
+ }
+ b = {type:a, ma:{}, Ca:b, Oa:[]};
+ a = a.v(b);
+ a.v = b;
+ b.root = a;
+ c ? Vb = a : f && (f.S = b, f.v && f.v.Oa.push(b));
+}
+function qc(a, b, c) {
+ var d = O(a, {parent:!0}).node;
+ a = Db(a);
+ if (!a || "." === a || ".." === a) {
+ throw new J(22);
+ }
+ var f = kc(d, a);
+ if (f) {
+ throw new J(f);
+ }
+ if (!d.f.X) {
+ throw new J(1);
+ }
+ return d.f.X(d, a, b, c);
+}
+function rc(a) {
+ qc(a, 16895, 0);
+}
+function sc(a, b, c) {
+ "undefined" === typeof c && (c = b, b = 438);
+ qc(a, b | 8192, c);
+}
+function tc(a, b) {
+ if (!Gb(a)) {
+ throw new J(2);
+ }
+ var c = O(b, {parent:!0}).node;
+ if (!c) {
+ throw new J(2);
+ }
+ b = Db(b);
+ var d = kc(c, b);
+ if (d) {
+ throw new J(d);
+ }
+ if (!c.f.symlink) {
+ throw new J(1);
+ }
+ c.f.symlink(c, b, a);
+}
+function ac(a) {
+ a = O(a).node;
+ if (!a) {
+ throw new J(2);
+ }
+ if (!a.f.readlink) {
+ throw new J(22);
+ }
+ return Gb(bc(a.parent), a.f.readlink(a));
+}
+function uc(a, b, c, d) {
+ if ("" === a) {
+ throw new J(2);
+ }
+ if ("string" === typeof b) {
+ var f = ic[b];
+ if ("undefined" === typeof f) {
+ throw Error("Unknown file open mode: " + b);
+ }
+ b = f;
+ }
+ c = b & 64 ? ("undefined" === typeof c ? 438 : c) & 4095 | 32768 : 0;
+ if ("object" === typeof a) {
+ var g = a;
+ } else {
+ a = Bb(a);
+ try {
+ g = O(a, {W:!(b & 131072)}).node;
+ } catch (k) {
+ }
+ }
+ f = !1;
+ if (b & 64) {
+ if (g) {
+ if (b & 128) {
+ throw new J(17);
+ }
+ } else {
+ g = qc(a, c, 0), f = !0;
+ }
+ }
+ if (!g) {
+ throw new J(2);
+ }
+ 8192 === (g.mode & 61440) && (b &= -513);
+ if (b & 65536 && !L(g.mode)) {
+ throw new J(20);
+ }
+ if (!f && (c = g ? 40960 === (g.mode & 61440) ? 40 : L(g.mode) && ("r" !== jc(b) || b & 512) ? 21 : fc(g, jc(b)) : 2)) {
+ throw new J(c);
+ }
+ if (b & 512) {
+ c = g;
+ var h;
+ "string" === typeof c ? h = O(c, {W:!0}).node : h = c;
+ if (!h.f.C) {
+ throw new J(1);
+ }
+ if (L(h.mode)) {
+ throw new J(21);
+ }
+ if (32768 !== (h.mode & 61440)) {
+ throw new J(22);
+ }
+ if (c = fc(h, "w")) {
+ throw new J(c);
+ }
+ h.f.C(h, {size:0, timestamp:Date.now()});
+ }
+ b &= -641;
+ d = nc({node:g, path:bc(g), flags:b, seekable:!0, position:0, g:g.g, eb:[], error:!1}, d);
+ d.g.open && d.g.open(d);
+ !e.logReadFiles || b & 1 || (vc || (vc = {}), a in vc || (vc[a] = 1, console.log("FS.trackingDelegate error on read file: " + a)));
+ try {
+ N.onOpenFile && (g = 0, 1 !== (b & 2097155) && (g |= 1), 0 !== (b & 2097155) && (g |= 2), N.onOpenFile(a, g));
+ } catch (k) {
+ console.log("FS.trackingDelegate['onOpenFile']('" + a + "', flags) threw an exception: " + k.message);
+ }
+ return d;
+}
+function wc(a, b, c) {
+ if (null === a.fd) {
+ throw new J(9);
+ }
+ if (!a.seekable || !a.g.K) {
+ throw new J(29);
+ }
+ if (0 != c && 1 != c && 2 != c) {
+ throw new J(22);
+ }
+ a.position = a.g.K(a, b, c);
+ a.eb = [];
+ return a.position;
+}
+function xc() {
+ J || (J = function(a, b) {
+ this.node = b;
+ this.Xa = function(a) {
+ this.i = a;
+ for (var b in Ub) {
+ if (Ub[b] === a) {
+ this.code = b;
+ break;
+ }
+ }
+ };
+ this.Xa(a);
+ this.message = Tb[a];
+ this.stack && Object.defineProperty(this, "stack", {value:Error().stack, writable:!0});
+ this.stack && (this.stack = tb(this.stack));
+ }, J.prototype = Error(), J.prototype.constructor = J, [2].forEach(function(a) {
+ Qb[a] = new J(a);
+ Qb[a].stack = "";
+ }));
+}
+var yc;
+function zc(a, b) {
+ var c = 0;
+ a && (c |= 365);
+ b && (c |= 146);
+ return c;
+}
+function Ac(a, b, c) {
+ a = Fb("/dev", a);
+ var d = zc(!!b, !!c);
+ Bc || (Bc = 64);
+ var f = Bc++ << 8 | 0;
+ Jb(f, {open:function(a) {
+ a.seekable = !1;
+ }, close:function() {
+ c && c.buffer && c.buffer.length && c(10);
+ }, read:function(a, c, d, f) {
+ for (var g = 0, h = 0; h < f; h++) {
+ try {
+ var k = b();
+ } catch (C) {
+ throw new J(5);
+ }
+ if (void 0 === k && 0 === g) {
+ throw new J(11);
+ }
+ if (null === k || void 0 === k) {
+ break;
+ }
+ g++;
+ c[d + h] = k;
+ }
+ g && (a.node.timestamp = Date.now());
+ return g;
+ }, write:function(a, b, d, f) {
+ for (var g = 0; g < f; g++) {
+ try {
+ c(b[d + g]);
+ } catch (v) {
+ throw new J(5);
+ }
+ }
+ f && (a.node.timestamp = Date.now());
+ return g;
+ }});
+ sc(a, d, f);
+}
+var Bc, P = {}, hc, oc, vc, Cc = {}, Q = 0;
+function R() {
+ Q += 4;
+ return r[Q - 4 >> 2];
+}
+function Dc() {
+ var a = Xb[R()];
+ if (!a) {
+ throw new J(9);
+ }
+ return a;
+}
+function Ec(a, b) {
+ if (-1 === a || 0 === b) {
+ return -22;
+ }
+ var c = Cc[a];
+ if (!c) {
+ return 0;
+ }
+ if (b === c.Ad) {
+ var d = Xb[c.fd], f = c.flags, g = new Uint8Array(y.subarray(a, a + b));
+ d && d.g.ga && d.g.ga(d, g, 0, b, f);
+ Cc[a] = null;
+ c.Ea && S(c.Bd);
+ }
+ return 0;
+}
+function Fc(a) {
+ switch(a) {
+ case 1:
+ return 0;
+ case 2:
+ return 1;
+ case 4:
+ return 2;
+ case 8:
+ return 3;
+ default:
+ throw new TypeError("Unknown type size: " + a);
+ }
+}
+function Gc() {
+ for (var a = Array(256), b = 0; 256 > b; ++b) {
+ a[b] = String.fromCharCode(b);
+ }
+ Hc = a;
+}
+var Hc = void 0;
+function T(a) {
+ for (var b = ""; y[a];) {
+ b += Hc[y[a++]];
+ }
+ return b;
+}
+var Ic = {}, Jc = {}, Kc = {};
+function Lc(a) {
+ if (void 0 === a) {
+ return "_unknown";
+ }
+ a = a.replace(/[^a-zA-Z0-9_]/g, "$");
+ var b = a.charCodeAt(0);
+ return 48 <= b && 57 >= b ? "_" + a : a;
+}
+function Mc(a, b) {
+ a = Lc(a);
+ return (new Function("body", "return function " + a + '() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b);
+}
+function Nc(a, b) {
+ var c = Mc(b, function(a) {
+ this.name = b;
+ this.message = a;
+ a = Error(a).stack;
+ void 0 !== a && (this.stack = this.toString() + "\n" + a.replace(/^Error(:[^\n]*)?\n/, ""));
+ });
+ c.prototype = Object.create(a.prototype);
+ c.prototype.constructor = c;
+ c.prototype.toString = function() {
+ return void 0 === this.message ? this.name : this.name + ": " + this.message;
+ };
+ return c;
+}
+var Oc = void 0;
+function U(a) {
+ throw new Oc(a);
+}
+var Pc = void 0;
+function Qc(a) {
+ throw new Pc(a);
+}
+function V(a, b, c) {
+ function d(b) {
+ b = c(b);
+ b.length !== a.length && Qc("Mismatched type converter count");
+ for (var d = 0; d < a.length; ++d) {
+ Rc(a[d], b[d]);
+ }
+ }
+ a.forEach(function(a) {
+ Kc[a] = b;
+ });
+ var f = Array(b.length), g = [], h = 0;
+ b.forEach(function(a, b) {
+ Jc.hasOwnProperty(a) ? f[b] = Jc[a] : (g.push(a), Ic.hasOwnProperty(a) || (Ic[a] = []), Ic[a].push(function() {
+ f[b] = Jc[a];
+ ++h;
+ h === g.length && d(f);
+ }));
+ });
+ 0 === g.length && d(f);
+}
+function Rc(a, b, c) {
+ c = c || {};
+ if (!("argPackAdvance" in b)) {
+ throw new TypeError("registerType registeredInstance requires argPackAdvance");
+ }
+ var d = b.name;
+ a || U('type "' + d + '" must have a positive integer typeid pointer');
+ if (Jc.hasOwnProperty(a)) {
+ if (c.La) {
+ return;
+ }
+ U("Cannot register type '" + d + "' twice");
+ }
+ Jc[a] = b;
+ delete Kc[a];
+ Ic.hasOwnProperty(a) && (b = Ic[a], delete Ic[a], b.forEach(function(a) {
+ a();
+ }));
+}
+function Sc(a) {
+ if (!(this instanceof Tc && a instanceof Tc)) {
+ return !1;
+ }
+ var b = this.b.m.h, c = this.b.j, d = a.b.m.h;
+ for (a = a.b.j; b.F;) {
+ c = b.aa(c), b = b.F;
+ }
+ for (; d.F;) {
+ a = d.aa(a), d = d.F;
+ }
+ return b === d && c === a;
+}
+function Uc(a) {
+ return {count:a.count, R:a.R, Z:a.Z, j:a.j, m:a.m, B:a.B, D:a.D};
+}
+function Vc(a) {
+ U(a.b.m.h.name + " instance already deleted");
+}
+var Wc = !1;
+function Xc() {
+}
+function Yc(a) {
+ a.B ? a.D.O(a.B) : a.m.h.O(a.j);
+}
+function Zc(a) {
+ --a.count.value;
+ 0 === a.count.value && Yc(a);
+}
+function $c(a) {
+ if ("undefined" === typeof FinalizationGroup) {
+ return $c = function(a) {
+ return a;
+ }, a;
+ }
+ Wc = new FinalizationGroup(function(a) {
+ for (var b = a.next(); !b.done; b = a.next()) {
+ b = b.value, b.j ? Zc(b) : console.warn("object already deleted: " + b.j);
+ }
+ });
+ $c = function(a) {
+ Wc.register(a, a.b, a.b);
+ return a;
+ };
+ Xc = function(a) {
+ Wc.unregister(a.b);
+ };
+ return $c(a);
+}
+function ad() {
+ this.b.j || Vc(this);
+ if (this.b.Z) {
+ return this.b.count.value += 1, this;
+ }
+ var a = $c(Object.create(Object.getPrototypeOf(this), {b:{value:Uc(this.b)}}));
+ a.b.count.value += 1;
+ a.b.R = !1;
+ return a;
+}
+function bd() {
+ this.b.j || Vc(this);
+ this.b.R && !this.b.Z && U("Object already scheduled for deletion");
+ Xc(this);
+ Zc(this.b);
+ this.b.Z || (this.b.B = void 0, this.b.j = void 0);
+}
+function cd() {
+ return !this.b.j;
+}
+var dd = void 0, ed = [];
+function fd() {
+ for (; ed.length;) {
+ var a = ed.pop();
+ a.b.R = !1;
+ a["delete"]();
+ }
+}
+function gd() {
+ this.b.j || Vc(this);
+ this.b.R && !this.b.Z && U("Object already scheduled for deletion");
+ ed.push(this);
+ 1 === ed.length && dd && dd(fd);
+ this.b.R = !0;
+ return this;
+}
+function hd() {
+ Tc.prototype.isAliasOf = Sc;
+ Tc.prototype.clone = ad;
+ Tc.prototype["delete"] = bd;
+ Tc.prototype.isDeleted = cd;
+ Tc.prototype.deleteLater = gd;
+}
+function Tc() {
+}
+var id = {};
+function jd(a, b, c) {
+ if (void 0 === a[b].o) {
+ var d = a[b];
+ a[b] = function() {
+ a[b].o.hasOwnProperty(arguments.length) || U("Function '" + c + "' called with an invalid number of arguments (" + arguments.length + ") - expects one of (" + a[b].o + ")!");
+ return a[b].o[arguments.length].apply(this, arguments);
+ };
+ a[b].o = [];
+ a[b].o[d.P] = d;
+ }
+}
+function kd(a, b, c) {
+ e.hasOwnProperty(a) ? ((void 0 === c || void 0 !== e[a].o && void 0 !== e[a].o[c]) && U("Cannot register public name '" + a + "' twice"), jd(e, a, a), e.hasOwnProperty(c) && U("Cannot register multiple overloads of a function with the same number of arguments (" + c + ")!"), e[a].o[c] = b) : (e[a] = b, void 0 !== c && (e[a].Cd = c));
+}
+function ld(a, b, c, d, f, g, h, k) {
+ this.name = a;
+ this.constructor = b;
+ this.J = c;
+ this.O = d;
+ this.F = f;
+ this.Ja = g;
+ this.aa = h;
+ this.Ha = k;
+ this.Ta = [];
+}
+function md(a, b, c) {
+ for (; b !== c;) {
+ b.aa || U("Expected null or instance of " + c.name + ", got an instance of " + b.name), a = b.aa(a), b = b.F;
+ }
+ return a;
+}
+function nd(a, b) {
+ if (null === b) {
+ return this.la && U("null is not a valid " + this.name), 0;
+ }
+ b.b || U('Cannot pass "' + od(b) + '" as a ' + this.name);
+ b.b.j || U("Cannot pass deleted object as a pointer of type " + this.name);
+ return md(b.b.j, b.b.m.h, this.h);
+}
+function pd(a, b) {
+ if (null === b) {
+ this.la && U("null is not a valid " + this.name);
+ if (this.ea) {
+ var c = this.Ua();
+ null !== a && a.push(this.O, c);
+ return c;
+ }
+ return 0;
+ }
+ b.b || U('Cannot pass "' + od(b) + '" as a ' + this.name);
+ b.b.j || U("Cannot pass deleted object as a pointer of type " + this.name);
+ !this.da && b.b.m.da && U("Cannot convert argument of type " + (b.b.D ? b.b.D.name : b.b.m.name) + " to parameter type " + this.name);
+ c = md(b.b.j, b.b.m.h, this.h);
+ if (this.ea) {
+ switch(void 0 === b.b.B && U("Passing raw pointer to smart pointer is illegal"), this.Ya) {
+ case 0:
+ b.b.D === this ? c = b.b.B : U("Cannot convert argument of type " + (b.b.D ? b.b.D.name : b.b.m.name) + " to parameter type " + this.name);
+ break;
+ case 1:
+ c = b.b.B;
+ break;
+ case 2:
+ if (b.b.D === this) {
+ c = b.b.B;
+ } else {
+ var d = b.clone();
+ c = this.Va(c, qd(function() {
+ d["delete"]();
+ }));
+ null !== a && a.push(this.O, c);
+ }
+ break;
+ default:
+ U("Unsupporting sharing policy");
+ }
+ }
+ return c;
+}
+function rd(a, b) {
+ if (null === b) {
+ return this.la && U("null is not a valid " + this.name), 0;
+ }
+ b.b || U('Cannot pass "' + od(b) + '" as a ' + this.name);
+ b.b.j || U("Cannot pass deleted object as a pointer of type " + this.name);
+ b.b.m.da && U("Cannot convert argument of type " + b.b.m.name + " to parameter type " + this.name);
+ return md(b.b.j, b.b.m.h, this.h);
+}
+function sd(a) {
+ return this.fromWireType(A[a >> 2]);
+}
+function td(a) {
+ this.Da && (a = this.Da(a));
+ return a;
+}
+function ud(a) {
+ this.O && this.O(a);
+}
+function vd(a) {
+ if (null !== a) {
+ a["delete"]();
+ }
+}
+function wd(a, b, c) {
+ if (b === c) {
+ return a;
+ }
+ if (void 0 === c.F) {
+ return null;
+ }
+ a = wd(a, b, c.F);
+ return null === a ? null : c.Ha(a);
+}
+function xd() {
+ return Object.keys(yd).length;
+}
+function zd() {
+ var a = [], b;
+ for (b in yd) {
+ yd.hasOwnProperty(b) && a.push(yd[b]);
+ }
+ return a;
+}
+function Ad(a) {
+ dd = a;
+ ed.length && dd && dd(fd);
+}
+function Bd() {
+ e.getInheritedInstanceCount = xd;
+ e.getLiveInheritedInstances = zd;
+ e.flushPendingDeletes = fd;
+ e.setDelayFunction = Ad;
+}
+var yd = {};
+function Cd(a, b) {
+ for (void 0 === b && U("ptr should not be undefined"); a.F;) {
+ b = a.aa(b), a = a.F;
+ }
+ return b;
+}
+function Dd(a, b) {
+ b = Cd(a, b);
+ return yd[b];
+}
+function Ed(a, b) {
+ b.m && b.j || Qc("makeClassHandle requires ptr and ptrType");
+ !!b.D !== !!b.B && Qc("Both smartPtrType and smartPtr must be specified");
+ b.count = {value:1};
+ return $c(Object.create(a, {b:{value:b}}));
+}
+function Fd(a) {
+ function b() {
+ return this.ea ? Ed(this.h.J, {m:this.Sa, j:c, D:this, B:a}) : Ed(this.h.J, {m:this, j:a});
+ }
+ var c = this.Ka(a);
+ if (!c) {
+ return this.ta(a), null;
+ }
+ var d = Dd(this.h, c);
+ if (void 0 !== d) {
+ if (0 === d.b.count.value) {
+ return d.b.j = c, d.b.B = a, d.clone();
+ }
+ d = d.clone();
+ this.ta(a);
+ return d;
+ }
+ d = this.h.Ja(c);
+ d = id[d];
+ if (!d) {
+ return b.call(this);
+ }
+ d = this.da ? d.Ga : d.pointerType;
+ var f = wd(c, this.h, d.h);
+ return null === f ? b.call(this) : this.ea ? Ed(d.h.J, {m:d, j:f, D:this, B:a}) : Ed(d.h.J, {m:d, j:f});
+}
+function Gd() {
+ Hd.prototype.Ka = td;
+ Hd.prototype.ta = ud;
+ Hd.prototype.argPackAdvance = 8;
+ Hd.prototype.readValueFromPointer = sd;
+ Hd.prototype.deleteObject = vd;
+ Hd.prototype.fromWireType = Fd;
+}
+function Hd(a, b, c, d, f, g, h, k, u, q, v) {
+ this.name = a;
+ this.h = b;
+ this.la = c;
+ this.da = d;
+ this.ea = f;
+ this.Sa = g;
+ this.Ya = h;
+ this.Da = k;
+ this.Ua = u;
+ this.Va = q;
+ this.O = v;
+ f || void 0 !== b.F ? this.toWireType = pd : (this.toWireType = d ? nd : rd, this.H = null);
+}
+function Id(a, b, c) {
+ e.hasOwnProperty(a) || Qc("Replacing nonexistant public symbol");
+ void 0 !== e[a].o && void 0 !== c ? e[a].o[c] = b : (e[a] = b, e[a].P = c);
+}
+function Jd(a, b) {
+ a = T(a);
+ if (void 0 !== e["FUNCTION_TABLE_" + a]) {
+ var c = e["FUNCTION_TABLE_" + a][b];
+ } else {
+ if ("undefined" !== typeof FUNCTION_TABLE) {
+ c = FUNCTION_TABLE[b];
+ } else {
+ c = e["dynCall_" + a];
+ void 0 === c && (c = e["dynCall_" + a.replace(/f/g, "d")], void 0 === c && U("No dynCall invoker for signature: " + a));
+ for (var d = [], f = 1; f < a.length; ++f) {
+ d.push("a" + f);
+ }
+ f = "return function " + ("dynCall_" + a + "_" + b) + "(" + d.join(", ") + ") {\n";
+ f += " return dynCall(rawFunction" + (d.length ? ", " : "") + d.join(", ") + ");\n";
+ c = (new Function("dynCall", "rawFunction", f + "};\n"))(c, b);
+ }
+ }
+ "function" !== typeof c && U("unknown function pointer with signature " + a + ": " + b);
+ return c;
+}
+var Kd = void 0;
+function Ld(a) {
+ a = Md(a);
+ var b = T(a);
+ S(a);
+ return b;
+}
+function Nd(a, b) {
+ function c(a) {
+ f[a] || Jc[a] || (Kc[a] ? Kc[a].forEach(c) : (d.push(a), f[a] = !0));
+ }
+ var d = [], f = {};
+ b.forEach(c);
+ throw new Kd(a + ": " + d.map(Ld).join([", "]));
+}
+function Od(a, b) {
+ if (!(a instanceof Function)) {
+ throw new TypeError("new_ called with constructor type " + typeof a + " which is not a function");
+ }
+ var c = Mc(a.name || "unknownFunctionName", function() {
+ });
+ c.prototype = a.prototype;
+ c = new c;
+ a = a.apply(c, b);
+ return a instanceof Object ? a : c;
+}
+function Pd(a) {
+ for (; a.length;) {
+ var b = a.pop();
+ a.pop()(b);
+ }
+}
+function Qd(a, b, c, d, f) {
+ var g = b.length;
+ 2 > g && U("argTypes array size mismatch! Must at least get return value and 'this' types!");
+ var h = null !== b[1] && null !== c, k = !1;
+ for (c = 1; c < b.length; ++c) {
+ if (null !== b[c] && void 0 === b[c].H) {
+ k = !0;
+ break;
+ }
+ }
+ var u = "void" !== b[0].name, q = "", v = "";
+ for (c = 0; c < g - 2; ++c) {
+ q += (0 !== c ? ", " : "") + "arg" + c, v += (0 !== c ? ", " : "") + "arg" + c + "Wired";
+ }
+ a = "return function " + Lc(a) + "(" + q + ") {\nif (arguments.length !== " + (g - 2) + ") {\nthrowBindingError('function " + a + " called with ' + arguments.length + ' arguments, expected " + (g - 2) + " args!');\n}\n";
+ k && (a += "var destructors = [];\n");
+ var x = k ? "destructors" : "null";
+ q = "throwBindingError invoker fn runDestructors retType classParam".split(" ");
+ d = [U, d, f, Pd, b[0], b[1]];
+ h && (a += "var thisWired = classParam.toWireType(" + x + ", this);\n");
+ for (c = 0; c < g - 2; ++c) {
+ a += "var arg" + c + "Wired = argType" + c + ".toWireType(" + x + ", arg" + c + "); // " + b[c + 2].name + "\n", q.push("argType" + c), d.push(b[c + 2]);
+ }
+ h && (v = "thisWired" + (0 < v.length ? ", " : "") + v);
+ a += (u ? "var rv = " : "") + "invoker(fn" + (0 < v.length ? ", " : "") + v + ");\n";
+ if (k) {
+ a += "runDestructors(destructors);\n";
+ } else {
+ for (c = h ? 1 : 2; c < b.length; ++c) {
+ g = 1 === c ? "thisWired" : "arg" + (c - 2) + "Wired", null !== b[c].H && (a += g + "_dtor(" + g + "); // " + b[c].name + "\n", q.push(g + "_dtor"), d.push(b[c].H));
+ }
+ }
+ u && (a += "var ret = retType.fromWireType(rv);\nreturn ret;\n");
+ q.push(a + "}\n");
+ return Od(Function, q).apply(null, d);
+}
+function Rd(a, b) {
+ for (var c = [], d = 0; d < a; d++) {
+ c.push(r[(b >> 2) + d]);
+ }
+ return c;
+}
+function Sd(a, b, c) {
+ a instanceof Object || U(c + ' with invalid "this": ' + a);
+ a instanceof b.h.constructor || U(c + ' incompatible with "this" of type ' + a.constructor.name);
+ a.b.j || U("cannot call emscripten binding method " + c + " on deleted object");
+ return md(a.b.j, a.b.m.h, b.h);
+}
+var Td = [], W = [{}, {value:void 0}, {value:null}, {value:!0}, {value:!1}];
+function Ud(a) {
+ 4 < a && 0 === --W[a].pa && (W[a] = void 0, Td.push(a));
+}
+function Vd() {
+ for (var a = 0, b = 5; b < W.length; ++b) {
+ void 0 !== W[b] && ++a;
+ }
+ return a;
+}
+function Wd() {
+ for (var a = 5; a < W.length; ++a) {
+ if (void 0 !== W[a]) {
+ return W[a];
+ }
+ }
+ return null;
+}
+function Xd() {
+ e.count_emval_handles = Vd;
+ e.get_first_emval = Wd;
+}
+function qd(a) {
+ switch(a) {
+ case void 0:
+ return 1;
+ case null:
+ return 2;
+ case !0:
+ return 3;
+ case !1:
+ return 4;
+ default:
+ var b = Td.length ? Td.pop() : W.length;
+ W[b] = {pa:1, value:a};
+ return b;
+ }
+}
+function od(a) {
+ if (null === a) {
+ return "null";
+ }
+ var b = typeof a;
+ return "object" === b || "array" === b || "function" === b ? a.toString() : "" + a;
+}
+function Yd(a, b) {
+ switch(b) {
+ case 2:
+ return function(a) {
+ return this.fromWireType(Na[a >> 2]);
+ };
+ case 3:
+ return function(a) {
+ return this.fromWireType(Oa[a >> 3]);
+ };
+ default:
+ throw new TypeError("Unknown float type: " + a);
+ }
+}
+function Zd(a, b, c) {
+ switch(b) {
+ case 0:
+ return c ? function(a) {
+ return t[a];
+ } : function(a) {
+ return y[a];
+ };
+ case 1:
+ return c ? function(a) {
+ return La[a >> 1];
+ } : function(a) {
+ return Ma[a >> 1];
+ };
+ case 2:
+ return c ? function(a) {
+ return r[a >> 2];
+ } : function(a) {
+ return A[a >> 2];
+ };
+ default:
+ throw new TypeError("Unknown integer type: " + a);
+ }
+}
+function $d(a, b) {
+ var c = Jc[a];
+ void 0 === c && U(b + " has unknown type " + Ld(a));
+ return c;
+}
+function ae() {
+ void 0 === ae.start && (ae.start = Date.now());
+ return 1E3 * (Date.now() - ae.start) | 0;
+}
+function ua() {
+ return t.length;
+}
+function be(a) {
+ return 0 > a || 0 === a && -Infinity === 1 / a;
+}
+function ce(a, b) {
+ function c(a) {
+ var b = d;
+ "double" === a || "i64" === a ? b & 7 && (assert(4 === (b & 7)), b += 4) : assert(0 === (b & 3));
+ d = b;
+ "double" === a ? (a = Oa[d >> 3], d += 8) : "i64" == a ? (a = [r[d >> 2], r[d + 4 >> 2]], d += 8) : (assert(0 === (d & 3)), a = r[d >> 2], d += 4);
+ return a;
+ }
+ assert(0 === (b & 3));
+ for (var d = b, f = [], g, h;;) {
+ var k = a;
+ g = t[a >> 0];
+ if (0 === g) {
+ break;
+ }
+ h = t[a + 1 >> 0];
+ if (37 == g) {
+ var u = !1, q = b = !1, v = !1, x = !1;
+ a: for (;;) {
+ switch(h) {
+ case 43:
+ u = !0;
+ break;
+ case 45:
+ b = !0;
+ break;
+ case 35:
+ q = !0;
+ break;
+ case 48:
+ if (v) {
+ break a;
+ } else {
+ v = !0;
+ break;
+ }
+ case 32:
+ x = !0;
+ break;
+ default:
+ break a;
+ }
+ a++;
+ h = t[a + 1 >> 0];
+ }
+ var C = 0;
+ if (42 == h) {
+ C = c("i32"), a++, h = t[a + 1 >> 0];
+ } else {
+ for (; 48 <= h && 57 >= h;) {
+ C = 10 * C + (h - 48), a++, h = t[a + 1 >> 0];
+ }
+ }
+ var D = !1, B = -1;
+ if (46 == h) {
+ B = 0;
+ D = !0;
+ a++;
+ h = t[a + 1 >> 0];
+ if (42 == h) {
+ B = c("i32"), a++;
+ } else {
+ for (;;) {
+ h = t[a + 1 >> 0];
+ if (48 > h || 57 < h) {
+ break;
+ }
+ B = 10 * B + (h - 48);
+ a++;
+ }
+ }
+ h = t[a + 1 >> 0];
+ }
+ 0 > B && (B = 6, D = !1);
+ switch(String.fromCharCode(h)) {
+ case "h":
+ h = t[a + 2 >> 0];
+ if (104 == h) {
+ a++;
+ var E = 1;
+ } else {
+ E = 2;
+ }
+ break;
+ case "l":
+ h = t[a + 2 >> 0];
+ 108 == h ? (a++, E = 8) : E = 4;
+ break;
+ case "L":
+ case "q":
+ case "j":
+ E = 8;
+ break;
+ case "z":
+ case "t":
+ case "I":
+ E = 4;
+ break;
+ default:
+ E = null;
+ }
+ E && a++;
+ h = t[a + 1 >> 0];
+ switch(String.fromCharCode(h)) {
+ case "d":
+ case "i":
+ case "u":
+ case "o":
+ case "x":
+ case "X":
+ case "p":
+ k = 100 == h || 105 == h;
+ E = E || 4;
+ g = c("i" + 8 * E);
+ 8 == E && (g = xa(g[0], g[1], 117 == h));
+ 4 >= E && (g = (k ? $a : Za)(g & Math.pow(256, E) - 1, 8 * E));
+ var na = Math.abs(g);
+ k = "";
+ if (100 == h || 105 == h) {
+ var w = $a(g, 8 * E, 1).toString(10);
+ } else {
+ if (117 == h) {
+ w = Za(g, 8 * E, 1).toString(10), g = Math.abs(g);
+ } else {
+ if (111 == h) {
+ w = (q ? "0" : "") + na.toString(8);
+ } else {
+ if (120 == h || 88 == h) {
+ k = q && 0 != g ? "0x" : "";
+ if (0 > g) {
+ g = -g;
+ w = (na - 1).toString(16);
+ na = [];
+ for (q = 0; q < w.length; q++) {
+ na.push((15 - parseInt(w[q], 16)).toString(16));
+ }
+ for (w = na.join(""); w.length < 2 * E;) {
+ w = "f" + w;
+ }
+ } else {
+ w = na.toString(16);
+ }
+ 88 == h && (k = k.toUpperCase(), w = w.toUpperCase());
+ } else {
+ 112 == h && (0 === na ? w = "(nil)" : (k = "0x", w = na.toString(16)));
+ }
+ }
+ }
+ }
+ if (D) {
+ for (; w.length < B;) {
+ w = "0" + w;
+ }
+ }
+ 0 <= g && (u ? k = "+" + k : x && (k = " " + k));
+ "-" == w.charAt(0) && (k = "-" + k, w = w.substr(1));
+ for (; k.length + w.length < C;) {
+ b ? w += " " : v ? w = "0" + w : k = " " + k;
+ }
+ w = k + w;
+ w.split("").forEach(function(a) {
+ f.push(a.charCodeAt(0));
+ });
+ break;
+ case "f":
+ case "F":
+ case "e":
+ case "E":
+ case "g":
+ case "G":
+ g = c("double");
+ if (isNaN(g)) {
+ w = "nan", v = !1;
+ } else {
+ if (isFinite(g)) {
+ D = !1;
+ E = Math.min(B, 20);
+ if (103 == h || 71 == h) {
+ D = !0, B = B || 1, E = parseInt(g.toExponential(E).split("e")[1], 10), B > E && -4 <= E ? (h = (103 == h ? "f" : "F").charCodeAt(0), B -= E + 1) : (h = (103 == h ? "e" : "E").charCodeAt(0), B--), E = Math.min(B, 20);
+ }
+ if (101 == h || 69 == h) {
+ w = g.toExponential(E), /[eE][-+]\d$/.test(w) && (w = w.slice(0, -1) + "0" + w.slice(-1));
+ } else {
+ if (102 == h || 70 == h) {
+ w = g.toFixed(E), 0 === g && be(g) && (w = "-" + w);
+ }
+ }
+ k = w.split("e");
+ if (D && !q) {
+ for (; 1 < k[0].length && -1 != k[0].indexOf(".") && ("0" == k[0].slice(-1) || "." == k[0].slice(-1));) {
+ k[0] = k[0].slice(0, -1);
+ }
+ } else {
+ for (q && -1 == w.indexOf(".") && (k[0] += "."); B > E++;) {
+ k[0] += "0";
+ }
+ }
+ w = k[0] + (1 < k.length ? "e" + k[1] : "");
+ 69 == h && (w = w.toUpperCase());
+ 0 <= g && (u ? w = "+" + w : x && (w = " " + w));
+ } else {
+ w = (0 > g ? "-" : "") + "inf", v = !1;
+ }
+ }
+ for (; w.length < C;) {
+ b ? w += " " : !v || "-" != w[0] && "+" != w[0] ? w = (v ? "0" : " ") + w : w = w[0] + "0" + w.slice(1);
+ }
+ 97 > h && (w = w.toUpperCase());
+ w.split("").forEach(function(a) {
+ f.push(a.charCodeAt(0));
+ });
+ break;
+ case "s":
+ v = (u = c("i8*")) ? de(u) : 6;
+ D && (v = Math.min(v, B));
+ if (!b) {
+ for (; v < C--;) {
+ f.push(32);
+ }
+ }
+ if (u) {
+ for (q = 0; q < v; q++) {
+ f.push(y[u++ >> 0]);
+ }
+ } else {
+ f = f.concat(Lb("(null)".substr(0, v), !0));
+ }
+ if (b) {
+ for (; v < C--;) {
+ f.push(32);
+ }
+ }
+ break;
+ case "c":
+ for (b && f.push(c("i8")); 0 < --C;) {
+ f.push(32);
+ }
+ b || f.push(c("i8"));
+ break;
+ case "n":
+ b = c("i32*");
+ r[b >> 2] = f.length;
+ break;
+ case "%":
+ f.push(g);
+ break;
+ default:
+ for (q = k; q < a + 2; q++) {
+ f.push(t[q >> 0]);
+ }
+ }
+ a += 2;
+ } else {
+ f.push(g), a += 1;
+ }
+ }
+ return f;
+}
+function ee(a) {
+ if (!a || !a.callee || !a.callee.name) {
+ return [null, "", ""];
+ }
+ var b = a.callee.name, c = "(", d = !0, f;
+ for (f in a) {
+ var g = a[f];
+ d || (c += ", ");
+ d = !1;
+ c = "number" === typeof g || "string" === typeof g ? c + g : c + ("(" + typeof g + ")");
+ }
+ c += ")";
+ a = (a = a.callee.caller) ? a.arguments : [];
+ d && (c = "");
+ return [a, b, c];
+}
+function fe(a) {
+ var b = ub();
+ b = b.slice(b.indexOf("\n", Math.max(b.lastIndexOf("_emscripten_log"), b.lastIndexOf("_emscripten_get_callstack"))) + 1);
+ a & 8 && (va('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'), a = a ^ 8 | 16);
+ var c = null;
+ if (a & 128) {
+ for (c = ee(arguments); 0 <= c[1].indexOf("_emscripten_");) {
+ c = ee(c[0]);
+ }
+ }
+ var d = b.split("\n");
+ b = "";
+ var f = /\s*(.*?)@(.*?):([0-9]+):([0-9]+)/, g = /\s*(.*?)@(.*):(.*)(:(.*))?/, h = /\s*at (.*?) \((.*):(.*):(.*)\)/, k;
+ for (k in d) {
+ var u = d[k], q;
+ if ((q = h.exec(u)) && 5 == q.length) {
+ u = q[1];
+ var v = q[2];
+ var x = q[3];
+ q = q[4];
+ } else {
+ if ((q = f.exec(u)) || (q = g.exec(u)), q && 4 <= q.length) {
+ u = q[1], v = q[2], x = q[3], q = q[4] | 0;
+ } else {
+ b += u + "\n";
+ continue;
+ }
+ }
+ var C = a & 32 ? sb(u) : u;
+ C || (C = u);
+ var D = !1;
+ if (a & 8) {
+ var B = (void 0).Dd({line:x, Fa:q});
+ if (D = B && B.source) {
+ a & 64 && (B.source = B.source.substring(B.source.replace(/\\/g, "/").lastIndexOf("/") + 1)), b += " at " + C + " (" + B.source + ":" + B.line + ":" + B.Fa + ")\n";
+ }
+ }
+ if (a & 16 || !D) {
+ a & 64 && (v = v.substring(v.replace(/\\/g, "/").lastIndexOf("/") + 1)), b += (D ? " = " + u : " at " + C) + " (" + v + ":" + x + ":" + q + ")\n";
+ }
+ a & 128 && c[0] && (c[1] == u && 0 < c[2].length && (b = b.replace(/\s+$/, ""), b += " with values: " + c[1] + c[2] + "\n"), c = ee(c[0]));
+ }
+ return b = b.replace(/\s+$/, "");
+}
+function ge(a, b) {
+ a & 24 && (b = b.replace(/\s+$/, ""), b += (0 < b.length ? "\n" : "") + fe(a));
+ a & 1 ? a & 4 ? console.error(b) : a & 2 ? console.warn(b) : console.log(b) : a & 6 ? m(b) : ra(b);
+}
+var he = 0;
+function ie(a, b, c, d) {
+ a |= 0;
+ b |= 0;
+ c |= 0;
+ d |= 0;
+ var f = 0;
+ he = he + 1 | 0;
+ for (r[a >> 2] = he; (f | 0) < (d | 0);) {
+ if (0 == (r[c + (f << 3) >> 2] | 0)) {
+ return r[c + (f << 3) >> 2] = he, r[c + ((f << 3) + 4) >> 2] = b, r[c + ((f << 3) + 8) >> 2] = 0, ya = d | 0, c | 0;
+ }
+ f = f + 1 | 0;
+ }
+ d = 2 * d | 0;
+ c = je(c | 0, 8 * (d + 1 | 0) | 0) | 0;
+ c = ie(a | 0, b | 0, c | 0, d | 0) | 0;
+ ya = d | 0;
+ return c | 0;
+}
+function ke(a, b) {
+ X(a, b || 1);
+ throw "longjmp";
+}
+function le(a, b, c) {
+ y.set(y.subarray(b, b + c), a);
+}
+function Y(a) {
+ a = eval(z(a));
+ if (null == a) {
+ return 0;
+ }
+ var b = Ia(a);
+ if (!Y.s || Y.s < b + 1) {
+ Y.s && S(Y.buffer), Y.s = b + 1, Y.buffer = Da(Y.s);
+ }
+ Ha(a, Y.buffer, Y.s);
+ return Y.buffer;
+}
+function me(a) {
+ if (0 === a) {
+ return 0;
+ }
+ a = z(a);
+ if (!I.hasOwnProperty(a)) {
+ return 0;
+ }
+ me.ka && S(me.ka);
+ a = I[a];
+ var b = Ia(a) + 1, c = Da(b);
+ c && Ga(a, t, c, b);
+ me.ka = c;
+ return me.ka;
+}
+Ha("GMT", 2025088, 4);
+function ne() {
+ function a(a) {
+ return (a = a.toTimeString().match(/\(([A-Za-z ]+)\)$/)) ? a[1] : "GMT";
+ }
+ if (!ne.s) {
+ ne.s = !0;
+ r[oe() >> 2] = 60 * (new Date).getTimezoneOffset();
+ var b = new Date(2000, 0, 1), c = new Date(2000, 6, 1);
+ r[pe() >> 2] = Number(b.getTimezoneOffset() != c.getTimezoneOffset());
+ var d = a(b), f = a(c);
+ d = Ca(Lb(d));
+ f = Ca(Lb(f));
+ c.getTimezoneOffset() < b.getTimezoneOffset() ? (r[qe() >> 2] = d, r[qe() + 4 >> 2] = f) : (r[qe() >> 2] = f, r[qe() + 4 >> 2] = d);
+ }
+}
+function re(a, b) {
+ ne();
+ a = new Date(1000 * r[a >> 2]);
+ r[b >> 2] = a.getSeconds();
+ r[b + 4 >> 2] = a.getMinutes();
+ r[b + 8 >> 2] = a.getHours();
+ r[b + 12 >> 2] = a.getDate();
+ r[b + 16 >> 2] = a.getMonth();
+ r[b + 20 >> 2] = a.getFullYear() - 1900;
+ r[b + 24 >> 2] = a.getDay();
+ var c = new Date(a.getFullYear(), 0, 1);
+ r[b + 28 >> 2] = (a.getTime() - c.getTime()) / 864E5 | 0;
+ r[b + 36 >> 2] = -(60 * a.getTimezoneOffset());
+ var d = (new Date(2000, 6, 1)).getTimezoneOffset();
+ c = c.getTimezoneOffset();
+ a = (d != c && a.getTimezoneOffset() == Math.min(c, d)) | 0;
+ r[b + 32 >> 2] = a;
+ a = r[qe() + (a ? 4 : 0) >> 2];
+ r[b + 40 >> 2] = a;
+ return b;
+}
+function se(a) {
+ a = Ka(a);
+ var b = buffer.byteLength;
+ try {
+ return -1 !== Aa.grow((a - b) / 65536) ? (buffer = Aa.buffer, !0) : !1;
+ } catch (c) {
+ return console.error("emscripten_realloc_buffer: Attempted to grow from " + b + " bytes to " + a + " bytes, but got error: " + c), !1;
+ }
+}
+function te(a) {
+ var b = ua();
+ assert(a > b);
+ if (2147418112 < a) {
+ return m("Cannot enlarge memory, asked to go up to " + a + " bytes, but the limit is 2147418112 bytes!"), !1;
+ }
+ for (var c = Math.max(b, 16777216); c < a;) {
+ 536870912 >= c ? c = Ka(2 * c) : c = Math.min(Ka((3 * c + 2147483648) / 4), 2147418112), c === b && va("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only " + t.length);
+ }
+ if (!se(c)) {
+ return m("Failed to grow the heap from " + b + " bytes to " + c + " bytes, not enough memory!"), !1;
+ }
+ Pa();
+ return !0;
+}
+function ue(a) {
+ return 0 === a % 4 && (0 !== a % 100 || 0 === a % 400);
+}
+function ve(a, b) {
+ for (var c = 0, d = 0; d <= b; c += a[d++]) {
+ }
+ return c;
+}
+var we = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], xe = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
+function ye(a, b) {
+ for (a = new Date(a.getTime()); 0 < b;) {
+ var c = a.getMonth(), d = (ue(a.getFullYear()) ? we : xe)[c];
+ if (b > d - a.getDate()) {
+ b -= d - a.getDate() + 1, a.setDate(1), 11 > c ? a.setMonth(c + 1) : (a.setMonth(0), a.setFullYear(a.getFullYear() + 1));
+ } else {
+ a.setDate(a.getDate() + b);
+ break;
+ }
+ }
+ return a;
+}
+function ze(a, b, c, d) {
+ function f(a, b, c) {
+ for (a = "number" === typeof a ? a.toString() : a || ""; a.length < b;) {
+ a = c[0] + a;
+ }
+ return a;
+ }
+ function g(a, b) {
+ return f(a, b, "0");
+ }
+ function h(a, b) {
+ function c(a) {
+ return 0 > a ? -1 : 0 < a ? 1 : 0;
+ }
+ var d;
+ 0 === (d = c(a.getFullYear() - b.getFullYear())) && 0 === (d = c(a.getMonth() - b.getMonth())) && (d = c(a.getDate() - b.getDate()));
+ return d;
+ }
+ function k(a) {
+ switch(a.getDay()) {
+ case 0:
+ return new Date(a.getFullYear() - 1, 11, 29);
+ case 1:
+ return a;
+ case 2:
+ return new Date(a.getFullYear(), 0, 3);
+ case 3:
+ return new Date(a.getFullYear(), 0, 2);
+ case 4:
+ return new Date(a.getFullYear(), 0, 1);
+ case 5:
+ return new Date(a.getFullYear() - 1, 11, 31);
+ case 6:
+ return new Date(a.getFullYear() - 1, 11, 30);
+ }
+ }
+ function u(a) {
+ a = ye(new Date(a.u + 1900, 0, 1), a.ja);
+ var b = k(new Date(a.getFullYear() + 1, 0, 4));
+ return 0 >= h(k(new Date(a.getFullYear(), 0, 4)), a) ? 0 >= h(b, a) ? a.getFullYear() + 1 : a.getFullYear() : a.getFullYear() - 1;
+ }
+ var q = r[d + 40 >> 2];
+ d = {bb:r[d >> 2], ab:r[d + 4 >> 2], ha:r[d + 8 >> 2], $:r[d + 12 >> 2], V:r[d + 16 >> 2], u:r[d + 20 >> 2], ia:r[d + 24 >> 2], ja:r[d + 28 >> 2], Ed:r[d + 32 >> 2], $a:r[d + 36 >> 2], cb:q ? z(q) : ""};
+ c = z(c);
+ q = {"%c":"%a %b %d %H:%M:%S %Y", "%D":"%m/%d/%y", "%F":"%Y-%m-%d", "%h":"%b", "%r":"%I:%M:%S %p", "%R":"%H:%M", "%T":"%H:%M:%S", "%x":"%m/%d/%y", "%X":"%H:%M:%S", "%Ec":"%c", "%EC":"%C", "%Ex":"%m/%d/%y", "%EX":"%H:%M:%S", "%Ey":"%y", "%EY":"%Y", "%Od":"%d", "%Oe":"%e", "%OH":"%H", "%OI":"%I", "%Om":"%m", "%OM":"%M", "%OS":"%S", "%Ou":"%u", "%OU":"%U", "%OV":"%V", "%Ow":"%w", "%OW":"%W", "%Oy":"%y"};
+ for (var v in q) {
+ c = c.replace(new RegExp(v, "g"), q[v]);
+ }
+ var x = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), C = "January February March April May June July August September October November December".split(" ");
+ q = {"%a":function(a) {
+ return x[a.ia].substring(0, 3);
+ }, "%A":function(a) {
+ return x[a.ia];
+ }, "%b":function(a) {
+ return C[a.V].substring(0, 3);
+ }, "%B":function(a) {
+ return C[a.V];
+ }, "%C":function(a) {
+ return g((a.u + 1900) / 100 | 0, 2);
+ }, "%d":function(a) {
+ return g(a.$, 2);
+ }, "%e":function(a) {
+ return f(a.$, 2, " ");
+ }, "%g":function(a) {
+ return u(a).toString().substring(2);
+ }, "%G":function(a) {
+ return u(a);
+ }, "%H":function(a) {
+ return g(a.ha, 2);
+ }, "%I":function(a) {
+ a = a.ha;
+ 0 == a ? a = 12 : 12 < a && (a -= 12);
+ return g(a, 2);
+ }, "%j":function(a) {
+ return g(a.$ + ve(ue(a.u + 1900) ? we : xe, a.V - 1), 3);
+ }, "%m":function(a) {
+ return g(a.V + 1, 2);
+ }, "%M":function(a) {
+ return g(a.ab, 2);
+ }, "%n":function() {
+ return "\n";
+ }, "%p":function(a) {
+ return 0 <= a.ha && 12 > a.ha ? "AM" : "PM";
+ }, "%S":function(a) {
+ return g(a.bb, 2);
+ }, "%t":function() {
+ return "\t";
+ }, "%u":function(a) {
+ return a.ia || 7;
+ }, "%U":function(a) {
+ var b = new Date(a.u + 1900, 0, 1), c = 0 === b.getDay() ? b : ye(b, 7 - b.getDay());
+ a = new Date(a.u + 1900, a.V, a.$);
+ return 0 > h(c, a) ? g(Math.ceil((31 - c.getDate() + (ve(ue(a.getFullYear()) ? we : xe, a.getMonth() - 1) - 31) + a.getDate()) / 7), 2) : 0 === h(c, b) ? "01" : "00";
+ }, "%V":function(a) {
+ var b = k(new Date(a.u + 1900, 0, 4)), c = k(new Date(a.u + 1901, 0, 4)), d = ye(new Date(a.u + 1900, 0, 1), a.ja);
+ return 0 > h(d, b) ? "53" : 0 >= h(c, d) ? "01" : g(Math.ceil((b.getFullYear() < a.u + 1900 ? a.ja + 32 - b.getDate() : a.ja + 1 - b.getDate()) / 7), 2);
+ }, "%w":function(a) {
+ return a.ia;
+ }, "%W":function(a) {
+ var b = new Date(a.u, 0, 1), c = 1 === b.getDay() ? b : ye(b, 0 === b.getDay() ? 1 : 7 - b.getDay() + 1);
+ a = new Date(a.u + 1900, a.V, a.$);
+ return 0 > h(c, a) ? g(Math.ceil((31 - c.getDate() + (ve(ue(a.getFullYear()) ? we : xe, a.getMonth() - 1) - 31) + a.getDate()) / 7), 2) : 0 === h(c, b) ? "01" : "00";
+ }, "%y":function(a) {
+ return (a.u + 1900).toString().substring(2);
+ }, "%Y":function(a) {
+ return a.u + 1900;
+ }, "%z":function(a) {
+ a = a.$a;
+ var b = 0 <= a;
+ a = Math.abs(a) / 60;
+ return (b ? "+" : "-") + String("0000" + (a / 60 * 100 + a % 60)).slice(-4);
+ }, "%Z":function(a) {
+ return a.cb;
+ }, "%%":function() {
+ return "%";
+ }};
+ for (v in q) {
+ 0 <= c.indexOf(v) && (c = c.replace(new RegExp(v, "g"), q[v](d)));
+ }
+ v = Lb(c, !1);
+ if (v.length > b) {
+ return 0;
+ }
+ Ja(v, a);
+ return v.length - 1;
+}
+xc();
+Zb = Array(4096);
+pc(K, "/");
+rc("/tmp");
+rc("/home");
+rc("/home/web_user");
+(function() {
+ rc("/dev");
+ Jb(259, {read:function() {
+ return 0;
+ }, write:function(a, b, c, h) {
+ return h;
+ }});
+ sc("/dev/null", 259);
+ Ib(1280, Mb);
+ Ib(1536, Nb);
+ sc("/dev/tty", 1280);
+ sc("/dev/tty1", 1536);
+ if ("object" === typeof crypto && "function" === typeof crypto.getRandomValues) {
+ var a = new Uint8Array(1);
+ var b = function() {
+ crypto.getRandomValues(a);
+ return a[0];
+ };
+ } else {
+ if (ha) {
+ try {
+ var c = require("crypto");
+ b = function() {
+ return c.randomBytes(1)[0];
+ };
+ } catch (d) {
+ }
+ }
+ }
+ b || (b = function() {
+ l("no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };");
+ });
+ Ac("random", b);
+ Ac("urandom", b);
+ rc("/dev/shm");
+ rc("/dev/shm/tmp");
+})();
+rc("/proc");
+rc("/proc/self");
+rc("/proc/self/fd");
+pc({v:function() {
+ var a = Pb("/proc/self", "fd", 16895, 73);
+ a.f = {lookup:function(a, c) {
+ var b = Xb[+c];
+ if (!b) {
+ throw new J(9);
+ }
+ a = {parent:null, v:{Ca:"fake"}, f:{readlink:function() {
+ return b.path;
+ }}};
+ return a.parent = a;
+ }};
+ return a;
+}}, "/proc/self/fd");
+if (ia) {
+ var fs = require("fs"), Sb = require("path");
+ M.Za();
+}
+Gc();
+Oc = e.BindingError = Nc(Error, "BindingError");
+Pc = e.InternalError = Nc(Error, "InternalError");
+hd();
+Gd();
+Bd();
+Kd = e.UnboundTypeError = Nc(Error, "UnboundTypeError");
+Xd();
+function Lb(a, b) {
+ var c = Array(Ia(a) + 1);
+ a = Ga(a, c, 0, c.length);
+ b && (c.length = a);
+ return c;
+}
+var Z = e.asm({}, {ClassHandle:Tc, ClassHandle_clone:ad, ClassHandle_delete:bd, ClassHandle_deleteLater:gd, ClassHandle_isAliasOf:Sc, ClassHandle_isDeleted:cd, DYNAMICTOP_PTR:ta, RegisteredClass:ld, RegisteredPointer:Hd, RegisteredPointer_deleteObject:vd, RegisteredPointer_destructor:ud, RegisteredPointer_fromWireType:Fd, RegisteredPointer_getPointee:td, _ZSt18uncaught_exceptionv:yb, __assert_fail:function(a, b, c, d) {
+ l("Assertion failed: " + z(a) + ", at: " + [b ? z(b) : "unknown filename", c, d ? z(d) : "unknown function"]);
+}, __buildEnvironment:wb, __cxa_atexit:function() {
+ return xb.apply(null, arguments);
+}, __cxa_pure_virtual:function() {
+ Ba = !0;
+ throw "Pure virtual function called!";
+}, __cxa_uncaught_exceptions:function() {
+ return yb.s;
+}, __lock:function() {
+}, __map_file:function() {
+ zb(1);
+ return -1;
+}, __setErrNo:zb, __syscall10:function(a, b) {
+ Q = b;
+ try {
+ var c = z(R()), d = O(c, {parent:!0}).node, f = Db(c), g = Rb(d, f), h = lc(d, f, !1);
+ if (h) {
+ throw new J(h);
+ }
+ if (!d.f.unlink) {
+ throw new J(1);
+ }
+ if (g.S) {
+ throw new J(16);
+ }
+ try {
+ N.willDeletePath && N.willDeletePath(c);
+ } catch (k) {
+ console.log("FS.trackingDelegate['willDeletePath']('" + c + "') threw an exception: " + k.message);
+ }
+ d.f.unlink(d, f);
+ ec(g);
+ try {
+ if (N.onDeletePath) {
+ N.onDeletePath(c);
+ }
+ } catch (k) {
+ console.log("FS.trackingDelegate['onDeletePath']('" + c + "') threw an exception: " + k.message);
+ }
+ return 0;
+ } catch (k) {
+ return "undefined" !== typeof P && k instanceof J || l(k), -k.i;
+ }
+}, __syscall140:function(a, b) {
+ Q = b;
+ try {
+ var c = Dc(), d = R(), f = R(), g = R(), h = R();
+ a = 4294967296 * d + (f >>> 0);
+ if (-9007199254740992 >= a || 9007199254740992 <= a) {
+ return -75;
+ }
+ wc(c, a, h);
+ qb = [c.position >>> 0, (H = c.position, 1.0 <= +ab(H) ? 0.0 < H ? (eb(+db(H / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+cb((H - +(~~H >>> 0)) / 4294967296.0) >>> 0 : 0)];
+ r[g >> 2] = qb[0];
+ r[g + 4 >> 2] = qb[1];
+ c.N && 0 === a && 0 === h && (c.N = null);
+ return 0;
+ } catch (k) {
+ return "undefined" !== typeof P && k instanceof J || l(k), -k.i;
+ }
+}, __syscall145:function(a, b) {
+ Q = b;
+ try {
+ var c = Dc(), d = R();
+ a: {
+ var f = R();
+ for (b = a = 0; b < f; b++) {
+ var g = r[d + (8 * b + 4) >> 2], h = c, k = r[d + 8 * b >> 2], u = g, q = void 0, v = t;
+ if (0 > u || 0 > q) {
+ throw new J(22);
+ }
+ if (null === h.fd) {
+ throw new J(9);
+ }
+ if (1 === (h.flags & 2097155)) {
+ throw new J(9);
+ }
+ if (L(h.node.mode)) {
+ throw new J(21);
+ }
+ if (!h.g.read) {
+ throw new J(22);
+ }
+ var x = "undefined" !== typeof q;
+ if (!x) {
+ q = h.position;
+ } else {
+ if (!h.seekable) {
+ throw new J(29);
+ }
+ }
+ var C = h.g.read(h, v, k, u, q);
+ x || (h.position += C);
+ var D = C;
+ if (0 > D) {
+ var B = -1;
+ break a;
+ }
+ a += D;
+ if (D < g) {
+ break;
+ }
+ }
+ B = a;
+ }
+ return B;
+ } catch (E) {
+ return "undefined" !== typeof P && E instanceof J || l(E), -E.i;
+ }
+}, __syscall146:function(a, b) {
+ Q = b;
+ try {
+ var c = Dc(), d = R();
+ a: {
+ var f = R();
+ for (b = a = 0; b < f; b++) {
+ var g = c, h = r[d + 8 * b >> 2], k = r[d + (8 * b + 4) >> 2], u = void 0, q = t;
+ if (0 > k || 0 > u) {
+ throw new J(22);
+ }
+ if (null === g.fd) {
+ throw new J(9);
+ }
+ if (0 === (g.flags & 2097155)) {
+ throw new J(9);
+ }
+ if (L(g.node.mode)) {
+ throw new J(21);
+ }
+ if (!g.g.write) {
+ throw new J(22);
+ }
+ g.flags & 1024 && wc(g, 0, 2);
+ var v = "undefined" !== typeof u;
+ if (!v) {
+ u = g.position;
+ } else {
+ if (!g.seekable) {
+ throw new J(29);
+ }
+ }
+ var x = g.g.write(g, q, h, k, u, void 0);
+ v || (g.position += x);
+ try {
+ if (g.path && N.onWriteToFile) {
+ N.onWriteToFile(g.path);
+ }
+ } catch (B) {
+ console.log("FS.trackingDelegate['onWriteToFile']('" + g.path + "') threw an exception: " + B.message);
+ }
+ var C = x;
+ if (0 > C) {
+ var D = -1;
+ break a;
+ }
+ a += C;
+ }
+ D = a;
+ }
+ return D;
+ } catch (B) {
+ return "undefined" !== typeof P && B instanceof J || l(B), -B.i;
+ }
+}, __syscall220:function(a, b) {
+ Q = b;
+ try {
+ var c = Dc(), d = R(), f = R();
+ if (!c.N) {
+ var g = O(c.path, {W:!0}).node;
+ if (!g.f.readdir) {
+ throw new J(20);
+ }
+ var h = g.f.readdir(g);
+ c.N = h;
+ }
+ a = 0;
+ for (var k = wc(c, 0, 1), u = Math.floor(k / 280); u < c.N.length && a + 280 <= f;) {
+ var q = c.N[u];
+ if ("." === q[0]) {
+ var v = 1;
+ var x = 4;
+ } else {
+ var C = Rb(c.node, q);
+ v = C.id;
+ x = 8192 === (C.mode & 61440) ? 2 : L(C.mode) ? 4 : 40960 === (C.mode & 61440) ? 10 : 8;
+ }
+ qb = [v >>> 0, (H = v, 1.0 <= +ab(H) ? 0.0 < H ? (eb(+db(H / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+cb((H - +(~~H >>> 0)) / 4294967296.0) >>> 0 : 0)];
+ r[d + a >> 2] = qb[0];
+ r[d + a + 4 >> 2] = qb[1];
+ qb = [280 * (u + 1) >>> 0, (H = 280 * (u + 1), 1.0 <= +ab(H) ? 0.0 < H ? (eb(+db(H / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+cb((H - +(~~H >>> 0)) / 4294967296.0) >>> 0 : 0)];
+ r[d + a + 8 >> 2] = qb[0];
+ r[d + a + 12 >> 2] = qb[1];
+ La[d + a + 16 >> 1] = 280;
+ t[d + a + 18 >> 0] = x;
+ Ha(q, d + a + 19, 256);
+ a += 280;
+ u += 1;
+ }
+ wc(c, 280 * u, 0);
+ return a;
+ } catch (D) {
+ return "undefined" !== typeof P && D instanceof J || l(D), -D.i;
+ }
+}, __syscall221:function(a, b) {
+ Q = b;
+ try {
+ var c = Dc();
+ switch(R()) {
+ case 0:
+ var d = R();
+ return 0 > d ? -22 : uc(c.path, c.flags, 0, d).fd;
+ case 1:
+ case 2:
+ return 0;
+ case 3:
+ return c.flags;
+ case 4:
+ return d = R(), c.flags |= d, 0;
+ case 12:
+ return d = R(), La[d + 0 >> 1] = 2, 0;
+ case 13:
+ case 14:
+ return 0;
+ case 16:
+ case 8:
+ return -22;
+ case 9:
+ return zb(22), -1;
+ default:
+ return -22;
+ }
+ } catch (f) {
+ return "undefined" !== typeof P && f instanceof J || l(f), -f.i;
+ }
+}, __syscall40:function(a, b) {
+ Q = b;
+ try {
+ var c = z(R()), d = O(c, {parent:!0}).node, f = Db(c), g = Rb(d, f), h = lc(d, f, !0);
+ if (h) {
+ throw new J(h);
+ }
+ if (!d.f.rmdir) {
+ throw new J(1);
+ }
+ if (g.S) {
+ throw new J(16);
+ }
+ try {
+ N.willDeletePath && N.willDeletePath(c);
+ } catch (k) {
+ console.log("FS.trackingDelegate['willDeletePath']('" + c + "') threw an exception: " + k.message);
+ }
+ d.f.rmdir(d, f);
+ ec(g);
+ try {
+ if (N.onDeletePath) {
+ N.onDeletePath(c);
+ }
+ } catch (k) {
+ console.log("FS.trackingDelegate['onDeletePath']('" + c + "') threw an exception: " + k.message);
+ }
+ return 0;
+ } catch (k) {
+ return "undefined" !== typeof P && k instanceof J || l(k), -k.i;
+ }
+}, __syscall5:function(a, b) {
+ Q = b;
+ try {
+ var c = z(R()), d = R(), f = R();
+ return uc(c, d, f).fd;
+ } catch (g) {
+ return "undefined" !== typeof P && g instanceof J || l(g), -g.i;
+ }
+}, __syscall54:function(a, b) {
+ Q = b;
+ try {
+ var c = Dc(), d = R();
+ switch(d) {
+ case 21509:
+ case 21505:
+ return c.tty ? 0 : -25;
+ case 21510:
+ case 21511:
+ case 21512:
+ case 21506:
+ case 21507:
+ case 21508:
+ return c.tty ? 0 : -25;
+ case 21519:
+ if (!c.tty) {
+ return -25;
+ }
+ var f = R();
+ return r[f >> 2] = 0;
+ case 21520:
+ return c.tty ? -22 : -25;
+ case 21531:
+ a = f = R();
+ if (!c.g.Ma) {
+ throw new J(25);
+ }
+ return c.g.Ma(c, d, a);
+ case 21523:
+ return c.tty ? 0 : -25;
+ case 21524:
+ return c.tty ? 0 : -25;
+ default:
+ l("bad ioctl syscall " + d);
+ }
+ } catch (g) {
+ return "undefined" !== typeof P && g instanceof J || l(g), -g.i;
+ }
+}, __syscall6:function(a, b) {
+ Q = b;
+ try {
+ var c = Dc();
+ if (null === c.fd) {
+ throw new J(9);
+ }
+ c.N && (c.N = null);
+ try {
+ c.g.close && c.g.close(c);
+ } catch (d) {
+ throw d;
+ } finally {
+ Xb[c.fd] = null;
+ }
+ c.fd = null;
+ return 0;
+ } catch (d) {
+ return "undefined" !== typeof P && d instanceof J || l(d), -d.i;
+ }
+}, __syscall85:function(a, b) {
+ Q = b;
+ try {
+ var c = z(R()), d = R();
+ var f = R();
+ if (0 >= f) {
+ var g = -22;
+ } else {
+ var h = ac(c), k = Math.min(f, Ia(h)), u = t[d + k];
+ Ha(h, d, f + 1);
+ t[d + k] = u;
+ g = k;
+ }
+ return g;
+ } catch (q) {
+ return "undefined" !== typeof P && q instanceof J || l(q), -q.i;
+ }
+}, __syscall91:function(a, b) {
+ Q = b;
+ try {
+ var c = R(), d = R();
+ return Ec(c, d);
+ } catch (f) {
+ return "undefined" !== typeof P && f instanceof J || l(f), -f.i;
+ }
+}, __unlock:function() {
+}, _addDays:ye, _arraySum:ve, _embind_register_bool:function(a, b, c, d, f) {
+ var g = Fc(c);
+ b = T(b);
+ Rc(a, {name:b, fromWireType:function(a) {
+ return !!a;
+ }, toWireType:function(a, b) {
+ return b ? d : f;
+ }, argPackAdvance:8, readValueFromPointer:function(a) {
+ if (1 === c) {
+ var d = t;
+ } else {
+ if (2 === c) {
+ d = La;
+ } else {
+ if (4 === c) {
+ d = r;
+ } else {
+ throw new TypeError("Unknown boolean type size: " + b);
+ }
+ }
+ }
+ return this.fromWireType(d[a >> g]);
+ }, H:null});
+}, _embind_register_class:function(a, b, c, d, f, g, h, k, u, q, v, x, C) {
+ v = T(v);
+ g = Jd(f, g);
+ k && (k = Jd(h, k));
+ q && (q = Jd(u, q));
+ C = Jd(x, C);
+ var D = Lc(v);
+ kd(D, function() {
+ Nd("Cannot construct " + v + " due to unbound types", [d]);
+ });
+ V([a, b, c], d ? [d] : [], function(b) {
+ b = b[0];
+ if (d) {
+ var c = b.h;
+ var f = c.J;
+ } else {
+ f = Tc.prototype;
+ }
+ b = Mc(D, function() {
+ if (Object.getPrototypeOf(this) !== h) {
+ throw new Oc("Use 'new' to construct " + v);
+ }
+ if (void 0 === u.M) {
+ throw new Oc(v + " has no accessible constructor");
+ }
+ var a = u.M[arguments.length];
+ if (void 0 === a) {
+ throw new Oc("Tried to invoke ctor of " + v + " with invalid number of parameters (" + arguments.length + ") - expected (" + Object.keys(u.M).toString() + ") parameters instead!");
+ }
+ return a.apply(this, arguments);
+ });
+ var h = Object.create(f, {constructor:{value:b}});
+ b.prototype = h;
+ var u = new ld(v, b, h, C, c, g, k, q);
+ c = new Hd(v, u, !0, !1, !1);
+ f = new Hd(v + "*", u, !1, !1, !1);
+ var x = new Hd(v + " const*", u, !1, !0, !1);
+ id[a] = {pointerType:f, Ga:x};
+ Id(D, b);
+ return [c, f, x];
+ });
+}, _embind_register_class_class_function:function(a, b, c, d, f, g, h) {
+ var k = Rd(c, d);
+ b = T(b);
+ g = Jd(f, g);
+ V([], [a], function(a) {
+ function d() {
+ Nd("Cannot call " + f + " due to unbound types", k);
+ }
+ a = a[0];
+ var f = a.name + "." + b, u = a.h.constructor;
+ void 0 === u[b] ? (d.P = c - 1, u[b] = d) : (jd(u, b, f), u[b].o[c - 1] = d);
+ V([], k, function(a) {
+ a = [a[0], null].concat(a.slice(1));
+ a = Qd(f, a, null, g, h);
+ void 0 === u[b].o ? (a.P = c - 1, u[b] = a) : u[b].o[c - 1] = a;
+ return [];
+ });
+ return [];
+ });
+}, _embind_register_class_constructor:function(a, b, c, d, f, g) {
+ var h = Rd(b, c);
+ f = Jd(d, f);
+ V([], [a], function(a) {
+ a = a[0];
+ var c = "constructor " + a.name;
+ void 0 === a.h.M && (a.h.M = []);
+ if (void 0 !== a.h.M[b - 1]) {
+ throw new Oc("Cannot register multiple constructors with identical number of parameters (" + (b - 1) + ") for class '" + a.name + "'! Overload resolution is currently only performed using the parameter count, not actual type info!");
+ }
+ a.h.M[b - 1] = function() {
+ Nd("Cannot construct " + a.name + " due to unbound types", h);
+ };
+ V([], h, function(d) {
+ a.h.M[b - 1] = function() {
+ arguments.length !== b - 1 && U(c + " called with " + arguments.length + " arguments, expected " + (b - 1));
+ var a = [], h = Array(b);
+ h[0] = g;
+ for (var k = 1; k < b; ++k) {
+ h[k] = d[k].toWireType(a, arguments[k - 1]);
+ }
+ h = f.apply(null, h);
+ Pd(a);
+ return d[0].fromWireType(h);
+ };
+ return [];
+ });
+ return [];
+ });
+}, _embind_register_class_function:function(a, b, c, d, f, g, h, k) {
+ var u = Rd(c, d);
+ b = T(b);
+ g = Jd(f, g);
+ V([], [a], function(a) {
+ function d() {
+ Nd("Cannot call " + f + " due to unbound types", u);
+ }
+ a = a[0];
+ var f = a.name + "." + b;
+ k && a.h.Ta.push(b);
+ var q = a.h.J, D = q[b];
+ void 0 === D || void 0 === D.o && D.className !== a.name && D.P === c - 2 ? (d.P = c - 2, d.className = a.name, q[b] = d) : (jd(q, b, f), q[b].o[c - 2] = d);
+ V([], u, function(d) {
+ d = Qd(f, d, a, g, h);
+ void 0 === q[b].o ? (d.P = c - 2, q[b] = d) : q[b].o[c - 2] = d;
+ return [];
+ });
+ return [];
+ });
+}, _embind_register_class_property:function(a, b, c, d, f, g, h, k, u, q) {
+ b = T(b);
+ f = Jd(d, f);
+ V([], [a], function(a) {
+ a = a[0];
+ var d = a.name + "." + b, v = {get:function() {
+ Nd("Cannot access " + d + " due to unbound types", [c, h]);
+ }, enumerable:!0, configurable:!0};
+ u ? v.set = function() {
+ Nd("Cannot access " + d + " due to unbound types", [c, h]);
+ } : v.set = function() {
+ U(d + " is a read-only property");
+ };
+ Object.defineProperty(a.h.J, b, v);
+ V([], u ? [c, h] : [c], function(c) {
+ var h = c[0], v = {get:function() {
+ var b = Sd(this, a, d + " getter");
+ return h.fromWireType(f(g, b));
+ }, enumerable:!0};
+ if (u) {
+ u = Jd(k, u);
+ var x = c[1];
+ v.set = function(b) {
+ var c = Sd(this, a, d + " setter"), f = [];
+ u(q, c, x.toWireType(f, b));
+ Pd(f);
+ };
+ }
+ Object.defineProperty(a.h.J, b, v);
+ return [];
+ });
+ return [];
+ });
+}, _embind_register_emval:function(a, b) {
+ b = T(b);
+ Rc(a, {name:b, fromWireType:function(a) {
+ var b = W[a].value;
+ Ud(a);
+ return b;
+ }, toWireType:function(a, b) {
+ return qd(b);
+ }, argPackAdvance:8, readValueFromPointer:sd, H:null});
+}, _embind_register_float:function(a, b, c) {
+ c = Fc(c);
+ b = T(b);
+ Rc(a, {name:b, fromWireType:function(a) {
+ return a;
+ }, toWireType:function(a, b) {
+ if ("number" !== typeof b && "boolean" !== typeof b) {
+ throw new TypeError('Cannot convert "' + od(b) + '" to ' + this.name);
+ }
+ return b;
+ }, argPackAdvance:8, readValueFromPointer:Yd(b, c), H:null});
+}, _embind_register_integer:function(a, b, c, d, f) {
+ function g(a) {
+ return a;
+ }
+ b = T(b);
+ -1 === f && (f = 4294967295);
+ var h = Fc(c);
+ if (0 === d) {
+ var k = 32 - 8 * c;
+ g = function(a) {
+ return a << k >>> k;
+ };
+ }
+ var u = -1 != b.indexOf("unsigned");
+ Rc(a, {name:b, fromWireType:g, toWireType:function(a, c) {
+ if ("number" !== typeof c && "boolean" !== typeof c) {
+ throw new TypeError('Cannot convert "' + od(c) + '" to ' + this.name);
+ }
+ if (c < d || c > f) {
+ throw new TypeError('Passing a number "' + od(c) + '" from JS side to C/C++ side to an argument of type "' + b + '", which is outside the valid range [' + d + ", " + f + "]!");
+ }
+ return u ? c >>> 0 : c | 0;
+ }, argPackAdvance:8, readValueFromPointer:Zd(b, h, 0 !== d), H:null});
+}, _embind_register_memory_view:function(a, b, c) {
+ function d(a) {
+ a >>= 2;
+ var b = A;
+ return new f(b.buffer, b[a + 1], b[a]);
+ }
+ var f = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array][b];
+ c = T(c);
+ Rc(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d}, {La:!0});
+}, _embind_register_std_string:function(a, b) {
+ b = T(b);
+ var c = "std::string" === b;
+ Rc(a, {name:b, fromWireType:function(a) {
+ var b = A[a >> 2];
+ if (c) {
+ var d = y[a + 4 + b], h = 0;
+ 0 != d && (h = d, y[a + 4 + b] = 0);
+ var k = a + 4;
+ for (d = 0; d <= b; ++d) {
+ var u = a + 4 + d;
+ if (0 == y[u]) {
+ k = z(k);
+ if (void 0 === q) {
+ var q = k;
+ } else {
+ q += String.fromCharCode(0), q += k;
+ }
+ k = u + 1;
+ }
+ }
+ 0 != h && (y[a + 4 + b] = h);
+ } else {
+ q = Array(b);
+ for (d = 0; d < b; ++d) {
+ q[d] = String.fromCharCode(y[a + 4 + d]);
+ }
+ q = q.join("");
+ }
+ S(a);
+ return q;
+ }, toWireType:function(a, b) {
+ b instanceof ArrayBuffer && (b = new Uint8Array(b));
+ var d = "string" === typeof b;
+ d || b instanceof Uint8Array || b instanceof Uint8ClampedArray || b instanceof Int8Array || U("Cannot pass non-string to std::string");
+ var f = (c && d ? function() {
+ return Ia(b);
+ } : function() {
+ return b.length;
+ })(), k = Da(4 + f + 1);
+ A[k >> 2] = f;
+ if (c && d) {
+ Ha(b, k + 4, f + 1);
+ } else {
+ if (d) {
+ for (d = 0; d < f; ++d) {
+ var u = b.charCodeAt(d);
+ 255 < u && (S(k), U("String has UTF-16 code units that do not fit in 8 bits"));
+ y[k + 4 + d] = u;
+ }
+ } else {
+ for (d = 0; d < f; ++d) {
+ y[k + 4 + d] = b[d];
+ }
+ }
+ }
+ null !== a && a.push(S, k);
+ return k;
+ }, argPackAdvance:8, readValueFromPointer:sd, H:function(a) {
+ S(a);
+ }});
+}, _embind_register_std_wstring:function(a, b, c) {
+ c = T(c);
+ if (2 === b) {
+ var d = function() {
+ return Ma;
+ };
+ var f = 1;
+ } else {
+ 4 === b && (d = function() {
+ return A;
+ }, f = 2);
+ }
+ Rc(a, {name:c, fromWireType:function(a) {
+ for (var b = d(), c = A[a >> 2], g = Array(c), q = a + 4 >> f, v = 0; v < c; ++v) {
+ g[v] = String.fromCharCode(b[q + v]);
+ }
+ S(a);
+ return g.join("");
+ }, toWireType:function(a, c) {
+ var g = d(), h = c.length, q = Da(4 + h * b);
+ A[q >> 2] = h;
+ for (var v = q + 4 >> f, x = 0; x < h; ++x) {
+ g[v + x] = c.charCodeAt(x);
+ }
+ null !== a && a.push(S, q);
+ return q;
+ }, argPackAdvance:8, readValueFromPointer:sd, H:function(a) {
+ S(a);
+ }});
+}, _embind_register_void:function(a, b) {
+ b = T(b);
+ Rc(a, {zd:!0, name:b, argPackAdvance:0, fromWireType:function() {
+ }, toWireType:function() {
+ }});
+}, _emscripten_syscall_munmap:Ec, _emscripten_traverse_stack:ee, _emval_decref:Ud, _emval_incref:function(a) {
+ 4 < a && (W[a].pa += 1);
+}, _emval_register:qd, _emval_take_value:function(a, b) {
+ a = $d(a, "_emval_take_value");
+ a = a.readValueFromPointer(b);
+ return qd(a);
+}, _formatString:ce, _isLeapYear:ue, _reallyNegative:be, abort:function() {
+ e.abort();
+}, atexit:xb, attachFinalizer:$c, clock:ae, constNoSmartPtrRawPointerToWireType:nd, count_emval_handles:Vd, craftInvokerFunction:Qd, createNamedFunction:Mc, demangle:sb, demangleAll:tb, detachFinalizer:Xc, downcastPointer:wd, embind__requireFunction:Jd, embind_init_charCodes:Gc, embind_repr:od, emscripten_get_callstack_js:fe, emscripten_get_heap_size:ua, emscripten_log:function(a, b) {
+ var c = r[b >> 2];
+ b += 4;
+ var d = "";
+ if (c) {
+ for (b = ce(c, b), c = 0; c < b.length; ++c) {
+ d += String.fromCharCode(b[c]);
+ }
+ }
+ ge(a, d);
+}, emscripten_log_js:ge, emscripten_longjmp:function(a, b) {
+ ke(a, b);
+}, emscripten_memcpy_big:le, emscripten_realloc_buffer:se, emscripten_resize_heap:te, emscripten_run_script:function(a) {
+ eval(z(a));
+}, emscripten_run_script_int:function(a) {
+ return eval(z(a)) | 0;
+}, emscripten_run_script_string:Y, ensureOverloadTable:jd, exit:function(a) {
+ Ae();
+ if (e.noExitRuntime) {
+ m("exit(" + a + ") called, but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)");
+ } else {
+ if (Ba = !0, Ra(), G = !0, e.onExit) {
+ e.onExit(a);
+ }
+ }
+ da(a, new qa(a));
+}, exposePublicSymbol:kd, extendError:Nc, fabs:ab, fabsf:ab, floatReadValueFromPointer:Yd, floor:db, flushPendingDeletes:fd, genericPointerToWireType:pd, getBasestPointer:Cd, getInheritedInstance:Dd, getInheritedInstanceCount:xd, getLiveInheritedInstances:zd, getShiftFromSize:Fc, getTempRet0:function() {
+ return ya | 0;
+}, getTypeName:Ld, get_first_emval:Wd, getenv:me, heap32VectorToArray:Rd, init_ClassHandle:hd, init_RegisteredPointer:Gd, init_embind:Bd, init_emval:Xd, integerReadValueFromPointer:Zd, invoke_ii:Be, invoke_iii:Ce, invoke_iiii:De, invoke_iiiii:Ee, invoke_iiiiii:Fe, invoke_iiiiiii:Ge, invoke_iiiiiiii:He, invoke_iiiiiiiiii:Ie, invoke_vi:Je, invoke_vii:Ke, invoke_viii:Le, invoke_viiii:Me, invoke_viiiii:Ne, invoke_viiiiii:Oe, invoke_viiiiiiiii:Pe, jsStackTrace:ub, localtime:function(a) {
+ return re(a, 2025040);
+}, localtime_r:re, longjmp:ke, makeClassHandle:Ed, makeLegalFunctionName:Lc, memcpy:function(a, b, c) {
+ a |= 0;
+ b |= 0;
+ c |= 0;
+ var d;
+ if (8192 <= (c | 0)) {
+ return le(a | 0, b | 0, c | 0) | 0, a | 0;
+ }
+ var f = a | 0;
+ var g = a + c | 0;
+ if ((a & 3) == (b & 3)) {
+ for (; a & 3;) {
+ if (0 == (c | 0)) {
+ return f | 0;
+ }
+ t[a >> 0] = t[b >> 0] | 0;
+ a = a + 1 | 0;
+ b = b + 1 | 0;
+ c = c - 1 | 0;
+ }
+ c = g & -4 | 0;
+ for (d = c - 64 | 0; (a | 0) <= (d | 0);) {
+ r[a >> 2] = r[b >> 2] | 0, r[a + 4 >> 2] = r[b + 4 >> 2] | 0, r[a + 8 >> 2] = r[b + 8 >> 2] | 0, r[a + 12 >> 2] = r[b + 12 >> 2] | 0, r[a + 16 >> 2] = r[b + 16 >> 2] | 0, r[a + 20 >> 2] = r[b + 20 >> 2] | 0, r[a + 24 >> 2] = r[b + 24 >> 2] | 0, r[a + 28 >> 2] = r[b + 28 >> 2] | 0, r[a + 32 >> 2] = r[b + 32 >> 2] | 0, r[a + 36 >> 2] = r[b + 36 >> 2] | 0, r[a + 40 >> 2] = r[b + 40 >> 2] | 0, r[a + 44 >> 2] = r[b + 44 >> 2] | 0, r[a + 48 >> 2] = r[b + 48 >> 2] | 0, r[a + 52 >> 2] = r[b + 52 >>
+ 2] | 0, r[a + 56 >> 2] = r[b + 56 >> 2] | 0, r[a + 60 >> 2] = r[b + 60 >> 2] | 0, a = a + 64 | 0, b = b + 64 | 0;
+ }
+ for (; (a | 0) < (c | 0);) {
+ r[a >> 2] = r[b >> 2] | 0, a = a + 4 | 0, b = b + 4 | 0;
+ }
+ } else {
+ for (c = g - 4 | 0; (a | 0) < (c | 0);) {
+ t[a >> 0] = t[b >> 0] | 0, t[a + 1 >> 0] = t[b + 1 >> 0] | 0, t[a + 2 >> 0] = t[b + 2 >> 0] | 0, t[a + 3 >> 0] = t[b + 3 >> 0] | 0, a = a + 4 | 0, b = b + 4 | 0;
+ }
+ }
+ for (; (a | 0) < (g | 0);) {
+ t[a >> 0] = t[b >> 0] | 0, a = a + 1 | 0, b = b + 1 | 0;
+ }
+ return f | 0;
+}, memset:function(a, b, c) {
+ a |= 0;
+ c |= 0;
+ var d;
+ var f = a + c | 0;
+ b = (b | 0) & 255;
+ if (67 <= (c | 0)) {
+ for (; 0 != (a & 3);) {
+ t[a >> 0] = b, a = a + 1 | 0;
+ }
+ var g = f & -4 | 0;
+ var h = b | b << 8 | b << 16 | b << 24;
+ for (d = g - 64 | 0; (a | 0) <= (d | 0);) {
+ r[a >> 2] = h, r[a + 4 >> 2] = h, r[a + 8 >> 2] = h, r[a + 12 >> 2] = h, r[a + 16 >> 2] = h, r[a + 20 >> 2] = h, r[a + 24 >> 2] = h, r[a + 28 >> 2] = h, r[a + 32 >> 2] = h, r[a + 36 >> 2] = h, r[a + 40 >> 2] = h, r[a + 44 >> 2] = h, r[a + 48 >> 2] = h, r[a + 52 >> 2] = h, r[a + 56 >> 2] = h, r[a + 60 >> 2] = h, a = a + 64 | 0;
+ }
+ for (; (a | 0) < (g | 0);) {
+ r[a >> 2] = h, a = a + 4 | 0;
+ }
+ }
+ for (; (a | 0) < (f | 0);) {
+ t[a >> 0] = b, a = a + 1 | 0;
+ }
+ return f - c | 0;
+}, mktime:function(a) {
+ ne();
+ var b = new Date(r[a + 20 >> 2] + 1900, r[a + 16 >> 2], r[a + 12 >> 2], r[a + 8 >> 2], r[a + 4 >> 2], r[a >> 2], 0), c = r[a + 32 >> 2], d = b.getTimezoneOffset(), f = new Date(b.getFullYear(), 0, 1), g = (new Date(2000, 6, 1)).getTimezoneOffset(), h = f.getTimezoneOffset(), k = Math.min(h, g);
+ 0 > c ? r[a + 32 >> 2] = Number(g != h && k == d) : 0 < c != (k == d) && (g = Math.max(h, g), b.setTime(b.getTime() + 60000 * ((0 < c ? k : g) - d)));
+ r[a + 24 >> 2] = b.getDay();
+ r[a + 28 >> 2] = (b.getTime() - f.getTime()) / 864E5 | 0;
+ return b.getTime() / 1000 | 0;
+}, new_:Od, nonConstNoSmartPtrRawPointerToWireType:rd, pthread_cond_broadcast:function() {
+ return 0;
+}, pthread_cond_destroy:function() {
+ return 0;
+}, pthread_cond_signal:function() {
+ return 0;
+}, pthread_cond_wait:function() {
+ return 0;
+}, pthread_create:function() {
+ return 11;
+}, pthread_join:function() {
+}, pthread_mutexattr_destroy:function() {
+}, pthread_mutexattr_init:function() {
+}, pthread_mutexattr_settype:function() {
+}, pthread_spin_destroy:function() {
+ return 0;
+}, pthread_spin_init:function() {
+ return 0;
+}, pthread_spin_lock:function() {
+ return 0;
+}, pthread_spin_unlock:function() {
+ return 0;
+}, readLatin1String:T, registerType:Rc, releaseClassHandle:Zc, replacePublicSymbol:Id, requireRegisteredType:$d, runDestructor:Yc, runDestructors:Pd, saveSetjmp:ie, sbrk:function(a) {
+ a |= 0;
+ var b = ua() | 0;
+ var c = r[ta >> 2] | 0;
+ var d = c + a | 0;
+ if (0 < (a | 0) & (d | 0) < (c | 0) | 0 > (d | 0) || (d | 0) > (b | 0) && !(te(d | 0) | 0)) {
+ return zb(12), -1;
+ }
+ r[ta >> 2] = d | 0;
+ return c | 0;
+}, setDelayFunction:Ad, setTempRet0:function(a) {
+ ya = a | 0;
+}, shallowCopyInternalPointer:Uc, simpleReadValueFromPointer:sd, sqrt:bb, stackTrace:vb, strftime:ze, strftime_l:function(a, b, c, d) {
+ return ze(a, b, c, d);
+}, testSetjmp:function(a, b, c) {
+ a |= 0;
+ b |= 0;
+ c |= 0;
+ for (var d = 0, f; (d | 0) < (c | 0);) {
+ f = r[b + (d << 3) >> 2] | 0;
+ if (0 == (f | 0)) {
+ break;
+ }
+ if ((f | 0) == (a | 0)) {
+ return r[b + ((d << 3) + 4) >> 2] | 0;
+ }
+ d = d + 1 | 0;
+ }
+ return 0;
+}, throwBindingError:U, throwInstanceAlreadyDeleted:Vc, throwInternalError:Qc, throwUnboundTypeError:Nd, time:function(a) {
+ var b = Date.now() / 1000 | 0;
+ a && (r[a >> 2] = b);
+ return b;
+}, tzset:ne, upcastPointer:md, validateThis:Sd, whenDependentTypesAreResolved:V}, buffer), Qe = Z.__wasm_call_ctors;
+Z.__wasm_call_ctors = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Qe.apply(null, arguments);
+};
+var Re = Z.strlen;
+Z.strlen = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Re.apply(null, arguments);
+};
+var Se = Z.malloc;
+Z.malloc = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Se.apply(null, arguments);
+};
+var Te = Z.free;
+Z.free = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Te.apply(null, arguments);
+};
+var Ue = Z.__errno_location;
+Z.__errno_location = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ue.apply(null, arguments);
+};
+var Ve = Z.fflush;
+Z.fflush = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ve.apply(null, arguments);
+};
+var We = Z.realloc;
+Z.realloc = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return We.apply(null, arguments);
+};
+var Xe = Z._get_tzname;
+Z._get_tzname = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Xe.apply(null, arguments);
+};
+var Ye = Z._get_daylight;
+Z._get_daylight = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ye.apply(null, arguments);
+};
+var Ze = Z._get_timezone;
+Z._get_timezone = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ze.apply(null, arguments);
+};
+var $e = Z._get_environ;
+Z._get_environ = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return $e.apply(null, arguments);
+};
+var af = Z.__getTypeName;
+Z.__getTypeName = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return af.apply(null, arguments);
+};
+var bf = Z.__embind_register_native_and_builtin_types;
+Z.__embind_register_native_and_builtin_types = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return bf.apply(null, arguments);
+};
+var cf = Z.setThrew;
+Z.setThrew = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return cf.apply(null, arguments);
+};
+var df = Z.dynCall_ii;
+Z.dynCall_ii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return df.apply(null, arguments);
+};
+var ef = Z.dynCall_iii;
+Z.dynCall_iii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ef.apply(null, arguments);
+};
+var ff = Z.dynCall_iiii;
+Z.dynCall_iiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ff.apply(null, arguments);
+};
+var gf = Z.dynCall_iiiii;
+Z.dynCall_iiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return gf.apply(null, arguments);
+};
+var hf = Z.dynCall_iiiiii;
+Z.dynCall_iiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return hf.apply(null, arguments);
+};
+var jf = Z.dynCall_iiiiiii;
+Z.dynCall_iiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return jf.apply(null, arguments);
+};
+var kf = Z.dynCall_iiiiiiii;
+Z.dynCall_iiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return kf.apply(null, arguments);
+};
+var lf = Z.dynCall_iiiiiiiiii;
+Z.dynCall_iiiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return lf.apply(null, arguments);
+};
+var mf = Z.dynCall_vi;
+Z.dynCall_vi = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return mf.apply(null, arguments);
+};
+var nf = Z.dynCall_vii;
+Z.dynCall_vii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return nf.apply(null, arguments);
+};
+var of = Z.dynCall_viii;
+Z.dynCall_viii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return of.apply(null, arguments);
+};
+var pf = Z.dynCall_viiii;
+Z.dynCall_viiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return pf.apply(null, arguments);
+};
+var qf = Z.dynCall_viiiii;
+Z.dynCall_viiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return qf.apply(null, arguments);
+};
+var rf = Z.dynCall_viiiiii;
+Z.dynCall_viiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return rf.apply(null, arguments);
+};
+var sf = Z.dynCall_viiiiiiiii;
+Z.dynCall_viiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return sf.apply(null, arguments);
+};
+var tf = Z.stackSave;
+Z.stackSave = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return tf.apply(null, arguments);
+};
+var uf = Z.stackAlloc;
+Z.stackAlloc = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return uf.apply(null, arguments);
+};
+var vf = Z.stackRestore;
+Z.stackRestore = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return vf.apply(null, arguments);
+};
+var wf = Z.__growWasmMemory;
+Z.__growWasmMemory = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return wf.apply(null, arguments);
+};
+var xf = Z.dynCall_viiiiiii;
+Z.dynCall_viiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return xf.apply(null, arguments);
+};
+var yf = Z.dynCall_viiiiiiii;
+Z.dynCall_viiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return yf.apply(null, arguments);
+};
+var zf = Z.dynCall_iiiiiiiii;
+Z.dynCall_iiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return zf.apply(null, arguments);
+};
+var Af = Z.dynCall_viijii;
+Z.dynCall_viijii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Af.apply(null, arguments);
+};
+var Bf = Z.dynCall_v;
+Z.dynCall_v = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Bf.apply(null, arguments);
+};
+var Cf = Z.dynCall_diiid;
+Z.dynCall_diiid = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Cf.apply(null, arguments);
+};
+var Df = Z.dynCall_viij;
+Z.dynCall_viij = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Df.apply(null, arguments);
+};
+var Ef = Z.dynCall_viiiiiiiiiiii;
+Z.dynCall_viiiiiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ef.apply(null, arguments);
+};
+var Ff = Z.dynCall_jiji;
+Z.dynCall_jiji = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ff.apply(null, arguments);
+};
+var Gf = Z.dynCall_ji;
+Z.dynCall_ji = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Gf.apply(null, arguments);
+};
+var Hf = Z.dynCall_iiiiiiiiiiiii;
+Z.dynCall_iiiiiiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Hf.apply(null, arguments);
+};
+var If = Z.dynCall_iiiiiiiiiiii;
+Z.dynCall_iiiiiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return If.apply(null, arguments);
+};
+var Jf = Z.dynCall_viiiiiiiiii;
+Z.dynCall_viiiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Jf.apply(null, arguments);
+};
+var Kf = Z.dynCall_viiiiiiji;
+Z.dynCall_viiiiiiji = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Kf.apply(null, arguments);
+};
+var Lf = Z.dynCall_viiij;
+Z.dynCall_viiij = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Lf.apply(null, arguments);
+};
+var Mf = Z.dynCall_viiiiiijii;
+Z.dynCall_viiiiiijii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Mf.apply(null, arguments);
+};
+var Nf = Z.dynCall_fi;
+Z.dynCall_fi = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Nf.apply(null, arguments);
+};
+var Of = Z.dynCall_vif;
+Z.dynCall_vif = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Of.apply(null, arguments);
+};
+var Pf = Z.dynCall_idd;
+Z.dynCall_idd = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Pf.apply(null, arguments);
+};
+var Qf = Z.dynCall_viffff;
+Z.dynCall_viffff = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Qf.apply(null, arguments);
+};
+var Rf = Z.dynCall_iiiiiiiiiii;
+Z.dynCall_iiiiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Rf.apply(null, arguments);
+};
+var Sf = Z.dynCall_viiifiii;
+Z.dynCall_viiifiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Sf.apply(null, arguments);
+};
+var Tf = Z.dynCall_viiifii;
+Z.dynCall_viiifii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Tf.apply(null, arguments);
+};
+var Uf = Z.dynCall_viiifiiii;
+Z.dynCall_viiifiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Uf.apply(null, arguments);
+};
+var Vf = Z.dynCall_iidiiii;
+Z.dynCall_iidiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Vf.apply(null, arguments);
+};
+var Wf = Z.dynCall_iiiiij;
+Z.dynCall_iiiiij = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Wf.apply(null, arguments);
+};
+var Xf = Z.dynCall_iiiiid;
+Z.dynCall_iiiiid = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Xf.apply(null, arguments);
+};
+var Yf = Z.dynCall_iiiiijj;
+Z.dynCall_iiiiijj = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Yf.apply(null, arguments);
+};
+var Zf = Z.dynCall_iiiiiijj;
+Z.dynCall_iiiiiijj = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Zf.apply(null, arguments);
+};
+e.asm = Z;
+var rb = e.___wasm_call_ctors = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__wasm_call_ctors.apply(null, arguments);
+}, de = e._strlen = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.strlen.apply(null, arguments);
+}, Da = e._malloc = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.malloc.apply(null, arguments);
+}, S = e._free = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.free.apply(null, arguments);
+};
+e.___errno_location = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__errno_location.apply(null, arguments);
+};
+e._fflush = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.fflush.apply(null, arguments);
+};
+var je = e._realloc = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.realloc.apply(null, arguments);
+}, qe = e.__get_tzname = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm._get_tzname.apply(null, arguments);
+}, pe = e.__get_daylight = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm._get_daylight.apply(null, arguments);
+}, oe = e.__get_timezone = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm._get_timezone.apply(null, arguments);
+};
+e.__get_environ = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm._get_environ.apply(null, arguments);
+};
+var Md = e.___getTypeName = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__getTypeName.apply(null, arguments);
+};
+e.___embind_register_native_and_builtin_types = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__embind_register_native_and_builtin_types.apply(null, arguments);
+};
+var X = e._setThrew = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.setThrew.apply(null, arguments);
+}, $f = e.dynCall_ii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_ii.apply(null, arguments);
+}, ag = e.dynCall_iii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iii.apply(null, arguments);
+}, bg = e.dynCall_iiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiii.apply(null, arguments);
+}, cg = e.dynCall_iiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiii.apply(null, arguments);
+}, dg = e.dynCall_iiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiii.apply(null, arguments);
+}, eg = e.dynCall_iiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiii.apply(null, arguments);
+}, fg = e.dynCall_iiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiii.apply(null, arguments);
+}, gg = e.dynCall_iiiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiiii.apply(null, arguments);
+}, hg = e.dynCall_vi = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_vi.apply(null, arguments);
+}, ig = e.dynCall_vii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_vii.apply(null, arguments);
+}, jg = e.dynCall_viii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viii.apply(null, arguments);
+}, kg = e.dynCall_viiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiii.apply(null, arguments);
+}, lg = e.dynCall_viiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiii.apply(null, arguments);
+}, mg = e.dynCall_viiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiii.apply(null, arguments);
+}, ng = e.dynCall_viiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiiii.apply(null, arguments);
+}, n = e.stackSave = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.stackSave.apply(null, arguments);
+};
+e.stackAlloc = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.stackAlloc.apply(null, arguments);
+};
+var p = e.stackRestore = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.stackRestore.apply(null, arguments);
+};
+e.__growWasmMemory = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__growWasmMemory.apply(null, arguments);
+};
+e.dynCall_viiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiii.apply(null, arguments);
+};
+e.dynCall_viiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiii.apply(null, arguments);
+};
+e.dynCall_viijii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viijii.apply(null, arguments);
+};
+e.dynCall_v = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_v.apply(null, arguments);
+};
+e.dynCall_diiid = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_diiid.apply(null, arguments);
+};
+e.dynCall_viij = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viij.apply(null, arguments);
+};
+e.dynCall_viiiiiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_jiji = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_jiji.apply(null, arguments);
+};
+e.dynCall_ji = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_ji.apply(null, arguments);
+};
+e.dynCall_iiiiiiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_viiiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_viiiiiiji = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiji.apply(null, arguments);
+};
+e.dynCall_viiij = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiij.apply(null, arguments);
+};
+e.dynCall_viiiiiijii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiijii.apply(null, arguments);
+};
+e.dynCall_fi = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_fi.apply(null, arguments);
+};
+e.dynCall_vif = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_vif.apply(null, arguments);
+};
+e.dynCall_idd = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_idd.apply(null, arguments);
+};
+e.dynCall_viffff = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viffff.apply(null, arguments);
+};
+e.dynCall_iiiiiiiiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_viiifiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiifiii.apply(null, arguments);
+};
+e.dynCall_viiifii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiifii.apply(null, arguments);
+};
+e.dynCall_viiifiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiifiiii.apply(null, arguments);
+};
+e.dynCall_iidiiii = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iidiiii.apply(null, arguments);
+};
+e.dynCall_iiiiij = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiij.apply(null, arguments);
+};
+e.dynCall_iiiiid = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiid.apply(null, arguments);
+};
+e.dynCall_iiiiijj = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiijj.apply(null, arguments);
+};
+e.dynCall_iiiiiijj = function() {
+ assert(F, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!G, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiijj.apply(null, arguments);
+};
+function Be(a, b) {
+ var c = n();
+ try {
+ return $f(a, b);
+ } catch (d) {
+ p(c);
+ if (d !== d + 0 && "longjmp" !== d) {
+ throw d;
+ }
+ X(1, 0);
+ }
+}
+function De(a, b, c, d) {
+ var f = n();
+ try {
+ return bg(a, b, c, d);
+ } catch (g) {
+ p(f);
+ if (g !== g + 0 && "longjmp" !== g) {
+ throw g;
+ }
+ X(1, 0);
+ }
+}
+function Je(a, b) {
+ var c = n();
+ try {
+ hg(a, b);
+ } catch (d) {
+ p(c);
+ if (d !== d + 0 && "longjmp" !== d) {
+ throw d;
+ }
+ X(1, 0);
+ }
+}
+function Le(a, b, c, d) {
+ var f = n();
+ try {
+ jg(a, b, c, d);
+ } catch (g) {
+ p(f);
+ if (g !== g + 0 && "longjmp" !== g) {
+ throw g;
+ }
+ X(1, 0);
+ }
+}
+function Ke(a, b, c) {
+ var d = n();
+ try {
+ ig(a, b, c);
+ } catch (f) {
+ p(d);
+ if (f !== f + 0 && "longjmp" !== f) {
+ throw f;
+ }
+ X(1, 0);
+ }
+}
+function Ce(a, b, c) {
+ var d = n();
+ try {
+ return ag(a, b, c);
+ } catch (f) {
+ p(d);
+ if (f !== f + 0 && "longjmp" !== f) {
+ throw f;
+ }
+ X(1, 0);
+ }
+}
+function He(a, b, c, d, f, g, h, k) {
+ var u = n();
+ try {
+ return fg(a, b, c, d, f, g, h, k);
+ } catch (q) {
+ p(u);
+ if (q !== q + 0 && "longjmp" !== q) {
+ throw q;
+ }
+ X(1, 0);
+ }
+}
+function Ee(a, b, c, d, f) {
+ var g = n();
+ try {
+ return cg(a, b, c, d, f);
+ } catch (h) {
+ p(g);
+ if (h !== h + 0 && "longjmp" !== h) {
+ throw h;
+ }
+ X(1, 0);
+ }
+}
+function Me(a, b, c, d, f) {
+ var g = n();
+ try {
+ kg(a, b, c, d, f);
+ } catch (h) {
+ p(g);
+ if (h !== h + 0 && "longjmp" !== h) {
+ throw h;
+ }
+ X(1, 0);
+ }
+}
+function Ie(a, b, c, d, f, g, h, k, u, q) {
+ var v = n();
+ try {
+ return gg(a, b, c, d, f, g, h, k, u, q);
+ } catch (x) {
+ p(v);
+ if (x !== x + 0 && "longjmp" !== x) {
+ throw x;
+ }
+ X(1, 0);
+ }
+}
+function Fe(a, b, c, d, f, g) {
+ var h = n();
+ try {
+ return dg(a, b, c, d, f, g);
+ } catch (k) {
+ p(h);
+ if (k !== k + 0 && "longjmp" !== k) {
+ throw k;
+ }
+ X(1, 0);
+ }
+}
+function Ge(a, b, c, d, f, g, h) {
+ var k = n();
+ try {
+ return eg(a, b, c, d, f, g, h);
+ } catch (u) {
+ p(k);
+ if (u !== u + 0 && "longjmp" !== u) {
+ throw u;
+ }
+ X(1, 0);
+ }
+}
+function Ne(a, b, c, d, f, g) {
+ var h = n();
+ try {
+ lg(a, b, c, d, f, g);
+ } catch (k) {
+ p(h);
+ if (k !== k + 0 && "longjmp" !== k) {
+ throw k;
+ }
+ X(1, 0);
+ }
+}
+function Pe(a, b, c, d, f, g, h, k, u, q) {
+ var v = n();
+ try {
+ ng(a, b, c, d, f, g, h, k, u, q);
+ } catch (x) {
+ p(v);
+ if (x !== x + 0 && "longjmp" !== x) {
+ throw x;
+ }
+ X(1, 0);
+ }
+}
+function Oe(a, b, c, d, f, g, h) {
+ var k = n();
+ try {
+ mg(a, b, c, d, f, g, h);
+ } catch (u) {
+ p(k);
+ if (u !== u + 0 && "longjmp" !== u) {
+ throw u;
+ }
+ X(1, 0);
+ }
+}
+e.asm = Z;
+Object.getOwnPropertyDescriptor(e, "intArrayFromString") || (e.intArrayFromString = function() {
+ l("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "intArrayToString") || (e.intArrayToString = function() {
+ l("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "ccall") || (e.ccall = function() {
+ l("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "cwrap") || (e.cwrap = function() {
+ l("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "setValue") || (e.setValue = function() {
+ l("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getValue") || (e.getValue = function() {
+ l("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "allocate") || (e.allocate = function() {
+ l("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getMemory") || (e.getMemory = function() {
+ l("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "AsciiToString") || (e.AsciiToString = function() {
+ l("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToAscii") || (e.stringToAscii = function() {
+ l("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "UTF8ArrayToString") || (e.UTF8ArrayToString = function() {
+ l("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "UTF8ToString") || (e.UTF8ToString = function() {
+ l("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToUTF8Array") || (e.stringToUTF8Array = function() {
+ l("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToUTF8") || (e.stringToUTF8 = function() {
+ l("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "lengthBytesUTF8") || (e.lengthBytesUTF8 = function() {
+ l("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "UTF16ToString") || (e.UTF16ToString = function() {
+ l("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToUTF16") || (e.stringToUTF16 = function() {
+ l("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "lengthBytesUTF16") || (e.lengthBytesUTF16 = function() {
+ l("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "UTF32ToString") || (e.UTF32ToString = function() {
+ l("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToUTF32") || (e.stringToUTF32 = function() {
+ l("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "lengthBytesUTF32") || (e.lengthBytesUTF32 = function() {
+ l("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "allocateUTF8") || (e.allocateUTF8 = function() {
+ l("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stackTrace") || (e.stackTrace = function() {
+ l("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnPreRun") || (e.addOnPreRun = function() {
+ l("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnInit") || (e.addOnInit = function() {
+ l("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnPreMain") || (e.addOnPreMain = function() {
+ l("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnExit") || (e.addOnExit = function() {
+ l("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnPostRun") || (e.addOnPostRun = function() {
+ l("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "writeStringToMemory") || (e.writeStringToMemory = function() {
+ l("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "writeArrayToMemory") || (e.writeArrayToMemory = function() {
+ l("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "writeAsciiToMemory") || (e.writeAsciiToMemory = function() {
+ l("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addRunDependency") || (e.addRunDependency = function() {
+ l("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "removeRunDependency") || (e.removeRunDependency = function() {
+ l("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "ENV") || (e.ENV = function() {
+ l("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "FS") || (e.FS = function() {
+ l("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createFolder") || (e.FS_createFolder = function() {
+ l("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createPath") || (e.FS_createPath = function() {
+ l("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createDataFile") || (e.FS_createDataFile = function() {
+ l("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createPreloadedFile") || (e.FS_createPreloadedFile = function() {
+ l("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createLazyFile") || (e.FS_createLazyFile = function() {
+ l("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createLink") || (e.FS_createLink = function() {
+ l("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createDevice") || (e.FS_createDevice = function() {
+ l("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_unlink") || (e.FS_unlink = function() {
+ l("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "GL") || (e.GL = function() {
+ l("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "dynamicAlloc") || (e.dynamicAlloc = function() {
+ l("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "warnOnce") || (e.warnOnce = function() {
+ l("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "loadDynamicLibrary") || (e.loadDynamicLibrary = function() {
+ l("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "loadWebAssemblyModule") || (e.loadWebAssemblyModule = function() {
+ l("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getLEB") || (e.getLEB = function() {
+ l("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getFunctionTables") || (e.getFunctionTables = function() {
+ l("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "alignFunctionTables") || (e.alignFunctionTables = function() {
+ l("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "registerFunctions") || (e.registerFunctions = function() {
+ l("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addFunction") || (e.addFunction = function() {
+ l("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "removeFunction") || (e.removeFunction = function() {
+ l("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getFuncWrapper") || (e.getFuncWrapper = function() {
+ l("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "prettyPrint") || (e.prettyPrint = function() {
+ l("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "makeBigInt") || (e.makeBigInt = function() {
+ l("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "dynCall") || (e.dynCall = function() {
+ l("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getCompilerSetting") || (e.getCompilerSetting = function() {
+ l("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stackSave") || (e.stackSave = function() {
+ l("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stackRestore") || (e.stackRestore = function() {
+ l("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stackAlloc") || (e.stackAlloc = function() {
+ l("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "establishStackSpace") || (e.establishStackSpace = function() {
+ l("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "print") || (e.print = function() {
+ l("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "printErr") || (e.printErr = function() {
+ l("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getTempRet0") || (e.getTempRet0 = function() {
+ l("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "setTempRet0") || (e.setTempRet0 = function() {
+ l("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "callMain") || (e.callMain = function() {
+ l("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "Pointer_stringify") || (e.Pointer_stringify = function() {
+ l("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "ALLOC_NORMAL") || Object.defineProperty(e, "ALLOC_NORMAL", {get:function() {
+ l("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+}});
+Object.getOwnPropertyDescriptor(e, "ALLOC_STACK") || Object.defineProperty(e, "ALLOC_STACK", {get:function() {
+ l("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+}});
+Object.getOwnPropertyDescriptor(e, "ALLOC_DYNAMIC") || Object.defineProperty(e, "ALLOC_DYNAMIC", {get:function() {
+ l("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+}});
+Object.getOwnPropertyDescriptor(e, "ALLOC_NONE") || Object.defineProperty(e, "ALLOC_NONE", {get:function() {
+ l("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+}});
+function qa(a) {
+ this.name = "ExitStatus";
+ this.message = "Program terminated with exit(" + a + ")";
+ this.status = a;
+}
+hb = function og() {
+ e.calledRun || pg();
+ e.calledRun || (hb = og);
+};
+function pg() {
+ function a() {
+ if (!e.calledRun && (e.calledRun = !0, !Ba)) {
+ Ra();
+ assert(!F);
+ F = !0;
+ if (!e.noFSInit && !yc) {
+ assert(!yc, "FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");
+ yc = !0;
+ xc();
+ e.stdin = e.stdin;
+ e.stdout = e.stdout;
+ e.stderr = e.stderr;
+ e.stdin ? Ac("stdin", e.stdin) : tc("/dev/tty", "/dev/stdin");
+ e.stdout ? Ac("stdout", null, e.stdout) : tc("/dev/tty", "/dev/stdout");
+ e.stderr ? Ac("stderr", null, e.stderr) : tc("/dev/tty1", "/dev/stderr");
+ var a = uc("/dev/stdin", "r"), c = uc("/dev/stdout", "w"), d = uc("/dev/stderr", "w");
+ assert(0 === a.fd, "invalid handle for stdin (" + a.fd + ")");
+ assert(1 === c.fd, "invalid handle for stdout (" + c.fd + ")");
+ assert(2 === d.fd, "invalid handle for stderr (" + d.fd + ")");
+ }
+ Sa(Ua);
+ Ra();
+ $b = !1;
+ Sa(Va);
+ if (e.onRuntimeInitialized) {
+ e.onRuntimeInitialized();
+ }
+ assert(!e._main, 'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]');
+ Ra();
+ if (e.postRun) {
+ for ("function" == typeof e.postRun && (e.postRun = [e.postRun]); e.postRun.length;) {
+ a = e.postRun.shift(), Xa.unshift(a);
+ }
+ }
+ Sa(Xa);
+ }
+ }
+ if (!(0 < fb)) {
+ assert(!0);
+ A[506301] = 34821223;
+ A[506302] = 2310721022;
+ if (e.preRun) {
+ for ("function" == typeof e.preRun && (e.preRun = [e.preRun]); e.preRun.length;) {
+ Ya();
+ }
+ }
+ Sa(Ta);
+ 0 < fb || e.calledRun || (e.setStatus ? (e.setStatus("Running..."), setTimeout(function() {
+ setTimeout(function() {
+ e.setStatus("");
+ }, 1);
+ a();
+ }, 1)) : a(), Ra());
+ }
+}
+e.run = pg;
+function Ae() {
+ var a = ra, b = m, c = !1;
+ ra = m = function() {
+ c = !0;
+ };
+ try {
+ var d = e._fflush;
+ d && d(0);
+ ["stdout", "stderr"].forEach(function(a) {
+ a = "/dev/" + a;
+ try {
+ var b = O(a, {W:!0});
+ a = b.path;
+ } catch (k) {
+ }
+ var d = {Na:!1, exists:!1, error:0, name:null, path:null, object:null, Pa:!1, Ra:null, Qa:null};
+ try {
+ b = O(a, {parent:!0}), d.Pa = !0, d.Ra = b.path, d.Qa = b.node, d.name = Db(a), b = O(a, {W:!0}), d.exists = !0, d.path = b.path, d.object = b.node, d.name = b.node.name, d.Na = "/" === b.path;
+ } catch (k) {
+ d.error = k.i;
+ }
+ d && (b = Hb[d.object.rdev]) && b.output && b.output.length && (c = !0);
+ });
+ } catch (f) {
+ }
+ ra = a;
+ m = b;
+ c && va("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.");
+}
+var qg = [];
+function l(a) {
+ if (e.onAbort) {
+ e.onAbort(a);
+ }
+ ra(a);
+ m(a);
+ Ba = !0;
+ var b = "abort(" + a + ") at " + vb();
+ qg && qg.forEach(function(c) {
+ b = c(b, a);
+ });
+ throw b;
+}
+e.abort = l;
+if (e.preInit) {
+ for ("function" == typeof e.preInit && (e.preInit = [e.preInit]); 0 < e.preInit.length;) {
+ e.preInit.pop()();
+ }
+}
+e.noExitRuntime = !0;
+pg();
+
diff --git a/dist/dbr-7.5.0.1.wasm b/dist/dbr-7.5.0.1.wasm
new file mode 100644
index 00000000..40413b5f
Binary files /dev/null and b/dist/dbr-7.5.0.1.wasm differ
diff --git a/dist/dbr-7.5.0.1.wasm.js b/dist/dbr-7.5.0.1.wasm.js
new file mode 100644
index 00000000..ed1bf9c7
--- /dev/null
+++ b/dist/dbr-7.5.0.1.wasm.js
@@ -0,0 +1,4476 @@
+var e;
+e || (e = typeof Module !== 'undefined' ? Module : {});
+var aa = {}, ba;
+for (ba in e) {
+ e.hasOwnProperty(ba) && (aa[ba] = e[ba]);
+}
+var ca = "./this.program", da = !1, ea = !1, fa = !1, ha = !1, ja = !1;
+da = "object" === typeof window;
+ea = "function" === typeof importScripts;
+fa = (ha = "object" === typeof process && "object" === typeof process.versions && "string" === typeof process.versions.node) && !da && !ea;
+ja = !da && !fa && !ea;
+if (e.ENVIRONMENT) {
+ throw Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");
+}
+var l = "", ka, la;
+if (fa) {
+ l = __dirname + "/";
+ var ma, na;
+ ka = function(a, b) {
+ ma || (ma = require("fs"));
+ na || (na = require("path"));
+ a = na.normalize(a);
+ a = ma.readFileSync(a);
+ return b ? a : a.toString();
+ };
+ la = function(a) {
+ a = ka(a, !0);
+ a.buffer || (a = new Uint8Array(a));
+ assert(a.buffer);
+ return a;
+ };
+ 1 < process.argv.length && (ca = process.argv[1].replace(/\\/g, "/"));
+ process.argv.slice(2);
+ "undefined" !== typeof module && (module.exports = e);
+ process.on("uncaughtException", function(a) {
+ throw a;
+ });
+ process.on("unhandledRejection", m);
+ e.inspect = function() {
+ return "[Emscripten Module object]";
+ };
+} else {
+ if (ja) {
+ "undefined" != typeof read && (ka = function(a) {
+ return read(a);
+ }), la = function(a) {
+ if ("function" === typeof readbuffer) {
+ return new Uint8Array(readbuffer(a));
+ }
+ a = read(a, "binary");
+ assert("object" === typeof a);
+ return a;
+ }, "undefined" !== typeof print && ("undefined" === typeof console && (console = {}), console.log = print, console.warn = console.error = "undefined" !== typeof printErr ? printErr : print);
+ } else {
+ if (da || ea) {
+ ea ? l = self.location.href : document.currentScript && (l = document.currentScript.src), l = 0 !== l.indexOf("blob:") ? l.substr(0, l.lastIndexOf("/") + 1) : "", ka = function(a) {
+ var b = new XMLHttpRequest;
+ b.open("GET", a, !1);
+ b.send(null);
+ return b.responseText;
+ }, ea && (la = function(a) {
+ var b = new XMLHttpRequest;
+ b.open("GET", a, !1);
+ b.responseType = "arraybuffer";
+ b.send(null);
+ return new Uint8Array(b.response);
+ });
+ } else {
+ throw Error("environment detection error");
+ }
+ }
+}
+var oa = e.print || console.log.bind(console), n = e.printErr || console.warn.bind(console);
+for (ba in aa) {
+ aa.hasOwnProperty(ba) && (e[ba] = aa[ba]);
+}
+aa = null;
+Object.getOwnPropertyDescriptor(e, "arguments") || Object.defineProperty(e, "arguments", {get:function() {
+ m("Module.arguments has been replaced with plain arguments_");
+}});
+e.thisProgram && (ca = e.thisProgram);
+Object.getOwnPropertyDescriptor(e, "thisProgram") || Object.defineProperty(e, "thisProgram", {get:function() {
+ m("Module.thisProgram has been replaced with plain thisProgram");
+}});
+Object.getOwnPropertyDescriptor(e, "quit") || Object.defineProperty(e, "quit", {get:function() {
+ m("Module.quit has been replaced with plain quit_");
+}});
+assert("undefined" === typeof e.memoryInitializerPrefixURL, "Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead");
+assert("undefined" === typeof e.pthreadMainPrefixURL, "Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead");
+assert("undefined" === typeof e.cdInitializerPrefixURL, "Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead");
+assert("undefined" === typeof e.filePackagePrefixURL, "Module.filePackagePrefixURL option was removed, use Module.locateFile instead");
+assert("undefined" === typeof e.read, "Module.read option was removed (modify read_ in JS)");
+assert("undefined" === typeof e.readAsync, "Module.readAsync option was removed (modify readAsync in JS)");
+assert("undefined" === typeof e.readBinary, "Module.readBinary option was removed (modify readBinary in JS)");
+assert("undefined" === typeof e.setWindowTitle, "Module.setWindowTitle option was removed (modify setWindowTitle in JS)");
+Object.getOwnPropertyDescriptor(e, "read") || Object.defineProperty(e, "read", {get:function() {
+ m("Module.read has been replaced with plain read_");
+}});
+Object.getOwnPropertyDescriptor(e, "readAsync") || Object.defineProperty(e, "readAsync", {get:function() {
+ m("Module.readAsync has been replaced with plain readAsync");
+}});
+Object.getOwnPropertyDescriptor(e, "readBinary") || Object.defineProperty(e, "readBinary", {get:function() {
+ m("Module.readBinary has been replaced with plain readBinary");
+}});
+function pa(a) {
+ assert(qa);
+ var b = p[qa >> 2];
+ a = b + a + 15 & -16;
+ a > ra() && m("failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly");
+ p[qa >> 2] = a;
+ return b;
+}
+function sa(a) {
+ ta || (ta = {});
+ ta[a] || (ta[a] = 1, n(a));
+}
+var ta;
+function ua(a, b, c) {
+ return c ? +(a >>> 0) + 4294967296.0 * +(b >>> 0) : +(a >>> 0) + 4294967296.0 * +(b | 0);
+}
+var va;
+e.wasmBinary && (va = e.wasmBinary);
+Object.getOwnPropertyDescriptor(e, "wasmBinary") || Object.defineProperty(e, "wasmBinary", {get:function() {
+ m("Module.wasmBinary has been replaced with plain wasmBinary");
+}});
+"object" !== typeof WebAssembly && m("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");
+var wa, xa = !1;
+function assert(a, b) {
+ a || m("Assertion failed: " + b);
+}
+function ya(a) {
+ if ("number" === typeof a) {
+ var b = !0;
+ var c = a;
+ } else {
+ b = !1, c = a.length;
+ }
+ var d = za(Math.max(c, 1));
+ if (b) {
+ a = d;
+ assert(0 == (d & 3));
+ for (b = d + (c & -4); a < b; a += 4) {
+ p[a >> 2] = 0;
+ }
+ for (b = d + c; a < b;) {
+ q[a++ >> 0] = 0;
+ }
+ return d;
+ }
+ a.subarray || a.slice ? w.set(a, d) : w.set(new Uint8Array(a), d);
+ return d;
+}
+var Aa = "undefined" !== typeof TextDecoder ? new TextDecoder("utf8") : void 0;
+function Ba(a, b, c) {
+ var d = b + c;
+ for (c = b; a[c] && !(c >= d);) {
+ ++c;
+ }
+ if (16 < c - b && a.subarray && Aa) {
+ return Aa.decode(a.subarray(b, c));
+ }
+ for (d = ""; b < c;) {
+ var f = a[b++];
+ if (f & 128) {
+ var g = a[b++] & 63;
+ if (192 == (f & 224)) {
+ d += String.fromCharCode((f & 31) << 6 | g);
+ } else {
+ var h = a[b++] & 63;
+ 224 == (f & 240) ? f = (f & 15) << 12 | g << 6 | h : (240 != (f & 248) && sa("Invalid UTF-8 leading byte 0x" + f.toString(16) + " encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"), f = (f & 7) << 18 | g << 12 | h << 6 | a[b++] & 63);
+ 65536 > f ? d += String.fromCharCode(f) : (f -= 65536, d += String.fromCharCode(55296 | f >> 10, 56320 | f & 1023));
+ }
+ } else {
+ d += String.fromCharCode(f);
+ }
+ }
+ return d;
+}
+function x(a) {
+ return a ? Ba(w, a, void 0) : "";
+}
+function Ca(a, b, c, d) {
+ if (!(0 < d)) {
+ return 0;
+ }
+ var f = c;
+ d = c + d - 1;
+ for (var g = 0; g < a.length; ++g) {
+ var h = a.charCodeAt(g);
+ if (55296 <= h && 57343 >= h) {
+ var k = a.charCodeAt(++g);
+ h = 65536 + ((h & 1023) << 10) | k & 1023;
+ }
+ if (127 >= h) {
+ if (c >= d) {
+ break;
+ }
+ b[c++] = h;
+ } else {
+ if (2047 >= h) {
+ if (c + 1 >= d) {
+ break;
+ }
+ b[c++] = 192 | h >> 6;
+ } else {
+ if (65535 >= h) {
+ if (c + 2 >= d) {
+ break;
+ }
+ b[c++] = 224 | h >> 12;
+ } else {
+ if (c + 3 >= d) {
+ break;
+ }
+ 2097152 <= h && sa("Invalid Unicode code point 0x" + h.toString(16) + " encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF).");
+ b[c++] = 240 | h >> 18;
+ b[c++] = 128 | h >> 12 & 63;
+ }
+ b[c++] = 128 | h >> 6 & 63;
+ }
+ b[c++] = 128 | h & 63;
+ }
+ }
+ b[c] = 0;
+ return c - f;
+}
+function Da(a, b, c) {
+ assert("number" == typeof c, "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");
+ Ca(a, w, b, c);
+}
+function Ea(a) {
+ for (var b = 0, c = 0; c < a.length; ++c) {
+ var d = a.charCodeAt(c);
+ 55296 <= d && 57343 >= d && (d = 65536 + ((d & 1023) << 10) | a.charCodeAt(++c) & 1023);
+ 127 >= d ? ++b : b = 2047 >= d ? b + 2 : 65535 >= d ? b + 3 : b + 4;
+ }
+ return b;
+}
+"undefined" !== typeof TextDecoder && new TextDecoder("utf-16le");
+function Fa(a, b) {
+ assert(0 <= a.length, "writeArrayToMemory array must have a length (should be an array or typed array)");
+ q.set(a, b);
+}
+function Ga(a) {
+ 0 < a % 65536 && (a += 65536 - a % 65536);
+ return a;
+}
+var buffer, q, w, Ha, Ia, p, y, Ja, Ka;
+function La() {
+ e.HEAP8 = q = new Int8Array(buffer);
+ e.HEAP16 = Ha = new Int16Array(buffer);
+ e.HEAP32 = p = new Int32Array(buffer);
+ e.HEAPU8 = w = new Uint8Array(buffer);
+ e.HEAPU16 = Ia = new Uint16Array(buffer);
+ e.HEAPU32 = y = new Uint32Array(buffer);
+ e.HEAPF32 = Ja = new Float32Array(buffer);
+ e.HEAPF64 = Ka = new Float64Array(buffer);
+}
+var qa = 1047744;
+assert(!0, "stack must start aligned");
+assert(!0, "heap must start aligned");
+e.TOTAL_STACK && assert(5242880 === e.TOTAL_STACK, "the stack size can no longer be determined at runtime");
+var Ma = e.TOTAL_MEMORY || 16777216;
+Object.getOwnPropertyDescriptor(e, "TOTAL_MEMORY") || Object.defineProperty(e, "TOTAL_MEMORY", {get:function() {
+ m("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY");
+}});
+assert(5242880 <= Ma, "TOTAL_MEMORY should be larger than TOTAL_STACK, was " + Ma + "! (TOTAL_STACK=5242880)");
+assert("undefined" !== typeof Int32Array && "undefined" !== typeof Float64Array && void 0 !== Int32Array.prototype.subarray && void 0 !== Int32Array.prototype.set, "JS engine does not provide full typed array support");
+e.wasmMemory ? wa = e.wasmMemory : wa = new WebAssembly.Memory({initial:Ma / 65536});
+wa && (buffer = wa.buffer);
+Ma = buffer.byteLength;
+assert(0 === Ma % 65536);
+La();
+p[qa >> 2] = 6290640;
+function Na() {
+ var a = y[261941], b = y[261942];
+ 34821223 == a && 2310721022 == b || m("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x" + b.toString(16) + " " + a.toString(16));
+ 1668509029 !== p[0] && m("Runtime error: The application has corrupted its heap memory area (address zero)!");
+}
+p[0] = 1668509029;
+Ha[1] = 25459;
+if (115 !== w[2] || 99 !== w[3]) {
+ throw "Runtime error: expected the system to be little-endian!";
+}
+function Oa(a) {
+ for (; 0 < a.length;) {
+ var b = a.shift();
+ if ("function" == typeof b) {
+ b();
+ } else {
+ var c = b.ya;
+ "number" === typeof c ? void 0 === b.aa ? e.dynCall_v(c) : e.dynCall_vi(c, b.aa) : c(void 0 === b.aa ? null : b.aa);
+ }
+ }
+}
+var Pa = [], Qa = [], Ra = [], Sa = [], Ta = [], E = !1;
+function Ua() {
+ var a = e.preRun.shift();
+ Pa.unshift(a);
+}
+function Va(a, b) {
+ return 0 <= a ? a : 32 >= b ? 2 * Math.abs(1 << b - 1) + a : Math.pow(2, b) + a;
+}
+function Wa(a, b) {
+ if (0 >= a) {
+ return a;
+ }
+ var c = 32 >= b ? Math.abs(1 << b - 1) : Math.pow(2, b - 1);
+ a >= c && (32 >= b || a > c) && (a = -2 * c + a);
+ return a;
+}
+assert(Math.imul, "This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
+assert(Math.fround, "This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
+assert(Math.clz32, "This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
+assert(Math.trunc, "This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
+var Xa = Math.abs, Ya = Math.sqrt, Za = Math.ceil, $a = Math.floor, ab = Math.min, bb = 0, cb = null, db = null, eb = {};
+function fb() {
+ bb++;
+ e.monitorRunDependencies && e.monitorRunDependencies(bb);
+ assert(!eb["wasm-instantiate"]);
+ eb["wasm-instantiate"] = 1;
+ null === cb && "undefined" !== typeof setInterval && (cb = setInterval(function() {
+ if (xa) {
+ clearInterval(cb), cb = null;
+ } else {
+ var a = !1, b;
+ for (b in eb) {
+ a || (a = !0, n("still waiting on run dependencies:")), n("dependency: " + b);
+ }
+ a && n("(end of list)");
+ }
+ }, 10000));
+}
+e.preloadedImages = {};
+e.preloadedAudios = {};
+function gb() {
+ var a = hb;
+ return String.prototype.startsWith ? a.startsWith("data:application/octet-stream;base64,") : 0 === a.indexOf("data:application/octet-stream;base64,");
+}
+var hb = "libDynamsoftBarcodeReader.wasm";
+if (!gb()) {
+ var ib = hb;
+ hb = e.locateFile ? e.locateFile(ib, l) : l + ib;
+}
+function jb() {
+ try {
+ if (va) {
+ return new Uint8Array(va);
+ }
+ if (la) {
+ return la(hb);
+ }
+ throw "both async and sync fetching of the wasm failed";
+ } catch (a) {
+ m(a);
+ }
+}
+function kb() {
+ return va || !da && !ea || "function" !== typeof fetch ? new Promise(function(a) {
+ a(jb());
+ }) : fetch(hb, {credentials:"same-origin"}).then(function(a) {
+ if (!a.ok) {
+ throw "failed to load wasm binary file at '" + hb + "'";
+ }
+ return a.arrayBuffer();
+ }).catch(function() {
+ return jb();
+ });
+}
+function lb(a) {
+ function b(a) {
+ e.asm = a.exports;
+ bb--;
+ e.monitorRunDependencies && e.monitorRunDependencies(bb);
+ assert(eb["wasm-instantiate"]);
+ delete eb["wasm-instantiate"];
+ 0 == bb && (null !== cb && (clearInterval(cb), cb = null), db && (a = db, db = null, a()));
+ }
+ function c(a) {
+ assert(e === g, "the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");
+ g = null;
+ b(a.instance);
+ }
+ function d(a) {
+ return kb().then(function(a) {
+ return WebAssembly.instantiate(a, f);
+ }).then(a, function(a) {
+ n("failed to asynchronously prepare wasm: " + a);
+ m(a);
+ });
+ }
+ var f = {env:a};
+ fb();
+ var g = e;
+ if (e.instantiateWasm) {
+ try {
+ return e.instantiateWasm(f, b);
+ } catch (h) {
+ return n("Module.instantiateWasm callback failed with error: " + h), !1;
+ }
+ }
+ (function() {
+ if (va || "function" !== typeof WebAssembly.instantiateStreaming || gb() || "function" !== typeof fetch) {
+ return d(c);
+ }
+ fetch(hb, {credentials:"same-origin"}).then(function(a) {
+ return WebAssembly.instantiateStreaming(a, f).then(c, function(a) {
+ n("wasm streaming compile failed: " + a);
+ n("falling back to ArrayBuffer instantiation");
+ d(c);
+ });
+ });
+ })();
+ return {};
+}
+e.asm = function(a, b) {
+ b.memory = wa;
+ b.table = new WebAssembly.Table({initial:3880, maximum:3880, element:"anyfunc"});
+ a = lb(b);
+ assert(a, "binaryen setup failed (no wasm support?)");
+ return a;
+};
+var F, mb;
+Qa.push({ya:function() {
+ nb();
+}});
+function ob(a) {
+ sa("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");
+ return a;
+}
+function pb(a) {
+ return a.replace(/_Z[\w\d_]+/g, function(a) {
+ var b = ob(a);
+ return a === b ? a : b + " [" + a + "]";
+ });
+}
+function qb() {
+ var a = Error();
+ if (!a.stack) {
+ try {
+ throw Error(0);
+ } catch (b) {
+ a = b;
+ }
+ if (!a.stack) {
+ return "(no stack trace available)";
+ }
+ }
+ return a.stack.toString();
+}
+function rb() {
+ var a = qb();
+ e.extraStackTrace && (a += "\n" + e.extraStackTrace());
+ return pb(a);
+}
+var G = {};
+function sb(a) {
+ if (sb.s) {
+ var b = p[a >> 2];
+ var c = p[b >> 2];
+ } else {
+ sb.s = !0, G.USER = G.LOGNAME = "web_user", G.PATH = "/", G.PWD = "/", G.HOME = "/home/web_user", G.LANG = "C.UTF-8", G.LANG = ("object" === typeof navigator && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", G._ = ca, c = E ? za(1024) : pa(1024), b = E ? za(256) : pa(256), p[b >> 2] = c, p[a >> 2] = b;
+ }
+ a = [];
+ var d = 0, f;
+ for (f in G) {
+ if ("string" === typeof G[f]) {
+ var g = f + "=" + G[f];
+ a.push(g);
+ d += g.length;
+ }
+ }
+ if (1024 < d) {
+ throw Error("Environment size exceeded TOTAL_ENV_SIZE!");
+ }
+ for (f = 0; f < a.length; f++) {
+ d = g = a[f];
+ for (var h = c, k = 0; k < d.length; ++k) {
+ assert(d.charCodeAt(k) === d.charCodeAt(k) & 255), q[h++ >> 0] = d.charCodeAt(k);
+ }
+ q[h >> 0] = 0;
+ p[b + 4 * f >> 2] = c;
+ c += g.length + 1;
+ }
+ p[b + 4 * a.length >> 2] = 0;
+}
+function tb(a, b) {
+ sa("atexit() called, but EXIT_RUNTIME is not set, so atexits() will not be called. set EXIT_RUNTIME to 1 (see the FAQ)");
+ Sa.unshift({ya:a, aa:b});
+}
+function ub() {
+ return 0 < ub.s;
+}
+function vb(a) {
+ e.___errno_location ? p[e.___errno_location() >> 2] = a : n("failed to set errno from JS");
+ return a;
+}
+function wb(a, b) {
+ for (var c = 0, d = a.length - 1; 0 <= d; d--) {
+ var f = a[d];
+ "." === f ? a.splice(d, 1) : ".." === f ? (a.splice(d, 1), c++) : c && (a.splice(d, 1), c--);
+ }
+ if (b) {
+ for (; c; c--) {
+ a.unshift("..");
+ }
+ }
+ return a;
+}
+function xb(a) {
+ var b = "/" === a.charAt(0), c = "/" === a.substr(-1);
+ (a = wb(a.split("/").filter(function(a) {
+ return !!a;
+ }), !b).join("/")) || b || (a = ".");
+ a && c && (a += "/");
+ return (b ? "/" : "") + a;
+}
+function yb(a) {
+ var b = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);
+ a = b[0];
+ b = b[1];
+ if (!a && !b) {
+ return ".";
+ }
+ b && (b = b.substr(0, b.length - 1));
+ return a + b;
+}
+function zb(a) {
+ if ("/" === a) {
+ return "/";
+ }
+ var b = a.lastIndexOf("/");
+ return -1 === b ? a : a.substr(b + 1);
+}
+function Ab() {
+ var a = Array.prototype.slice.call(arguments, 0);
+ return xb(a.join("/"));
+}
+function Bb(a, b) {
+ return xb(a + "/" + b);
+}
+function Cb() {
+ for (var a = "", b = !1, c = arguments.length - 1; -1 <= c && !b; c--) {
+ b = 0 <= c ? arguments[c] : "/";
+ if ("string" !== typeof b) {
+ throw new TypeError("Arguments to path.resolve must be strings");
+ }
+ if (!b) {
+ return "";
+ }
+ a = b + "/" + a;
+ b = "/" === b.charAt(0);
+ }
+ a = wb(a.split("/").filter(function(a) {
+ return !!a;
+ }), !b).join("/");
+ return (b ? "/" : "") + a || ".";
+}
+var Db = [];
+function Eb(a, b) {
+ Db[a] = {input:[], output:[], U:b};
+ Fb(a, Gb);
+}
+var Gb = {open:function(a) {
+ var b = Db[a.node.rdev];
+ if (!b) {
+ throw new H(19);
+ }
+ a.tty = b;
+ a.seekable = !1;
+}, close:function(a) {
+ a.tty.U.flush(a.tty);
+}, flush:function(a) {
+ a.tty.U.flush(a.tty);
+}, read:function(a, b, c, d) {
+ if (!a.tty || !a.tty.U.Aa) {
+ throw new H(6);
+ }
+ for (var f = 0, g = 0; g < d; g++) {
+ try {
+ var h = a.tty.U.Aa(a.tty);
+ } catch (k) {
+ throw new H(5);
+ }
+ if (void 0 === h && 0 === f) {
+ throw new H(11);
+ }
+ if (null === h || void 0 === h) {
+ break;
+ }
+ f++;
+ b[c + g] = h;
+ }
+ f && (a.node.timestamp = Date.now());
+ return f;
+}, write:function(a, b, c, d) {
+ if (!a.tty || !a.tty.U.na) {
+ throw new H(6);
+ }
+ try {
+ for (var f = 0; f < d; f++) {
+ a.tty.U.na(a.tty, b[c + f]);
+ }
+ } catch (g) {
+ throw new H(5);
+ }
+ d && (a.node.timestamp = Date.now());
+ return f;
+}}, Ib = {Aa:function(a) {
+ if (!a.input.length) {
+ var b = null;
+ if (fa) {
+ var c = Buffer.s ? Buffer.s(256) : new Buffer(256), d = 0, f = process.stdin.fd;
+ if ("win32" != process.platform) {
+ var g = !1;
+ try {
+ f = fs.openSync("/dev/stdin", "r"), g = !0;
+ } catch (h) {
+ }
+ }
+ try {
+ d = fs.readSync(f, c, 0, 256, null);
+ } catch (h) {
+ if (-1 != h.toString().indexOf("EOF")) {
+ d = 0;
+ } else {
+ throw h;
+ }
+ }
+ g && fs.closeSync(f);
+ 0 < d ? b = c.slice(0, d).toString("utf-8") : b = null;
+ } else {
+ "undefined" != typeof window && "function" == typeof window.prompt ? (b = window.prompt("Input: "), null !== b && (b += "\n")) : "function" == typeof readline && (b = readline(), null !== b && (b += "\n"));
+ }
+ if (!b) {
+ return null;
+ }
+ a.input = Hb(b, !0);
+ }
+ return a.input.shift();
+}, na:function(a, b) {
+ null === b || 10 === b ? (oa(Ba(a.output, 0)), a.output = []) : 0 != b && a.output.push(b);
+}, flush:function(a) {
+ a.output && 0 < a.output.length && (oa(Ba(a.output, 0)), a.output = []);
+}}, Jb = {na:function(a, b) {
+ null === b || 10 === b ? (n(Ba(a.output, 0)), a.output = []) : 0 != b && a.output.push(b);
+}, flush:function(a) {
+ a.output && 0 < a.output.length && (n(Ba(a.output, 0)), a.output = []);
+}}, I = {G:null, v:function() {
+ return I.createNode(null, "/", 16895, 0);
+}, createNode:function(a, b, c, d) {
+ if (24576 === (c & 61440) || 4096 === (c & 61440)) {
+ throw new H(1);
+ }
+ I.G || (I.G = {dir:{node:{I:I.f.I, C:I.f.C, lookup:I.f.lookup, W:I.f.W, rename:I.f.rename, unlink:I.f.unlink, rmdir:I.f.rmdir, readdir:I.f.readdir, symlink:I.f.symlink}, stream:{K:I.g.K}}, file:{node:{I:I.f.I, C:I.f.C}, stream:{K:I.g.K, read:I.g.read, write:I.g.write, qa:I.g.qa, Ba:I.g.Ba, fa:I.g.fa}}, link:{node:{I:I.f.I, C:I.f.C, readlink:I.f.readlink}, stream:{}}, sa:{node:{I:I.f.I, C:I.f.C}, stream:Kb}});
+ c = Lb(a, b, c, d);
+ J(c.mode) ? (c.f = I.G.dir.node, c.g = I.G.dir.stream, c.c = {}) : 32768 === (c.mode & 61440) ? (c.f = I.G.file.node, c.g = I.G.file.stream, c.l = 0, c.c = null) : 40960 === (c.mode & 61440) ? (c.f = I.G.link.node, c.g = I.G.link.stream) : 8192 === (c.mode & 61440) && (c.f = I.G.sa.node, c.g = I.G.sa.stream);
+ c.timestamp = Date.now();
+ a && (a.c[b] = c);
+ return c;
+}, td:function(a) {
+ if (a.c && a.c.subarray) {
+ for (var b = [], c = 0; c < a.l; ++c) {
+ b.push(a.c[c]);
+ }
+ return b;
+ }
+ return a.c;
+}, ud:function(a) {
+ return a.c ? a.c.subarray ? a.c.subarray(0, a.l) : new Uint8Array(a.c) : new Uint8Array;
+}, ua:function(a, b) {
+ var c = a.c ? a.c.length : 0;
+ c >= b || (b = Math.max(b, c * (1048576 > c ? 2.0 : 1.125) | 0), 0 != c && (b = Math.max(b, 256)), c = a.c, a.c = new Uint8Array(b), 0 < a.l && a.c.set(c.subarray(0, a.l), 0));
+}, Sa:function(a, b) {
+ if (a.l != b) {
+ if (0 == b) {
+ a.c = null, a.l = 0;
+ } else {
+ if (!a.c || a.c.subarray) {
+ var c = a.c;
+ a.c = new Uint8Array(new ArrayBuffer(b));
+ c && a.c.set(c.subarray(0, Math.min(b, a.l)));
+ } else {
+ if (a.c || (a.c = []), a.c.length > b) {
+ a.c.length = b;
+ } else {
+ for (; a.c.length < b;) {
+ a.c.push(0);
+ }
+ }
+ }
+ a.l = b;
+ }
+ }
+}, f:{I:function(a) {
+ var b = {};
+ b.dev = 8192 === (a.mode & 61440) ? a.id : 1;
+ b.ino = a.id;
+ b.mode = a.mode;
+ b.nlink = 1;
+ b.uid = 0;
+ b.gid = 0;
+ b.rdev = a.rdev;
+ J(a.mode) ? b.size = 4096 : 32768 === (a.mode & 61440) ? b.size = a.l : 40960 === (a.mode & 61440) ? b.size = a.link.length : b.size = 0;
+ b.atime = new Date(a.timestamp);
+ b.mtime = new Date(a.timestamp);
+ b.ctime = new Date(a.timestamp);
+ b.L = 4096;
+ b.blocks = Math.ceil(b.size / b.L);
+ return b;
+}, C:function(a, b) {
+ void 0 !== b.mode && (a.mode = b.mode);
+ void 0 !== b.timestamp && (a.timestamp = b.timestamp);
+ void 0 !== b.size && I.Sa(a, b.size);
+}, lookup:function() {
+ throw Mb[2];
+}, W:function(a, b, c, d) {
+ return I.createNode(a, b, c, d);
+}, rename:function(a, b, c) {
+ if (J(a.mode)) {
+ try {
+ var d = Nb(b, c);
+ } catch (g) {
+ }
+ if (d) {
+ for (var f in d.c) {
+ throw new H(39);
+ }
+ }
+ }
+ delete a.parent.c[a.name];
+ a.name = c;
+ b.c[c] = a;
+ a.parent = b;
+}, unlink:function(a, b) {
+ delete a.c[b];
+}, rmdir:function(a, b) {
+ var c = Nb(a, b), d;
+ for (d in c.c) {
+ throw new H(39);
+ }
+ delete a.c[b];
+}, readdir:function(a) {
+ var b = [".", ".."], c;
+ for (c in a.c) {
+ a.c.hasOwnProperty(c) && b.push(c);
+ }
+ return b;
+}, symlink:function(a, b, c) {
+ a = I.createNode(a, b, 41471, 0);
+ a.link = c;
+ return a;
+}, readlink:function(a) {
+ if (40960 !== (a.mode & 61440)) {
+ throw new H(22);
+ }
+ return a.link;
+}}, g:{read:function(a, b, c, d, f) {
+ var g = a.node.c;
+ if (f >= a.node.l) {
+ return 0;
+ }
+ a = Math.min(a.node.l - f, d);
+ assert(0 <= a);
+ if (8 < a && g.subarray) {
+ b.set(g.subarray(f, f + a), c);
+ } else {
+ for (d = 0; d < a; d++) {
+ b[c + d] = g[f + d];
+ }
+ }
+ return a;
+}, write:function(a, b, c, d, f, g) {
+ g && sa("file packager has copied file data into memory, but in memory growth we are forced to copy it again (see --no-heap-copy)");
+ g = !1;
+ if (!d) {
+ return 0;
+ }
+ a = a.node;
+ a.timestamp = Date.now();
+ if (b.subarray && (!a.c || a.c.subarray)) {
+ if (g) {
+ return assert(0 === f, "canOwn must imply no weird position inside the file"), a.c = b.subarray(c, c + d), a.l = d;
+ }
+ if (0 === a.l && 0 === f) {
+ return a.c = new Uint8Array(b.subarray(c, c + d)), a.l = d;
+ }
+ if (f + d <= a.l) {
+ return a.c.set(b.subarray(c, c + d), f), d;
+ }
+ }
+ I.ua(a, f + d);
+ if (a.c.subarray && b.subarray) {
+ a.c.set(b.subarray(c, c + d), f);
+ } else {
+ for (g = 0; g < d; g++) {
+ a.c[f + g] = b[c + g];
+ }
+ }
+ a.l = Math.max(a.l, f + d);
+ return d;
+}, K:function(a, b, c) {
+ 1 === c ? b += a.position : 2 === c && 32768 === (a.node.mode & 61440) && (b += a.node.l);
+ if (0 > b) {
+ throw new H(22);
+ }
+ return b;
+}, qa:function(a, b, c) {
+ I.ua(a.node, b + c);
+ a.node.l = Math.max(a.node.l, b + c);
+}, Ba:function(a, b, c, d, f, g, h) {
+ if (32768 !== (a.node.mode & 61440)) {
+ throw new H(19);
+ }
+ c = a.node.c;
+ if (h & 2 || c.buffer !== b && c.buffer !== b.buffer) {
+ if (0 < f || f + d < a.node.l) {
+ c.subarray ? c = c.subarray(f, f + d) : c = Array.prototype.slice.call(c, f, f + d);
+ }
+ a = !0;
+ f = b.buffer == q.buffer;
+ d = za(d);
+ if (!d) {
+ throw new H(12);
+ }
+ (f ? q : b).set(c, d);
+ } else {
+ a = !1, d = c.byteOffset;
+ }
+ return {j:d, Ea:a};
+}, fa:function(a, b, c, d, f) {
+ if (32768 !== (a.node.mode & 61440)) {
+ throw new H(19);
+ }
+ if (f & 2) {
+ return 0;
+ }
+ I.g.write(a, b, 0, d, c, !1);
+ return 0;
+}}}, K = {ea:!1, Va:function() {
+ K.ea = !!process.platform.match(/^win/);
+ var a = process.binding("constants");
+ a.fs && (a = a.fs);
+ K.va = {1024:a.O_APPEND, 64:a.O_CREAT, 128:a.O_EXCL, 0:a.O_RDONLY, 2:a.O_RDWR, 4096:a.O_SYNC, 512:a.O_TRUNC, 1:a.O_WRONLY};
+}, ra:function(a) {
+ return Buffer.s ? Buffer.from(a) : new Buffer(a);
+}, v:function(a) {
+ assert(ha);
+ return K.createNode(null, "/", K.za(a.ma.root), 0);
+}, createNode:function(a, b, c) {
+ if (!J(c) && 32768 !== (c & 61440) && 40960 !== (c & 61440)) {
+ throw new H(22);
+ }
+ a = Lb(a, b, c);
+ a.f = K.f;
+ a.g = K.g;
+ return a;
+}, za:function(a) {
+ try {
+ var b = fs.lstatSync(a);
+ K.ea && (b.mode = b.mode | (b.mode & 292) >> 2);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new H(-c.i);
+ }
+ return b.mode;
+}, A:function(a) {
+ for (var b = []; a.parent !== a;) {
+ b.push(a.name), a = a.parent;
+ }
+ b.push(a.v.ma.root);
+ b.reverse();
+ return Ab.apply(null, b);
+}, Ia:function(a) {
+ a &= -2656257;
+ var b = 0, c;
+ for (c in K.va) {
+ a & c && (b |= K.va[c], a ^= c);
+ }
+ if (a) {
+ throw new H(22);
+ }
+ return b;
+}, f:{I:function(a) {
+ a = K.A(a);
+ try {
+ var b = fs.lstatSync(a);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new H(-c.i);
+ }
+ K.ea && !b.L && (b.L = 4096);
+ K.ea && !b.blocks && (b.blocks = (b.size + b.L - 1) / b.L | 0);
+ return {dev:b.dev, ino:b.ino, mode:b.mode, nlink:b.nlink, uid:b.uid, gid:b.gid, rdev:b.rdev, size:b.size, atime:b.atime, mtime:b.mtime, ctime:b.ctime, L:b.L, blocks:b.blocks};
+}, C:function(a, b) {
+ var c = K.A(a);
+ try {
+ void 0 !== b.mode && (fs.chmodSync(c, b.mode), a.mode = b.mode), void 0 !== b.size && fs.truncateSync(c, b.size);
+ } catch (d) {
+ if (!d.code) {
+ throw d;
+ }
+ throw new H(-d.i);
+ }
+}, lookup:function(a, b) {
+ var c = Bb(K.A(a), b);
+ c = K.za(c);
+ return K.createNode(a, b, c);
+}, W:function(a, b, c, d) {
+ a = K.createNode(a, b, c, d);
+ b = K.A(a);
+ try {
+ J(a.mode) ? fs.mkdirSync(b, a.mode) : fs.writeFileSync(b, "", {mode:a.mode});
+ } catch (f) {
+ if (!f.code) {
+ throw f;
+ }
+ throw new H(-f.i);
+ }
+ return a;
+}, rename:function(a, b, c) {
+ a = K.A(a);
+ b = Bb(K.A(b), c);
+ try {
+ fs.renameSync(a, b);
+ } catch (d) {
+ if (!d.code) {
+ throw d;
+ }
+ throw new H(-d.i);
+ }
+}, unlink:function(a, b) {
+ a = Bb(K.A(a), b);
+ try {
+ fs.unlinkSync(a);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new H(-c.i);
+ }
+}, rmdir:function(a, b) {
+ a = Bb(K.A(a), b);
+ try {
+ fs.rmdirSync(a);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new H(-c.i);
+ }
+}, readdir:function(a) {
+ a = K.A(a);
+ try {
+ return fs.readdirSync(a);
+ } catch (b) {
+ if (!b.code) {
+ throw b;
+ }
+ throw new H(-b.i);
+ }
+}, symlink:function(a, b, c) {
+ a = Bb(K.A(a), b);
+ try {
+ fs.symlinkSync(c, a);
+ } catch (d) {
+ if (!d.code) {
+ throw d;
+ }
+ throw new H(-d.i);
+ }
+}, readlink:function(a) {
+ var b = K.A(a);
+ try {
+ return b = fs.readlinkSync(b), b = Ob.relative(Ob.resolve(a.v.ma.root), b);
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new H(-c.i);
+ }
+}}, g:{open:function(a) {
+ var b = K.A(a.node);
+ try {
+ 32768 === (a.node.mode & 61440) && (a.X = fs.openSync(b, K.Ia(a.flags)));
+ } catch (c) {
+ if (!c.code) {
+ throw c;
+ }
+ throw new H(-c.i);
+ }
+}, close:function(a) {
+ try {
+ 32768 === (a.node.mode & 61440) && a.X && fs.closeSync(a.X);
+ } catch (b) {
+ if (!b.code) {
+ throw b;
+ }
+ throw new H(-b.i);
+ }
+}, read:function(a, b, c, d, f) {
+ if (0 === d) {
+ return 0;
+ }
+ try {
+ return fs.readSync(a.X, K.ra(b.buffer), c, d, f);
+ } catch (g) {
+ throw new H(-g.i);
+ }
+}, write:function(a, b, c, d, f) {
+ try {
+ return fs.writeSync(a.X, K.ra(b.buffer), c, d, f);
+ } catch (g) {
+ throw new H(-g.i);
+ }
+}, K:function(a, b, c) {
+ if (1 === c) {
+ b += a.position;
+ } else {
+ if (2 === c && 32768 === (a.node.mode & 61440)) {
+ try {
+ b += fs.fstatSync(a.X).size;
+ } catch (d) {
+ throw new H(-d.i);
+ }
+ }
+ }
+ if (0 > b) {
+ throw new H(22);
+ }
+ return b;
+}}}, Pb = {0:"Success", 1:"Not super-user", 2:"No such file or directory", 3:"No such process", 4:"Interrupted system call", 5:"I/O error", 6:"No such device or address", 7:"Arg list too long", 8:"Exec format error", 9:"Bad file number", 10:"No children", 11:"No more processes", 12:"Not enough core", 13:"Permission denied", 14:"Bad address", 15:"Block device required", 16:"Mount device busy", 17:"File exists", 18:"Cross-device link", 19:"No such device", 20:"Not a directory", 21:"Is a directory",
+22:"Invalid argument", 23:"Too many open files in system", 24:"Too many open files", 25:"Not a typewriter", 26:"Text file busy", 27:"File too large", 28:"No space left on device", 29:"Illegal seek", 30:"Read only file system", 31:"Too many links", 32:"Broken pipe", 33:"Math arg out of domain of func", 34:"Math result not representable", 35:"File locking deadlock error", 36:"File or path name too long", 37:"No record locks available", 38:"Function not implemented", 39:"Directory not empty", 40:"Too many symbolic links",
+42:"No message of desired type", 43:"Identifier removed", 44:"Channel number out of range", 45:"Level 2 not synchronized", 46:"Level 3 halted", 47:"Level 3 reset", 48:"Link number out of range", 49:"Protocol driver not attached", 50:"No CSI structure available", 51:"Level 2 halted", 52:"Invalid exchange", 53:"Invalid request descriptor", 54:"Exchange full", 55:"No anode", 56:"Invalid request code", 57:"Invalid slot", 59:"Bad font file fmt", 60:"Device not a stream", 61:"No data (for no delay io)",
+62:"Timer expired", 63:"Out of streams resources", 64:"Machine is not on the network", 65:"Package not installed", 66:"The object is remote", 67:"The link has been severed", 68:"Advertise error", 69:"Srmount error", 70:"Communication error on send", 71:"Protocol error", 72:"Multihop attempted", 73:"Cross mount point (not really error)", 74:"Trying to read unreadable message", 75:"Value too large for defined data type", 76:"Given log. name not unique", 77:"f.d. invalid for this operation", 78:"Remote address changed",
+79:"Can access a needed shared lib", 80:"Accessing a corrupted shared lib", 81:".lib section in a.out corrupted", 82:"Attempting to link in too many libs", 83:"Attempting to exec a shared library", 84:"Illegal byte sequence", 86:"Streams pipe error", 87:"Too many users", 88:"Socket operation on non-socket", 89:"Destination address required", 90:"Message too long", 91:"Protocol wrong type for socket", 92:"Protocol not available", 93:"Unknown protocol", 94:"Socket type not supported", 95:"Not supported",
+96:"Protocol family not supported", 97:"Address family not supported by protocol family", 98:"Address already in use", 99:"Address not available", 100:"Network interface is not configured", 101:"Network is unreachable", 102:"Connection reset by network", 103:"Connection aborted", 104:"Connection reset by peer", 105:"No buffer space available", 106:"Socket is already connected", 107:"Socket is not connected", 108:"Can't send after socket shutdown", 109:"Too many references", 110:"Connection timed out",
+111:"Connection refused", 112:"Host is down", 113:"Host is unreachable", 114:"Socket already connected", 115:"Connection already in progress", 116:"Stale file handle", 122:"Quota exceeded", 123:"No medium (in tape drive)", 125:"Operation canceled", 130:"Previous owner died", 131:"State not recoverable"}, Qb = {Sc:1, rc:2, ed:3, Nb:4, Pb:5, Oc:6, ab:7, sc:8, kb:9, tb:10, hb:11, qd:11, wc:12, bb:13, Gb:14, Fc:15, rb:16, Fb:17, rd:18, qc:19, Hc:20, Rb:21, Ob:22, lc:23, cc:24, Mc:25, nd:26, Hb:27, Bc:28,
+dd:29, ad:30, dc:31, Uc:32, Cb:33, Yc:34, xc:42, Kb:43, ub:44, Tb:45, Ub:46, Vb:47, ac:48, od:49, oc:50, Sb:51, zb:35, tc:37, jb:52, nb:53, sd:54, mc:55, ob:56, pb:57, Ab:35, qb:59, Dc:60, pc:61, kd:62, Cc:63, yc:64, zc:65, $c:66, uc:67, fb:68, gd:69, vb:70, Vc:71, fc:72, Db:73, mb:74, Nc:76, lb:77, Zc:78, Wb:79, Xb:80, $b:81, Zb:82, Yb:83, Ec:38, Ic:39, hc:36, bc:40, Pc:95, Tc:96, yb:104, nc:105, gb:97, Xc:91, Kc:88, Ac:92, bd:108, xb:111, cb:98, wb:103, kc:101, ic:100, ld:110, Ib:112, Jb:113, Mb:115,
+ib:114, Bb:89, ec:90, Wc:93, cd:94, eb:99, jc:102, Qb:106, Gc:107, md:109, pd:87, Eb:122, hd:116, Lc:95, vc:123, Lb:84, Qc:75, sb:125, Jc:131, Rc:130, jd:86}, Rb = null, Sb = {}, Tb = [], Ub = 1, Vb = null, Wb = !0, L = {}, H = null, Mb = {};
+function M(a, b) {
+ a = Cb("/", a);
+ b = b || {};
+ if (!a) {
+ return {path:"", node:null};
+ }
+ var c = {wa:!0, oa:0}, d;
+ for (d in c) {
+ void 0 === b[d] && (b[d] = c[d]);
+ }
+ if (8 < b.oa) {
+ throw new H(40);
+ }
+ a = wb(a.split("/").filter(function(a) {
+ return !!a;
+ }), !1);
+ var f = Rb;
+ c = "/";
+ for (d = 0; d < a.length; d++) {
+ var g = d === a.length - 1;
+ if (g && b.parent) {
+ break;
+ }
+ f = Nb(f, a[d]);
+ c = Bb(c, a[d]);
+ f.S && (!g || g && b.wa) && (f = f.S.root);
+ if (!g || b.ka) {
+ for (g = 0; 40960 === (f.mode & 61440);) {
+ if (f = Xb(c), c = Cb(yb(c), f), f = M(c, {oa:b.oa}).node, 40 < g++) {
+ throw new H(40);
+ }
+ }
+ }
+ }
+ return {path:c, node:f};
+}
+function Yb(a) {
+ for (var b;;) {
+ if (a === a.parent) {
+ return a = a.v.Ca, b ? "/" !== a[a.length - 1] ? a + "/" + b : a + b : a;
+ }
+ b = b ? a.name + "/" + b : a.name;
+ a = a.parent;
+ }
+}
+function Zb(a, b) {
+ for (var c = 0, d = 0; d < b.length; d++) {
+ c = (c << 5) - c + b.charCodeAt(d) | 0;
+ }
+ return (a + c >>> 0) % Vb.length;
+}
+function $b(a) {
+ var b = Zb(a.parent.id, a.name);
+ a.T = Vb[b];
+ Vb[b] = a;
+}
+function ac(a) {
+ var b = Zb(a.parent.id, a.name);
+ if (Vb[b] === a) {
+ Vb[b] = a.T;
+ } else {
+ for (b = Vb[b]; b;) {
+ if (b.T === a) {
+ b.T = a.T;
+ break;
+ }
+ b = b.T;
+ }
+ }
+}
+function Nb(a, b) {
+ var c;
+ if (c = (c = bc(a, "x")) ? c : a.f.lookup ? 0 : 13) {
+ throw new H(c, a);
+ }
+ for (c = Vb[Zb(a.id, b)]; c; c = c.T) {
+ var d = c.name;
+ if (c.parent.id === a.id && d === b) {
+ return c;
+ }
+ }
+ return a.f.lookup(a, b);
+}
+function Lb(a, b, c, d) {
+ cc || (cc = function(a, b, c, d) {
+ a || (a = this);
+ this.parent = a;
+ this.v = a.v;
+ this.S = null;
+ this.id = Ub++;
+ this.name = b;
+ this.mode = c;
+ this.f = {};
+ this.g = {};
+ this.rdev = d;
+ }, cc.prototype = {}, Object.defineProperties(cc.prototype, {read:{get:function() {
+ return 365 === (this.mode & 365);
+ }, set:function(a) {
+ a ? this.mode |= 365 : this.mode &= -366;
+ }}, write:{get:function() {
+ return 146 === (this.mode & 146);
+ }, set:function(a) {
+ a ? this.mode |= 146 : this.mode &= -147;
+ }}}));
+ a = new cc(a, b, c, d);
+ $b(a);
+ return a;
+}
+function J(a) {
+ return 16384 === (a & 61440);
+}
+var dc = {r:0, rs:1052672, "r+":2, w:577, wx:705, xw:705, "w+":578, "wx+":706, "xw+":706, a:1089, ax:1217, xa:1217, "a+":1090, "ax+":1218, "xa+":1218};
+function ec(a) {
+ var b = ["r", "w", "rw"][a & 3];
+ a & 512 && (b += "w");
+ return b;
+}
+function bc(a, b) {
+ if (Wb) {
+ return 0;
+ }
+ if (-1 === b.indexOf("r") || a.mode & 292) {
+ if (-1 !== b.indexOf("w") && !(a.mode & 146) || -1 !== b.indexOf("x") && !(a.mode & 73)) {
+ return 13;
+ }
+ } else {
+ return 13;
+ }
+ return 0;
+}
+function fc(a, b) {
+ try {
+ return Nb(a, b), 17;
+ } catch (c) {
+ }
+ return bc(a, "wx");
+}
+function hc(a, b, c) {
+ try {
+ var d = Nb(a, b);
+ } catch (f) {
+ return f.i;
+ }
+ if (a = bc(a, "wx")) {
+ return a;
+ }
+ if (c) {
+ if (!J(d.mode)) {
+ return 20;
+ }
+ if (d === d.parent || "/" === Yb(d)) {
+ return 16;
+ }
+ } else {
+ if (J(d.mode)) {
+ return 21;
+ }
+ }
+ return 0;
+}
+function ic(a) {
+ var b = 4096;
+ for (a = a || 0; a <= b; a++) {
+ if (!Tb[a]) {
+ return a;
+ }
+ }
+ throw new H(24);
+}
+function jc(a, b) {
+ kc || (kc = function() {
+ }, kc.prototype = {}, Object.defineProperties(kc.prototype, {object:{get:function() {
+ return this.node;
+ }, set:function(a) {
+ this.node = a;
+ }}}));
+ var c = new kc, d;
+ for (d in a) {
+ c[d] = a[d];
+ }
+ a = c;
+ b = ic(b);
+ a.fd = b;
+ return Tb[b] = a;
+}
+var Kb = {open:function(a) {
+ a.g = Sb[a.node.rdev].g;
+ a.g.open && a.g.open(a);
+}, K:function() {
+ throw new H(29);
+}};
+function Fb(a, b) {
+ Sb[a] = {g:b};
+}
+function lc(a, b) {
+ var c = "/" === b, d = !b;
+ if (c && Rb) {
+ throw new H(16);
+ }
+ if (!c && !d) {
+ var f = M(b, {wa:!1});
+ b = f.path;
+ f = f.node;
+ if (f.S) {
+ throw new H(16);
+ }
+ if (!J(f.mode)) {
+ throw new H(20);
+ }
+ }
+ b = {type:a, ma:{}, Ca:b, Na:[]};
+ a = a.v(b);
+ a.v = b;
+ b.root = a;
+ c ? Rb = a : f && (f.S = b, f.v && f.v.Na.push(b));
+}
+function mc(a, b, c) {
+ var d = M(a, {parent:!0}).node;
+ a = zb(a);
+ if (!a || "." === a || ".." === a) {
+ throw new H(22);
+ }
+ var f = fc(d, a);
+ if (f) {
+ throw new H(f);
+ }
+ if (!d.f.W) {
+ throw new H(1);
+ }
+ return d.f.W(d, a, b, c);
+}
+function nc(a) {
+ mc(a, 16895, 0);
+}
+function oc(a, b, c) {
+ "undefined" === typeof c && (c = b, b = 438);
+ mc(a, b | 8192, c);
+}
+function pc(a, b) {
+ if (!Cb(a)) {
+ throw new H(2);
+ }
+ var c = M(b, {parent:!0}).node;
+ if (!c) {
+ throw new H(2);
+ }
+ b = zb(b);
+ var d = fc(c, b);
+ if (d) {
+ throw new H(d);
+ }
+ if (!c.f.symlink) {
+ throw new H(1);
+ }
+ c.f.symlink(c, b, a);
+}
+function Xb(a) {
+ a = M(a).node;
+ if (!a) {
+ throw new H(2);
+ }
+ if (!a.f.readlink) {
+ throw new H(22);
+ }
+ return Cb(Yb(a.parent), a.f.readlink(a));
+}
+function qc(a, b, c, d) {
+ if ("" === a) {
+ throw new H(2);
+ }
+ if ("string" === typeof b) {
+ var f = dc[b];
+ if ("undefined" === typeof f) {
+ throw Error("Unknown file open mode: " + b);
+ }
+ b = f;
+ }
+ c = b & 64 ? ("undefined" === typeof c ? 438 : c) & 4095 | 32768 : 0;
+ if ("object" === typeof a) {
+ var g = a;
+ } else {
+ a = xb(a);
+ try {
+ g = M(a, {ka:!(b & 131072)}).node;
+ } catch (k) {
+ }
+ }
+ f = !1;
+ if (b & 64) {
+ if (g) {
+ if (b & 128) {
+ throw new H(17);
+ }
+ } else {
+ g = mc(a, c, 0), f = !0;
+ }
+ }
+ if (!g) {
+ throw new H(2);
+ }
+ 8192 === (g.mode & 61440) && (b &= -513);
+ if (b & 65536 && !J(g.mode)) {
+ throw new H(20);
+ }
+ if (!f && (c = g ? 40960 === (g.mode & 61440) ? 40 : J(g.mode) && ("r" !== ec(b) || b & 512) ? 21 : bc(g, ec(b)) : 2)) {
+ throw new H(c);
+ }
+ if (b & 512) {
+ c = g;
+ var h;
+ "string" === typeof c ? h = M(c, {ka:!0}).node : h = c;
+ if (!h.f.C) {
+ throw new H(1);
+ }
+ if (J(h.mode)) {
+ throw new H(21);
+ }
+ if (32768 !== (h.mode & 61440)) {
+ throw new H(22);
+ }
+ if (c = bc(h, "w")) {
+ throw new H(c);
+ }
+ h.f.C(h, {size:0, timestamp:Date.now()});
+ }
+ b &= -641;
+ d = jc({node:g, path:Yb(g), flags:b, seekable:!0, position:0, g:g.g, $a:[], error:!1}, d);
+ d.g.open && d.g.open(d);
+ !e.logReadFiles || b & 1 || (rc || (rc = {}), a in rc || (rc[a] = 1, console.log("FS.trackingDelegate error on read file: " + a)));
+ try {
+ L.onOpenFile && (g = 0, 1 !== (b & 2097155) && (g |= 1), 0 !== (b & 2097155) && (g |= 2), L.onOpenFile(a, g));
+ } catch (k) {
+ console.log("FS.trackingDelegate['onOpenFile']('" + a + "', flags) threw an exception: " + k.message);
+ }
+ return d;
+}
+function sc(a, b, c) {
+ if (null === a.fd) {
+ throw new H(9);
+ }
+ if (!a.seekable || !a.g.K) {
+ throw new H(29);
+ }
+ if (0 != c && 1 != c && 2 != c) {
+ throw new H(22);
+ }
+ a.position = a.g.K(a, b, c);
+ a.$a = [];
+ return a.position;
+}
+function tc() {
+ H || (H = function(a, b) {
+ this.node = b;
+ this.Ta = function(a) {
+ this.i = a;
+ for (var b in Qb) {
+ if (Qb[b] === a) {
+ this.code = b;
+ break;
+ }
+ }
+ };
+ this.Ta(a);
+ this.message = Pb[a];
+ this.stack && Object.defineProperty(this, "stack", {value:Error().stack, writable:!0});
+ this.stack && (this.stack = pb(this.stack));
+ }, H.prototype = Error(), H.prototype.constructor = H, [2].forEach(function(a) {
+ Mb[a] = new H(a);
+ Mb[a].stack = "";
+ }));
+}
+var uc;
+function vc(a, b) {
+ var c = 0;
+ a && (c |= 365);
+ b && (c |= 146);
+ return c;
+}
+function wc(a, b, c) {
+ a = Bb("/dev", a);
+ var d = vc(!!b, !!c);
+ xc || (xc = 64);
+ var f = xc++ << 8 | 0;
+ Fb(f, {open:function(a) {
+ a.seekable = !1;
+ }, close:function() {
+ c && c.buffer && c.buffer.length && c(10);
+ }, read:function(a, c, d, f) {
+ for (var g = 0, h = 0; h < f; h++) {
+ try {
+ var k = b();
+ } catch (B) {
+ throw new H(5);
+ }
+ if (void 0 === k && 0 === g) {
+ throw new H(11);
+ }
+ if (null === k || void 0 === k) {
+ break;
+ }
+ g++;
+ c[d + h] = k;
+ }
+ g && (a.node.timestamp = Date.now());
+ return g;
+ }, write:function(a, b, d, f) {
+ for (var g = 0; g < f; g++) {
+ try {
+ c(b[d + g]);
+ } catch (u) {
+ throw new H(5);
+ }
+ }
+ f && (a.node.timestamp = Date.now());
+ return g;
+ }});
+ oc(a, d, f);
+}
+var xc, N = {}, cc, kc, rc, yc = {}, O = 0;
+function P() {
+ O += 4;
+ return p[O - 4 >> 2];
+}
+function zc() {
+ var a = Tb[P()];
+ if (!a) {
+ throw new H(9);
+ }
+ return a;
+}
+function Ac(a, b) {
+ if (-1 === a || 0 === b) {
+ return -22;
+ }
+ var c = yc[a];
+ if (!c) {
+ return 0;
+ }
+ if (b === c.wd) {
+ var d = Tb[c.fd], f = c.flags, g = new Uint8Array(w.subarray(a, a + b));
+ d && d.g.fa && d.g.fa(d, g, 0, b, f);
+ yc[a] = null;
+ c.Ea && Q(c.xd);
+ }
+ return 0;
+}
+function Bc(a) {
+ switch(a) {
+ case 1:
+ return 0;
+ case 2:
+ return 1;
+ case 4:
+ return 2;
+ case 8:
+ return 3;
+ default:
+ throw new TypeError("Unknown type size: " + a);
+ }
+}
+function Cc() {
+ for (var a = Array(256), b = 0; 256 > b; ++b) {
+ a[b] = String.fromCharCode(b);
+ }
+ Dc = a;
+}
+var Dc = void 0;
+function R(a) {
+ for (var b = ""; w[a];) {
+ b += Dc[w[a++]];
+ }
+ return b;
+}
+var Ec = {}, Fc = {}, Gc = {};
+function Hc(a) {
+ if (void 0 === a) {
+ return "_unknown";
+ }
+ a = a.replace(/[^a-zA-Z0-9_]/g, "$");
+ var b = a.charCodeAt(0);
+ return 48 <= b && 57 >= b ? "_" + a : a;
+}
+function Ic(a, b) {
+ a = Hc(a);
+ return (new Function("body", "return function " + a + '() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b);
+}
+function Jc(a, b) {
+ var c = Ic(b, function(a) {
+ this.name = b;
+ this.message = a;
+ a = Error(a).stack;
+ void 0 !== a && (this.stack = this.toString() + "\n" + a.replace(/^Error(:[^\n]*)?\n/, ""));
+ });
+ c.prototype = Object.create(a.prototype);
+ c.prototype.constructor = c;
+ c.prototype.toString = function() {
+ return void 0 === this.message ? this.name : this.name + ": " + this.message;
+ };
+ return c;
+}
+var Kc = void 0;
+function S(a) {
+ throw new Kc(a);
+}
+var Lc = void 0;
+function Mc(a) {
+ throw new Lc(a);
+}
+function T(a, b, c) {
+ function d(b) {
+ b = c(b);
+ b.length !== a.length && Mc("Mismatched type converter count");
+ for (var d = 0; d < a.length; ++d) {
+ U(a[d], b[d]);
+ }
+ }
+ a.forEach(function(a) {
+ Gc[a] = b;
+ });
+ var f = Array(b.length), g = [], h = 0;
+ b.forEach(function(a, b) {
+ Fc.hasOwnProperty(a) ? f[b] = Fc[a] : (g.push(a), Ec.hasOwnProperty(a) || (Ec[a] = []), Ec[a].push(function() {
+ f[b] = Fc[a];
+ ++h;
+ h === g.length && d(f);
+ }));
+ });
+ 0 === g.length && d(f);
+}
+function U(a, b, c) {
+ c = c || {};
+ if (!("argPackAdvance" in b)) {
+ throw new TypeError("registerType registeredInstance requires argPackAdvance");
+ }
+ var d = b.name;
+ a || S('type "' + d + '" must have a positive integer typeid pointer');
+ if (Fc.hasOwnProperty(a)) {
+ if (c.La) {
+ return;
+ }
+ S("Cannot register type '" + d + "' twice");
+ }
+ Fc[a] = b;
+ delete Gc[a];
+ Ec.hasOwnProperty(a) && (b = Ec[a], delete Ec[a], b.forEach(function(a) {
+ a();
+ }));
+}
+function Nc(a) {
+ if (!(this instanceof Oc && a instanceof Oc)) {
+ return !1;
+ }
+ var b = this.b.m.h, c = this.b.j, d = a.b.m.h;
+ for (a = a.b.j; b.F;) {
+ c = b.$(c), b = b.F;
+ }
+ for (; d.F;) {
+ a = d.$(a), d = d.F;
+ }
+ return b === d && c === a;
+}
+function Pc(a) {
+ return {count:a.count, R:a.R, Y:a.Y, j:a.j, m:a.m, B:a.B, D:a.D};
+}
+function Qc(a) {
+ S(a.b.m.h.name + " instance already deleted");
+}
+var Rc = !1;
+function Sc() {
+}
+function Tc(a) {
+ a.B ? a.D.O(a.B) : a.m.h.O(a.j);
+}
+function Uc(a) {
+ --a.count.value;
+ 0 === a.count.value && Tc(a);
+}
+function Vc(a) {
+ if ("undefined" === typeof FinalizationGroup) {
+ return Vc = function(a) {
+ return a;
+ }, a;
+ }
+ Rc = new FinalizationGroup(function(a) {
+ for (var b = a.next(); !b.done; b = a.next()) {
+ b = b.value, b.j ? Uc(b) : console.warn("object already deleted: " + b.j);
+ }
+ });
+ Vc = function(a) {
+ Rc.register(a, a.b, a.b);
+ return a;
+ };
+ Sc = function(a) {
+ Rc.unregister(a.b);
+ };
+ return Vc(a);
+}
+function Wc() {
+ this.b.j || Qc(this);
+ if (this.b.Y) {
+ return this.b.count.value += 1, this;
+ }
+ var a = Vc(Object.create(Object.getPrototypeOf(this), {b:{value:Pc(this.b)}}));
+ a.b.count.value += 1;
+ a.b.R = !1;
+ return a;
+}
+function Xc() {
+ this.b.j || Qc(this);
+ this.b.R && !this.b.Y && S("Object already scheduled for deletion");
+ Sc(this);
+ Uc(this.b);
+ this.b.Y || (this.b.B = void 0, this.b.j = void 0);
+}
+function Yc() {
+ return !this.b.j;
+}
+var Zc = void 0, $c = [];
+function ad() {
+ for (; $c.length;) {
+ var a = $c.pop();
+ a.b.R = !1;
+ a["delete"]();
+ }
+}
+function bd() {
+ this.b.j || Qc(this);
+ this.b.R && !this.b.Y && S("Object already scheduled for deletion");
+ $c.push(this);
+ 1 === $c.length && Zc && Zc(ad);
+ this.b.R = !0;
+ return this;
+}
+function cd() {
+ Oc.prototype.isAliasOf = Nc;
+ Oc.prototype.clone = Wc;
+ Oc.prototype["delete"] = Xc;
+ Oc.prototype.isDeleted = Yc;
+ Oc.prototype.deleteLater = bd;
+}
+function Oc() {
+}
+var dd = {};
+function ed(a, b, c) {
+ if (void 0 === a[b].o) {
+ var d = a[b];
+ a[b] = function() {
+ a[b].o.hasOwnProperty(arguments.length) || S("Function '" + c + "' called with an invalid number of arguments (" + arguments.length + ") - expects one of (" + a[b].o + ")!");
+ return a[b].o[arguments.length].apply(this, arguments);
+ };
+ a[b].o = [];
+ a[b].o[d.P] = d;
+ }
+}
+function fd(a, b, c) {
+ e.hasOwnProperty(a) ? ((void 0 === c || void 0 !== e[a].o && void 0 !== e[a].o[c]) && S("Cannot register public name '" + a + "' twice"), ed(e, a, a), e.hasOwnProperty(c) && S("Cannot register multiple overloads of a function with the same number of arguments (" + c + ")!"), e[a].o[c] = b) : (e[a] = b, void 0 !== c && (e[a].yd = c));
+}
+function gd(a, b, c, d, f, g, h, k) {
+ this.name = a;
+ this.constructor = b;
+ this.J = c;
+ this.O = d;
+ this.F = f;
+ this.Ja = g;
+ this.$ = h;
+ this.Ha = k;
+ this.Pa = [];
+}
+function hd(a, b, c) {
+ for (; b !== c;) {
+ b.$ || S("Expected null or instance of " + c.name + ", got an instance of " + b.name), a = b.$(a), b = b.F;
+ }
+ return a;
+}
+function id(a, b) {
+ if (null === b) {
+ return this.la && S("null is not a valid " + this.name), 0;
+ }
+ b.b || S('Cannot pass "' + jd(b) + '" as a ' + this.name);
+ b.b.j || S("Cannot pass deleted object as a pointer of type " + this.name);
+ return hd(b.b.j, b.b.m.h, this.h);
+}
+function kd(a, b) {
+ if (null === b) {
+ this.la && S("null is not a valid " + this.name);
+ if (this.da) {
+ var c = this.Qa();
+ null !== a && a.push(this.O, c);
+ return c;
+ }
+ return 0;
+ }
+ b.b || S('Cannot pass "' + jd(b) + '" as a ' + this.name);
+ b.b.j || S("Cannot pass deleted object as a pointer of type " + this.name);
+ !this.ba && b.b.m.ba && S("Cannot convert argument of type " + (b.b.D ? b.b.D.name : b.b.m.name) + " to parameter type " + this.name);
+ c = hd(b.b.j, b.b.m.h, this.h);
+ if (this.da) {
+ switch(void 0 === b.b.B && S("Passing raw pointer to smart pointer is illegal"), this.Ua) {
+ case 0:
+ b.b.D === this ? c = b.b.B : S("Cannot convert argument of type " + (b.b.D ? b.b.D.name : b.b.m.name) + " to parameter type " + this.name);
+ break;
+ case 1:
+ c = b.b.B;
+ break;
+ case 2:
+ if (b.b.D === this) {
+ c = b.b.B;
+ } else {
+ var d = b.clone();
+ c = this.Ra(c, ld(function() {
+ d["delete"]();
+ }));
+ null !== a && a.push(this.O, c);
+ }
+ break;
+ default:
+ S("Unsupporting sharing policy");
+ }
+ }
+ return c;
+}
+function md(a, b) {
+ if (null === b) {
+ return this.la && S("null is not a valid " + this.name), 0;
+ }
+ b.b || S('Cannot pass "' + jd(b) + '" as a ' + this.name);
+ b.b.j || S("Cannot pass deleted object as a pointer of type " + this.name);
+ b.b.m.ba && S("Cannot convert argument of type " + b.b.m.name + " to parameter type " + this.name);
+ return hd(b.b.j, b.b.m.h, this.h);
+}
+function nd(a) {
+ return this.fromWireType(y[a >> 2]);
+}
+function od(a) {
+ this.Da && (a = this.Da(a));
+ return a;
+}
+function pd(a) {
+ this.O && this.O(a);
+}
+function qd(a) {
+ if (null !== a) {
+ a["delete"]();
+ }
+}
+function rd(a, b, c) {
+ if (b === c) {
+ return a;
+ }
+ if (void 0 === c.F) {
+ return null;
+ }
+ a = rd(a, b, c.F);
+ return null === a ? null : c.Ha(a);
+}
+function sd() {
+ return Object.keys(td).length;
+}
+function ud() {
+ var a = [], b;
+ for (b in td) {
+ td.hasOwnProperty(b) && a.push(td[b]);
+ }
+ return a;
+}
+function vd(a) {
+ Zc = a;
+ $c.length && Zc && Zc(ad);
+}
+function wd() {
+ e.getInheritedInstanceCount = sd;
+ e.getLiveInheritedInstances = ud;
+ e.flushPendingDeletes = ad;
+ e.setDelayFunction = vd;
+}
+var td = {};
+function xd(a, b) {
+ for (void 0 === b && S("ptr should not be undefined"); a.F;) {
+ b = a.$(b), a = a.F;
+ }
+ return b;
+}
+function yd(a, b) {
+ b = xd(a, b);
+ return td[b];
+}
+function zd(a, b) {
+ b.m && b.j || Mc("makeClassHandle requires ptr and ptrType");
+ !!b.D !== !!b.B && Mc("Both smartPtrType and smartPtr must be specified");
+ b.count = {value:1};
+ return Vc(Object.create(a, {b:{value:b}}));
+}
+function Ad(a) {
+ function b() {
+ return this.da ? zd(this.h.J, {m:this.Oa, j:c, D:this, B:a}) : zd(this.h.J, {m:this, j:a});
+ }
+ var c = this.Ka(a);
+ if (!c) {
+ return this.ta(a), null;
+ }
+ var d = yd(this.h, c);
+ if (void 0 !== d) {
+ if (0 === d.b.count.value) {
+ return d.b.j = c, d.b.B = a, d.clone();
+ }
+ d = d.clone();
+ this.ta(a);
+ return d;
+ }
+ d = this.h.Ja(c);
+ d = dd[d];
+ if (!d) {
+ return b.call(this);
+ }
+ d = this.ba ? d.Ga : d.pointerType;
+ var f = rd(c, this.h, d.h);
+ return null === f ? b.call(this) : this.da ? zd(d.h.J, {m:d, j:f, D:this, B:a}) : zd(d.h.J, {m:d, j:f});
+}
+function Bd() {
+ V.prototype.Ka = od;
+ V.prototype.ta = pd;
+ V.prototype.argPackAdvance = 8;
+ V.prototype.readValueFromPointer = nd;
+ V.prototype.deleteObject = qd;
+ V.prototype.fromWireType = Ad;
+}
+function V(a, b, c, d, f, g, h, k, t, r, u) {
+ this.name = a;
+ this.h = b;
+ this.la = c;
+ this.ba = d;
+ this.da = f;
+ this.Oa = g;
+ this.Ua = h;
+ this.Da = k;
+ this.Qa = t;
+ this.Ra = r;
+ this.O = u;
+ f || void 0 !== b.F ? this.toWireType = kd : (this.toWireType = d ? id : md, this.H = null);
+}
+function Cd(a, b, c) {
+ e.hasOwnProperty(a) || Mc("Replacing nonexistant public symbol");
+ void 0 !== e[a].o && void 0 !== c ? e[a].o[c] = b : (e[a] = b, e[a].P = c);
+}
+function W(a, b) {
+ a = R(a);
+ if (void 0 !== e["FUNCTION_TABLE_" + a]) {
+ var c = e["FUNCTION_TABLE_" + a][b];
+ } else {
+ if ("undefined" !== typeof FUNCTION_TABLE) {
+ c = FUNCTION_TABLE[b];
+ } else {
+ c = e["dynCall_" + a];
+ void 0 === c && (c = e["dynCall_" + a.replace(/f/g, "d")], void 0 === c && S("No dynCall invoker for signature: " + a));
+ for (var d = [], f = 1; f < a.length; ++f) {
+ d.push("a" + f);
+ }
+ f = "return function " + ("dynCall_" + a + "_" + b) + "(" + d.join(", ") + ") {\n";
+ f += " return dynCall(rawFunction" + (d.length ? ", " : "") + d.join(", ") + ");\n";
+ c = (new Function("dynCall", "rawFunction", f + "};\n"))(c, b);
+ }
+ }
+ "function" !== typeof c && S("unknown function pointer with signature " + a + ": " + b);
+ return c;
+}
+var Dd = void 0;
+function Ed(a) {
+ a = Fd(a);
+ var b = R(a);
+ Q(a);
+ return b;
+}
+function Gd(a, b) {
+ function c(a) {
+ f[a] || Fc[a] || (Gc[a] ? Gc[a].forEach(c) : (d.push(a), f[a] = !0));
+ }
+ var d = [], f = {};
+ b.forEach(c);
+ throw new Dd(a + ": " + d.map(Ed).join([", "]));
+}
+function Hd(a, b) {
+ if (!(a instanceof Function)) {
+ throw new TypeError("new_ called with constructor type " + typeof a + " which is not a function");
+ }
+ var c = Ic(a.name || "unknownFunctionName", function() {
+ });
+ c.prototype = a.prototype;
+ c = new c;
+ a = a.apply(c, b);
+ return a instanceof Object ? a : c;
+}
+function Id(a) {
+ for (; a.length;) {
+ var b = a.pop();
+ a.pop()(b);
+ }
+}
+function Jd(a, b, c, d, f) {
+ var g = b.length;
+ 2 > g && S("argTypes array size mismatch! Must at least get return value and 'this' types!");
+ var h = null !== b[1] && null !== c, k = !1;
+ for (c = 1; c < b.length; ++c) {
+ if (null !== b[c] && void 0 === b[c].H) {
+ k = !0;
+ break;
+ }
+ }
+ var t = "void" !== b[0].name, r = "", u = "";
+ for (c = 0; c < g - 2; ++c) {
+ r += (0 !== c ? ", " : "") + "arg" + c, u += (0 !== c ? ", " : "") + "arg" + c + "Wired";
+ }
+ a = "return function " + Hc(a) + "(" + r + ") {\nif (arguments.length !== " + (g - 2) + ") {\nthrowBindingError('function " + a + " called with ' + arguments.length + ' arguments, expected " + (g - 2) + " args!');\n}\n";
+ k && (a += "var destructors = [];\n");
+ var z = k ? "destructors" : "null";
+ r = "throwBindingError invoker fn runDestructors retType classParam".split(" ");
+ d = [S, d, f, Id, b[0], b[1]];
+ h && (a += "var thisWired = classParam.toWireType(" + z + ", this);\n");
+ for (c = 0; c < g - 2; ++c) {
+ a += "var arg" + c + "Wired = argType" + c + ".toWireType(" + z + ", arg" + c + "); // " + b[c + 2].name + "\n", r.push("argType" + c), d.push(b[c + 2]);
+ }
+ h && (u = "thisWired" + (0 < u.length ? ", " : "") + u);
+ a += (t ? "var rv = " : "") + "invoker(fn" + (0 < u.length ? ", " : "") + u + ");\n";
+ if (k) {
+ a += "runDestructors(destructors);\n";
+ } else {
+ for (c = h ? 1 : 2; c < b.length; ++c) {
+ g = 1 === c ? "thisWired" : "arg" + (c - 2) + "Wired", null !== b[c].H && (a += g + "_dtor(" + g + "); // " + b[c].name + "\n", r.push(g + "_dtor"), d.push(b[c].H));
+ }
+ }
+ t && (a += "var ret = retType.fromWireType(rv);\nreturn ret;\n");
+ r.push(a + "}\n");
+ return Hd(Function, r).apply(null, d);
+}
+function Kd(a, b) {
+ for (var c = [], d = 0; d < a; d++) {
+ c.push(p[(b >> 2) + d]);
+ }
+ return c;
+}
+function Ld(a, b, c) {
+ a instanceof Object || S(c + ' with invalid "this": ' + a);
+ a instanceof b.h.constructor || S(c + ' incompatible with "this" of type ' + a.constructor.name);
+ a.b.j || S("cannot call emscripten binding method " + c + " on deleted object");
+ return hd(a.b.j, a.b.m.h, b.h);
+}
+var Md = [], X = [{}, {value:void 0}, {value:null}, {value:!0}, {value:!1}];
+function Nd(a) {
+ 4 < a && 0 === --X[a].pa && (X[a] = void 0, Md.push(a));
+}
+function Od() {
+ for (var a = 0, b = 5; b < X.length; ++b) {
+ void 0 !== X[b] && ++a;
+ }
+ return a;
+}
+function Pd() {
+ for (var a = 5; a < X.length; ++a) {
+ if (void 0 !== X[a]) {
+ return X[a];
+ }
+ }
+ return null;
+}
+function Qd() {
+ e.count_emval_handles = Od;
+ e.get_first_emval = Pd;
+}
+function ld(a) {
+ switch(a) {
+ case void 0:
+ return 1;
+ case null:
+ return 2;
+ case !0:
+ return 3;
+ case !1:
+ return 4;
+ default:
+ var b = Md.length ? Md.pop() : X.length;
+ X[b] = {pa:1, value:a};
+ return b;
+ }
+}
+function jd(a) {
+ if (null === a) {
+ return "null";
+ }
+ var b = typeof a;
+ return "object" === b || "array" === b || "function" === b ? a.toString() : "" + a;
+}
+function Rd(a, b) {
+ switch(b) {
+ case 2:
+ return function(a) {
+ return this.fromWireType(Ja[a >> 2]);
+ };
+ case 3:
+ return function(a) {
+ return this.fromWireType(Ka[a >> 3]);
+ };
+ default:
+ throw new TypeError("Unknown float type: " + a);
+ }
+}
+function Sd(a, b, c) {
+ switch(b) {
+ case 0:
+ return c ? function(a) {
+ return q[a];
+ } : function(a) {
+ return w[a];
+ };
+ case 1:
+ return c ? function(a) {
+ return Ha[a >> 1];
+ } : function(a) {
+ return Ia[a >> 1];
+ };
+ case 2:
+ return c ? function(a) {
+ return p[a >> 2];
+ } : function(a) {
+ return y[a >> 2];
+ };
+ default:
+ throw new TypeError("Unknown integer type: " + a);
+ }
+}
+function Td(a, b) {
+ var c = Fc[a];
+ void 0 === c && S(b + " has unknown type " + Ed(a));
+ return c;
+}
+function Ud() {
+ void 0 === Ud.start && (Ud.start = Date.now());
+ return 1E3 * (Date.now() - Ud.start) | 0;
+}
+function ra() {
+ return q.length;
+}
+function Vd(a) {
+ return 0 > a || 0 === a && -Infinity === 1 / a;
+}
+function Wd(a, b) {
+ function c(a) {
+ var b = d;
+ "double" === a || "i64" === a ? b & 7 && (assert(4 === (b & 7)), b += 4) : assert(0 === (b & 3));
+ d = b;
+ "double" === a ? (a = Ka[d >> 3], d += 8) : "i64" == a ? (a = [p[d >> 2], p[d + 4 >> 2]], d += 8) : (assert(0 === (d & 3)), a = p[d >> 2], d += 4);
+ return a;
+ }
+ assert(0 === (b & 3));
+ for (var d = b, f = [], g, h;;) {
+ var k = a;
+ g = q[a >> 0];
+ if (0 === g) {
+ break;
+ }
+ h = q[a + 1 >> 0];
+ if (37 == g) {
+ var t = !1, r = b = !1, u = !1, z = !1;
+ a: for (;;) {
+ switch(h) {
+ case 43:
+ t = !0;
+ break;
+ case 45:
+ b = !0;
+ break;
+ case 35:
+ r = !0;
+ break;
+ case 48:
+ if (u) {
+ break a;
+ } else {
+ u = !0;
+ break;
+ }
+ case 32:
+ z = !0;
+ break;
+ default:
+ break a;
+ }
+ a++;
+ h = q[a + 1 >> 0];
+ }
+ var B = 0;
+ if (42 == h) {
+ B = c("i32"), a++, h = q[a + 1 >> 0];
+ } else {
+ for (; 48 <= h && 57 >= h;) {
+ B = 10 * B + (h - 48), a++, h = q[a + 1 >> 0];
+ }
+ }
+ var C = !1, A = -1;
+ if (46 == h) {
+ A = 0;
+ C = !0;
+ a++;
+ h = q[a + 1 >> 0];
+ if (42 == h) {
+ A = c("i32"), a++;
+ } else {
+ for (;;) {
+ h = q[a + 1 >> 0];
+ if (48 > h || 57 < h) {
+ break;
+ }
+ A = 10 * A + (h - 48);
+ a++;
+ }
+ }
+ h = q[a + 1 >> 0];
+ }
+ 0 > A && (A = 6, C = !1);
+ switch(String.fromCharCode(h)) {
+ case "h":
+ h = q[a + 2 >> 0];
+ if (104 == h) {
+ a++;
+ var D = 1;
+ } else {
+ D = 2;
+ }
+ break;
+ case "l":
+ h = q[a + 2 >> 0];
+ 108 == h ? (a++, D = 8) : D = 4;
+ break;
+ case "L":
+ case "q":
+ case "j":
+ D = 8;
+ break;
+ case "z":
+ case "t":
+ case "I":
+ D = 4;
+ break;
+ default:
+ D = null;
+ }
+ D && a++;
+ h = q[a + 1 >> 0];
+ switch(String.fromCharCode(h)) {
+ case "d":
+ case "i":
+ case "u":
+ case "o":
+ case "x":
+ case "X":
+ case "p":
+ k = 100 == h || 105 == h;
+ D = D || 4;
+ g = c("i" + 8 * D);
+ 8 == D && (g = ua(g[0], g[1], 117 == h));
+ 4 >= D && (g = (k ? Wa : Va)(g & Math.pow(256, D) - 1, 8 * D));
+ var ia = Math.abs(g);
+ k = "";
+ if (100 == h || 105 == h) {
+ var v = Wa(g, 8 * D, 1).toString(10);
+ } else {
+ if (117 == h) {
+ v = Va(g, 8 * D, 1).toString(10), g = Math.abs(g);
+ } else {
+ if (111 == h) {
+ v = (r ? "0" : "") + ia.toString(8);
+ } else {
+ if (120 == h || 88 == h) {
+ k = r && 0 != g ? "0x" : "";
+ if (0 > g) {
+ g = -g;
+ v = (ia - 1).toString(16);
+ ia = [];
+ for (r = 0; r < v.length; r++) {
+ ia.push((15 - parseInt(v[r], 16)).toString(16));
+ }
+ for (v = ia.join(""); v.length < 2 * D;) {
+ v = "f" + v;
+ }
+ } else {
+ v = ia.toString(16);
+ }
+ 88 == h && (k = k.toUpperCase(), v = v.toUpperCase());
+ } else {
+ 112 == h && (0 === ia ? v = "(nil)" : (k = "0x", v = ia.toString(16)));
+ }
+ }
+ }
+ }
+ if (C) {
+ for (; v.length < A;) {
+ v = "0" + v;
+ }
+ }
+ 0 <= g && (t ? k = "+" + k : z && (k = " " + k));
+ "-" == v.charAt(0) && (k = "-" + k, v = v.substr(1));
+ for (; k.length + v.length < B;) {
+ b ? v += " " : u ? v = "0" + v : k = " " + k;
+ }
+ v = k + v;
+ v.split("").forEach(function(a) {
+ f.push(a.charCodeAt(0));
+ });
+ break;
+ case "f":
+ case "F":
+ case "e":
+ case "E":
+ case "g":
+ case "G":
+ g = c("double");
+ if (isNaN(g)) {
+ v = "nan", u = !1;
+ } else {
+ if (isFinite(g)) {
+ C = !1;
+ D = Math.min(A, 20);
+ if (103 == h || 71 == h) {
+ C = !0, A = A || 1, D = parseInt(g.toExponential(D).split("e")[1], 10), A > D && -4 <= D ? (h = (103 == h ? "f" : "F").charCodeAt(0), A -= D + 1) : (h = (103 == h ? "e" : "E").charCodeAt(0), A--), D = Math.min(A, 20);
+ }
+ if (101 == h || 69 == h) {
+ v = g.toExponential(D), /[eE][-+]\d$/.test(v) && (v = v.slice(0, -1) + "0" + v.slice(-1));
+ } else {
+ if (102 == h || 70 == h) {
+ v = g.toFixed(D), 0 === g && Vd(g) && (v = "-" + v);
+ }
+ }
+ k = v.split("e");
+ if (C && !r) {
+ for (; 1 < k[0].length && -1 != k[0].indexOf(".") && ("0" == k[0].slice(-1) || "." == k[0].slice(-1));) {
+ k[0] = k[0].slice(0, -1);
+ }
+ } else {
+ for (r && -1 == v.indexOf(".") && (k[0] += "."); A > D++;) {
+ k[0] += "0";
+ }
+ }
+ v = k[0] + (1 < k.length ? "e" + k[1] : "");
+ 69 == h && (v = v.toUpperCase());
+ 0 <= g && (t ? v = "+" + v : z && (v = " " + v));
+ } else {
+ v = (0 > g ? "-" : "") + "inf", u = !1;
+ }
+ }
+ for (; v.length < B;) {
+ b ? v += " " : !u || "-" != v[0] && "+" != v[0] ? v = (u ? "0" : " ") + v : v = v[0] + "0" + v.slice(1);
+ }
+ 97 > h && (v = v.toUpperCase());
+ v.split("").forEach(function(a) {
+ f.push(a.charCodeAt(0));
+ });
+ break;
+ case "s":
+ u = (t = c("i8*")) ? Xd(t) : 6;
+ C && (u = Math.min(u, A));
+ if (!b) {
+ for (; u < B--;) {
+ f.push(32);
+ }
+ }
+ if (t) {
+ for (r = 0; r < u; r++) {
+ f.push(w[t++ >> 0]);
+ }
+ } else {
+ f = f.concat(Hb("(null)".substr(0, u), !0));
+ }
+ if (b) {
+ for (; u < B--;) {
+ f.push(32);
+ }
+ }
+ break;
+ case "c":
+ for (b && f.push(c("i8")); 0 < --B;) {
+ f.push(32);
+ }
+ b || f.push(c("i8"));
+ break;
+ case "n":
+ b = c("i32*");
+ p[b >> 2] = f.length;
+ break;
+ case "%":
+ f.push(g);
+ break;
+ default:
+ for (r = k; r < a + 2; r++) {
+ f.push(q[r >> 0]);
+ }
+ }
+ a += 2;
+ } else {
+ f.push(g), a += 1;
+ }
+ }
+ return f;
+}
+function Yd(a) {
+ if (!a || !a.callee || !a.callee.name) {
+ return [null, "", ""];
+ }
+ var b = a.callee.name, c = "(", d = !0, f;
+ for (f in a) {
+ var g = a[f];
+ d || (c += ", ");
+ d = !1;
+ c = "number" === typeof g || "string" === typeof g ? c + g : c + ("(" + typeof g + ")");
+ }
+ c += ")";
+ a = (a = a.callee.caller) ? a.arguments : [];
+ d && (c = "");
+ return [a, b, c];
+}
+function Zd(a) {
+ var b = qb();
+ b = b.slice(b.indexOf("\n", Math.max(b.lastIndexOf("_emscripten_log"), b.lastIndexOf("_emscripten_get_callstack"))) + 1);
+ a & 8 && (sa('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'), a = a ^ 8 | 16);
+ var c = null;
+ if (a & 128) {
+ for (c = Yd(arguments); 0 <= c[1].indexOf("_emscripten_");) {
+ c = Yd(c[0]);
+ }
+ }
+ var d = b.split("\n");
+ b = "";
+ var f = /\s*(.*?)@(.*?):([0-9]+):([0-9]+)/, g = /\s*(.*?)@(.*):(.*)(:(.*))?/, h = /\s*at (.*?) \((.*):(.*):(.*)\)/, k;
+ for (k in d) {
+ var t = d[k], r;
+ if ((r = h.exec(t)) && 5 == r.length) {
+ t = r[1];
+ var u = r[2];
+ var z = r[3];
+ r = r[4];
+ } else {
+ if ((r = f.exec(t)) || (r = g.exec(t)), r && 4 <= r.length) {
+ t = r[1], u = r[2], z = r[3], r = r[4] | 0;
+ } else {
+ b += t + "\n";
+ continue;
+ }
+ }
+ var B = a & 32 ? ob(t) : t;
+ B || (B = t);
+ var C = !1;
+ if (a & 8) {
+ var A = (void 0).zd({line:z, Fa:r});
+ if (C = A && A.source) {
+ a & 64 && (A.source = A.source.substring(A.source.replace(/\\/g, "/").lastIndexOf("/") + 1)), b += " at " + B + " (" + A.source + ":" + A.line + ":" + A.Fa + ")\n";
+ }
+ }
+ if (a & 16 || !C) {
+ a & 64 && (u = u.substring(u.replace(/\\/g, "/").lastIndexOf("/") + 1)), b += (C ? " = " + t : " at " + B) + " (" + u + ":" + z + ":" + r + ")\n";
+ }
+ a & 128 && c[0] && (c[1] == t && 0 < c[2].length && (b = b.replace(/\s+$/, ""), b += " with values: " + c[1] + c[2] + "\n"), c = Yd(c[0]));
+ }
+ return b = b.replace(/\s+$/, "");
+}
+function $d(a, b) {
+ a & 24 && (b = b.replace(/\s+$/, ""), b += (0 < b.length ? "\n" : "") + Zd(a));
+ a & 1 ? a & 4 ? console.error(b) : a & 2 ? console.warn(b) : console.log(b) : a & 6 ? n(b) : oa(b);
+}
+function ae(a, b, c) {
+ w.set(w.subarray(b, b + c), a);
+}
+function Y(a) {
+ a = eval(x(a));
+ if (null == a) {
+ return 0;
+ }
+ var b = Ea(a);
+ if (!Y.s || Y.s < b + 1) {
+ Y.s && Q(Y.buffer), Y.s = b + 1, Y.buffer = za(Y.s);
+ }
+ Da(a, Y.buffer, Y.s);
+ return Y.buffer;
+}
+function be(a) {
+ if (0 === a) {
+ return 0;
+ }
+ a = x(a);
+ if (!G.hasOwnProperty(a)) {
+ return 0;
+ }
+ be.ja && Q(be.ja);
+ a = G[a];
+ var b = Ea(a) + 1, c = za(b);
+ c && Ca(a, q, c, b);
+ be.ja = c;
+ return be.ja;
+}
+Da("GMT", 1047648, 4);
+function ce() {
+ function a(a) {
+ return (a = a.toTimeString().match(/\(([A-Za-z ]+)\)$/)) ? a[1] : "GMT";
+ }
+ if (!ce.s) {
+ ce.s = !0;
+ p[de() >> 2] = 60 * (new Date).getTimezoneOffset();
+ var b = new Date(2000, 0, 1), c = new Date(2000, 6, 1);
+ p[ee() >> 2] = Number(b.getTimezoneOffset() != c.getTimezoneOffset());
+ var d = a(b), f = a(c);
+ d = ya(Hb(d));
+ f = ya(Hb(f));
+ c.getTimezoneOffset() < b.getTimezoneOffset() ? (p[fe() >> 2] = d, p[fe() + 4 >> 2] = f) : (p[fe() >> 2] = f, p[fe() + 4 >> 2] = d);
+ }
+}
+function ge(a, b) {
+ ce();
+ a = new Date(1000 * p[a >> 2]);
+ p[b >> 2] = a.getSeconds();
+ p[b + 4 >> 2] = a.getMinutes();
+ p[b + 8 >> 2] = a.getHours();
+ p[b + 12 >> 2] = a.getDate();
+ p[b + 16 >> 2] = a.getMonth();
+ p[b + 20 >> 2] = a.getFullYear() - 1900;
+ p[b + 24 >> 2] = a.getDay();
+ var c = new Date(a.getFullYear(), 0, 1);
+ p[b + 28 >> 2] = (a.getTime() - c.getTime()) / 864E5 | 0;
+ p[b + 36 >> 2] = -(60 * a.getTimezoneOffset());
+ var d = (new Date(2000, 6, 1)).getTimezoneOffset();
+ c = c.getTimezoneOffset();
+ a = (d != c && a.getTimezoneOffset() == Math.min(c, d)) | 0;
+ p[b + 32 >> 2] = a;
+ a = p[fe() + (a ? 4 : 0) >> 2];
+ p[b + 40 >> 2] = a;
+ return b;
+}
+function he(a) {
+ a = Ga(a);
+ var b = buffer.byteLength;
+ try {
+ return -1 !== wa.grow((a - b) / 65536) ? (buffer = wa.buffer, !0) : !1;
+ } catch (c) {
+ return console.error("emscripten_realloc_buffer: Attempted to grow from " + b + " bytes to " + a + " bytes, but got error: " + c), !1;
+ }
+}
+function ie(a) {
+ var b = ra();
+ assert(a > b);
+ if (2147418112 < a) {
+ return n("Cannot enlarge memory, asked to go up to " + a + " bytes, but the limit is 2147418112 bytes!"), !1;
+ }
+ for (var c = Math.max(b, 16777216); c < a;) {
+ 536870912 >= c ? c = Ga(2 * c) : c = Math.min(Ga((3 * c + 2147483648) / 4), 2147418112), c === b && sa("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only " + q.length);
+ }
+ if (!he(c)) {
+ return n("Failed to grow the heap from " + b + " bytes to " + c + " bytes, not enough memory!"), !1;
+ }
+ La();
+ return !0;
+}
+function je(a) {
+ return 0 === a % 4 && (0 !== a % 100 || 0 === a % 400);
+}
+function ke(a, b) {
+ for (var c = 0, d = 0; d <= b; c += a[d++]) {
+ }
+ return c;
+}
+var le = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], me = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
+function ne(a, b) {
+ for (a = new Date(a.getTime()); 0 < b;) {
+ var c = a.getMonth(), d = (je(a.getFullYear()) ? le : me)[c];
+ if (b > d - a.getDate()) {
+ b -= d - a.getDate() + 1, a.setDate(1), 11 > c ? a.setMonth(c + 1) : (a.setMonth(0), a.setFullYear(a.getFullYear() + 1));
+ } else {
+ a.setDate(a.getDate() + b);
+ break;
+ }
+ }
+ return a;
+}
+function oe(a, b, c, d) {
+ function f(a, b, c) {
+ for (a = "number" === typeof a ? a.toString() : a || ""; a.length < b;) {
+ a = c[0] + a;
+ }
+ return a;
+ }
+ function g(a, b) {
+ return f(a, b, "0");
+ }
+ function h(a, b) {
+ function c(a) {
+ return 0 > a ? -1 : 0 < a ? 1 : 0;
+ }
+ var d;
+ 0 === (d = c(a.getFullYear() - b.getFullYear())) && 0 === (d = c(a.getMonth() - b.getMonth())) && (d = c(a.getDate() - b.getDate()));
+ return d;
+ }
+ function k(a) {
+ switch(a.getDay()) {
+ case 0:
+ return new Date(a.getFullYear() - 1, 11, 29);
+ case 1:
+ return a;
+ case 2:
+ return new Date(a.getFullYear(), 0, 3);
+ case 3:
+ return new Date(a.getFullYear(), 0, 2);
+ case 4:
+ return new Date(a.getFullYear(), 0, 1);
+ case 5:
+ return new Date(a.getFullYear() - 1, 11, 31);
+ case 6:
+ return new Date(a.getFullYear() - 1, 11, 30);
+ }
+ }
+ function t(a) {
+ a = ne(new Date(a.u + 1900, 0, 1), a.ia);
+ var b = k(new Date(a.getFullYear() + 1, 0, 4));
+ return 0 >= h(k(new Date(a.getFullYear(), 0, 4)), a) ? 0 >= h(b, a) ? a.getFullYear() + 1 : a.getFullYear() : a.getFullYear() - 1;
+ }
+ var r = p[d + 40 >> 2];
+ d = {Ya:p[d >> 2], Xa:p[d + 4 >> 2], ga:p[d + 8 >> 2], Z:p[d + 12 >> 2], V:p[d + 16 >> 2], u:p[d + 20 >> 2], ha:p[d + 24 >> 2], ia:p[d + 28 >> 2], Ad:p[d + 32 >> 2], Wa:p[d + 36 >> 2], Za:r ? x(r) : ""};
+ c = x(c);
+ r = {"%c":"%a %b %d %H:%M:%S %Y", "%D":"%m/%d/%y", "%F":"%Y-%m-%d", "%h":"%b", "%r":"%I:%M:%S %p", "%R":"%H:%M", "%T":"%H:%M:%S", "%x":"%m/%d/%y", "%X":"%H:%M:%S", "%Ec":"%c", "%EC":"%C", "%Ex":"%m/%d/%y", "%EX":"%H:%M:%S", "%Ey":"%y", "%EY":"%Y", "%Od":"%d", "%Oe":"%e", "%OH":"%H", "%OI":"%I", "%Om":"%m", "%OM":"%M", "%OS":"%S", "%Ou":"%u", "%OU":"%U", "%OV":"%V", "%Ow":"%w", "%OW":"%W", "%Oy":"%y"};
+ for (var u in r) {
+ c = c.replace(new RegExp(u, "g"), r[u]);
+ }
+ var z = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), B = "January February March April May June July August September October November December".split(" ");
+ r = {"%a":function(a) {
+ return z[a.ha].substring(0, 3);
+ }, "%A":function(a) {
+ return z[a.ha];
+ }, "%b":function(a) {
+ return B[a.V].substring(0, 3);
+ }, "%B":function(a) {
+ return B[a.V];
+ }, "%C":function(a) {
+ return g((a.u + 1900) / 100 | 0, 2);
+ }, "%d":function(a) {
+ return g(a.Z, 2);
+ }, "%e":function(a) {
+ return f(a.Z, 2, " ");
+ }, "%g":function(a) {
+ return t(a).toString().substring(2);
+ }, "%G":function(a) {
+ return t(a);
+ }, "%H":function(a) {
+ return g(a.ga, 2);
+ }, "%I":function(a) {
+ a = a.ga;
+ 0 == a ? a = 12 : 12 < a && (a -= 12);
+ return g(a, 2);
+ }, "%j":function(a) {
+ return g(a.Z + ke(je(a.u + 1900) ? le : me, a.V - 1), 3);
+ }, "%m":function(a) {
+ return g(a.V + 1, 2);
+ }, "%M":function(a) {
+ return g(a.Xa, 2);
+ }, "%n":function() {
+ return "\n";
+ }, "%p":function(a) {
+ return 0 <= a.ga && 12 > a.ga ? "AM" : "PM";
+ }, "%S":function(a) {
+ return g(a.Ya, 2);
+ }, "%t":function() {
+ return "\t";
+ }, "%u":function(a) {
+ return a.ha || 7;
+ }, "%U":function(a) {
+ var b = new Date(a.u + 1900, 0, 1), c = 0 === b.getDay() ? b : ne(b, 7 - b.getDay());
+ a = new Date(a.u + 1900, a.V, a.Z);
+ return 0 > h(c, a) ? g(Math.ceil((31 - c.getDate() + (ke(je(a.getFullYear()) ? le : me, a.getMonth() - 1) - 31) + a.getDate()) / 7), 2) : 0 === h(c, b) ? "01" : "00";
+ }, "%V":function(a) {
+ var b = k(new Date(a.u + 1900, 0, 4)), c = k(new Date(a.u + 1901, 0, 4)), d = ne(new Date(a.u + 1900, 0, 1), a.ia);
+ return 0 > h(d, b) ? "53" : 0 >= h(c, d) ? "01" : g(Math.ceil((b.getFullYear() < a.u + 1900 ? a.ia + 32 - b.getDate() : a.ia + 1 - b.getDate()) / 7), 2);
+ }, "%w":function(a) {
+ return a.ha;
+ }, "%W":function(a) {
+ var b = new Date(a.u, 0, 1), c = 1 === b.getDay() ? b : ne(b, 0 === b.getDay() ? 1 : 7 - b.getDay() + 1);
+ a = new Date(a.u + 1900, a.V, a.Z);
+ return 0 > h(c, a) ? g(Math.ceil((31 - c.getDate() + (ke(je(a.getFullYear()) ? le : me, a.getMonth() - 1) - 31) + a.getDate()) / 7), 2) : 0 === h(c, b) ? "01" : "00";
+ }, "%y":function(a) {
+ return (a.u + 1900).toString().substring(2);
+ }, "%Y":function(a) {
+ return a.u + 1900;
+ }, "%z":function(a) {
+ a = a.Wa;
+ var b = 0 <= a;
+ a = Math.abs(a) / 60;
+ return (b ? "+" : "-") + String("0000" + (a / 60 * 100 + a % 60)).slice(-4);
+ }, "%Z":function(a) {
+ return a.Za;
+ }, "%%":function() {
+ return "%";
+ }};
+ for (u in r) {
+ 0 <= c.indexOf(u) && (c = c.replace(new RegExp(u, "g"), r[u](d)));
+ }
+ u = Hb(c, !1);
+ if (u.length > b) {
+ return 0;
+ }
+ Fa(u, a);
+ return u.length - 1;
+}
+tc();
+Vb = Array(4096);
+lc(I, "/");
+nc("/tmp");
+nc("/home");
+nc("/home/web_user");
+(function() {
+ nc("/dev");
+ Fb(259, {read:function() {
+ return 0;
+ }, write:function(a, b, c, h) {
+ return h;
+ }});
+ oc("/dev/null", 259);
+ Eb(1280, Ib);
+ Eb(1536, Jb);
+ oc("/dev/tty", 1280);
+ oc("/dev/tty1", 1536);
+ if ("object" === typeof crypto && "function" === typeof crypto.getRandomValues) {
+ var a = new Uint8Array(1);
+ var b = function() {
+ crypto.getRandomValues(a);
+ return a[0];
+ };
+ } else {
+ if (fa) {
+ try {
+ var c = require("crypto");
+ b = function() {
+ return c.randomBytes(1)[0];
+ };
+ } catch (d) {
+ }
+ }
+ }
+ b || (b = function() {
+ m("no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };");
+ });
+ wc("random", b);
+ wc("urandom", b);
+ nc("/dev/shm");
+ nc("/dev/shm/tmp");
+})();
+nc("/proc");
+nc("/proc/self");
+nc("/proc/self/fd");
+lc({v:function() {
+ var a = Lb("/proc/self", "fd", 16895, 73);
+ a.f = {lookup:function(a, c) {
+ var b = Tb[+c];
+ if (!b) {
+ throw new H(9);
+ }
+ a = {parent:null, v:{Ca:"fake"}, f:{readlink:function() {
+ return b.path;
+ }}};
+ return a.parent = a;
+ }};
+ return a;
+}}, "/proc/self/fd");
+if (ha) {
+ var fs = require("fs"), Ob = require("path");
+ K.Va();
+}
+Cc();
+Kc = e.BindingError = Jc(Error, "BindingError");
+Lc = e.InternalError = Jc(Error, "InternalError");
+cd();
+Bd();
+wd();
+Dd = e.UnboundTypeError = Jc(Error, "UnboundTypeError");
+Qd();
+function Hb(a, b) {
+ var c = Array(Ea(a) + 1);
+ a = Ca(a, c, 0, c.length);
+ b && (c.length = a);
+ return c;
+}
+var Z = e.asm({}, {ClassHandle:Oc, ClassHandle_clone:Wc, ClassHandle_delete:Xc, ClassHandle_deleteLater:bd, ClassHandle_isAliasOf:Nc, ClassHandle_isDeleted:Yc, DYNAMICTOP_PTR:qa, RegisteredClass:gd, RegisteredPointer:V, RegisteredPointer_deleteObject:qd, RegisteredPointer_destructor:pd, RegisteredPointer_fromWireType:Ad, RegisteredPointer_getPointee:od, _ZSt18uncaught_exceptionv:ub, __assert_fail:function(a, b, c, d) {
+ m("Assertion failed: " + x(a) + ", at: " + [b ? x(b) : "unknown filename", c, d ? x(d) : "unknown function"]);
+}, __buildEnvironment:sb, __cxa_atexit:function() {
+ return tb.apply(null, arguments);
+}, __cxa_pure_virtual:function() {
+ xa = !0;
+ throw "Pure virtual function called!";
+}, __cxa_uncaught_exceptions:function() {
+ return ub.s;
+}, __lock:function() {
+}, __map_file:function() {
+ vb(1);
+ return -1;
+}, __setErrNo:vb, __syscall10:function(a, b) {
+ O = b;
+ try {
+ var c = x(P()), d = M(c, {parent:!0}).node, f = zb(c), g = Nb(d, f), h = hc(d, f, !1);
+ if (h) {
+ throw new H(h);
+ }
+ if (!d.f.unlink) {
+ throw new H(1);
+ }
+ if (g.S) {
+ throw new H(16);
+ }
+ try {
+ L.willDeletePath && L.willDeletePath(c);
+ } catch (k) {
+ console.log("FS.trackingDelegate['willDeletePath']('" + c + "') threw an exception: " + k.message);
+ }
+ d.f.unlink(d, f);
+ ac(g);
+ try {
+ if (L.onDeletePath) {
+ L.onDeletePath(c);
+ }
+ } catch (k) {
+ console.log("FS.trackingDelegate['onDeletePath']('" + c + "') threw an exception: " + k.message);
+ }
+ return 0;
+ } catch (k) {
+ return "undefined" !== typeof N && k instanceof H || m(k), -k.i;
+ }
+}, __syscall140:function(a, b) {
+ O = b;
+ try {
+ var c = zc(), d = P(), f = P(), g = P(), h = P();
+ a = 4294967296 * d + (f >>> 0);
+ if (-9007199254740992 >= a || 9007199254740992 <= a) {
+ return -75;
+ }
+ sc(c, a, h);
+ mb = [c.position >>> 0, (F = c.position, 1.0 <= +Xa(F) ? 0.0 < F ? (ab(+$a(F / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+Za((F - +(~~F >>> 0)) / 4294967296.0) >>> 0 : 0)];
+ p[g >> 2] = mb[0];
+ p[g + 4 >> 2] = mb[1];
+ c.N && 0 === a && 0 === h && (c.N = null);
+ return 0;
+ } catch (k) {
+ return "undefined" !== typeof N && k instanceof H || m(k), -k.i;
+ }
+}, __syscall145:function(a, b) {
+ O = b;
+ try {
+ var c = zc(), d = P();
+ a: {
+ var f = P();
+ for (b = a = 0; b < f; b++) {
+ var g = p[d + (8 * b + 4) >> 2], h = c, k = p[d + 8 * b >> 2], t = g, r = void 0, u = q;
+ if (0 > t || 0 > r) {
+ throw new H(22);
+ }
+ if (null === h.fd) {
+ throw new H(9);
+ }
+ if (1 === (h.flags & 2097155)) {
+ throw new H(9);
+ }
+ if (J(h.node.mode)) {
+ throw new H(21);
+ }
+ if (!h.g.read) {
+ throw new H(22);
+ }
+ var z = "undefined" !== typeof r;
+ if (!z) {
+ r = h.position;
+ } else {
+ if (!h.seekable) {
+ throw new H(29);
+ }
+ }
+ var B = h.g.read(h, u, k, t, r);
+ z || (h.position += B);
+ var C = B;
+ if (0 > C) {
+ var A = -1;
+ break a;
+ }
+ a += C;
+ if (C < g) {
+ break;
+ }
+ }
+ A = a;
+ }
+ return A;
+ } catch (D) {
+ return "undefined" !== typeof N && D instanceof H || m(D), -D.i;
+ }
+}, __syscall146:function(a, b) {
+ O = b;
+ try {
+ var c = zc(), d = P();
+ a: {
+ var f = P();
+ for (b = a = 0; b < f; b++) {
+ var g = c, h = p[d + 8 * b >> 2], k = p[d + (8 * b + 4) >> 2], t = void 0, r = q;
+ if (0 > k || 0 > t) {
+ throw new H(22);
+ }
+ if (null === g.fd) {
+ throw new H(9);
+ }
+ if (0 === (g.flags & 2097155)) {
+ throw new H(9);
+ }
+ if (J(g.node.mode)) {
+ throw new H(21);
+ }
+ if (!g.g.write) {
+ throw new H(22);
+ }
+ g.flags & 1024 && sc(g, 0, 2);
+ var u = "undefined" !== typeof t;
+ if (!u) {
+ t = g.position;
+ } else {
+ if (!g.seekable) {
+ throw new H(29);
+ }
+ }
+ var z = g.g.write(g, r, h, k, t, void 0);
+ u || (g.position += z);
+ try {
+ if (g.path && L.onWriteToFile) {
+ L.onWriteToFile(g.path);
+ }
+ } catch (A) {
+ console.log("FS.trackingDelegate['onWriteToFile']('" + g.path + "') threw an exception: " + A.message);
+ }
+ var B = z;
+ if (0 > B) {
+ var C = -1;
+ break a;
+ }
+ a += B;
+ }
+ C = a;
+ }
+ return C;
+ } catch (A) {
+ return "undefined" !== typeof N && A instanceof H || m(A), -A.i;
+ }
+}, __syscall220:function(a, b) {
+ O = b;
+ try {
+ var c = zc(), d = P(), f = P();
+ if (!c.N) {
+ var g = M(c.path, {ka:!0}).node;
+ if (!g.f.readdir) {
+ throw new H(20);
+ }
+ var h = g.f.readdir(g);
+ c.N = h;
+ }
+ a = 0;
+ for (var k = sc(c, 0, 1), t = Math.floor(k / 280); t < c.N.length && a + 280 <= f;) {
+ var r = c.N[t];
+ if ("." === r[0]) {
+ var u = 1;
+ var z = 4;
+ } else {
+ var B = Nb(c.node, r);
+ u = B.id;
+ z = 8192 === (B.mode & 61440) ? 2 : J(B.mode) ? 4 : 40960 === (B.mode & 61440) ? 10 : 8;
+ }
+ mb = [u >>> 0, (F = u, 1.0 <= +Xa(F) ? 0.0 < F ? (ab(+$a(F / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+Za((F - +(~~F >>> 0)) / 4294967296.0) >>> 0 : 0)];
+ p[d + a >> 2] = mb[0];
+ p[d + a + 4 >> 2] = mb[1];
+ mb = [280 * (t + 1) >>> 0, (F = 280 * (t + 1), 1.0 <= +Xa(F) ? 0.0 < F ? (ab(+$a(F / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+Za((F - +(~~F >>> 0)) / 4294967296.0) >>> 0 : 0)];
+ p[d + a + 8 >> 2] = mb[0];
+ p[d + a + 12 >> 2] = mb[1];
+ Ha[d + a + 16 >> 1] = 280;
+ q[d + a + 18 >> 0] = z;
+ Da(r, d + a + 19, 256);
+ a += 280;
+ t += 1;
+ }
+ sc(c, 280 * t, 0);
+ return a;
+ } catch (C) {
+ return "undefined" !== typeof N && C instanceof H || m(C), -C.i;
+ }
+}, __syscall221:function(a, b) {
+ O = b;
+ try {
+ var c = zc();
+ switch(P()) {
+ case 0:
+ var d = P();
+ return 0 > d ? -22 : qc(c.path, c.flags, 0, d).fd;
+ case 1:
+ case 2:
+ return 0;
+ case 3:
+ return c.flags;
+ case 4:
+ return d = P(), c.flags |= d, 0;
+ case 12:
+ return d = P(), Ha[d + 0 >> 1] = 2, 0;
+ case 13:
+ case 14:
+ return 0;
+ case 16:
+ case 8:
+ return -22;
+ case 9:
+ return vb(22), -1;
+ default:
+ return -22;
+ }
+ } catch (f) {
+ return "undefined" !== typeof N && f instanceof H || m(f), -f.i;
+ }
+}, __syscall40:function(a, b) {
+ O = b;
+ try {
+ var c = x(P()), d = M(c, {parent:!0}).node, f = zb(c), g = Nb(d, f), h = hc(d, f, !0);
+ if (h) {
+ throw new H(h);
+ }
+ if (!d.f.rmdir) {
+ throw new H(1);
+ }
+ if (g.S) {
+ throw new H(16);
+ }
+ try {
+ L.willDeletePath && L.willDeletePath(c);
+ } catch (k) {
+ console.log("FS.trackingDelegate['willDeletePath']('" + c + "') threw an exception: " + k.message);
+ }
+ d.f.rmdir(d, f);
+ ac(g);
+ try {
+ if (L.onDeletePath) {
+ L.onDeletePath(c);
+ }
+ } catch (k) {
+ console.log("FS.trackingDelegate['onDeletePath']('" + c + "') threw an exception: " + k.message);
+ }
+ return 0;
+ } catch (k) {
+ return "undefined" !== typeof N && k instanceof H || m(k), -k.i;
+ }
+}, __syscall5:function(a, b) {
+ O = b;
+ try {
+ var c = x(P()), d = P(), f = P();
+ return qc(c, d, f).fd;
+ } catch (g) {
+ return "undefined" !== typeof N && g instanceof H || m(g), -g.i;
+ }
+}, __syscall54:function(a, b) {
+ O = b;
+ try {
+ var c = zc(), d = P();
+ switch(d) {
+ case 21509:
+ case 21505:
+ return c.tty ? 0 : -25;
+ case 21510:
+ case 21511:
+ case 21512:
+ case 21506:
+ case 21507:
+ case 21508:
+ return c.tty ? 0 : -25;
+ case 21519:
+ if (!c.tty) {
+ return -25;
+ }
+ var f = P();
+ return p[f >> 2] = 0;
+ case 21520:
+ return c.tty ? -22 : -25;
+ case 21531:
+ a = f = P();
+ if (!c.g.Ma) {
+ throw new H(25);
+ }
+ return c.g.Ma(c, d, a);
+ case 21523:
+ return c.tty ? 0 : -25;
+ case 21524:
+ return c.tty ? 0 : -25;
+ default:
+ m("bad ioctl syscall " + d);
+ }
+ } catch (g) {
+ return "undefined" !== typeof N && g instanceof H || m(g), -g.i;
+ }
+}, __syscall6:function(a, b) {
+ O = b;
+ try {
+ var c = zc();
+ if (null === c.fd) {
+ throw new H(9);
+ }
+ c.N && (c.N = null);
+ try {
+ c.g.close && c.g.close(c);
+ } catch (d) {
+ throw d;
+ } finally {
+ Tb[c.fd] = null;
+ }
+ c.fd = null;
+ return 0;
+ } catch (d) {
+ return "undefined" !== typeof N && d instanceof H || m(d), -d.i;
+ }
+}, __syscall85:function(a, b) {
+ O = b;
+ try {
+ var c = x(P()), d = P();
+ var f = P();
+ if (0 >= f) {
+ var g = -22;
+ } else {
+ var h = Xb(c), k = Math.min(f, Ea(h)), t = q[d + k];
+ Da(h, d, f + 1);
+ q[d + k] = t;
+ g = k;
+ }
+ return g;
+ } catch (r) {
+ return "undefined" !== typeof N && r instanceof H || m(r), -r.i;
+ }
+}, __syscall91:function(a, b) {
+ O = b;
+ try {
+ var c = P(), d = P();
+ return Ac(c, d);
+ } catch (f) {
+ return "undefined" !== typeof N && f instanceof H || m(f), -f.i;
+ }
+}, __unlock:function() {
+}, _addDays:ne, _arraySum:ke, _embind_register_bool:function(a, b, c, d, f) {
+ var g = Bc(c);
+ b = R(b);
+ U(a, {name:b, fromWireType:function(a) {
+ return !!a;
+ }, toWireType:function(a, b) {
+ return b ? d : f;
+ }, argPackAdvance:8, readValueFromPointer:function(a) {
+ if (1 === c) {
+ var d = q;
+ } else {
+ if (2 === c) {
+ d = Ha;
+ } else {
+ if (4 === c) {
+ d = p;
+ } else {
+ throw new TypeError("Unknown boolean type size: " + b);
+ }
+ }
+ }
+ return this.fromWireType(d[a >> g]);
+ }, H:null});
+}, _embind_register_class:function(a, b, c, d, f, g, h, k, t, r, u, z, B) {
+ u = R(u);
+ g = W(f, g);
+ k && (k = W(h, k));
+ r && (r = W(t, r));
+ B = W(z, B);
+ var C = Hc(u);
+ fd(C, function() {
+ Gd("Cannot construct " + u + " due to unbound types", [d]);
+ });
+ T([a, b, c], d ? [d] : [], function(b) {
+ b = b[0];
+ if (d) {
+ var c = b.h;
+ var f = c.J;
+ } else {
+ f = Oc.prototype;
+ }
+ b = Ic(C, function() {
+ if (Object.getPrototypeOf(this) !== h) {
+ throw new Kc("Use 'new' to construct " + u);
+ }
+ if (void 0 === t.M) {
+ throw new Kc(u + " has no accessible constructor");
+ }
+ var a = t.M[arguments.length];
+ if (void 0 === a) {
+ throw new Kc("Tried to invoke ctor of " + u + " with invalid number of parameters (" + arguments.length + ") - expected (" + Object.keys(t.M).toString() + ") parameters instead!");
+ }
+ return a.apply(this, arguments);
+ });
+ var h = Object.create(f, {constructor:{value:b}});
+ b.prototype = h;
+ var t = new gd(u, b, h, B, c, g, k, r);
+ c = new V(u, t, !0, !1, !1);
+ f = new V(u + "*", t, !1, !1, !1);
+ var z = new V(u + " const*", t, !1, !0, !1);
+ dd[a] = {pointerType:f, Ga:z};
+ Cd(C, b);
+ return [c, f, z];
+ });
+}, _embind_register_class_class_function:function(a, b, c, d, f, g, h) {
+ var k = Kd(c, d);
+ b = R(b);
+ g = W(f, g);
+ T([], [a], function(a) {
+ function d() {
+ Gd("Cannot call " + f + " due to unbound types", k);
+ }
+ a = a[0];
+ var f = a.name + "." + b, t = a.h.constructor;
+ void 0 === t[b] ? (d.P = c - 1, t[b] = d) : (ed(t, b, f), t[b].o[c - 1] = d);
+ T([], k, function(a) {
+ a = [a[0], null].concat(a.slice(1));
+ a = Jd(f, a, null, g, h);
+ void 0 === t[b].o ? (a.P = c - 1, t[b] = a) : t[b].o[c - 1] = a;
+ return [];
+ });
+ return [];
+ });
+}, _embind_register_class_constructor:function(a, b, c, d, f, g) {
+ var h = Kd(b, c);
+ f = W(d, f);
+ T([], [a], function(a) {
+ a = a[0];
+ var c = "constructor " + a.name;
+ void 0 === a.h.M && (a.h.M = []);
+ if (void 0 !== a.h.M[b - 1]) {
+ throw new Kc("Cannot register multiple constructors with identical number of parameters (" + (b - 1) + ") for class '" + a.name + "'! Overload resolution is currently only performed using the parameter count, not actual type info!");
+ }
+ a.h.M[b - 1] = function() {
+ Gd("Cannot construct " + a.name + " due to unbound types", h);
+ };
+ T([], h, function(d) {
+ a.h.M[b - 1] = function() {
+ arguments.length !== b - 1 && S(c + " called with " + arguments.length + " arguments, expected " + (b - 1));
+ var a = [], h = Array(b);
+ h[0] = g;
+ for (var k = 1; k < b; ++k) {
+ h[k] = d[k].toWireType(a, arguments[k - 1]);
+ }
+ h = f.apply(null, h);
+ Id(a);
+ return d[0].fromWireType(h);
+ };
+ return [];
+ });
+ return [];
+ });
+}, _embind_register_class_function:function(a, b, c, d, f, g, h, k) {
+ var t = Kd(c, d);
+ b = R(b);
+ g = W(f, g);
+ T([], [a], function(a) {
+ function d() {
+ Gd("Cannot call " + f + " due to unbound types", t);
+ }
+ a = a[0];
+ var f = a.name + "." + b;
+ k && a.h.Pa.push(b);
+ var r = a.h.J, C = r[b];
+ void 0 === C || void 0 === C.o && C.className !== a.name && C.P === c - 2 ? (d.P = c - 2, d.className = a.name, r[b] = d) : (ed(r, b, f), r[b].o[c - 2] = d);
+ T([], t, function(d) {
+ d = Jd(f, d, a, g, h);
+ void 0 === r[b].o ? (d.P = c - 2, r[b] = d) : r[b].o[c - 2] = d;
+ return [];
+ });
+ return [];
+ });
+}, _embind_register_class_property:function(a, b, c, d, f, g, h, k, t, r) {
+ b = R(b);
+ f = W(d, f);
+ T([], [a], function(a) {
+ a = a[0];
+ var d = a.name + "." + b, u = {get:function() {
+ Gd("Cannot access " + d + " due to unbound types", [c, h]);
+ }, enumerable:!0, configurable:!0};
+ t ? u.set = function() {
+ Gd("Cannot access " + d + " due to unbound types", [c, h]);
+ } : u.set = function() {
+ S(d + " is a read-only property");
+ };
+ Object.defineProperty(a.h.J, b, u);
+ T([], t ? [c, h] : [c], function(c) {
+ var h = c[0], u = {get:function() {
+ var b = Ld(this, a, d + " getter");
+ return h.fromWireType(f(g, b));
+ }, enumerable:!0};
+ if (t) {
+ t = W(k, t);
+ var z = c[1];
+ u.set = function(b) {
+ var c = Ld(this, a, d + " setter"), f = [];
+ t(r, c, z.toWireType(f, b));
+ Id(f);
+ };
+ }
+ Object.defineProperty(a.h.J, b, u);
+ return [];
+ });
+ return [];
+ });
+}, _embind_register_emval:function(a, b) {
+ b = R(b);
+ U(a, {name:b, fromWireType:function(a) {
+ var b = X[a].value;
+ Nd(a);
+ return b;
+ }, toWireType:function(a, b) {
+ return ld(b);
+ }, argPackAdvance:8, readValueFromPointer:nd, H:null});
+}, _embind_register_float:function(a, b, c) {
+ c = Bc(c);
+ b = R(b);
+ U(a, {name:b, fromWireType:function(a) {
+ return a;
+ }, toWireType:function(a, b) {
+ if ("number" !== typeof b && "boolean" !== typeof b) {
+ throw new TypeError('Cannot convert "' + jd(b) + '" to ' + this.name);
+ }
+ return b;
+ }, argPackAdvance:8, readValueFromPointer:Rd(b, c), H:null});
+}, _embind_register_integer:function(a, b, c, d, f) {
+ function g(a) {
+ return a;
+ }
+ b = R(b);
+ -1 === f && (f = 4294967295);
+ var h = Bc(c);
+ if (0 === d) {
+ var k = 32 - 8 * c;
+ g = function(a) {
+ return a << k >>> k;
+ };
+ }
+ var t = -1 != b.indexOf("unsigned");
+ U(a, {name:b, fromWireType:g, toWireType:function(a, c) {
+ if ("number" !== typeof c && "boolean" !== typeof c) {
+ throw new TypeError('Cannot convert "' + jd(c) + '" to ' + this.name);
+ }
+ if (c < d || c > f) {
+ throw new TypeError('Passing a number "' + jd(c) + '" from JS side to C/C++ side to an argument of type "' + b + '", which is outside the valid range [' + d + ", " + f + "]!");
+ }
+ return t ? c >>> 0 : c | 0;
+ }, argPackAdvance:8, readValueFromPointer:Sd(b, h, 0 !== d), H:null});
+}, _embind_register_memory_view:function(a, b, c) {
+ function d(a) {
+ a >>= 2;
+ var b = y;
+ return new f(b.buffer, b[a + 1], b[a]);
+ }
+ var f = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array][b];
+ c = R(c);
+ U(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d}, {La:!0});
+}, _embind_register_std_string:function(a, b) {
+ b = R(b);
+ var c = "std::string" === b;
+ U(a, {name:b, fromWireType:function(a) {
+ var b = y[a >> 2];
+ if (c) {
+ var d = w[a + 4 + b], h = 0;
+ 0 != d && (h = d, w[a + 4 + b] = 0);
+ var k = a + 4;
+ for (d = 0; d <= b; ++d) {
+ var t = a + 4 + d;
+ if (0 == w[t]) {
+ k = x(k);
+ if (void 0 === r) {
+ var r = k;
+ } else {
+ r += String.fromCharCode(0), r += k;
+ }
+ k = t + 1;
+ }
+ }
+ 0 != h && (w[a + 4 + b] = h);
+ } else {
+ r = Array(b);
+ for (d = 0; d < b; ++d) {
+ r[d] = String.fromCharCode(w[a + 4 + d]);
+ }
+ r = r.join("");
+ }
+ Q(a);
+ return r;
+ }, toWireType:function(a, b) {
+ b instanceof ArrayBuffer && (b = new Uint8Array(b));
+ var d = "string" === typeof b;
+ d || b instanceof Uint8Array || b instanceof Uint8ClampedArray || b instanceof Int8Array || S("Cannot pass non-string to std::string");
+ var f = (c && d ? function() {
+ return Ea(b);
+ } : function() {
+ return b.length;
+ })(), k = za(4 + f + 1);
+ y[k >> 2] = f;
+ if (c && d) {
+ Da(b, k + 4, f + 1);
+ } else {
+ if (d) {
+ for (d = 0; d < f; ++d) {
+ var t = b.charCodeAt(d);
+ 255 < t && (Q(k), S("String has UTF-16 code units that do not fit in 8 bits"));
+ w[k + 4 + d] = t;
+ }
+ } else {
+ for (d = 0; d < f; ++d) {
+ w[k + 4 + d] = b[d];
+ }
+ }
+ }
+ null !== a && a.push(Q, k);
+ return k;
+ }, argPackAdvance:8, readValueFromPointer:nd, H:function(a) {
+ Q(a);
+ }});
+}, _embind_register_std_wstring:function(a, b, c) {
+ c = R(c);
+ if (2 === b) {
+ var d = function() {
+ return Ia;
+ };
+ var f = 1;
+ } else {
+ 4 === b && (d = function() {
+ return y;
+ }, f = 2);
+ }
+ U(a, {name:c, fromWireType:function(a) {
+ for (var b = d(), c = y[a >> 2], g = Array(c), r = a + 4 >> f, u = 0; u < c; ++u) {
+ g[u] = String.fromCharCode(b[r + u]);
+ }
+ Q(a);
+ return g.join("");
+ }, toWireType:function(a, c) {
+ var g = d(), h = c.length, r = za(4 + h * b);
+ y[r >> 2] = h;
+ for (var u = r + 4 >> f, z = 0; z < h; ++z) {
+ g[u + z] = c.charCodeAt(z);
+ }
+ null !== a && a.push(Q, r);
+ return r;
+ }, argPackAdvance:8, readValueFromPointer:nd, H:function(a) {
+ Q(a);
+ }});
+}, _embind_register_void:function(a, b) {
+ b = R(b);
+ U(a, {vd:!0, name:b, argPackAdvance:0, fromWireType:function() {
+ }, toWireType:function() {
+ }});
+}, _emscripten_syscall_munmap:Ac, _emscripten_traverse_stack:Yd, _emval_decref:Nd, _emval_incref:function(a) {
+ 4 < a && (X[a].pa += 1);
+}, _emval_register:ld, _emval_take_value:function(a, b) {
+ a = Td(a, "_emval_take_value");
+ a = a.readValueFromPointer(b);
+ return ld(a);
+}, _formatString:Wd, _isLeapYear:je, _reallyNegative:Vd, abort:function() {
+ e.abort();
+}, atexit:tb, attachFinalizer:Vc, clock:Ud, constNoSmartPtrRawPointerToWireType:id, count_emval_handles:Od, craftInvokerFunction:Jd, createNamedFunction:Ic, demangle:ob, demangleAll:pb, detachFinalizer:Sc, downcastPointer:rd, embind__requireFunction:W, embind_init_charCodes:Cc, embind_repr:jd, emscripten_get_callstack_js:Zd, emscripten_get_heap_size:ra, emscripten_log:function(a, b) {
+ var c = p[b >> 2];
+ b += 4;
+ var d = "";
+ if (c) {
+ for (b = Wd(c, b), c = 0; c < b.length; ++c) {
+ d += String.fromCharCode(b[c]);
+ }
+ }
+ $d(a, d);
+}, emscripten_log_js:$d, emscripten_memcpy_big:ae, emscripten_realloc_buffer:he, emscripten_resize_heap:ie, emscripten_run_script:function(a) {
+ eval(x(a));
+}, emscripten_run_script_int:function(a) {
+ return eval(x(a)) | 0;
+}, emscripten_run_script_string:Y, ensureOverloadTable:ed, exposePublicSymbol:fd, extendError:Jc, fabs:Xa, fabsf:Xa, floatReadValueFromPointer:Rd, floor:$a, flushPendingDeletes:ad, genericPointerToWireType:kd, getBasestPointer:xd, getInheritedInstance:yd, getInheritedInstanceCount:sd, getLiveInheritedInstances:ud, getShiftFromSize:Bc, getTypeName:Ed, get_first_emval:Pd, getenv:be, heap32VectorToArray:Kd, init_ClassHandle:cd, init_RegisteredPointer:Bd, init_embind:wd, init_emval:Qd, integerReadValueFromPointer:Sd,
+jsStackTrace:qb, localtime:function(a) {
+ return ge(a, 1047600);
+}, localtime_r:ge, makeClassHandle:zd, makeLegalFunctionName:Hc, memcpy:function(a, b, c) {
+ a |= 0;
+ b |= 0;
+ c |= 0;
+ var d;
+ if (8192 <= (c | 0)) {
+ return ae(a | 0, b | 0, c | 0) | 0, a | 0;
+ }
+ var f = a | 0;
+ var g = a + c | 0;
+ if ((a & 3) == (b & 3)) {
+ for (; a & 3;) {
+ if (0 == (c | 0)) {
+ return f | 0;
+ }
+ q[a >> 0] = q[b >> 0] | 0;
+ a = a + 1 | 0;
+ b = b + 1 | 0;
+ c = c - 1 | 0;
+ }
+ c = g & -4 | 0;
+ for (d = c - 64 | 0; (a | 0) <= (d | 0);) {
+ p[a >> 2] = p[b >> 2] | 0, p[a + 4 >> 2] = p[b + 4 >> 2] | 0, p[a + 8 >> 2] = p[b + 8 >> 2] | 0, p[a + 12 >> 2] = p[b + 12 >> 2] | 0, p[a + 16 >> 2] = p[b + 16 >> 2] | 0, p[a + 20 >> 2] = p[b + 20 >> 2] | 0, p[a + 24 >> 2] = p[b + 24 >> 2] | 0, p[a + 28 >> 2] = p[b + 28 >> 2] | 0, p[a + 32 >> 2] = p[b + 32 >> 2] | 0, p[a + 36 >> 2] = p[b + 36 >> 2] | 0, p[a + 40 >> 2] = p[b + 40 >> 2] | 0, p[a + 44 >> 2] = p[b + 44 >> 2] | 0, p[a + 48 >> 2] = p[b + 48 >> 2] | 0, p[a + 52 >> 2] = p[b + 52 >>
+ 2] | 0, p[a + 56 >> 2] = p[b + 56 >> 2] | 0, p[a + 60 >> 2] = p[b + 60 >> 2] | 0, a = a + 64 | 0, b = b + 64 | 0;
+ }
+ for (; (a | 0) < (c | 0);) {
+ p[a >> 2] = p[b >> 2] | 0, a = a + 4 | 0, b = b + 4 | 0;
+ }
+ } else {
+ for (c = g - 4 | 0; (a | 0) < (c | 0);) {
+ q[a >> 0] = q[b >> 0] | 0, q[a + 1 >> 0] = q[b + 1 >> 0] | 0, q[a + 2 >> 0] = q[b + 2 >> 0] | 0, q[a + 3 >> 0] = q[b + 3 >> 0] | 0, a = a + 4 | 0, b = b + 4 | 0;
+ }
+ }
+ for (; (a | 0) < (g | 0);) {
+ q[a >> 0] = q[b >> 0] | 0, a = a + 1 | 0, b = b + 1 | 0;
+ }
+ return f | 0;
+}, memset:function(a, b, c) {
+ a |= 0;
+ c |= 0;
+ var d;
+ var f = a + c | 0;
+ b = (b | 0) & 255;
+ if (67 <= (c | 0)) {
+ for (; 0 != (a & 3);) {
+ q[a >> 0] = b, a = a + 1 | 0;
+ }
+ var g = f & -4 | 0;
+ var h = b | b << 8 | b << 16 | b << 24;
+ for (d = g - 64 | 0; (a | 0) <= (d | 0);) {
+ p[a >> 2] = h, p[a + 4 >> 2] = h, p[a + 8 >> 2] = h, p[a + 12 >> 2] = h, p[a + 16 >> 2] = h, p[a + 20 >> 2] = h, p[a + 24 >> 2] = h, p[a + 28 >> 2] = h, p[a + 32 >> 2] = h, p[a + 36 >> 2] = h, p[a + 40 >> 2] = h, p[a + 44 >> 2] = h, p[a + 48 >> 2] = h, p[a + 52 >> 2] = h, p[a + 56 >> 2] = h, p[a + 60 >> 2] = h, a = a + 64 | 0;
+ }
+ for (; (a | 0) < (g | 0);) {
+ p[a >> 2] = h, a = a + 4 | 0;
+ }
+ }
+ for (; (a | 0) < (f | 0);) {
+ q[a >> 0] = b, a = a + 1 | 0;
+ }
+ return f - c | 0;
+}, mktime:function(a) {
+ ce();
+ var b = new Date(p[a + 20 >> 2] + 1900, p[a + 16 >> 2], p[a + 12 >> 2], p[a + 8 >> 2], p[a + 4 >> 2], p[a >> 2], 0), c = p[a + 32 >> 2], d = b.getTimezoneOffset(), f = new Date(b.getFullYear(), 0, 1), g = (new Date(2000, 6, 1)).getTimezoneOffset(), h = f.getTimezoneOffset(), k = Math.min(h, g);
+ 0 > c ? p[a + 32 >> 2] = Number(g != h && k == d) : 0 < c != (k == d) && (g = Math.max(h, g), b.setTime(b.getTime() + 60000 * ((0 < c ? k : g) - d)));
+ p[a + 24 >> 2] = b.getDay();
+ p[a + 28 >> 2] = (b.getTime() - f.getTime()) / 864E5 | 0;
+ return b.getTime() / 1000 | 0;
+}, new_:Hd, nonConstNoSmartPtrRawPointerToWireType:md, pthread_cond_broadcast:function() {
+ return 0;
+}, pthread_cond_destroy:function() {
+ return 0;
+}, pthread_cond_signal:function() {
+ return 0;
+}, pthread_cond_wait:function() {
+ return 0;
+}, pthread_create:function() {
+ return 11;
+}, pthread_join:function() {
+}, pthread_mutexattr_destroy:function() {
+}, pthread_mutexattr_init:function() {
+}, pthread_mutexattr_settype:function() {
+}, pthread_spin_destroy:function() {
+ return 0;
+}, pthread_spin_init:function() {
+ return 0;
+}, pthread_spin_lock:function() {
+ return 0;
+}, pthread_spin_unlock:function() {
+ return 0;
+}, readLatin1String:R, registerType:U, releaseClassHandle:Uc, replacePublicSymbol:Cd, requireRegisteredType:Td, runDestructor:Tc, runDestructors:Id, sbrk:function(a) {
+ a |= 0;
+ var b = ra() | 0;
+ var c = p[qa >> 2] | 0;
+ var d = c + a | 0;
+ if (0 < (a | 0) & (d | 0) < (c | 0) | 0 > (d | 0) || (d | 0) > (b | 0) && !(ie(d | 0) | 0)) {
+ return vb(12), -1;
+ }
+ p[qa >> 2] = d | 0;
+ return c | 0;
+}, setDelayFunction:vd, setTempRet0:function() {
+}, shallowCopyInternalPointer:Pc, simpleReadValueFromPointer:nd, sqrt:Ya, stackTrace:rb, strftime:oe, strftime_l:function(a, b, c, d) {
+ return oe(a, b, c, d);
+}, throwBindingError:S, throwInstanceAlreadyDeleted:Qc, throwInternalError:Mc, throwUnboundTypeError:Gd, time:function(a) {
+ var b = Date.now() / 1000 | 0;
+ a && (p[a >> 2] = b);
+ return b;
+}, tzset:ce, upcastPointer:hd, validateThis:Ld, whenDependentTypesAreResolved:T}, buffer), pe = Z.__wasm_call_ctors;
+Z.__wasm_call_ctors = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return pe.apply(null, arguments);
+};
+var qe = Z.strlen;
+Z.strlen = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return qe.apply(null, arguments);
+};
+var re = Z.malloc;
+Z.malloc = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return re.apply(null, arguments);
+};
+var se = Z.free;
+Z.free = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return se.apply(null, arguments);
+};
+var te = Z.__errno_location;
+Z.__errno_location = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return te.apply(null, arguments);
+};
+var ue = Z.fflush;
+Z.fflush = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ue.apply(null, arguments);
+};
+var ve = Z.realloc;
+Z.realloc = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ve.apply(null, arguments);
+};
+var we = Z._get_tzname;
+Z._get_tzname = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return we.apply(null, arguments);
+};
+var xe = Z._get_daylight;
+Z._get_daylight = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return xe.apply(null, arguments);
+};
+var ye = Z._get_timezone;
+Z._get_timezone = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ye.apply(null, arguments);
+};
+var ze = Z._get_environ;
+Z._get_environ = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ze.apply(null, arguments);
+};
+var Ae = Z.__getTypeName;
+Z.__getTypeName = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ae.apply(null, arguments);
+};
+var Be = Z.__embind_register_native_and_builtin_types;
+Z.__embind_register_native_and_builtin_types = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Be.apply(null, arguments);
+};
+var Ce = Z.setThrew;
+Z.setThrew = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ce.apply(null, arguments);
+};
+var De = Z.stackSave;
+Z.stackSave = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return De.apply(null, arguments);
+};
+var Ee = Z.stackAlloc;
+Z.stackAlloc = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ee.apply(null, arguments);
+};
+var Fe = Z.stackRestore;
+Z.stackRestore = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Fe.apply(null, arguments);
+};
+var Ge = Z.__growWasmMemory;
+Z.__growWasmMemory = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ge.apply(null, arguments);
+};
+var He = Z.dynCall_vi;
+Z.dynCall_vi = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return He.apply(null, arguments);
+};
+var Ie = Z.dynCall_ii;
+Z.dynCall_ii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ie.apply(null, arguments);
+};
+var Je = Z.dynCall_vii;
+Z.dynCall_vii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Je.apply(null, arguments);
+};
+var Ke = Z.dynCall_iiii;
+Z.dynCall_iiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ke.apply(null, arguments);
+};
+var Le = Z.dynCall_viii;
+Z.dynCall_viii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Le.apply(null, arguments);
+};
+var Me = Z.dynCall_iii;
+Z.dynCall_iii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Me.apply(null, arguments);
+};
+var Ne = Z.dynCall_viiiiiii;
+Z.dynCall_viiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ne.apply(null, arguments);
+};
+var Oe = Z.dynCall_viiiiii;
+Z.dynCall_viiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Oe.apply(null, arguments);
+};
+var Pe = Z.dynCall_viiiii;
+Z.dynCall_viiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Pe.apply(null, arguments);
+};
+var Qe = Z.dynCall_viiiiiiii;
+Z.dynCall_viiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Qe.apply(null, arguments);
+};
+var Re = Z.dynCall_iiiiiiii;
+Z.dynCall_iiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Re.apply(null, arguments);
+};
+var Se = Z.dynCall_iiiiiii;
+Z.dynCall_iiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Se.apply(null, arguments);
+};
+var Te = Z.dynCall_iiiiii;
+Z.dynCall_iiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Te.apply(null, arguments);
+};
+var Ue = Z.dynCall_iiiiiiiii;
+Z.dynCall_iiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ue.apply(null, arguments);
+};
+var Ve = Z.dynCall_viijii;
+Z.dynCall_viijii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ve.apply(null, arguments);
+};
+var We = Z.dynCall_viiii;
+Z.dynCall_viiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return We.apply(null, arguments);
+};
+var Xe = Z.dynCall_v;
+Z.dynCall_v = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Xe.apply(null, arguments);
+};
+var Ye = Z.dynCall_iiiii;
+Z.dynCall_iiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ye.apply(null, arguments);
+};
+var Ze = Z.dynCall_diiid;
+Z.dynCall_diiid = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return Ze.apply(null, arguments);
+};
+var $e = Z.dynCall_viiiiiiiii;
+Z.dynCall_viiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return $e.apply(null, arguments);
+};
+var af = Z.dynCall_iiiiiiiiiiiii;
+Z.dynCall_iiiiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return af.apply(null, arguments);
+};
+var bf = Z.dynCall_iiiiiiiiii;
+Z.dynCall_iiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return bf.apply(null, arguments);
+};
+var cf = Z.dynCall_iiiiiiiiiiii;
+Z.dynCall_iiiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return cf.apply(null, arguments);
+};
+var df = Z.dynCall_viiiiiiiiii;
+Z.dynCall_viiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return df.apply(null, arguments);
+};
+var ef = Z.dynCall_viiiiiiji;
+Z.dynCall_viiiiiiji = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ef.apply(null, arguments);
+};
+var ff = Z.dynCall_viiij;
+Z.dynCall_viiij = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return ff.apply(null, arguments);
+};
+var gf = Z.dynCall_viiiiiijii;
+Z.dynCall_viiiiiijii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return gf.apply(null, arguments);
+};
+var hf = Z.dynCall_fi;
+Z.dynCall_fi = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return hf.apply(null, arguments);
+};
+var jf = Z.dynCall_vif;
+Z.dynCall_vif = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return jf.apply(null, arguments);
+};
+var kf = Z.dynCall_idd;
+Z.dynCall_idd = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return kf.apply(null, arguments);
+};
+var lf = Z.dynCall_viiiiiiiiiiii;
+Z.dynCall_viiiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return lf.apply(null, arguments);
+};
+var mf = Z.dynCall_iiiiiiiiiii;
+Z.dynCall_iiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return mf.apply(null, arguments);
+};
+var nf = Z.dynCall_viffff;
+Z.dynCall_viffff = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return nf.apply(null, arguments);
+};
+var of = Z.dynCall_viiifiii;
+Z.dynCall_viiifiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return of.apply(null, arguments);
+};
+var pf = Z.dynCall_viiifiiii;
+Z.dynCall_viiifiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return pf.apply(null, arguments);
+};
+var qf = Z.dynCall_iidiiii;
+Z.dynCall_iidiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return qf.apply(null, arguments);
+};
+var rf = Z.dynCall_jiji;
+Z.dynCall_jiji = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return rf.apply(null, arguments);
+};
+var sf = Z.dynCall_iiiiij;
+Z.dynCall_iiiiij = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return sf.apply(null, arguments);
+};
+var tf = Z.dynCall_iiiiid;
+Z.dynCall_iiiiid = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return tf.apply(null, arguments);
+};
+var uf = Z.dynCall_iiiiijj;
+Z.dynCall_iiiiijj = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return uf.apply(null, arguments);
+};
+var vf = Z.dynCall_iiiiiijj;
+Z.dynCall_iiiiiijj = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return vf.apply(null, arguments);
+};
+e.asm = Z;
+var nb = e.___wasm_call_ctors = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__wasm_call_ctors.apply(null, arguments);
+}, Xd = e._strlen = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.strlen.apply(null, arguments);
+}, za = e._malloc = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.malloc.apply(null, arguments);
+}, Q = e._free = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.free.apply(null, arguments);
+};
+e.___errno_location = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__errno_location.apply(null, arguments);
+};
+e._fflush = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.fflush.apply(null, arguments);
+};
+e._realloc = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.realloc.apply(null, arguments);
+};
+var fe = e.__get_tzname = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm._get_tzname.apply(null, arguments);
+}, ee = e.__get_daylight = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm._get_daylight.apply(null, arguments);
+}, de = e.__get_timezone = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm._get_timezone.apply(null, arguments);
+};
+e.__get_environ = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm._get_environ.apply(null, arguments);
+};
+var Fd = e.___getTypeName = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__getTypeName.apply(null, arguments);
+};
+e.___embind_register_native_and_builtin_types = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__embind_register_native_and_builtin_types.apply(null, arguments);
+};
+e._setThrew = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.setThrew.apply(null, arguments);
+};
+e.stackSave = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.stackSave.apply(null, arguments);
+};
+e.stackAlloc = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.stackAlloc.apply(null, arguments);
+};
+e.stackRestore = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.stackRestore.apply(null, arguments);
+};
+e.__growWasmMemory = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.__growWasmMemory.apply(null, arguments);
+};
+e.dynCall_vi = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_vi.apply(null, arguments);
+};
+e.dynCall_ii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_ii.apply(null, arguments);
+};
+e.dynCall_vii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_vii.apply(null, arguments);
+};
+e.dynCall_iiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiii.apply(null, arguments);
+};
+e.dynCall_viii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viii.apply(null, arguments);
+};
+e.dynCall_iii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iii.apply(null, arguments);
+};
+e.dynCall_viiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiii.apply(null, arguments);
+};
+e.dynCall_viiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiii.apply(null, arguments);
+};
+e.dynCall_viiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiii.apply(null, arguments);
+};
+e.dynCall_viiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiii.apply(null, arguments);
+};
+e.dynCall_viijii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viijii.apply(null, arguments);
+};
+e.dynCall_viiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiii.apply(null, arguments);
+};
+e.dynCall_v = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_v.apply(null, arguments);
+};
+e.dynCall_iiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiii.apply(null, arguments);
+};
+e.dynCall_diiid = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_diiid.apply(null, arguments);
+};
+e.dynCall_viiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_viiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_viiiiiiji = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiji.apply(null, arguments);
+};
+e.dynCall_viiij = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiij.apply(null, arguments);
+};
+e.dynCall_viiiiiijii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiijii.apply(null, arguments);
+};
+e.dynCall_fi = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_fi.apply(null, arguments);
+};
+e.dynCall_vif = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_vif.apply(null, arguments);
+};
+e.dynCall_idd = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_idd.apply(null, arguments);
+};
+e.dynCall_viiiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiiiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_iiiiiiiiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiiiiiii.apply(null, arguments);
+};
+e.dynCall_viffff = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viffff.apply(null, arguments);
+};
+e.dynCall_viiifiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiifiii.apply(null, arguments);
+};
+e.dynCall_viiifiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_viiifiiii.apply(null, arguments);
+};
+e.dynCall_iidiiii = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iidiiii.apply(null, arguments);
+};
+e.dynCall_jiji = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_jiji.apply(null, arguments);
+};
+e.dynCall_iiiiij = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiij.apply(null, arguments);
+};
+e.dynCall_iiiiid = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiid.apply(null, arguments);
+};
+e.dynCall_iiiiijj = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiijj.apply(null, arguments);
+};
+e.dynCall_iiiiiijj = function() {
+ assert(E, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
+ assert(!0, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
+ return e.asm.dynCall_iiiiiijj.apply(null, arguments);
+};
+e.asm = Z;
+Object.getOwnPropertyDescriptor(e, "intArrayFromString") || (e.intArrayFromString = function() {
+ m("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "intArrayToString") || (e.intArrayToString = function() {
+ m("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "ccall") || (e.ccall = function() {
+ m("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "cwrap") || (e.cwrap = function() {
+ m("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "setValue") || (e.setValue = function() {
+ m("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getValue") || (e.getValue = function() {
+ m("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "allocate") || (e.allocate = function() {
+ m("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getMemory") || (e.getMemory = function() {
+ m("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "AsciiToString") || (e.AsciiToString = function() {
+ m("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToAscii") || (e.stringToAscii = function() {
+ m("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "UTF8ArrayToString") || (e.UTF8ArrayToString = function() {
+ m("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "UTF8ToString") || (e.UTF8ToString = function() {
+ m("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToUTF8Array") || (e.stringToUTF8Array = function() {
+ m("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToUTF8") || (e.stringToUTF8 = function() {
+ m("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "lengthBytesUTF8") || (e.lengthBytesUTF8 = function() {
+ m("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "UTF16ToString") || (e.UTF16ToString = function() {
+ m("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToUTF16") || (e.stringToUTF16 = function() {
+ m("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "lengthBytesUTF16") || (e.lengthBytesUTF16 = function() {
+ m("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "UTF32ToString") || (e.UTF32ToString = function() {
+ m("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stringToUTF32") || (e.stringToUTF32 = function() {
+ m("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "lengthBytesUTF32") || (e.lengthBytesUTF32 = function() {
+ m("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "allocateUTF8") || (e.allocateUTF8 = function() {
+ m("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stackTrace") || (e.stackTrace = function() {
+ m("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnPreRun") || (e.addOnPreRun = function() {
+ m("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnInit") || (e.addOnInit = function() {
+ m("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnPreMain") || (e.addOnPreMain = function() {
+ m("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnExit") || (e.addOnExit = function() {
+ m("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addOnPostRun") || (e.addOnPostRun = function() {
+ m("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "writeStringToMemory") || (e.writeStringToMemory = function() {
+ m("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "writeArrayToMemory") || (e.writeArrayToMemory = function() {
+ m("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "writeAsciiToMemory") || (e.writeAsciiToMemory = function() {
+ m("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addRunDependency") || (e.addRunDependency = function() {
+ m("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "removeRunDependency") || (e.removeRunDependency = function() {
+ m("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "ENV") || (e.ENV = function() {
+ m("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "FS") || (e.FS = function() {
+ m("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createFolder") || (e.FS_createFolder = function() {
+ m("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createPath") || (e.FS_createPath = function() {
+ m("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createDataFile") || (e.FS_createDataFile = function() {
+ m("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createPreloadedFile") || (e.FS_createPreloadedFile = function() {
+ m("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createLazyFile") || (e.FS_createLazyFile = function() {
+ m("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createLink") || (e.FS_createLink = function() {
+ m("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_createDevice") || (e.FS_createDevice = function() {
+ m("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "FS_unlink") || (e.FS_unlink = function() {
+ m("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
+});
+Object.getOwnPropertyDescriptor(e, "GL") || (e.GL = function() {
+ m("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "dynamicAlloc") || (e.dynamicAlloc = function() {
+ m("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "warnOnce") || (e.warnOnce = function() {
+ m("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "loadDynamicLibrary") || (e.loadDynamicLibrary = function() {
+ m("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "loadWebAssemblyModule") || (e.loadWebAssemblyModule = function() {
+ m("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getLEB") || (e.getLEB = function() {
+ m("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getFunctionTables") || (e.getFunctionTables = function() {
+ m("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "alignFunctionTables") || (e.alignFunctionTables = function() {
+ m("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "registerFunctions") || (e.registerFunctions = function() {
+ m("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "addFunction") || (e.addFunction = function() {
+ m("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "removeFunction") || (e.removeFunction = function() {
+ m("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getFuncWrapper") || (e.getFuncWrapper = function() {
+ m("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "prettyPrint") || (e.prettyPrint = function() {
+ m("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "makeBigInt") || (e.makeBigInt = function() {
+ m("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "dynCall") || (e.dynCall = function() {
+ m("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getCompilerSetting") || (e.getCompilerSetting = function() {
+ m("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stackSave") || (e.stackSave = function() {
+ m("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stackRestore") || (e.stackRestore = function() {
+ m("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "stackAlloc") || (e.stackAlloc = function() {
+ m("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "establishStackSpace") || (e.establishStackSpace = function() {
+ m("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "print") || (e.print = function() {
+ m("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "printErr") || (e.printErr = function() {
+ m("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "getTempRet0") || (e.getTempRet0 = function() {
+ m("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "setTempRet0") || (e.setTempRet0 = function() {
+ m("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "callMain") || (e.callMain = function() {
+ m("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "Pointer_stringify") || (e.Pointer_stringify = function() {
+ m("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+});
+Object.getOwnPropertyDescriptor(e, "ALLOC_NORMAL") || Object.defineProperty(e, "ALLOC_NORMAL", {get:function() {
+ m("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+}});
+Object.getOwnPropertyDescriptor(e, "ALLOC_STACK") || Object.defineProperty(e, "ALLOC_STACK", {get:function() {
+ m("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+}});
+Object.getOwnPropertyDescriptor(e, "ALLOC_DYNAMIC") || Object.defineProperty(e, "ALLOC_DYNAMIC", {get:function() {
+ m("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+}});
+Object.getOwnPropertyDescriptor(e, "ALLOC_NONE") || Object.defineProperty(e, "ALLOC_NONE", {get:function() {
+ m("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");
+}});
+db = function wf() {
+ e.calledRun || xf();
+ e.calledRun || (db = wf);
+};
+function xf() {
+ function a() {
+ if (!e.calledRun && (e.calledRun = !0, !xa)) {
+ Na();
+ assert(!E);
+ E = !0;
+ if (!e.noFSInit && !uc) {
+ assert(!uc, "FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");
+ uc = !0;
+ tc();
+ e.stdin = e.stdin;
+ e.stdout = e.stdout;
+ e.stderr = e.stderr;
+ e.stdin ? wc("stdin", e.stdin) : pc("/dev/tty", "/dev/stdin");
+ e.stdout ? wc("stdout", null, e.stdout) : pc("/dev/tty", "/dev/stdout");
+ e.stderr ? wc("stderr", null, e.stderr) : pc("/dev/tty1", "/dev/stderr");
+ var a = qc("/dev/stdin", "r"), c = qc("/dev/stdout", "w"), d = qc("/dev/stderr", "w");
+ assert(0 === a.fd, "invalid handle for stdin (" + a.fd + ")");
+ assert(1 === c.fd, "invalid handle for stdout (" + c.fd + ")");
+ assert(2 === d.fd, "invalid handle for stderr (" + d.fd + ")");
+ }
+ Oa(Qa);
+ Na();
+ Wb = !1;
+ Oa(Ra);
+ if (e.onRuntimeInitialized) {
+ e.onRuntimeInitialized();
+ }
+ assert(!e._main, 'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]');
+ Na();
+ if (e.postRun) {
+ for ("function" == typeof e.postRun && (e.postRun = [e.postRun]); e.postRun.length;) {
+ a = e.postRun.shift(), Ta.unshift(a);
+ }
+ }
+ Oa(Ta);
+ }
+ }
+ if (!(0 < bb)) {
+ assert(!0);
+ y[261941] = 34821223;
+ y[261942] = 2310721022;
+ if (e.preRun) {
+ for ("function" == typeof e.preRun && (e.preRun = [e.preRun]); e.preRun.length;) {
+ Ua();
+ }
+ }
+ Oa(Pa);
+ 0 < bb || e.calledRun || (e.setStatus ? (e.setStatus("Running..."), setTimeout(function() {
+ setTimeout(function() {
+ e.setStatus("");
+ }, 1);
+ a();
+ }, 1)) : a(), Na());
+ }
+}
+e.run = xf;
+var yf = [];
+function m(a) {
+ if (e.onAbort) {
+ e.onAbort(a);
+ }
+ oa(a);
+ n(a);
+ xa = !0;
+ var b = "abort(" + a + ") at " + rb();
+ yf && yf.forEach(function(c) {
+ b = c(b, a);
+ });
+ throw b;
+}
+e.abort = m;
+if (e.preInit) {
+ for ("function" == typeof e.preInit && (e.preInit = [e.preInit]); 0 < e.preInit.length;) {
+ e.preInit.pop()();
+ }
+}
+e.noExitRuntime = !0;
+xf();
+
diff --git a/dist/dbr-7.5.0.1.worker.js b/dist/dbr-7.5.0.1.worker.js
new file mode 100644
index 00000000..9a99462d
--- /dev/null
+++ b/dist/dbr-7.5.0.1.worker.js
@@ -0,0 +1,107 @@
+'use strict';var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b{const a=!!("object"==typeof global&&global.process&&global.process.release&&global.process.release.name);let b;a&&(b=require("worker_threads"));let f=a?b.parentPort:self,m,n,u,r,ha,H,A=!1,L=!1,M,Y,Z,Q="https://dbrjsauth.dynamsoft.com/v2/",V,ia,C,aa=Promise.resolve();a||!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?
+self:this).localforage=a()}(function(){return function w(a,b,f){function g(d,B){if(!b[d]){if(!a[d]){var q="function"==typeof require&&require;if(!B&&q)return q(d,!0);if(h)return h(d,!0);B=Error("Cannot find module '"+d+"'");throw B.code="MODULE_NOT_FOUND",B;}B=b[d]={exports:{}};a[d][0].call(B.exports,function(b){return g(a[d][1][b]||b)},B,B.exports,w,a,b,f)}return b[d].exports}for(var h="function"==typeof require&&require,d=0;d=a.oldVersion&&e.createObjectStore(S)}catch(I){if("ConstraintError"!==I.name)throw I;console.warn('The database "'+c.name+'" has been upgraded from version '+a.oldVersion+" to version "+a.newVersion+', but the storage "'+c.storeName+'" already exists.')}});l.onerror=function(a){a.preventDefault();b(l.error)};l.onsuccess=function(){e(l.result);x(c)}})}function y(a,e){if(!a.db)return!0;var c=!a.db.objectStoreNames.contains(a.storeName),
+b=a.version>a.db.version;return(a.versiona.version&&(a.version=e)),!0):!1}function A(a){return new p(function(c,k){var e=new FileReader;e.onerror=k;e.onloadend=function(e){e=btoa(e.target.result||"");c({__local_forage_encoded_blob:!0,data:e,type:a.type})};e.readAsBinaryString(a)})}function C(a){for(var c=
+atob(a.data),k=c.length,b=new ArrayBuffer(k),d=new Uint8Array(b),l=0;l>4;l[b++]=(15&g)<<4|I>>2;l[b++]=(3&I)<<6|63&h}return d}function G(a){var c=new Uint8Array(a),k="";for(a=0;a>2],k+=O[(3&c[a])<<
+4|c[a+1]>>4],k+=O[(15&c[a+1])<<2|c[a+2]>>6],k+=O[63&c[a+2]];return 2==c.length%3?k=k.substring(0,k.length-1)+"=":1==c.length%3&&(k=k.substring(0,k.length-2)+"=="),k}function L(a,e,k,b){a.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],k,b)}function N(a,e,k,b,d,l){a.executeSql(k,b,d,function(a,c){c.code===c.SYNTAX_ERR?a.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],function(a,ja){ja.rows.length?l(a,c):
+L(a,e,function(){a.executeSql(k,b,d,l)},l)},l):l(a,c)},l)}function P(a,b,k,ja){var c=this;a=d(a);var e=new p(function(e,d){c.ready().then(function(){void 0===b&&(b=null);var l=b,z=c._dbInfo;z.serializer.serialize(b,function(b,g){g?d(g):z.db.transaction(function(c){N(c,z,"INSERT OR REPLACE INTO "+z.storeName+" (key, value) VALUES (?, ?)",[a,b],function(){e(l)},function(a,c){d(c)})},function(b){if(b.code===b.QUOTA_ERR){if(0 '__WebKitDatabaseInfoTable__'",[],function(b,e){b=[];for(var k=0;ka)return void b(null);c.ready().then(function(){E(c._dbInfo,"readonly",function(k,d){if(k)return e(k);try{var l=!1,g=d.objectStore(c._dbInfo.storeName).openCursor();g.onsuccess=function(){var c=g.result;if(!c)return void b(null);0===a?b(c.key):l?b(c.key):(l=!0,c.advance(a))};g.onerror=function(){e(g.error)}}catch(oa){e(oa)}})}).catch(e)});return g(e,b),e},keys:function(a){var c=
+this,b=new p(function(a,b){c.ready().then(function(){E(c._dbInfo,"readonly",function(e,k){if(e)return b(e);try{var d=k.objectStore(c._dbInfo.storeName).openCursor(),l=[];d.onsuccess=function(){var c=d.result;if(!c)return void a(l);l.push(c.key);c.continue()};d.onerror=function(){b(d.error)}}catch(ca){b(ca)}})}).catch(b)});return g(b,a),b},dropInstance:function(a,b){b=q.apply(this,arguments);var c=this.config();a="function"!=typeof a&&a||{};a.name||(a.name=a.name||c.name,a.storeName=a.storeName||c.storeName);
+a.name?(c=a.name===c.name&&this._dbInfo.db?p.resolve(this._dbInfo.db):v(a,!1).then(function(b){var c=D[a.name],e=c.forages;c.db=b;for(c=0;cself.crypto.subtle.importKey("raw",new Uint8Array([80,88,27,82,145,164,199,211,187,87,89,128,150,44,190,213,99,181,118,158,215,103,76,117,29,83,122,137,5,180,157,114]),"AES-GCM",!0,["encrypt","decrypt"]),
+wa=a=>$jscomp.asyncExecutePromiseGeneratorFunction(function*(){if(self.crypto&&self.crypto.subtle&&self.crypto.subtle.importKey){var b=atob(a),h=new Uint8Array(b.length);for(let a=0;a{let h=S++;K.set(h,a=>{if(a.success)return m&&console.log(a.txt),
+b(a.txt);{let b=Error(a.message);b.stack+="\n"+a.stack;return g(b)}});f.postMessage({type:"taskd",taskID:h,txt:a})})}),xa=a=>$jscomp.asyncExecutePromiseGeneratorFunction(function*(){if(self.crypto&&self.crypto.subtle&&self.crypto.subtle.importKey){var b=new Uint8Array(a.length);for(var h=0;h{let h=S++;K.set(h,a=>{if(a.success)return m&&console.log(a.txt),b(a.txt);{let b=Error(a.message);b.stack+="\n"+a.stack;return g(b)}});f.postMessage({type:"taske",taskID:h,txt:a})})}),T=0;const ya=(a,b,f)=>{a*=b;0{f.postMessage({type:"log",message:a})},printErr:a=>{console.error(a);f.postMessage({type:"log",message:a})},onRuntimeInitialized:function(){return $jscomp.asyncExecutePromiseGeneratorFunction(function*(){f.postMessage({type:"log",message:"wasm initialized, cost "+(Date.now()-V)+" ms"});let b={productKeys:r,domain:H};m&&(b.bDebug=!0);if(ha){yield ia;let a=C;if(a instanceof Error){f.postMessage({type:"load",success:!1,message:a.message,
+stack:a.stack});setTimeout(()=>{throw a;},0);return}if(!a.productKeys){f.postMessage({type:"load",success:!1,message:a.message,stack:""});return}a.message&&f.postMessage({type:"log",message:a.message});F=1E3*a.sessionDuration;b.runtimeKeys=r;b.productKeys=a.productKeys;b.consumeType=a.consumeType;b.urlGetLicense="";b.aryUrlPostConsume=b.sm_aryUrlPostConsume=[];b.bNewDevice=A;b.uuid=M;b.initTime=Date.now().toString();U();setInterval(U,F)}a||(Module=DBRModule);Module.BarcodeReaderWasm.init(JSON.stringify(b));
+f.postMessage({type:"load",success:!0,version:Module.BarcodeReaderWasm.getVersion()})})}};let v=new Map,za=0;f.onmessage=function(b){return $jscomp.asyncExecutePromiseGeneratorFunction(function*(){var g=b.data?b.data:b,h=g.id,t=g.instanceID;const w=g.body;switch(g.type){case "loadWasm":m=g.bWasmDebug;n=g.engineResourcePath;u=g.version;r=g.productKeys;H=g.domain;L=g.bUseFullFeature;M=g.deviceId;Y=g.browserInfo;Z=g.deviceFriendlyName;Q=g.licenseServer?g.licenseServer:Q;ea=g.bSendSmallRecordsForDebug;
+f.postMessage({type:"log",message:"wasm loading..."});V=Date.now();if(a){h=Module;Module=require("./dbr-"+u+".node.wasm.js");for(let a in h)Module[a]=h[a]}else importScripts(n+"dbr-"+u+(L?".full":"")+".wasm.js");(ha=8==r.length||8$jscomp.asyncExecutePromiseGeneratorFunction(function*(){try{yield(yield localforage.createInstance({name:"dbrjshello"})).setItem("dbrjshello","available")}catch(R){localforage=
+function(a){this.dbname=a};localforage.createInstance=function(a){return $jscomp.asyncExecutePromiseGeneratorFunction(function*(){return new localforage(a.name)})};var a=a=>function(){let b=[];for(let a=0;a{let h=S++;K.set(h,a=>{if(a.success)return m&&console.log(a.result),d(a.result);{let b=Error(a.message);b.stack+="\n"+a.stack;return g(b)}});f.postMessage({type:"localforage",taskID:h,dbname:this.dbname,method:a,paras:b})})};localforage.prototype.setItem=
+a("setItem");localforage.prototype.getItem=a("getItem");localforage.prototype.removeItem=a("removeItem");localforage.prototype.keys=a("keys")}J=yield localforage.createInstance({name:"dbrjsLicenseInfo"});P=yield localforage.createInstance({name:"dbrjs"+r+"unsV2"});A=!(yield J.getItem(r+"old"));a=Date.now();let b;var g;let h=!0,n,t;if(g=yield J.getItem(r))[b,n,g]=g,h=a>g,a>b&&(yield J.removeItem(r),n=null);try{t=yield Promise.race([fetch(Q+"api/verification/"+r).then(a=>{if(a.ok)return a.text();throw Error("Network Error. Can't get license.");
+}),new Promise((a,b)=>{setTimeout(()=>b(Error("Network Error. Request timeout.")),h?15E3:3E3)})])}catch(R){if(m&&console.error(R),h){C=R;return}}g=a=>$jscomp.asyncExecutePromiseGeneratorFunction(function*(){return yield wa(a).then(a=>JSON.parse(a)).catch(()=>Error("Parse Error. Can't get valid license."))});if(t){C=yield g(t);var u="device"==C.consumeType;C.productKeys?yield J.setItem(r,[a+864E5*(u?366:7),t,a+6048E5]):u&&(u=C,C=yield g(n),C.message=u.message,yield J.setItem(r,[b,t,Math.min(a+6048E5,
+b)]))}else C=yield g(n)}))());break;case "createInstance":t=za++;try{let b=new Module.BarcodeReaderWasm(g.bScanner,t);v.set(t,b);let f=JSON.parse(b.getRuntimeSettings());g.bScanner?(f.localizationModes=[2,0,0,0,0,0,0,0],f.deblurLevel=0):(f.expectedBarcodesCount=512,f.scaleDownThreshold=1E5,f.timeout=1E5);a||L||(f.barcodeFormatIds=234883071);b.updateRuntimeSettings(JSON.stringify(f))}catch(d){y(d,h);break}f.postMessage({type:"task",id:h,body:{success:!0,instanceID:t}});break;case "destroy":try{v.get(t).delete(),
+v.delete(t)}catch(d){y(d,h);break}f.postMessage({type:"task",id:h,body:{success:!0}});break;case "decodeBuffer":{g=m?Date.now():0;let a,b,n,r;try{a=m?Date.now():0,ya(w.height,w.stride,w.buffer),b=m?Date.now():0,r=JSON.parse(v.get(t).decodeBufferPtr(T,w.width,w.height,w.stride,w.format)),n=m?Date.now():0}catch(ua){y(ua,h);break}f.postMessage({type:"task",id:h,body:{success:!0,decodeReturn:r}});m&&f.postMessage({type:"log",message:["timeWorkerGetMsg: "+g,"timeBeforeSendBufferToWasm: "+a+" "+(a-g),"timeBeforeDecode: "+
+b+" "+(b-a),"timefinishDecode: "+n+" "+(n-b)].join("\n")});break}case "decodeFileInMemory":{let a;try{a=JSON.parse(v.get(t).decodeFileInMemory(w.bytes))}catch(q){y(q,h);break}f.postMessage({type:"task",id:h,body:{success:!0,decodeReturn:a}});break}case "clearMapDecodeRecord":try{v.get(t).clearMapDecodeRecord()}catch(d){y(d,h);break}f.postMessage({type:"task",id:h,body:{success:!0}});break;case "getRuntimeSettings":{let a;try{a=v.get(t).getRuntimeSettings()}catch(q){y(q,h);break}f.postMessage({type:"task",
+id:h,body:{success:!0,results:a}});break}case "updateRuntimeSettings":{let a;try{a=JSON.parse(v.get(t).updateRuntimeSettings(w.settings))}catch(q){y(q,h);break}f.postMessage({type:"task",id:h,body:{success:!0,updateReturn:a}});break}case "resetRuntimeSettings":try{let a=v.get(t);a.resetRuntimeSettings();let b=JSON.parse(a.getRuntimeSettings());a.bScanner?(b.localizationModes=[2,0,0,0,0,0,0,0],b.deblurLevel=0):(b.expectedBarcodesCount=512,b.scaleDownThreshold=1E5,b.timeout=1E5);L||(b.barcodeFormatIds=
+234883071);a.updateRuntimeSettings(JSON.stringify(b))}catch(d){y(b,h);break}f.postMessage({type:"task",id:h,body:{success:!0}});break;case "outputSettingsToString":{let a;try{a=v.get(t).outputSettingsToString()}catch(q){y(q,h);break}f.postMessage({type:"task",id:h,body:{success:!0,results:a}});break}case "initRuntimeSettingsWithString":{let a;try{a=JSON.parse(v.get(t).initRuntimeSettingsWithString(w.settings))}catch(q){y(q,h);break}f.postMessage({type:"task",id:h,body:{success:!0,initReturn:a}});
+break}case "getIntermediateResults":{let a=null;try{var B=v.get(t).getIntermediateResults(),ta=JSON.parse(B,(b,d)=>"bytes"===b&&"ptr"in d&&"length"in d?a=Module.BarcodeReaderWasm.getBytes(d.ptr,d.length):d)}catch(q){y(q,h);break}f.postMessage({type:"task",id:h,body:{success:!0,results:ta}});v.get(t).freeIntermediateResults();break}case "setModeArgument":{let a;try{a=JSON.parse(v.get(t).setModeArgument(w.modeName,w.index,w.argumentName,w.argumentValue))}catch(q){y(q,h);break}f.postMessage({type:"task",
+id:h,body:{success:!0,setReturn:a}});break}case "getModeArgument":{let a;try{a=JSON.parse(v.get(t).getModeArgument(w.modeName,w.index,w.argumentName))}catch(q){y(q,h);break}f.postMessage({type:"task",id:h,body:{success:!0,getReturn:a}});break}case "updateScanSettings":try{let a=v.get(t),b=w.settings;a.duplicateForgetTime=b.duplicateForgetTime;a.oneDRememberFrameCount=b.oneDRememberFrameCount;a.oneDTrustFrameCount=b.oneDTrustFrameCount;b.frameFilter?a.setFrameFilter(JSON.stringify(b.frameFilter)):
+a.setFrameFilter("")}catch(d){y(d,h);break}f.postMessage({type:"task",id:h,body:{success:!0}});break;case "getScanSettings":g={};try{let a=v.get(t);g.duplicateForgetTime=a.duplicateForgetTime;g.oneDRememberFrameCount=a.oneDRememberFrameCount;g.oneDTrustFrameCount=a.oneDTrustFrameCount;let b=a.getFrameFilter();b&&(g.frameFilter=JSON.parse(b))}catch(d){y(d,h);break}f.postMessage({type:"task",id:h,body:{success:!0,results:g}});break;case "task":h=g.id;g=g.body;try{K.get(h)(g),K.delete(h)}catch(d){throw K.delete(h),
+d;}break;default:console.warn("Unmatched task: ",b)}})};if(a)f.on("message",f.onmessage);let y=(a,b)=>{f.postMessage({type:"task",id:b,body:{success:!1,message:a.message,stack:a.stack}});setTimeout(()=>{throw a;},0)};(a?global:self).addConsumeRecordToDB=a=>$jscomp.asyncExecutePromiseGeneratorFunction(function*(){m&&console.log("%c","color:#0f0",atob(a));yield P.setItem(Date.now().toString(),a);fa$jscomp.asyncExecutePromiseGeneratorFunction(function*(){aa=
+aa.then(()=>$jscomp.asyncExecutePromiseGeneratorFunction(function*(){var a=Date.now();let b=yield P.keys();if(b.length){m&&console.log("get keys to filter for send: %o",b);var f=[],n=new Map;for(let g of b){let b=JSON.parse(atob(yield P.getItem(g))),d;A?(A=!1,yield J.setItem(r+"old",btoa(M)),d=Math.floor(b.decodeTime/F)*F):d=Math.ceil(b.decodeTime/F)*F;ea&&(d=parseInt(b.decodeTime));m&&console.log("timeKey: %d, dateNow: %d",d,a);if(d>a)continue;f.push(g);let h=n.has(d)?n.get(d):{all:0,oned:0,qr:0,
+pdf417:0,dm:0,mc:0,other:0};h.all+=b.consumption.all;h.oned+=b.consumption.oned;h.qr+=b.consumption.qr;h.pdf417+=b.consumption.pdf417;h.dm+=b.consumption.dm;h.mc+=b.consumption.mc;h.other+=b.consumption.other;n.set(d,h)}if(f.length){m&&console.log("get keys for send: %o",b);fa=a+F;var u=[];n.forEach((a,b)=>{u.push({recordTime:b,consumption:a})});a={version:"2",runtimeKeys:r,uuid:M,browserInfo:Y,deviceFriendlyName:Z,postTime:Date.now(),records:u};m&&m&&console.log(a);yield fetch(Q+"api/verification",
+{mode:"cors",method:"POST",body:yield xa(JSON.stringify(a))}).then(a=>$jscomp.asyncExecutePromiseGeneratorFunction(function*(){if(a.ok)for(let a of f)yield P.removeItem(a)}),a=>{console.error(a)})}}}))})})();
diff --git a/dist/dbr.browser.mjs b/dist/dbr.browser.mjs
new file mode 100644
index 00000000..419fb1fa
--- /dev/null
+++ b/dist/dbr.browser.mjs
@@ -0,0 +1,11 @@
+/**
+* Dynamsoft JavaScript Library
+* @product Dynamsoft Barcode Reader JS Edition
+* @website http://www.dynamsoft.com
+* @preserve Copyright 2020, Dynamsoft Corporation
+* @author Dynamsoft
+* @version 7.5.0.1 (js 20200605)
+* @fileoverview Dynamsoft JavaScript Library for Barcode Reader
+* More info on DBR JS: https://www.dynamsoft.com/Products/barcode-recognition-javascript.aspx
+*/
+!function(e,t){let bNode=!!(typeof global=="object"&&global.process&&global.process.release&&global.process.release.name);"object"==typeof exports&&"object"==typeof module?module.exports=!bNode?t():t(("worker_threads"),("https"),("http"),("fs"),("os")):"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.dbr=!bNode?t():t(("worker_threads"),("https"),("http"),("fs"),("os")):e.dbr=t(e.worker_threads,e.https,e.http,e.fs,e.os)}(("object"==typeof window?window:global),(function(e,t,n,r,i){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){e.exports=function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){if(o)return o(s,!0);var d=new Error("Cannot find module '"+s+"'");throw d.code="MODULE_NOT_FOUND",d}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){var n=t[s][1][e];return i(n||e)}),c,c.exports,e,t,n,r)}return n[s].exports}for(var o=!1,s=0;s=43)}})).catch((function(){return!1}))}(e).then((function(e){return u=e}))}function g(e){var t=_[e.name],n={};n.promise=new s((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function E(e){var t=_[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function R(e,t){var n=_[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function v(e,t){return new s((function(n,r){if(_[e.name]=_[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return n(e.db);g(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var s=i.open.apply(i,o);t&&(s.onupgradeneeded=function(t){var n=s.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore("local-forage-detect-blob-support")}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),s.onerror=function(e){e.preventDefault(),r(s.error)},s.onsuccess=function(){n(s.result),E(e)}}))}function I(e){return v(e,!1)}function m(e){return v(e,!0)}function A(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function y(e){return o([function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return s.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),m(e)})).then((function(){return function(e){g(e);for(var t=_[e.name],n=t.forages,r=0;r>4,l[d++]=(15&r)<<4|i>>2,l[d++]=(3&i)<<6|63&o;return c}function B(e){var t,n=new Uint8Array(e),r="";for(t=0;t>2],r+=b[(3&n[t])<<4|n[t+1]>>4],r+=b[(15&n[t+1])<<2|n[t+2]>>6],r+=b[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var w={serialize:function(e,t){var n="";if(e&&(n=L.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===L.call(e.buffer))){var r,i="__lfsc__:";e instanceof ArrayBuffer?(r=e,i+="arbf"):(r=e.buffer,"[object Int8Array]"===n?i+="si08":"[object Uint8Array]"===n?i+="ui08":"[object Uint8ClampedArray]"===n?i+="uic8":"[object Int16Array]"===n?i+="si16":"[object Uint16Array]"===n?i+="ur16":"[object Int32Array]"===n?i+="si32":"[object Uint32Array]"===n?i+="ui32":"[object Float32Array]"===n?i+="fl32":"[object Float64Array]"===n?i+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(i+B(r))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n="~~local_forage_type~"+e.type+"~"+B(this.result);t("__lfsc__:blob"+n)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,M))return JSON.parse(e);var t,n=e.substring(O),r=e.substring(M,O);if("blob"===r&&C.test(n)){var i=n.match(C);t=i[1],n=n.substring(i[0].length)}var s=N(n);switch(r){case"arbf":return s;case"blob":return o([s],{type:t});case"si08":return new Int8Array(s);case"ui08":return new Uint8Array(s);case"uic8":return new Uint8ClampedArray(s);case"si16":return new Int16Array(s);case"ur16":return new Uint16Array(s);case"si32":return new Int32Array(s);case"ui32":return new Uint32Array(s);case"fl32":return new Float32Array(s);case"fl64":return new Float64Array(s);default:throw new Error("Unkown type: "+r)}},stringToBuffer:N,bufferToString:B};function P(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function F(e,t,n,r,i,o){e.executeSql(n,r,i,(function(e,s){s.code===s.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,s):P(e,t,(function(){e.executeSql(n,r,i,o)}),o)}),o):o(e,s)}),o)}function U(e,t,n,r){var i=this;e=c(e);var o=new s((function(o,s){i.ready().then((function(){void 0===t&&(t=null);var a=t,d=i._dbInfo;d.serializer.serialize(t,(function(t,c){c?s(c):d.db.transaction((function(n){F(n,d,"INSERT OR REPLACE INTO "+d.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){s(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void o(U.apply(i,[e,a,n,r-1]));s(t)}}))}))})).catch(s)}));return a(o,n),o}function k(e){return new s((function(t,n){e.transaction((function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var i=[],o=0;o0}var W={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var n in e)t[n]=e[n];return t.keyPrefix=x(e,this._defaultConfig),G()?(this._dbInfo=t,t.serializer=w,s.resolve()):s.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,o=localStorage.length,s=1,a=0;a=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return a(n,e),n},length:function(e){var t=this.keys().then((function(e){return e.length}));return a(t,e),t},key:function(e,t){var n=this,r=n.ready().then((function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t}));return a(r,t),r},keys:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,r=[],i=0;i=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):s.reject("Invalid arguments"),t),r}},j=function(e,t){for(var n,r,i=e.length,o=0;o="v12":"undefined"!=typeof Worker),getUserMedia:!("undefined"==typeof navigator||!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),camera:!1,browser:this.browserInfo.browser,version:this.browserInfo.version,OS:this.browserInfo.OS};if(e.getUserMedia)try{(yield navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(e=>{e.stop()}),e.camera=!0}catch(e){}return e}))}static get engineResourcePath(){return this._engineResourcePath}static set engineResourcePath(e){if("unload"!=this._loadWasmStatus)throw new Error("`engineResourcePath` is not allowed to change after loadWasm is called.");if(null==e&&(e="./"),c)l._engineResourcePath=e;else{let t=document.createElement("a");t.href=e,l._engineResourcePath=t.href}this._engineResourcePath.endsWith("/")||(l._engineResourcePath+="/")}static get licenseServer(){return this._licenseServer}static set licenseServer(e){if("unload"!=this._loadWasmStatus)throw new Error("`licenseServer` is not allowed to change after loadWasm is called.");if(null==e)l._licenseServer=null;else{if(c)l._licenseServer=e;else{let t=document.createElement("a");t.href=e,l._licenseServer=t.href}this._licenseServer.endsWith("/")||(l._licenseServer+="/")}}static get deviceFriendlyName(){return this._deviceFriendlyName}static set deviceFriendlyName(e){if("unload"!=this._loadWasmStatus)throw new Error("`deviceFriendlyName` is not allowed to change after loadWasm is called.");l._deviceFriendlyName=e||""}static get _bUseFullFeature(){return this.__bUseFullFeature}static set _bUseFullFeature(e){if("unload"!=this._loadWasmStatus)throw new Error("`_bUseFullFeature` is not allowed to change after loadWasm is called.");this.__bUseFullFeature=e}set region(e){this._region=e}get region(){return this._region}static isLoaded(){return"loadSuccess"==this._loadWasmStatus}static loadWasm(){return a(this,void 0,void 0,(function*(){if(c&&process.version<"v12")return Promise.reject("DBRJS SDK need nodejs version >= v12.");let e=8==this.productKeys.length||this.productKeys.length>8&&!this.productKeys.startsWith("t")&&!this.productKeys.startsWith("f")&&!this.productKeys.startsWith("P")&&!this.productKeys.startsWith("L");return e&&self.crypto&&!self.crypto.subtle?Promise.reject("Need https to use runtimeKeys in this browser."):(e&&"Edge"==this.browserInfo.browser&&this.engineResourcePath.startsWith(location.origin),yield new Promise((t,r)=>a(this,void 0,void 0,(function*(){switch(this._loadWasmStatus){case"unload":{let t;l._loadWasmStatus="loading";let r=new Map,i=(e,t,n)=>a(this,void 0,void 0,(function*(){let i=r.get(e);return i||(i=yield d.createInstance({name:e}),r.set(e,i)),yield i[t].apply(i,n)}));if(e){if(t=localStorage.getItem("dbr-uuid"),t)localStorage.removeItem("dbr-uuid"),yield i("dbrjsLicenseInfo","removeItem",[this.productKeys+"old"]);else try{if(t=yield i("dbrjsLicenseInfo","getItem",[this.productKeys+"old"]),!t||"null"==t)throw t=null,null;t=atob(t)}catch(e){yield i("dbrjsLicenseInfo","removeItem",[this.productKeys+"old"])}t||(t="10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(parseInt(e)^crypto.getRandomValues(new Uint8Array(1))[0]&15>>parseInt(e)/4).toString(16)),t+="-"+this.browserInfo.OS+"-"+this.browserInfo.browser)}let o,s=this.engineResourcePath+this._workerName;if(c||this.engineResourcePath.startsWith(location.origin)||(s=yield fetch(s).then(e=>e.blob()).then(e=>URL.createObjectURL(e))),c){const e=n(1);l._dbrWorker=new e.Worker(s)}else l._dbrWorker=new Worker(s);this._dbrWorker.onerror=e=>{l._loadWasmStatus="loadFail";for(let t of this._loadWasmCallbackArr)t(new Error(e.message))};let u=()=>self.crypto.subtle.importKey("raw",new Uint8Array([80,88,27,82,145,164,199,211,187,87,89,128,150,44,190,213,99,181,118,158,215,103,76,117,29,83,122,137,5,180,157,114]),"AES-GCM",!0,["encrypt","decrypt"]),_=e=>a(this,void 0,void 0,(function*(){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ea(this,void 0,void 0,(function*(){let t=new Uint8Array(e.length);for(let n=0;na(this,void 0,void 0,(function*(){let t=e.data?e.data:e;switch(t.type){case"log":this._onLog&&this._onLog(t.message);break;case"load":if(t.success){l._loadWasmStatus="loadSuccess",l._version=t.version+"(JS "+this._jsVersion+"."+this._jsEditVersion+")",this._onLog&&this._onLog("load dbr worker success");for(let e of this._loadWasmCallbackArr)e();this._dbrWorker.onerror=null}else{let e=new Error(t.message);e.stack=t.stack+"\n"+e.stack,l._loadWasmStatus="loadFail";for(let t of this._loadWasmCallbackArr)t(e)}break;case"task":{let e=t.id,n=t.body;try{this._taskCallbackMap.get(e)(n),this._taskCallbackMap.delete(e)}catch(t){throw this._taskCallbackMap.delete(e),t}break}case"taskd":{let e=yield _(t.txt);this._dbrWorker.postMessage({type:"task",id:t.taskID,body:{success:!0,txt:e}});break}case"taske":{let e=yield h(t.txt);this._dbrWorker.postMessage({type:"task",id:t.taskID,body:{success:!0,txt:e}});break}case"localforage":{let e=yield i(t.dbname,t.method,t.paras);this._dbrWorker.postMessage({type:"task",id:t.taskID,body:{success:!0,result:e}});break}default:this._onLog&&this._onLog(e)}})),c&&this._dbrWorker.on("message",this._dbrWorker.onmessage),this._dbrWorker.postMessage({type:"loadWasm",bWasmDebug:this._bWasmDebug,engineResourcePath:this.engineResourcePath,version:this._jsVersion,productKeys:this.productKeys,domain:!c&&location.origin.startsWith("http")?location.origin:"https://localhost",bUseFullFeature:this._bUseFullFeature,deviceId:t,browserInfo:this.browserInfo,deviceFriendlyName:this.deviceFriendlyName,licenseServer:this.licenseServer,bSendSmallRecordsForDebug:this._bSendSmallRecordsForDebug})}case"loading":this._loadWasmCallbackArr.push(e=>{e?r(e):t()});break;case"loadSuccess":t();break;case"loadFail":r()}}))))}))}static createInstanceInWorker(e=!1){return a(this,void 0,void 0,(function*(){return yield this.loadWasm(),yield new Promise((t,n)=>{let r=l._nextTaskID++;this._taskCallbackMap.set(r,e=>{if(e.success)return t(e.instanceID);{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,n(t)}}),this._dbrWorker.postMessage({type:"createInstance",id:r,productKeys:"",bScanner:e})})}))}static createInstance(){return a(this,void 0,void 0,(function*(){let e=new l;return e._instanceID=yield this.createInstanceInWorker(),e}))}decode(e){return a(this,void 0,void 0,(function*(){if(l._onLog&&l._onLog("decode(source: any)"),l._onLog&&(this._timeStartDecode=Date.now()),c)return e instanceof Buffer?yield this._decodeFileInMemory_Uint8Array(new Uint8Array(e)):e instanceof Uint8Array?yield this._decodeFileInMemory_Uint8Array(e):"string"==typeof e||e instanceof String?"data:image/"==e.substring(0,11)?yield this._decode_Base64(e):"http"==e.substring(0,4)?yield this._decode_Url(e):yield this._decode_FilePath(e):yield Promise.reject(TypeError("'_decode(source, config)': Type of 'source' should be 'Buffer', 'Uint8Array', 'String(base64 with image mime)' or 'String(url)'."));{let t={};return!this.region||this.region instanceof Array||(t.region=JSON.parse(JSON.stringify(this.region))),e instanceof Blob?yield this._decode_Blob(e,t):e instanceof ArrayBuffer?yield this._decode_ArrayBuffer(e,t):e instanceof Uint8Array||e instanceof Uint8ClampedArray?yield this._decode_Uint8Array(e,t):e instanceof HTMLImageElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?yield this._decode_Image(e,t):e instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?yield this._decode_Canvas(e,t):e instanceof HTMLVideoElement?yield this._decode_Video(e,t):"string"==typeof e||e instanceof String?"data:image/"==e.substring(0,11)?yield this._decode_Base64(e,t):yield this._decode_Url(e,t):yield Promise.reject(TypeError("'_decode(source, config)': Type of 'source' should be 'Blob', 'ArrayBuffer', 'Uint8Array', 'HTMLImageElement', 'HTMLCanvasElement', 'HTMLVideoElement', 'String(base64 with image mime)' or 'String(url)'."))}}))}decodeBase64String(e){return a(this,void 0,void 0,(function*(){let t={};return!this.region||this.region instanceof Array||(t.region=JSON.parse(JSON.stringify(this.region))),this._decode_Base64(e,t)}))}decodeUrl(e){return a(this,void 0,void 0,(function*(){let t={};return!this.region||this.region instanceof Array||(t.region=JSON.parse(JSON.stringify(this.region))),this._decode_Url(e,t)}))}_decodeBuffer_Uint8Array(e,t,n,r,i,o){return a(this,void 0,void 0,(function*(){return yield new Promise((s,a)=>{let d=l._nextTaskID++;l._taskCallbackMap.set(d,e=>{if(e.success){let t,n=l._onLog?Date.now():0;try{t=this._handleRetJsonString(e.decodeReturn)}catch(e){return a(e)}if(l._onLog){let e=Date.now();l._onLog("DBR time get result: "+n),l._onLog("Handle image cost: "+(this._timeEnterInnerDBR-this._timeStartDecode)),l._onLog("DBR worker decode image cost: "+(n-this._timeEnterInnerDBR)),l._onLog("DBR worker handle results: "+(e-n)),l._onLog("Total decode image cost: "+(e-this._timeStartDecode))}return s(t)}{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,a(t)}}),l._onLog&&(this._timeEnterInnerDBR=Date.now()),l._onLog&&console.log("Send buffer to worker",Date.now()),l._dbrWorker.postMessage({type:"decodeBuffer",id:d,instanceID:this._instanceID,body:{buffer:e,width:t,height:n,stride:r,format:i,config:o}},[e.buffer])})}))}_decodeBuffer_Blob(e,t,n,r,i,o){return a(this,void 0,void 0,(function*(){return l._onLog&&l._onLog("_decodeBuffer_Blob(buffer,width,height,stride,format)"),yield new Promise((t,n)=>{let r=new FileReader;r.readAsArrayBuffer(e),r.onload=()=>{console.log(r.result),t(r.result)},r.onerror=()=>{n(r.error)}}).then(e=>(console.log(new Uint8Array(e)),this._decodeBuffer_Uint8Array(new Uint8Array(e),t,n,r,i,o)))}))}decodeBuffer(e,t,n,r,i,o){return a(this,void 0,void 0,(function*(){let s;return l._onLog&&l._onLog("decodeBuffer(buffer,width,height,stride,format)"),c?e instanceof Uint8Array?s=yield this._decodeBuffer_Uint8Array(e,t,n,r,i,o):e instanceof Buffer&&(s=yield this._decodeBuffer_Uint8Array(new Uint8Array(e),t,n,r,i,o)):e instanceof Uint8Array||e instanceof Uint8ClampedArray?s=yield this._decodeBuffer_Uint8Array(e,t,n,r,i,o):e instanceof ArrayBuffer?s=yield this._decodeBuffer_Uint8Array(new Uint8Array(e),t,n,r,i,o):e instanceof Blob&&(s=yield this._decodeBuffer_Blob(e,t,n,r,i,o)),s}))}_decodeFileInMemory_Uint8Array(e){return a(this,void 0,void 0,(function*(){return yield new Promise((t,n)=>{let r=l._nextTaskID++;l._taskCallbackMap.set(r,e=>{if(e.success){let r;try{r=this._handleRetJsonString(e.decodeReturn)}catch(e){return n(e)}return t(r)}{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,n(t)}}),l._dbrWorker.postMessage({type:"decodeFileInMemory",id:r,instanceID:this._instanceID,body:{bytes:e}})})}))}getRuntimeSettings(){return a(this,void 0,void 0,(function*(){return yield new Promise((e,t)=>{let n=l._nextTaskID++;l._taskCallbackMap.set(n,n=>{if(n.success){let t=JSON.parse(n.results);return null!=this.userDefinedRegion&&(t.region=JSON.parse(JSON.stringify(this.userDefinedRegion))),e(t)}{let e=new Error(n.message);return e.stack=n.stack+"\n"+e.stack,t(e)}}),l._dbrWorker.postMessage({type:"getRuntimeSettings",id:n,instanceID:this._instanceID})})}))}updateRuntimeSettings(e){return a(this,void 0,void 0,(function*(){let t;if("string"==typeof e||"object"==typeof e&&e instanceof String)if("speed"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,t.region=e.region,t.deblurLevel=3,t.expectedBarcodesCount=0,t.localizationModes=[2,0,0,0,0,0,0,0]}else if("balance"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,t.region=e.region,t.deblurLevel=5,t.expectedBarcodesCount=512,t.localizationModes=[2,16,0,0,0,0,0,0]}else if("coverage"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,t.region=e.region}else t=JSON.parse(e);else{if("object"!=typeof e)throw TypeError("'UpdateRuntimeSettings(settings)': Type of 'settings' should be 'String' or 'PlainObject'.");if(t=JSON.parse(JSON.stringify(e)),t.region instanceof Array){let e=t.region;[e.regionLeft,e.regionTop,e.regionLeft,e.regionBottom,e.regionMeasuredByPercentage].some(e=>void 0!==e)&&(t.region={regionLeft:e.regionLeft||0,regionTop:e.regionTop||0,regionRight:e.regionRight||0,regionBottom:e.regionBottom||0,regionMeasuredByPercentage:e.regionMeasuredByPercentage||0})}}if(!l._bUseFullFeature){if(0!=(t.barcodeFormatIds&~(s.BF_ONED|s.BF_QR_CODE|s.BF_PDF417|s.BF_DATAMATRIX))||0!=t.barcodeFormatIds_2)throw Error("Some of the specified barcode formats are not supported in the compact version. Please try the full-featured version.");if(0!=t.intermediateResultTypes)throw Error("Intermediate results is not supported in the compact version. Please try the full-featured version.")}if(!c)if(this.bFilterRegionInJs){let e=t.region;if(e instanceof Array)throw Error("The `region` of type `Array` is only allowed in `BarcodeScanner`.");this.userDefinedRegion=JSON.parse(JSON.stringify(e)),(e.regionLeft||e.regionTop||e.regionRight||e.regionBottom||e.regionMeasuredByPercentage)&&(e.regionLeft||e.regionTop||100!=e.regionRight||100!=e.regionBottom||!e.regionMeasuredByPercentage)?this.region=e:this.region=null,t.region={regionLeft:0,regionTop:0,regionRight:0,regionBottom:0,regionMeasuredByPercentage:0}}else this.userDefinedRegion=null,this.region=null;return yield new Promise((e,n)=>{let r=l._nextTaskID++;l._taskCallbackMap.set(r,t=>{if(t.success){try{this._handleRetJsonString(t.updateReturn)}catch(e){n(e)}return e()}{let e=new Error(t.message);return e.stack=t.stack+"\n"+e.stack,n(e)}}),l._dbrWorker.postMessage({type:"updateRuntimeSettings",id:r,instanceID:this._instanceID,body:{settings:JSON.stringify(t)}})})}))}resetRuntimeSettings(){return a(this,void 0,void 0,(function*(){return this.userDefinedRegion=null,this.region=null,yield new Promise((e,t)=>{let n=l._nextTaskID++;l._taskCallbackMap.set(n,n=>{if(n.success)return e();{let e=new Error(n.message);return e.stack=n.stack+"\n"+e.stack,t(e)}}),l._dbrWorker.postMessage({type:"resetRuntimeSettings",id:n,instanceID:this._instanceID})})}))}outputSettingsToString(){return a(this,void 0,void 0,(function*(){if(!l._bUseFullFeature)throw Error("outputSettingsToString() is not supported in the compact version. Please try the full-featured version.");return yield new Promise((e,t)=>{let n=l._nextTaskID++;l._taskCallbackMap.set(n,n=>{if(n.success)return console.log(n.results),e(n.results);{let e=new Error(n.message);return e.stack=n.stack+"\n"+e.stack,t(e)}}),l._dbrWorker.postMessage({type:"outputSettingsToString",id:n,instanceID:this._instanceID})})}))}initRuntimeSettingsWithString(e){return a(this,void 0,void 0,(function*(){if(!l._bUseFullFeature)throw Error("initRuntimeSettingsWithString() is not supported in the compact version. Please try the full-featured version.");if("string"==typeof e||"object"==typeof e&&e instanceof String)e=e;else{if("object"!=typeof e)throw TypeError("'initRuntimeSettingstWithString(settings)': Type of 'settings' should be 'String' or 'PlainObject'.");e=JSON.stringify(e)}return yield new Promise((t,n)=>{let r=l._nextTaskID++;l._taskCallbackMap.set(r,e=>{if(e.success){try{this._handleRetJsonString(e.initReturn)}catch(e){n(e)}return t()}{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,n(t)}}),l._dbrWorker.postMessage({type:"initRuntimeSettingsWithString",id:r,instanceID:this._instanceID,body:{settings:e}})})}))}_decode_Blob(e,t){return a(this,void 0,void 0,(function*(){l._onLog&&l._onLog("_decode_Blob(blob: Blob)");let n=null,r=null;if("undefined"!=typeof createImageBitmap)try{n=yield createImageBitmap(e)}catch(e){}n||(r=yield function(e){return new Promise((t,n)=>{let r=URL.createObjectURL(e),i=new Image;i.dbrObjUrl=r,i.src=r,i.onload=()=>{t(i)},i.onerror=e=>{n(new Error("Can't convert blob to image : "+(e instanceof Event?e.type:e)))}})}(e));let i=yield this._decode_Image(n||r,t);return n&&n.close(),i}))}_decode_ArrayBuffer(e,t){return a(this,void 0,void 0,(function*(){return yield this._decode_Blob(new Blob(e),t)}))}_decode_Uint8Array(e,t){return a(this,void 0,void 0,(function*(){return yield this._decode_Blob(new Blob(e),t)}))}_decode_Image(e,t){return a(this,void 0,void 0,(function*(){l._onLog&&l._onLog("_decode_Image(image: HTMLImageElement|ImageBitmap)"),t=t||{};let n,r,i=e instanceof HTMLImageElement?e.naturalWidth:e.width,o=e instanceof HTMLImageElement?e.naturalHeight:e.height,s=Math.max(i,o);if(s>this._canvasMaxWH){let e=this._canvasMaxWH/s;n=Math.round(i*e),r=Math.round(o*e)}else n=i,r=o;let a,d=0,c=0,u=i,_=o,h=i,f=o,g=t.region;if(g){let e,t,s,a;g.regionMeasuredByPercentage?(e=g.regionLeft*n/100,t=g.regionTop*r/100,s=g.regionRight*n/100,a=g.regionBottom*r/100):(e=g.regionLeft,t=g.regionTop,s=g.regionRight,a=g.regionBottom),h=s-e,u=Math.round(h/n*i),f=a-t,_=Math.round(f/r*o),d=Math.round(e/n*i),c=Math.round(t/r*o)}self.OffscreenCanvas?a=new OffscreenCanvas(h,f):(a=document.createElement("canvas"),a.width=h,a.height=f);let E,R=a.getContext("2d");0==d&&0==c&&i==u&&o==_&&i==h&&o==f?R.drawImage(e,0,0):R.drawImage(e,d,c,u,_,0,0,h,f),e.dbrObjUrl&&URL.revokeObjectURL(e.dbrObjUrl),g?(E=JSON.parse(JSON.stringify(t)),delete E.region):E=t;let v=yield this._decode_Canvas(a,E);if(g&&v.length>0)for(let e of v){let t=e.localizationResult;2==t.resultCoordinateType&&(t.x1*=.01*h,t.x2*=.01*h,t.x3*=.01*h,t.x4*=.01*h,t.y1*=.01*f,t.y2*=.01*f,t.y3*=.01*f,t.y4*=.01*f),t.x1+=d,t.x2+=d,t.x3+=d,t.x4+=d,t.y1+=c,t.y2+=c,t.y3+=c,t.y4+=c,2==t.resultCoordinateType&&(t.x1*=100/u,t.x2*=100/u,t.x3*=100/u,t.x4*=100/u,t.y1*=100/_,t.y2*=100/_,t.y3*=100/_,t.y4*=100/_)}return v}))}_decode_Canvas(e,t){return a(this,void 0,void 0,(function*(){if(l._onLog&&l._onLog("_decode_Canvas(canvas:HTMLCanvasElement)"),e.crossOrigin&&"anonymous"!=e.crossOrigin)throw"cors";(this.bSaveOriCanvas||this.singleFrameMode)&&(this.oriCanvas=e);let n=e.getContext("2d").getImageData(0,0,e.width,e.height).data;return yield this._decodeBuffer_Uint8Array(n,e.width,e.height,4*e.width,r.IPF_ABGR_8888,t)}))}_decode_Video(e,t){return a(this,void 0,void 0,(function*(){if(l._onLog&&l._onLog("_decode_Video(video)"),!(e instanceof HTMLVideoElement))throw TypeError("'_decode_Video(video [, config] )': Type of 'video' should be 'HTMLVideoElement'.");if(e.crossOrigin&&"anonymous"!=e.crossOrigin)throw"cors";t=t||{};let n=0,i=0,o=e.videoWidth,s=e.videoHeight,a=e.videoWidth,d=e.videoHeight,c=t.region;if(c){let t,r,l,u;c.regionMeasuredByPercentage?(t=c.regionLeft*e.videoWidth/100,r=c.regionTop*e.videoHeight/100,l=c.regionRight*e.videoWidth/100,u=c.regionBottom*e.videoHeight/100):(t=c.regionLeft,r=c.regionTop,l=c.regionRight,u=c.regionBottom),a=o=l-t,d=s=u-r,n=t,i=r}let u=0==n&&0==i&&e.videoWidth==o&&e.videoHeight==s&&e.videoWidth==a&&e.videoHeight==d;if(!this.bSaveOriCanvas&&this._bUseWebgl&&u){let t=!1;this.videoGlCvs||(this.videoGlCvs=self.OffscreenCanvas?new OffscreenCanvas(a,d):document.createElement("canvas"),t=!0);const n=this.videoGlCvs;n.width==a&&n.height==d||(n.height=d,n.width=a,t=!0),this.videoGlCtx||(this.videoGlCtx=n.getContext("webgl",{alpha:!1,antialias:!1})||n.getContext("experimental-webgl",{alpha:!1,antialias:!1}),t=!0);const i=this.videoGlCtx;if(t){const e=i.createTexture();i.bindTexture(i.TEXTURE_2D,e);const t=i.createFramebuffer();i.bindFramebuffer(i.FRAMEBUFFER,t),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,e,0),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST)}i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e);let o=new Uint8Array(a*d*4);return i.readPixels(0,0,i.drawingBufferWidth,i.drawingBufferHeight,i.RGBA,i.UNSIGNED_BYTE,o),yield this._decodeBuffer_Uint8Array(o,a,d,4*a,r.IPF_ABGR_8888)}{let r=null;for(let e of this.videoCvses)if(e.width==a&&e.height==d){r=e;break}r||(self.OffscreenCanvas?r=new OffscreenCanvas(a,d):(r=document.createElement("canvas"),r.width=a,r.height=d),r.dbrCtx2d=r.getContext("2d"),this.videoCvses.length>=this.maxVideoCvsLength&&(this.videoCvses=this.videoCvses.slice(1)),this.videoCvses.push(r));const l=r.dbrCtx2d;let _;u?l.drawImage(e,0,0):l.drawImage(e,n,i,o,s,0,0,a,d),c?(_=JSON.parse(JSON.stringify(t)),delete _.region):_=t;let h=yield this._decode_Canvas(r,_);if(c&&h.length>0)for(let e of h){let t=e.localizationResult;2==t.resultCoordinateType&&(t.x1*=.01*a,t.x2*=.01*a,t.x3*=.01*a,t.x4*=.01*a,t.y1*=.01*d,t.y2*=.01*d,t.y3*=.01*d,t.y4*=.01*d),t.x1+=n,t.x2+=n,t.x3+=n,t.x4+=n,t.y1+=i,t.y2+=i,t.y3+=i,t.y4+=i,2==t.resultCoordinateType&&(t.x1*=100/o,t.x2*=100/o,t.x3*=100/o,t.x4*=100/o,t.y1*=100/s,t.y2*=100/s,t.y3*=100/s,t.y4*=100/s)}return h}}))}_decode_Base64(e,t){return a(this,void 0,void 0,(function*(){if(l._onLog&&l._onLog("_decode_Base64(base64Str)"),"string"!=typeof e&&"object"!=typeof e)return Promise.reject("'_decode_Base64(base64Str, config)': Type of 'base64Str' should be 'String'.");if("data:image/"==e.substring(0,11)&&(e=e.substring(e.indexOf(",")+1)),c){let t=Buffer.from(e,"base64");return yield this._decodeFileInMemory_Uint8Array(new Uint8Array(t))}{let n=atob(e),r=n.length,i=new Uint8Array(r);for(;r--;)i[r]=n.charCodeAt(r);return yield this._decode_Blob(new Blob([i]),t)}}))}_decode_Url(e,t){return a(this,void 0,void 0,(function*(){if(l._onLog&&l._onLog("_decode_Url(url)"),"string"!=typeof e&&"object"!=typeof e)throw TypeError("'_decode_Url(url, config)': Type of 'url' should be 'String'.");if(c){let t=yield new Promise((t,r)=>{(e.startsWith("https")?n(2):n(3)).get(e,e=>{if(200==e.statusCode){let n=[];e.on("data",e=>{n.push(e)}).on("end",()=>{t(new Uint8Array(Buffer.concat(n)))})}else r("http get fail, statusCode: "+e.statusCode)})});return yield this._decodeFileInMemory_Uint8Array(t)}{let n=yield new Promise((t,n)=>{let r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="blob",r.send(),r.onloadend=()=>a(this,void 0,void 0,(function*(){t(r.response)})),r.onerror=()=>{n(new Error("Network Error: "+r.statusText))}});return yield this._decode_Blob(n,t)}}))}_decode_FilePath(e,t){return a(this,void 0,void 0,(function*(){if(l._onLog&&l._onLog("_decode_FilePath(path)"),!c)throw Error("'_decode_FilePath(path, config)': The method is only supported in node environment.");if("string"!=typeof e&&"object"!=typeof e)throw TypeError("'_decode_FilePath(path, config)': Type of 'path' should be 'String'.");const t=n(4);let r=yield new Promise((n,r)=>{t.readFile(e,(e,t)=>{e?r(e):n(new Uint8Array(t))})});return yield this._decodeFileInMemory_Uint8Array(r)}))}static BarcodeReaderException(e,t){let n,r=i.DBR_UNKNOWN;return"number"==typeof e?(r=e,n=new Error(t)):n=new Error(e),n.code=r,n}_handleRetJsonString(e){let t=i;if(e.textResults){for(let n=0;n{let s=l._nextTaskID++;l._taskCallbackMap.set(s,e=>{if(e.success){try{this._handleRetJsonString(e.setReturn)}catch(e){return o(e)}return i()}{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,o(t)}}),l._dbrWorker.postMessage({type:"setModeArgument",id:s,instanceID:this._instanceID,body:{modeName:e,index:t,argumentName:n,argumentValue:r}})})}))}getModeArgument(e,t,n){return a(this,void 0,void 0,(function*(){return yield new Promise((r,i)=>{let o=l._nextTaskID++;l._taskCallbackMap.set(o,e=>{if(e.success){let t;try{t=this._handleRetJsonString(e.getReturn)}catch(e){return i(e)}return r(t)}{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,i(t)}}),l._dbrWorker.postMessage({type:"getModeArgument",id:o,instanceID:this._instanceID,body:{modeName:e,index:t,argumentName:n}})})}))}getIntermediateResults(){return a(this,void 0,void 0,(function*(){return yield new Promise((e,t)=>{let n=l._nextTaskID++;l._taskCallbackMap.set(n,n=>{if(n.success)return e(n.results);{let e=new Error(n.message);return e.stack=n.stack+"\n"+e.stack,t(e)}}),l._dbrWorker.postMessage({type:"getIntermediateResults",id:n,instanceID:this._instanceID})})}))}getIntermediateCanvas(){return a(this,void 0,void 0,(function*(){let e=yield this.getIntermediateResults(),t=[];for(let n of e)if(n.dataType==o.IMRDT_IMAGE)for(let e of n.results){const n=e.bytes;let i;switch(l._onLog&&l._onLog(" "+n.length+" "+n.byteLength+" "+e.width+" "+e.height+" "+e.stride+" "+e.format),e.format){case r.IPF_ABGR_8888:i=new Uint8ClampedArray(n);break;case r.IPF_RGB_888:{const e=n.length/3;i=new Uint8ClampedArray(4*e);for(let t=0;t{let n=l._nextTaskID++;l._taskCallbackMap.set(n,n=>{if(n.success)return e();{let e=new Error(n.message);return e.stack=n.stack+"\n"+e.stack,t(e)}}),l._dbrWorker.postMessage({type:"destroy",id:n,instanceID:this._instanceID})})}}l.bNode=c,l._jsVersion="7.5.0.1",l._jsEditVersion="20200605",l._version="loading...(JS "+l._jsVersion+"."+l._jsEditVersion+")",l._productKeys=!c&&document.currentScript&&(document.currentScript.getAttribute("data-productKeys")||document.currentScript.getAttribute("data-licenseKey"))||"",l.browserInfo=function(){if(c){const e=n(5);return{browser:"node",version:process.version.substring(1),OS:e.platform()+e.release()}}var e={init:function(){this.browser=this.searchString(this.dataBrowser)||"unknownBrowser",this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"unknownVersion",this.OS=this.searchString(this.dataOS)||"unknownOS"},searchString:function(e){for(var t=0;t{if(c)return __dirname+"/";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"./"})(),l._licenseServer=null,l._deviceFriendlyName="",l._isShowRelDecodeTimeInResults=!1,l._bWasmDebug=!1,l._bSendSmallRecordsForDebug=!1,l.__bUseFullFeature=c,l._nextTaskID=0,l._taskCallbackMap=new Map,l._loadWasmStatus="unload",l._loadWasmCallbackArr=[];var u=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{d(r.next(e))}catch(e){o(e)}}function a(e){try{d(r.throw(e))}catch(e){o(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}d((r=r.apply(e,t||[])).next())}))};const _=!!("object"==typeof global&&global.process&&global.process.release&&global.process.release.name&&"undefined"==typeof HTMLCanvasElement);class h extends l{constructor(){super(),this.styleEls=[],this.videoSettings={video:{width:{ideal:1280},height:{ideal:720},facingMode:{ideal:"environment"}}},this._singleFrameMode=!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia),this._singleFrameModeIpt=(()=>{let e=document.createElement("input");return e.setAttribute("type","file"),e.setAttribute("accept","image/*"),e.setAttribute("capture",""),e.addEventListener("change",()=>u(this,void 0,void 0,(function*(){let t=e.files[0];e.value="";let n=yield this.decode(t);for(let e of n)delete e.bUnduplicated;if(this._drawRegionsults(n),this.onFrameRead&&this._isOpen&&!this._bPauseScan&&this.onFrameRead(n),this.onUnduplicatedRead&&this._isOpen&&!this._bPauseScan)for(let e of n)this.onUnduplicatedRead(e.barcodeText,e);yield this.clearMapDecodeRecord()}))),e})(),this._clickIptSingleFrameMode=()=>{this._singleFrameModeIpt.click()},this.intervalTime=0,this._isOpen=!1,this._bPauseScan=!1,this._lastDeviceId=void 0,this._intervalDetectVideoPause=1e3,this._video=null,this._cvsDrawArea=null,this._divScanArea=null,this._divScanLight=null,this._bgLoading=null,this._bgCamera=null,this._selCam=null,this._selRsl=null,this._optGotRsl=null,this._btnClose=null,this._soundOnSuccessfullRead=new Audio("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"),this.bPlaySoundOnSuccessfulRead=!1,this._allCameras=[],this._currentCamera=null,this._videoTrack=null,this.regionMaskFillStyle="rgba(0,0,0,0.5)",this.regionMaskStrokeStyle="rgb(254,142,20)",this.regionMaskLineWidth=2,this.barcodeFillStyle="rgba(254,180,32,0.3)",this.barcodeStrokeStyle="rgba(254,180,32,0.9)",this.barcodeLineWidth=1,this.beingLazyDrawRegionsults=!1,this._indexVideoRegion=-1,this._onCameraSelChange=()=>{this.play(this._selCam.value).then(()=>{this._isOpen||this.stop()}).catch(e=>{alert("Play video failed: "+(e.message||e))})},this._onResolutionSelChange=()=>{let e,t;if(this._selRsl&&-1!=this._selRsl.selectedIndex){let n=this._selRsl.options[this._selRsl.selectedIndex];e=n.getAttribute("data-width"),t=n.getAttribute("data-height")}this.play(void 0,e,t).then(()=>{this._isOpen||this.stop()}).catch(e=>{alert("Play video failed: "+(e.message||e))})},this._onCloseBtnClick=()=>{this.hide()}}static get defaultUIElementURL(){return this._defaultUIElementURL?this._defaultUIElementURL:l.engineResourcePath+"dbr.scanner.html"}static set defaultUIElementURL(e){this._defaultUIElementURL=e}getUIElement(){return this.UIElement}setUIElement(e){return u(this,void 0,void 0,(function*(){if("string"==typeof e||e instanceof String){if(!e.trim().startsWith("<")){let t=yield fetch(e);if(!t.ok)throw Error("Network Error: "+t.statusText);e=yield t.text()}if(!e.trim().startsWith("<"))throw Error("setUIElement(elementOrUrl): Can't get valid HTMLElement.");let t=document.createElement("div");t.innerHTML=e;for(let e=0;e{u(this,void 0,void 0,(function*(){let e=yield this.getScanSettings();e.oneDTrustFrameCount=1,yield this.updateScanSettings(e)}))})()}_assertOpen(){if(!this._isOpen)throw Error("The scanner is not open.")}get soundOnSuccessfullRead(){return this._soundOnSuccessfullRead}set soundOnSuccessfullRead(e){e instanceof HTMLAudioElement?this._soundOnSuccessfullRead=e:this._soundOnSuccessfullRead=new Audio(e)}set region(e){this._region=e,this.singleFrameMode||(this.beingLazyDrawRegionsults=!0,setTimeout(()=>{this.beingLazyDrawRegionsults&&this._drawRegionsults()},500))}get region(){return this._region}static createInstance(e){return u(this,void 0,void 0,(function*(){if(_)throw new Error("`BarcodeScanner` is not supported in Node.js.");let t=new h;t._instanceID=yield h.createInstanceInWorker(!0),("string"==typeof e||e instanceof String)&&(e=JSON.parse(e));for(let n in e)t[n]=e[n];return t.UIElement||(yield t.setUIElement(this.defaultUIElementURL)),t}))}decode(e){return super.decode(e)}decodeBase64String(e){return super.decodeBase64String(e)}decodeUrl(e){return super.decodeUrl(e)}decodeBuffer(e,t,n,r,i,o){return super.decodeBuffer(e,t,n,r,i,o)}clearMapDecodeRecord(){return u(this,void 0,void 0,(function*(){return yield new Promise((e,t)=>{let n=l._nextTaskID++;l._taskCallbackMap.set(n,n=>{if(n.success)return e();{let e=new Error(n.message);return e.stack=n.stack+"\n"+e.stack,t(e)}}),l._dbrWorker.postMessage({type:"clearMapDecodeRecord",id:n,instanceID:this._instanceID})})}))}updateRuntimeSettings(e){return u(this,void 0,void 0,(function*(){let t;if("string"==typeof e||"object"==typeof e&&e instanceof String)if("speed"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,t.region=e.region}else if("balance"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,t.region=e.region,t.deblurLevel=3,t.expectedBarcodesCount=512,t.localizationModes=[2,16,0,0,0,0,0,0],t.timeout=1e5}else if("coverage"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,t.region=e.region,t.deblurLevel=5,t.expectedBarcodesCount=512,t.scaleDownThreshold=1e5,t.localizationModes=[2,16,4,8,0,0,0,0],t.timeout=1e5}else if("single"==e){let e=yield this.getRuntimeSettings();yield this.resetRuntimeSettings(),t=yield this.getRuntimeSettings(),t.barcodeFormatIds=e.barcodeFormatIds,t.barcodeFormatIds_2=e.barcodeFormatIds_2,t.region=[null,{regionLeft:0,regionTop:30,regionRight:100,regionBottom:70,regionMeasuredByPercentage:1},{regionLeft:25,regionTop:25,regionRight:75,regionBottom:75,regionMeasuredByPercentage:1},{regionLeft:25,regionTop:25,regionRight:75,regionBottom:75,regionMeasuredByPercentage:1}],t.expectedBarcodesCount=1,t.localizationModes=[16,2,0,0,0,0,0,0]}else t=JSON.parse(e);else{if("object"!=typeof e)throw TypeError("'UpdateRuntimeSettings(settings)': Type of 'settings' should be 'String' or 'PlainObject'.");if(t=JSON.parse(JSON.stringify(e)),t.region instanceof Array){let n=e.region;[n.regionLeft,n.regionTop,n.regionLeft,n.regionBottom,n.regionMeasuredByPercentage].some(e=>void 0!==e)&&(t.region={regionLeft:n.regionLeft||0,regionTop:n.regionTop||0,regionRight:n.regionRight||0,regionBottom:n.regionBottom||0,regionMeasuredByPercentage:n.regionMeasuredByPercentage||0})}}if(!l._bUseFullFeature){if(0!=(t.barcodeFormatIds&~(s.BF_ONED|s.BF_QR_CODE|s.BF_PDF417|s.BF_DATAMATRIX))||0!=t.barcodeFormatIds_2)throw Error("Some of the specified barcode formats are not supported in the compact version. Please try the full-featured version.");if(0!=t.intermediateResultTypes)throw Error("Intermediate results is not supported in the compact version. Please try the full-featured version.")}if(this.bFilterRegionInJs){let e=t.region;if(this.userDefinedRegion=JSON.parse(JSON.stringify(e)),e instanceof Array)if(e.length){for(let t=0;t{let r=l._nextTaskID++;l._taskCallbackMap.set(r,t=>{if(t.success){try{this._handleRetJsonString(t.updateReturn)}catch(e){n(e)}return e()}{let e=new Error(t.message);return e.stack=t.stack+"\n"+e.stack,n(e)}}),l._dbrWorker.postMessage({type:"updateRuntimeSettings",id:r,instanceID:this._instanceID,body:{settings:JSON.stringify(t)}})}),"single"==e&&(yield this.setModeArgument("BinarizationModes",0,"EnableFillBinaryVacancy","0"),yield this.setModeArgument("LocalizationModes",0,"ScanDirection","2"),yield this.setModeArgument("BinarizationModes",0,"BlockSizeX","71"),yield this.setModeArgument("BinarizationModes",0,"BlockSizeY","71"))}))}_bindUI(){let e=[this.UIElement],t=this.UIElement.children;for(let n of t)e.push(n);for(let t=0;t','ask 3840 x 2160 ','ask 2560 x 1440 ','ask 1920 x 1080 ','ask 1600 x 1200 ','ask 1280 x 720 ','ask 800 x 600 ','ask 640 x 480 ','ask 640 x 360 '].join(""),this._optGotRsl=this._optGotRsl||this._selRsl.options[0])):!this._optGotRsl&&t.classList.contains("dbrScanner-opt-gotResolution")?this._optGotRsl=t:!this._btnClose&&t.classList.contains("dbrScanner-btn-close")&&(this._btnClose=t);if(this.singleFrameMode?(this._video&&(this._video.addEventListener("click",this._clickIptSingleFrameMode),this._video.style.cursor="pointer",this._video.setAttribute("title","Take a photo")),this._cvsDrawArea&&(this._cvsDrawArea.addEventListener("click",this._clickIptSingleFrameMode),this._cvsDrawArea.style.cursor="pointer",this._cvsDrawArea.setAttribute("title","Take a photo")),this._divScanArea&&(this._divScanArea.addEventListener("click",this._clickIptSingleFrameMode),this._divScanArea.style.cursor="pointer",this._divScanArea.setAttribute("title","Take a photo")),this._bgCamera&&(this._bgCamera.style.display="")):this._bgLoading&&(this._bgLoading.style.display=""),this._selCam&&this._selCam.addEventListener("change",this._onCameraSelChange),this._selRsl&&this._selRsl.addEventListener("change",this._onResolutionSelChange),this._btnClose&&this._btnClose.addEventListener("click",this._onCloseBtnClick),!this._video)throw this._unbindUI(),Error("Can not find HTMLVideoElement with class `dbrScanner-video`.");this._isOpen=!0}_unbindUI(){this._clearRegionsults(),this.singleFrameMode?(this._video&&(this._video.removeEventListener("click",this._clickIptSingleFrameMode),this._video.style.cursor="",this._video.removeAttribute("title")),this._cvsDrawArea&&(this._cvsDrawArea.removeEventListener("click",this._clickIptSingleFrameMode),this._cvsDrawArea.style.cursor="",this._cvsDrawArea.removeAttribute("title")),this._divScanArea&&(this._divScanArea.removeEventListener("click",this._clickIptSingleFrameMode),this._divScanArea.style.cursor="",this._divScanArea.removeAttribute("title")),this._bgCamera&&(this._bgCamera.style.display="none")):this._bgLoading&&(this._bgLoading.style.display="none"),this._selCam&&this._selCam.removeEventListener("change",this._onCameraSelChange),this._selRsl&&this._selRsl.removeEventListener("change",this._onResolutionSelChange),this._btnClose&&this._btnClose.removeEventListener("click",this._onCloseBtnClick),this._video=null,this._cvsDrawArea=null,this._divScanArea=null,this._divScanLight=null,this._selCam=null,this._selRsl=null,this._optGotRsl=null,this._btnClose=null,this._isOpen=!1}_renderSelCameraInfo(){let e,t;if(this._selCam&&(e=this._selCam.value,this._selCam.innerHTML=""),this._selCam){for(let n of this._allCameras){let r=document.createElement("option");r.value=n.deviceId,r.innerText=n.label,this._selCam.append(r),e==n.deviceId&&(t=r)}let n=this._selCam.childNodes;if(!t&&this._currentCamera&&n.length)for(let e of n)if(this._currentCamera.label==e.innerText){t=e;break}t&&(this._selCam.value=t.value)}}getAllCameras(){return u(this,void 0,void 0,(function*(){const e=yield navigator.mediaDevices.enumerateDevices(),t=[];let n=0;for(let r=0;r{let n=l._nextTaskID++;l._taskCallbackMap.set(n,n=>{if(n.success){let t=n.results;return t.intervalTime=this.intervalTime,e(t)}{let e=new Error(n.message);return e.stack+="\n"+n.stack,t(e)}}),l._dbrWorker.postMessage({type:"getScanSettings",id:n,instanceID:this._instanceID})})}))}updateScanSettings(e){return u(this,void 0,void 0,(function*(){return this.intervalTime=e.intervalTime,yield new Promise((t,n)=>{let r=l._nextTaskID++;l._taskCallbackMap.set(r,e=>{if(e.success)return t();{let t=new Error(e.message);return t.stack+="\n"+e.stack,n(t)}}),h._dbrWorker.postMessage({type:"updateScanSettings",id:r,instanceID:this._instanceID,body:{settings:e}})})}))}getVideoSettings(){return JSON.parse(JSON.stringify(this.videoSettings))}updateVideoSettings(e){return this.videoSettings=JSON.parse(JSON.stringify(e)),this._lastDeviceId=null,this._isOpen?this.play():Promise.resolve()}isOpen(){return this._isOpen}_show(){this.UIElement.parentNode||(this.UIElement.style.position="fixed",this.UIElement.style.left="0",this.UIElement.style.top="0",document.body.append(this.UIElement)),"none"==this.UIElement.style.display&&(this.UIElement.style.display="")}stop(){this._video&&this._video.srcObject&&(l._onLog&&l._onLog("======stop video========"),this._video.srcObject.getTracks().forEach(e=>{e.stop()}),this._video.srcObject=null,this._videoTrack=null),this._bgLoading&&(this._bgLoading.style.animationPlayState=""),this._divScanLight&&(this._divScanLight.style.display="none")}pause(){this._video&&this._video.pause(),this._divScanLight&&(this._divScanLight.style.display="none")}play(e,t,n){return u(this,void 0,void 0,(function*(){if(this._assertOpen(),this.singleFrameMode)return this._clickIptSingleFrameMode(),{width:0,height:0};this._video&&this._video.srcObject&&(this.stop(),yield new Promise(e=>setTimeout(e,500))),l._onLog&&l._onLog("======before video========"),yield this.getAllCameras();const r=this.videoSettings;"boolean"==typeof r.video&&(r.video={});const i="iPhone"==l.browserInfo.OS;let o,s;if(i?t>=1280||n>=1280?r.video.width=1280:t>=640||n>=640?r.video.width=640:(t<640||n<640)&&(r.video.width=320):(t&&(r.video.width={ideal:t}),n&&(r.video.height={ideal:n})),e)delete r.video.facingMode,r.video.deviceId={exact:e},this._lastDeviceId=e;else if(r.video.deviceId);else if(this._lastDeviceId)delete r.video.facingMode,r.video.deviceId={ideal:this._lastDeviceId};else if(r.video.facingMode){let e=r.video.facingMode;if(e instanceof Array&&e.length&&(e=e[0]),e=e.exact||e.ideal||e,"environment"===e){for(let e of this._allCameras){let t=e.label.toLowerCase();if(t&&-1!=t.indexOf("facing back")&&/camera[0-9]?\s0,/.test(t)){delete r.video.facingMode,r.video.deviceId={ideal:e.deviceId};break}}o=!!r.video.facingMode}}l._onLog&&l._onLog("======try getUserMedia========"),l._onLog&&l._onLog("ask "+JSON.stringify(r.video.width)+"x"+JSON.stringify(r.video.height));try{l._onLog&&l._onLog(r),s=yield navigator.mediaDevices.getUserMedia(r)}catch(e){l._onLog&&l._onLog(e),l._onLog&&l._onLog("======try getUserMedia again========"),i?(delete r.video.width,delete r.video.height):o?(delete r.video.facingMode,this._allCameras.length&&(r.video.deviceId={ideal:this._allCameras[this._allCameras.length-1].deviceId})):r.video=!0,l._onLog&&l._onLog(r),s=yield navigator.mediaDevices.getUserMedia(r)}{const e=s.getVideoTracks();e.length&&(this._videoTrack=e[0])}this._video.srcObject=s,l._onLog&&l._onLog("======play video========");try{yield this._video.play()}catch(e){yield new Promise(e=>{setTimeout(e,1e3)}),yield this._video.play()}l._onLog&&l._onLog("======played video========"),this._bgLoading&&(this._bgLoading.style.animationPlayState="paused"),this._drawRegionsults();const a="got "+this._video.videoWidth+"x"+this._video.videoHeight;this._optGotRsl&&(this._optGotRsl.setAttribute("data-width",this._video.videoWidth),this._optGotRsl.setAttribute("data-height",this._video.videoHeight),this._optGotRsl.innerText=a,this._selRsl&&this._optGotRsl.parentNode==this._selRsl&&(this._selRsl.value="got")),l._onLog&&l._onLog(a),yield this.getCurrentCamera(),this._renderSelCameraInfo();let d={width:this._video.videoWidth,height:this._video.videoHeight};return this.onPlayed&&setTimeout(()=>{this.onPlayed(d)},0),d}))}pauseScan(){this._assertOpen(),this._bPauseScan=!0,this._divScanLight&&(this._divScanLight.style.display="none")}resumeScan(){this._assertOpen(),this._bPauseScan=!1}getCapabilities(){return this._assertOpen(),this._videoTrack.getCapabilities?this._videoTrack.getCapabilities():{}}getCameraSettings(){return this._assertOpen(),this._videoTrack.getSettings()}getConstraints(){return this._assertOpen(),this._videoTrack.getConstraints()}applyConstraints(e){return u(this,void 0,void 0,(function*(){if(this._assertOpen(),!this._videoTrack.applyConstraints)throw Error("Not support.");return yield this._videoTrack.applyConstraints(e)}))}turnOnTorch(){return u(this,void 0,void 0,(function*(){if(this._assertOpen(),this.getCapabilities().torch)return yield this._videoTrack.applyConstraints({advanced:[{torch:!0}]});throw Error("Not support.")}))}turnOffTorch(){return u(this,void 0,void 0,(function*(){if(this._assertOpen(),this.getCapabilities().torch)return yield this._videoTrack.applyConstraints({advanced:[{torch:!1}]});throw Error("Not support.")}))}setColorTemperature(e){return u(this,void 0,void 0,(function*(){this._assertOpen();let t=this.getCapabilities().colorTemperature;if(!t)throw Error("Not support.");return et.max&&(e=t.max),yield this._videoTrack.applyConstraints({advanced:[{colorTemperature:e}]})}))}setExposureCompensation(e){return u(this,void 0,void 0,(function*(){this._assertOpen();let t=this.getCapabilities().exposureCompensation;if(!t)throw Error("Not support.");return et.max&&(e=t.max),yield this._videoTrack.applyConstraints({advanced:[{exposureCompensation:e}]})}))}setZoom(e){return u(this,void 0,void 0,(function*(){this._assertOpen();let t=this.getCapabilities().zoom;if(!t)throw Error("Not support.");return et.max&&(e=t.max),yield this._videoTrack.applyConstraints({advanced:[{zoom:e}]})}))}setFrameRate(e){return u(this,void 0,void 0,(function*(){this._assertOpen();let t=this.getCapabilities().frameRate;if(!t)throw Error("Not support.");return et.max&&(e=t.max),yield this._videoTrack.applyConstraints({width:{ideal:Math.max(this._video.videoWidth,this._video.videoHeight)},frameRate:e})}))}_cloneDecodeResults(e){if(e instanceof Array){let t=[];for(let n of e)t.push(this._cloneDecodeResults(n));return t}{let t=e;return JSON.parse(JSON.stringify(t,(e,t)=>"oriVideoCanvas"==e||"searchRegionCanvas"==e?void 0:t))}}_loopReadVideo(){return u(this,void 0,void 0,(function*(){if(this.bDestroyed)return;if(!this._isOpen)return void(yield this.clearMapDecodeRecord());if(this._video.paused||this._bPauseScan)return l._onLog&&l._onLog("Video or scan is paused. Ask in 1s."),yield this.clearMapDecodeRecord(),void setTimeout(()=>{this._loopReadVideo()},this._intervalDetectVideoPause);this._divScanLight&&"none"==this._divScanLight.style.display&&(this._divScanLight.style.display=""),l._onLog&&l._onLog("======= once read =======");(new Date).getTime();l._onLog&&(this._timeStartDecode=Date.now());let e={};if(this.region)if(this.region instanceof Array){++this._indexVideoRegion>=this.region.length&&(this._indexVideoRegion=0);let t=this.region[this._indexVideoRegion];t&&(e.region=JSON.parse(JSON.stringify(t)))}else e.region=JSON.parse(JSON.stringify(this.region));this._decode_Video(this._video,e).then(e=>{if(l._onLog&&l._onLog(e),this._isOpen&&!this._video.paused&&!this._bPauseScan){if(this.bPlaySoundOnSuccessfulRead&&e.length){let t=!1;if(!0===this.bPlaySoundOnSuccessfulRead||"frame"===this.bPlaySoundOnSuccessfulRead)t=!0;else if("unduplicated"===this.bPlaySoundOnSuccessfulRead)for(let n of e)if(n.bUnduplicated){t=!0;break}t&&(this.soundOnSuccessfullRead.currentTime=0,this.soundOnSuccessfullRead.play())}if(this.onFrameRead){let t=this._cloneDecodeResults(e);for(let e of t)delete e.bUnduplicated;this.onFrameRead(t)}if(this.onUnduplicatedRead)for(let t of e)t.bUnduplicated&&this.onUnduplicatedRead(t.barcodeText,this._cloneDecodeResults(t));this._drawRegionsults(e)}setTimeout(()=>{this._loopReadVideo()},this.intervalTime)}).catch(e=>{if(l._onLog&&l._onLog(e.message||e),setTimeout(()=>{this._loopReadVideo()},this.intervalTime),"platform error"!=e.message)throw console.error(e.message),e})}))}_drawRegionsults(e){if(!this._video)return;this.beingLazyDrawRegionsults=!1;let t=this._video.style.objectFit||"contain",n=this._video.videoWidth,r=this._video.videoHeight;this.singleFrameMode&&(t="contain",n=this.oriCanvas.width,r=this.oriCanvas.height);let i=this.region;if(i&&(!i.regionLeft&&!i.regionRight&&!i.regionTop&&!i.regionBottom&&!i.regionMeasuredByPercentage||i instanceof Array?i=null:i.regionMeasuredByPercentage?i=i.regionLeft||i.regionRight||100!==i.regionTop||100!==i.regionBottom?{regionLeft:Math.round(i.regionLeft/100*n),regionTop:Math.round(i.regionTop/100*r),regionRight:Math.round(i.regionRight/100*n),regionBottom:Math.round(i.regionBottom/100*r)}:null:(i=JSON.parse(JSON.stringify(i)),delete i.regionMeasuredByPercentage)),this._cvsDrawArea){this._cvsDrawArea.style.objectFit=t;let o=this._cvsDrawArea;o.width=n,o.height=r;let s=o.getContext("2d");if(i){s.fillStyle=this.regionMaskFillStyle,s.fillRect(0,0,o.width,o.height),s.globalCompositeOperation="destination-out",s.fillStyle="#000";let e=Math.round(this.regionMaskLineWidth/2);s.fillRect(i.regionLeft-e,i.regionTop-e,i.regionRight-i.regionLeft+2*e,i.regionBottom-i.regionTop+2*e),s.globalCompositeOperation="source-over",s.strokeStyle=this.regionMaskStrokeStyle,s.lineWidth=this.regionMaskLineWidth,s.rect(i.regionLeft,i.regionTop,i.regionRight-i.regionLeft,i.regionBottom-i.regionTop),s.stroke()}if(e){s.globalCompositeOperation="destination-over",s.fillStyle=this.barcodeFillStyle,s.strokeStyle=this.barcodeStrokeStyle,s.lineWidth=this.barcodeLineWidth,e=e||[];for(let t of e){let e=t.localizationResult;s.beginPath(),s.moveTo(e.x1,e.y1),s.lineTo(e.x2,e.y2),s.lineTo(e.x3,e.y3),s.lineTo(e.x4,e.y4),s.fill(),s.beginPath(),s.moveTo(e.x1,e.y1),s.lineTo(e.x2,e.y2),s.lineTo(e.x3,e.y3),s.lineTo(e.x4,e.y4),s.closePath(),s.stroke()}}this.singleFrameMode&&(s.globalCompositeOperation="destination-over",s.drawImage(this.oriCanvas,0,0))}if(this._divScanArea){let e=this._video.offsetWidth,t=this._video.offsetHeight,o=1;e/tsuper.destroy}});return u(this,void 0,void 0,(function*(){this.close();for(let e of this.styleEls)e.remove();this.styleEls.splice(0,this.styleEls.length),this.bDestroyed||(yield e.destroy.call(this))}))}}var f,g,E,R,v,I,m,A,y,p,S,T,D,b,C,M,O,L,N,B,w,P,F,U,k,V,x,G;!function(e){e[e.ATRM_GENERAL=1]="ATRM_GENERAL",e[e.ATRM_SKIP=0]="ATRM_SKIP"}(f||(f={})),function(e){e[e.BICM_DARK_ON_LIGHT=1]="BICM_DARK_ON_LIGHT",e[e.BICM_LIGHT_ON_DARK=2]="BICM_LIGHT_ON_DARK",e[e.BICM_DARK_ON_DARK=4]="BICM_DARK_ON_DARK",e[e.BICM_LIGHT_ON_LIGHT=8]="BICM_LIGHT_ON_LIGHT",e[e.BICM_DARK_LIGHT_MIXED=16]="BICM_DARK_LIGHT_MIXED",e[e.BICM_DARK_ON_LIGHT_DARK_SURROUNDING=32]="BICM_DARK_ON_LIGHT_DARK_SURROUNDING",e[e.BICM_SKIP=0]="BICM_SKIP",e[e.BICM_REV=2147483648]="BICM_REV"}(g||(g={})),function(e){e[e.BCM_AUTO=1]="BCM_AUTO",e[e.BCM_GENERAL=2]="BCM_GENERAL",e[e.BCM_SKIP=0]="BCM_SKIP",e[e.BCM_REV=2147483648]="BCM_REV"}(E||(E={})),function(e){e[e.BF2_NULL=0]="BF2_NULL",e[e.BF2_POSTALCODE=32505856]="BF2_POSTALCODE",e[e.BF2_NONSTANDARD_BARCODE=1]="BF2_NONSTANDARD_BARCODE",e[e.BF2_USPSINTELLIGENTMAIL=1048576]="BF2_USPSINTELLIGENTMAIL",e[e.BF2_POSTNET=2097152]="BF2_POSTNET",e[e.BF2_PLANET=4194304]="BF2_PLANET",e[e.BF2_AUSTRALIANPOST=8388608]="BF2_AUSTRALIANPOST",e[e.BF2_RM4SCC=16777216]="BF2_RM4SCC",e[e.BF2_DOTCODE=2]="BF2_DOTCODE"}(R||(R={})),function(e){e[e.BM_AUTO=1]="BM_AUTO",e[e.BM_LOCAL_BLOCK=2]="BM_LOCAL_BLOCK",e[e.BM_SKIP=0]="BM_SKIP",e[e.BM_THRESHOLD=4]="BM_THRESHOLD",e[e.BM_REV=2147483648]="BM_REV"}(v||(v={})),function(e){e[e.ECCM_CONTRAST=1]="ECCM_CONTRAST"}(I||(I={})),function(e){e[e.CFM_GENERAL=1]="CFM_GENERAL"}(m||(m={})),function(e){e[e.CCM_AUTO=1]="CCM_AUTO",e[e.CCM_GENERAL_HSV=2]="CCM_GENERAL_HSV",e[e.CCM_SKIP=0]="CCM_SKIP",e[e.CCM_REV=2147483648]="CCM_REV"}(A||(A={})),function(e){e[e.CICM_GENERAL=1]="CICM_GENERAL",e[e.CICM_SKIP=0]="CICM_SKIP",e[e.CICM_REV=2147483648]="CICM_REV"}(y||(y={})),function(e){e[e.CM_IGNORE=1]="CM_IGNORE",e[e.CM_OVERWRITE=2]="CM_OVERWRITE"}(p||(p={})),function(e){e[e.DRM_AUTO=1]="DRM_AUTO",e[e.DRM_GENERAL=2]="DRM_GENERAL",e[e.DRM_SKIP=0]="DRM_SKIP",e[e.DRM_REV=2147483648]="DRM_REV"}(S||(S={})),function(e){e[e.DPMCRM_AUTO=1]="DPMCRM_AUTO",e[e.DPMCRM_GENERAL=2]="DPMCRM_GENERAL",e[e.DPMCRM_SKIP=0]="DPMCRM_SKIP",e[e.DPMCRM_REV=2147483648]="DPMCRM_REV"}(T||(T={})),function(e){e[e.GTM_INVERTED=1]="GTM_INVERTED",e[e.GTM_ORIGINAL=2]="GTM_ORIGINAL",e[e.GTM_SKIP=0]="GTM_SKIP",e[e.GTM_REV=2147483648]="GTM_REV"}(D||(D={})),function(e){e[e.IPM_AUTO=1]="IPM_AUTO",e[e.IPM_GENERAL=2]="IPM_GENERAL",e[e.IPM_GRAY_EQUALIZE=4]="IPM_GRAY_EQUALIZE",e[e.IPM_GRAY_SMOOTH=8]="IPM_GRAY_SMOOTH",e[e.IPM_SHARPEN_SMOOTH=16]="IPM_SHARPEN_SMOOTH",e[e.IPM_MORPHOLOGY=32]="IPM_MORPHOLOGY",e[e.IPM_SKIP=0]="IPM_SKIP",e[e.IPM_REV=2147483648]="IPM_REV"}(b||(b={})),function(e){e[e.IRSM_MEMORY=1]="IRSM_MEMORY",e[e.IRSM_FILESYSTEM=2]="IRSM_FILESYSTEM",e[e.IRSM_BOTH=4]="IRSM_BOTH"}(C||(C={})),function(e){e[e.IRT_NO_RESULT=0]="IRT_NO_RESULT",e[e.IRT_ORIGINAL_IMAGE=1]="IRT_ORIGINAL_IMAGE",e[e.IRT_COLOUR_CLUSTERED_IMAGE=2]="IRT_COLOUR_CLUSTERED_IMAGE",e[e.IRT_COLOUR_CONVERTED_GRAYSCALE_IMAGE=4]="IRT_COLOUR_CONVERTED_GRAYSCALE_IMAGE",e[e.IRT_TRANSFORMED_GRAYSCALE_IMAGE=8]="IRT_TRANSFORMED_GRAYSCALE_IMAGE",e[e.IRT_PREDETECTED_REGION=16]="IRT_PREDETECTED_REGION",e[e.IRT_PREPROCESSED_IMAGE=32]="IRT_PREPROCESSED_IMAGE",e[e.IRT_BINARIZED_IMAGE=64]="IRT_BINARIZED_IMAGE",e[e.IRT_TEXT_ZONE=128]="IRT_TEXT_ZONE",e[e.IRT_CONTOUR=256]="IRT_CONTOUR",e[e.IRT_LINE_SEGMENT=512]="IRT_LINE_SEGMENT",e[e.IRT_FORM=1024]="IRT_FORM",e[e.IRT_SEGMENTATION_BLOCK=2048]="IRT_SEGMENTATION_BLOCK",e[e.IRT_TYPED_BARCODE_ZONE=4096]="IRT_TYPED_BARCODE_ZONE",e[e.IRT_PREDETECTED_QUADRILATERAL=8192]="IRT_PREDETECTED_QUADRILATERAL"}(M||(M={})),function(e){e[e.LM_SKIP=0]="LM_SKIP",e[e.LM_AUTO=1]="LM_AUTO",e[e.LM_CONNECTED_BLOCKS=2]="LM_CONNECTED_BLOCKS",e[e.LM_LINES=8]="LM_LINES",e[e.LM_STATISTICS=4]="LM_STATISTICS",e[e.LM_SCAN_DIRECTLY=16]="LM_SCAN_DIRECTLY",e[e.LM_STATISTICS_MARKS=32]="LM_STATISTICS_MARKS",e[e.LM_STATISTICS_POSTAL_CODE=64]="LM_STATISTICS_POSTAL_CODE",e[e.LM_CENTRE=128]="LM_CENTRE",e[e.LM_REV=2147483648]="LM_REV"}(O||(O={})),function(e){e[e.PDFRM_RASTER=1]="PDFRM_RASTER",e[e.PDFRM_AUTO=2]="PDFRM_AUTO",e[e.PDFRM_VECTOR=4]="PDFRM_VECTOR",e[e.PDFRM_REV=2147483648]="PDFRM_REV"}(L||(L={})),function(e){e[e.QRECL_ERROR_CORRECTION_H=0]="QRECL_ERROR_CORRECTION_H",e[e.QRECL_ERROR_CORRECTION_L=1]="QRECL_ERROR_CORRECTION_L",e[e.QRECL_ERROR_CORRECTION_M=2]="QRECL_ERROR_CORRECTION_M",e[e.QRECL_ERROR_CORRECTION_Q=3]="QRECL_ERROR_CORRECTION_Q"}(N||(N={})),function(e){e[e.RPM_AUTO=1]="RPM_AUTO",e[e.RPM_GENERAL=2]="RPM_GENERAL",e[e.RPM_GENERAL_RGB_CONTRAST=4]="RPM_GENERAL_RGB_CONTRAST",e[e.RPM_GENERAL_GRAY_CONTRAST=8]="RPM_GENERAL_GRAY_CONTRAST",e[e.RPM_GENERAL_HSV_CONTRAST=16]="RPM_GENERAL_HSV_CONTRAST",e[e.RPM_SKIP=0]="RPM_SKIP",e[e.RPM_REV=2147483648]="RPM_REV"}(B||(B={})),function(e){e[e.RCT_PIXEL=1]="RCT_PIXEL",e[e.RCT_PERCENTAGE=2]="RCT_PERCENTAGE"}(w||(w={})),function(e){e[e.RT_STANDARD_TEXT=0]="RT_STANDARD_TEXT",e[e.RT_RAW_TEXT=1]="RT_RAW_TEXT",e[e.RT_CANDIDATE_TEXT=2]="RT_CANDIDATE_TEXT",e[e.RT_PARTIAL_TEXT=3]="RT_PARTIAL_TEXT"}(P||(P={})),function(e){e[e.SUM_AUTO=1]="SUM_AUTO",e[e.SUM_LINEAR_INTERPOLATION=2]="SUM_LINEAR_INTERPOLATION",e[e.SUM_NEAREST_NEIGHBOUR_INTERPOLATION=4]="SUM_NEAREST_NEIGHBOUR_INTERPOLATION",e[e.SUM_SKIP=0]="SUM_SKIP",e[e.SUM_REV=2147483648]="SUM_REV"}(F||(F={})),function(e){e[e.TP_REGION_PREDETECTED=1]="TP_REGION_PREDETECTED",e[e.TP_IMAGE_PREPROCESSED=2]="TP_IMAGE_PREPROCESSED",e[e.TP_IMAGE_BINARIZED=4]="TP_IMAGE_BINARIZED",e[e.TP_BARCODE_LOCALIZED=8]="TP_BARCODE_LOCALIZED",e[e.TP_BARCODE_TYPE_DETERMINED=16]="TP_BARCODE_TYPE_DETERMINED",e[e.TP_BARCODE_RECOGNIZED=32]="TP_BARCODE_RECOGNIZED"}(U||(U={})),function(e){e[e.TACM_AUTO=1]="TACM_AUTO",e[e.TACM_VERIFYING=2]="TACM_VERIFYING",e[e.TACM_VERIFYING_PATCHING=4]="TACM_VERIFYING_PATCHING",e[e.TACM_SKIP=0]="TACM_SKIP",e[e.TACM_REV=2147483648]="TACM_REV"}(k||(k={})),function(e){e[e.TFM_AUTO=1]="TFM_AUTO",e[e.TFM_GENERAL_CONTOUR=2]="TFM_GENERAL_CONTOUR",e[e.TFM_SKIP=0]="TFM_SKIP",e[e.TFM_REV=2147483648]="TFM_REV"}(V||(V={})),function(e){e[e.TROM_CONFIDENCE=1]="TROM_CONFIDENCE",e[e.TROM_POSITION=2]="TROM_POSITION",e[e.TROM_FORMAT=4]="TROM_FORMAT",e[e.TROM_SKIP=0]="TROM_SKIP",e[e.TROM_REV=2147483648]="TROM_REV"}(x||(x={})),function(e){e[e.TDM_AUTO=1]="TDM_AUTO",e[e.TDM_GENERAL_WIDTH_CONCENTRATION=2]="TDM_GENERAL_WIDTH_CONCENTRATION",e[e.TDM_SKIP=0]="TDM_SKIP",e[e.TDM_REV=2147483648]="TDM_REV"}(G||(G={}));const W={BarcodeReader:l,BarcodeScanner:h,EnumAccompanyingTextRecognitionMode:f,EnumBarcodeColourMode:g,EnumBarcodeComplementMode:E,EnumBarcodeFormat:s,EnumBarcodeFormat_2:R,EnumBinarizationMode:v,EnumClarityCalculationMethod:I,EnumClarityFilterMode:m,EnumColourClusteringMode:A,EnumColourConversionMode:y,EnumConflictMode:p,EnumDeformationResistingMode:S,EnumDPMCodeReadingMode:T,EnumErrorCode:i,EnumGrayscaleTransformationMode:D,EnumImagePixelFormat:r,EnumImagePreprocessingMode:b,EnumIMResultDataType:o,EnumIntermediateResultSavingMode:C,EnumIntermediateResultType:M,EnumLocalizationMode:O,EnumPDFReadingMode:L,EnumQRCodeErrorCorrectionLevel:N,EnumRegionPredetectionMode:B,EnumResultCoordinateType:w,EnumResultType:P,EnumScaleUpMode:F,EnumTerminatePhase:U,EnumTextAssistedCorrectionMode:k,EnumTextFilterMode:V,EnumTextResultOrderMode:x,EnumTextureDetectionMode:G};t.default=W}])}));const Dynamsoft={};{let _dbr;if(typeof dbr=="object"){_dbr=dbr;}else if(typeof exports=="object"&&exports.dbr){_dbr=exports.dbr;}else if(typeof module=="object"&&module.exports&&module.exports.dbr){_dbr=module.exports.dbr;}for(let key in _dbr){Dynamsoft[key]=_dbr[key];}}export default Dynamsoft;export const BarcodeReader=Dynamsoft.BarcodeReader;export const BarcodeScanner=Dynamsoft.BarcodeScanner;export const EnumAccompanyingTextRecognitionMode=Dynamsoft.EnumAccompanyingTextRecognitionMode;export const EnumBarcodeColourMode=Dynamsoft.EnumBarcodeColourMode;export const EnumBarcodeComplementMode=Dynamsoft.EnumBarcodeComplementMode;export const EnumBarcodeFormat=Dynamsoft.EnumBarcodeFormat;export const EnumBarcodeFormat_2=Dynamsoft.EnumBarcodeFormat_2;export const EnumBinarizationMode=Dynamsoft.EnumBinarizationMode;export const EnumClarityCalculationMethod=Dynamsoft.EnumClarityCalculationMethod;export const EnumClarityFilterMode=Dynamsoft.EnumClarityFilterMode;export const EnumColourClusteringMode=Dynamsoft.EnumColourClusteringMode;export const EnumColourConversionMode=Dynamsoft.EnumColourConversionMode;export const EnumConflictMode=Dynamsoft.EnumConflictMode;export const EnumDeformationResistingMode=Dynamsoft.EnumDeformationResistingMode;export const EnumDPMCodeReadingMode=Dynamsoft.EnumDPMCodeReadingMode;export const EnumErrorCode=Dynamsoft.EnumErrorCode;export const EnumGrayscaleTransformationMode=Dynamsoft.EnumGrayscaleTransformationMode;export const EnumImagePixelFormat=Dynamsoft.EnumImagePixelFormat;export const EnumImagePreprocessingMode=Dynamsoft.EnumImagePreprocessingMode;export const EnumIMResultDataType=Dynamsoft.EnumIMResultDataType;export const EnumIntermediateResultSavingMode=Dynamsoft.EnumIntermediateResultSavingMode;export const EnumIntermediateResultType=Dynamsoft.EnumIntermediateResultType;export const EnumLocalizationMode=Dynamsoft.EnumLocalizationMode;export const EnumPDFReadingMode=Dynamsoft.EnumPDFReadingMode;export const EnumQRCodeErrorCorrectionLevel=Dynamsoft.EnumQRCodeErrorCorrectionLevel;export const EnumRegionPredetectionMode=Dynamsoft.EnumRegionPredetectionMode;export const EnumResultCoordinateType=Dynamsoft.EnumResultCoordinateType;export const EnumResultType=Dynamsoft.EnumResultType;export const EnumScaleUpMode=Dynamsoft.EnumScaleUpMode;export const EnumTerminatePhase=Dynamsoft.EnumTerminatePhase;export const EnumTextAssistedCorrectionMode=Dynamsoft.EnumTextAssistedCorrectionMode;export const EnumTextFilterMode=Dynamsoft.EnumTextFilterMode;export const EnumTextResultOrderMode=Dynamsoft.EnumTextResultOrderMode;export const EnumTextureDetectionMode=Dynamsoft.EnumTextureDetectionMode;
\ 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;e