/*! * libav.js v6.5.7.1-1-g4a565de * * This software is compiled from several sources, the licenses for which are * included herein. * * --- * * ffmpeg: * * Copyright (c) 2000-2024 Fabrice Bellard et al * * GNU LESSER GENERAL PUBLIC LICENSE * Version 2.1, February 1999 * * Copyright (C) 1991, 1999 Free Software Foundation, Inc. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Everyone is permitted to copy and distribute verbatim copies * of this license document, but changing it is not allowed. * * [This is the first released version of the Lesser GPL. It also counts * as the successor of the GNU Library Public License, version 2, hence * the version number 2.1.] * * Preamble * * The licenses for most software are designed to take away your * freedom to share and change it. By contrast, the GNU General Public * Licenses are intended to guarantee your freedom to share and change * free software--to make sure the software is free for all its users. * * This license, the Lesser General Public License, applies to some * specially designated software packages--typically libraries--of the * Free Software Foundation and other authors who decide to use it. You * can use it too, but we suggest you first think carefully about whether * this license or the ordinary General Public License is the better * strategy to use in any particular case, based on the explanations below. * * When we speak of free software, we are referring to freedom of use, * not price. Our General Public Licenses are designed to make sure that * you have the freedom to distribute copies of free software (and charge * for this service if you wish); that you receive source code or can get * it if you want it; that you can change the software and use pieces of * it in new free programs; and that you are informed that you can do * these things. * * To protect your rights, we need to make restrictions that forbid * distributors to deny you these rights or to ask you to surrender these * rights. These restrictions translate to certain responsibilities for * you if you distribute copies of the library or if you modify it. * * For example, if you distribute copies of the library, whether gratis * or for a fee, you must give the recipients all the rights that we gave * you. You must make sure that they, too, receive or can get the source * code. If you link other code with the library, you must provide * complete object files to the recipients, so that they can relink them * with the library after making changes to the library and recompiling * it. And you must show them these terms so they know their rights. * * We protect your rights with a two-step method: (1) we copyright the * library, and (2) we offer you this license, which gives you legal * permission to copy, distribute and/or modify the library. * * To protect each distributor, we want to make it very clear that * there is no warranty for the free library. Also, if the library is * modified by someone else and passed on, the recipients should know * that what they have is not the original version, so that the original * author's reputation will not be affected by problems that might be * introduced by others. * * Finally, software patents pose a constant threat to the existence of * any free program. We wish to make sure that a company cannot * effectively restrict the users of a free program by obtaining a * restrictive license from a patent holder. Therefore, we insist that * any patent license obtained for a version of the library must be * consistent with the full freedom of use specified in this license. * * Most GNU software, including some libraries, is covered by the * ordinary GNU General Public License. This license, the GNU Lesser * General Public License, applies to certain designated libraries, and * is quite different from the ordinary General Public License. We use * this license for certain libraries in order to permit linking those * libraries into non-free programs. * * When a program is linked with a library, whether statically or using * a shared library, the combination of the two is legally speaking a * combined work, a derivative of the original library. The ordinary * General Public License therefore permits such linking only if the * entire combination fits its criteria of freedom. The Lesser General * Public License permits more lax criteria for linking other code with * the library. * * We call this license the "Lesser" General Public License because it * does Less to protect the user's freedom than the ordinary General * Public License. It also provides other free software developers Less * of an advantage over competing non-free programs. These disadvantages * are the reason we use the ordinary General Public License for many * libraries. However, the Lesser license provides advantages in certain * special circumstances. * * For example, on rare occasions, there may be a special need to * encourage the widest possible use of a certain library, so that it becomes * a de-facto standard. To achieve this, non-free programs must be * allowed to use the library. A more frequent case is that a free * library does the same job as widely used non-free libraries. In this * case, there is little to gain by limiting the free library to free * software only, so we use the Lesser General Public License. * * In other cases, permission to use a particular library in non-free * programs enables a greater number of people to use a large body of * free software. For example, permission to use the GNU C Library in * non-free programs enables many more people to use the whole GNU * operating system, as well as its variant, the GNU/Linux operating * system. * * Although the Lesser General Public License is Less protective of the * users' freedom, it does ensure that the user of a program that is * linked with the Library has the freedom and the wherewithal to run * that program using a modified version of the Library. * * The precise terms and conditions for copying, distribution and * modification follow. Pay close attention to the difference between a * "work based on the library" and a "work that uses the library". The * former contains code derived from the library, whereas the latter must * be combined with the library in order to run. * * GNU LESSER GENERAL PUBLIC LICENSE * TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION * * 0. This License Agreement applies to any software library or other * program which contains a notice placed by the copyright holder or * other authorized party saying it may be distributed under the terms of * this Lesser General Public License (also called "this License"). * Each licensee is addressed as "you". * * A "library" means a collection of software functions and/or data * prepared so as to be conveniently linked with application programs * (which use some of those functions and data) to form executables. * * The "Library", below, refers to any such software library or work * which has been distributed under these terms. A "work based on the * Library" means either the Library or any derivative work under * copyright law: that is to say, a work containing the Library or a * portion of it, either verbatim or with modifications and/or translated * straightforwardly into another language. (Hereinafter, translation is * included without limitation in the term "modification".) * * "Source code" for a work means the preferred form of the work for * making modifications to it. For a library, complete source code means * all the source code for all modules it contains, plus any associated * interface definition files, plus the scripts used to control compilation * and installation of the library. * * Activities other than copying, distribution and modification are not * covered by this License; they are outside its scope. The act of * running a program using the Library is not restricted, and output from * such a program is covered only if its contents constitute a work based * on the Library (independent of the use of the Library in a tool for * writing it). Whether that is true depends on what the Library does * and what the program that uses the Library does. * * 1. You may copy and distribute verbatim copies of the Library's * complete source code as you receive it, in any medium, provided that * you conspicuously and appropriately publish on each copy an * appropriate copyright notice and disclaimer of warranty; keep intact * all the notices that refer to this License and to the absence of any * warranty; and distribute a copy of this License along with the * Library. * * You may charge a fee for the physical act of transferring a copy, * and you may at your option offer warranty protection in exchange for a * fee. * * 2. You may modify your copy or copies of the Library or any portion * of it, thus forming a work based on the Library, and copy and * distribute such modifications or work under the terms of Section 1 * above, provided that you also meet all of these conditions: * * a) The modified work must itself be a software library. * * b) You must cause the files modified to carry prominent notices * stating that you changed the files and the date of any change. * * c) You must cause the whole of the work to be licensed at no * charge to all third parties under the terms of this License. * * d) If a facility in the modified Library refers to a function or a * table of data to be supplied by an application program that uses * the facility, other than as an argument passed when the facility * is invoked, then you must make a good faith effort to ensure that, * in the event an application does not supply such function or * table, the facility still operates, and performs whatever part of * its purpose remains meaningful. * * (For example, a function in a library to compute square roots has * a purpose that is entirely well-defined independent of the * application. Therefore, Subsection 2d requires that any * application-supplied function or table used by this function must * be optional: if the application does not supply it, the square * root function must still compute square roots.) * * These requirements apply to the modified work as a whole. If * identifiable sections of that work are not derived from the Library, * and can be reasonably considered independent and separate works in * themselves, then this License, and its terms, do not apply to those * sections when you distribute them as separate works. But when you * distribute the same sections as part of a whole which is a work based * on the Library, the distribution of the whole must be on the terms of * this License, whose permissions for other licensees extend to the * entire whole, and thus to each and every part regardless of who wrote * it. * * Thus, it is not the intent of this section to claim rights or contest * your rights to work written entirely by you; rather, the intent is to * exercise the right to control the distribution of derivative or * collective works based on the Library. * * In addition, mere aggregation of another work not based on the Library * with the Library (or with a work based on the Library) on a volume of * a storage or distribution medium does not bring the other work under * the scope of this License. * * 3. You may opt to apply the terms of the ordinary GNU General Public * License instead of this License to a given copy of the Library. To do * this, you must alter all the notices that refer to this License, so * that they refer to the ordinary GNU General Public License, version 2, * instead of to this License. (If a newer version than version 2 of the * ordinary GNU General Public License has appeared, then you can specify * that version instead if you wish.) Do not make any other change in * these notices. * * Once this change is made in a given copy, it is irreversible for * that copy, so the ordinary GNU General Public License applies to all * subsequent copies and derivative works made from that copy. * * This option is useful when you wish to copy part of the code of * the Library into a program that is not a library. * * 4. You may copy and distribute the Library (or a portion or * derivative of it, under Section 2) in object code or executable form * under the terms of Sections 1 and 2 above provided that you accompany * it with the complete corresponding machine-readable source code, which * must be distributed under the terms of Sections 1 and 2 above on a * medium customarily used for software interchange. * * If distribution of object code is made by offering access to copy * from a designated place, then offering equivalent access to copy the * source code from the same place satisfies the requirement to * distribute the source code, even though third parties are not * compelled to copy the source along with the object code. * * 5. A program that contains no derivative of any portion of the * Library, but is designed to work with the Library by being compiled or * linked with it, is called a "work that uses the Library". Such a * work, in isolation, is not a derivative work of the Library, and * therefore falls outside the scope of this License. * * However, linking a "work that uses the Library" with the Library * creates an executable that is a derivative of the Library (because it * contains portions of the Library), rather than a "work that uses the * library". The executable is therefore covered by this License. * Section 6 states terms for distribution of such executables. * * When a "work that uses the Library" uses material from a header file * that is part of the Library, the object code for the work may be a * derivative work of the Library even though the source code is not. * Whether this is true is especially significant if the work can be * linked without the Library, or if the work is itself a library. The * threshold for this to be true is not precisely defined by law. * * If such an object file uses only numerical parameters, data * structure layouts and accessors, and small macros and small inline * functions (ten lines or less in length), then the use of the object * file is unrestricted, regardless of whether it is legally a derivative * work. (Executables containing this object code plus portions of the * Library will still fall under Section 6.) * * Otherwise, if the work is a derivative of the Library, you may * distribute the object code for the work under the terms of Section 6. * Any executables containing that work also fall under Section 6, * whether or not they are linked directly with the Library itself. * * 6. As an exception to the Sections above, you may also combine or * link a "work that uses the Library" with the Library to produce a * work containing portions of the Library, and distribute that work * under terms of your choice, provided that the terms permit * modification of the work for the customer's own use and reverse * engineering for debugging such modifications. * * You must give prominent notice with each copy of the work that the * Library is used in it and that the Library and its use are covered by * this License. You must supply a copy of this License. If the work * during execution displays copyright notices, you must include the * copyright notice for the Library among them, as well as a reference * directing the user to the copy of this License. Also, you must do one * of these things: * * a) Accompany the work with the complete corresponding * machine-readable source code for the Library including whatever * changes were used in the work (which must be distributed under * Sections 1 and 2 above); and, if the work is an executable linked * with the Library, with the complete machine-readable "work that * uses the Library", as object code and/or source code, so that the * user can modify the Library and then relink to produce a modified * executable containing the modified Library. (It is understood * that the user who changes the contents of definitions files in the * Library will not necessarily be able to recompile the application * to use the modified definitions.) * * b) Use a suitable shared library mechanism for linking with the * Library. A suitable mechanism is one that (1) uses at run time a * copy of the library already present on the user's computer system, * rather than copying library functions into the executable, and (2) * will operate properly with a modified version of the library, if * the user installs one, as long as the modified version is * interface-compatible with the version that the work was made with. * * c) Accompany the work with a written offer, valid for at * least three years, to give the same user the materials * specified in Subsection 6a, above, for a charge no more * than the cost of performing this distribution. * * d) If distribution of the work is made by offering access to copy * from a designated place, offer equivalent access to copy the above * specified materials from the same place. * * e) Verify that the user has already received a copy of these * materials or that you have already sent this user a copy. * * For an executable, the required form of the "work that uses the * Library" must include any data and utility programs needed for * reproducing the executable from it. However, as a special exception, * the materials to be distributed need not include anything that is * normally distributed (in either source or binary form) with the major * components (compiler, kernel, and so on) of the operating system on * which the executable runs, unless that component itself accompanies * the executable. * * It may happen that this requirement contradicts the license * restrictions of other proprietary libraries that do not normally * accompany the operating system. Such a contradiction means you cannot * use both them and the Library together in an executable that you * distribute. * * 7. You may place library facilities that are a work based on the * Library side-by-side in a single library together with other library * facilities not covered by this License, and distribute such a combined * library, provided that the separate distribution of the work based on * the Library and of the other library facilities is otherwise * permitted, and provided that you do these two things: * * a) Accompany the combined library with a copy of the same work * based on the Library, uncombined with any other library * facilities. This must be distributed under the terms of the * Sections above. * * b) Give prominent notice with the combined library of the fact * that part of it is a work based on the Library, and explaining * where to find the accompanying uncombined form of the same work. * * 8. You may not copy, modify, sublicense, link with, or distribute * the Library except as expressly provided under this License. Any * attempt otherwise to copy, modify, sublicense, link with, or * distribute the Library is void, and will automatically terminate your * rights under this License. However, parties who have received copies, * or rights, from you under this License will not have their licenses * terminated so long as such parties remain in full compliance. * * 9. You are not required to accept this License, since you have not * signed it. However, nothing else grants you permission to modify or * distribute the Library or its derivative works. These actions are * prohibited by law if you do not accept this License. Therefore, by * modifying or distributing the Library (or any work based on the * Library), you indicate your acceptance of this License to do so, and * all its terms and conditions for copying, distributing or modifying * the Library or works based on it. * * 10. Each time you redistribute the Library (or any work based on the * Library), the recipient automatically receives a license from the * original licensor to copy, distribute, link with or modify the Library * subject to these terms and conditions. You may not impose any further * restrictions on the recipients' exercise of the rights granted herein. * You are not responsible for enforcing compliance by third parties with * this License. * * 11. If, as a consequence of a court judgment or allegation of patent * infringement or for any other reason (not limited to patent issues), * conditions are imposed on you (whether by court order, agreement or * otherwise) that contradict the conditions of this License, they do not * excuse you from the conditions of this License. If you cannot * distribute so as to satisfy simultaneously your obligations under this * License and any other pertinent obligations, then as a consequence you * may not distribute the Library at all. For example, if a patent * license would not permit royalty-free redistribution of the Library by * all those who receive copies directly or indirectly through you, then * the only way you could satisfy both it and this License would be to * refrain entirely from distribution of the Library. * * If any portion of this section is held invalid or unenforceable under any * particular circumstance, the balance of the section is intended to apply, * and the section as a whole is intended to apply in other circumstances. * * It is not the purpose of this section to induce you to infringe any * patents or other property right claims or to contest validity of any * such claims; this section has the sole purpose of protecting the * integrity of the free software distribution system which is * implemented by public license practices. Many people have made * generous contributions to the wide range of software distributed * through that system in reliance on consistent application of that * system; it is up to the author/donor to decide if he or she is willing * to distribute software through any other system and a licensee cannot * impose that choice. * * This section is intended to make thoroughly clear what is believed to * be a consequence of the rest of this License. * * 12. If the distribution and/or use of the Library is restricted in * certain countries either by patents or by copyrighted interfaces, the * original copyright holder who places the Library under this License may add * an explicit geographical distribution limitation excluding those countries, * so that distribution is permitted only in or among countries not thus * excluded. In such case, this License incorporates the limitation as if * written in the body of this License. * * 13. The Free Software Foundation may publish revised and/or new * versions of the Lesser General Public License from time to time. * Such new versions will be similar in spirit to the present version, * but may differ in detail to address new problems or concerns. * * Each version is given a distinguishing version number. If the Library * specifies a version number of this License which applies to it and * "any later version", you have the option of following the terms and * conditions either of that version or of any later version published by * the Free Software Foundation. If the Library does not specify a * license version number, you may choose any version ever published by * the Free Software Foundation. * * 14. If you wish to incorporate parts of the Library into other free * programs whose distribution conditions are incompatible with these, * write to the author to ask for permission. For software which is * copyrighted by the Free Software Foundation, write to the Free * Software Foundation; we sometimes make exceptions for this. Our * decision will be guided by the two goals of preserving the free status * of all derivatives of our free software and of promoting the sharing * and reuse of software generally. * * NO WARRANTY * * 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO * WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. * EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR * OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE * LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME * THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. * * 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN * WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY * AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU * FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR * CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE * LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING * RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A * FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF * SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH * DAMAGES. * * END OF TERMS AND CONDITIONS * * How to Apply These Terms to Your New Libraries * * If you develop a new library, and you want it to be of the greatest * possible use to the public, we recommend making it free software that * everyone can redistribute and change. You can do so by permitting * redistribution under these terms (or, alternatively, under the terms of the * ordinary General Public License). * * To apply these terms, attach the following notices to the library. It is * safest to attach them to the start of each source file to most effectively * convey the exclusion of warranty; and each file should have at least the * "copyright" line and a pointer to where the full notice is found. * * * Copyright (C) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Also add information on how to contact you by electronic and paper mail. * * You should also get your employer (if you work as a programmer) or your * school, if any, to sign a "copyright disclaimer" for the library, if * necessary. Here is a sample; alter the names: * * Yoyodyne, Inc., hereby disclaims all copyright interest in the * library `Frob' (a library for tweaking knobs) written by James Random Hacker. * * , 1 April 1990 * Ty Coon, President of Vice * * That's all there is to it! * * * --- * * ffmpeg oggdec: * * Copyright (C) 2005 Michael Ahlberg, Måns Rullgård * Copyright (C) 2005 Matthieu CASTET, Alex Beregszaszi * Copyright (C) 2008 Reimar Döffinger * * 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. * * * --- * * opus: * * Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, * Jean-Marc Valin, Timothy B. Terriberry, * CSIRO, Gregory Maxwell, Mark Borgerding, * Erik de Castro Lopo * * 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 Internet Society, IETF or IETF Trust, nor the names of * specific 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. * * Opus is subject to the royalty-free patent licenses which are specified at: * * Xiph.Org Foundation: * https://datatracker.ietf.org/ipr/1524/ * * Microsoft Corporation: * https://datatracker.ietf.org/ipr/1914/ * * Broadcom Corporation: * https://datatracker.ietf.org/ipr/1526/ * * * --- * * libvorbis, libogg: * * Copyright (c) 2002-2020 Xiph.org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of the Xiph.org Foundation 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 FOUNDATION 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. * * * --- * * lame: * * Copyright (C) 1999-2017 The L.A.M.E. project * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * * --- * * libvpx: * * Copyright (c) 2010, The WebM Project authors. 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, nor the WebM Project, 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 * 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. * * * --- * * libaom: * * Copyright (c) 2016, Alliance for Open Media. 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. * * 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. * * * --- * * libopenh264: * * Copyright (c) 2013, Cisco Systems * 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. * * * * * --- * * jrevdct.c: * * This file is part of the Independent JPEG Group's software. * * The authors make NO WARRANTY or representation, either express or implied, * with respect to this software, its quality, accuracy, merchantability, or * fitness for a particular purpose. This software is provided "AS IS", and * you, its user, assume the entire risk as to its quality and accuracy. * * This software is copyright (C) 1991, 1992, Thomas G. Lane. * All Rights Reserved except as specified below. * * Permission is hereby granted to use, copy, modify, and distribute this * software (or portions thereof) for any purpose, without fee, subject to * these conditions: * (1) If any part of the source code for this software is distributed, then * this README file must be included, with this copyright and no-warranty * notice unaltered; and any additions, deletions, or changes to the original * files must be clearly indicated in accompanying documentation. * (2) If only executable code is distributed, then the accompanying * documentation must state that "this software is based in part on the work * of the Independent JPEG Group". * (3) Permission for use of this software is granted only if the user accepts * full responsibility for any undesirable consequences; the authors accept * NO LIABILITY for damages of any kind. * * These conditions apply to any software derived from or based on the IJG * code, not just to the unmodified library. If you use our work, you ought * to acknowledge us. * * Permission is NOT granted for the use of any IJG author's name or company * name in advertising or publicity relating to this software or products * derived from it. This software may be referred to only as "the Independent * JPEG Group's software". * * * --- * * 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 * * * --- * * jrevdct.c: * * This file is part of the Independent JPEG Group's software. * * The authors make NO WARRANTY or representation, either express or implied, * with respect to this software, its quality, accuracy, merchantability, or * fitness for a particular purpose. This software is provided "AS IS", and * you, its user, assume the entire risk as to its quality and accuracy. * * This software is copyright (C) 1991, 1992, Thomas G. Lane. * All Rights Reserved except as specified below. * * Permission is hereby granted to use, copy, modify, and distribute this * software (or portions thereof) for any purpose, without fee, subject to * these conditions: * (1) If any part of the source code for this software is distributed, then * this README file must be included, with this copyright and no-warranty * notice unaltered; and any additions, deletions, or changes to the original * files must be clearly indicated in accompanying documentation. * (2) If only executable code is distributed, then the accompanying * documentation must state that "this software is based in part on the work * of the Independent JPEG Group". * (3) Permission for use of this software is granted only if the user accepts * full responsibility for any undesirable consequences; the authors accept * NO LIABILITY for damages of any kind. * * These conditions apply to any software derived from or based on the IJG * code, not just to the unmodified library. If you use our work, you ought * to acknowledge us. * * Permission is NOT granted for the use of any IJG author's name or company * name in advertising or publicity relating to this software or products * derived from it. This software may be referred to only as "the Independent * JPEG Group's software". * * * --- * * jfdctfst.c: * * This file is part of the Independent JPEG Group's software. * * The authors make NO WARRANTY or representation, either express or implied, * with respect to this software, its quality, accuracy, merchantability, or * fitness for a particular purpose. This software is provided "AS IS", and * you, its user, assume the entire risk as to its quality and accuracy. * * This software is copyright (C) 1994-1996, Thomas G. Lane. * All Rights Reserved except as specified below. * * Permission is hereby granted to use, copy, modify, and distribute this * software (or portions thereof) for any purpose, without fee, subject to * these conditions: * (1) If any part of the source code for this software is distributed, then * this README file must be included, with this copyright and no-warranty * notice unaltered; and any additions, deletions, or changes to the original * files must be clearly indicated in accompanying documentation. * (2) If only executable code is distributed, then the accompanying * documentation must state that "this software is based in part on the work * of the Independent JPEG Group". * (3) Permission for use of this software is granted only if the user accepts * full responsibility for any undesirable consequences; the authors accept * NO LIABILITY for damages of any kind. * * These conditions apply to any software derived from or based on the IJG * code, not just to the unmodified library. If you use our work, you ought * to acknowledge us. * * Permission is NOT granted for the use of any IJG author's name or company * name in advertising or publicity relating to this software or products * derived from it. This software may be referred to only as "the Independent * JPEG Group's software". * * * --- * * emscripten and musl: * * Copyright (c) 2010-2024 Emscripten authors, see AUTHORS file. * Copyright © 2005-2024 Rich Felker, et al. * * 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. * * emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.0 (97c7c2adab1791b9487d1f376934a3bdc28f8a67) * */ var LibAVFactory = (() => { var _scriptName = typeof document != 'undefined' ? document.currentScript?.src : undefined; if (typeof __filename != 'undefined') _scriptName = _scriptName || __filename; return ( async function(moduleArg = {}) { var moduleRtn; var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;var readyPromise=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof WorkerGlobalScope!="undefined";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";if(ENVIRONMENT_IS_NODE){}if(typeof _scriptName==="undefined"){if(typeof LibAV==="object"&&LibAV&&LibAV.base)_scriptName=LibAV.base+"/libav-6.5.7.1-all.wasm.js";else if(typeof self==="object"&&self&&self.location)_scriptName=self.location.href}Module.locateFile=function(path,prefix){if(path.lastIndexOf(".wasm")===path.length-5&&path.indexOf("libav-")!==-1){if(Module.wasmurl)return Module.wasmurl;if(Module.variant)return prefix+"libav-6.5.7.1-"+Module.variant+".wasm.wasm"}return prefix+path};var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");scriptDirectory=__dirname+"/";readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptName){scriptDirectory=_scriptName}if(scriptDirectory.startsWith("blob:")){scriptDirectory=""}else{scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}{if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=async url=>{if(isFileURI(url)){return new Promise((resolve,reject)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){resolve(xhr.response);return}reject(xhr.status)};xhr.onerror=reject;xhr.send(null)})}var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];var wasmBinary=Module["wasmBinary"];var wasmMemory;var ABORT=false;var EXITSTATUS;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAP64,HEAPU64,HEAPF64;var runtimeInitialized=false;var dataURIPrefix="data:application/octet-stream;base64,";var isDataURI=filename=>filename.startsWith(dataURIPrefix);var isFileURI=filename=>filename.startsWith("file://");function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b);Module["HEAP64"]=HEAP64=new BigInt64Array(b);Module["HEAPU64"]=HEAPU64=new BigUint64Array(b)}var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;Module["monitorRunDependencies"]?.(runDependencies)}function removeRunDependency(id){runDependencies--;Module["monitorRunDependencies"]?.(runDependencies);if(runDependencies==0){if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){Module["onAbort"]?.(what);what="Aborted("+what+")";err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var wasmBinaryFile;function findWasmBinary(){var f="libav-6.5.7.1-all.wasm.wasm";if(!isDataURI(f)){return locateFile(f)}return f}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){return{a:wasmImports}}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;wasmExports=Asyncify.instrumentWasmExports(wasmExports);wasmMemory=wasmExports["na"];updateMemoryViews();wasmTable=wasmExports["Wf"];addOnInit(wasmExports["oa"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){return receiveInstance(result["instance"])}var info=getWasmImports();if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}wasmBinaryFile??=findWasmBinary();try{var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);var exports=receiveInstantiationResult(result);return exports}catch(e){readyPromiseReject(e);return Promise.reject(e)}}var ASM_CONSTS={2245414:()=>{Fibers.trampolineRunning=false}};function writeoutEmscriptenOOM(){throw new Error("Out of memory")}function libavjs_wait_reader(fd){return Asyncify.handleAsync(function(){return new Promise(function(res){var name=Module.fdName(fd);var waiters=Module.ff_reader_dev_waiters[name];if(!waiters)waiters=Module.ff_reader_dev_waiters[name]=[];waiters.push(res)})})}function jsfetch_open_js(url){return Asyncify.handleAsync(function(){return Promise.all([]).then(function(){url=UTF8ToString(url);if(url.slice(0,8)==="jsfetch:")return fetch(url.slice(8));else return fetch(url)}).then(function(response){if(!Module.libavjsJSFetch)Module.libavjsJSFetch={ctr:1,fetches:{}};var jsf=Module.libavjsJSFetch;var idx=jsf.ctr++;var reader=response.body.getReader();var jsfo=jsf.fetches[idx]={url,response,reader,next:reader.read().then(function(res){jsfo.buf=res}).catch(function(rej){jsfo.rej=rej}),buf:null,rej:null};return idx}).catch(function(ex){Module.fsThrownError=ex;console.error(ex);return-11})})}function jsfetch_read_js(idx,toBuf,size){var jsfo=Module.libavjsJSFetch.fetches[idx];return Asyncify.handleAsync(function(){return Promise.all([]).then(function(){if(jsfo.buf||jsfo.rej){var fromBuf=jsfo.buf;var rej=jsfo.rej;if(fromBuf){if(fromBuf.done){return-541478725}if(fromBuf.value.length>size){Module.HEAPU8.set(fromBuf.value.subarray(0,size),toBuf);fromBuf.value=fromBuf.value.subarray(size);return size}var ret=fromBuf.value.length;Module.HEAPU8.set(fromBuf.value,toBuf);jsfo.buf=jsfo.rej=null;jsfo.next=jsfo.reader.read().then(function(res){jsfo.buf=res}).catch(function(rej){jsfo.rej=rej});return ret}Module.fsThrownError=rej;console.error(rej);return-11}return Promise.race([jsfo.next,new Promise(function(res){setTimeout(res,100)})]).then(function(){return-6})})})}function jsfetch_close_js(idx){var jsfo=Module.libavjsJSFetch.fetches[idx];if(jsfo){try{jsfo.reader.cancel()}catch(ex){}delete Module.libavjsJSFetch.fetches[idx]}}function emfiberthreads_pthread_mutex_timedwait_setTimeout(cond,thr,timeoutReached,sec,nsec){Module.HEAPU32[timeoutReached/4]=0;var wait=sec*1e3+nsec/1e6-(new Date).getTime();return setTimeout(function(){Module.HEAPU32[timeoutReached/4]=1;Module.ccall("emfiberthreads_timeout_expiry",null,["number","number"],[cond,thr])},wait)}function emfiberthreads_pthread_mutex_timedwait_clearTimeout(timeout){clearTimeout(timeout)}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var noExitRuntime=Module["noExitRuntime"]||true;var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder:undefined;var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead=NaN)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";var ___assert_fail=(condition,filename,line,func)=>abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"]);var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>path&&path.match(/([^\/]+|\/)\/*$/)[1],join:(...paths)=>PATH.normalize(paths.join("/")),join2:(l,r)=>PATH.normalize(l+"/"+r)};var initRandomFill=()=>{if(ENVIRONMENT_IS_NODE){var nodeCrypto=require("crypto");return view=>nodeCrypto.randomFillSync(view)}return view=>crypto.getRandomValues(view)};var randomFill=view=>{(randomFill=initRandomFill())(view)};var PATH_FS={resolve:(...args)=>{var resolvedPath="",resolvedAbsolute=false;for(var i=args.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?args[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var FS_stdin_getChar=()=>{if(!FS_stdin_getChar_buffer.length){var result=null;if(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=Buffer.alloc(BUFSIZE);var bytesRead=0;var fd=process.stdin.fd;try{bytesRead=fs.readSync(fd,buf,0,BUFSIZE)}catch(e){if(e.toString().includes("EOF"))bytesRead=0;else throw e}if(bytesRead>0){result=buf.slice(0,bytesRead).toString("utf-8")}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else{}if(!result){return null}FS_stdin_getChar_buffer=intArrayFromString(result,true)}return FS_stdin_getChar_buffer.shift()};var TTY={ttys:[],init(){},shutdown(){},register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close(stream){stream.tty.ops.fsync(stream.tty)},fsync(stream){stream.tty.ops.fsync(stream.tty)},read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){out(UTF8ArrayToString(tty.output));tty.output=[]}},ioctl_tcgets(tty){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(tty,optional_actions,data){return 0},ioctl_tiocgwinsz(tty){return[24,80]}},default_tty1_ops:{put_char(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output));tty.output=[]}}}};var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var mmapAlloc=size=>{abort()};var MEMFS={ops_table:null,mount(mount){return MEMFS.createNode(null,"/",16895,0)},createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}MEMFS.ops_table||={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}};var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.atime=node.mtime=node.ctime=Date.now();if(parent){parent.contents[name]=node;parent.atime=parent.mtime=parent.ctime=node.atime}return node},getFileDataAsTypedArray(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.atime);attr.mtime=new Date(node.mtime);attr.ctime=new Date(node.ctime);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr(node,attr){for(const key of["mode","atime","mtime","ctime"]){if(attr[key]!=null){node[key]=attr[key]}}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup(parent,name){throw MEMFS.doesNotExistError},mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename(old_node,new_dir,new_name){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){if(FS.isDir(old_node.mode)){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}FS.hashRemoveNode(new_node)}delete old_node.parent.contents[old_node.name];new_dir.contents[new_name]=old_node;old_node.name=new_name;new_dir.ctime=new_dir.mtime=old_node.parent.ctime=old_node.parent.mtime=Date.now()},unlink(parent,name){delete parent.contents[name];parent.ctime=parent.mtime=Date.now()},rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.ctime=parent.mtime=Date.now()},readdir(node){return[".","..",...Object.keys(node.contents)]},symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length{var arrayBuffer=await readAsync(url);return new Uint8Array(arrayBuffer)};asyncLoad.isAsync=true;var FS_createDataFile=(parent,name,fileData,canRead,canWrite,canOwn)=>{FS.createDataFile(parent,name,fileData,canRead,canWrite,canOwn)};var preloadPlugins=Module["preloadPlugins"]||[];var FS_handledByPreloadPlugin=(byteArray,fullname,finish,onerror)=>{if(typeof Browser!="undefined")Browser.init();var handled=false;preloadPlugins.forEach(plugin=>{if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,onerror);handled=true}});return handled};var FS_createPreloadedFile=(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(`cp ${fullname}`);function processData(byteArray){function finish(byteArray){preFinish?.();if(!dontCreateFile){FS_createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}onload?.();removeRunDependency(dep)}if(FS_handledByPreloadPlugin(byteArray,fullname,finish,()=>{onerror?.();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url).then(processData,onerror)}else{processData(url)}};var FS_modeStringToFlags=str=>{var flagModes={r:0,"r+":2,w:512|64|1,"w+":512|64|2,a:1024|64|1,"a+":1024|64|2};var flags=flagModes[str];if(typeof flags=="undefined"){throw new Error(`Unknown file open mode: ${str}`)}return flags};var FS_getMode=(canRead,canWrite)=>{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:class{name="ErrnoError";constructor(errno){this.errno=errno}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{shared={};get object(){return this.node}set object(val){this.node=val}get isRead(){return(this.flags&2097155)!==1}get isWrite(){return(this.flags&2097155)!==0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(val){this.shared.flags=val}get position(){return this.shared.position}set position(val){this.shared.position=val}},FSNode:class{node_ops={};stream_ops={};readMode=292|73;writeMode=146;mounted=null;constructor(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.rdev=rdev;this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(val){val?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(val){val?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return FS.isDir(this.mode)}get isDevice(){return FS.isChrdev(this.mode)}},lookupPath(path,opts={}){if(!path){throw new FS.ErrnoError(44)}opts.follow_mount??=true;if(!PATH.isAbs(path)){path=FS.cwd()+"/"+path}linkloop:for(var nlinks=0;nlinks<40;nlinks++){var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i>>0)%FS.nameTable.length},hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode(node){FS.hashRemoveNode(node)},isRoot(node){return node===node.parent},isMountpoint(node){return!!node.mounted},isFile(mode){return(mode&61440)===32768},isDir(mode){return(mode&61440)===16384},isLink(mode){return(mode&61440)===40960},isChrdev(mode){return(mode&61440)===8192},isBlkdev(mode){return(mode&61440)===24576},isFIFO(mode){return(mode&61440)===4096},isSocket(mode){return(mode&49152)===49152},flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions(node,perms){if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup(dir){if(!FS.isDir(dir.mode))return 54;var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate(dir,name){if(!FS.isDir(dir.mode)){return 54}try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&(512|64)){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},checkOpExists(op,err){if(!op){throw new FS.ErrnoError(err)}return op},MAX_OPEN_FDS:4096,nextfd(){for(var fd=0;fd<=FS.MAX_OPEN_FDS;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStreamChecked(fd){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}return stream},getStream:fd=>FS.streams[fd],createStream(stream,fd=-1){stream=Object.assign(new FS.FSStream,stream);if(fd==-1){fd=FS.nextfd()}stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream(fd){FS.streams[fd]=null},dupStream(origStream,fd=-1){var stream=FS.createStream(origStream,fd);stream.stream_ops?.dup?.(stream);return stream},chrdev_stream_ops:{open(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;stream.stream_ops.open?.(stream)},llseek(){throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push(...m.mounts)}return mounts},syncfs(populate,callback){if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`)}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type,opts,mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup(parent,name){return parent.node_ops.lookup(parent,name)},mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name){throw new FS.ErrnoError(28)}if(name==="."||name===".."){throw new FS.ErrnoError(20)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},statfs(path){var rtn={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:FS.nextInode,ffree:FS.nextInode-1,fsid:42,flags:2,namelen:255};var parent=FS.lookupPath(path,{follow:true}).node;if(parent?.node_ops.statfs){Object.assign(rtn,parent.node_ops.statfs(parent.mount.opts.root))}return rtn},create(path,mode=438){mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir(path,mode=511){mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree(path,mode){var dirs=path.split("/");var d="";for(var i=0;iFS.currentPath,chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length,llseek:()=>0});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var randomBuffer=new Uint8Array(1024),randomLeft=0;var randomByte=()=>{if(randomLeft===0){randomFill(randomBuffer);randomLeft=randomBuffer.byteLength}return randomBuffer[--randomLeft]};FS.createDevice("/dev","random",randomByte);FS.createDevice("/dev","urandom",randomByte);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories(){FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount(){var node=FS.createNode(proc_self,"fd",16895,73);node.stream_ops={llseek:MEMFS.stream_ops.llseek};node.node_ops={lookup(parent,name){var fd=+name;var stream=FS.getStreamChecked(fd);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path},id:fd+1};ret.parent=ret;return ret},readdir(){return Array.from(FS.streams.entries()).filter(([k,v])=>v).map(([k,v])=>k.toString())}};return node}},{},"/proc/self/fd")},createStandardStreams(input,output,error){if(input){FS.createDevice("/dev","stdin",input)}else{FS.symlink("/dev/tty","/dev/stdin")}if(output){FS.createDevice("/dev","stdout",null,output)}else{FS.symlink("/dev/tty","/dev/stdout")}if(error){FS.createDevice("/dev","stderr",null,error)}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},staticInit(){FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={MEMFS}},init(input,output,error){FS.initialized=true;input??=Module["stdin"];output??=Module["stdout"];error??=Module["stderr"];FS.createStandardStreams(input,output,error)},quit(){FS.initialized=false;for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]}setDataGetter(getter){this.getter=getter}cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true}get length(){if(!this.lengthKnown){this.cacheLength()}return this._length}get chunkSize(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=(...args)=>{FS.forceLoadFile(node);return fn(...args)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr,allocated:true}};node.stream_ops=stream_ops;return node}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return dir+"/"+path},writeStat(buf,stat){HEAP32[buf>>2]=stat.dev;HEAP32[buf+4>>2]=stat.mode;HEAPU32[buf+8>>2]=stat.nlink;HEAP32[buf+12>>2]=stat.uid;HEAP32[buf+16>>2]=stat.gid;HEAP32[buf+20>>2]=stat.rdev;HEAP64[buf+24>>3]=BigInt(stat.size);HEAP32[buf+32>>2]=4096;HEAP32[buf+36>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();HEAP64[buf+40>>3]=BigInt(Math.floor(atime/1e3));HEAPU32[buf+48>>2]=atime%1e3*1e3*1e3;HEAP64[buf+56>>3]=BigInt(Math.floor(mtime/1e3));HEAPU32[buf+64>>2]=mtime%1e3*1e3*1e3;HEAP64[buf+72>>3]=BigInt(Math.floor(ctime/1e3));HEAPU32[buf+80>>2]=ctime%1e3*1e3*1e3;HEAP64[buf+88>>3]=BigInt(stat.ino);return 0},doMsync(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},getStreamFromFD(fd){var stream=FS.getStreamChecked(fd);return stream},varargs:undefined,getStr(ptr){var ret=UTF8ToString(ptr);return ret}};var ___syscall__newselect=function(nfds,readfds,writefds,exceptfds,timeout){try{var total=0;var srcReadLow=readfds?HEAP32[readfds>>2]:0,srcReadHigh=readfds?HEAP32[readfds+4>>2]:0;var srcWriteLow=writefds?HEAP32[writefds>>2]:0,srcWriteHigh=writefds?HEAP32[writefds+4>>2]:0;var srcExceptLow=exceptfds?HEAP32[exceptfds>>2]:0,srcExceptHigh=exceptfds?HEAP32[exceptfds+4>>2]:0;var dstReadLow=0,dstReadHigh=0;var dstWriteLow=0,dstWriteHigh=0;var dstExceptLow=0,dstExceptHigh=0;var allLow=(readfds?HEAP32[readfds>>2]:0)|(writefds?HEAP32[writefds>>2]:0)|(exceptfds?HEAP32[exceptfds>>2]:0);var allHigh=(readfds?HEAP32[readfds+4>>2]:0)|(writefds?HEAP32[writefds+4>>2]:0)|(exceptfds?HEAP32[exceptfds+4>>2]:0);var check=(fd,low,high,val)=>fd<32?low&val:high&val;for(var fd=0;fd>2]:0,tv_usec=readfds?HEAP32[timeout+4>>2]:0;timeoutInMillis=(tv_sec+tv_usec/1e6)*1e3}flags=stream.stream_ops.poll(stream,timeoutInMillis)}if(flags&1&&check(fd,srcReadLow,srcReadHigh,mask)){fd<32?dstReadLow=dstReadLow|mask:dstReadHigh=dstReadHigh|mask;total++}if(flags&4&&check(fd,srcWriteLow,srcWriteHigh,mask)){fd<32?dstWriteLow=dstWriteLow|mask:dstWriteHigh=dstWriteHigh|mask;total++}if(flags&2&&check(fd,srcExceptLow,srcExceptHigh,mask)){fd<32?dstExceptLow=dstExceptLow|mask:dstExceptHigh=dstExceptHigh|mask;total++}}if(readfds){HEAP32[readfds>>2]=dstReadLow;HEAP32[readfds+4>>2]=dstReadHigh}if(writefds){HEAP32[writefds>>2]=dstWriteLow;HEAP32[writefds+4>>2]=dstWriteHigh}if(exceptfds){HEAP32[exceptfds>>2]=dstExceptLow;HEAP32[exceptfds+4>>2]=dstExceptHigh}return total}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}};function ___syscall_dup3(fd,newfd,flags){try{var old=SYSCALLS.getStreamFromFD(fd);if(old.fd===newfd)return-28;if(newfd<0||newfd>=FS.MAX_OPEN_FDS)return-8;var existing=FS.getStream(newfd);if(existing)FS.close(existing);return FS.dupStream(old,newfd).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_faccessat(dirfd,path,amode,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(amode&~7){return-28}var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node){return-44}var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-2}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var syscallGetVarargI=()=>{var ret=HEAP32[+SYSCALLS.varargs>>2];SYSCALLS.varargs+=4;return ret};var syscallGetVarargP=syscallGetVarargI;function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=syscallGetVarargI();if(arg<0){return-28}while(FS.streams[arg]){arg++}var newStream;newStream=FS.dupStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=syscallGetVarargI();stream.flags|=arg;return 0}case 12:{var arg=syscallGetVarargP();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0}return-28}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_fstat64(fd,buf){try{var stream=SYSCALLS.getStreamFromFD(fd);return SYSCALLS.writeStat(buf,FS.stat(stream.path))}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);function ___syscall_getdents64(fd,dirp,count){try{var stream=SYSCALLS.getStreamFromFD(fd);stream.getdents||=FS.readdir(stream.path);var struct_size=280;var pos=0;var off=FS.llseek(stream,0,1);var startIdx=Math.floor(off/struct_size);var endIdx=Math.min(stream.getdents.length,startIdx+Math.floor(count/struct_size));for(var idx=startIdx;idx>3]=BigInt(id);HEAP64[dirp+pos+8>>3]=BigInt((idx+1)*struct_size);HEAP16[dirp+pos+16>>1]=280;HEAP8[dirp+pos+18]=type;stringToUTF8(name,dirp+pos+19,256);pos+=struct_size}FS.llseek(stream,idx*struct_size,0);return pos}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:{if(!stream.tty)return-59;return 0}case 21505:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tcgets){var termios=stream.tty.ops.ioctl_tcgets(stream);var argp=syscallGetVarargP();HEAP32[argp>>2]=termios.c_iflag||0;HEAP32[argp+4>>2]=termios.c_oflag||0;HEAP32[argp+8>>2]=termios.c_cflag||0;HEAP32[argp+12>>2]=termios.c_lflag||0;for(var i=0;i<32;i++){HEAP8[argp+i+17]=termios.c_cc[i]||0}return 0}return 0}case 21510:case 21511:case 21512:{if(!stream.tty)return-59;return 0}case 21506:case 21507:case 21508:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tcsets){var argp=syscallGetVarargP();var c_iflag=HEAP32[argp>>2];var c_oflag=HEAP32[argp+4>>2];var c_cflag=HEAP32[argp+8>>2];var c_lflag=HEAP32[argp+12>>2];var c_cc=[];for(var i=0;i<32;i++){c_cc.push(HEAP8[argp+i+17])}return stream.tty.ops.ioctl_tcsets(stream.tty,op,{c_iflag,c_oflag,c_cflag,c_lflag,c_cc})}return 0}case 21519:{if(!stream.tty)return-59;var argp=syscallGetVarargP();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=syscallGetVarargP();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tiocgwinsz){var winsize=stream.tty.ops.ioctl_tiocgwinsz(stream.tty);var argp=syscallGetVarargP();HEAP16[argp>>1]=winsize[0];HEAP16[argp+2>>1]=winsize[1]}return 0}case 21524:{if(!stream.tty)return-59;return 0}case 21515:{if(!stream.tty)return-59;return 0}default:return-28}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_lstat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.writeStat(buf,FS.lstat(path))}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_mkdirat(dirfd,path,mode){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);FS.mkdir(path,mode,0);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_newfstatat(dirfd,path,buf,flags){try{path=SYSCALLS.getStr(path);var nofollow=flags&256;var allowEmpty=flags&4096;flags=flags&~6400;path=SYSCALLS.calculateAt(dirfd,path,allowEmpty);return SYSCALLS.writeStat(buf,nofollow?FS.lstat(path):FS.stat(path))}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?syscallGetVarargI():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_renameat(olddirfd,oldpath,newdirfd,newpath){try{oldpath=SYSCALLS.getStr(oldpath);newpath=SYSCALLS.getStr(newpath);oldpath=SYSCALLS.calculateAt(olddirfd,oldpath);newpath=SYSCALLS.calculateAt(newdirfd,newpath);FS.rename(oldpath,newpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_rmdir(path){try{path=SYSCALLS.getStr(path);FS.rmdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.writeStat(buf,FS.stat(path))}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_unlinkat(dirfd,path,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(flags===0){FS.unlink(path)}else if(flags===512){FS.rmdir(path)}else{abort("Invalid flags passed to unlinkat")}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var __abort_js=()=>abort("");var __emscripten_throw_longjmp=()=>{throw Infinity};var INT53_MAX=9007199254740992;var INT53_MIN=-9007199254740992;var bigintToI53Checked=num=>numINT53_MAX?NaN:Number(num);function __gmtime_js(time,tmPtr){time=bigintToI53Checked(time);var date=new Date(time*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday}var isLeapYear=year=>year%4===0&&(year%100!==0||year%400===0);var MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];var ydayFromDate=date=>{var leap=isLeapYear(date.getFullYear());var monthDaysCumulative=leap?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday};function __localtime_js(time,tmPtr){time=bigintToI53Checked(time);var date=new Date(time*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var yday=ydayFromDate(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst}var __mktime_js=function(tmPtr){var ret=(()=>{var date=new Date(HEAP32[tmPtr+20>>2]+1900,HEAP32[tmPtr+16>>2],HEAP32[tmPtr+12>>2],HEAP32[tmPtr+8>>2],HEAP32[tmPtr+4>>2],HEAP32[tmPtr>>2],0);var dst=HEAP32[tmPtr+32>>2];var guessedOffset=date.getTimezoneOffset();var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dstOffset=Math.min(winterOffset,summerOffset);if(dst<0){HEAP32[tmPtr+32>>2]=Number(summerOffset!=winterOffset&&dstOffset==guessedOffset)}else if(dst>0!=(dstOffset==guessedOffset)){var nonDstOffset=Math.max(winterOffset,summerOffset);var trueOffset=dst>0?dstOffset:nonDstOffset;date.setTime(date.getTime()+(trueOffset-guessedOffset)*6e4)}HEAP32[tmPtr+24>>2]=date.getDay();var yday=ydayFromDate(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getYear();var timeMs=date.getTime();if(isNaN(timeMs)){return-1}return timeMs/1e3})();return BigInt(ret)};var __tzset_js=(timezone,daylight,std_name,dst_name)=>{var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);var extractZone=timezoneOffset=>{var sign=timezoneOffset>=0?"-":"+";var absOffset=Math.abs(timezoneOffset);var hours=String(Math.floor(absOffset/60)).padStart(2,"0");var minutes=String(absOffset%60).padStart(2,"0");return`UTC${sign}${hours}${minutes}`};var winterName=extractZone(winterOffset);var summerName=extractZone(summerOffset);if(summerOffsetperformance.now();var _emscripten_date_now=()=>Date.now();var nowIsMonotonic=1;var checkWasiClock=clock_id=>clock_id>=0&&clock_id<=3;function _clock_time_get(clk_id,ignored_precision,ptime){ignored_precision=bigintToI53Checked(ignored_precision);if(!checkWasiClock(clk_id)){return 28}var now;if(clk_id===0){now=_emscripten_date_now()}else if(nowIsMonotonic){now=_emscripten_get_now()}else{return 52}var nsec=Math.round(now*1e3*1e3);HEAP64[ptime>>3]=BigInt(nsec);return 0}var readEmAsmArgsArray=[];var readEmAsmArgs=(sigPtr,buf)=>{readEmAsmArgsArray.length=0;var ch;while(ch=HEAPU8[sigPtr++]){var wide=ch!=105;wide&=ch!=112;buf+=wide&&buf%8?4:0;readEmAsmArgsArray.push(ch==112?HEAPU32[buf>>2]:ch==106?HEAP64[buf>>3]:ch==105?HEAP32[buf>>2]:HEAPF64[buf>>3]);buf+=wide?8:4}return readEmAsmArgsArray};var runEmAsmFunction=(code,sigPtr,argbuf)=>{var args=readEmAsmArgs(sigPtr,argbuf);return ASM_CONSTS[code](...args)};var _emscripten_asm_const_int=(code,sigPtr,argbuf)=>runEmAsmFunction(code,sigPtr,argbuf);var runAndAbortIfError=func=>{try{return func()}catch(e){abort(e)}};var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var runtimeKeepaliveCounter=0;var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){Module["onExit"]?.(code);ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=(status,implicit)=>{EXITSTATUS=status;_proc_exit(status)};var _exit=exitJS;var maybeExit=()=>{if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};var runtimeKeepalivePop=()=>{runtimeKeepaliveCounter-=1};var Asyncify={instrumentWasmImports(imports){var importPattern=/^(libavjs_wait_reader|invoke_.*|__asyncjs__.*)$/;for(let[x,original]of Object.entries(imports)){if(typeof original=="function"){let isAsyncifyImport=original.isAsync||importPattern.test(x)}}},instrumentWasmExports(exports){var ret={};for(let[x,original]of Object.entries(exports)){if(typeof original=="function"){ret[x]=(...args)=>{Asyncify.exportCallStack.push(x);try{return original(...args)}finally{if(!ABORT){var y=Asyncify.exportCallStack.pop();Asyncify.maybeStopUnwind()}}}}else{ret[x]=original}}return ret},State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId(funcName){var id=Asyncify.callStackNameToId[funcName];if(id===undefined){id=Asyncify.callStackId++;Asyncify.callStackNameToId[funcName]=id;Asyncify.callStackIdToName[id]=funcName}return id},maybeStopUnwind(){if(Asyncify.currData&&Asyncify.state===Asyncify.State.Unwinding&&Asyncify.exportCallStack.length===0){Asyncify.state=Asyncify.State.Normal;runAndAbortIfError(_asyncify_stop_unwind);if(typeof Fibers!="undefined"){Fibers.trampoline()}}},whenDone(){return new Promise((resolve,reject)=>{Asyncify.asyncPromiseHandlers={resolve,reject}})},allocateData(){var ptr=_malloc(12+Asyncify.StackSize);Asyncify.setDataHeader(ptr,ptr+12,Asyncify.StackSize);Asyncify.setDataRewindFunc(ptr);return ptr},setDataHeader(ptr,stack,stackSize){HEAPU32[ptr>>2]=stack;HEAPU32[ptr+4>>2]=stack+stackSize},setDataRewindFunc(ptr){var bottomOfCallStack=Asyncify.exportCallStack[0];var rewindId=Asyncify.getCallStackId(bottomOfCallStack);HEAP32[ptr+8>>2]=rewindId},getDataRewindFuncName(ptr){var id=HEAP32[ptr+8>>2];var name=Asyncify.callStackIdToName[id];return name},getDataRewindFunc(name){var func=wasmExports[name];return func},doRewind(ptr){var name=Asyncify.getDataRewindFuncName(ptr);var func=Asyncify.getDataRewindFunc(name);return func()},handleSleep(startAsync){if(ABORT)return;if(Asyncify.state===Asyncify.State.Normal){var reachedCallback=false;var reachedAfterCallback=false;startAsync((handleSleepReturnValue=0)=>{if(ABORT)return;Asyncify.handleSleepReturnValue=handleSleepReturnValue;reachedCallback=true;if(!reachedAfterCallback){return}Asyncify.state=Asyncify.State.Rewinding;runAndAbortIfError(()=>_asyncify_start_rewind(Asyncify.currData));if(typeof MainLoop!="undefined"&&MainLoop.func){MainLoop.resume()}var asyncWasmReturnValue,isError=false;try{asyncWasmReturnValue=Asyncify.doRewind(Asyncify.currData)}catch(err){asyncWasmReturnValue=err;isError=true}var handled=false;if(!Asyncify.currData){var asyncPromiseHandlers=Asyncify.asyncPromiseHandlers;if(asyncPromiseHandlers){Asyncify.asyncPromiseHandlers=null;(isError?asyncPromiseHandlers.reject:asyncPromiseHandlers.resolve)(asyncWasmReturnValue);handled=true}}if(isError&&!handled){throw asyncWasmReturnValue}});reachedAfterCallback=true;if(!reachedCallback){Asyncify.state=Asyncify.State.Unwinding;Asyncify.currData=Asyncify.allocateData();if(typeof MainLoop!="undefined"&&MainLoop.func){MainLoop.pause()}runAndAbortIfError(()=>_asyncify_start_unwind(Asyncify.currData))}}else if(Asyncify.state===Asyncify.State.Rewinding){Asyncify.state=Asyncify.State.Normal;runAndAbortIfError(_asyncify_stop_rewind);_free(Asyncify.currData);Asyncify.currData=null;Asyncify.sleepCallbacks.forEach(callUserCallback)}else{abort(`invalid state: ${Asyncify.state}`)}return Asyncify.handleSleepReturnValue},handleAsync(startAsync){return Asyncify.handleSleep(wakeUp=>{startAsync().then(wakeUp)})}};var Fibers={nextFiber:0,trampolineRunning:false,trampoline(){if(!Fibers.trampolineRunning&&Fibers.nextFiber){Fibers.trampolineRunning=true;do{var fiber=Fibers.nextFiber;Fibers.nextFiber=0;Fibers.finishContextSwitch(fiber)}while(Fibers.nextFiber);Fibers.trampolineRunning=false}},finishContextSwitch(newFiber){var stack_base=HEAPU32[newFiber>>2];var stack_max=HEAPU32[newFiber+4>>2];_emscripten_stack_set_limits(stack_base,stack_max);stackRestore(HEAPU32[newFiber+8>>2]);var entryPoint=HEAPU32[newFiber+12>>2];if(entryPoint!==0){Asyncify.currData=null;HEAPU32[newFiber+12>>2]=0;var userData=HEAPU32[newFiber+16>>2];(a1=>dynCall_vi(entryPoint,a1))(userData)}else{var asyncifyData=newFiber+20;Asyncify.currData=asyncifyData;Asyncify.state=Asyncify.State.Rewinding;_asyncify_start_rewind(asyncifyData);Asyncify.doRewind(asyncifyData)}}};var _emscripten_fiber_swap=(oldFiber,newFiber)=>{if(ABORT)return;if(Asyncify.state===Asyncify.State.Normal){Asyncify.state=Asyncify.State.Unwinding;var asyncifyData=oldFiber+20;Asyncify.setDataRewindFunc(asyncifyData);Asyncify.currData=asyncifyData;_asyncify_start_unwind(asyncifyData);var stackTop=stackSave();HEAPU32[oldFiber+8>>2]=stackTop;Fibers.nextFiber=newFiber}else{Asyncify.state=Asyncify.State.Normal;_asyncify_stop_rewind();Asyncify.currData=null}};_emscripten_fiber_swap.isAsync=true;var getHeapMax=()=>2147483648;var _emscripten_get_heap_max=()=>getHeapMax();var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var ENV={};var getExecutableName=()=>thisProgram||"./this.program";var getEnvStrings=()=>{if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:lang,_:getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings};var stringToAscii=(str,buffer)=>{for(var i=0;i{var bufSize=0;getEnvStrings().forEach((string,i)=>{var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;stringToAscii(string,ptr);bufSize+=string.length+1});return 0};var _environ_sizes_get=(penviron_count,penviron_buf_size)=>{var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(string=>bufSize+=string.length+1);HEAPU32[penviron_buf_size>>2]=bufSize;return 0};function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_fdstat_get(fd,pbuf){try{var rightsBase=0;var rightsInheriting=0;var flags=0;{var stream=SYSCALLS.getStreamFromFD(fd);var type=stream.tty?2:FS.isDir(stream.mode)?3:FS.isLink(stream.mode)?7:4}HEAP8[pbuf]=type;HEAP16[pbuf+2>>1]=flags;HEAP64[pbuf+8>>3]=BigInt(rightsBase);HEAP64[pbuf+16>>3]=BigInt(rightsInheriting);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doReadv=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_seek(fd,offset,whence,newOffset){offset=bigintToI53Checked(offset);try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);HEAP64[newOffset>>3]=BigInt(stream.position);if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doWritev=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var wasmTable;var getCFunc=ident=>{var func=Module["_"+ident];return func};var writeArrayToMemory=(array,buffer)=>{HEAP8.set(array,buffer)};var stackAlloc=sz=>__emscripten_stack_alloc(sz);var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var ccall=(ident,returnType,argTypes,args,opts)=>{var toC={string:str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=stringToUTF8OnStack(str)}return ret},array:arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i{var numericArgs=!argTypes||argTypes.every(type=>type==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return(...args)=>ccall(ident,returnType,argTypes,args,opts)};FS.createPreloadedFile=FS_createPreloadedFile;FS.staticInit();MEMFS.doesNotExistError=new FS.ErrnoError(44);MEMFS.doesNotExistError.stack="";var wasmImports={a:___assert_fail,F:___syscall__newselect,A:___syscall_dup3,X:___syscall_faccessat,q:___syscall_fcntl64,V:___syscall_fstat64,I:___syscall_getdents64,p:___syscall_ioctl,S:___syscall_lstat64,N:___syscall_mkdirat,T:___syscall_newfstatat,w:___syscall_openat,H:___syscall_renameat,G:___syscall_rmdir,U:___syscall_stat64,D:___syscall_unlinkat,Z:__abort_js,B:__emscripten_throw_longjmp,J:__gmtime_js,K:__localtime_js,L:__mktime_js,M:__tzset_js,W:_clock_time_get,$:emfiberthreads_pthread_mutex_timedwait_clearTimeout,aa:emfiberthreads_pthread_mutex_timedwait_setTimeout,_:_emscripten_asm_const_int,x:_emscripten_date_now,ba:_emscripten_fiber_swap,E:_emscripten_get_heap_max,u:_emscripten_get_now,C:_emscripten_resize_heap,Q:_environ_get,R:_environ_sizes_get,i:_exit,l:_fd_close,v:_fd_fdstat_get,y:_fd_read,O:_fd_seek,o:_fd_write,s:invoke_i,e:invoke_ii,c:invoke_iii,k:invoke_iiii,j:invoke_iiiii,ja:invoke_iiiiii,la:invoke_iiiiiiiii,z:invoke_iiiiiiiiii,ea:invoke_iiiiiiiiiii,fa:invoke_iiiiiiiiiiii,t:invoke_iiiijj,n:invoke_jij,d:invoke_vi,f:invoke_vii,g:invoke_viii,ka:invoke_viiid,b:invoke_viiii,h:invoke_viiiii,ha:invoke_viiiiii,m:invoke_viiiiiii,r:invoke_viiiiiiii,ga:invoke_viiiiiiiii,da:invoke_viiiiiiiiiii,P:jsfetch_close_js,ca:jsfetch_open_js,Y:jsfetch_read_js,ia:libavjs_wait_reader,ma:writeoutEmscriptenOOM};var wasmExports=await createWasm();var ___wasm_call_ctors=wasmExports["oa"];var _ff_nothing=Module["_ff_nothing"]=wasmExports["pa"];var _AVFrame_crop_bottom=Module["_AVFrame_crop_bottom"]=wasmExports["qa"];var _AVFrame_crop_bottom_s=Module["_AVFrame_crop_bottom_s"]=wasmExports["ra"];var _AVFrame_crop_left=Module["_AVFrame_crop_left"]=wasmExports["sa"];var _AVFrame_crop_left_s=Module["_AVFrame_crop_left_s"]=wasmExports["ta"];var _AVFrame_crop_right=Module["_AVFrame_crop_right"]=wasmExports["ua"];var _AVFrame_crop_right_s=Module["_AVFrame_crop_right_s"]=wasmExports["va"];var _AVFrame_crop_top=Module["_AVFrame_crop_top"]=wasmExports["wa"];var _AVFrame_crop_top_s=Module["_AVFrame_crop_top_s"]=wasmExports["xa"];var _AVFrame_data_a=Module["_AVFrame_data_a"]=wasmExports["ya"];var _AVFrame_data_a_s=Module["_AVFrame_data_a_s"]=wasmExports["za"];var _AVFrame_format=Module["_AVFrame_format"]=wasmExports["Aa"];var _AVFrame_format_s=Module["_AVFrame_format_s"]=wasmExports["Ba"];var _AVFrame_height=Module["_AVFrame_height"]=wasmExports["Ca"];var _AVFrame_height_s=Module["_AVFrame_height_s"]=wasmExports["Da"];var _AVFrame_key_frame=Module["_AVFrame_key_frame"]=wasmExports["Ea"];var _AVFrame_key_frame_s=Module["_AVFrame_key_frame_s"]=wasmExports["Fa"];var _AVFrame_linesize_a=Module["_AVFrame_linesize_a"]=wasmExports["Ga"];var _AVFrame_linesize_a_s=Module["_AVFrame_linesize_a_s"]=wasmExports["Ha"];var _AVFrame_nb_samples=Module["_AVFrame_nb_samples"]=wasmExports["Ia"];var _AVFrame_nb_samples_s=Module["_AVFrame_nb_samples_s"]=wasmExports["Ja"];var _AVFrame_pict_type=Module["_AVFrame_pict_type"]=wasmExports["Ka"];var _AVFrame_pict_type_s=Module["_AVFrame_pict_type_s"]=wasmExports["La"];var _AVFrame_pts=Module["_AVFrame_pts"]=wasmExports["Ma"];var _AVFrame_ptshi=Module["_AVFrame_ptshi"]=wasmExports["Na"];var _AVFrame_pts_s=Module["_AVFrame_pts_s"]=wasmExports["Oa"];var _AVFrame_ptshi_s=Module["_AVFrame_ptshi_s"]=wasmExports["Pa"];var _AVFrame_sample_rate=Module["_AVFrame_sample_rate"]=wasmExports["Qa"];var _AVFrame_sample_rate_s=Module["_AVFrame_sample_rate_s"]=wasmExports["Ra"];var _AVFrame_width=Module["_AVFrame_width"]=wasmExports["Sa"];var _AVFrame_width_s=Module["_AVFrame_width_s"]=wasmExports["Ta"];var _AVFrame_sample_aspect_ratio_num=Module["_AVFrame_sample_aspect_ratio_num"]=wasmExports["Ua"];var _AVFrame_sample_aspect_ratio_den=Module["_AVFrame_sample_aspect_ratio_den"]=wasmExports["Va"];var _AVFrame_sample_aspect_ratio_num_s=Module["_AVFrame_sample_aspect_ratio_num_s"]=wasmExports["Wa"];var _AVFrame_sample_aspect_ratio_den_s=Module["_AVFrame_sample_aspect_ratio_den_s"]=wasmExports["Xa"];var _AVFrame_sample_aspect_ratio_s=Module["_AVFrame_sample_aspect_ratio_s"]=wasmExports["Ya"];var _AVFrame_time_base_num=Module["_AVFrame_time_base_num"]=wasmExports["Za"];var _AVFrame_time_base_den=Module["_AVFrame_time_base_den"]=wasmExports["_a"];var _AVFrame_time_base_num_s=Module["_AVFrame_time_base_num_s"]=wasmExports["$a"];var _AVFrame_time_base_den_s=Module["_AVFrame_time_base_den_s"]=wasmExports["ab"];var _AVFrame_time_base_s=Module["_AVFrame_time_base_s"]=wasmExports["bb"];var _AVFrame_channel_layoutmask_s=Module["_AVFrame_channel_layoutmask_s"]=wasmExports["cb"];var _AVFrame_channel_layoutmask=Module["_AVFrame_channel_layoutmask"]=wasmExports["db"];var _AVFrame_channels=Module["_AVFrame_channels"]=wasmExports["eb"];var _AVFrame_channels_s=Module["_AVFrame_channels_s"]=wasmExports["fb"];var _AVFrame_ch_layout_nb_channels=Module["_AVFrame_ch_layout_nb_channels"]=wasmExports["gb"];var _AVFrame_ch_layout_nb_channels_s=Module["_AVFrame_ch_layout_nb_channels_s"]=wasmExports["hb"];var _AVFrame_channel_layout=Module["_AVFrame_channel_layout"]=wasmExports["ib"];var _AVFrame_channel_layouthi=Module["_AVFrame_channel_layouthi"]=wasmExports["jb"];var _AVFrame_channel_layout_s=Module["_AVFrame_channel_layout_s"]=wasmExports["kb"];var _AVFrame_channel_layouthi_s=Module["_AVFrame_channel_layouthi_s"]=wasmExports["lb"];var _ff_frame_rescale_ts_js=Module["_ff_frame_rescale_ts_js"]=wasmExports["mb"];var _AVPixFmtDescriptor_flags=Module["_AVPixFmtDescriptor_flags"]=wasmExports["nb"];var _AVPixFmtDescriptor_flags_s=Module["_AVPixFmtDescriptor_flags_s"]=wasmExports["ob"];var _AVPixFmtDescriptor_nb_components=Module["_AVPixFmtDescriptor_nb_components"]=wasmExports["pb"];var _AVPixFmtDescriptor_nb_components_s=Module["_AVPixFmtDescriptor_nb_components_s"]=wasmExports["qb"];var _AVPixFmtDescriptor_log2_chroma_h=Module["_AVPixFmtDescriptor_log2_chroma_h"]=wasmExports["rb"];var _AVPixFmtDescriptor_log2_chroma_h_s=Module["_AVPixFmtDescriptor_log2_chroma_h_s"]=wasmExports["sb"];var _AVPixFmtDescriptor_log2_chroma_w=Module["_AVPixFmtDescriptor_log2_chroma_w"]=wasmExports["tb"];var _AVPixFmtDescriptor_log2_chroma_w_s=Module["_AVPixFmtDescriptor_log2_chroma_w_s"]=wasmExports["ub"];var _AVPixFmtDescriptor_comp_depth=Module["_AVPixFmtDescriptor_comp_depth"]=wasmExports["vb"];var _av_opt_set_int_list_js=Module["_av_opt_set_int_list_js"]=wasmExports["wb"];var _AVCodec_name=Module["_AVCodec_name"]=wasmExports["xb"];var _AVCodec_sample_fmts=Module["_AVCodec_sample_fmts"]=wasmExports["yb"];var _AVCodec_sample_fmts_s=Module["_AVCodec_sample_fmts_s"]=wasmExports["zb"];var _AVCodec_sample_fmts_a=Module["_AVCodec_sample_fmts_a"]=wasmExports["Ab"];var _AVCodec_sample_fmts_a_s=Module["_AVCodec_sample_fmts_a_s"]=wasmExports["Bb"];var _AVCodec_supported_samplerates=Module["_AVCodec_supported_samplerates"]=wasmExports["Cb"];var _AVCodec_supported_samplerates_s=Module["_AVCodec_supported_samplerates_s"]=wasmExports["Db"];var _AVCodec_supported_samplerates_a=Module["_AVCodec_supported_samplerates_a"]=wasmExports["Eb"];var _AVCodec_supported_samplerates_a_s=Module["_AVCodec_supported_samplerates_a_s"]=wasmExports["Fb"];var _AVCodec_type=Module["_AVCodec_type"]=wasmExports["Gb"];var _AVCodec_type_s=Module["_AVCodec_type_s"]=wasmExports["Hb"];var _AVCodecContext_codec_id=Module["_AVCodecContext_codec_id"]=wasmExports["Ib"];var _AVCodecContext_codec_id_s=Module["_AVCodecContext_codec_id_s"]=wasmExports["Jb"];var _AVCodecContext_codec_type=Module["_AVCodecContext_codec_type"]=wasmExports["Kb"];var _AVCodecContext_codec_type_s=Module["_AVCodecContext_codec_type_s"]=wasmExports["Lb"];var _AVCodecContext_bit_rate=Module["_AVCodecContext_bit_rate"]=wasmExports["Mb"];var _AVCodecContext_bit_ratehi=Module["_AVCodecContext_bit_ratehi"]=wasmExports["Nb"];var _AVCodecContext_bit_rate_s=Module["_AVCodecContext_bit_rate_s"]=wasmExports["Ob"];var _AVCodecContext_bit_ratehi_s=Module["_AVCodecContext_bit_ratehi_s"]=wasmExports["Pb"];var _AVCodecContext_extradata=Module["_AVCodecContext_extradata"]=wasmExports["Qb"];var _AVCodecContext_extradata_s=Module["_AVCodecContext_extradata_s"]=wasmExports["Rb"];var _AVCodecContext_extradata_size=Module["_AVCodecContext_extradata_size"]=wasmExports["Sb"];var _AVCodecContext_extradata_size_s=Module["_AVCodecContext_extradata_size_s"]=wasmExports["Tb"];var _AVCodecContext_frame_size=Module["_AVCodecContext_frame_size"]=wasmExports["Ub"];var _AVCodecContext_frame_size_s=Module["_AVCodecContext_frame_size_s"]=wasmExports["Vb"];var _AVCodecContext_gop_size=Module["_AVCodecContext_gop_size"]=wasmExports["Wb"];var _AVCodecContext_gop_size_s=Module["_AVCodecContext_gop_size_s"]=wasmExports["Xb"];var _AVCodecContext_height=Module["_AVCodecContext_height"]=wasmExports["Yb"];var _AVCodecContext_height_s=Module["_AVCodecContext_height_s"]=wasmExports["Zb"];var _AVCodecContext_keyint_min=Module["_AVCodecContext_keyint_min"]=wasmExports["_b"];var _AVCodecContext_keyint_min_s=Module["_AVCodecContext_keyint_min_s"]=wasmExports["$b"];var _AVCodecContext_level=Module["_AVCodecContext_level"]=wasmExports["ac"];var _AVCodecContext_level_s=Module["_AVCodecContext_level_s"]=wasmExports["bc"];var _AVCodecContext_max_b_frames=Module["_AVCodecContext_max_b_frames"]=wasmExports["cc"];var _AVCodecContext_max_b_frames_s=Module["_AVCodecContext_max_b_frames_s"]=wasmExports["dc"];var _AVCodecContext_pix_fmt=Module["_AVCodecContext_pix_fmt"]=wasmExports["ec"];var _AVCodecContext_pix_fmt_s=Module["_AVCodecContext_pix_fmt_s"]=wasmExports["fc"];var _AVCodecContext_profile=Module["_AVCodecContext_profile"]=wasmExports["gc"];var _AVCodecContext_profile_s=Module["_AVCodecContext_profile_s"]=wasmExports["hc"];var _AVCodecContext_rc_max_rate=Module["_AVCodecContext_rc_max_rate"]=wasmExports["ic"];var _AVCodecContext_rc_max_ratehi=Module["_AVCodecContext_rc_max_ratehi"]=wasmExports["jc"];var _AVCodecContext_rc_max_rate_s=Module["_AVCodecContext_rc_max_rate_s"]=wasmExports["kc"];var _AVCodecContext_rc_max_ratehi_s=Module["_AVCodecContext_rc_max_ratehi_s"]=wasmExports["lc"];var _AVCodecContext_rc_min_rate=Module["_AVCodecContext_rc_min_rate"]=wasmExports["mc"];var _AVCodecContext_rc_min_ratehi=Module["_AVCodecContext_rc_min_ratehi"]=wasmExports["nc"];var _AVCodecContext_rc_min_rate_s=Module["_AVCodecContext_rc_min_rate_s"]=wasmExports["oc"];var _AVCodecContext_rc_min_ratehi_s=Module["_AVCodecContext_rc_min_ratehi_s"]=wasmExports["pc"];var _AVCodecContext_sample_fmt=Module["_AVCodecContext_sample_fmt"]=wasmExports["qc"];var _AVCodecContext_sample_fmt_s=Module["_AVCodecContext_sample_fmt_s"]=wasmExports["rc"];var _AVCodecContext_sample_rate=Module["_AVCodecContext_sample_rate"]=wasmExports["sc"];var _AVCodecContext_sample_rate_s=Module["_AVCodecContext_sample_rate_s"]=wasmExports["tc"];var _AVCodecContext_qmax=Module["_AVCodecContext_qmax"]=wasmExports["uc"];var _AVCodecContext_qmax_s=Module["_AVCodecContext_qmax_s"]=wasmExports["vc"];var _AVCodecContext_qmin=Module["_AVCodecContext_qmin"]=wasmExports["wc"];var _AVCodecContext_qmin_s=Module["_AVCodecContext_qmin_s"]=wasmExports["xc"];var _AVCodecContext_width=Module["_AVCodecContext_width"]=wasmExports["yc"];var _AVCodecContext_width_s=Module["_AVCodecContext_width_s"]=wasmExports["zc"];var _AVCodecContext_framerate_num=Module["_AVCodecContext_framerate_num"]=wasmExports["Ac"];var _AVCodecContext_framerate_den=Module["_AVCodecContext_framerate_den"]=wasmExports["Bc"];var _AVCodecContext_framerate_num_s=Module["_AVCodecContext_framerate_num_s"]=wasmExports["Cc"];var _AVCodecContext_framerate_den_s=Module["_AVCodecContext_framerate_den_s"]=wasmExports["Dc"];var _AVCodecContext_framerate_s=Module["_AVCodecContext_framerate_s"]=wasmExports["Ec"];var _AVCodecContext_sample_aspect_ratio_num=Module["_AVCodecContext_sample_aspect_ratio_num"]=wasmExports["Fc"];var _AVCodecContext_sample_aspect_ratio_den=Module["_AVCodecContext_sample_aspect_ratio_den"]=wasmExports["Gc"];var _AVCodecContext_sample_aspect_ratio_num_s=Module["_AVCodecContext_sample_aspect_ratio_num_s"]=wasmExports["Hc"];var _AVCodecContext_sample_aspect_ratio_den_s=Module["_AVCodecContext_sample_aspect_ratio_den_s"]=wasmExports["Ic"];var _AVCodecContext_sample_aspect_ratio_s=Module["_AVCodecContext_sample_aspect_ratio_s"]=wasmExports["Jc"];var _AVCodecContext_time_base_num=Module["_AVCodecContext_time_base_num"]=wasmExports["Kc"];var _AVCodecContext_time_base_den=Module["_AVCodecContext_time_base_den"]=wasmExports["Lc"];var _AVCodecContext_time_base_num_s=Module["_AVCodecContext_time_base_num_s"]=wasmExports["Mc"];var _AVCodecContext_time_base_den_s=Module["_AVCodecContext_time_base_den_s"]=wasmExports["Nc"];var _AVCodecContext_time_base_s=Module["_AVCodecContext_time_base_s"]=wasmExports["Oc"];var _AVCodecContext_channel_layoutmask_s=Module["_AVCodecContext_channel_layoutmask_s"]=wasmExports["Pc"];var _AVCodecContext_channel_layoutmask=Module["_AVCodecContext_channel_layoutmask"]=wasmExports["Qc"];var _AVCodecContext_channels=Module["_AVCodecContext_channels"]=wasmExports["Rc"];var _AVCodecContext_channels_s=Module["_AVCodecContext_channels_s"]=wasmExports["Sc"];var _AVCodecContext_ch_layout_nb_channels=Module["_AVCodecContext_ch_layout_nb_channels"]=wasmExports["Tc"];var _AVCodecContext_ch_layout_nb_channels_s=Module["_AVCodecContext_ch_layout_nb_channels_s"]=wasmExports["Uc"];var _AVCodecContext_channel_layout=Module["_AVCodecContext_channel_layout"]=wasmExports["Vc"];var _AVCodecContext_channel_layouthi=Module["_AVCodecContext_channel_layouthi"]=wasmExports["Wc"];var _AVCodecContext_channel_layout_s=Module["_AVCodecContext_channel_layout_s"]=wasmExports["Xc"];var _AVCodecContext_channel_layouthi_s=Module["_AVCodecContext_channel_layouthi_s"]=wasmExports["Yc"];var _AVCodecDescriptor_id=Module["_AVCodecDescriptor_id"]=wasmExports["Zc"];var _AVCodecDescriptor_id_s=Module["_AVCodecDescriptor_id_s"]=wasmExports["_c"];var _AVCodecDescriptor_long_name=Module["_AVCodecDescriptor_long_name"]=wasmExports["$c"];var _AVCodecDescriptor_long_name_s=Module["_AVCodecDescriptor_long_name_s"]=wasmExports["ad"];var _AVCodecDescriptor_mime_types_a=Module["_AVCodecDescriptor_mime_types_a"]=wasmExports["bd"];var _AVCodecDescriptor_mime_types_a_s=Module["_AVCodecDescriptor_mime_types_a_s"]=wasmExports["cd"];var _AVCodecDescriptor_name=Module["_AVCodecDescriptor_name"]=wasmExports["dd"];var _AVCodecDescriptor_name_s=Module["_AVCodecDescriptor_name_s"]=wasmExports["ed"];var _AVCodecDescriptor_props=Module["_AVCodecDescriptor_props"]=wasmExports["fd"];var _AVCodecDescriptor_props_s=Module["_AVCodecDescriptor_props_s"]=wasmExports["gd"];var _AVCodecDescriptor_type=Module["_AVCodecDescriptor_type"]=wasmExports["hd"];var _AVCodecDescriptor_type_s=Module["_AVCodecDescriptor_type_s"]=wasmExports["id"];var _AVCodecParameters_codec_id=Module["_AVCodecParameters_codec_id"]=wasmExports["jd"];var _AVCodecParameters_codec_id_s=Module["_AVCodecParameters_codec_id_s"]=wasmExports["kd"];var _AVCodecParameters_codec_tag=Module["_AVCodecParameters_codec_tag"]=wasmExports["ld"];var _AVCodecParameters_codec_tag_s=Module["_AVCodecParameters_codec_tag_s"]=wasmExports["md"];var _AVCodecParameters_codec_type=Module["_AVCodecParameters_codec_type"]=wasmExports["nd"];var _AVCodecParameters_codec_type_s=Module["_AVCodecParameters_codec_type_s"]=wasmExports["od"];var _AVCodecParameters_extradata=Module["_AVCodecParameters_extradata"]=wasmExports["pd"];var _AVCodecParameters_extradata_s=Module["_AVCodecParameters_extradata_s"]=wasmExports["qd"];var _AVCodecParameters_extradata_size=Module["_AVCodecParameters_extradata_size"]=wasmExports["rd"];var _AVCodecParameters_extradata_size_s=Module["_AVCodecParameters_extradata_size_s"]=wasmExports["sd"];var _AVCodecParameters_format=Module["_AVCodecParameters_format"]=wasmExports["td"];var _AVCodecParameters_format_s=Module["_AVCodecParameters_format_s"]=wasmExports["ud"];var _AVCodecParameters_bit_rate=Module["_AVCodecParameters_bit_rate"]=wasmExports["vd"];var _AVCodecParameters_bit_rate_s=Module["_AVCodecParameters_bit_rate_s"]=wasmExports["wd"];var _AVCodecParameters_profile=Module["_AVCodecParameters_profile"]=wasmExports["xd"];var _AVCodecParameters_profile_s=Module["_AVCodecParameters_profile_s"]=wasmExports["yd"];var _AVCodecParameters_level=Module["_AVCodecParameters_level"]=wasmExports["zd"];var _AVCodecParameters_level_s=Module["_AVCodecParameters_level_s"]=wasmExports["Ad"];var _AVCodecParameters_width=Module["_AVCodecParameters_width"]=wasmExports["Bd"];var _AVCodecParameters_width_s=Module["_AVCodecParameters_width_s"]=wasmExports["Cd"];var _AVCodecParameters_height=Module["_AVCodecParameters_height"]=wasmExports["Dd"];var _AVCodecParameters_height_s=Module["_AVCodecParameters_height_s"]=wasmExports["Ed"];var _AVCodecParameters_color_range=Module["_AVCodecParameters_color_range"]=wasmExports["Fd"];var _AVCodecParameters_color_range_s=Module["_AVCodecParameters_color_range_s"]=wasmExports["Gd"];var _AVCodecParameters_color_primaries=Module["_AVCodecParameters_color_primaries"]=wasmExports["Hd"];var _AVCodecParameters_color_primaries_s=Module["_AVCodecParameters_color_primaries_s"]=wasmExports["Id"];var _AVCodecParameters_color_trc=Module["_AVCodecParameters_color_trc"]=wasmExports["Jd"];var _AVCodecParameters_color_trc_s=Module["_AVCodecParameters_color_trc_s"]=wasmExports["Kd"];var _AVCodecParameters_color_space=Module["_AVCodecParameters_color_space"]=wasmExports["Ld"];var _AVCodecParameters_color_space_s=Module["_AVCodecParameters_color_space_s"]=wasmExports["Md"];var _AVCodecParameters_chroma_location=Module["_AVCodecParameters_chroma_location"]=wasmExports["Nd"];var _AVCodecParameters_chroma_location_s=Module["_AVCodecParameters_chroma_location_s"]=wasmExports["Od"];var _AVCodecParameters_sample_rate=Module["_AVCodecParameters_sample_rate"]=wasmExports["Pd"];var _AVCodecParameters_sample_rate_s=Module["_AVCodecParameters_sample_rate_s"]=wasmExports["Qd"];var _AVCodecParameters_framerate_num=Module["_AVCodecParameters_framerate_num"]=wasmExports["Rd"];var _AVCodecParameters_framerate_den=Module["_AVCodecParameters_framerate_den"]=wasmExports["Sd"];var _AVCodecParameters_framerate_num_s=Module["_AVCodecParameters_framerate_num_s"]=wasmExports["Td"];var _AVCodecParameters_framerate_den_s=Module["_AVCodecParameters_framerate_den_s"]=wasmExports["Ud"];var _AVCodecParameters_framerate_s=Module["_AVCodecParameters_framerate_s"]=wasmExports["Vd"];var _AVCodecParameters_channel_layoutmask_s=Module["_AVCodecParameters_channel_layoutmask_s"]=wasmExports["Wd"];var _AVCodecParameters_channel_layoutmask=Module["_AVCodecParameters_channel_layoutmask"]=wasmExports["Xd"];var _AVCodecParameters_channels=Module["_AVCodecParameters_channels"]=wasmExports["Yd"];var _AVCodecParameters_channels_s=Module["_AVCodecParameters_channels_s"]=wasmExports["Zd"];var _AVCodecParameters_ch_layout_nb_channels=Module["_AVCodecParameters_ch_layout_nb_channels"]=wasmExports["_d"];var _AVCodecParameters_ch_layout_nb_channels_s=Module["_AVCodecParameters_ch_layout_nb_channels_s"]=wasmExports["$d"];var _AVPacket_data=Module["_AVPacket_data"]=wasmExports["ae"];var _AVPacket_data_s=Module["_AVPacket_data_s"]=wasmExports["be"];var _AVPacket_dts=Module["_AVPacket_dts"]=wasmExports["ce"];var _AVPacket_dtshi=Module["_AVPacket_dtshi"]=wasmExports["de"];var _AVPacket_dts_s=Module["_AVPacket_dts_s"]=wasmExports["ee"];var _AVPacket_dtshi_s=Module["_AVPacket_dtshi_s"]=wasmExports["fe"];var _AVPacket_duration=Module["_AVPacket_duration"]=wasmExports["ge"];var _AVPacket_durationhi=Module["_AVPacket_durationhi"]=wasmExports["he"];var _AVPacket_duration_s=Module["_AVPacket_duration_s"]=wasmExports["ie"];var _AVPacket_durationhi_s=Module["_AVPacket_durationhi_s"]=wasmExports["je"];var _AVPacket_flags=Module["_AVPacket_flags"]=wasmExports["ke"];var _AVPacket_flags_s=Module["_AVPacket_flags_s"]=wasmExports["le"];var _AVPacket_pos=Module["_AVPacket_pos"]=wasmExports["me"];var _AVPacket_poshi=Module["_AVPacket_poshi"]=wasmExports["ne"];var _AVPacket_pos_s=Module["_AVPacket_pos_s"]=wasmExports["oe"];var _AVPacket_poshi_s=Module["_AVPacket_poshi_s"]=wasmExports["pe"];var _AVPacket_pts=Module["_AVPacket_pts"]=wasmExports["qe"];var _AVPacket_ptshi=Module["_AVPacket_ptshi"]=wasmExports["re"];var _AVPacket_pts_s=Module["_AVPacket_pts_s"]=wasmExports["se"];var _AVPacket_ptshi_s=Module["_AVPacket_ptshi_s"]=wasmExports["te"];var _AVPacket_side_data=Module["_AVPacket_side_data"]=wasmExports["ue"];var _AVPacket_side_data_s=Module["_AVPacket_side_data_s"]=wasmExports["ve"];var _AVPacket_side_data_elems=Module["_AVPacket_side_data_elems"]=wasmExports["we"];var _AVPacket_side_data_elems_s=Module["_AVPacket_side_data_elems_s"]=wasmExports["xe"];var _AVPacket_size=Module["_AVPacket_size"]=wasmExports["ye"];var _AVPacket_size_s=Module["_AVPacket_size_s"]=wasmExports["ze"];var _AVPacket_stream_index=Module["_AVPacket_stream_index"]=wasmExports["Ae"];var _AVPacket_stream_index_s=Module["_AVPacket_stream_index_s"]=wasmExports["Be"];var _AVPacket_time_base_num=Module["_AVPacket_time_base_num"]=wasmExports["Ce"];var _AVPacket_time_base_den=Module["_AVPacket_time_base_den"]=wasmExports["De"];var _AVPacket_time_base_num_s=Module["_AVPacket_time_base_num_s"]=wasmExports["Ee"];var _AVPacket_time_base_den_s=Module["_AVPacket_time_base_den_s"]=wasmExports["Fe"];var _AVPacket_time_base_s=Module["_AVPacket_time_base_s"]=wasmExports["Ge"];var _AVPacketSideData_data=Module["_AVPacketSideData_data"]=wasmExports["He"];var _AVPacketSideData_size=Module["_AVPacketSideData_size"]=wasmExports["Ie"];var _AVPacketSideData_type=Module["_AVPacketSideData_type"]=wasmExports["Je"];var _avcodec_open2_js=Module["_avcodec_open2_js"]=wasmExports["Ke"];var _avcodec_open2=Module["_avcodec_open2"]=wasmExports["Le"];var _av_packet_rescale_ts_js=Module["_av_packet_rescale_ts_js"]=wasmExports["Me"];var _AVFormatContext_duration=Module["_AVFormatContext_duration"]=wasmExports["Ne"];var _AVFormatContext_durationhi=Module["_AVFormatContext_durationhi"]=wasmExports["Oe"];var _AVFormatContext_duration_s=Module["_AVFormatContext_duration_s"]=wasmExports["Pe"];var _AVFormatContext_durationhi_s=Module["_AVFormatContext_durationhi_s"]=wasmExports["Qe"];var _AVFormatContext_flags=Module["_AVFormatContext_flags"]=wasmExports["Re"];var _AVFormatContext_flags_s=Module["_AVFormatContext_flags_s"]=wasmExports["Se"];var _AVFormatContext_nb_streams=Module["_AVFormatContext_nb_streams"]=wasmExports["Te"];var _AVFormatContext_nb_streams_s=Module["_AVFormatContext_nb_streams_s"]=wasmExports["Ue"];var _AVFormatContext_oformat=Module["_AVFormatContext_oformat"]=wasmExports["Ve"];var _AVFormatContext_oformat_s=Module["_AVFormatContext_oformat_s"]=wasmExports["We"];var _AVFormatContext_pb=Module["_AVFormatContext_pb"]=wasmExports["Xe"];var _AVFormatContext_pb_s=Module["_AVFormatContext_pb_s"]=wasmExports["Ye"];var _AVFormatContext_start_time=Module["_AVFormatContext_start_time"]=wasmExports["Ze"];var _AVFormatContext_start_timehi=Module["_AVFormatContext_start_timehi"]=wasmExports["_e"];var _AVFormatContext_start_time_s=Module["_AVFormatContext_start_time_s"]=wasmExports["$e"];var _AVFormatContext_start_timehi_s=Module["_AVFormatContext_start_timehi_s"]=wasmExports["af"];var _AVFormatContext_streams_a=Module["_AVFormatContext_streams_a"]=wasmExports["bf"];var _AVFormatContext_streams_a_s=Module["_AVFormatContext_streams_a_s"]=wasmExports["cf"];var _AVStream_codecpar=Module["_AVStream_codecpar"]=wasmExports["df"];var _AVStream_codecpar_s=Module["_AVStream_codecpar_s"]=wasmExports["ef"];var _AVStream_discard=Module["_AVStream_discard"]=wasmExports["ff"];var _AVStream_discard_s=Module["_AVStream_discard_s"]=wasmExports["gf"];var _AVStream_duration=Module["_AVStream_duration"]=wasmExports["hf"];var _AVStream_durationhi=Module["_AVStream_durationhi"]=wasmExports["jf"];var _AVStream_duration_s=Module["_AVStream_duration_s"]=wasmExports["kf"];var _AVStream_durationhi_s=Module["_AVStream_durationhi_s"]=wasmExports["lf"];var _AVStream_time_base_num=Module["_AVStream_time_base_num"]=wasmExports["mf"];var _AVStream_time_base_den=Module["_AVStream_time_base_den"]=wasmExports["nf"];var _AVStream_time_base_num_s=Module["_AVStream_time_base_num_s"]=wasmExports["of"];var _AVStream_time_base_den_s=Module["_AVStream_time_base_den_s"]=wasmExports["pf"];var _AVStream_time_base_s=Module["_AVStream_time_base_s"]=wasmExports["qf"];var _avformat_seek_file_min=Module["_avformat_seek_file_min"]=wasmExports["rf"];var _avformat_seek_file=Module["_avformat_seek_file"]=wasmExports["sf"];var _avformat_seek_file_max=Module["_avformat_seek_file_max"]=wasmExports["tf"];var _avformat_seek_file_approx=Module["_avformat_seek_file_approx"]=wasmExports["uf"];var _AVFilterInOut_filter_ctx=Module["_AVFilterInOut_filter_ctx"]=wasmExports["vf"];var _AVFilterInOut_filter_ctx_s=Module["_AVFilterInOut_filter_ctx_s"]=wasmExports["wf"];var _AVFilterInOut_name=Module["_AVFilterInOut_name"]=wasmExports["xf"];var _AVFilterInOut_name_s=Module["_AVFilterInOut_name_s"]=wasmExports["yf"];var _AVFilterInOut_next=Module["_AVFilterInOut_next"]=wasmExports["zf"];var _AVFilterInOut_next_s=Module["_AVFilterInOut_next_s"]=wasmExports["Af"];var _AVFilterInOut_pad_idx=Module["_AVFilterInOut_pad_idx"]=wasmExports["Bf"];var _AVFilterInOut_pad_idx_s=Module["_AVFilterInOut_pad_idx_s"]=wasmExports["Cf"];var _av_buffersink_get_time_base_num=Module["_av_buffersink_get_time_base_num"]=wasmExports["Df"];var _av_buffersink_get_time_base_den=Module["_av_buffersink_get_time_base_den"]=wasmExports["Ef"];var _ff_buffersink_set_ch_layout=Module["_ff_buffersink_set_ch_layout"]=wasmExports["Ff"];var _av_opt_set=Module["_av_opt_set"]=wasmExports["Gf"];var _libavjs_with_swscale=Module["_libavjs_with_swscale"]=wasmExports["Hf"];var _libavjs_create_main_thread=Module["_libavjs_create_main_thread"]=wasmExports["If"];var _avformat_alloc_output_context2_js=Module["_avformat_alloc_output_context2_js"]=wasmExports["Jf"];var _avformat_open_input_js=Module["_avformat_open_input_js"]=wasmExports["Kf"];var _avformat_open_input=Module["_avformat_open_input"]=wasmExports["Lf"];var _avio_open2_js=Module["_avio_open2_js"]=wasmExports["Mf"];var _avfilter_graph_create_filter_js=Module["_avfilter_graph_create_filter_js"]=wasmExports["Nf"];var _av_dict_copy_js=Module["_av_dict_copy_js"]=wasmExports["Of"];var _av_dict_set_js=Module["_av_dict_set_js"]=wasmExports["Pf"];var _av_compare_ts_js=Module["_av_compare_ts_js"]=wasmExports["Qf"];var _ff_error=Module["_ff_error"]=wasmExports["Rf"];var _mallinfo_uordblks=Module["_mallinfo_uordblks"]=wasmExports["Sf"];var _av_dict_free=Module["_av_dict_free"]=wasmExports["Tf"];var _av_log_set_level=Module["_av_log_set_level"]=wasmExports["Uf"];var _av_strdup=Module["_av_strdup"]=wasmExports["Vf"];var _avcodec_free_context=Module["_avcodec_free_context"]=wasmExports["Xf"];var _av_frame_free=Module["_av_frame_free"]=wasmExports["Yf"];var _av_packet_free=Module["_av_packet_free"]=wasmExports["Zf"];var _av_frame_alloc=Module["_av_frame_alloc"]=wasmExports["_f"];var _av_packet_alloc=Module["_av_packet_alloc"]=wasmExports["$f"];var _avcodec_alloc_context3=Module["_avcodec_alloc_context3"]=wasmExports["ag"];var _avcodec_parameters_to_context=Module["_avcodec_parameters_to_context"]=wasmExports["bg"];var _avcodec_find_decoder_by_name=Module["_avcodec_find_decoder_by_name"]=wasmExports["cg"];var _avcodec_find_decoder=Module["_avcodec_find_decoder"]=wasmExports["dg"];var _avcodec_descriptor_get=Module["_avcodec_descriptor_get"]=wasmExports["eg"];var _av_frame_unref=Module["_av_frame_unref"]=wasmExports["fg"];var _avcodec_send_packet=Module["_avcodec_send_packet"]=wasmExports["gg"];var _avcodec_receive_frame=Module["_avcodec_receive_frame"]=wasmExports["hg"];var _av_frame_ref=Module["_av_frame_ref"]=wasmExports["ig"];var _av_packet_unref=Module["_av_packet_unref"]=wasmExports["jg"];var _avcodec_flush_buffers=Module["_avcodec_flush_buffers"]=wasmExports["kg"];var _av_pix_fmt_desc_get=Module["_av_pix_fmt_desc_get"]=wasmExports["lg"];var _avformat_close_input=Module["_avformat_close_input"]=wasmExports["mg"];var _avcodec_parameters_free=Module["_avcodec_parameters_free"]=wasmExports["ng"];var _avcodec_get_name=Module["_avcodec_get_name"]=wasmExports["og"];var _av_find_input_format=Module["_av_find_input_format"]=wasmExports["pg"];var _avformat_alloc_context=Module["_avformat_alloc_context"]=wasmExports["qg"];var _avformat_free_context=Module["_avformat_free_context"]=wasmExports["rg"];var _avformat_find_stream_info=Module["_avformat_find_stream_info"]=wasmExports["sg"];var _avio_close=Module["_avio_close"]=wasmExports["tg"];var _avcodec_parameters_alloc=Module["_avcodec_parameters_alloc"]=wasmExports["ug"];var _avcodec_parameters_copy=Module["_avcodec_parameters_copy"]=wasmExports["vg"];var _av_read_frame=Module["_av_read_frame"]=wasmExports["wg"];var _av_get_bytes_per_sample=Module["_av_get_bytes_per_sample"]=wasmExports["xg"];var _avcodec_parameters_from_context=Module["_avcodec_parameters_from_context"]=wasmExports["yg"];var _avio_flush=Module["_avio_flush"]=wasmExports["zg"];var _av_shrink_packet=Module["_av_shrink_packet"]=wasmExports["Ag"];var _avcodec_send_frame=Module["_avcodec_send_frame"]=wasmExports["Bg"];var _avcodec_receive_packet=Module["_avcodec_receive_packet"]=wasmExports["Cg"];var _avfilter_graph_alloc=Module["_avfilter_graph_alloc"]=wasmExports["Dg"];var _avfilter_inout_free=Module["_avfilter_inout_free"]=wasmExports["Eg"];var _avfilter_graph_free=Module["_avfilter_graph_free"]=wasmExports["Fg"];var _av_get_sample_fmt_name=Module["_av_get_sample_fmt_name"]=wasmExports["Gg"];var _av_buffersrc_add_frame_flags=Module["_av_buffersrc_add_frame_flags"]=wasmExports["Hg"];var _avfilter_get_by_name=Module["_avfilter_get_by_name"]=wasmExports["Ig"];var _avfilter_link=Module["_avfilter_link"]=wasmExports["Jg"];var _avfilter_graph_config=Module["_avfilter_graph_config"]=wasmExports["Kg"];var _av_frame_get_buffer=Module["_av_frame_get_buffer"]=wasmExports["Lg"];var _avcodec_find_encoder=Module["_avcodec_find_encoder"]=wasmExports["Mg"];var _avformat_new_stream=Module["_avformat_new_stream"]=wasmExports["Ng"];var _strerror=Module["_strerror"]=wasmExports["Og"];var _avformat_write_header=Module["_avformat_write_header"]=wasmExports["Pg"];var _av_write_trailer=Module["_av_write_trailer"]=wasmExports["Qg"];var _av_interleaved_write_frame=Module["_av_interleaved_write_frame"]=wasmExports["Rg"];var _ffmpeg_main=Module["_ffmpeg_main"]=wasmExports["Sg"];var _av_log_get_level=Module["_av_log_get_level"]=wasmExports["Tg"];var _avcodec_find_encoder_by_name=Module["_avcodec_find_encoder_by_name"]=wasmExports["Ug"];var _avcodec_descriptor_get_by_name=Module["_avcodec_descriptor_get_by_name"]=wasmExports["Vg"];var _av_packet_ref=Module["_av_packet_ref"]=wasmExports["Wg"];var _ffprobe_main=Module["_ffprobe_main"]=wasmExports["Xg"];var _avcodec_descriptor_next=Module["_avcodec_descriptor_next"]=wasmExports["Yg"];var _av_frame_clone=Module["_av_frame_clone"]=wasmExports["Zg"];var _av_frame_make_writable=Module["_av_frame_make_writable"]=wasmExports["_g"];var _free=Module["_free"]=wasmExports["$g"];var _open=Module["_open"]=wasmExports["ah"];var _av_find_best_stream=Module["_av_find_best_stream"]=wasmExports["bh"];var _av_packet_new_side_data=Module["_av_packet_new_side_data"]=wasmExports["ch"];var _av_packet_clone=Module["_av_packet_clone"]=wasmExports["dh"];var _av_write_frame=Module["_av_write_frame"]=wasmExports["eh"];var _av_grow_packet=Module["_av_grow_packet"]=wasmExports["fh"];var _av_packet_make_writable=Module["_av_packet_make_writable"]=wasmExports["gh"];var _close=Module["_close"]=wasmExports["hh"];var _av_seek_frame=Module["_av_seek_frame"]=wasmExports["ih"];var _avformat_flush=Module["_avformat_flush"]=wasmExports["jh"];var _avcodec_close=Module["_avcodec_close"]=wasmExports["kh"];var _avfilter_free=Module["_avfilter_free"]=wasmExports["lh"];var _av_buffersink_get_frame=Module["_av_buffersink_get_frame"]=wasmExports["mh"];var _av_buffersink_set_frame_size=Module["_av_buffersink_set_frame_size"]=wasmExports["nh"];var _avfilter_inout_alloc=Module["_avfilter_inout_alloc"]=wasmExports["oh"];var _avfilter_graph_parse=Module["_avfilter_graph_parse"]=wasmExports["ph"];var _sws_freeContext=Module["_sws_freeContext"]=wasmExports["qh"];var _sws_scale_frame=Module["_sws_scale_frame"]=wasmExports["rh"];var _sws_getContext=Module["_sws_getContext"]=wasmExports["sh"];var _malloc=Module["_malloc"]=wasmExports["th"];var _calloc=Module["_calloc"]=wasmExports["uh"];var _emfiberthreads_timeout_expiry=Module["_emfiberthreads_timeout_expiry"]=wasmExports["vh"];var _dup2=Module["_dup2"]=wasmExports["wh"];var _setThrew=wasmExports["xh"];var _emscripten_stack_set_limits=wasmExports["yh"];var __emscripten_stack_restore=wasmExports["zh"];var __emscripten_stack_alloc=wasmExports["Ah"];var _emscripten_stack_get_current=wasmExports["Bh"];var dynCall_iiii=Module["dynCall_iiii"]=wasmExports["Ch"];var dynCall_ii=Module["dynCall_ii"]=wasmExports["Dh"];var dynCall_iii=Module["dynCall_iii"]=wasmExports["Eh"];var dynCall_vii=Module["dynCall_vii"]=wasmExports["Fh"];var dynCall_vi=Module["dynCall_vi"]=wasmExports["Gh"];var dynCall_viii=Module["dynCall_viii"]=wasmExports["Hh"];var dynCall_iiiii=Module["dynCall_iiiii"]=wasmExports["Ih"];var dynCall_i=Module["dynCall_i"]=wasmExports["Jh"];var dynCall_viiii=Module["dynCall_viiii"]=wasmExports["Kh"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=wasmExports["Lh"];var dynCall_iiiiii=Module["dynCall_iiiiii"]=wasmExports["Mh"];var dynCall_viiiii=Module["dynCall_viiiii"]=wasmExports["Nh"];var dynCall_viiiiiiiii=Module["dynCall_viiiiiiiii"]=wasmExports["Oh"];var dynCall_viiiiiiii=Module["dynCall_viiiiiiii"]=wasmExports["Ph"];var dynCall_viiiiiii=Module["dynCall_viiiiiii"]=wasmExports["Qh"];var dynCall_viiiiiiiiiii=Module["dynCall_viiiiiiiiiii"]=wasmExports["Rh"];var dynCall_iiiiiiiii=Module["dynCall_iiiiiiiii"]=wasmExports["Sh"];var dynCall_jij=Module["dynCall_jij"]=wasmExports["Th"];var dynCall_iiiijj=Module["dynCall_iiiijj"]=wasmExports["Uh"];var dynCall_iiiiiiiiiii=Module["dynCall_iiiiiiiiiii"]=wasmExports["Vh"];var dynCall_viiid=Module["dynCall_viiid"]=wasmExports["Wh"];var dynCall_iiiiiiiiii=Module["dynCall_iiiiiiiiii"]=wasmExports["Xh"];var dynCall_iiiiiiiiiiii=Module["dynCall_iiiiiiiiiiii"]=wasmExports["Yh"];var _asyncify_start_unwind=wasmExports["Zh"];var _asyncify_stop_unwind=wasmExports["_h"];var _asyncify_start_rewind=wasmExports["$h"];var _asyncify_stop_rewind=wasmExports["ai"];var _ff_h264_cabac_tables=Module["_ff_h264_cabac_tables"]=689196;function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return dynCall_iiiii(index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{dynCall_vii(index,a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return dynCall_iii(index,a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{dynCall_viiii(index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiijj(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return dynCall_iiiijj(index,a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{return dynCall_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{dynCall_viii(index,a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return dynCall_ii(index,a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{dynCall_vi(index,a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiid(index,a1,a2,a3,a4){var sp=stackSave();try{dynCall_viiid(index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return dynCall_iiiiii(index,a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return dynCall_iiii(index,a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return dynCall_i(index)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return dynCall_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_jij(index,a1,a2){var sp=stackSave();try{return dynCall_jij(index,a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0);return 0n}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{dynCall_viiiii(index,a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{dynCall_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{dynCall_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{dynCall_viiiiii(index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{dynCall_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{return dynCall_iiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{return dynCall_iiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{dynCall_viiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}Module["ccall"]=ccall;Module["cwrap"]=cwrap;function run(){if(runDependencies>0){dependenciesFulfilled=run;return}preRun();if(runDependencies>0){dependenciesFulfilled=run;return}function doRun(){Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);Module["onRuntimeInitialized"]?.();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run();var serializationPromise=null;function serially(f){var p;if(serializationPromise){p=serializationPromise.catch(function(){}).then(function(){return f()})}else{p=f()}serializationPromise=p=p.finally(function(){if(serializationPromise===p)serializationPromise=null});return p}Module.fsThrownError=null;var ERRNO_CODES={EPERM:1,EIO:5,EAGAIN:6,ECANCELED:11,ESPIPE:29};var readerCallbacks={open:function(stream){if(stream.flags&3){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}},close:function(){},read:function(stream,buffer,offset,length,position){var data=Module.readBuffers[stream.node.name];if(!data||data.buf.length===0&&!data.eof){if(Module.onread){try{var rr=Module.onread(stream.node.name,position,length);if(rr&&rr.then&&rr.catch){rr.catch(function(ex){ff_reader_dev_send(stream.node.name,null,{error:ex})})}}catch(ex){ff_reader_dev_send(stream.node.name,null,{error:ex})}}data=Module.readBuffers[stream.node.name]}if(!data)throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);if(data.error){Module.fsThrownError=data.error;throw new FS.ErrnoError(ERRNO_CODES.ECANCELED)}if(data.errorCode)throw new FS.ErrnoError(data.errorCode);if(data.buf.length===0){if(data.eof){return 0}else{data.ready=false;throw new FS.ErrnoError(ERRNO_CODES.EAGAIN)}}var ret;if(length=bufMax){if(position>=stream.node.ff_block_reader_dev_size)return 0;if(!Module.onblockread)throw new FS.ErrnoError(ERRNO_CODES.EIO);try{var brr=Module.onblockread(stream.node.name,position,length);if(brr&&brr.then&&brr.catch){brr.catch(function(ex){ff_block_reader_dev_send(stream.node.name,position,null,{error:ex})})}}catch(ex){Module.fsThrownError=ex;throw new FS.ErrnoError(ERRNO_CODES.ECANCELED)}bufMin=data.position;bufMax=data.position+data.buf.length;if(position=bufMax){data.ready=false;throw new FS.ErrnoError(ERRNO_CODES.EAGAIN)}}var bufPos=position-bufMin;var ret;if(bufPos+lengthdata.length)av_shrink_packet(pkt,data.length)}var ptr=AVPacket_data(pkt);Module.HEAPU8.set(data,ptr)};var ff_init_muxer=Module.ff_init_muxer=function(opts,streamCtxs){var oformat=opts.oformat?opts.oformat:0;var format_name=opts.format_name?opts.format_name:null;var filename=opts.filename?opts.filename:null;var oc=avformat_alloc_output_context2_js(oformat,format_name,filename);if(oc===0)throw new Error("Failed to allocate output context");var fmt=AVFormatContext_oformat(oc);var sts=[];streamCtxs.forEach(function(ctx){var st=avformat_new_stream(oc,0);if(st===0)throw new Error("Could not allocate stream");sts.push(st);var codecpar=AVStream_codecpar(st);var ret;if(opts.codecpars){ret=avcodec_parameters_copy(codecpar,ctx[0]);AVCodecParameters_codec_tag_s(codecpar,0)}else{ret=avcodec_parameters_from_context(codecpar,ctx[0])}if(ret<0)throw new Error("Could not copy the stream parameters: "+ff_error(ret));AVStream_time_base_s(st,ctx[1],ctx[2])});if(opts.device)FS.mkdev(opts.filename,511,writerDev);var pb=null;if(opts.open){pb=avio_open2_js(opts.filename,2,0,0);if(pb===0)throw new Error("Could not open file");AVFormatContext_pb_s(oc,pb)}return[oc,fmt,pb,sts]};var ff_free_muxer=Module.ff_free_muxer=function(oc,pb){avformat_free_context(oc);if(pb)avio_close(pb)};function ff_init_demuxer_file(filename,fmt){var fmt_ctx;return avformat_open_input_js(filename,fmt?fmt:null,null).then(function(ret){fmt_ctx=ret;if(fmt_ctx===0)throw new Error("Could not open source file");return avformat_find_stream_info(fmt_ctx,0)}).then(function(){var nb_streams=AVFormatContext_nb_streams(fmt_ctx);var streams=[];for(var i=0;i=opts.limit)return[-6,outPackets];return Promise.all([]).then(step)})}return step()}Module.ff_read_frame_multi=function(){var args=arguments;return serially(function(){return ff_read_frame_multi.apply(void 0,args)})};Module.ff_read_multi=function(fmt_ctx,pkt,devfile,opts){console.log("[libav.js] ff_read_multi is deprecated. Use ff_read_frame_multi.");return Module.ff_read_frame_multi(fmt_ctx,pkt,opts)};var ff_init_filter_graph=Module.ff_init_filter_graph=function(filters_descr,input,output){var buffersrc,abuffersrc,buffersink,abuffersink,filter_graph,tmp_src_ctx,tmp_sink_ctx,src_ctxs,sink_ctxs,io_outputs,io_inputs,int32s;var instr,outstr;var multiple_inputs=!!input.length;if(!multiple_inputs)input=[input];var multiple_outputs=!!output.length;if(!multiple_outputs)output=[output];src_ctxs=[];sink_ctxs=[];try{buffersrc=avfilter_get_by_name("buffer");abuffersrc=avfilter_get_by_name("abuffer");buffersink=avfilter_get_by_name("buffersink");abuffersink=avfilter_get_by_name("abuffersink");filter_graph=avfilter_graph_alloc();if(filter_graph===0)throw new Error("Failed to allocate filter graph");io_outputs=0;var ii=0;input.forEach(function(input){var next_io_outputs=avfilter_inout_alloc();if(next_io_outputs===0)throw new Error("Failed to allocate outputs");AVFilterInOut_next_s(next_io_outputs,io_outputs);io_outputs=next_io_outputs;var nm="in"+(multiple_inputs?ii:"");if(input.type===0){if(buffersrc===0)throw new Error("Failed to load buffer filter");var frame_rate=input.frame_rate;var time_base=input.time_base;if(typeof frame_rate==="undefined")frame_rate=30;if(typeof time_base==="undefined")time_base=[1,frame_rate];tmp_src_ctx=avfilter_graph_create_filter_js(buffersrc,nm,"time_base="+time_base[0]+"/"+time_base[1]+":frame_rate="+frame_rate+":pix_fmt="+(input.pix_fmt?input.pix_fmt:0)+":width="+(input.width?input.width:640)+":height="+(input.height?input.height:360),null,filter_graph)}else{if(abuffersrc===0)throw new Error("Failed to load abuffer filter");var sample_rate=input.sample_rate;var time_base=input.time_base;if(typeof sample_rate==="undefined")sample_rate=48e3;if(typeof time_base==="undefined")time_base=[1,sample_rate];tmp_src_ctx=avfilter_graph_create_filter_js(abuffersrc,nm,"time_base="+time_base[0]+"/"+time_base[1]+":sample_rate="+sample_rate+":sample_fmt="+(input.sample_fmt?input.sample_fmt:3)+":channel_layout=0x"+(input.channel_layout?input.channel_layout:4).toString(16),null,filter_graph)}if(tmp_src_ctx===0)throw new Error("Cannot create buffer source");src_ctxs.push(tmp_src_ctx);instr=av_strdup(nm);if(instr===0)throw new Error("Failed to allocate output");AVFilterInOut_name_s(io_outputs,instr);instr=0;AVFilterInOut_filter_ctx_s(io_outputs,tmp_src_ctx);tmp_src_ctx=0;AVFilterInOut_pad_idx_s(io_outputs,0);ii++});io_inputs=0;var oi=0;output.forEach(function(output){var next_io_inputs=avfilter_inout_alloc();if(next_io_inputs===0)throw new Error("Failed to allocate inputs");AVFilterInOut_next_s(next_io_inputs,io_inputs);io_inputs=next_io_inputs;var nm="out"+(multiple_outputs?oi:"");if(output.type===0){if(buffersink===0)throw new Error("Failed to load buffersink filter");tmp_sink_ctx=avfilter_graph_create_filter_js(buffersink,nm,null,null,filter_graph)}else{tmp_sink_ctx=avfilter_graph_create_filter_js(abuffersink,nm,null,null,filter_graph)}if(tmp_sink_ctx===0)throw new Error("Cannot create buffer sink");sink_ctxs.push(tmp_sink_ctx);if(output.type===0){int32s=ff_malloc_int32_list([output.pix_fmt?output.pix_fmt:0,-1]);if(int32s===0)throw new Error("Failed to transfer parameters");if(av_opt_set_int_list_js(tmp_sink_ctx,"pix_fmts",4,int32s,-1,1)<0){throw new Error("Failed to set filter parameters")}free(int32s);int32s=0}else{int32s=ff_malloc_int32_list([output.sample_fmt?output.sample_fmt:3,-1,output.sample_rate?output.sample_rate:48e3,-1]);if(int32s===0)throw new Error("Failed to transfer parameters");var ch_layout=output.channel_layout?output.channel_layout:4;var ch_layout_i64=[~~ch_layout,Math.floor(ch_layout/4294967296)];if(av_opt_set_int_list_js(tmp_sink_ctx,"sample_fmts",4,int32s,-1,1)<0||ff_buffersink_set_ch_layout(tmp_sink_ctx,ch_layout_i64[0],ch_layout_i64[1])<0||av_opt_set_int_list_js(tmp_sink_ctx,"sample_rates",4,int32s+8,-1,1)<0){throw new Error("Failed to set filter parameters")}free(int32s);int32s=0}outstr=av_strdup(nm);if(outstr===0)throw new Error("Failed to transfer parameters");AVFilterInOut_name_s(io_inputs,outstr);outstr=0;AVFilterInOut_filter_ctx_s(io_inputs,tmp_sink_ctx);tmp_sink_ctx=0;AVFilterInOut_pad_idx_s(io_inputs,0);oi++});var ret=avfilter_graph_parse(filter_graph,filters_descr,io_inputs,io_outputs,0);if(ret<0)throw new Error("Failed to initialize filters: "+ff_error(ret));io_inputs=io_outputs=0;var oi=0;output.forEach(function(output){if(output.frame_size)av_buffersink_set_frame_size(sink_ctxs[oi],output.frame_size);oi++});ret=avfilter_graph_config(filter_graph,0);if(ret<0)throw new Error("Failed to configure filter graph: "+ff_error(ret))}catch(ex){if(io_outputs)avfilter_inout_free(io_outputs);if(io_inputs)avfilter_inout_free(io_inputs);if(filter_graph)avfilter_graph_free(filter_graph);if(tmp_src_ctx)avfilter_free(tmp_src_ctx);if(tmp_sink_ctx)avfilter_free(tmp_sink_ctx);if(int32s)free(int32s);if(instr)free(instr);if(outstr)free(outstr);throw ex}return[filter_graph,multiple_inputs?src_ctxs:src_ctxs[0],multiple_outputs?sink_ctxs:sink_ctxs[0]]};var ff_filter_multi=Module.ff_filter_multi=function(srcs,buffersink_ctx,framePtr,inFrames,config){var outFrames=[];var transfer=[];var tbNum=-1,tbDen=-1;if(!srcs.length){srcs=[srcs];inFrames=[inFrames];config=[config]}config=config.map(function(config){if(config===true)return{fin:true};return config||{}});var max=inFrames.map(function(srcFrames){return srcFrames.length}).reduce(function(a,b){return Math.max(a,b)});function handleFrame(buffersrc_ctx,inFrame,copyoutFrame,config){if(inFrame!==null)ff_copyin_frame(framePtr,inFrame);var ret=av_buffersrc_add_frame_flags(buffersrc_ctx,inFrame?framePtr:0,8);if(ret<0)throw new Error("Error while feeding the audio filtergraph: "+ff_error(ret));av_frame_unref(framePtr);while(true){ret=av_buffersink_get_frame(buffersink_ctx,framePtr);if(ret===-6||ret===-541478725)break;if(ret<0)throw new Error("Error while receiving a frame from the filtergraph: "+ff_error(ret));if(tbNum<0){tbNum=av_buffersink_get_time_base_num(buffersink_ctx);tbDen=av_buffersink_get_time_base_den(buffersink_ctx)}var outFrame=copyoutFrame(framePtr);if(tbNum&&!config.ignoreSinkTimebase){if(typeof outFrame==="number"){AVFrame_time_base_s(outFrame,tbNum,tbDen)}else if(outFrame){outFrame.time_base_num=tbNum;outFrame.time_base_den=tbDen}}if(outFrame&&outFrame.libavjsTransfer&&outFrame.libavjsTransfer.length)transfer.push.apply(transfer,outFrame.libavjsTransfer);outFrames.push(outFrame);av_frame_unref(framePtr)}}var copyoutFrames=[];for(var ti=0;ti=5){var data=[];for(var ci=0;ci>=log2ch;plane+=linesize*h;if(plane>dataHi)dataHi=plane}outFrame.data=Module.HEAPU8.slice(dataLo,dataHi);transfer.push(outFrame.data.buffer);for(var p=0;p<8;p++){var linesize=AVFrame_linesize_a(frame,p);if(!linesize)break;var plane=AVFrame_data_a(frame,p);layout.push({offset:plane-dataLo,stride:linesize})}return outFrame};var ff_frame_video_packed_size=Module.ff_frame_video_packed_size=function(frame){var width=AVFrame_width(frame);var height=AVFrame_height(frame);var format=AVFrame_format(frame);var desc=av_pix_fmt_desc_get(format);var bpp=1;if(!(AVPixFmtDescriptor_flags(desc)&16))bpp*=AVPixFmtDescriptor_nb_components(desc);var dataSz=0;for(var i=0;i<8;i++){var linesize=AVFrame_linesize_a(frame,i);if(!linesize)break;var w=width*bpp;var h=height;if(i===1||i===2){w>>=AVPixFmtDescriptor_log2_chroma_w(desc);h>>=AVPixFmtDescriptor_log2_chroma_h(desc)}dataSz+=w*h}return dataSz};function ff_copyout_frame_data_packed(data,layout,frame){var width=AVFrame_width(frame);var height=AVFrame_height(frame);var format=AVFrame_format(frame);var desc=av_pix_fmt_desc_get(format);var bpp=1;if(!(AVPixFmtDescriptor_flags(desc)&16))bpp*=AVPixFmtDescriptor_nb_components(desc);var dIdx=0;for(var i=0;i<8;i++){var linesize=AVFrame_linesize_a(frame,i);if(!linesize)break;var inData=AVFrame_data_a(frame,i);var w=width*bpp;var h=height;if(i===1||i===2){w>>=AVPixFmtDescriptor_log2_chroma_w(desc);h>>=AVPixFmtDescriptor_log2_chroma_h(desc)}layout.push({offset:dIdx,stride:w});for(var y=0;y>>=1}}["channel_layout","channels","format","pts","ptshi","sample_rate","time_base_num","time_base_den"].forEach(function(key){if(key in frame)CAccessors["AVFrame_"+key+"_s"](framePtr,frame[key])});var nb_samples;if(format>=5){nb_samples=frame.data[0].length}else{nb_samples=frame.data.length/channels}AVFrame_nb_samples_s(framePtr,nb_samples);if(av_frame_make_writable(framePtr)<0){var ret=av_frame_get_buffer(framePtr,0);if(ret<0)throw new Error("Failed to allocate frame buffers: "+ff_error(ret))}if(format>=5){for(var ci=0;ci>=log2cw;h>>=log2ch}layout.push({offset:off,stride:w*bpp});off+=w*h*bpp}}for(var p=0;p>=log2ch;var ioff=lplane.offset;var ooff=0;var stride=Math.min(lplane.stride,linesize);for(var y=0;y LibAVFactory); /* * Copyright (C) 2019-2024 Yahweasel * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ if (/* We're in a worker */ typeof importScripts !== "undefined" && /* We're not being loaded with noworker from the main code */ typeof LibAV === "undefined" && /* We're not being loaded as a thread */ ( (typeof self === "undefined" && typeof Module === "undefined") || (typeof self !== "undefined" && self.name !== "em-pthread") ) ) (function() { var libav; Promise.all([]).then(function() { /* We're the primary code for this worker. The host should ask us to * load immediately. */ return new Promise(function(res, rej) { onmessage = function(e) { if (e && e.data && e.data.config) { LibAVFactory({ wasmurl: e.data.config.wasmurl, variant: e.data.config.variant }).then(res).catch(rej); } }; }); }).then(function(lib) { libav = lib; // Now we're ready for normal messages onmessage = function(e) { var id = e.data[0]; var fun = e.data[1]; var args = e.data.slice(2); var ret = void 0; var succ = true; function reply() { var transfer = []; if (ret && ret.libavjsTransfer) transfer = ret.libavjsTransfer try { postMessage([id, fun, succ, ret], transfer); } catch (ex) { try { ret = JSON.parse(JSON.stringify( ret, function(k, v) { return v; } )); postMessage([id, fun, succ, ret], transfer); } catch (ex) { postMessage([id, fun, succ, "" + ret]); } } } try { ret = libav[fun].apply(libav, args); } catch (ex) { succ = false; ret = ex; } if (succ && ret && ret.then) { // Let the promise resolve ret.then(function(res) { ret = res; }).catch(function(ex) { succ = false; ret = ex; }).then(reply); } else reply(); }; libav.onwrite = function(name, pos, buf) { /* We have to buf.slice(0) so we don't duplicate the entire heap just * to get one part of it in postMessage */ buf = buf.slice(0); postMessage(["onwrite", "onwrite", true, [name, pos, buf]], [buf.buffer]); }; libav.onread = function(name, pos, len) { postMessage(["onread", "onread", true, [name, pos, len]]); }; libav.onblockread = function(name, pos, len) { postMessage(["onblockread", "onblockread", true, [name, pos, len]]); }; postMessage(["onready", "onready", true, null]); }).catch(function(ex) { console.log("Loading LibAV failed\n" + ex + "\n" + ex.stack); }); })();